Skip to content

Conversation

@paullric
Copy link
Contributor

@paullric paullric commented Feb 9, 2024

The overlap mesh isn't used for bilinear or delaunay maps. This PR removes the requirement that ov_mesh be specified on the GenerateOverlapMesh command line for these cases.

@paullric paullric requested a review from vijaysm February 9, 2024 05:21
Copy link
Collaborator

@vijaysm vijaysm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested the PR locally to see whether bilin/delaunay works fine without specifying overlap meshes. Made some comments during review. Please address them. I'll update the approval after local tests.


// Check overlap mesh
if (meshOverlap.nodes.size() == 0) {
if ((strMapAlgorithm != "delaunay") &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a double if check here? Consolidate the check into a single one

"and input mesh area.\n Disabling checks for consistency.");
fCheckConsistency = false;
if (meshOverlap.nodes.size() != 0) {
if (fabs(dTotalAreaOverlap - dTotalAreaInput) > 1.0e-10) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can combine the checks here again

Mesh(const std::string & strFile) {
Read(strFile);
if (strFile != "") {
Read(strFile);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is misleading. If someone passed an empty string, then you should error out or print a warning message.

}

// Overlap mesh
if (strOverlapMesh == "") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should still be doing this check for FV projections. Perhaps need to check whether this is bilin/delaunay context first?

@vijaysm
Copy link
Collaborator

vijaysm commented Mar 24, 2024

Did you get a chance to address my comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants