Compare commits

..
Author SHA1 Message Date
blaz 23779e1ab9 ohuih 2024-07-26 08:04:20 -07:00
blaz 772df0ac8d fist solver for to 2023-03-31 22:13:18 -07:00
blaz beae687cdd MMA 2023-03-31 19:19:04 -07:00
blaz 2b09c63c37 Merge branch 'master' into marking 2023-03-31 16:12:54 -07:00
blaz 1b5dedc8f9 drived for shpe-gradients test 2023-03-31 15:27:27 -07: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
blaz 7996b3a776 stress gradients 2023-03-30 09:03:22 -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
blaz 96f6ca5665 shape grad 2023-03-16 23:27:03 -07:00
blaz 76fca89cfb integrators 2023-03-16 13:18:12 -07:00
blaz 3ea5570959 clean up the old files 2023-03-15 15:16:35 -07:00
blaz 5794e38af8 I do not know the changes :-) 2023-03-15 15:16:03 -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
blaz 0b5a765923 volp objective 2023-02-16 08:54:47 -08: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
blaz 4c4ddf3928 hape grad 2023-01-03 12:42:56 -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
blaz ba3fc58806 Merge branch 'master' into marking 2022-12-12 19:39:31 -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
blaz 5fd3861229 Added element marking 2022-09-29 12:41:54 -07: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
852 changed files with 12360 additions and 6351 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 -13
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
@@ -131,12 +132,6 @@ examples/hiop/ex9-mesh.*
examples/hiop/ex9-init.*
examples/hiop/ex9-final.*
examples/ipopt/exContactBlockTL
examples/ipopt/exContactBlockTL.mesh
examples/ipopt/exContactBlockTL-mesh.*
examples/ipopt/exContactBlockTL-init.*
examples/ipopt/exContactBlockTL-final.*
examples/petsc/ex[1-69]p
examples/petsc/ex1[0-1]p
examples/petsc/mesh.*
@@ -154,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.*
@@ -200,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
@@ -251,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.
+43 -19
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)
@@ -404,15 +425,6 @@ if (MFEM_USE_HIOP)
# find_package updates HIOP_FOUND, HIOP_INCLUDE_DIRS, HIOP_LIBRARIES
endif()
# IpOpt optimizer
if (MFEM_USE_IPOPT)
find_package(IPOPT REQUIRED)
message(
STATUS
"IPOPT_INCLUDE_DIRS=${IPOPT_INCLUDE_DIRS}, IPOPT_LIBRARIES=${IPOPT_LIBRARIES}, IPOPT_DIR=${IPOPT_DIR}")
# find_package updates IPOPT_FOUND, IPOPT_INCLUDE_DIRS, IPOPT_LIBRARIES
endif()
# CoDiPack package
if (MFEM_USE_CODIPACK)
find_package(CODIPACK REQUIRED)
@@ -508,7 +520,7 @@ find_package(Threads REQUIRED)
# be before SuiteSparse.
set(MFEM_TPLS OPENMP HYPRE LAPACK BLAS SuperLUDist STRUMPACK METIS SuiteSparse
SUNDIALS PETSC SLEPC MUMPS AXOM FMS CONDUIT Ginkgo GNUTLS GSLIB
NETCDF MPFR PUMI HIOP IPOPT POSIXCLOCKS MFEMBacktrace ZLIB OCCA CEED RAJA UMPIRE
NETCDF MPFR PUMI HIOP POSIXCLOCKS MFEMBacktrace ZLIB OCCA CEED RAJA UMPIRE
ADIOS2 CUBLAS CUSPARSE MKL_CPARDISO AMGX CALIPER CODIPACK BENCHMARK PARELAG
MPI_CXX HIP HIPSPARSE MOONOLITH BLITZ ALGOIM ENZYME)
@@ -528,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}")
@@ -583,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}")
@@ -595,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")
@@ -714,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}>)
@@ -766,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
View File
@@ -112,7 +112,6 @@ The MFEM source code has the following structure:
│ ├── caliper
│ ├── ginkgo
│ ├── hiop
│ ├── ipopt
│ ├── jupyter
│ ├── moonolith
│ ├── petsc
-10
View File
@@ -471,9 +471,6 @@ MFEM_USE_HIOP = YES/NO
Enable the usage of HiOp (https://github.com/LLNL/hiop) in MFEM. HiOp is an
HPC solver for nonlinear optimization problems.
MFEM_USE_IPOPT = YES/NO
Enable the usage of Ipopt in MFEM.
MFEM_USE_CODIPACK = YES/NO
Enable automatic differentiation using the CoDiPack library.
www.scicomp.uni-kl.de/codi/
@@ -741,11 +738,6 @@ The specific libraries and their options are:
Options: HIOP_OPT, HIOP_LIB.
Versions: HIOP >= 0.4.6.
- Ipopt (optional), used when MFEM_USE_IPOPT = YES.
URL: https://github.com/coin-or/Ipopt
Options: IPOPT_OPT, IPOPT_LIB.
Versions: IPOPT >= 3.14
- CoDiPack (optional), used with MFEM_USE_CODIPACK = YES
URL: https://www.scicomp.uni-kl.de/codi/
Options: CODIPACK_OPT
@@ -980,7 +972,6 @@ MFEM_USE_MPFR
MFEM_USE_ZLIB
MFEM_USE_PUMI
MFEM_USE_HIOP
MFEM_USE_IPOPT
MFEM_USE_CODIPACK
MFEM_USE_ADFORWARD
MFEM_USE_CUDA
@@ -1044,7 +1035,6 @@ The CMake build system adds auto-detection for the following packages/libraries:
- POSIXCLOCKS
- PUMI
- HIOP
- IPOPT
- CoDiPack
- OCCA
- RAJA
+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 -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.
#
@@ -36,7 +36,6 @@ set(MFEM_USE_STRUMPACK @MFEM_USE_STRUMPACK@)
set(MFEM_USE_GINKGO @MFEM_USE_GINKGO@)
set(MFEM_USE_AMGX @MFEM_USE_AMGX@)
set(MFEM_USE_HIOP @MFEM_USE_HIOP@)
set(MFEM_USE_IPOPT @MFEM_USE_IPOPT@)
set(MFEM_USE_GNUTLS @MFEM_USE_GNUTLS@)
set(MFEM_USE_GSLIB @MFEM_USE_GSLIB@)
set(MFEM_USE_NETCDF @MFEM_USE_NETCDF@)
+4 -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.
//
@@ -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
@@ -131,9 +134,6 @@
// Enable MFEM functionality based on the HiOp library
#cmakedefine MFEM_USE_HIOP
// Enable MFEM functionality based on the Ipopt library
#cmakedefine MFEM_USE_IPOPT
// Build the GPU/CUDA-enabled version of the MFEM library.
// Requires a CUDA compiler (nvcc).
#cmakedefine MFEM_USE_CUDA
+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.
#
-23
View File
@@ -1,23 +0,0 @@
# Copyright (c) 2010-2022, 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.
#
# This file is part of the MFEM library. For more information and source code
# availability visit https://mfem.org.
#
# MFEM is free software; you can redistribute it and/or modify it under the
# terms of the BSD-3 license. We welcome feedback and contributions, see file
# CONTRIBUTING.md for details.
# Sets the following variables:
# - IPOPT_FOUND
# - IPOPT_INCLUDE_DIRS
# - IPOPT_LIBRARIES
include(MfemCmakeUtilities)
mfem_find_package(IPOPT IPOPT IPOPT_DIR
"include" "IpTNLP.hpp"
"lib" "ipopt"
"Paths to headers required by IPOPT."
"Libraries required by IPOPT.")
+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.
#
+39 -60
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)
@@ -869,7 +848,7 @@ function(mfem_export_mk_files)
MFEM_USE_SUPERLU MFEM_USE_SUPERLU5 MFEM_USE_MUMPS MFEM_USE_STRUMPACK
MFEM_USE_GINKGO MFEM_USE_AMGX MFEM_USE_GNUTLS MFEM_USE_NETCDF
MFEM_USE_PETSC MFEM_USE_SLEPC MFEM_USE_MPFR MFEM_USE_SIDRE MFEM_USE_FMS
MFEM_USE_CONDUIT MFEM_USE_PUMI MFEM_USE_HIOP MFEM_USE_IPOPT MFEM_USE_GSLIB MFEM_USE_CUDA
MFEM_USE_CONDUIT MFEM_USE_PUMI MFEM_USE_HIOP MFEM_USE_GSLIB MFEM_USE_CUDA
MFEM_USE_HIP MFEM_USE_RAJA MFEM_USE_OCCA MFEM_USE_CEED MFEM_USE_CALIPER
MFEM_USE_UMPIRE MFEM_USE_SIMD MFEM_USE_ADIOS2 MFEM_USE_MKL_CPARDISO
MFEM_USE_ADFORWARD MFEM_USE_CODIPACK MFEM_USE_BENCHMARK MFEM_USE_PARELAG
@@ -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 -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.
//
@@ -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
@@ -141,9 +144,6 @@
// Enable MFEM functionality based on the HIOP library.
// #define MFEM_USE_HIOP
// Enable MFEM functionality based on the IPOPT library.
// #define MFEM_USE_IPOPT
// Enable MFEM functionality based on the GSLIB library
// #define MFEM_USE_GSLIB
+1 -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.
#
@@ -46,7 +46,6 @@ MFEM_USE_FMS = @MFEM_USE_FMS@
MFEM_USE_CONDUIT = @MFEM_USE_CONDUIT@
MFEM_USE_PUMI = @MFEM_USE_PUMI@
MFEM_USE_HIOP = @MFEM_USE_HIOP@
MFEM_USE_IPOPT = @MFEM_USE_IPOPT@
MFEM_USE_GSLIB = @MFEM_USE_GSLIB@
MFEM_USE_CUDA = @MFEM_USE_CUDA@
MFEM_USE_HIP = @MFEM_USE_HIP@
+2 -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.
#
@@ -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)
@@ -48,7 +49,6 @@ option(MFEM_USE_FMS "Enable FMS usage" OFF)
option(MFEM_USE_CONDUIT "Enable Conduit usage" OFF)
option(MFEM_USE_PUMI "Enable PUMI" OFF)
option(MFEM_USE_HIOP "Enable HiOp" OFF)
option(MFEM_USE_IPOPT "Enable Ipopt" OFF)
option(MFEM_USE_CUDA "Enable CUDA" OFF)
option(MFEM_USE_HIP "Enable HIP" OFF)
option(MFEM_USE_OCCA "Enable OCCA" OFF)
@@ -221,10 +221,6 @@ set(HIOP_DIR "${MFEM_DIR}/../hiop/install" CACHE STRING
"Directory where HiOp is installed")
set(HIOP_REQUIRED_PACKAGES "BLAS" "LAPACK" CACHE STRING
"Packages that HiOp depends on.")
set(IPOPT_DIR "${MFEM_DIR}/../ipopt/install" CACHE STRING
"Directory where IpOpt is installed")
set(IPOPT_REQUIRED_PACKAGES "BLAS" "LAPACK" CACHE STRING
"Packages that IpOpt depends on.")
set(MKL_CPARDISO_DIR "" CACHE STRING "MKL installation path.")
set(MKL_MPI_WRAPPER_LIB "mkl_blacs_mpich_lp64" CACHE STRING "MKL MPI wrapper library")
+2 -8
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,
@@ -148,7 +148,6 @@ MFEM_USE_FMS = NO
MFEM_USE_CONDUIT = NO
MFEM_USE_PUMI = NO
MFEM_USE_HIOP = NO
MFEM_USE_IPOPT = NO
MFEM_USE_GSLIB = NO
MFEM_USE_CUDA = NO
MFEM_USE_HIP = NO
@@ -448,11 +447,6 @@ HIOP_DIR = @MFEM_DIR@/../hiop/install
HIOP_OPT = -I$(HIOP_DIR)/include
HIOP_LIB = -L$(HIOP_DIR)/lib -lhiop $(LAPACK_LIB)
# IPOPT
IPOPT_DIR = @MFEM_DIR@/../ipopt/install
IPOPT_OPT = -I$(IPOPT_DIR)/include
IPOPT_LIB = -L$(IPOPT_DIR)/lib -lipopt $(LAPACK_LIB)
# CoDiPack
CODIPACK_DIR = @MFEM_DIR@/../CoDiPack
CODIPACK_OPT = -I$(CODIPACK_DIR)
+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 -9
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.
#
@@ -58,10 +58,6 @@ groups_serial=(
"HiOp examples:"
"examples/hiop"
"ex9.cpp"'
'"ipopt"
"IpOpt examples:"
"examples/ipopt"
"ex10.cpp"'
'"pumi"
"PUMI examples:"
"examples/pumi"
@@ -219,10 +215,6 @@ groups_all=(
"HiOp examples:"
"examples/hiop"
"ex9.cpp ex9p.cpp"'
'"ipopt"
"IpOpt examples:"
"examples/ipopt"
"ex10.cpp"'
'"pumi"
"PUMI examples:"
"examples/pumi"
+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 -2
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
@@ -785,7 +785,6 @@ INPUT = @MFEM_SOURCE_DIR@/doc/CodeDocumentation.dox \
@MFEM_SOURCE_DIR@/examples/caliper \
@MFEM_SOURCE_DIR@/examples/ginkgo \
@MFEM_SOURCE_DIR@/examples/hiop \
@MFEM_SOURCE_DIR@/examples/ipopt \
@MFEM_SOURCE_DIR@/examples/moonolith \
@MFEM_SOURCE_DIR@/examples/petsc \
@MFEM_SOURCE_DIR@/examples/pumi \
+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 -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.
#
@@ -178,11 +178,6 @@ if (MFEM_USE_HIOP)
add_subdirectory(hiop)
endif()
# Include the examples/ipopt directory if IpOpt is enabled
if (MFEM_USE_IPOPT)
add_subdirectory(ipopt)
endif()
# Include the examples/petsc directory if PETSc is enabled.
if (MFEM_USE_PETSC)
add_subdirectory(petsc)
+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.
#
-810
View File
@@ -1,810 +0,0 @@
// Contact example
//
// Compile with: make contact
//
// Sample runs: ./contact -m1 block1.mesh -m2 block2.mesh -at "5 6 7 8"
// Sample runs: ./contact -m1 block1_d.mesh -m2 block2_d.mesh -at "5 6 7 8"
#include "mfem.hpp"
#include <fstream>
#include <iostream>
#include "nodepair.hpp"
using namespace std;
using namespace mfem;
bool ifequalarray(const Array<int> a1, const Array<int> a2)
{
if (a1.Size()!=a2.Size())
{
return false;
}
for (int i=0; i<a1.Size(); i++)
{
if (a1[i] != a2[i])
{
return false;
}
}
return true;
}
void FindSurfaceToProject(Mesh& mesh, const int elem, int& cbdrface)
{
Array<int> attr;
attr.Append(2);
Array<int> faces;
Array<int> ori;
std::vector<Array<int> > facesVertices;
std::vector<int > faceid;
mesh.GetElementFaces(elem, faces, ori);
int face = -1;
for (int i=0; i<faces.Size(); i++)
{
face = faces[i];
Array<int> faceVert;
if (!mesh.FaceIsInterior(face)) // if on the boundary
{
mesh.GetFaceVertices(face, faceVert);
faceVert.Sort();
facesVertices.push_back(faceVert);
faceid.push_back(face);
}
}
int bdrface = facesVertices.size();
Array<int> bdryFaces;
// This shoulnd't need to be rebuilt
std::vector<Array<int> > bdryVerts;
for (int b=0; b<mesh.GetNBE(); ++b)
{
if (attr.FindSorted(mesh.GetBdrAttribute(b)) >= 0) // found the contact surface
{
bdryFaces.Append(b);
Array<int> vert;
mesh.GetBdrElementVertices(b, vert);
vert.Sort();
bdryVerts.push_back(vert);
}
}
int bdrvert = bdryVerts.size();
cbdrface = -1; // the face number of the contact surface element
int count_cbdrface = 0; // the number of matching surfaces, used for checks
for (int i=0; i<bdrface; i++)
{
for (int j=0; j<bdrvert; j++)
{
if (ifequalarray(facesVertices[i], bdryVerts[j]))
{
cbdrface = faceid[i];
count_cbdrface += 1;
}
}
}
MFEM_VERIFY(count_cbdrface == 1,"projection surface not found");
};
Vector GetNormalVector(Mesh & mesh, const int elem, const double *ref,
int & refFace, int & refNormal, bool & interior)
{
ElementTransformation *trans = mesh.GetElementTransformation(elem);
const int dim = mesh.Dimension();
const int spaceDim = trans->GetSpaceDim();
MFEM_VERIFY(spaceDim == 3, "");
Vector n(spaceDim);
IntegrationPoint ip;
ip.Set(ref, dim);
trans->SetIntPoint(&ip);
//CalcOrtho(trans->Jacobian(), n); // Works only for face transformations
const DenseMatrix jac = trans->Jacobian();
int dimNormal = -1;
int normalSide = -1;
const double tol = 1.0e-8;
for (int i=0; i<dim; ++i)
{
const double d0 = std::abs(ref[i]);
const double d1 = std::abs(ref[i] - 1.0);
const double d = std::min(d0, d1);
// TODO: this works only for hexahedral meshes!
if (d < tol)
{
MFEM_VERIFY(dimNormal == -1, "");
dimNormal = i;
if (d0 < tol)
{
normalSide = 0;
}
else
{
normalSide = 1;
}
}
}
// closest point on the boundary
if (dimNormal < 0 || normalSide < 0) // node is inside the element
{
interior = 1;
Vector n(3);
n = 0.0;
return n;
}
MFEM_VERIFY(dimNormal >= 0 && normalSide >= 0, "");
refNormal = dimNormal;
MFEM_VERIFY(dim == 3, "");
{
// Find the reference face
if (dimNormal == 0)
{
refFace = (normalSide == 1) ? 2 : 4;
}
else if (dimNormal == 1)
{
refFace = (normalSide == 1) ? 3 : 1;
}
else
{
refFace = (normalSide == 1) ? 5 : 0;
}
}
std::vector<Vector> tang(2);
int tangDir[2] = {-1, -1};
{
int t = 0;
for (int i=0; i<dim; ++i)
{
if (i != dimNormal)
{
tangDir[t] = i;
t++;
}
}
MFEM_VERIFY(t == 2, "");
}
for (int i=0; i<2; ++i)
{
tang[i].SetSize(3);
Vector tangRef(3);
tangRef = 0.0;
tangRef[tangDir[i]] = 1.0;
jac.Mult(tangRef, tang[i]);
}
Vector c(3); // Cross product
c[0] = (tang[0][1] * tang[1][2]) - (tang[0][2] * tang[1][1]);
c[1] = (tang[0][2] * tang[1][0]) - (tang[0][0] * tang[1][2]);
c[2] = (tang[0][0] * tang[1][1]) - (tang[0][1] * tang[1][0]);
c /= c.Norml2();
Vector nref(3);
nref = 0.0;
nref[dimNormal] = 1.0;
Vector ndir(3);
jac.Mult(nref, ndir);
ndir /= ndir.Norml2();
const double dp = ndir * c;
// TODO: eliminate c?
n = c;
if (dp < 0.0)
{
n *= -1.0;
}
interior = 0;
return n;
}
// WARNING: global variable, just for this little example.
std::array<std::array<int, 3>, 8> HEX_VERT =
{
{ {0,0,0},
{1,0,0},
{1,1,0},
{0,1,0},
{0,0,1},
{1,0,1},
{1,1,1},
{0,1,1}
}
};
int GetHexVertex(int cdim, int c, int fa, int fb, Vector & refCrd)
{
int ref[3];
ref[cdim] = c;
ref[cdim == 0 ? 1 : 0] = fa;
ref[cdim == 2 ? 1 : 2] = fb;
for (int i=0; i<3; ++i) { refCrd[i] = ref[i]; }
int refv = -1;
for (int i=0; i<8; ++i)
{
bool match = true;
for (int j=0; j<3; ++j)
{
if (ref[j] != HEX_VERT[i][j]) { match = false; }
}
if (match) { refv = i; }
}
MFEM_VERIFY(refv >= 0, "");
return refv;
}
// Coordinates in xyz are assumed to be ordered as [X, Y, Z]
// where X is the list of x-coordinates for all points and so on.
// conn: connectivity of the target surface elements
// xi: surface reference cooridnates for the cloest point, involves a linear transformation from [0,1] to [-1,1]
void FindPointsInMesh(Mesh & mesh, Vector const& xyz, Array<int>& conn,
Vector& xi)
{
const int dim = mesh.Dimension();
const int np = xyz.Size() / dim;
MFEM_VERIFY(np * dim == xyz.Size(), "");
mesh.EnsureNodes();
//FindPointsGSLIB finder(MPI_COMM_WORLD);
FindPointsGSLIB finder;
finder.SetDistanceToleranceForPointsFoundOnBoundary(0.5);
const double bb_t = 0.5;
finder.Setup(mesh, bb_t);
finder.FindPoints(xyz);
/// Return code for each point searched by FindPoints: inside element (0), on
/// element boundary (1), or not found (2).
Array<unsigned int> codes = finder.GetCode();
/// Return element number for each point found by FindPoints.
Array<unsigned int> elems = finder.GetElem();
/// Return reference coordinates for each point found by FindPoints.
Vector refcrd = finder.GetReferencePosition();
/// Return distance between the sought and the found point in physical space,
/// for each point found by FindPoints.
Vector dist = finder.GetDist();
MFEM_VERIFY(dist.Size() == np, "");
MFEM_VERIFY(refcrd.Size() == np * dim, "");
MFEM_VERIFY(elems.Size() == np, "");
MFEM_VERIFY(codes.Size() == np, "");
bool allfound = true;
for (auto code : codes)
if (code == 2) { allfound = false; }
MFEM_VERIFY(allfound, "A point was not found");
cout << "Maximum distance of projected points: " << dist.Max() << endl;
// extract information
for (int i=0; i<np; ++i)
{
/*cout << "Point " << i << ": (";
for (int j=0; j<dim; ++j)
{
cout << xyz[i + (j*np)];
if (j == dim-1) {cout << ")" << endl;}
else{cout << ", ";}
}*/
//cout << " element: " << elems[i] << endl;
//cout << " element " << elems[i] << " vertices:" << endl;
//Array<int> vert;
//mesh.GetElementVertices(elems[i], vert);
//for (auto v : vert)
//{
// cout << " " << v << endl;
//}
/*cout << " reference coordinates: (";
for (int j=0; j<dim; ++j)
{
cout << refcrd[(i*dim) + j];
if (j == dim-1)
{
cout << ")" << endl;
}
else
{
cout << ", ";
}
}*/
int refFace, refNormal, refNormalSide;
bool is_interior = -1;
Vector normal = GetNormalVector(mesh, elems[i], refcrd.GetData() + (i*dim),
refFace, refNormal, is_interior);
int phyFace;
if (is_interior)
{
phyFace = -1; // the id of the face that has the closest point
FindSurfaceToProject(mesh, elems[i], phyFace);
Array<int> cbdrVert;
mesh.GetFaceVertices(phyFace, cbdrVert);
Vector xs(dim);
xs[0] = xyz[i + 0*np];
xs[1] = xyz[i + 1*np];
xs[2] = xyz[i + 2*np];
Vector xi_tmp(dim-1);
// get nodes!
GridFunction *nodes = mesh.GetNodes();
DenseMatrix coords(4,3);
for (int i=0; i<4; i++)
{
for (int j=0; j<3; j++)
{
coords(i,j) = (*nodes)[cbdrVert[i]*3+j];
}
}
SlaveToMaster(coords, xs, xi_tmp);
for (int j=0; j<dim-1; ++j)
{
xi[i*(dim-1)+j] = xi_tmp[j];
}
// now get get the projection to the surface
}
else
{
Vector faceRefCrd(dim-1);
{
int fd = 0;
for (int j=0; j<dim; ++j)
{
if (j == refNormal)
{
refNormalSide = (refcrd[(i*dim) + j] > 0.5);
}
else
{
faceRefCrd[fd] = refcrd[(i*dim) + j];
fd++;
}
}
MFEM_VERIFY(fd == dim-1, "");
}
for (int j=0; j<dim-1; ++j)
{
xi[i*(dim-1)+j] = faceRefCrd[j]*2.0 - 1.0;
}
//cout << " face reference coordinates: (";
/*for (int j=0; j<dim-1; ++j)
{
cout << faceRefCrd[j];
if (j == dim-2){cout << ")" << endl;}
else{cout << ", ";}
}*/
}
//cout << " normal vector: ";
//normal.Print();
// ask, does this do anything?
/*
IntegrationPoint ip;
ip.Set(refcrd.GetData() + (i*dim), dim);
ElementTransformation *trans = mesh.GetElementTransformation(elems[i]);
Vector phys(trans->GetSpaceDim());
trans->Transform(ip, phys);
cout << " physical coordinates: ";
phys.Print();
*/
// Get the element face
Array<int> faces;
Array<int> ori;
int face;
if (is_interior)
{
face = phyFace;
}
else
{
mesh.GetElementFaces(elems[i], faces, ori);
face = faces[refFace];
}
Array<int> faceVert;
mesh.GetFaceVertices(face, faceVert);
//cout << " face " << face << " vertices:" << endl;
//for (auto v : faceVert){ cout << " " << v << endl;}
for (int p=0; p<4; p++)
{
conn[4*i+p] = faceVert[p];
}
/*
Vector ref(dim);
for (int p=0; p<2; ++p)
for (int q=0; q<2; ++q)
{
const int refv = GetHexVertex(refNormal, refNormalSide, p, q, ref);
cout << " face reference vertex (" << p << "," << q
<< ") is global vertex " << vert[refv] << endl;
{
// Sanity check
ip.Set(ref.GetData(), dim);
trans->Transform(ip, phys);
for (int j=0; j<dim; ++j)
{
phys[j] -= mesh.GetVertex(vert[refv])[j];
}
phys.Print();
cout<<vert[refv]<<endl;
cout<<mesh.GetVertex(vert[refv])[0]<<endl;
cout<<mesh.GetVertex(vert[refv])[1]<<endl;
cout<<mesh.GetVertex(vert[refv])[2]<<endl;
MFEM_VERIFY(phys.Norml2() < 1.0e-12, "Sanity check failed");
}
}*/
}
}
int main(int argc, char *argv[])
{
// 1. Parse command-line options.
const char *mesh_file1 = "block1.mesh";
const char *mesh_file2 = "block2.mesh";
Array<int> attr;
Array<int> m_attr;
OptionsParser args(argc, argv);
args.AddOption(&mesh_file1, "-m1", "--mesh1",
"First mesh file to use.");
args.AddOption(&mesh_file2, "-m2", "--mesh2",
"Second mesh file to use.");
args.AddOption(&attr, "-at", "--attributes-surf",
"Attributes of boundary faces on contact surface for mesh 2.");
args.Parse();
if (!args.Good())
{
args.PrintUsage(cout);
return 1;
}
args.PrintOptions(cout);
Mesh mesh1(mesh_file1, 1, 1);
Mesh mesh2(mesh_file2, 1, 1);
{
char vishost[] = "localhost";
int visport = 19916;
socketstream mesh1a_sock(vishost, visport);
mesh1a_sock.precision(8);
mesh1a_sock << "mesh\n" << mesh1 << flush;
socketstream mesh2a_sock(vishost, visport);
mesh2a_sock.precision(8);
mesh2a_sock << "mesh\n" << mesh2 << flush;
}
const int dim = mesh1.Dimension();
MFEM_VERIFY(dim == mesh2.Dimension(), "");
// boundary attribute 2 is the potential contact surface of nodes
attr.Append(2);
// boundary attribute 2 is the potential contact surface for master surface
m_attr.Append(2);
// Define a finite element space on the mesh. Here we use vector finite
// elements, i.e. dim copies of a scalar finite element space. The vector
// dimension is specified by the last argument of the FiniteElementSpace
// constructor.
FiniteElementCollection *fec1;
FiniteElementSpace *fespace1;
fec1 = new H1_FECollection(1, dim);
fespace1 = new FiniteElementSpace(&mesh1, fec1, dim, Ordering::byVDIM);
cout << "Number of finite element unknowns for mesh1: "
<< fespace1->GetTrueVSize() << endl;
mesh1.SetNodalFESpace(fespace1);
GridFunction nodes0 = *mesh1.GetNodes(); // undeformed mesh1 nodal grid function
GridFunction *nodes1 = mesh1.GetNodes();
FiniteElementCollection *fec2 = new H1_FECollection(1, dim);
FiniteElementSpace *fespace2 = new FiniteElementSpace(&mesh2, fec2, dim,
Ordering::byVDIM);
cout << "Number of finite element unknowns for mesh2: "
<< fespace2->GetTrueVSize() << endl;
// degrees of freedom of both meshes
int ndof_1 = fespace1->GetTrueVSize();
int ndof_2 = fespace2->GetTrueVSize();
int ndofs = ndof_1 + ndof_2;
// number of nodes for each mesh
int nnd_1 = mesh1.GetNV();
int nnd_2 = mesh2.GetNV();
int nnd = nnd_1 + nnd_2;
// Determine the list of true (i.e. conforming) essential boundary dofs.
// In this example, the boundary conditions are defined by marking only
// boundary attribute 1 from the mesh as essential and converting it to a
// list of true dofs.
Array<int> ess_tdof_list1, ess_bdr1(mesh1.bdr_attributes.Max());
ess_bdr1 = 0;
//ess_bdr1[0] = 1;
// Not ready to be passed on yet
// fespace->GetEssentialTrueDofs(ess_bdr, ess_tdof_list);
Array<int> ess_tdof_list2, ess_bdr2(mesh2.bdr_attributes.Max());
ess_bdr2 = 0;
//ess_bdr2[0] = 1;
// Define the displacement vector x as a finite element grid function
// corresponding to fespace. GridFunction is a derived class of Vector.
GridFunction x1(fespace1);
x1 = 0.0;
GridFunction x2(fespace2);
x2 = 0.0;
// Generate force
LinearForm *b1 = new LinearForm(fespace1);
b1->Assemble();
LinearForm *b2 = new LinearForm(fespace2);
b2->Assemble();
// Set up the bilinear form a(.,.) on the finite element space
// corresponding to the linear elasticity integrator with piece-wise
// constants coefficient lambda and mu.
Vector lambda1(mesh1.attributes.Max());
lambda1 = 57.6923076923;
PWConstCoefficient lambda1_func(lambda1);
Vector mu1(mesh1.attributes.Max());
mu1 = 38.4615384615;
PWConstCoefficient mu1_func(mu1);
BilinearForm *a1 = new BilinearForm(fespace1);
a1->AddDomainIntegrator(new ElasticityIntegrator(lambda1_func,mu1_func));
Vector lambda2(mesh2.attributes.Max());
lambda2 = 57.6923076923;
PWConstCoefficient lambda2_func(lambda2);
Vector mu2(mesh2.attributes.Max());
mu2 = 38.4615384615;
PWConstCoefficient mu2_func(mu2);
BilinearForm *a2 = new BilinearForm(fespace2);
a2->AddDomainIntegrator(new ElasticityIntegrator(lambda2_func,mu2_func));
a1->Assemble();
SparseMatrix A1;
Vector B1, X1;
a1->FormLinearSystem(ess_tdof_list1, x1, *b1, A1, X1, B1);
a2->Assemble();
SparseMatrix A2;
Vector B2, X2;
a2->FormLinearSystem(ess_tdof_list2, x2, *b2, A2, X2, B2);
// Combine elasticity operator for two meshes into one.
// Block Matrix
SparseMatrix K(ndofs,ndofs);
for (int i=0; i<A1.Height(); i++)
{
Array<int> col_tmp;
Vector v_tmp;
col_tmp = 0;
v_tmp = 0.0;
A1.GetRow(i, col_tmp, v_tmp);
K.SetRow(i, col_tmp, v_tmp);
}
for (int i=0; i<A2.Height(); i++)
{
Array<int> col_tmp;
Vector v_tmp;
col_tmp = 0;
v_tmp = 0.0;
A2.GetRow(i, col_tmp, v_tmp);
for (int j=0; j<col_tmp.Size(); j++)
{
col_tmp[j] += ndof_1;
}
K.SetRow(i+ndof_1, col_tmp, v_tmp); // mesh1 top left corner
}
// Construct node to segment contact constraint.
attr.Sort();
cout << "Boundary attributes for contact surface faces in mesh 2" << endl;
for (auto a : attr) { cout << a << endl; }
Array<int> bdryFaces2; // TODO: remove this?
std::set<int> bdryVerts2;
for (int b=0; b<mesh2.GetNBE(); ++b)
{
if (attr.FindSorted(mesh2.GetBdrAttribute(b)) >= 0)
{
bdryFaces2.Append(b);
Array<int> vert;
mesh2.GetBdrElementVertices(b, vert);
for (auto v : vert)
{
bdryVerts2.insert(v);
}
}
}
int npoints = bdryVerts2.size();
Array<int> s_conn(npoints); // connectivity of the second/slave mesh
Vector xyz(dim * npoints);
xyz = 0.0;
cout << "Boundary vertices for contact surface vertices in mesh 2" << endl;
// construct the nodal coordinates on mesh2 to be projected, including displacement
int count = 0;
for (auto v : bdryVerts2)
{
cout << v << ": " << mesh2.GetVertex(v)[0] << ", "
<< mesh2.GetVertex(v)[1] << ", "
<< mesh2.GetVertex(v)[2] << endl;
for (int i=0; i<dim; ++i)
{
xyz[count + (i * npoints)] = mesh2.GetVertex(v)[i] + x2[v*dim+i];
}
s_conn[count] = v + nnd_1; // dof1 is the master
count++;
}
MFEM_VERIFY(count == npoints, "");
// gap function
Vector g(npoints*dim);
g = -1.0;
// segment reference coordinates of the closest point
Vector m_xi(npoints*(dim-1));
m_xi = -1.0;
Vector xs(dim*npoints);
xs = 0.0;
for (int i=0; i<npoints; i++)
{
for (int j=0; j<dim; j++)
{
xs[i*dim+j] = xyz[i + (j*npoints)];
}
}
Array<int> m_conn(
npoints*4); // only works for linear elements that have 4 vertices!
DenseMatrix coordsm(npoints*4, dim);
// adding displacement to mesh1 using a fixed grid function from mesh1
x1 = 1e-4; // x1 order: [xyz xyz... xyz]
add(nodes0, x1, *nodes1);
FindPointsInMesh(mesh1, xyz, m_conn, m_xi);
for (int i=0; i<npoints; i++)
{
for (int j=0; j<4; j++)
{
for (int k=0; k<dim; k++)
{
coordsm(i*4+j,k) = mesh1.GetVertex(m_conn[i*4+j])[k]+x1[dim*m_conn[i*4+j]+k];
}
}
}
//coordsm.Print();
SparseMatrix M(nnd,ndofs);
std::vector<SparseMatrix> dM(nnd, SparseMatrix(ndofs,ndofs));
Assemble_Contact(nnd, npoints, ndofs, xs, m_xi, coordsm,
s_conn, m_conn, g, M, dM);
std::set<int> dirbdryv2;
for (int b=0; b<mesh2.GetNBE(); ++b)
{
if (mesh2.GetBdrAttribute(b) == 1)
{
Array<int> vert;
mesh2.GetBdrElementVertices(b, vert);
for (auto v : vert)
{
dirbdryv2.insert(v);
}
}
}
std::set<int> dirbdryv1;
for (int b=0; b<mesh1.GetNBE(); ++b)
{
if (mesh1.GetBdrAttribute(b) == 1)
{
Array<int> vert;
mesh1.GetBdrElementVertices(b, vert);
for (auto v : vert)
{
dirbdryv1.insert(v);
}
}
}
Array<int> Dirichlet_dof;
Array<double> Dirichlet_val;
for (auto v : dirbdryv2)
{
for (int i=0; i<dim; ++i)
{
Dirichlet_dof.Append(v*dim + i + ndof_1);
Dirichlet_val.Append(0.);
}
}
double delta = 0.1;
for (auto v : dirbdryv1)
{
Dirichlet_dof.Append(v*dim + 0);
Dirichlet_val.Append(delta);
Dirichlet_dof.Append(v*dim + 1);
Dirichlet_val.Append(0.);
Dirichlet_dof.Append(v*dim + 2);
Dirichlet_val.Append(0.);
}
{
char vishost[] = "localhost";
int visport = 19916;
socketstream mesh1_sock(vishost, visport);
mesh1_sock.precision(8);
mesh1_sock << "mesh\n" << mesh1 << flush;
socketstream mesh2_sock(vishost, visport);
mesh2_sock.precision(8);
mesh2_sock << "mesh\n" << mesh2 << flush;
}
//M.Print();
/*Vector eps(ndofs);
Vector sol(ndofs); sol = 0.;
for(int i=0;i<ndofs;i++) eps[i] = 1e-5 * i ;
for(int i=0;i<9;i++)
{
cout<<i<<endl;
dM[s_conn[i]].Mult(eps,sol);
sol.Print();
}
*/
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.
#
-60
View File
@@ -1,60 +0,0 @@
# Copyright (c) 2010-2022, 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.
#
# This file is part of the MFEM library. For more information and source code
# availability visit https://mfem.org.
#
# MFEM is free software; you can redistribute it and/or modify it under the
# terms of the BSD-3 license. We welcome feedback and contributions, see file
# CONTRIBUTING.md for details.
set(IPOPT_EXAMPLES_SRCS)
list(APPEND IPOPT_EXAMPLES_SRCS exContactBlockTL.cpp)
# Include the source directory where mfem.hpp and mfem-performance.hpp are.
include_directories(BEFORE ${PROJECT_BINARY_DIR})
# Add "test_ipopt" target, see below.
add_custom_target(test_ipopt
${CMAKE_CTEST_COMMAND} -R ipopt USES_TERMINAL)
# Add one executable per cpp file, adding "ipopt_" as prefix. Sets
# "test_ipopt" as a target that depends on the given examples.
set(PFX ipopt_)
add_mfem_examples(IPOPT_EXAMPLES_SRCS ${PFX} "" test_ipopt)
# Testing.
# The IPOPT tests can be run separately using the target "test_ipopt"
# which builds the examples and runs:
# ctest -R ipopt
if (MFEM_ENABLE_TESTING)
# Command line options for the tests.
# Example 9:
set(EXCONTACTBTL_COMMON_OPTS -m ../../data/periodic-segment.mesh -p 0 -dt 0.005)
set(EXCONTACTBTL_TEST_OPTS ${EXCONTACTBTL_COMMON_OPTS} -r 2 )
# Add the tests: one test per source file.
foreach(SRC_FILE ${IPOPT_EXAMPLES_SRCS})
get_filename_component(SRC_FILENAME ${SRC_FILE} NAME)
string(REPLACE ".cpp" "" TEST_NAME ${SRC_FILENAME})
string(TOUPPER ${TEST_NAME} UP_TEST_NAME)
set(TEST_NAME ${PFX}${TEST_NAME})
set(THIS_TEST_OPTIONS "-no-vis")
list(APPEND THIS_TEST_OPTIONS ${${UP_TEST_NAME}_TEST_OPTS})
# message(STATUS "Test ${TEST_NAME} options: ${THIS_TEST_OPTIONS}")
if (NOT (${TEST_NAME} MATCHES ".*p$"))
add_test(NAME ${TEST_NAME}_ser
COMMAND ${TEST_NAME} ${THIS_TEST_OPTIONS})
else()
add_test(NAME ${TEST_NAME}_np=4
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4
${MPIEXEC_PREFLAGS}
$<TARGET_FILE:${TEST_NAME}> ${THIS_TEST_OPTIONS}
${MPIEXEC_POSTFLAGS})
endif()
endforeach()
endif()
-19
View File
@@ -1,19 +0,0 @@
Finite Element Discretization Library
__
_ __ ___ / _| ___ _ __ ___
| '_ ` _ \ | |_ / _ \| '_ ` _ \
| | | | | || _|| __/| | | | | |
|_| |_| |_||_| \___||_| |_| |_|
https://mfem.org
This directory contains modifications of the example codes that illustrate the
use of MFEM for solving nonlinear constrained optimization problems, including
features based on the IpOpt, a lightweight HPC solver for nonlinear optimization
problems.
To use the Ipopt features, make sure that MFEM is configured with the option
"MFEM_USE_IPOPT = YES", see the top-level INSTALL file for details.
We recommend comparing the original example codes with the corresponding files
in the current directory.

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