Compare commits

...
Author SHA1 Message Date
Stowell, Mark L. ef5f729245 Merge remote-tracking branch 'origin/master' into aniso-diffusion-dev
# Conflicts:
#	fem/bilininteg.hpp
#	fem/coefficient.cpp
#	fem/coefficient.hpp
#	linalg/hypre.cpp
#	linalg/hypre.hpp
#	linalg/solvers.cpp
#	makefile
#	miniapps/common/pfem_extras.hpp
#	miniapps/electromagnetics/tesla_solver.hpp
2025-03-13 17:43:24 -07:00
Tzanio Kolev 10c0c2da44 Merge pull request #4726 from mfem/blf-print
Bug fix for printing BilinearForm [blf-print]
2025-03-13 07:50:55 -07:00
Tzanio Kolev 3e769111c2 Update tests/unit/fem/test_bilinearform.cpp 2025-03-13 07:50:02 -07:00
Tzanio Kolev 12f9fbbd89 Merge branch 'master' into blf-print 2025-03-12 13:12:56 -07:00
Tzanio Kolev 2fbc743d47 Merge pull request #4483 from mfem/solver-monitor-controller
Allow IterativeSolverMonitor to indicate early convergence
2025-03-11 16:19:43 -07:00
Julian Andrej 6470f9aa55 Merge branch 'solver-monitor-controller' of github.com:mfem/mfem into solver-monitor-controller
# Conflicts:
#	CHANGELOG
2025-03-11 15:25:54 -07:00
Julian Andrej 69a08aab26 add changelog 2025-03-11 15:23:58 -07:00
Tzanio Kolev 7415254146 Merge branch 'master' into solver-monitor-controller 2025-03-11 14:21:30 -07:00
Jan Nikl ada6f722a6 Merge pull request #4733 from mfem/solver-monitor-controller-fix
Fixed ex19(p) to not duplicate the last printout.
2025-03-10 09:53:59 -07:00
Tzanio Kolev d9d7ea7557 Merge pull request #4730 from mfem/4729-submesh-fix
Fix construction of 2D submeshes with internal boundaries [4729-submesh-fix]
2025-03-09 18:59:21 -07:00
Jan Nikl 5dde59d4ae Fixed ex19(p) to not duplicate the last printout. 2025-03-05 21:01:21 -08:00
Sohail Reddy cd6d55599c Merge branch 'master' into blf-print 2025-03-04 16:12:33 -08:00
Sohail Reddy 3d9df1ddf7 minor cosmetic changes 2025-03-04 16:11:44 -08:00
Jan van Dijk a0cbf383a3 Fix indentation. 2025-03-02 00:26:57 +01:00
Jan van Dijk 1acaa6af3e Use GetSubMeshEdgeFromParent for 2D meshes.
In AddBoundaryElements, use GetSubMeshEdgeFromParent(parentFaceIdx), not
GetSubMeshFaceFromParent(parentFaceIdx) for 2D meshes. This fixes an assert
failure/segfault when constructing a submesh with internal boundaries in 2D.

