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
Mesh reader support for VTK high order elements [feature/vtk_high_order] #975
Conversation
|
We just discussed this feature this week. We should revive this PR. |
|
To help the reviewers, I edited the top-level comment with an updated summary of this PR — the information there was previously quite out of date. |
@acfisher, @bslazarov and @mlstowell -- can you please review? |
VerifyOrdering(el); | ||
} | ||
|
||
TEST_CASE("Lexicographic Ordering", "[FiniteElement,Geometry]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good test to have around!
@@ -8525,61 +8539,85 @@ H1_TetrahedronElement::H1_TetrahedronElement(const int p, const int btype) | |||
Vector shape_x(p + 1), shape_y(p + 1), shape_z(p + 1), shape_l(p + 1); | |||
#endif | |||
|
|||
auto tri = [](int k) { return (k*(k + 1))/2; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good use for lambdas.
@@ -731,6 +732,15 @@ class NodalFiniteElement : public ScalarFiniteElement | |||
virtual void ProjectDiv(const FiniteElement &fe, | |||
ElementTransformation &Trans, | |||
DenseMatrix &div) const; | |||
|
|||
/** @brief Get an Array<int> that maps lexicographically ordered indices to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should define exactly what is meant by "lexicographically ordered". Without knowing the lexicon and the rules we use to order it this array may not be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the updated comment look to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks perfect. Thanks!
Extending approval due date to the end of this week... |
@@ -731,6 +732,15 @@ class NodalFiniteElement : public ScalarFiniteElement | |||
virtual void ProjectDiv(const FiniteElement &fe, | |||
ElementTransformation &Trans, | |||
DenseMatrix &div) const; | |||
|
|||
/** @brief Get an Array<int> that maps lexicographically ordered indices to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks perfect. Thanks!
ping: @bslazarov |
Can you please update |
Merged in |
Re-merged in |
Re-merged in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonesholger and @pazner -- thank you so much for this important contributions. I am sure many of our users will appreciate it!
@mlstowell, @acfisher and @bslazarov -- thank you for reviewing!
Updated PR information (Dec. 2020 – Will)
This PR adds two new features to MFEM's VTK support:
XML parsing is done using the TinyXML2 library.
To facilitate systematic conversion between VTK's high-order node ordering and MFEM's node ordering, mappings are created that use an intermediate lexicographic ordering. Some remarks about the lexicographic ordering:
As part of this PR, the handling of the VTK format for input and output are both made more systematic. The files
vtk.hpp
andvtk.cpp
now have a lot more features that should make dealing with VTK more convenient, for instance converting from a VTK element type to MFEMGeometry::Type
can now be performed usingVTKGeometry:: GetMFEMGeometry
instead of manual switch statements. This simplifies the code inMesh::PrintVTK
andMesh::PrintVTU
.For testing purposes, VTK meshes of Cartesian grids with low-order and high-order elements of all types can be created in ParaView with the source "Unstructured Cell Types".
Previous information (out of date)