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

libROM with Dealii #92

Open
hsllo opened this issue Jan 20, 2022 · 6 comments
Open

libROM with Dealii #92

hsllo opened this issue Jan 20, 2022 · 6 comments

Comments

@hsllo
Copy link

hsllo commented Jan 20, 2022

Good afternoon,

I was wondering if libROM is compatible with the library Dealii. I would like to include a ROM implementation to an existing solver developed with Dealii.

Thank you very much.
H.

@samyakdarshan
Copy link

Interesting..

@dylan-copeland
Copy link
Collaborator

dylan-copeland commented Jan 24, 2022

Thank you @hsllo for the interesting question. Currently, libROM does not support deal.II applications, but we would gladly welcome the contribution of a PR that adds this support. Implementing this should not be very difficult for a deal.II developer, but unfortunately the internal libROM team does not have any deal.II developers. This is a good opportunity for you or other libROM users to expand the capabilities of libROM, enabling more users.

I would be glad to help with any questions about how to add support, and I will describe here what needs to be done for deal.II or any other FEM code. Currently, libROM supports MFEM, as illustrated by the example solver in libROM/examples/prom/mixed_nonlinear_diffusion.cpp (and the open-source MFEM miniapp Laghos on github). The only part of libROM specific to MFEM is the class SampleMeshManager in libROM/lib/mfem/SampleMesh.hpp and the corresponding cpp file. This class has several public member functions that would need to be implemented for deal.II. Hopefully the documentation of those functions is clear enough. Basically, this class should take as input an array of FEM spaces (constructor) and variables defined on those spaces (RegisterSampledVariable), along with their sampled DOFs. It then creates a new sample mesh defined by the elements containing sampled DOFs (ConstructSampleMesh), and it provides the capability to get full-order sampled DOFs from a vector of DOFs in a sample mesh FEM space (GetSampledValues). Also, GatherDistributedMatrixRows gathers rows from a ROM basis matrix, to construct a matrix on the sample mesh space. Basically, for deal.II support, one would need to make a new version of this class with these functions implemented for deal.II.

The most challenging aspect of implementing this is to define and work with index maps between full-order space DOFs and sample mesh space DOFs. For MFEM, we support the general case of multiple spaces and multiple variables on each space, but you may only need one space and one variable, which would be simpler. This requires knowledge of deal.II. The MFEM implementation in SampleMesh.cpp could be used as a guiding example, but it is quite complicated and not easy to read. Please feel free to ask any questions if you decide to implement this for deal.II.

@samyakdarshan
Copy link

Hello @dylan-copeland , Can I help you with this issue?

@dylan-copeland
Copy link
Collaborator

Hello @dylan-copeland , Can I help you with this issue?

Hi @samyakdarshan, if you would like to work on deal.II support, I will be glad to answer any questions and provide some assistance from the libROM side (I can help with libROM but not deal.II). Please feel free to work on this and create a libROM PR.

@dylan-copeland
Copy link
Collaborator

dylan-copeland commented Apr 12, 2023

Please note that my comment on January 24, 2022, was in reference to hyperreduction for projection-based (POD) ROM methods, which are code-invasive and depend on the FEM library being used (e.g. MFEM, deal.II, etc.). I should also mention that libROM features some less invasive ROM methods, such as DMD, LaSDI, gLaSDI, which would be much easier to use in other libraries such as deal.II. These less invasive methods depend only on data, so an application based on deal.II would simply need to provide data. If anyone would like to make some examples of using a libROM method like DMD for a deal.II problem, such examples would be welcome and could be shown possibly on https://www.librom.net.

@samyakdarshan
Copy link

Yes, got it. Sorry was bit held up with other work. Will work on hyperreduction for projection-based (POD) ROM methods.

Thanks for the inputs! For DMD and others, I'll try to create examples at the end.

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

No branches or pull requests

3 participants