Fixes #4729
2025-03-02 00:14:18 +01:00
Tzanio Kolev 9c162692de Merge pull request #4452 from mfem/update-gko-cpp-std
Increase minimum Ginkgo version to 1.9.0
2025-03-01 09:45:55 -08:00
Sohail Reddy b7f75bdcfa Merge branch 'master' into blf-print 2025-02-27 11:12:03 -08:00
nbeams aeefd775ef Add Google Benchmark to grouped C++ version check in Makefile build 2025-02-27 16:01:22 +00:00
nbeams 9281e125ba Merge branch 'master' into update-gko-cpp-std 2025-02-27 15:57:21 +00:00
Tzanio Kolev 31a60b4476 Merge pull request #4723 from mfem/google-benchmark
Update benchmarks
2025-02-27 06:00:54 -08:00
Tzanio Kolev 674e952a28 Merge pull request #4704 from mfem/spiral-transformation
Spiral transformation
2025-02-27 05:59:49 -08:00
John Camier 3b993a8791 Merge branch 'master' into google-benchmark 2025-02-27 05:29:02 -08:00
Tzanio Kolev 00c88ccfca Merge pull request #4706 from mfem/tupek/newmark_bugfix
Address some subtle bugs in the changed Newmark integration method.
2025-02-26 15:54:15 -08:00
Sohail Reddy a1fcf6ab14 Removed hidden overlead from print in operator 2025-02-26 15:46:14 -08:00
Tzanio Kolev 5dedbda5ac Merge pull request #4716 from mfem/macos_single_precision
macos single precision build fix
2025-02-26 15:38:29 -08:00
Sohail Reddy 45dfde0fb7 fixed shadow declaration 2025-02-26 15:06:43 -08:00
Sohail Reddy 16fec0a8ac fixed ostream in print 2025-02-26 14:52:36 -08:00
Sohail Reddy 5d3945e72e Added BilinearForm tag to unit test 2025-02-26 14:17:33 -08:00
Sohail Reddy a2fc578081 Fixed issue with printing BilinearForm and MixedBilinearForm 2025-02-26 14:13:26 -08:00
camierjs 6bcd0ca208 Fix vector BPs 2025-02-25 18:12:20 -08:00
camierjs b75b58faad Merge branch 'master' into google-benchmark 2025-02-25 15:51:41 -08:00
camierjs 1b83c64055 google-benchmark now with c++14 2025-02-25 15:40:36 -08:00
nbeams 4606b273d8 Group checks for C++ version in Makefile build;
ensure Ginkgo C++17 requirement isn't overwritten
2025-02-25 20:11:06 +00:00
Michael Tupek 921b09e9e4 Merge branch 'master' into tupek/newmark_bugfix 2025-02-25 11:57:39 -08:00
John Camier 09bb0a7bbd Merge branch 'master' into macos_single_precision 2025-02-25 11:41:29 -08:00
Michael Tupek ba36f8f7df Update ode.cpp
Move state increment to be consistent with other second order time integrators.
2025-02-25 11:17:05 -08:00
Veselin Dobrev 8447e62735 Merge pull request #4712 from mfem/fix-4683
Fix typo in SumIntegrator::AddMultMF / AddMultTransposeMF
2025-02-25 11:12:34 -08:00
Michael Tupek b55e674f55 Update ode.cpp
Trying to guess at failing mfem tests.  Having Newmark fixed quickly would be great.
2025-02-25 07:20:19 -08:00
Michael Tupek 65f638f01f Merge branch 'master' into tupek/newmark_bugfix 2025-02-24 14:53:09 -08:00
Julian Andrej b5fec915cd fix the fix 2025-02-24 11:11:04 -08:00
camierjs a0723083c6 Update CHANGELOG 2025-02-24 09:09:53 -08:00
Ketan Mittal ba14712ca2 Merge branch 'master' into spiral-transformation 2025-02-23 11:27:00 -08:00
camierjs 2758d32f2e cmake MFEM_ENABLE_BENCHMARKS all fix 2025-02-23 09:42:06 -08:00
camierjs 768c7a10a1 Update benchmarks 2025-02-23 09:35:50 -08:00
Tzanio Kolev 819d6c7880 Merge pull request #4721 from mfem/suppress-warning-quad-interp
Suppress a warning from `icpc`
2025-02-22 09:35:28 -08:00
Tzanio Kolev 9b2a92ec93 Merge pull request #4717 from koparasy/export-use-hip-cmake
Expose MFEM_USE_HIP on cmake
2025-02-22 09:35:01 -08:00
Veselin Dobrev 1ff89e8348 Suppress a warning from 'icpc' 2025-02-21 11:03:08 -08:00
camierjs 31f3ec78dd Remove extra space 2025-02-20 17:07:47 -08:00
Konstantinos Parasyris a6841beab6 Merge branch 'master' into export-use-hip-cmake 2025-02-20 16:43:54 -08:00
koparasy 4cd89753b9 Expose MFEM_USE_HIP on cmake 2025-02-20 16:13:30 -08:00
camierjs b153759440 revert unwanted changes 2025-02-20 12:58:21 -08:00
camierjs cde249d51e macos single and distclean fix 2025-02-20 10:52:21 -08:00
Tzanio Kolev 72fd8bac9d Merge pull request #4669 from mfem/hdiv-quad-interp
Add support for H(div) spaces in class QuadratureInterpolator
2025-02-20 08:59:45 -08:00
Tzanio Kolev 493120efb3 Merge pull request #4707 from mfem/tmop-skew-restore
Restore TMOP skew metric
2025-02-20 08:20:01 -08:00
Veselin Dobrev a183be3ca0 Merge branch 'master' into hdiv-quad-interp 2025-02-19 18:40:48 -08:00
Veselin Dobrev d272b9e181 Added a bullet to CHANGELOG about H(div) support in QuadratureInterpolator 2025-02-19 18:25:18 -08:00
Veselin DobrevandTzanio Kolev f0b72c3714 Apply suggestions from code review
Co-authored-by: Tzanio Kolev <tzanio@llnl.gov>
2025-02-19 18:02:22 -08:00
Tzanio Kolev d17f75a8b4 Merge pull request #4646 from mfem/fa-mesh-connectivity
Support full assembly on highly connected meshes
2025-02-19 13:51:17 -08:00
nbeams 8058cb0838 Increase minimum Ginkgo version to 1.9.0 2025-02-19 16:13:36 +00:00
Tzanio Kolev 2d8fface64 Merge pull request #4675 from mfem/bltp
BlockLowerTriangularPreconditioner GPU support
2025-02-18 14:49:51 -08:00
Michael Tupek a360e2a860 Merge pull request #4713 from mfem/tupek/newmark_bugfix-patch
Suggestion for PR 4706 to fix bug identified in that PR
2025-02-18 13:02:27 -08:00
Mittal, Ketan 7195563387 update CHANGELOG 2025-02-18 11:55:15 -08:00
Christopher vogl 9edb7b5a75 fix to address bug affecting NewmarkSolver and GeneralizedAlpha2Solver 2025-02-18 11:49:13 -08:00
Christopher vogl 741638cb9b Revert "Address some subtle bugs in the changed Newtmark integration method."
This reverts commit cdc4a92c57.
2025-02-18 11:36:03 -08:00
Justin Laughlin ffbc04777f Fix typo in SumIntegrator::AddMultMF / AddMultTransposeMF 2025-02-18 09:26:38 -08:00
Mittal, Ketan 3eabf0746b make style 2025-02-17 15:51:40 -08:00
camierjs 87aacf79c1 CHANGELOG update 2025-02-16 14:44:08 -08:00
John Camier c907f84265 Merge branch 'master' into bltp 2025-02-15 10:15:26 -08:00
Mittal, Ketan 8233a2ea14 make style 2025-02-14 15:34:52 -08:00
Mittal, Ketan a48c16b424 Add AD for skew2D metric 2025-02-14 15:33:33 -08:00
Mittal, Ketan 9b5003026b restore skew metric 2025-02-14 15:22:49 -08:00
Michael Tupek cdc4a92c57 Address some subtle bugs in the changed Newtmark integration method. 2025-02-14 13:07:23 -08:00
Mittal, Ketan 9f11cb489c minor 2025-02-14 11:50:19 -08:00
Mittal, Ketan 8e5ea695d5 initial commit 2025-02-14 11:28:53 -08:00
Tzanio Kolev 9f3d67e45f Merge pull request #3605 from mfem/debug-device-test
Update debug unit test with SIGBUS error
2025-02-13 07:51:52 -08:00
Julian Andrej eae2eae657 remove lbfgs monitor 2025-02-12 11:28:20 -08:00
Julian AndrejandJan Nikl 23bce015d9 Update linalg/solvers.cpp
Co-authored-by: Jan Nikl <nikl1@llnl.gov>
2025-02-12 10:59:44 -08:00
Julian Andrej d8f489013b added final monitor calls to common solver implementation 2025-02-12 09:57:07 -08:00
Julian Andrej b3c333df22 Merge branch 'solver-monitor-controller' of github.com:mfem/mfem into solver-monitor-controller 2025-02-12 09:45:42 -08:00
Julian Andrej 3b24d0d7cf removed wrong converged flag 2025-02-12 09:45:16 -08:00
camierjs f62a2f100f Move HostRead outside of bilininteg 2025-02-11 11:34:51 -08:00
John Camier 67e4bb4355 Merge branch 'master' into debug-device-test 2025-02-11 09:42:32 -08:00
John Camier dc4e51b61c Merge branch 'master' into bltp 2025-02-11 09:42:22 -08:00
Tzanio Kolev c001fb4303 Merge pull request #4680 from mfem/hughcars/missing-override
Fix missing override on STRUMPKACKSolverBase::ArrayMult
2025-02-11 07:36:24 -08:00
John Camier ea31648a9c Merge branch 'master' into debug-device-test 2025-02-10 05:05:46 -08:00
John Camier bc650c0bcc Merge branch 'master' into bltp 2025-02-10 05:05:34 -08:00
Tzanio Kolev 2d31636115 Merge pull request #4670 from mfem/ex40_update
Updates to ex40
2025-02-08 17:10:35 -08:00
Brendan Keith 315bbd1b0d Merge branch 'master' into ex40_update 2025-02-08 15:21:01 -05:00
camierjs 6b7b9985e7 Merge branch 'master' into bltp 2025-02-06 20:21:29 -08:00
camierjs bc56be2092 Replace GetIJData with HostReads 2025-02-06 20:21:21 -08:00
Veselin Dobrev c87ded944f Merge pull request #4651 from adam-sim-dev/cpardiso_iparm41
Set correct value for cpardiso iparm[41]
2025-02-06 00:07:38 -08:00
Tzanio Kolev feb1989879 Merge branch 'master' into update-gko-cpp-std 2025-02-04 14:55:15 -08:00
Tzanio Kolev bd48e8e4b9 Merge branch 'master' into fa-mesh-connectivity 2025-02-04 14:54:52 -08:00
Tzanio Kolev 8669338cca Merge branch 'master' into solver-monitor-controller 2025-02-04 14:53:17 -08:00
camierjs 21c693ec7e Update copyright to 2010-2025 2025-02-04 13:01:23 -08:00
John Camier 5df9fa2539 Merge branch 'master' into debug-device-test 2025-02-04 12:54:25 -08:00
camierjs 999d6e9e94 Merge branch 'master' into bltp 2025-02-04 12:53:53 -08:00
Tzanio Kolev 4c60cac99c Merge branch 'master' into cpardiso_iparm41 2025-02-04 12:52:11 -08:00
Tzanio Kolev e2da2103df Merge pull request #4682 from mfem/2025-copyright
Update COPYRIGHT to 2010-2025
2025-02-04 12:50:48 -08:00
Brendan Keith f3a54176be remove A11 from ex40 2025-02-04 14:02:59 -05:00
camierjs e9a12955e2 Merge branch 'master' into bltp 2025-02-04 10:32:50 -08:00
camierjs ea041467ae Address reviewers comments 2025-02-04 10:32:44 -08:00
Julian Andrej 9dfd486f55 move monitor call into if condition in bicgstab 2025-02-04 08:53:39 -08:00
Tzanio Kolev e4c2152419 Update Copyright to 2010-2025 2025-02-03 12:17:26 -08:00
Hugh Carson 35abd32129 Fix missing override on STRUMPKACKSolverBase::ArrayMult 2025-02-03 10:57:47 -05:00
John Camier 3ed10c0114 Merge branch 'master' into bltp 2025-01-31 14:18:24 -08:00
Brendan Keith 7c0074dd14 Merge branch 'master' into ex40_update 2025-01-31 14:38:44 -05:00
adam-sim-dev e27d97b292 Merge branch 'master' into cpardiso_iparm41 2025-01-31 18:28:44 +08:00
camierjs 9f94279247 Fix real_t vs double 2025-01-30 16:06:44 -08:00
John Camier 68690e1ff7 Merge branch 'master' into debug-device-test 2025-01-30 13:30:44 -08:00
camierjs 27c526578d Use device vectors in solvers 2025-01-29 11:45:24 -08:00
camierjs eef7f76109 Merge master in bltp 2025-01-29 09:00:30 -08:00
adam-sim-dev 3048309467 Apply the reviewer's suggestion 2025-01-29 17:24:20 +08:00
adam-sim-dev c5d2b70bd8 Merge branch 'master' into cpardiso_iparm41 2025-01-29 17:17:40 +08:00
camierjs b033a91ce1 Cleanup & style 2025-01-28 16:46:09 -08:00
Jan Nikl 2d998865be Merge branch 'master' into solver-monitor-controller 2025-01-28 16:39:24 -08:00
camierjs 4e16e5edd1 Add block operators tests 2025-01-28 16:29:36 -08:00
Julian Andrej 861d3d1422 rename and other reviewer comments 2025-01-28 13:53:12 -08:00
camierjs 7dd6305d34 Init bltp miniapp from incompressible 2025-01-28 10:39:18 -08:00
adam-sim-dev 53f9bf05a6 Merge branch 'master' into cpardiso_iparm41 2025-01-27 21:45:42 +08:00
adam-sim-dev b471f44bec Merge branch 'master' into cpardiso_iparm41 2025-01-20 08:42:07 +08:00
Veselin Dobrev e04f56db3f Add a unit test for H(div) evaluations with QuadratureInterpolator.
Add triangle and tet meshes in the unit test for H1 evaluations with
QuadratureInterpolator; also, switch to checking relative norms of the
errors.
2025-01-19 16:10:26 -08:00
Brendan Keith 22b182e4ca style 2025-01-19 13:58:58 -05:00
Brendan Keith e853ef0ee3 switch to MINRES and add safeguards to parallel version 2025-01-19 13:58:11 -05:00
Veselin Dobrev ba9f282df7 Suppress a doxygen warning 2025-01-17 18:19:44 -08:00
Veselin Dobrev d6beffe42e In class QuadratureInterpolator, add a new EvalFlags option for
vector fields: PHYSICAL_MAGNITUDES. The option is implemented only
for H(div) spaces.
2025-01-17 18:08:00 -08:00
Veselin Dobrev 811a498fe5 Add support for H(div) spaces in class QuadratureInterpolator.
For now, only evaluation of vector values (reference or physical)
on quad and hex elements is supported.

