Closed JacobLotz closed 1 year ago
Hi @JacobLotz,
Thanks for your questions. ROM has some subtle complications that perhaps we should document better, and the sample mesh is a particularly tricky topic. A further complication is that results are very problem-dependent. Diffusion types of problems are typically the easiest for ROM, so the performance should be better for mixed_non-linear_diffusion.cpp
than for nonlinear_elasticity_global_rom.cpp
. Even within nonlinear_elasticity_global_rom.cpp
, the sample runs have quite different performance for the two cases
(i) using displacement basis, velocity basis and nonlinear term basis, with velocity initial condition;
(ii) using only displacement basis and nonlinear term basis.
The latter case has better performance with hyperreduction, with smaller sample mesh size. Case (i) has a sample mesh which is not much smaller than the FOM mesh, i.e. poor speed-up, which may be confusing.
Now, to answer your questions: (1) "other unsampled variables" does not mean "all unsampled variables". In the MFEM context, it means all of the DOFs (degrees of freedom) in the elements containing sampled DOFs. (2) For an MFEM-based application, operators are evaluated element-wise, not DOF-wise, so there is no reasonable way to evaluate an operator only at sampled DOFs. Instead, for simplicity, we use the FOM code on a subset of the elements (the sampled elements). This includes non-sampled DOFs, so we have to extract the sampled DOFs.
In general, here is a basic summary of the hyperreduction process.
The sampled DOFs are computed, by an algorithm such as DEIM. If there are multiple variables (e.g. x, v), the sampling algorithm could be applied to a monolithic variable [x, v] or to each variable separately (x and v separately). We have always found it better to sample each variable separately. Then the sampled DOFs for all variables are merged into one set of sampled DOFs.
The set of FOM elements containing sampled DOFs is found. This defines the "sample mesh", and the "sample spaces" are defined on this mesh. Hopefully now it is clear why the sample spaces may have more DOFs than the set of sampled DOFs. For example, the variables could be on H^1 and L_2 spaces. The SampleMeshManager
class handles multiple variables on multiple spaces.
For evaluation of the hyperreduced operators, each hyperreduced operator is defined on the appropriate sample space, which is on the sample mesh.
The sample DOFs of the action of the hyperreduced operator are extracted from the sample space.
Hi @dylan-copeland, Thank you for your clarifications and your elaborate answers! The importance of SampleMeshManager
and its DOFs is much more clear.
I am currently working on a case of a one variable non-linear equation with a NURBS discretisation, but in a later stage I plan to apply the same to the Navier-Stokes equations. The choice of the used basis will probably important, just as in nonlinear_elasticity_global_rom.cpp
from what I understand from your explanation.
I am trying to implement a time independent non-linear reduced order model. The examples
nonlinear_elacticity_global_rom.cpp
andmixed_non-linear_diffusion.cpp
provide good examples of the usage of the used classes. However, I cannot fully understand the usage of the classSampleMeshManager
.This class seems to register the sampled variables, which are especially important for the hyper reduced non-linear term. I do not understand what
GetSampleFESpace()
produces. As the name indicates this seems to be some kind of sampled finite element space and the number of true variables seems to be somewhere in between the number of FOM and ROM variables.Quoting SampleMesh.hpp: "The spaces defined on the sample mesh are referred to as sample mesh spaces, and they generally contain the sampled DOFs along with other unsampled DOFs." An explanation for the number of variables being somewhere between the number of the FOM and the ROM variables would be the unsampled DOFs in the description above.
I have two questions:
nonlinear_elacticity_global_rom.cpp
it produces a large non-linear vector first, which it samples again afterwards to a much smaller vector. In this way it seems to be very FOM size-ish dependent. This is in the lines: