Closed JacobLotz closed 1 year ago
Hi @JacobLotz. First, congratulations on being a pioneer in using NURBS meshes and spaces with libROM. Even in MFEM, usage of NURBS is rather limited. So far, libROM has never been used on NURBS meshes. This gives you the exciting opportunity to write new code to support NURBS meshes and spaces (IGA).
An alternative may be converting your NURBS mesh to a high-order mesh in MFEM. This would introduce a small amount of error that is likely smaller than the ROM error, and would avoid the issues with unsupported NURBS meshes/spaces. I will try to answer your questions, assuming you really need to use NURBS.
In mfem/examples
, this example works for a NURBS mesh and H1_FECollection
space:
ex1 -m ../data/pipe-nurbs.mesh -o 1
In FiniteElementSpace::Constructor
, there is a check for a NURBS mesh if a NURBS space is used. In this case, the space is not a NURBSFECollection
, and there is no restriction on the mesh type. In the bilinear form integration, the element transformations use the NURBS mesh, which has a Nodes
function defined with a NURBSFECollection
. Thus it uses NURBS to evaluate the element transformation, from the reference to physical element. The shape functions used for the test and trial functions are from an H1_FECollection
. For IGA, -o -1
should be used.
In libROM, SampleMesh.cpp
is implemented only for high-order meshes, not NURBS. For example, BuildSampleMesh
declares
sample_mesh = new Mesh(d, sample_mesh_num_verts, sample_mesh_num_elems);
and then constructs this mesh one element at a time. The result is a linear mesh, which can be made high-order by setting a nodal GridFunction
. Clearly this mesh construction would need to be changed for the NURBS case. An interesting question is whether to construct entire NURBS patches or just a small patch for each sampled element. Also, the mappings between full-order and sample spaces needs to be generalized. I am not sure how much work this would take, i.e. how much code would need to be changed, and how much could be reused. It seems like a significant amount of work.
Hi @dylan-copeland. Thank you again for your elaborate answers and clarifications! This confirms what I expected. We are indeed planning to work on mesh sampling for NURBS in libROM. Your suggested alternative will provide a welcome back up!
I have been trying to work with a MFEM NURBS-mesh in our own code and the example
nonlinear_elasticity_global_rom
. (The latter just as in issueshttps://github.com/LLNL/libROM/issues/184
https://github.com/LLNL/libROM/issues/185
.)In our own code I cannot make it work to sample a FiniteElementSpace as which is construced using a NURBS mesh. I wonder if it should is even possible to use a MFEM NURBS mesh in
nonlinear_elasticity_global_rom
as the usedParFiniteElementCollection
is aH1_FECollection
. So in case of using a NURBS mesh in this example in the line ofaround line 560-570, a
ParFiniteElementSpace
is created using a NURBS mesh but aH1_FECollection
. Which seems counter intuitive and it seems that it falsely passes some checks deeper in MFEM (void FiniteElementSpace::Constructor
). Maybe I am missing something important here.Has anyone used Hyperreduction / sampling of DOFs on a NURBS mesh and succesfully created a sampled
FiniteElementSpace
? If so, what kind of approach would you suggest?