Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New tool: createQuadraticMesh #1500

Merged
merged 2 commits into from
Oct 26, 2016
Merged

Conversation

norihiro-w
Copy link
Collaborator

This PR adds a new CLI tool createQuadraticMesh for creating a quadratic order mesh based on an existing linear order mesh. At the moment, it supports only Line2 and Quad4 elements, which are converted to Line3 and Quad8. To copy MaterialIDs to the new mesh, I had to modify MeshLib::Properties.

if (!mesh)
return EXIT_FAILURE;

INFO("Creat a quadratic order mesh");
Copy link
Member

@endJunction endJunction Oct 25, 2016

Choose a reason for hiding this comment

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

Create ✅

return (_id1 == r._id1 && _id2 == r._id2);
}

friend bool operator< (Edge const& l, Edge const& r)
Copy link
Member

@endJunction endJunction Oct 25, 2016

Choose a reason for hiding this comment

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

friend is not needed here, can be defined outside of Edge. ✅

@@ -107,6 +107,12 @@ class Properties
std::vector<std::size_t> const& exclude_elem_ids,
std::vector<std::size_t> const& exclude_node_ids) const;

/** copy all PropertyVector objects stored in the (internal) map but
* PropertyVectoronly objects with the given MeshItemType are excluded.
Copy link
Member

@TomFischer TomFischer Oct 26, 2016

Choose a reason for hiding this comment

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

spelling: PropertyVectoronly

double coords[3];
for (Edge const& edge : vec_edges)
{
auto &node0 = *vec_new_nodes[edge._id1];
Copy link
Member

@TomFischer TomFischer Oct 26, 2016

Choose a reason for hiding this comment

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

Why not auto const & node0? ✅

Copy link
Member

@TomFischer TomFischer left a comment

Choose a reason for hiding this comment

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

Looks good.

@norihiro-w norihiro-w merged commit 9aefb95 into ufz:master Oct 26, 2016
@norihiro-w norihiro-w deleted the gen-quadratic-mesh branch October 26, 2016 05:44
@ogsbot
Copy link
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.

4 participants