The code still needs to be tested.
2025-01-17 13:39:57 -08:00
Brendan Keith e88b2d7723 update ex40 to match paper 2025-01-17 15:17:08 -05:00
Will Pazner 350c2c1281 Reduce memory usage in ElementRestriction FillI and FillJAndData
Use offsets array to handle mesh connectivity; computing maximum mesh
connectivity is not required.
2025-01-16 12:21:56 -08:00
Will Pazner 7e59798592 Merge remote-tracking branch 'origin/master' into fa-mesh-connectivity 2025-01-16 12:20:36 -08:00
adam-sim-dev 687902dd97 Merge branch 'master' into cpardiso_iparm41 2025-01-16 12:38:48 +08:00
adam-sim-dev 7b6750fe38 Merge branch 'master' into cpardiso_iparm41 2025-01-13 12:09:10 +08:00
adam-sim-dev 1e5e3779bd Set correct value for iparm[41] 2025-01-03 10:35:32 +08:00
Tzanio Kolev df18bedc02 Merge branch 'master' into fa-mesh-connectivity 2024-12-27 22:02:37 -08:00
Will Pazner 761be16003 Support full assembly on highly connected meshes
Instead of using a constant estimate for the maximum mesh valence (16 by
default), compute the maximum mesh connectivity, and use global memory in
ElementRestriction::FillI and ElementRestriction::FillJAndData to store the
arrays needed to deduplicate assembly.

