Skip to content
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

question about SampleMeshManager #189

Closed
gokhalen opened this issue Mar 1, 2023 · 2 comments
Closed

question about SampleMeshManager #189

gokhalen opened this issue Mar 1, 2023 · 2 comments

Comments

@gokhalen
Copy link

gokhalen commented Mar 1, 2023

I might be missing something, but I was looking at the following code to construct a sample mesh

ParFiniteElementSpace* sp_XV_space;
smm = new CAROM::SampleMeshManager(spfespace);
vector<int> sample_dofs_empty;
vector<int> num_sample_dofs_per_proc_empty;
num_sample_dofs_per_proc_empty.assign(num_procs, 0);
smm->RegisterSampledVariable("V", 0, sample_dofs,
num_sample_dofs_per_proc);
smm->RegisterSampledVariable("X", 0, sample_dofs,
num_sample_dofs_per_proc);
smm->RegisterSampledVariable("H", 0, sample_dofs,
num_sample_dofs_per_proc);
smm->ConstructSampleMesh();

It is surprising to be that there is no code/argument to set the error bound in constructing the sample mesh. I'm thinking that one should be able set the error bound in constructing the sample mesh. e.g. If I wanted less than 1% error the sample mesh would contain much more elements than if I wanted less than 25% error.

Maybe I'm missing something. Maybe I should be reading the original papers.

Thanks,

Nachiket

@JacobLotz
Copy link
Collaborator

JacobLotz commented Mar 2, 2023

Based on your question I think you are expecting that the sampling of DOFs is performed in SampleMeshManager. Am I right? The SampleMeshManager is used to construct a FiniteElementSpace containing the sampled variables determined with for instance the DEIM. It does not sample itself.

I think the answer on issue #187 will give clarity.

@gokhalen
Copy link
Author

gokhalen commented Mar 2, 2023

@JacobLotz Thanks, your answer makes it more clear. After looking at the code, DEIM/S_OPT/GNAT determines the sample_dofs and then the SampleMeshManager builds a FiniteElementSpace. As for my question about the error, I guess the error is implicitly determined by the number for basis vectors/reduced space dimension for V', 'X', 'H'. DEIM/S_OPT/GNAT will determine the best dofs to sample, given the basis vectors and basis size. There is no direct parameter to set the error of the ROM and then determine a sample mesh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants