Skip to content

Use mesh subsets instead of mesh nodes#1437

Merged
endJunction merged 5 commits intoufz:masterfrom
endJunction:UseMeshSubsetsInsteadOfMeshNodes
Sep 28, 2016
Merged

Use mesh subsets instead of mesh nodes#1437
endJunction merged 5 commits intoufz:masterfrom
endJunction:UseMeshSubsetsInsteadOfMeshNodes

Conversation

@endJunction
Copy link
Copy Markdown
Member

When creating dof table, setting initial conditions, creating boundary conditions, and in output
currently all nodes of the mesh are involved. If the underlying mesh subsets do not consist of all nodes (e.g. only base nodes) then the mentioned algorithms do return wrong results.

Maybe there are more places with similar patterns, please tell me then.

Comment thread MeshLib/MeshSubset.h Outdated
return _msh.getElements().cend();
}

std::vector<Node*> getNodes() const
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why isn't it possible to return pointer or reference here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is of course a mistake. I'll update this.

for (auto* n = (*e)->getNodes(); n < (*e)->getNodes()+(*e)->getNumberOfNodes(); ++n)
{
// Check if the element's node is in the given list of nodes.
if (std::find(std::begin(nodes), std::end(nodes), *n) == std::end(nodes))
Copy link
Copy Markdown
Collaborator

@norihiro-w norihiro-w Sep 25, 2016

Choose a reason for hiding this comment

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

TBD. My LDIE implementation assumes npos is stored for those nodes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we agreed to keep this function as suggested here and created another function for handling my special case. I'll update my PR after this PR is merged.

@chleh
Copy link
Copy Markdown
Collaborator

chleh commented Sep 26, 2016

Last Friday you showed some HM-process results in Paraview. There the pressure values had a peculiar pattern. Will that pattern be observed also with the code from this PR?

@endJunction
Copy link
Copy Markdown
Member Author

@chleh For a given problem not using the full mesh (like omitting second order nodes) there is no sensible output on the whole mesh. What is coming to my mind is:

  • initialization with NaN of the output data
  • creation of a submesh corresponding to a mesh-subset
  • other ideas are welcome...

Copy link
Copy Markdown
Collaborator

@norihiro-w norihiro-w left a comment

Choose a reason for hiding this comment

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

i have only one comment for getNodes(). the rest is fine.

variable_id < static_cast<int>(process_variables.size());
++variable_id)
{
ProcessVariable& pv = process_variables[variable_id];
Copy link
Copy Markdown
Member

@TomFischer TomFischer Sep 28, 2016

Choose a reason for hiding this comment

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

Could pv be const?

@TomFischer
Copy link
Copy Markdown
Member

👍

@endJunction endJunction merged commit 90edaa5 into ufz:master Sep 28, 2016
@endJunction endJunction deleted the UseMeshSubsetsInsteadOfMeshNodes branch September 28, 2016 11:37
@ogsbot
Copy link
Copy Markdown
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

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.

5 participants