-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add elliptic eigenvalue global prom example #266
Conversation
scripts/compile.sh
Outdated
@@ -26,6 +26,7 @@ USE_MFEM="Off" | |||
UPDATE_LIBS=false | |||
INSTALL_SCALAPACK=false | |||
MFEM_USE_GSLIB="Off" | |||
MFEM_USE_LAPACK="NO" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious if there are any reasons to have different kinds of options, "On"
vs "Off"
, "Yes"
vs "No"
, true
vs false
. Can we unify them?
ecc28bd
to
90488de
Compare
Inviting @dreamer2368 as a reviewer to evaluate the changes in the build process in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setup procedure looks good in general. If LAPACK is required for this example, can we install mfem with LAPACK dependency in our docker container?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except some minor things. Thanks @ckendrick!
For boarder communication, I am able to reproduce the eigenvalues, but the L2 error of eigenvectors appear different. The signs of the eigenvectors seem to be sort of random, which occasionally gives 200% error. One example that I got is
Relative l2 error of ROM eigenvector 0 = 2.0185057
Relative l2 error of ROM eigenvector 1 = 0.090773417
Relative l2 error of ROM eigenvector 2 = 0.076616931
Relative l2 error of ROM eigenvector 3 = 1.9746465
Relative l2 error of ROM eigenvector 4 = 1.9912245
I'll follow up with this example in PR#277 to enable the followings:
- Use consistent signs of eigenfunctions
- Add boundary condition switch
- Clean up to retain only 4 problems, i.e. poisson, reaction-diffusion in heterogeneous media, Schrodinger equation with harmonic potential, Schrodinger equation with negative Gaussian potential well
- Extend to 3D examples
- Change some filenames
I had approved this PR after reviewing the changes and reproducing the results. We need one more approval to get this PR merged. |
double mesh_center = 0.5 * (bb_max[i] + bb_min[i]); | ||
|
||
// check that t is within the limit relative to the center of the mesh | ||
if (std::abs((t(i) - mesh_center)) - (0.5 * domain_limit) > 1.0e-14) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the condition being checked here is
if (std::abs(t(i) - mesh_center) > 0.5 * domain_limit)
The current version is equivalent, but less clear.
Adds a simple elliptic eigenvalue global pROM example based on MFEM example 11p.
Note: MFEM needs to be compiled with
MFEM_USE_LAPACK
enabled to run the online phase. This adds a-l
option to thecompile.sh
script to build MFEM with lapack enabled.Sample runs:
Example FOM output:
Example online output: