-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Description
I am creating a sample mesh using SampleMeshManager.
I have sampled MFEM FiniteElementSpaces using the DEIM algorithm associated with 3 variables. This gives me an array of std::vectors containing the sampled dofs per variable in sample_dofs and a similar array of the number of sample dofs per process per variable in num_sample_dofs_per_proc.
Furthermore, I have an std::vector containing MFEM::ParFiniteElementSpace in stdfomfes.
I use the following code:
vector<ParFiniteElementSpace*> stdfomfes(3);
stdfomfes[0] = fomfespace[0];
stdfomfes[1] = fomfespace[1];
stdfomfes[2] = fomfespace[2];
smm = new CAROM::SampleMeshManager(stdfomfes);
smm->RegisterSampledVariable(ROMVarName(0), 0, *(sample_dofs[0]),
*(num_sample_dofs_per_proc[0]));
smm->RegisterSampledVariable(ROMVarName(1), 1, *(sample_dofs[1]),
*(num_sample_dofs_per_proc[1]));
smm->RegisterSampledVariable(ROMVarName(2), 2, *(sample_dofs[2]),
*(num_sample_dofs_per_proc[2]));
smm->ConstructSampleMesh();
Error
Uppon calling smm->ConstructSampleMesh() I get the following error in Finish_s2sp_augmented:
Verification failed: (s2sp_[i] >= 0) is false:
-->
... in function: void CAROM::Finish_s2sp_augmented(int, int, std::vector<mfem::ParFiniteElementSpace*>&, std::vector<std::vector<int> >&, std::vector<std::vector<int> >&, std::vector<std::vector<int> >&, bool, std::vector<int>&)
... in file: /home/jelotz/prog/delfi-librom/external/libROM-fork/lib/mfem/SampleMesh.cpp:896
I have tried
It fails as s2sp_[i] = -1. The error is not very descriptive, but I think it has to do with the sampled dof numbers in the DEIM algorithm.
It only fails if I add the third variable, if I only register the first two variables it works fine.
Also, strangely it works if I only register the third variable and construct the SampleMeshManager with one FiniteElementSpace.
I have also manually modified the number of the sampled variable by adding 1 and subtracting one and then it works..
Question
What is going on here? What does it mean if s2sp_[i] = -1?
How can I fix this?