Compare commits

...
Author SHA1 Message Date
Ido Akkerman 12b2f3a7dd Merge branch 'master' into ex13p-amr-dev 2023-04-05 12:13:57 +02:00
Tzanio Kolev d4bc14a48a Merge pull request #3466 from mfem/ab-am-fix
Small fix in Adams Moulton and Adams Bashforth integrators [ab-am-fix]
2023-03-30 11:50:35 -07:00
Tzanio Kolev 34ad9fca15 Merge pull request #3316 from mfem/nurbs-attr
NURBS patch attributes
2023-03-30 11:50:06 -07:00
Tzanio Kolev c1a1c0ba16 Merge pull request #3550 from mfem/tmop-fit-bug
Corrections in TMOP_Integrator::GetSurfaceFittingErrors
2023-03-30 11:48:48 -07:00
Tzanio Kolev bcea3019b4 Merge pull request #3131 from mfem/mesh-ptr-doc-dev
Adding Doxygen comments for returned pointers in mesh classes [mesh-ptr-doc-dev]
2023-03-28 17:02:33 -07:00
Dylan Copeland fc279d85ca CHANGELOG 2023-03-27 10:27:30 -07:00
Tzanio Kolev 7d2be1e37c Merge branch 'master' into nurbs-attr 2023-03-25 18:12:25 -07:00
Tzanio Kolev 92bf531fab Merge pull request #3556 from mfem/new-dev-version-4.5.3
Update version numbers to 4.5.3 -- a new development version
2023-03-24 17:10:58 -07:00
Veselin Dobrev d054509853 Update version numbers to 4.5.3 -- a new development version 2023-03-24 09:43:38 -07:00
Tzanio Kolev 00b2a0705f Merge pull request #3384 from mfem/mfem-4.5.2-dev
Final changes for mfem-4.5.2
2023-03-23 15:33:44 -07:00
Tzanio Kolev 98d4b369ba Final edits in the CHANGELOG for mfem-4.5.2 2023-03-23 15:30:22 -07:00
Stowell, Mark L 9b3c7e7211 Merge remote-tracking branch 'origin/master' into mesh-ptr-doc-dev
# Conflicts:
#	mesh/mesh.hpp
#	mesh/pmesh.hpp
2023-03-23 09:46:31 -07:00
Stowell, Mark L dada0326ef Changes suggested by @acfisher 2023-03-23 09:21:14 -07:00
Veselin Dobrev af6e5e7b21 Merge branch 'master' into mfem-4.5.2-dev 2023-03-21 13:13:59 -07:00
Veselin DobrevandTzanio Kolev 0f6cd97b1a Update CHANGELOG with v4.5.2 release date
Co-authored-by: Tzanio Kolev <tzanio@llnl.gov>
2023-03-21 13:13:39 -07:00
Veselin Dobrev 2106ea4039 Merge pull request #3532 from mfem/2023-copyright
Updated COPYRIGHT to 2010-2023
2023-03-21 13:11:37 -07:00
Veselin Dobrev a152e48fd3 Update config/githooks/pre-push 2023-03-21 11:16:17 -07:00
Vladimir Z Tomov 3c4e67dbe1 unused variable in serial 2023-03-21 10:54:13 -07:00
Vladimir Z Tomov b0614c26d0 corrections in TMOP_Integrator::GetSurfaceFittingErrors() 2023-03-21 10:42:02 -07:00
Will Pazner 701870a7da Merge pull request #3438 from mfem/sjg/pyr-ref-leak
Fix memory leak in pyramid mesh refinement for MFEM_USE_MEMALLOC
2023-03-15 13:27:07 -07:00
Ido Akkerman f68365a0a0 Merge branch 'master' into ab-am-fix 2023-03-15 09:10:55 +01:00
Veselin Dobrev a46650042b Fix some warnings 2023-03-14 09:11:41 -07:00
Veselin Dobrev b4bece1e0f Small tweak in the HiOp header to avoid recursive header
inclusion: 'linalg.hpp' and 'hiop.hpp' were including each
other (harmless due to header guards).
2023-03-13 06:10:57 -07:00
Veselin Dobrev e3e413bdae Fix warnings when building with Ginkgo 1.5.0 2023-03-13 06:09:50 -07:00
Veselin Dobrev 1792b1a90c In fem/picojson.h, use 'serialize_' instead of '_serialize' to
avoid a clash with a macro defined in GCC 11.2.
2023-03-13 06:05:40 -07:00
Tzanio Kolev 96e00dc815 Updated COPYRIGHT to 2010-2023 2023-03-11 16:58:18 -08:00
Veselin Dobrev 4f0a7d4773 Small updates:
* Bugfix in SparseMatrix::SortColumnIndices()
* More general definition of AsConst()
* Fix nvcc warning in miniapps/meshing/reflector.cpp
2023-03-10 23:48:14 -08:00
Ido Akkerman e4d3533c9c Fix include 2 2023-03-09 14:16:07 +01:00
Ido Akkerman b87c6c5ba7 Fix include 2023-03-09 14:14:27 +01:00
Ido Akkerman 1f15ca161a Merge branch 'ab-am-fix' of https://github.com/mfem/mfem into ab-am-fix 2023-03-09 14:07:06 +01:00
Ido Akkerman ec6990ce79 Change print mechanicsm and correct includes 2023-03-09 09:18:35 +01:00
Veselin Dobrev 5335942a92 Merge branch 'master' into mfem-4.5.2-dev 2023-03-08 18:44:07 -08:00
Mark L. Stowell 888b8eca6d Merge pull request #3513 from mfem/shared-msvc-dev-v2
Add support for shared builds on Windows with MSVC using CMake
2023-03-08 17:39:58 -08:00
Mark L. Stowell 5c6000512d Merge branch 'master' into shared-msvc-dev-v2 2023-03-08 16:48:16 -08:00
Veselin Dobrev ddfb7d48e2 In CHANGELOG, move a bullet added after v4.5.0 from the
v4.5.0 section to the v4.5.2 section.
2023-03-07 22:18:14 -08:00
Veselin Dobrev 1d95c85a0d Merge branch 'master' into mfem-4.5.2-dev 2023-03-07 22:04:28 -08:00
Ido Akkerman 2238dadd06 Merge branch 'master' into ab-am-fix 2023-03-07 10:30:14 +01:00
Veselin Dobrev ea56d41dd3 Mention the shared MSVC build support in CHANGELOG and
document the MFEM_EXPORT macro in config.hpp.
2023-03-06 17:48:51 -08:00
Veselin Dobrev e941c8ba91 More tweaks in .gitignore and 'make clean' 2023-03-06 02:43:07 -08:00
Veselin Dobrev fa142c9b59 Small tweaks to .gitignore and 'make clean' 2023-03-06 01:14:53 -08:00
Veselin Dobrev 9d5f62de33 Merge branch 'master' into mfem-4.5.2-dev 2023-03-05 20:27:25 -08:00
Veselin Dobrev f250ee95bb Merge pull request #3520 from lcheng9/master
Initialize two pointers.
2023-03-05 20:24:53 -08:00
Veselin Dobrev 2daf9762a4 Merge branch 'master' into shared-msvc-dev-v2 2023-03-04 21:36:37 -08:00
Veselin Dobrev 8356dd015f In GitHub actions: replace the static build with a shared
build in the windows-par-opt job.
2023-03-04 21:32:41 -08:00
Liang 8c8deaed95 Initialize null pointers.
Some compilers may complain about these two uninitialized pointers, simply resolve it.
2023-03-03 23:24:40 -05:00
Veselin Dobrev 78467f4268 Fix the shared build on Windows with MinGW-w64 2023-03-03 06:36:22 -08:00
Veselin Dobrev e75ab127c8 Bugfix for GitHub issue #3516 2023-03-02 17:25:15 -08:00
Veselin Dobrev fff74aca98 Suppress Doxygen warnings in geom.hpp 2023-02-28 21:00:49 -08:00
Sebastian Grimberg 0412f7f9ea Merge branch 'master' into sjg/pyr-ref-leak 2023-02-28 16:24:27 -08:00
Veselin Dobrev ce505ceab2 In the Appveyor CI, test only the serial shared build since
both static and shared tests take too long.

Try to speed up the hypre build with -j 4.
2023-02-27 22:50:44 -08:00
Veselin DobrevandKenny Weiss c3dbd8041b Add support for shared builds on Windows with MSVC using CMake.
This commit based to a large extend on PR #1401.

Co-authored-by: Kenny Weiss <kennyweiss@users.noreply.github.com>
2023-02-27 19:31:21 -08:00
Veselin Dobrev bbd1b42bab Merge branch 'master' into mfem-4.5.2-dev 2023-02-24 16:49:21 -08:00
Veselin Dobrev 546e96c2a2 Merge branch 'master' into mfem-4.5.2-dev 2023-02-23 09:42:52 -08:00
Veselin Dobrev b9b17575fb Merge branch 'master' into mfem-4.5.2-dev 2023-02-23 09:27:28 -08:00
Ido Akkerman da7ae3d7fe Merge branch 'master' into ab-am-fix 2023-02-23 10:50:34 +01:00
Ido Akkerman ae32fddc73 Merge branch 'ab-am-fix' of https://github.com/mfem/mfem into ab-am-fix 2023-02-23 10:48:08 +01:00
Ido Akkerman d21eb9f5b2 Remove guard and prevent warning output at first timestep 2023-02-23 10:43:01 +01:00
Veselin Dobrev 946ecc4623 Github actions: use v2.3 of the mfem-build action which solves the
slow linking on Ubuntu + CMake. Keep the ability to set additional
configuration options in the build matrix.
2023-02-22 23:41:53 -08:00
Veselin Dobrev 86786df48e Github actions: try another way to pass config-options to the
Ubuntu + CMake build.
2023-02-22 18:37:39 -08:00
Veselin Dobrev 15aae11753 Try to resolve the slow linking issue on Ubuntu + CMake. 2023-02-22 18:10:04 -08:00
Veselin Dobrev 7cda15237b Merge branch 'master' into mfem-4.5.2-dev
Resolved conflicts:
   CHANGELOG
2023-02-22 18:07:58 -08:00
Veselin Dobrev 94573fcaec Merge branch 'master' into mfem-4.5.2-dev 2023-02-21 12:51:03 -08:00
Ben Southworth 6fa71acdd6 fix space in printout 2023-02-21 08:52:20 -07:00
Ben Southworth 1f1fc6e6e5 add missing space 2023-02-21 06:18:35 -07:00
Veselin Dobrev 764898e186 Suppress a warning from CMake about HDF5_ROOT.
In MfemCmakeUtilities.cmake, tweak mfem_find_package() and
mfem_get_target_options() to handle imported libraries better.
2023-02-20 15:22:42 -08:00
Ido Akkerman 61848a0627 Fix print if root statement 2023-02-20 16:33:28 +01:00
Ido Akkerman 4c59647387 Fixing compile error and warning message 2023-02-20 14:59:20 +01:00
Veselin DobrevandChris White 93cdcae163 Fix some CMake issues in FindNetCDF.cmake related to HDF5
Reported-by: Jamie Bramwell <jamiebramwell@users.noreply.github.com>
Co-authored-by: Chris White <white238@users.noreply.github.com>
2023-02-17 16:22:10 -08:00
Ido Akkerman ffbb844a22 Add timestep check to AM and AB solvers. FLush history if timestep changes 2023-02-17 17:34:45 +01:00
Ido Akkerman 3c8f827c8e Small improvement to ODE unit tester 2023-02-15 15:47:32 +01:00
Ido Akkerman 200f146a81 Correct time increment in AB & AM ode integrators 2023-02-15 15:47:20 +01:00
Tzanio Kolev 8053bc25e4 Updated CHANGELOG for the mfem-4.5.2 release 2023-02-14 15:02:48 -08:00
Veselin Dobrev c8aa9544c3 Merge branch 'master' into mfem-4.5.2-dev 2023-02-11 23:33:39 -08:00
Veselin Dobrev 72596e45d4 In defaults.mk, replace the '--amdgpu-target' flag with
'--offload-arch' since new versions of hipcc generate warning
about it; older versions should still work fine with
'--offload-arch'.
2023-02-11 23:27:40 -08:00
Sebastian Grimberg ae8ed6bb92 Merge branch 'master' into sjg/pyr-ref-leak 2023-02-07 20:25:56 -08:00
Veselin Dobrev b90350b234 Bugfix for issue #3433 2023-02-06 12:04:44 -08:00
Tzanio Kolev b8b3dc2f73 Merge branch 'master' into nurbs-attr 2023-02-06 11:02:17 -08:00
Veselin Dobrev 0a50fe2fde CMake fix for using (with the tests) and exporting the MPI variables
MPI_CXX_COMPILE_FLAGS and MPI_CXX_LINK_FLAGS when defined.
2023-02-05 21:26:41 -08:00
Veselin Dobrev ada669ff40 Merge branch 'master' into mfem-4.5.2-dev 2023-02-05 21:25:46 -08:00
Veselin Dobrev 3764f6e15c Merge branch 'master' into mfem-4.5.2-dev 2023-02-03 13:47:38 -08:00
Dylan Copeland 08b5a285be Merge branch 'master' of github.com:mfem/mfem into nurbs-attr 2023-01-30 16:30:40 -08:00
Dylan Copeland 9d62c10fbe Setting patch boundary elements on setup rather than on demand. 2023-01-30 16:28:04 -08:00
Sebastian Grimberg c7e701807a Fix memory leak in pyramid mesh refinement for MFEM_USE_MEMALLOC 2023-01-27 10:51:43 -08:00
Mark L. Stowell 22f4f06bae Merge branch 'master' into mesh-ptr-doc-dev 2023-01-11 15:37:40 -05:00
Veselin Dobrev 4882231889 Merge branch 'master' into mfem-4.5.2-dev 2023-01-06 09:19:34 -08:00
Veselin Dobrev f8f20ba147 Merge branch 'master' into mfem-4.5.2-dev 2022-12-28 10:41:48 -08:00
Veselin Dobrev b657fd4d74 Initial changes for the v4.5.2 release 2022-12-24 15:06:13 -08:00
Dylan Copeland bde55a3686 Merge branch 'master' into nurbs-attr 2022-12-09 09:59:43 -08:00
Dylan Copeland 11abc26e00 Setting patch_to_el after setting el_to_patch. 2022-11-14 21:55:22 -08:00
Dylan Copeland 707befe264 Documenting some new functions. 2022-11-14 21:38:39 -08:00
Dylan Copeland ae50320b05 Editing a comment. 2022-11-09 12:18:33 -08:00
Dylan Copeland 2366754d19 Adding functions to set and get attributes on NURBS patches. 2022-11-09 12:06:19 -08:00
Stowell, Mark L dd8a19d180 Merge remote-tracking branch 'origin/master' into mesh-ptr-doc-dev 2022-09-09 12:55:51 -07:00
Stowell, Mark L 9f03e9f682 Extending documentation for pmesh nurbs and element 2022-08-04 14:59:45 -07:00
Stowell, Mark L 3fadacb72b Merge remote-tracking branch 'origin/master' into mesh-ptr-doc-dev 2022-08-03 17:12:04 -07:00
Stowell, Mark L 94ae0d9c5e Expanding comments in mesh.hpp 2022-08-03 17:09:33 -07:00
Stowell, Mark L 8709602daa Small documentation changes to Mesh 2022-07-26 14:23:49 -07:00
Stowell, Mark L b5cb664da8 Merge remote-tracking branch 'origin/master' into ex13p-amr-dev 2018-08-28 09:54:40 -07:00
Tzanio e1260dadbc Merge branch 'master' into ex13p-amr-dev
Conflicts:
	examples/makefile