Adds a unit test with highly connected meshes.
2024-12-26 11:17:00 -08:00
camierjs 2835cd7e3a Merge master in debug-device-test 2024-11-20 20:17:50 -08:00
Julian Andrej 33cb37689b double -> real 2024-10-15 13:00:46 -07:00
Julian Andrej f460048de7 Merge branch 'master' into solver-monitor-controller
# Conflicts:
#	linalg/solvers.cpp
#	linalg/solvers.hpp
2024-10-15 12:52:48 -07:00
nbeams 8de4c778a6 Require C++17 if using Ginkgo 2024-08-15 20:07:19 +00:00
Will Pazner 6e4baa3e4a Allow IterativeSolverMonitor to indicate early convergence 2024-01-04 14:13:50 -08:00
camierjs a280109316 Merge master in debug-device-test 2023-08-29 08:31:32 -07:00
Tzanio Kolev 9a8b604d84 Merge branch 'master' into debug-device-test 2023-06-04 13:33:52 -07:00
camierjs ff79851e88 Merge master in debug-device-test 2023-05-14 09:50:35 -07:00
camierjs 02311615b6 Merge master in debug-device-test 2023-05-08 14:31:45 -07:00
camierjs 63b872bc1a Merge master in debug-device-test 2023-05-04 08:57:00 -07:00
camierjs 9fc942016c Merge master in debug-device-test 2023-05-03 15:46:37 -07:00
camierjs fdb7de9df1 Merge master in debug-device-test 2023-04-18 13:31:02 -07:00
camierjs bccace6aae Merge master in debug-device-test 2023-04-18 10:37:34 -07:00
camierjs a49d1f4e97 Merge master in debug-device-test 2023-04-17 08:22:39 -07:00
camierjs 9bb956700e Avoid Windows inconsistent configuration with Catch signals 2023-04-14 10:52:12 -07:00
camierjs 4dbb958837 Merge master in debug-device-test 2023-04-14 10:23:42 -07:00
camierjs 85eea867fc Update with Linux vs. macOS specificities 2023-04-14 10:22:45 -07:00
camierjs a04705310c Update test_debug_device test unit with SIGBUS errors 2023-04-14 09:27:34 -07:00
Stowell, Mark L 6fa5a0b096 Merge remote-tracking branch 'origin/master' into aniso-diffusion-dev
# Conflicts:
#	fem/coefficient.cpp
#	fem/coefficient.hpp
2019-04-01 11:27:41 -07:00
Stowell, Mark L 3bd8349909 Merge remote-tracking branch 'origin/master' into aniso-diffusion-dev 2018-11-08 18:00:03 -08:00
Stowell, Mark L af82ee8560 Merge remote-tracking branch 'origin/master' into aniso-diffusion-dev 2018-10-20 12:18:07 -07:00
Stowell, Mark L 2ac542c720 Attempting to support 2D curl cleaning 2018-10-20 12:17:00 -07:00
Mark L. Stowell e6f828a5fe Attempting to add curl free projection... 2018-10-18 13:07:44 -07:00
Mark L. Stowell 4d756edd80 Adding DivergenceFree/Irrotational projectors for RT spaces 2018-10-18 10:29:50 -07:00
Stowell, Mark L cf5bd1f5cc make style 2018-10-18 00:17:32 -07:00
Stowell, Mark L 7173dd2002 Adding H1 diffusion solver 2018-10-18 00:16:56 -07:00
Stowell, Mark L 50182bf440 Adding perturbed elliptic case 2018-10-17 19:51:12 -07:00
Stowell, Mark L 24bfcc5165 Initializing a solution vector before solve 2018-10-17 10:20:38 -07:00
Stowell, Mark L 302f22f297 Switching to analytic evaluation of b vector field 2018-10-16 15:34:29 -07:00
Stowell, Mark L 1637fcd933 Adding argument to control lower bound of mesh size 2018-10-16 13:13:56 -07:00
Stowell, Mark L 2563506174 make style 2018-10-14 16:14:31 -07:00
Stowell, Mark L 60640c3f7e Adding computation of full thermal flux 2018-10-14 10:39:39 -07:00
Stowell, Mark L f221521203 make style 2018-10-14 10:12:37 -07:00
Stowell, Mark L 1d9e736af6 Adding a miniapp which solve for thermal flux in HDiv 2018-10-14 10:10:55 -07:00
Stowell, Mark L d80dbfd99a Adding flux computation 2018-10-10 16:46:17 -07:00
Stowell, Mark L 3f44043e60 Adding steady state anisotropic diffusion solver 2018-10-10 12:48:07 -07:00
Stowell, Mark L b218959bca Inserting the thermal flux solver 2018-10-03 10:33:45 -07:00
Stowell, Mark L aee7bc9d43 Adding first draft of hybrid diffusion solver 2018-10-01 16:14:53 -07:00
Stowell, Mark L 31cac320d4 Bugfix in activation of nonlinear solver 2018-10-01 15:08:15 -07:00
Stowell, Mark L e7e0fb0a88 Adding a specialized miniapp to duplicate results from the van Es papper 2018-09-30 21:47:54 -07:00
Stowell, Mark L ba71d13980 Merge remote-tracking branch 'origin/master' into aniso-diffusion-dev 2018-09-25 13:04:15 -07:00
Stowell, Mark L 5c326a5535 Fixing a typo in a comment 2018-09-25 13:02:39 -07:00
Stowell, Mark L 9457f7e5b6 Switching to nonlinear solver 2018-09-24 15:45:49 -07:00
Stowell, Mark L ff030ee970 Adding another time dependent test case 2018-09-24 12:45:36 -07:00
Stowell, Mark L 2be9e1f36c Adding a steady state solver to the thermal miniapps 2018-09-24 12:45:03 -07:00
Stowell, Mark L 7671cd9f36 Merge remote-tracking branch 'origin/master' into aniso-diffusion-dev 2018-09-16 13:17:34 -07:00
Stowell, Mark L f89a633fda make style 2018-09-14 14:41:13 -07:00
Stowell, Mark L 4ce1cef6b8 Adding SetOperator methods to HyprePCG, HypreGMRES, HypreDiagScale, and HypreParaSails 2018-09-14 14:34:13 -07:00
Stowell, Mark L c667bf3025 Fixing HypreGMRES::SetOperator method in the presence of a preconditioner 2018-09-14 13:47:29 -07:00
Stowell, Mark L e1678afe40 Using new HypreGMRES with SetOperator method 2018-09-10 16:46:25 -07:00
Stowell, Mark L c0291398ed Implementing HypreGMRES::SetOperator method 2018-09-10 16:45:59 -07:00
Stowell, Mark L 0b4f10d79d Debugging gradient check 2018-09-09 16:29:15 -07:00
Stowell, Mark L 8dfd0e1547 Adding NewtonSolver method to validate gradient 2018-09-09 16:28:18 -07:00
Stowell, Mark L caf239c99a Updating with time dependent source and exact solution 2018-09-09 00:39:58 -07:00
Stowell, Mark L 44c33aece0 Merge remote-tracking branch 'origin/master' into aniso-diffusion-dev 2018-09-08 23:59:16 -07:00
Stowell, Mark L ed49856390 Merge branch 'aniso-diffusion-dev' of github.com:mfem/mfem into aniso-diffusion-dev 2018-09-06 14:13:18 -07:00
Stowell, Mark L 4fef6ca298 make style 2018-09-06 14:12:28 -07:00
Stowell, Mark L d9d809e81c Adding "thermal" to miniapps subdirectories 2018-09-06 14:12:16 -07:00
Stowell, Mark L 51e85ccd84 Fixing nonlinear solve and applying 'make style' 2018-09-06 14:11:54 -07:00
Mark L. Stowell 4304159303 Merge branch 'aniso-diffusion-dev' of github.com:mfem/mfem into aniso-diffusion-dev 2018-09-05 16:56:05 -07:00
Stowell, Mark L 6276268e52 Retain zeros to maintain sparsity pattern 2018-09-05 16:54:59 -07:00
Mark L. Stowell 580ae34842 Retaining zeros to maintain sparsity pattern 2018-09-05 16:51:10 -07:00
Stowell, Mark L 97eaf8efbc Parallelizing the linear solves 2018-09-05 15:48:28 -07:00
Stowell, Mark L e6621c9b0c Parallel bug 2018-09-05 15:25:18 -07:00
Stowell, Mark L 461246f80e Adding a missing overload 2018-09-05 13:29:10 -07:00
Stowell, Mark L a5941ee72f Bugfix: reinitializing matrices before reassembling 2018-09-05 11:10:09 -07:00
Stowell, Mark L c4c2ceab59 Linear case now working 2018-09-05 10:15:17 -07:00
Stowell, Mark L 88b99a1719 Fixing vector dimension in vector grid functions 2018-09-05 10:14:52 -07:00
Stowell, Mark L 7aa7b4ee53 Adjusting initialization order so that vector size is known earlier 2018-09-03 11:19:27 -07:00
Stowell, Mark L bcf87fee29 Modifying VectorGridFunctionCoefs to accept NULL pointers 2018-09-03 11:06:32 -07:00
Stowell, Mark L 2949dc5a46 Adding makefile for miniapps/thermal 2018-09-03 10:48:11 -07:00
Stowell, Mark L b0dbadd007 Adding first draft of non-linear thermal diffusion solver 2018-09-03 10:19:34 -07:00
Stowell, Mark L 6ca1f95979 Adding scalar multiplication by a constant 2018-08-31 22:54:36 -07:00
Stowell, Mark L 39794585c4 Adding an Identity Matrix Coefficient 2018-08-31 16:50:02 -07:00
Stowell, Mark L 65a71259f1 Merge remote-tracking branch 'origin/elementwise-error-dev' into aniso-diffusion-dev 2018-08-31 16:49:37 -07:00
Stowell, Mark L 3f4e8324d4 Adding a coefficient which computes a unit vector field from a vector field 2018-08-29 14:26:29 -07:00
Stowell, Mark L 9fca398741 Adding ability to alter derived coefficients 2018-08-29 13:59:38 -07:00
Stowell, Mark L a2b8f7a129 Merge remote-tracking branch 'origin/master' into aniso-diffusion-dev 2018-08-29 09:28:15 -07:00
Stowell, Mark L a367631ce5 Adding various coefficients which are sums or products of other coefficients 2018-08-28 16:34:13 -07:00
Stowell, Mark L d7718f5c57 make style 2018-08-28 14:51:48 -07:00
Stowell, Mark L fe88c4685d Adding coefficients to compute div, grad, or curl of grid functions. 2018-08-28 14:24:15 -07:00
1001 changed files with 13973 additions and 1594 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+19 -1
View File
@@ -31,6 +31,10 @@ Discretization improvements
- Added component-wise upwinded flux (`ComponentwiseUpwindFlux`).
- Added support for H(div) spaces in class QuadratureInterpolator. For now, only
(vector) VALUES, (vector) PHYSICAL_VALUES, and PHYSICAL_MAGNITUDES evaluations
are implemented. [PR #4669]
Meshing improvements
--------------------
- Added native AD support for numerous TMOP metrics that didn't have first or
@@ -81,6 +85,10 @@ GPU computing
- Added support for GPU accelerated FindPointsGSLIB. Note that this will require
the users to switch from gslib v1.0.7 to v1.0.9.
- Allow BlockLowerTriangularPreconditioner to run on GPU.
- Use device vectors in GMRES, FGMRES and other iterative methods.
Miscellaneous
-------------
- Added support for SUNDIALS v7. See the section "API changes" for some small
@@ -124,12 +132,22 @@ Miscellaneous
assembly routines (although the latter is still possible, by leaving the new
virtual method as its default base implementation of returning `NULL`).
- Updated the benchmarks (in tests/benchmarks) to work with the latest Google
Benchmarks classes (version 1.9.1). Renamed the MFEM_ENABLE_GOOGLE_BENCHMARKS
CMake option to just MFEM_ENABLE_BENCHMARKS.
- Changed the name of `IterativeSolverMonitor` to `IterativeSolverController`
which now allows for declaring convergence by a user defined criterion. For
backward compatibility, the old name is still available.
API changes
-----------
- API change: 'TMOP_Metric_skew2D' has been marked as deprecated.
- API change: in class GridFunction, 'fec' was renamed to 'fec_owned'.
- API change: `RiemannSolver` was renamed to `NumericalFlux` (the old name has
been been depracated through typedef)
been been deprecated through typedef)
- API change: support for SUNDIALS v7:
* the SUNDIALS types `realtype` and `booleantype` are no longer defined by v7
+22 -13
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -87,13 +87,16 @@ if (MFEM_USE_STRUMPACK OR MFEM_USE_MUMPS)
# Just needed to find the MPI_Fortran libraries to link with
set(XSDK_ENABLE_Fortran ON)
endif()
# SUNDIALS, STRUMPACK, Ginkgo, Tribol, RAJA and Umpire require C++14:
if ((MFEM_USE_SUNDIALS OR
MFEM_USE_STRUMPACK OR
MFEM_USE_GINKGO OR
MFEM_USE_TRIBOL OR
MFEM_USE_RAJA OR
MFEM_USE_UMPIRE) AND
# Ginkgo requires C++17:
if ((MFEM_USE_GINKGO) AND ("${CMAKE_CXX_STANDARD}" LESS "17"))
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use." FORCE)
# Google Benchmark, SUNDIALS, STRUMPACK, Tribol, RAJA and Umpire require C++14:
elseif ((MFEM_USE_BENCHMARK OR
MFEM_USE_SUNDIALS OR
MFEM_USE_STRUMPACK OR
MFEM_USE_TRIBOL OR
MFEM_USE_RAJA OR
MFEM_USE_UMPIRE) AND
("${CMAKE_CXX_STANDARD}" LESS "14"))
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to use." FORCE)
endif()
@@ -744,11 +747,17 @@ if (MFEM_ENABLE_TESTING)
add_mfem_target(${MFEM_ALL_TESTS_TARGET_NAME} OFF)
add_subdirectory(tests EXCLUDE_FROM_ALL)
# Create a target for all benchmarks and, optionally, enable it.
set(MFEM_ALL_BENCHMARKS_TARGET_NAME benchmarks)
add_mfem_target(${MFEM_ALL_BENCHMARKS_TARGET_NAME}
${MFEM_ENABLE_GOOGLE_BENCHMARKS})
add_subdirectory(tests/benchmarks EXCLUDE_FROM_ALL)
if (MFEM_USE_BENCHMARK)
# Create a target for all benchmarks and, optionally, enable it.
set(MFEM_ALL_BENCHMARKS_TARGET_NAME benchmarks)
add_mfem_target(${MFEM_ALL_BENCHMARKS_TARGET_NAME}
${MFEM_ENABLE_BENCHMARKS})
if (MFEM_ENABLE_BENCHMARKS)
add_subdirectory(tests/benchmarks) #install benchmarks if enabled
else()
add_subdirectory(tests/benchmarks EXCLUDE_FROM_ALL)
endif()
endif()
endif()
# Define a target that all examples and miniapps will depend on.
+2 -2
View File
@@ -704,12 +704,12 @@ The specific libraries and their options are:
Versions: STRUMPACK >= 3.0.0.
- Ginkgo (optional), used when MFEM_USE_GINKGO = YES. Note that Ginkgo needs a
C++ compiler that supports the C++-14 standard. For additional requirements
C++ compiler that supports the C++-17 standard. For additional requirements
and dependencies of specific modules, see the Ginkgo webpage below.
URL: https://ginkgo-project.github.io
Options: GINKGO_OPT, GINKGO_LIB, GINKGO_DIR, GINKGO_BUILD_TYPE (Release or
Debug).
Versions: Ginkgo >= 1.4.0.
Versions: Ginkgo >= 1.9.0.
- AmgX (optional), used when MFEM_USE_AMGX = YES.
URL: https://github.com/NVIDIA/AMGX
+1 -1
View File
@@ -1,6 +1,6 @@
BSD 3-Clause License
Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC
Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+2 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -50,6 +50,7 @@ set(MFEM_USE_FMS @MFEM_USE_FMS@)
set(MFEM_USE_CONDUIT @MFEM_USE_CONDUIT@)
set(MFEM_USE_PUMI @MFEM_USE_PUMI@)
set(MFEM_USE_CUDA @MFEM_USE_CUDA@)
set(MFEM_USE_HIP @MFEM_USE_HIP@)
set(MFEM_USE_OCCA @MFEM_USE_OCCA@)
set(MFEM_USE_RAJA @MFEM_USE_RAJA@)
set(MFEM_USE_CEED @MFEM_USE_CEED@)
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+2 -2
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -86,7 +86,7 @@ set(MFEM_MPI_NP 4 CACHE STRING "Number of processes used for MPI tests")
option(MFEM_ENABLE_TESTING "Enable the ctest framework for testing" ON)
option(MFEM_ENABLE_EXAMPLES "Build all of the examples" OFF)
option(MFEM_ENABLE_MINIAPPS "Build all of the miniapps" OFF)
option(MFEM_ENABLE_GOOGLE_BENCHMARKS "Build all of the Google benchmarks" OFF)
option(MFEM_ENABLE_BENCHMARKS "Build all of the benchmarks" OFF)
# Setting CXX/MPICXX on the command line or in user.cmake will overwrite the
# autodetected C++ compiler.
+10 -20
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -271,10 +271,6 @@ POSIX_CLOCKS_LIB = -lrt
# For sundials_nvecmpiplusx and nvecparallel remember to build with MPI_ENABLE=ON
# and modify cmake variables for hypre for sundials
SUNDIALS_DIR = @MFEM_DIR@/../sundials-5.0.0/instdir
# SUNDIALS >= 6.4.0 requires C++14:
ifeq ($(MFEM_USE_SUNDIALS),YES)
BASE_FLAGS = -std=c++14
endif
SUNDIALS_OPT = -I$(SUNDIALS_DIR)/include
SUNDIALS_LIB = $(XLINKER)-rpath,$(SUNDIALS_DIR)/lib64\
$(XLINKER)-rpath,$(SUNDIALS_DIR)/lib\
@@ -353,9 +349,6 @@ MUMPS_LIB += -lmumps_common -lpord $(SCALAPACK_LIB) $(LAPACK_LIB) $(MPI_FORTRAN_
# STRUMPACK library configuration
STRUMPACK_DIR = @MFEM_DIR@/../STRUMPACK-build
ifeq ($(MFEM_USE_STRUMPACK),YES)
BASE_FLAGS = -std=c++14
endif
STRUMPACK_OPT = -I$(STRUMPACK_DIR)/include $(SCOTCH_OPT)
# If STRUMPACK was build with OpenMP support, the following may be need:
# STRUMPACK_OPT += $(OPENMP_OPT)
@@ -366,9 +359,6 @@ STRUMPACK_LIB = -L$(STRUMPACK_DIR)/lib -lstrumpack $(MPI_FORTRAN_LIB)\
GINKGO_DIR = @MFEM_DIR@/../ginkgo/install
GINKGO_SEARCH_DIR = $(subst @MFEM_DIR@,$(MFEM_DIR),$(GINKGO_DIR))
GINKGO_BUILD_TYPE=Release
ifeq ($(MFEM_USE_GINKGO),YES)
BASE_FLAGS = -std=c++14
endif
GINKGO_OPT = -isystem $(GINKGO_DIR)/include
GINKGO_LIB_DIR = $(sort $(dir $(wildcard\
$(GINKGO_SEARCH_DIR)/lib*/libginkgo*.a\
@@ -562,9 +552,6 @@ CEED_OPT = -I$(CEED_DIR)/include
CEED_LIB = $(XLINKER)-rpath,$(CEED_DIR)/lib -L$(CEED_DIR)/lib -lceed
# RAJA library configuration
ifeq ($(MFEM_USE_RAJA),YES)
BASE_FLAGS = -std=c++14
endif
RAJA_DIR = @MFEM_DIR@/../raja
RAJA_OPT = -I$(RAJA_DIR)/include
ifdef CUB_DIR
@@ -579,9 +566,6 @@ endif
RAJA_LIB = $(XLINKER)-rpath,$(RAJA_DIR)/lib -L$(RAJA_DIR)/lib -lRAJA $(CAMP_LIB)
# UMPIRE library configuration
ifeq ($(MFEM_USE_UMPIRE),YES)
BASE_FLAGS = -std=c++14
endif
UMPIRE_DIR = @MFEM_DIR@/../umpire
UMPIRE_OPT = -I$(UMPIRE_DIR)/include $(if $(CAMP_DIR), -I$(CAMP_DIR)/include)
UMPIRE_LIB = -L$(UMPIRE_DIR)/lib -lumpire $(CAMP_LIB)
@@ -609,9 +593,6 @@ PARELAG_OPT = -I$(PARELAG_DIR)/src -I$(PARELAG_DIR)/build/src
PARELAG_LIB = -L$(PARELAG_DIR)/build/src -lParELAG
# Tribol library configuration
ifeq ($(MFEM_USE_TRIBOL),YES)
BASE_FLAGS = -std=c++14
endif
AXOM_DIR = @MFEM_DIR@/../axom
TRIBOL_DIR = @MFEM_DIR@/../tribol
TRIBOL_OPT = -I$(TRIBOL_DIR)/include -I$(AXOM_DIR)/include
@@ -634,6 +615,15 @@ ENZYME_VERSION ?= 14
ENZYME_OPT = -fno-experimental-new-pass-manager -Xclang -load -Xclang $(ENZYME_DIR)/ClangEnzyme-$(ENZYME_VERSION).so
ENZYME_LIB = ""
# Google Benchmark, SUNDIALS >= 6.4.0, STRUMPACK, RAJA, UMPIRE, and Tribol require C++14:
ifneq ($(filter YES,$(MFEM_USE_BENCHMARK) $(MFEM_USE_SUNDIALS) $(MFEM_USE_STRUMPACK) $(MFEM_USE_RAJA) $(MFEM_USE_UMPIRE) $(MFEM_USE_TRIBOL)),)
BASE_FLAGS = -std=c++14
endif
# Ginkgo requires C++17:
ifeq ($(MFEM_USE_GINKGO),YES)
BASE_FLAGS = -std=c++17
endif
# If YES, enable some informational messages
VERBOSE = NO
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+3 -3
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -36,8 +36,8 @@ cd $(git rev-parse --show-toplevel)
# copyright check
copyright=true
if [[ "${option}" == "--copyright" || "${option}" == "" ]]; then
if git grep -n "^\(#\|//\).*Copyright.*2010-20\(2[^4]\|[^2].\)" > matches.txt; then
echo "Please update the following files to Copyright (c) 2010-2024:"
if git grep -n "^\(#\|//\).*Copyright.*2010-20\(2[^5]\|[^2].\)" > matches.txt; then
echo "Please update the following files to Copyright (c) 2010-2025:"
cat matches.txt
copyright=false
fi
+3 -2
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -110,4 +110,5 @@ config-mk:
clean:
rm -f $(CONFIG_HPP) $(CONFIG_MK) sample-runs-build.log
rm -f $(GHV) $(GHV).out $(GMV) $(GMV).out *.dSYM
rm -f $(GHV) $(GHV).out $(GMV) $(GMV).out
rm -rf *.dSYM
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -59,7 +59,7 @@ private:
void GeneralResidualMonitor::MonitorResidual(int it, real_t norm,
const Vector &r, bool final)
{
if (print_level == 1 || (print_level == 3 && (final || it == 0)))
if ((print_level == 1 && !final) || (print_level == 3 && (final || it == 0)))
{
mfem::out << prefix << " iteration " << setw(2) << it
<< " : ||r|| = " << norm;
+1 -1
View File
@@ -73,7 +73,7 @@ private:
void GeneralResidualMonitor::MonitorResidual(int it, real_t norm,
const Vector &r, bool final)
{
if (print_level == 1 || (print_level == 3 && (final || it == 0)))
if ((print_level == 1 && !final) || (print_level == 3 && (final || it == 0)))
{
mfem::out << prefix << " iteration " << setw(2) << it
<< " : ||r|| = " << norm;
+52 -64
View File
@@ -2,53 +2,56 @@
//
// Compile with: make ex40
//
// Sample runs: ex40 -step 10 -gr 2.0
// ex40 -step 10 -gr 2.0 -o 3 -r 1
// ex40 -step 10 -gr 2.0 -r 4 -m ../data/l-shape.mesh
// ex40 -step 10 -gr 2.0 -r 2 -m ../data/fichera.mesh
// Sample runs: ex40 -step 10.0 -gr 2.0
// ex40 -step 10.0 -gr 2.0 -o 3 -r 1
// ex40 -step 10.0 -gr 2.0 -r 4 -m ../data/l-shape.mesh
// ex40 -step 10.0 -gr 2.0 -r 2 -m ../data/fichera.mesh
//
// Description: This example code demonstrates how to use MFEM to solve the
// eikonal equation,
//
// |∇𝑢| = 1 in Ω, 𝑢 = g on ∂Ω.
// |∇𝑢| = 1 in Ω, 𝑢 = 0 on ∂Ω.
//
// The solution of this problem coincides with the unique optimum of
// the nonlinear program
// The viscosity solution of this problem coincides with the unique optimum
// of the nonlinear program
//
// maximize ∫_Ω 𝑢 d𝑥 subject to |∇𝑢| ≤ 1, 𝑢 = g on Ω, (⋆)
// maximize ∫_Ω 𝑢 d𝑥 subject to |∇𝑢| ≤ 1 in Ω, 𝑢 = 0 on Ω, (⋆)
//
// which is the foundation for method implemented below.
//
// Following the proximal Galerkin methodology [1] (see also Example
// 36), we construct a Legendre function for the unit ball
// 𝐵₁ := {𝑥 ∈ Rⁿ | |𝑥| < 1}. Our choice is the Hellinger entropy,
// Following the proximal Galerkin methodology [1,2] (see also Example
// 36), we construct a Legendre function for the closed unit ball
// 𝐵₁ := {𝑥 ∈ Rⁿ | |𝑥| 1}. Our choice is the Hellinger entropy,
//
// h(𝑥) = ( 1 |𝑥|² )^{1/2},
// R(𝑥) = ( 1 |𝑥|² )^{1/2},
//
// although other choices are possible, each leading to a slightly
// different algorithm. We then adaptively regularize the optimization
// problem (⋆) with the Bregman divergence of the Hellinger entropy,
//
// maximize ∫_Ω 𝑢 d𝑥 - αₖ⁻¹ D(∇𝑢,∇𝑢ₖ₋₁) subject to 𝑢 = g on Ω.
// maximize ∫_Ω 𝑢 d𝑥 - αₖ⁻¹ D(∇𝑢,∇𝑢ₖ₋₁) subject to 𝑢 = 0 on Ω.
//
// This results in a sequence of functions ( 𝜓ₖ , 𝑢ₖ ),
//
// 𝑢ₖ → 𝑢, 𝜓ₖ/|𝜓ₖ| → ∇𝑢 as k → \infty,
// 𝑢ₖ → 𝑢, 𝜓ₖ/|𝜓ₖ| → ∇𝑢 as k → ,
//
// defined by the nonlinear saddle-point problems
//
// Find 𝜓ₖ ∈ H(div,Ω) and 𝑢ₖ ∈ L²(Ω) such that
// ( Zₖ(𝜓ₖ) , τ ) + ( 𝑢ₖ , ∇⋅τ ) = ⟨ g , τ⋅n ⟩ ∀ τ ∈ H(div,Ω)
// ( ∇⋅𝜓ₖ , v ) = ( ∇⋅𝜓ₖ₋₁ - 1 , v ) ∀ v ∈ L²(Ω)
// ( (∇R)⁻¹(𝜓ₖ) , τ ) + ( 𝑢ₖ , ∇⋅τ ) = 0 ∀ τ ∈ H(div,Ω)
// ( ∇⋅𝜓ₖ , v ) = ( ∇⋅𝜓ₖ₋₁ - αₖ , v ) ∀ v ∈ L²(Ω)
//
// where Zₖ(𝜓) := ∇h⁻¹(αₖ 𝜓) = 𝜓 / ( αₖ⁻² + |𝜓|² )^{1/2} and step size
// αₖ > 0. These saddle-point problems are solved using a damped Newton's
// method. This example assumes that g = 0 and allows the step size to
// grow geometrically, αₖ = α₀rᵏ, where r ≥ 1 is the growth rate.
// where (∇R)⁻¹(𝜓) = 𝜓 / ( 1 + |𝜓|² )^{1/2} and αₖ = α₀rᵏ, where r ≥ 1
// is a prescribed growth rate. (r = 1 is the most stable.) The
// saddle-point problems are solved using a damped quasi-Newton method
// with a tunable regularization parameter 0 ≤ ϵ << 1.
//
// [1] Keith, B. and Surowiec, T. (2023) Proximal Galerkin: A structure-
// [1] Keith, B. and Surowiec, T. (2024) Proximal Galerkin: A structure-
// preserving finite element method for pointwise bound constraints.
// arXiv:2307.12444 [math.NA]
// Foundations of Computational Mathematics, 197.
// [2] Dokken, J., Farrell, P., Keith, B., Papadopoulos, I., and
// Surowiec, T. (2025) The latent variable proximal point algorithm
// for variational problems with inequality constraints. (To appear.)
#include "mfem.hpp"
#include <fstream>
@@ -57,36 +60,33 @@
using namespace std;
using namespace mfem;
class ZCoefficient : public VectorCoefficient
class IsomorphismCoefficient : public VectorCoefficient
{
protected:
GridFunction *psi;
real_t alpha;
public:
ZCoefficient(int vdim, GridFunction &psi_, real_t alpha_ = 1.0)
: VectorCoefficient(vdim), psi(&psi_), alpha(alpha_) { }
IsomorphismCoefficient(int vdim, GridFunction &psi_)
: VectorCoefficient(vdim), psi(&psi_) { }
using VectorCoefficient::Eval;
void Eval(Vector &V, ElementTransformation &T,
const IntegrationPoint &ip) override;
void SetAlpha(real_t alpha_) { alpha = alpha_; }
};
class DZCoefficient : public MatrixCoefficient
class DIsomorphismCoefficient : public MatrixCoefficient
{
protected:
GridFunction *psi;
real_t alpha;
real_t eps;
public:
DZCoefficient(int height, GridFunction &psi_, real_t alpha_ = 1.0)
: MatrixCoefficient(height), psi(&psi_), alpha(alpha_) { }
DIsomorphismCoefficient(int height, GridFunction &psi_, real_t eps_ = 0.0)
: MatrixCoefficient(height), psi(&psi_), eps(eps_) { }
void Eval(DenseMatrix &K, ElementTransformation &T,
const IntegrationPoint &ip) override;
void SetAlpha(real_t alpha_) { alpha = alpha_; }
};
int main(int argc, char *argv[])
@@ -98,8 +98,8 @@ int main(int argc, char *argv[])
int ref_levels = 3;
real_t alpha = 1.0;
real_t growth_rate = 1.0;
real_t newton_scaling = 0.9;
real_t tichonov = 1e-1;
real_t newton_scaling = 0.8;
real_t eps = 1e-6;
real_t tol = 1e-4;
bool visualization = true;
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
int sdim = mesh.SpaceDimension();
MFEM_ASSERT(mesh.bdr_attributes.Size(),
"This example does not currently support meshes"
"This example does not support meshes"
" without boundary attributes."
)
@@ -202,12 +202,10 @@ int main(int argc, char *argv[])
}
// 9. Coefficients to be used later.
ConstantCoefficient neg_one(-1.0);
ConstantCoefficient zero(0.0);
ConstantCoefficient tichonov_cf(tichonov);
ConstantCoefficient neg_tichonov_cf(-1.0*tichonov);
ZCoefficient Z(sdim, psi_gf, alpha);
DZCoefficient DZ(sdim, psi_gf, alpha);
ConstantCoefficient neg_alpha_cf((real_t) -1.0*alpha);
ConstantCoefficient zero_cf(0.0);
IsomorphismCoefficient Z(sdim, psi_gf);
DIsomorphismCoefficient DZ(sdim, psi_gf, eps);
ScalarVectorProductCoefficient neg_Z(-1.0, Z);
DivergenceGridFunctionCoefficient div_psi_cf(&psi_gf);
DivergenceGridFunctionCoefficient div_psi_old_cf(&psi_old_gf);
@@ -219,12 +217,11 @@ int main(int argc, char *argv[])
b1.MakeRef(&L2fes,rhs.GetBlock(1),0);
b0.AddDomainIntegrator(new VectorFEDomainLFIntegrator(neg_Z));
b1.AddDomainIntegrator(new DomainLFIntegrator(neg_one));
b1.AddDomainIntegrator(new DomainLFIntegrator(neg_alpha_cf));
b1.AddDomainIntegrator(new DomainLFIntegrator(psi_old_minus_psi));
BilinearForm a00(&RTfes);
a00.AddDomainIntegrator(new VectorFEMassIntegrator(DZ));
a00.AddDomainIntegrator(new VectorFEMassIntegrator(tichonov_cf));
MixedBilinearForm a10(&RTfes,&L2fes);
a10.AddDomainIntegrator(new VectorFEDivergenceIntegrator());
@@ -233,12 +230,6 @@ int main(int argc, char *argv[])
SparseMatrix &A10 = a10.SpMat();
SparseMatrix *A01 = Transpose(A10);
BilinearForm a11(&L2fes);
a11.AddDomainIntegrator(new MassIntegrator(neg_tichonov_cf));
a11.Assemble();
a11.Finalize();
SparseMatrix &A11 = a11.SpMat();
// 11. Iterate.
int k;
int total_iterations = 0;
@@ -247,8 +238,6 @@ int main(int argc, char *argv[])
for (k = 0; k < max_it; k++)
{
u_tmp = u_old_gf;
Z.SetAlpha(alpha);
DZ.SetAlpha(alpha);
mfem::out << "\nOUTER ITERATION " << k+1 << endl;
@@ -283,13 +272,12 @@ int main(int argc, char *argv[])
A.SetBlock(0,0,&A00);
A.SetBlock(1,0,&A10);
A.SetBlock(0,1,A01);
A.SetBlock(1,1,&A11);
GMRES(A,prec,rhs,x,0,2000,500,1e-12,0.0);
MINRES(A,prec,rhs,x,0,2000,1e-12);
delete S;
u_tmp -= u_gf;
real_t Newton_update_size = u_tmp.ComputeL2Error(zero);
real_t Newton_update_size = u_tmp.ComputeL2Error(zero_cf);
u_tmp = u_gf;
// Damped Newton update
@@ -312,7 +300,7 @@ int main(int argc, char *argv[])
u_tmp = u_gf;
u_tmp -= u_old_gf;
increment_u = u_tmp.ComputeL2Error(zero);
increment_u = u_tmp.ComputeL2Error(zero_cf);
mfem::out << "Number of Newton iterations = " << j+1 << endl;
mfem::out << "Increment (|| uₕ - uₕ_prvs||) = " << increment_u << endl;
@@ -326,6 +314,7 @@ int main(int argc, char *argv[])
}
alpha *= max(growth_rate, 1_r);
neg_alpha_cf.constant = -alpha;
}
@@ -338,36 +327,35 @@ int main(int argc, char *argv[])
return 0;
}
void ZCoefficient::Eval(Vector &V, ElementTransformation &T,
const IntegrationPoint &ip)
void IsomorphismCoefficient::Eval(Vector &V, ElementTransformation &T,
const IntegrationPoint &ip)
{
MFEM_ASSERT(psi != NULL, "grid function is not set");
MFEM_ASSERT(alpha > 0, "alpha is not positive");
Vector psi_vals(vdim);
psi->GetVectorValue(T, ip, psi_vals);
real_t norm = psi_vals.Norml2();
real_t phi = 1.0 / sqrt(1.0/(alpha*alpha) + norm*norm);
real_t phi = 1.0 / sqrt(1.0 + norm*norm);
V = psi_vals;
V *= phi;
}
void DZCoefficient::Eval(DenseMatrix &K, ElementTransformation &T,
const IntegrationPoint &ip)
void DIsomorphismCoefficient::Eval(DenseMatrix &K, ElementTransformation &T,
const IntegrationPoint &ip)
{
MFEM_ASSERT(psi != NULL, "grid function is not set");
MFEM_ASSERT(alpha > 0, "alpha is not positive");
MFEM_ASSERT(eps >= 0, "eps is negative");
Vector psi_vals(height);
psi->GetVectorValue(T, ip, psi_vals);
real_t norm = psi_vals.Norml2();
real_t phi = 1.0 / sqrt(1.0/(alpha*alpha) + norm*norm);
real_t phi = 1.0 / sqrt(1.0 + norm*norm);
K = 0.0;
for (int i = 0; i < height; i++)
{
K(i,i) = phi;
K(i,i) = phi + eps;
for (int j = 0; j < height; j++)
{
K(i,j) -= psi_vals(i) * psi_vals(j) * pow(phi, 3);
+95 -74
View File
@@ -2,53 +2,57 @@
//
// Compile with: make ex40p
//
// Sample runs: mpirun -np 4 ex40p -step 10 -gr 2.0
// mpirun -np 4 ex40p -step 10 -gr 2.0 -o 3 -r 1
// mpirun -np 4 ex40p -step 10 -gr 2.0 -r 4 -m ../data/l-shape.mesh
// mpirun -np 4 ex40p -step 10 -gr 2.0 -r 2 -m ../data/fichera.mesh
// Sample runs: mpirun -np 4 ex40p -step 10.0 -gr 2.0
// mpirun -np 4 ex40p -step 10.0 -gr 2.0 -o 3 -r 1
// mpirun -np 4 ex40p -step 10.0 -gr 2.0 -r 4 -m ../data/l-shape.mesh
// mpirun -np 4 ex40p -step 10.0 -gr 2.0 -r 2 -m ../data/fichera.mesh
//
// Description: This example code demonstrates how to use MFEM to solve the
// eikonal equation,
//
// |∇𝑢| = 1 in Ω, 𝑢 = g on ∂Ω.
// |∇𝑢| = 1 in Ω, 𝑢 = 0 on ∂Ω.
//
// The solution of this problem coincides with the unique optimum of
// the nonlinear program
// The viscosity solution of this problem coincides with the unique optimum
// of the nonlinear program
//
// maximize ∫_Ω 𝑢 d𝑥 subject to |∇𝑢| ≤ 1, 𝑢 = g on Ω, (⋆)
// maximize ∫_Ω 𝑢 d𝑥 subject to |∇𝑢| ≤ 1 in Ω, 𝑢 = 0 on Ω, (⋆)
//
// which is the foundation for method implemented below.
//
// Following the proximal Galerkin methodology [1] (see also Example
// 36), we construct a Legendre function for the unit ball
// 𝐵₁ := {𝑥 ∈ Rⁿ | |𝑥| < 1}. Our choice is the Hellinger entropy,
// Following the proximal Galerkin methodology [1,2] (see also Example
// 36), we construct a Legendre function for the closed unit ball
// 𝐵₁ := {𝑥 ∈ Rⁿ | |𝑥| 1}. Our choice is the Hellinger entropy,
//
// h(𝑥) = ( 1 |𝑥|² )^{1/2},
// R(𝑥) = ( 1 |𝑥|² )^{1/2},
//
// although other choices are possible, each leading to a slightly
// different algorithm. We then adaptively regularize the optimization
// problem (⋆) with the Bregman divergence of the Hellinger entropy,
//
// maximize ∫_Ω 𝑢 d𝑥 - αₖ⁻¹ D(∇𝑢,∇𝑢ₖ₋₁) subject to 𝑢 = g on Ω.
// maximize ∫_Ω 𝑢 d𝑥 - αₖ⁻¹ D(∇𝑢,∇𝑢ₖ₋₁) subject to 𝑢 = 0 on Ω.
//
// This results in a sequence of functions ( 𝜓ₖ , 𝑢ₖ ),
//
// 𝑢ₖ → 𝑢, 𝜓ₖ/|𝜓ₖ| → ∇𝑢 as k → \infty,
// 𝑢ₖ → 𝑢, 𝜓ₖ/|𝜓ₖ| → ∇𝑢 as k → ,
//
// defined by the nonlinear saddle-point problems
//
// Find 𝜓ₖ ∈ H(div,Ω) and 𝑢ₖ ∈ L²(Ω) such that
// ( Zₖ(𝜓ₖ) , τ ) + ( 𝑢ₖ , ∇⋅τ ) = ⟨ g , τ⋅n ⟩ ∀ τ ∈ H(div,Ω)
// ( ∇⋅𝜓ₖ , v ) = ( ∇⋅𝜓ₖ₋₁ - 1 , v ) ∀ v ∈ L²(Ω)
// ( (∇R)⁻¹(𝜓ₖ) , τ ) + ( 𝑢ₖ , ∇⋅τ ) = 0 ∀ τ ∈ H(div,Ω)
// ( ∇⋅𝜓ₖ , v ) = ( ∇⋅𝜓ₖ₋₁ - αₖ , v ) ∀ v ∈ L²(Ω)
//
// where Zₖ(𝜓) := ∇h⁻¹(αₖ 𝜓) = 𝜓 / ( αₖ⁻² + |𝜓|² )^{1/2} and step size
// αₖ > 0. These saddle-point problems are solved using a damped Newton's
// method. This example assumes that g = 0 and allows the step size to
// grow geometrically, αₖ = α₀rᵏ, where r ≥ 1 is the growth rate.
// where (∇R)⁻¹(𝜓) = 𝜓 / ( 1 + |𝜓|² )^{1/2} and αₖ = α₀rᵏ, where r ≥ 1
// is a prescribed growth rate. (r = 1 is the most stable.) The
// saddle-point problems are solved using a damped quasi-Newton method
// with a tunable regularization parameter 0 ≤ ϵ << 1. The solver is
// also made more robust by additional safeguards described in the code.
//
// [1] Keith, B. and Surowiec, T. (2023) Proximal Galerkin: A structure-
// [1] Keith, B. and Surowiec, T. (2024) Proximal Galerkin: A structure-
// preserving finite element method for pointwise bound constraints.
// arXiv:2307.12444 [math.NA]
// Foundations of Computational Mathematics, 197.
// [2] Dokken, J., Farrell, P., Keith, B., Papadopoulos, I., and
// Surowiec, T. (2025) The latent variable proximal point algorithm
// for variational problems with inequality constraints. (To appear.)
#include "mfem.hpp"
#include <fstream>
@@ -57,36 +61,33 @@
using namespace std;
using namespace mfem;
class ZCoefficient : public VectorCoefficient
class IsomorphismCoefficient : public VectorCoefficient
{
protected:
ParGridFunction *psi;
real_t alpha;
public:
ZCoefficient(int vdim, ParGridFunction &psi_, real_t alpha_ = 1.0)
: VectorCoefficient(vdim), psi(&psi_), alpha(alpha_) { }
IsomorphismCoefficient(int vdim, ParGridFunction &psi_)
: VectorCoefficient(vdim), psi(&psi_) { }
using VectorCoefficient::Eval;
void Eval(Vector &V, ElementTransformation &T,
const IntegrationPoint &ip) override;
void SetAlpha(real_t alpha_) { alpha = alpha_; }
};
class DZCoefficient : public MatrixCoefficient
class DIsomorphismCoefficient : public MatrixCoefficient
{
protected:
ParGridFunction *psi;
real_t alpha;
real_t eps;
public:
DZCoefficient(int height, ParGridFunction &psi_, real_t alpha_ = 1.0)
: MatrixCoefficient(height), psi(&psi_), alpha(alpha_) { }
DIsomorphismCoefficient(int height, ParGridFunction &psi_, real_t eps_ = 0.0)
: MatrixCoefficient(height), psi(&psi_), eps(eps_) { }
void Eval(DenseMatrix &K, ElementTransformation &T,
const IntegrationPoint &ip) override;
void SetAlpha(real_t alpha_) { alpha = alpha_; }
};
int main(int argc, char *argv[])
@@ -104,9 +105,12 @@ int main(int argc, char *argv[])
int ref_levels = 3;
real_t alpha = 1.0;
real_t growth_rate = 1.0;
real_t newton_scaling = 0.9;
real_t tichonov = 1e-1;
real_t newton_scaling = 0.8;
real_t eps = 1e-6;
real_t tol = 1e-4;
real_t max_alpha = 1e2;
real_t max_psi = 1e2;
real_t eps2 = 1e-1;
bool visualization = true;
OptionsParser args(argc, argv);
@@ -148,7 +152,7 @@ int main(int argc, char *argv[])
int sdim = mesh.SpaceDimension();
MFEM_ASSERT(mesh.bdr_attributes.Size(),
"This example does not currently support meshes"
"This example does not support meshes"
" without boundary attributes."
)
@@ -164,6 +168,13 @@ int main(int argc, char *argv[])
int curvature_order = max(order,2);
mesh.SetCurvature(curvature_order);
// 3C. Compute the maximum mesh size.
real_t hmax = 0.0;
for (int i = 0; i < mesh.GetNE(); i++)
{
hmax = max(mesh.GetElementSize(i, 1), hmax);
}
ParMesh pmesh(MPI_COMM_WORLD, mesh);
mesh.Clear();
@@ -231,12 +242,13 @@ int main(int argc, char *argv[])
}
// 9. Coefficients to be used later.
ConstantCoefficient neg_one(-1.0);
ConstantCoefficient zero(0.0);
ConstantCoefficient tichonov_cf(tichonov);
ConstantCoefficient neg_tichonov_cf(-1.0*tichonov);
ZCoefficient Z(sdim, psi_gf, alpha);
DZCoefficient DZ(sdim, psi_gf, alpha);
ConstantCoefficient one_cf(1.0);
ConstantCoefficient zero_cf(0.0);
Vector zero_vec(sdim); zero_vec = 0.0;
VectorConstantCoefficient zero_vec_cf(zero_vec);
ConstantCoefficient neg_alpha_cf((real_t) -1.0*alpha);
IsomorphismCoefficient Z(sdim, psi_gf);
DIsomorphismCoefficient DZ(sdim, psi_gf, eps);
ScalarVectorProductCoefficient neg_Z(-1.0, Z);
DivergenceGridFunctionCoefficient div_psi_cf(&psi_gf);
DivergenceGridFunctionCoefficient div_psi_old_cf(&psi_old_gf);
@@ -248,12 +260,11 @@ int main(int argc, char *argv[])
b1.MakeRef(&L2fes,rhs.GetBlock(1),0);
b0.AddDomainIntegrator(new VectorFEDomainLFIntegrator(neg_Z));
b1.AddDomainIntegrator(new DomainLFIntegrator(neg_one));
b1.AddDomainIntegrator(new DomainLFIntegrator(neg_alpha_cf));
b1.AddDomainIntegrator(new DomainLFIntegrator(psi_old_minus_psi));
ParBilinearForm a00(&RTfes);
a00.AddDomainIntegrator(new VectorFEMassIntegrator(DZ));
a00.AddDomainIntegrator(new VectorFEMassIntegrator(tichonov_cf));
ParMixedBilinearForm a10(&RTfes,&L2fes);
a10.AddDomainIntegrator(new VectorFEDivergenceIntegrator());
@@ -263,11 +274,12 @@ int main(int argc, char *argv[])
HypreParMatrix *A01 = A10->Transpose();
ParBilinearForm a11(&L2fes);
a11.AddDomainIntegrator(new MassIntegrator(neg_tichonov_cf));
a11.Assemble();
a11.Finalize();
HypreParMatrix *A11 = a11.ParallelAssemble();
ParLinearForm vol_form(&L2fes);
ParGridFunction one_gf(&L2fes);
one_gf = 1.0;
vol_form.AddDomainIntegrator(new DomainLFIntegrator(one_cf));
vol_form.Assemble();
real_t domain_volume = vol_form(one_gf);
// 11. Iterate.
int k;
@@ -277,8 +289,6 @@ int main(int argc, char *argv[])
for (k = 0; k < max_it; k++)
{
u_tmp = u_old_gf;
Z.SetAlpha(alpha);
DZ.SetAlpha(alpha);
if (myid == 0)
{
@@ -320,16 +330,14 @@ int main(int argc, char *argv[])
A.SetBlock(0,0,A00);
A.SetBlock(1,0,A10);
A.SetBlock(0,1,A01);
A.SetBlock(1,1,A11);
GMRESSolver gmres(MPI_COMM_WORLD);
gmres.SetPrintLevel(-1);
gmres.SetRelTol(1e-8);
gmres.SetMaxIter(2000);
gmres.SetKDim(500);
gmres.SetOperator(A);
gmres.SetPreconditioner(prec);
gmres.Mult(trhs,tx);
MINRESSolver minres(MPI_COMM_WORLD);
minres.SetPrintLevel(-1);
minres.SetRelTol(1e-12);
minres.SetMaxIter(10000);
minres.SetOperator(A);
minres.SetPreconditioner(prec);
minres.Mult(trhs,tx);
delete S;
delete A00;
@@ -337,7 +345,7 @@ int main(int argc, char *argv[])
u_gf.SetFromTrueDofs(tx.GetBlock(1));
u_tmp -= u_gf;
real_t Newton_update_size = u_tmp.ComputeL2Error(zero);
real_t Newton_update_size = u_tmp.ComputeL2Error(zero_cf);
u_tmp = u_gf;
// Damped Newton update
@@ -356,7 +364,7 @@ int main(int argc, char *argv[])
mfem::out << "Newton_update_size = " << Newton_update_size << endl;
}
if (Newton_update_size < increment_u)
if (newton_scaling*Newton_update_size < increment_u)
{
break;
}
@@ -364,7 +372,7 @@ int main(int argc, char *argv[])
u_tmp = u_gf;
u_tmp -= u_old_gf;
increment_u = u_tmp.ComputeL2Error(zero);
increment_u = u_tmp.ComputeL2Error(zero_cf);
if (myid == 0)
{
@@ -374,14 +382,29 @@ int main(int argc, char *argv[])
u_old_gf = u_gf;
psi_old_gf = psi_gf;
alpha *= max(growth_rate, 1_r);
// Safeguard 1: Stop alpha from growing too large
alpha = min(alpha, max_alpha);
// Safeguard 2: Stop |ψ| from growing too large
real_t norm_psi = psi_old_gf.ComputeL1Error(zero_vec_cf)/domain_volume;
if (norm_psi > max_psi)
{
// Additional entropy regularization
neg_alpha_cf.constant = -alpha/(1.0 + eps2 * alpha * hmax);
psi_old_minus_psi.SetAlpha(1.0/(1.0 + eps2 * alpha * hmax));
}
else
{
neg_alpha_cf.constant = -alpha;
}
if (increment_u < tol || k == max_it-1)
{
break;
}
alpha *= max(growth_rate, 1_r);
}
// 12. Print stats.
@@ -396,40 +419,38 @@ int main(int argc, char *argv[])
// 13. Free the used memory.
delete A01;
delete A10;
delete A11;
return 0;
}
void ZCoefficient::Eval(Vector &V, ElementTransformation &T,
const IntegrationPoint &ip)
void IsomorphismCoefficient::Eval(Vector &V, ElementTransformation &T,
const IntegrationPoint &ip)
{
MFEM_ASSERT(psi != NULL, "grid function is not set");
MFEM_ASSERT(alpha > 0, "alpha is not positive");
Vector psi_vals(vdim);
psi->GetVectorValue(T, ip, psi_vals);
real_t norm = psi_vals.Norml2();
real_t phi = 1.0 / sqrt(1.0/(alpha*alpha) + norm*norm);
real_t phi = 1.0 / sqrt(1.0 + norm*norm);
V = psi_vals;
V *= phi;
}
void DZCoefficient::Eval(DenseMatrix &K, ElementTransformation &T,
const IntegrationPoint &ip)
void DIsomorphismCoefficient::Eval(DenseMatrix &K, ElementTransformation &T,
const IntegrationPoint &ip)
{
MFEM_ASSERT(psi != NULL, "grid function is not set");
MFEM_ASSERT(alpha > 0, "alpha is not positive");
MFEM_ASSERT(eps >= 0, "eps is negative");
Vector psi_vals(height);
psi->GetVectorValue(T, ip, psi_vals);
real_t norm = psi_vals.Norml2();
real_t phi = 1.0 / sqrt(1.0/(alpha*alpha) + norm*norm);
real_t phi = 1.0 / sqrt(1.0 + norm*norm);
K = 0.0;
for (int i = 0; i < height; i++)
{
K(i,i) = phi;
K(i,i) = phi + eps;
for (int j = 0; j < height; j++)
{
K(i,j) -= psi_vals(i) * psi_vals(j) * pow(phi, 3);
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#

Some files were not shown because too many files have changed in this diff Show More