How can I identify if a mesh is periodic from the basis name? #4556
-
Hello, VisIt developer here. Is there a way to tell if an mfem mesh is periodic from the grid function basis name? These are periodic: Is it the T1? The P1? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 27 replies
-
All periodic MFEM meshes will use L2 spaces (so the prefix will be |
Beta Was this translation helpful? Give feedback.
-
This is how we test in VisIt if something is periodic: if (mesh &&
mesh->GetNodes() &&
mesh->GetNodes()->FESpace() &&
mesh->GetNodes()->FESpace()->FEColl() &&
dynamic_cast<const L2_FECollection *>(mesh->GetNodes()->FESpace()->FEColl()))
{
// Check if the mesh is periodic.
AVT_MFEM_INFO("High Order Mesh is periodic; falling back to Legacy LOR.");
return LegacyRefineMeshToVTK(mesh, domain, lod);
} |
Beta Was this translation helpful? Give feedback.
-
Your function |
Beta Was this translation helpful? Give feedback.
-
I think we've discussed this before with @tzanio and @v-dobrev. Are either of you aware of how to check if a mesh is periodic? |
Beta Was this translation helpful? Give feedback.
The algorithm that Tzanio describes sounds about right.
The meaning of the names is described here:
mfem/fem/fe_coll.hpp
Lines 128 to 129 in 17955e1
If the space has the form$d$ dimensional with degree $p$ polynomials.
L2_dD_Pp
, then the space isIf the space has the form
L2_Tt_dD_Pp
, then it additionally uses basis typet
, where the basis types are defined here:mfem/fem/fe/fe_base.hpp
Lines 28 to 42 in 17955e1