2018-06-06 17:23:39 +02:00
Tzanio 6af66a90ee Merge branch 'master' into ex13p-amr-dev 2017-11-10 17:08:08 -08:00
Stowell, Mark L 97d08d7bca Edited comments and removed 2D examples 2017-04-12 10:55:23 -07:00
Stowell, Mark L aab6c1f775 Adding AMR version of ex13p 2017-04-12 10:30:12 -07:00
824 changed files with 1932 additions and 1147 deletions
+14 -8
View File
@@ -31,7 +31,7 @@ install:
- ps: ( get-content "GKlib\gk_arch.h") | % { If ($_.ReadCount -ge 52) {$_ -replace "#ifdef __MSC__","#ifdef DISABLE_THIS_ANCIENT_MSC_CHECK"} Else {$_} } | set-content "GKlib\gk_arch.h"
- cmake -H. -Bbuild
# -DCMAKE_BUILD_TYPE=Release
- cmake --build build
- cmake --build build --target metis -j 4
- set METIS_PATH=%cd%
- cd ..
@@ -40,7 +40,7 @@ install:
- 7z x v2.19.0.tar.gz -so | 7z x -si -ttar > nul
- cd hypre-2.19.0/src
- cmake -H. -Bbuild
- cmake --build build
- cmake --build build -j 4
- cmake --build build --target install
- cd ../..
@@ -49,14 +49,20 @@ install:
# MFEM
before_build:
- cmake -H. -DCMAKE_INSTALL_PREFIX=install -Bbuild_parallel -DMFEM_USE_MPI=TRUE -DMFEM_USE_METIS_5=TRUE -DHYPRE_DIR=%cd%\..\hypre-2.19.0\src\hypre -DMETIS_LIBRARIES=%METIS_PATH%\build\libmetis\Debug\metis.lib -DMETIS_INCLUDE_DIRS=%METIS_PATH%\include
- cmake -H. -DCMAKE_INSTALL_PREFIX=install -Bbuild_serial -DMFEM_USE_MPI=FALSE
- cmake . -Bbuild_parallel -DMFEM_USE_MPI=TRUE -DMFEM_USE_METIS_5=TRUE -DHYPRE_DIR=%cd%\..\hypre-2.19.0\src\hypre -DMETIS_LIBRARIES=%METIS_PATH%\build\libmetis\Debug\metis.lib -DMETIS_INCLUDE_DIRS=%METIS_PATH%\include
# - cmake . -Bbuild_serial -DMFEM_USE_MPI=FALSE
- cmake . -Bbuild_shared_serial -DMFEM_USE_MPI=FALSE -DBUILD_SHARED_LIBS=ON
build_script:
- cmake --build build_parallel --config Release -j 4
- cmake --build build_serial --config Release -j 4
- cmake --build build_serial --target exec --config Release -j 4
- cmake --build build_parallel --config Debug -j 4
# - cmake --build build_serial --config Release -j 4
# - cmake --build build_serial --target exec --config Release -j 4
- cmake --build build_shared_serial --config Release -j 4
- cmake --build build_shared_serial --target exec --config Release -j 4
after_build:
- cd build_serial
# - cd build_serial
# - ctest -C Release --output-on-failure
# - cd ..
- cd build_shared_serial
- ctest -C Release --output-on-failure
+10 -3
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
@@ -74,12 +74,19 @@ jobs:
codecov: YES
- os: windows-latest
codecov: NO
- os: windows-latest
target: opt
mpi: par
config-opts: '-DBUILD_SHARED_LIBS=ON'
- os: ubuntu-latest
target: opt
codecov: NO
mpi: par
build-system: cmake
hypre-target: int32
# This option can be set to pass additional configuration options to
# the MFEM configuration command.
# config-opts: '-DCMAKE_VERBOSE_MAKEFILE=ON'
- os: ubuntu-latest
target: opt
codecov: NO
@@ -210,7 +217,7 @@ jobs:
# MFEM build and test
- name: build
uses: mfem/github-actions/build-mfem@v2.2
uses: mfem/github-actions/build-mfem@v2.3
env:
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg_cache
with:
@@ -222,7 +229,7 @@ jobs:
hypre-dir: ${{ env.HYPRE_TOP_DIR }}
metis-dir: ${{ env.METIS_TOP_DIR }}
mfem-dir: ${{ env.MFEM_TOP_DIR }}
config-options: ${{ env.MFEM_EXTRA_CONFIG }}
config-options: ${{ matrix.config-opts }}
library-only: ${{ matrix.target == 'dbg' }}
# Run checks (and only checks) on debug targets
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
+12 -7
View File
@@ -21,6 +21,9 @@ CMakeFiles/
# Default install location
/mfem/
# Typical build directory
/build/
# Generated files in main directory, config/ and docs/
/deps.mk
config/_config.hpp
@@ -118,11 +121,9 @@ examples/amgx/sol.gf
examples/amgx/mesh.*
examples/amgx/sol.*
examples/gingko/ex1
examples/gingko/refined.mesh
examples/gingko/sol.gf
examples/gingko/mesh.*
examples/gingko/sol.*
examples/ginkgo/ex1
examples/ginkgo/refined.mesh
examples/ginkgo/sol.gf
examples/hiop/ex9
examples/hiop/ex9p
@@ -148,8 +149,8 @@ examples/petsc/velocity.*
examples/petsc/elastic_energy.*
examples/petsc/mode_*
examples/pumi/ex1
examples/pumi/ex[126]p
examples/pumi/ex[12]
examples/pumi/ex[16]p
examples/pumi/refined.mesh
examples/pumi/sol.gf
examples/pumi/mesh.*
@@ -194,6 +195,9 @@ miniapps/gslib/field-diff
miniapps/gslib/field-interp
miniapps/gslib/findpts
miniapps/gslib/pfindpts
miniapps/gslib/schwarz_ex1
miniapps/gslib/schwarz_ex1p
miniapps/gslib/interpolated.gf
miniapps/meshing/mobius-strip
miniapps/meshing/klein-bottle
@@ -245,6 +249,7 @@ miniapps/navier/navier_tgv
miniapps/navier/navier_shear
miniapps/navier/navier_3dfoc
miniapps/navier/navier_turbchan
miniapps/navier/navier_cht
miniapps/navier/tgv_out*.txt
miniapps/navier/*_output
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
+34 -38
View File
@@ -8,61 +8,55 @@
https://mfem.org
Version 4.5.1 (development)
Version 4.5.3 (development)
===========================
- When using discontinuous (L2) spaces, use local (element-wise) L2 projection
as the coarsening operator for non-conforming AMR meshes.
Meshing improvements
--------------------
- Added new methods in the Mesh class to set and get attributes on NURBS patches
and patch boundaries.
Version 4.5.2, released on March 23, 2023
=========================================
- Added support for pyramids in non-conforming meshes. Currently only isotropic
refinement is supported in this case.
- Removed the support for the Mesquite toolkit. We recommend using MFEM's TMOP
functionality instead for mesh optimization. See the mesh-optimizer miniapp.
- Added a fast normalization-based distance solver, see the Distance miniapp
in the miniapps/shifted/ directory.
- Added a new meshing miniapp, Reflector, which reflects a high-order or NURBS
hexahedral mesh about a plane.
- Updated logic in FindPointsGSLIB to ignore points found near (but outside) the
domain boundary.
- Added support for pyramids in Gmsh meshes.
- Added an option to auto-balance compound TMOP metrics.
- Fixed a bug in TMOP metric 301.
- Added an option to auto-balance compound TMOP metrics.
- When using discontinuous (L2) spaces, use local (element-wise) L2 projection
as the coarsening operator for non-conforming AMR meshes.
Discretization improvements
---------------------------
- TBD
- Added support for GridFunction::GetGradients() and GetVectorGradient() on
face-neighbor elements.
Linear and nonlinear solvers
----------------------------
- Added a fast normalization-based distance solver, see the Distance miniapp
in the miniapps/shifted/ directory.
- Added support for pyramids in Gmsh meshes.
New and updated examples and miniapps
-------------------------------------
- Added a new meshing miniapp, reflector, which reflects a high-order or NURBS
hexahedral mesh about a plane.
- The Mesh Explorer miniapp can now save mesh files in the VisIt or ParaView
formats using the corresponding DataCollection. See option 'D' in the menu.
- The mesh-explorer miniapp can now save mesh files in the VisIt or ParaView
formats using the corresponding DataCollection objects. See option 'D' in the
main menu.
- VisItDataCollection now correctly handles data collection names containing
underscores.
Integrations, testing and documentation
---------------------------------------
- Removed the support for the Mesquite toolkit. We recommend using MFEM's TMOP
functionality instead for mesh optimization. See the mesh-optimizer miniapp.
- Added support for shared Windows builds with MSVC through CMake.
Developers note: this enhancement is facilitated by the addition of the macro
MFEM_EXPORT, see config.hpp for more details on its usage.
- The following integrations have updated minimum version requirements:
* RAJA >= 2022.10.3
Miscellaneous
-------------
- VisItDataCollection now correctly handles collection names containing
underscores.
- VisItDataCollection::SetPadDigits() no longer alters the number of digits
used to represent the MPI rank because VisIt seems to require 6 digits.
This parameter can still be explicitly overridden with
VisItDataCollection::SetPadDigitsRank().
API changes
-----------
- The implicit cast methods of class Vector to 'double *' and 'const double *'
@@ -73,6 +67,11 @@ API changes
deprecated, and Mesh::GetFaceGeometry (which provides identical functionality)
should be used instead.
- VisItDataCollection::SetPadDigits() no longer alters the number of digits
used to represent the MPI rank because VisIt seems to require 6 digits.
This parameter can still be explicitly overridden with SetPadDigitsRank().
Version 4.5, released on October 22, 2022
=========================================
@@ -116,9 +115,6 @@ Discretization improvements
- Added a class CoefficientVector for efficient access of variable coefficient
values at quadrature points (in particular for GPU/device kernels).
- Added support for GridFunction::GetGradients() and
GriFunction::GetVectorGradient() on face-neighbor elements.
- Added WhiteGaussianNoiseDomainLFIntegrator: a LinearFormIntegrator class for
spatial Gaussian white noise.
+42 -9
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
@@ -13,6 +13,7 @@
# Version 3.8 fixes the handling of CMAKE_CXX_STANDARD for try_compile.
# Version 3.8 or newer is required for direct CUDA support.
cmake_minimum_required(VERSION 3.8)
message(STATUS "CMake version: ${CMAKE_VERSION}")
set(USER_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/config/user.cmake" CACHE PATH
"Path to optional user configuration file.")
@@ -24,8 +25,11 @@ set(CMAKE_CXX_EXTENSIONS OFF)
# Load user settings before the defaults - this way the defaults will not
# overwrite the user set options. If the user has not set all options, we still
# have the defaults.
message(STATUS "(optional) USER_CONFIG = ${USER_CONFIG}")
include("${USER_CONFIG}" OPTIONAL)
include("${USER_CONFIG}" OPTIONAL RESULT_VARIABLE USER_CONFIG_LOADED)
if (USER_CONFIG_LOADED)
set(USER_CONFIG_LOADED "LOADED")
endif()
message(STATUS "Loading USER_CONFIG = ${USER_CONFIG} (${USER_CONFIG_LOADED})")
include("${CMAKE_CURRENT_SOURCE_DIR}/config/defaults.cmake")
# Allow overwriting of the compiler by setting CXX/MPICXX on the command line or
@@ -53,7 +57,7 @@ project(mfem NONE)
# Current version of MFEM, see also `makefile`.
# mfem_VERSION = (string)
# MFEM_VERSION = (int) [automatically derived from mfem_VERSION]
set(${PROJECT_NAME}_VERSION 4.5.1)
set(${PROJECT_NAME}_VERSION 4.5.3)
# Prohibit in-source build
if (${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR})
@@ -183,6 +187,23 @@ else()
set(MFEM_DEBUG OFF)
endif()
# Shared build on Windows
if (WIN32 AND BUILD_SHARED_LIBS)
# CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS works only with MSVC?
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON CACHE BOOL
"Automatically export symbols for shared Windows DLL build")
# Place all .dll and .exe files in the same sub-directory, 'bin/<config>', of
# the build directory, so that the .exe files can find the .dll files at
# runtime:
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# Note: CMake tests are run from the build-tree sub-directory where the test
# is defined, e.g. <build-dir>/tests/unit, so hard coded paths to meshes still
# work fine.
# Not strictly necessary:
# set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
# set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
endif()
# AMD HIP
if (MFEM_USE_HIP)
if (HIP_ARCH)
@@ -519,6 +540,7 @@ list(REVERSE TPL_LIBRARIES)
list(REMOVE_DUPLICATES TPL_INCLUDE_DIRS)
# message(STATUS "TPL_INCLUDE_DIRS = ${TPL_INCLUDE_DIRS}")
message(STATUS "MFEM shared library: BUILD_SHARED_LIBS = ${BUILD_SHARED_LIBS}")
message(STATUS "MFEM build type: CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
message(STATUS "MFEM version: v${MFEM_VERSION_STRING}")
message(STATUS "MFEM git string: ${MFEM_GIT_STRING}")
@@ -574,7 +596,19 @@ target_include_directories(mfem
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
# The INSTALL_INTERFACE is handled below
${TPL_INCLUDE_DIRS})
if (MFEM_USE_MPI)
if (MPI_CXX_COMPILE_FLAGS)
separate_arguments(MPI_CXX_COMPILE_ARGS UNIX_COMMAND
"${MPI_CXX_COMPILE_FLAGS}")
target_compile_options(mfem PUBLIC ${MPI_CXX_COMPILE_ARGS})
endif()
if (MPI_CXX_LINK_FLAGS)
target_link_libraries(mfem PUBLIC ${MPI_CXX_LINK_FLAGS})
endif()
endif()
set_target_properties(mfem PROPERTIES VERSION "${mfem_VERSION}")
set_target_properties(mfem PROPERTIES SOVERSION "${mfem_VERSION}")
@@ -586,6 +620,7 @@ if (NOT ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}"))
endif()
# Generate configuration file in the build directory: config/_config.hpp.
set(MFEM_SHARED_BUILD ${BUILD_SHARED_LIBS})
configure_file(
"${PROJECT_SOURCE_DIR}/config/cmake/config.hpp.in"
"${PROJECT_BINARY_DIR}/config/_config.hpp")
@@ -705,7 +740,7 @@ set(INSTALL_LIB_DIR lib
set(INSTALL_CMAKE_DIR lib/cmake/mfem
CACHE PATH "Relative path for installing cmake config files.")
target_include_directories(mfem
target_include_directories(mfem BEFORE
PUBLIC
$<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>)
@@ -757,10 +792,8 @@ endif()
# Install the configuration header files
install(FILES ${PROJECT_BINARY_DIR}/config/_config.hpp
DESTINATION ${INSTALL_INCLUDE_DIR}/mfem/config
RENAME config.hpp)
install(FILES ${PROJECT_SOURCE_DIR}/config/tconfig.hpp
${PROJECT_SOURCE_DIR}/config/config.hpp
${PROJECT_SOURCE_DIR}/config/tconfig.hpp
DESTINATION ${INSTALL_INCLUDE_DIR}/mfem/config)
# Package the whole thing up nicely
+1 -1
View File
@@ -1,6 +1,6 @@
BSD 3-Clause License
Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC
Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
+4 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2023, 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.
//
@@ -39,6 +39,9 @@
// Description of the git commit used to build MFEM.
#cmakedefine MFEM_GIT_STRING "@MFEM_GIT_STRING@"
// Enable shared library build of MFEM.
#cmakedefine MFEM_SHARED_BUILD
// Build the parallel MFEM library.
// Requires an MPI compiler, and the libraries HYPRE and METIS.
#cmakedefine MFEM_USE_MPI
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
+11 -4
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
@@ -21,8 +21,15 @@ if(EXISTS ${CONDUIT_DIR}/include/conduit/conduit_relay_hdf5.hpp)
# we only need HDF5 if Conduit was built with HDF5 support
set(Conduit_REQUIRED_PACKAGES "HDF5" CACHE STRING
"Additional packages required by Conduit.")
else()
message(STATUS "Conduit Relay HDF5 Support is DISABLED")
# Suppress warning about HDF5_ROOT being set
if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
# HDF5_ROOT is needed in some cases, e.g. when HDF5_TARGET_NAMES is set and
# MFEM's FindHDF5.cmake is not used.
set(HDF5_ROOT ${HDF5_DIR} CACHE PATH "")
else()
message(STATUS "Conduit Relay HDF5 Support is DISABLED")
endif()
include(MfemCmakeUtilities)
@@ -32,4 +39,4 @@ mfem_find_package(Conduit CONDUIT CONDUIT_DIR
ADD_COMPONENT relay
"include;include/conduit" conduit_relay.hpp "lib" conduit_relay
ADD_COMPONENT blueprint
"include;include/conduit" conduit_blueprint.hpp "lib" conduit_blueprint)
"include;include/conduit" conduit_blueprint.hpp "lib" conduit_blueprint)
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
+17 -6
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
@@ -14,11 +14,17 @@
# - NETCDF_LIBRARIES
# - NETCDF_INCLUDE_DIRS
# Suppress warning about HDF5_ROOT being set
if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
include(MfemCmakeUtilities)
# FindHDF5.cmake uses HDF5_ROOT, so we "translate" from the MFEM convention
# (MFEM's FindHDF5.cmake does not need HDF5_ROOT)
# set(HDF5_ROOT ${HDF5_DIR} CACHE PATH "")
# (Needed in some cases, e.g. when HDF5_TARGET_NAMES is set and MFEM's
# FindHDF5.cmake is not used.)
set(HDF5_ROOT ${HDF5_DIR} CACHE PATH "")
# We need to guard against the case where HDF5 was already found but without
# the HL extensions (in which case mfem_find_package will treat the package
@@ -35,6 +41,11 @@ mfem_find_package(NetCDF NETCDF NETCDF_DIR "include" netcdf.h "lib" netcdf
# The netcdf library will always be the first element of NETCDF_LIBRARIES
# and we need to insert after that library but before the hdf5 library, so
# position 1 is used
# (MFEM's FindHDF5.cmake does not set HDF5_C_LIBRARY_hdf5_hl and the HL library
# is already added to NETCDF_LIBRARIES)
# list(INSERT NETCDF_LIBRARIES 1 ${HDF5_C_LIBRARY_hdf5_hl})
# (Needed in some cases, e.g. when HDF5_TARGET_NAMES is set and MFEM's
# FindHDF5.cmake is not used.)
if (HDF5_C_LIBRARY_hdf5_hl)
list(INSERT NETCDF_LIBRARIES 1 ${HDF5_C_LIBRARY_hdf5_hl})
if (NOT NetCDF_FIND_QUIETLY)
message(STATUS "Updated NetCDF libraries: ${NETCDF_LIBRARIES}")
endif()
endif()
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
+38 -59
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
@@ -103,25 +103,6 @@ macro(add_mfem_examples EXE_SRCS)
${MFEM_EXEC_PREREQUISITES_TARGET_NAME} ${EXE_PREREQUISITE})
target_link_libraries(${EXE_NAME} mfem)
if (MFEM_USE_MPI)
# Not needed: (mfem already links with MPI_CXX_LIBRARIES)
# target_link_libraries(${EXE_NAME} ${MPI_CXX_LIBRARIES})
# Language-specific include directories:
if (MPI_CXX_INCLUDE_PATH)
target_include_directories(${EXE_NAME} PRIVATE "${MPI_CXX_INCLUDE_PATH}")
endif()
if (MPI_CXX_COMPILE_FLAGS)
separate_arguments(MPI_CXX_COMPILE_ARGS UNIX_COMMAND
"${MPI_CXX_COMPILE_FLAGS}")
target_compile_options(${EXE_NAME} PRIVATE ${MPI_CXX_COMPILE_ARGS})
endif()
if (MPI_CXX_LINK_FLAGS)
set_target_properties(${EXE_NAME} PROPERTIES
LINK_FLAGS "${MPI_CXX_LINK_FLAGS}")
endif()
endif()
endforeach(SRC_FILE)
endmacro()
@@ -172,26 +153,6 @@ macro(add_mfem_miniapp MFEM_EXE_NAME)
if (EXTRA_DEFINES_LIST)
target_compile_definitions(${MFEM_EXE_NAME} PRIVATE ${EXTRA_DEFINES_LIST})
endif()
# Handle the MPI separately
if (MFEM_USE_MPI)
# Add MPI_CXX_LIBRARIES, in case this target does not link with mfem.
target_link_libraries(${MFEM_EXE_NAME} PRIVATE ${MPI_CXX_LIBRARIES})
if (MPI_CXX_INCLUDE_PATH)
target_include_directories(${MFEM_EXE_NAME} PRIVATE ${MPI_CXX_INCLUDE_PATH})
endif()
if (MPI_CXX_COMPILE_FLAGS)
separate_arguments(MPI_CXX_COMPILE_ARGS UNIX_COMMAND
"${MPI_CXX_COMPILE_FLAGS}")
target_compile_options(${MFEM_EXE_NAME} PRIVATE ${MPI_CXX_COMPILE_ARGS})
endif()
if (MPI_CXX_LINK_FLAGS)
set_target_properties(${MFEM_EXE_NAME} PROPERTIES
LINK_FLAGS "${MPI_CXX_LINK_FLAGS}")
endif()
endif()
endmacro()
@@ -436,9 +397,9 @@ function(mfem_find_package Name Prefix DirVar IncSuffixes Header LibSuffixes
break()
endif()
endforeach()
if (${Required} AND NOT ${ReqPack}_FOUND)
if (Required AND NOT ${ReqPack}_FOUND)
message(FATAL_ERROR " *** Required package ${ReqPack} not found."
"Checked target names: ${ReqPack} ${${ReqPack}_TARGET_NAMES}")
" Checked target names: ${ReqPack} ${${ReqPack}_TARGET_NAMES}")
endif()
endif()
endif()
@@ -504,14 +465,18 @@ function(mfem_find_package Name Prefix DirVar IncSuffixes Header LibSuffixes
endif()
get_target_property(IsImported ${TargetName} IMPORTED)
if (IsImported)
get_target_property(ImpConfigs ${TargetName} IMPORTED_CONFIGURATIONS)
# message(STATUS "${ReqPack} imported configs: ${ImpConfigs}")
set(ImportConfig ${${ReqPack}_IMPORT_CONFIG})
if (NOT ImportConfig)
set(ImportConfig RELEASE)
list(FIND ImpConfigs ${ImportConfig} _Index)
if (_Index EQUAL -1)
list(GET ImpConfigs 0 ImportConfig)
endif()
endif()
set(ImportConfigSuffix "_${ImportConfig}")
get_target_property(ImpConfigs ${TargetName} IMPORTED_CONFIGURATIONS)
list(FIND ImpConfigs ${ImportConfig} _Index)
if ((_Index EQUAL -1) OR ("${ImportConfig}" STREQUAL "NO_CONFIG"))
if ((NOT ImportConfig) OR ("${ImportConfig}" STREQUAL "NO_CONFIG"))
set(ImportConfig "NO_CONFIG")
set(ImportConfigSuffix "")
# message(FATAL_ERROR " *** ${ReqPack}: configuration "
@@ -529,7 +494,8 @@ function(mfem_find_package Name Prefix DirVar IncSuffixes Header LibSuffixes
else()
# Set _Pack_LIBS from the target properties for ImportConfig
foreach (_prop IMPORTED_LOCATION${ImportConfigSuffix}
IMPORTED_LINK_INTERFACE_LIBRARIES${ImportConfigSuffix})
IMPORTED_LINK_INTERFACE_LIBRARIES${ImportConfigSuffix}
INTERFACE_LINK_LIBRARIES)
get_target_property(_value ${TargetName} ${_prop})
if (_value)
list(APPEND _Pack_LIBS ${_value})
@@ -780,6 +746,7 @@ function(mfem_get_target_options Target CompileOptsVar LinkOptsVar)
list(APPEND CompileOpts "-isystem \"${SysDir}\"")
endforeach()
endif()
set(AddInterfaceLinkLibs TRUE)
if ("${type}" STREQUAL "STATIC_LIBRARY")
get_target_property(Location ${tgt} LOCATION)
if (Location)
@@ -801,18 +768,7 @@ function(mfem_get_target_options Target CompileOptsVar LinkOptsVar)
message(STATUS " *** Warning: [${tgt}] LOCATION not defined!")
endif()
elseif ("${type}" STREQUAL "INTERFACE_LIBRARY")
get_target_property(Libs ${tgt} INTERFACE_LINK_LIBRARIES)
if (Libs)
foreach(Lib ${Libs})
if (NOT (TARGET ${Lib}))
list(APPEND LinkOpts "${Lib}")
else()
mfem_get_target_options(${Lib} COpts LOpts)
list(APPEND CompileOpts ${COpts})
list(APPEND LinkOpts ${LOpts})
endif()
endforeach()
endif()
# The INTERFACE_LINK_LIBRARIES property is handled below.
# Other properties we may need to handle:
# INTERFACE_LINK_DEPENDS
# INTERFACE_LINK_DIRECTORIES
@@ -820,6 +776,26 @@ function(mfem_get_target_options Target CompileOptsVar LinkOptsVar)
else()
message(STATUS " *** Warning: [${tgt}] uses target type '${type}'"
" which is not supported!")
set(AddInterfaceLinkLibs FALSE)
endif()
if (AddInterfaceLinkLibs)
get_target_property(Libs ${tgt} INTERFACE_LINK_LIBRARIES)
# message(STATUS "${tgt}[INTERFACE_LINK_LIBRARIES]: ${Libs}")
if (Libs)
foreach(Lib ${Libs})
if (NOT (TARGET ${Lib}))
# message(STATUS "Lib = ${Lib}")
# Filter-out generator expressions
if (NOT ("${Lib}" MATCHES "^\\$"))
list(APPEND LinkOpts "${Lib}")
endif()
else()
mfem_get_target_options(${Lib} COpts LOpts)
list(APPEND CompileOpts ${COpts})
list(APPEND LinkOpts ${LOpts})
endif()
endforeach()
endif()
endif()
# Other potentially relevant properties:
@@ -843,6 +819,9 @@ function(mfem_get_target_options Target CompileOptsVar LinkOptsVar)
set(${CompileOptsVar} "${CompileOpts}" PARENT_SCOPE)
set(${LinkOptsVar} "${LinkOpts}" PARENT_SCOPE)
# message(STATUS "${tgt}[CompileOpts]: ${CompileOpts}")
# message(STATUS "${tgt}[LinkOpts]: ${LinkOpts}")
endfunction(mfem_get_target_options)
@@ -894,7 +873,7 @@ function(mfem_export_mk_files)
"${cxx_std_flag} ${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${CMAKE_CXX_FLAGS}"
MFEM_CXXFLAGS)
set(MFEM_TPLFLAGS "")
foreach(dir ${MFEM_TPL_INCLUDE_DIRS})
foreach(dir ${TPL_INCLUDE_DIRS})
set(MFEM_TPLFLAGS "${MFEM_TPLFLAGS} -I${dir}")
endforeach()
# TODO: MFEM_TPLFLAGS: add other TPL flags, in addition to the -I flags.
+22 -3
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2023, 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.
//
@@ -30,11 +30,30 @@
#endif
// Windows specific options
#ifdef _WIN32
#ifndef _USE_MATH_DEFINES
#if defined(_WIN32) && !defined(_USE_MATH_DEFINES)
// Macro needed to get defines like M_PI from <cmath>. (Visual Studio C++ only?)
#define _USE_MATH_DEFINES
#endif
// Macro MFEM_EXPORT: this macro is used when declaring exported global
// variables and static class variables in public header files, e.g.:
// extern MFEM_EXPORT Geometry Geometries;
// static MFEM_EXPORT Device device_singleton;
// In cases where a class contains multiple static variables, instead of marking
// all such variables with MFEM_EXPORT, one can mark the class with MFEM_EXPORT,
// e.g.:
// class MFEM_EXPORT MemoryManager ...
// Note: MFEM's GitHub CI includes a shared MSVC build that will fail if a
// variable that needs MFEM_EXPORT does not have it. However, builds with
// optional external libraries are not tested and may require separate checks to
// determine the necessity of MFEM_EXPORT.
#if defined(_MSC_VER) && defined(MFEM_SHARED_BUILD)
#ifdef mfem_EXPORTS
#define MFEM_EXPORT __declspec(dllexport)
#else
#define MFEM_EXPORT __declspec(dllimport)
#endif
#else
#define MFEM_EXPORT
#endif
// On Cygwin the option -std=c++11 prevents the definition of M_PI. Defining
// the following macro allows us to get M_PI and some needed functions, e.g.
+4 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2023, 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.
//
@@ -39,6 +39,9 @@
// Description of the git commit used to build MFEM.
// #define MFEM_GIT_STRING "@MFEM_GIT_STRING@"
// Enable shared library build of MFEM.
// #define MFEM_SHARED_BUILD
// Build the parallel MFEM library.
// Requires an MPI compiler, and the libraries HYPRE and METIS.
// #define MFEM_USE_MPI
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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,6 +19,7 @@ if (NOT CMAKE_BUILD_TYPE)
endif()
# MFEM options. Set to mimic the default "defaults.mk" file.
option(BUILD_SHARED_LIBS "Enable shared library build of MFEM" OFF)
option(MFEM_USE_MPI "Enable MPI parallel build" OFF)
option(MFEM_USE_METIS "Enable METIS usage" ${MFEM_USE_MPI})
option(MFEM_USE_EXCEPTIONS "Enable the use of exceptions" OFF)
+2 -2
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
@@ -58,7 +58,7 @@ HIP_CXX = hipcc
# example: gfx600 (tahiti), gfx700 (kaveri), gfx701 (hawaii), gfx801 (carrizo),
# gfx900, gfx1010, etc.
HIP_ARCH = gfx900
HIP_FLAGS = --amdgpu-target=$(HIP_ARCH)
HIP_FLAGS = --offload-arch=$(HIP_ARCH)
HIP_XCOMPILER =
HIP_XLINKER = -Wl,
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
@@ -35,8 +35,8 @@ cd $(git rev-parse --show-toplevel)
# copyright check
copyright=true
if [[ "${option}" == "--copyright" || "${option}" == "" ]]; then
if git grep -l "^\(#\|//\).*\(\-2021\|\ 2010,\)" > matches.txt; then
echo "Please update the following files to Copyright (c) 2010-2022:"
if git grep -n "^\(#\|//\).*Copyright.*2010-20\(2[^3]\|[^2].\)" > matches.txt; then
echo "Please update the following files to Copyright (c) 2010-2023:"
cat matches.txt
copyright=false
fi
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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
@@ -38,7 +38,7 @@ PROJECT_NAME = "MFEM"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v4.5.1
PROJECT_NUMBER = v4.5.3
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
+375
View File
@@ -0,0 +1,375 @@
// MFEM Example 13 - Parallel, AMR Version
//
// Compile with: make ex13p_amr
//
// Sample runs: mpirun -np 4 ex13p_amr -m ../data/beam-tet.mesh
// mpirun -np 4 ex13p_amr -m ../data/beam-hex.mesh
// mpirun -np 4 ex13p_amr -m ../data/escher.mesh
// mpirun -np 4 ex13p_amr -m ../data/fichera.mesh -rs 2
// mpirun -np 4 ex13p_amr -m ../data/fichera-q2.vtk
// mpirun -np 4 ex13p_amr -m ../data/fichera-q3.mesh -rs 2
// mpirun -np 4 ex13p_amr -m ../data/beam-hex-nurbs.mesh
// mpirun -np 4 ex13p_amr -m ../data/amr-hex.mesh
//
// Description: This example code solves the Maxwell (electromagnetic)
// eigenvalue problem curl curl E = lambda E with homogeneous
// Dirichlet boundary conditions E x n = 0.
//
// We compute a number of the lowest nonzero eigenmodes
// by discretizing the curl curl operator using a
// Nedelec FE space of the specified order in 3D.
//
// The example highlights the use of the AME subspace
// eigenvalue solver from HYPRE, which uses LOBPCG and
// AMS internally, in the context of adaptive mesh
// refinement (AMR). Reusing a single GLVis
// visualization window for multiple eigenfunctions is
// also illustrated.
//
// We recommend viewing example 13 before viewing this
// example.
#include "mfem.hpp"
#include <fstream>
#include <iostream>
using namespace std;
using namespace mfem;
int main(int argc, char *argv[])
{
// 1. Initialize MPI.
int num_procs, myid;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &num_procs);
MPI_Comm_rank(MPI_COMM_WORLD, &myid);
// 2. Parse command-line options.
const char *mesh_file = "../data/beam-tet.mesh";
int ser_ref_levels = 1;
int par_ref_levels = 0;
int max_amr_levels = 5;
int order = 1;
int nev = 5;
bool visualization = 1;
double tol = 1.0e-3;
OptionsParser args(argc, argv);
args.AddOption(&mesh_file, "-m", "--mesh",
"Mesh file to use.");
args.AddOption(&ser_ref_levels, "-rs", "--refine-serial",
"Number of times to refine the mesh uniformly in serial.");
args.AddOption(&par_ref_levels, "-rp", "--refine-parallel",
"Number of times to refine the mesh uniformly in parallel.");
args.AddOption(&max_amr_levels, "-ra", "--refine-adaptively",
"Number of times to adaptively refine the mesh.");
args.AddOption(&order, "-o", "--order",
"Finite element order (polynomial degree) or -1 for"
" isoparametric space.");
args.AddOption(&nev, "-n", "--num-eigs",
"Number of desired eigenmodes.");
args.AddOption(&tol, "-t", "--tolerance",
"Desired eigenvalue tolerance.");
args.AddOption(&visualization, "-vis", "--visualization", "-no-vis",
"--no-visualization",
"Enable or disable GLVis visualization.");
args.Parse();
if (!args.Good())
{
if (myid == 0)
{
args.PrintUsage(cout);
}
MPI_Finalize();
return 1;
}
if (myid == 0)
{
args.PrintOptions(cout);
}
// 3. Read the (serial) mesh from the given mesh file on all processors. We
// can handle triangular, quadrilateral, tetrahedral, hexahedral, surface
// and volume meshes with the same code.
Mesh *mesh = new Mesh(mesh_file, 1, 1);
int dim = mesh->Dimension();
// 4. Refine the serial mesh on all processors to increase the resolution. In
// this example we do 'ref_levels' of uniform refinement (2 by default, or
// specified on the command line with -rs).
for (int lev = 0; lev < ser_ref_levels; lev++)
{
mesh->UniformRefinement();
}
if (mesh->NURBSext)
{
mesh->SetCurvature(2);
}
mesh->EnsureNCMesh();
// 5. Define a parallel mesh by a partitioning of the serial mesh. Refine
// this mesh further in parallel to increase the resolution (1 time by
// default, or specified on the command line with -rp). Once the parallel
// mesh is defined, the serial mesh can be deleted.
ParMesh *pmesh = new ParMesh(MPI_COMM_WORLD, *mesh);
delete mesh;
for (int lev = 0; lev < par_ref_levels; lev++)
{
pmesh->UniformRefinement();
}
// 6. Define a parallel finite element space on the parallel mesh. Here we
// use the Nedelec finite elements of the specified order.
FiniteElementCollection *fec = new ND_FECollection(order, dim);
ParFiniteElementSpace *fespace = new ParFiniteElementSpace(pmesh, fec);
HYPRE_Int size = fespace->GlobalTrueVSize();
if (myid == 0)
{
cout << "Number of unknowns: " << size << endl;
}
// 7. Set up the parallel bilinear forms a(.,.) and m(.,.) on the finite
// element space. The first corresponds to the curl curl, while the second
// is a simple mass matrix needed on the right hand side of the
// generalized eigenvalue problem below. The boundary conditions are
// implemented by marking all the boundary attributes from the mesh as
// essential. The corresponding degrees of freedom are eliminated with
// special values on the diagonal to shift the Dirichlet eigenvalues out
// of the computational range. After serial and parallel assembly we
// extract the corresponding parallel matrices A and M.
ConstantCoefficient one(1.0);
Array<int> ess_bdr;
if (pmesh->bdr_attributes.Size())
{
ess_bdr.SetSize(pmesh->bdr_attributes.Max());
ess_bdr = 1;
}
ParBilinearForm *a = new ParBilinearForm(fespace);
a->AddDomainIntegrator(new CurlCurlIntegrator(one));
if (pmesh->bdr_attributes.Size() == 0)
{
// Add a mass term if the mesh has no boundary, e.g. periodic mesh or
// closed surface.
a->AddDomainIntegrator(new VectorFEMassIntegrator(one));
}
a->Assemble();
ParBilinearForm *m = new ParBilinearForm(fespace);
m->AddDomainIntegrator(new VectorFEMassIntegrator(one));
ParGridFunction x(fespace);
// 8. Setup the AMR loop which will stop after a set number of
// iterations or when the computed eigenvalues change by less than
// some toleratonce.
HypreAMS *ams = NULL;
HypreAME *ame = NULL;
Array<double> eigenvalues;
Array<double> prev_eigenvalues(nev);
Vector eigenvalue_diff(nev);
prev_eigenvalues = 0.0;
double err = 2.0*tol;
int it = 0;
while ( err > tol && it < max_amr_levels )
{
// 8a. If this is not the first time through the loop, estimate
// the error in the eigenvectors and use this error to mark
// elements for refinement.
if ( it > 0 )
{
Vector errors(pmesh->GetNE());
Vector errors_i(pmesh->GetNE());
// Space for the discontinuous (original) flux
CurlCurlIntegrator flux_integrator(one);
RT_FECollection flux_fec(order-1, pmesh->SpaceDimension());
ParFiniteElementSpace flux_fes(pmesh, &flux_fec);
// Space for the smoothed (conforming) flux
ND_FECollection smooth_flux_fec(order, pmesh->Dimension());
ParFiniteElementSpace smooth_flux_fes(pmesh, &smooth_flux_fec);
double norm_p = 1;
errors = 0.0;
for (int i=0; i<nev; i++)
{
// convert eigenvector from HypreParVector to ParGridFunction
x = ame->GetEigenvector(i);
L2ZZErrorEstimator(flux_integrator, x,
smooth_flux_fes, flux_fes, errors_i, norm_p);
for (int j=0; j<errors.Size(); j++)
{
errors[j] += pow(errors_i[j], norm_p);
}
}
for (int j=0; j<errors.Size(); j++)
{
errors[j] = pow(errors[j], 1.0/norm_p);
}
double local_max_err = errors.Max();
double global_max_err;
MPI_Allreduce(&local_max_err, &global_max_err, 1,
MPI_DOUBLE, MPI_MAX, pmesh->GetComm());
// Refine the elements whose error is larger than a fraction of the
// maximum element error.
const double frac = 0.5;
double threshold = frac * global_max_err;
if ( myid == 0 )
{
cout << "AMR iteration " << it+1 << ", refining from "
<< pmesh->GetNE() << " elements" << flush;
}
pmesh->RefineByError(errors, threshold);
if ( myid == 0 )
{
cout << " to " << pmesh->GetNE() << "." << endl;
}
fespace->Update();
a->Update();
m->Update();
x.Update();
}
a->Assemble();
a->EliminateEssentialBCDiag(ess_bdr, 1.0);
a->Finalize();
m->Assemble();
// shift the eigenvalue corresponding to eliminated dofs to a large value
m->EliminateEssentialBCDiag(ess_bdr, numeric_limits<double>::min());
m->Finalize();
HypreParMatrix *A = a->ParallelAssemble();
HypreParMatrix *M = m->ParallelAssemble();
// 8b. Define and configure the AME eigensolver and the AMS
// preconditioner for A to be used within the solver. Set the
// matrices which define the generalized eigenproblem A x =
// lambda M x.
delete ams;
ams = new HypreAMS(*A,fespace);
ams->SetPrintLevel(0);
ams->SetSingularProblem();
delete ame;
ame = new HypreAME(MPI_COMM_WORLD);
ame->SetNumModes(nev);
ame->SetPreconditioner(*ams);
ame->SetMaxIter(100);
ame->SetTol(1e-2 * tol);
ame->SetPrintLevel(1);
ame->SetMassMatrix(*M);
ame->SetOperator(*A);
// 8c. Compute the eigenmodes and extract the array of
// eigenvalues. Define a parallel grid function to
// represent each of the eigenmodes returned by the solver.
ame->Solve();
ame->GetEigenvalues(eigenvalues);
delete M;
delete A;
double avg = 0.0;
for (int i=0; i<nev; i++)
{
eigenvalue_diff[i] = eigenvalues[i] - prev_eigenvalues[i];
avg += 0.25 * pow(eigenvalues[i] + prev_eigenvalues[i], 2.0);
}
avg = sqrt(avg);
err = eigenvalue_diff.Norml2();
if ( avg > tol ) { err /= avg * nev; }
it++;
}
delete a;
delete m;
// 9. Save the refined mesh and the modes in parallel. This output can be
// viewed later using GLVis: "glvis -np <np> -m mesh -g mode".
{
ostringstream mesh_name, mode_name;
mesh_name << "mesh." << setfill('0') << setw(6) << myid;
ofstream mesh_ofs(mesh_name.str().c_str());
mesh_ofs.precision(8);
pmesh->Print(mesh_ofs);
for (int i=0; i<nev; i++)
{
// convert eigenvector from HypreParVector to ParGridFunction
x = ame->GetEigenvector(i);
mode_name << "mode_" << setfill('0') << setw(2) << i << "."
<< setfill('0') << setw(6) << myid;
ofstream mode_ofs(mode_name.str().c_str());
mode_ofs.precision(8);
x.Save(mode_ofs);
mode_name.str("");
}
}
// 10. Send the solution by socket to a GLVis server.
if (visualization)
{
char vishost[] = "localhost";
int visport = 19916;
socketstream mode_sock(vishost, visport);
mode_sock.precision(8);
for (int i=0; i<nev; i++)
{
if ( myid == 0 )
{
cout << "Eigenmode " << i+1 << '/' << nev
<< ", Lambda = " << eigenvalues[i] << endl;
}
// convert eigenvector from HypreParVector to ParGridFunction
x = ame->GetEigenvector(i);
mode_sock << "parallel " << num_procs << " " << myid << "\n"
<< "solution\n" << *pmesh << x << flush
<< "window_title 'Eigenmode " << i+1 << '/' << nev
<< ", Lambda = " << eigenvalues[i] << "'" << endl;
char c;
if (myid == 0)
{
cout << "press (q)uit or (c)ontinue --> " << flush;
cin >> c;
}
MPI_Bcast(&c, 1, MPI_CHAR, 0, MPI_COMM_WORLD);
if (c != 'c')
{
break;
}
}
mode_sock.close();
}
// 11. Free the used memory.
delete ame;
delete ams;
delete fespace;
delete fec;
delete pmesh;
MPI_Finalize();
return 0;
}
+1 -1
View File
@@ -469,7 +469,7 @@ int main(int argc, char *argv[])
Operator *pc_r = nullptr;
Operator *pc_i = nullptr;
int s = (conv == ComplexOperator::HERMITIAN) ? -1.0 : 1.0;
double s = (conv == ComplexOperator::HERMITIAN) ? -1.0 : 1.0;
if (pa)
{
// Jacobi Smoother
+1 -1
View File
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
const char *mesh_file = "../data/star.mesh";
int order = 1;
int nc_limit = 1;
int max_elems = 1e5;
int max_elems = 100*1000;
double double_max_elems = double(max_elems);
bool visualization = true;
double osc_threshold = 1e-3;
+1 -1
View File
@@ -123,7 +123,7 @@ int main(int argc, char *argv[])
// 2. Compute the rational expansion coefficients that define the
// integer-order PDEs.
const int power_of_laplace = floor(alpha);
const int power_of_laplace = (int)floor(alpha);
double exponent_to_approximate = alpha - power_of_laplace;
bool integer_order = false;
// Check if alpha is an integer or not.
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
@@ -78,4 +78,4 @@ clean-build:
rm -rf *.dSYM *.TVD.*breakpoints
clean-exec:
@rm -f refined.mesh sol.gf mesh.* sol.*
@rm -f refined.mesh sol.gf
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
@@ -25,7 +25,7 @@ SEQ_EXAMPLES = ex0 ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 ex14 ex15 ex16 \
ex17 ex18 ex19 ex20 ex21 ex22 ex23 ex24 ex25 ex26 ex27 ex28 ex29 ex30 \
ex31 ex33
PAR_EXAMPLES = ex0p ex1p ex2p ex3p ex4p ex5p ex6p ex7p ex8p ex9p ex10p ex11p \
ex12p ex13p ex14p ex15p ex16p ex17p ex18p ex19p ex20p ex21p ex22p ex24p \
ex12p ex13p ex13p_amr ex14p ex15p ex16p ex17p ex18p ex19p ex20p ex21p ex22p ex24p \
ex25p ex26p ex27p ex28p ex29p ex30p ex31p ex32p ex33p
SEQ_DEVICE_EXAMPLES = ex1 ex3 ex4 ex5 ex6 ex9 ex22 ex24 ex25 ex26
PAR_DEVICE_EXAMPLES = ex1p ex2p ex3p ex4p ex5p ex6p ex7p ex9p ex13p ex22p \
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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-2022, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2023, 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.
#
@@ -160,4 +160,4 @@ clean-build:
clean-exec:
@rm -rf mesh.* sol.* sol_p.* sol_u.* Example5*
@rm -f ex9-mesh.* ex9-init.* ex9-final.* Example9*
@rm -f deformed.* velocity.* elastic_energy.*
@rm -f deformed.* velocity.* elastic_energy.* mode_*

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