diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml
index ff35588f45..3584d48332 100644
--- a/.github/workflows/build-container.yml
+++ b/.github/workflows/build-container.yml
@@ -43,7 +43,7 @@ jobs:
remove-docker-images: 'true'
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
# It's easier to reference named variables than indexes of the matrix
- name: Set Environment
diff --git a/.github/workflows/builds-and-tests.yml b/.github/workflows/builds-and-tests.yml
index a4e3d49690..0091c8d7e8 100644
--- a/.github/workflows/builds-and-tests.yml
+++ b/.github/workflows/builds-and-tests.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -104,7 +104,7 @@ jobs:
# This external action allows to interrupt a workflow already running on
# the same branch to save resources.
- name: Cancel Previous Runs
- uses: styfle/cancel-workflow-action@0.11.0
+ uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
@@ -120,7 +120,7 @@ jobs:
# /home/runner/work/mfem/mfem/mfem
# Note: Done now to access "install-hypre" and "install-metis" actions.
- name: checkout mfem
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: ${{ env.MFEM_TOP_DIR }}
# Fetch the complete history for codecov to access commits ID
@@ -166,7 +166,7 @@ jobs:
- name: cache hypre
id: hypre-cache
if: matrix.mpi == 'par'
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ${{ env.HYPRE_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.HYPRE_TOP_DIR }}-${{ matrix.hypre-target }}-v2.2
@@ -194,7 +194,7 @@ jobs:
- name: cache metis
id: metis-cache
if: matrix.mpi == 'par' && matrix.os != 'windows-latest'
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ${{ env.METIS_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.METIS_TOP_DIR }}-v2.2
@@ -209,7 +209,7 @@ jobs:
- name: cache vcpkg (Windows)
id: vcpkg-cache
if: matrix.os == 'windows-latest'
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: vcpkg_cache
key: ${{ runner.os }}-${{ matrix.mpi }}-vcpkg-v1
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index edf71c2ff3..8e3cdb8a4e 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -36,7 +36,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.github/workflows/mfem-analysis.yml b/.github/workflows/mfem-analysis.yml
index 94a597fcaa..bd99ec49df 100644
--- a/.github/workflows/mfem-analysis.yml
+++ b/.github/workflows/mfem-analysis.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence 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,12 +35,12 @@ jobs:
steps:
- name: Cancel Previous Runs
- uses: styfle/cancel-workflow-action@0.11.0
+ uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: checkout MFEM
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: mfem
@@ -50,7 +50,7 @@ jobs:
- name: Cache Hypre Install
id: hypre-cache
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ${{ env.HYPRE_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.HYPRE_TOP_DIR }}-v2.2
@@ -65,7 +65,7 @@ jobs:
- name: Cache Metis Install
id: metis-cache
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ${{ env.METIS_TOP_DIR }}
key: ${{ runner.os }}-build-${{ env.METIS_TOP_DIR }}-v2.2
diff --git a/.github/workflows/mfem-sanitizer.yml b/.github/workflows/mfem-sanitizer.yml
index 7370843703..d6bc78df9a 100644
--- a/.github/workflows/mfem-sanitizer.yml
+++ b/.github/workflows/mfem-sanitizer.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -28,12 +28,12 @@ jobs:
steps:
- name: Cancel Previous Runs
- uses: styfle/cancel-workflow-action@0.11.0
+ uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: MFEM Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: mfem
diff --git a/.github/workflows/repo-check.yml b/.github/workflows/repo-check.yml
index 994a9faf44..bb34ac3cf6 100644
--- a/.github/workflows/repo-check.yml
+++ b/.github/workflows/repo-check.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence 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,12 +34,12 @@ jobs:
github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: Cancel Previous Runs
- uses: styfle/cancel-workflow-action@0.11.0
+ uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: checkout mfem
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: copyright check
id: copyright
@@ -60,11 +60,18 @@ jobs:
./config/githooks/pre-push --release
continue-on-error: true
+ - name: math check
+ id: math
+ run: |
+ ./config/githooks/pre-push --math
+ continue-on-error: true
+
- name: wrap-up
if: |
steps.copyright.outcome != 'success' ||
steps.license.outcome != 'success' ||
- steps.release.outcome != 'success'
+ steps.release.outcome != 'success' ||
+ steps.math.outcome != 'success'
run: |
if [[ "${{ steps.copyright.outcome }}" != "success" ]]; then
echo "copyright check failed, unroll log for details"
@@ -75,6 +82,9 @@ jobs:
if [[ "${{ steps.release.outcome }}" != "success" ]]; then
echo "release check failed, unroll log for details"
fi
+ if [[ "${{ steps.math.outcome }}" != "success" ]]; then
+ echo "math check failed, unroll log for details"
+ fi
exit 1
code-style:
@@ -84,7 +94,7 @@ jobs:
github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: checkout mfem
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: get astyle
run: |
@@ -101,7 +111,7 @@ jobs:
github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: checkout mfem
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: get doxygen and graphviz
run: |
@@ -126,7 +136,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout mfem
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
diff --git a/.gitignore b/.gitignore
index f7e7265d6a..1ba1a28c87 100644
--- a/.gitignore
+++ b/.gitignore
@@ -342,6 +342,7 @@ miniapps/toys/mondrian.mesh
miniapps/solvers/block-solvers
miniapps/solvers/lor_solvers
miniapps/solvers/plor_solvers
+miniapps/solvers/lor_elast
miniapps/solvers/ParaView
miniapps/solvers/mesh.*
miniapps/solvers/sol.*
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 525407f74e..84e7e6374d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/configs/common.yml b/.gitlab/configs/common.yml
index fa2b46f85f..5a47df771a 100644
--- a/.gitlab/configs/common.yml
+++ b/.gitlab/configs/common.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/configs/corona-config.yml b/.gitlab/configs/corona-config.yml
index afac505b26..9e745e3a07 100644
--- a/.gitlab/configs/corona-config.yml
+++ b/.gitlab/configs/corona-config.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/configs/lassen-config.yml b/.gitlab/configs/lassen-config.yml
index 6f6605fc7c..bba553b084 100644
--- a/.gitlab/configs/lassen-config.yml
+++ b/.gitlab/configs/lassen-config.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/configs/quartz-config.yml b/.gitlab/configs/quartz-config.yml
index 3586afc7d4..80aaad5155 100644
--- a/.gitlab/configs/quartz-config.yml
+++ b/.gitlab/configs/quartz-config.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/configs/report-build-and-test.yml b/.gitlab/configs/report-build-and-test.yml
index 7b3d856728..ea551c0dd4 100644
--- a/.gitlab/configs/report-build-and-test.yml
+++ b/.gitlab/configs/report-build-and-test.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/configs/setup-baseline.yml b/.gitlab/configs/setup-baseline.yml
index af72cd9196..b270fa1129 100644
--- a/.gitlab/configs/setup-baseline.yml
+++ b/.gitlab/configs/setup-baseline.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/configs/setup-build-and-test.yml b/.gitlab/configs/setup-build-and-test.yml
index c236318790..eea20e9757 100644
--- a/.gitlab/configs/setup-build-and-test.yml
+++ b/.gitlab/configs/setup-build-and-test.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/corona-build-and-test.yml b/.gitlab/corona-build-and-test.yml
index e13c54c320..f5190d0324 100644
--- a/.gitlab/corona-build-and-test.yml
+++ b/.gitlab/corona-build-and-test.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/lassen-build-and-test.yml b/.gitlab/lassen-build-and-test.yml
index 617186b868..8e0f8880dd 100644
--- a/.gitlab/lassen-build-and-test.yml
+++ b/.gitlab/lassen-build-and-test.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/quartz-baseline.yml b/.gitlab/quartz-baseline.yml
index 361d3b5bab..e03c794ade 100644
--- a/.gitlab/quartz-baseline.yml
+++ b/.gitlab/quartz-baseline.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/quartz-build-and-test.yml b/.gitlab/quartz-build-and-test.yml
index 3f7ec7be7c..4c5e440da4 100644
--- a/.gitlab/quartz-build-and-test.yml
+++ b/.gitlab/quartz-build-and-test.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence 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,7 +23,7 @@ allocate_resource:
stage: allocate_resource
script:
- echo ${ALLOC_NAME}
- - salloc --exclusive --nodes=1 --partition=pdebug --time=45 --no-shell --job-name=${ALLOC_NAME}
+ - salloc --exclusive --nodes=1 --reservation=ci --time=60 --no-shell --job-name=${ALLOC_NAME}
timeout: 6h
# GitLab jobs for the Quartz machine at LLNL
diff --git a/.gitlab/scripts/baseline b/.gitlab/scripts/baseline
index 540ee3957a..7734995b3d 100755
--- a/.gitlab/scripts/baseline
+++ b/.gitlab/scripts/baseline
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/scripts/git_try_to_push b/.gitlab/scripts/git_try_to_push
index b28c15441a..3bfa2bb632 100755
--- a/.gitlab/scripts/git_try_to_push
+++ b/.gitlab/scripts/git_try_to_push
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/scripts/rebaseline b/.gitlab/scripts/rebaseline
index 4e8175bbd9..4d858ef253 100755
--- a/.gitlab/scripts/rebaseline
+++ b/.gitlab/scripts/rebaseline
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/scripts/report_build_and_test_failure b/.gitlab/scripts/report_build_and_test_failure
index 7a32363af1..08dd37a5eb 100755
--- a/.gitlab/scripts/report_build_and_test_failure
+++ b/.gitlab/scripts/report_build_and_test_failure
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/scripts/report_build_and_test_success b/.gitlab/scripts/report_build_and_test_success
index 6f9159aec1..65ecb9f5e2 100755
--- a/.gitlab/scripts/report_build_and_test_success
+++ b/.gitlab/scripts/report_build_and_test_success
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/.gitlab/scripts/safe_create_rundir b/.gitlab/scripts/safe_create_rundir
index f87ad7941f..a8e651e985 100755
--- a/.gitlab/scripts/safe_create_rundir
+++ b/.gitlab/scripts/safe_create_rundir
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/CHANGELOG b/CHANGELOG
index f309fb30b5..70b7325cf8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -22,6 +22,23 @@ Discretization improvements
IntegrationRules through a moment-fitting approach. The cut is specified by
the zero level set of a Coefficient. See fem/intrules_cut.hpp and Example 38.
+GPU support
+----------------------------
+- Added support for full assembly on simplices.
+- Added functionality for BilinearFormIntegrators to use kernels that work for both
+ tensor and unstructured elements.
+- Added partial assembly for linear elasticity. Does not use sum factorization for now.
+
+New and updated examples and miniapps
+-------------------------------------
+- Added a new block solver in miniapp/solvers for the Darcy problem.
+ The new solver is based on a Bramble-Pasciak preconditioning. User can
+ use and implement their own preconditioner for the mass matrix.
+
+- Added miniapp to demonstrate new elasticity integrator and unstructured element GPU support,
+ and a block diagonal preconditioner using low order refinement. Allows comparison with
+ currently existing legacy mode integrator. See miniapps/solvers/lor_elast.
+
Miscellaneous
-------------
- The ReadCubit Genesis mesh importer has been rewritten to improve readability.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e4440ac02b..a7098d6e8f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -18,9 +18,10 @@ set(USER_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/config/user.cmake" CACHE PATH
"Path to optional user configuration file.")
# Require C++11 and disable compiler-specific extensions
-set(CMAKE_CXX_STANDARD 11)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-set(CMAKE_CXX_EXTENSIONS OFF)
+set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use.")
+set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL
+ "Force the use of the chosen C++ standard.")
+set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Enable C++ standard extensions.")
# 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
@@ -93,7 +94,7 @@ if ((MFEM_USE_SUNDIALS OR
MFEM_USE_RAJA OR
MFEM_USE_UMPIRE) AND
("${CMAKE_CXX_STANDARD}" LESS "14"))
- set(CMAKE_CXX_STANDARD 14)
+ set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to use." FORCE)
endif()
# Include xSDK default CMake file.
@@ -104,7 +105,8 @@ enable_language(CXX)
if (MINGW)
# MinGW GCC does not expose the functions jn/_jn, yn/_yn (used in Example
# 25/25p) unless we use '-std=gnu++11':
- set(CMAKE_CXX_EXTENSIONS ON)
+ set(CMAKE_CXX_EXTENSIONS ON
+ CACHE BOOL "Enable C++ standard extensions." FORCE)
endif()
if (MFEM_USE_CUDA)
if (MFEM_USE_HIP)
@@ -115,9 +117,11 @@ if (MFEM_USE_CUDA)
set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER})
endif()
enable_language(CUDA)
- set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD})
- set(CMAKE_CUDA_STANDARD_REQUIRED ON)
- set(CMAKE_CUDA_EXTENSIONS OFF)
+ set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING
+ "CUDA standard to use.")
+ set(CMAKE_CUDA_STANDARD_REQUIRED ON CACHE BOOL
+ "Force the use of the chosen CUDA standard.")
+ set(CMAKE_CUDA_EXTENSIONS OFF CACHE BOOL "Enable CUDA standard extensions.")
set(CUDA_FLAGS "--expt-extended-lambda")
if (CMAKE_VERSION VERSION_LESS 3.18.0)
set(CUDA_FLAGS "-arch=${CUDA_ARCH} ${CUDA_FLAGS}")
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2282995370..292e4f7723 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -346,6 +346,9 @@ Before you can start, you need a GitHub account, here are a few suggestions:
- Code specifics
- All new public, protected, and private classes, methods, data members, and
functions have Doxygen-style documentation in source comments.
+ - Math formulas can be included in the Doxygen comments either with standard
+ LaTeX (`$..$` and `$$..$$`) for portions that need detailed explanation, or with
+ [Unicode](https://www.unicodeit.net/) or plain text when short or readable description is preferable.
- In addition to arguments and functionality, documentation should include the
current limitations of the code, any background information that is
implicitly assumed in the implementation, and the ownership and lifetime
diff --git a/LICENSE b/LICENSE
index 3dc5646efa..c927547f9a 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
BSD 3-Clause License
-Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC
+Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
index 3ea94fdb1e..87c6064592 100644
--- a/config/CMakeLists.txt
+++ b/config/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/MFEMConfig.cmake.in b/config/cmake/MFEMConfig.cmake.in
index ed271311ae..a1a51e28df 100644
--- a/config/cmake/MFEMConfig.cmake.in
+++ b/config/cmake/MFEMConfig.cmake.in
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/config.hpp.in b/config/cmake/config.hpp.in
index 7cb2a958d7..aae737aa26 100644
--- a/config/cmake/config.hpp.in
+++ b/config/cmake/config.hpp.in
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/config/cmake/modules/FindAMGX.cmake b/config/cmake/modules/FindAMGX.cmake
index 7450068c4c..f2d0c91103 100644
--- a/config/cmake/modules/FindAMGX.cmake
+++ b/config/cmake/modules/FindAMGX.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindAlgoim.cmake b/config/cmake/modules/FindAlgoim.cmake
index e0ec4520bb..3cb40f2eb0 100644
--- a/config/cmake/modules/FindAlgoim.cmake
+++ b/config/cmake/modules/FindAlgoim.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindAxom.cmake b/config/cmake/modules/FindAxom.cmake
index 7cccc83ea4..195e9f05b4 100644
--- a/config/cmake/modules/FindAxom.cmake
+++ b/config/cmake/modules/FindAxom.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindBenchmark.cmake b/config/cmake/modules/FindBenchmark.cmake
index 8c32b97168..2be226cdeb 100644
--- a/config/cmake/modules/FindBenchmark.cmake
+++ b/config/cmake/modules/FindBenchmark.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindBlitz.cmake b/config/cmake/modules/FindBlitz.cmake
index 8c895b9b66..1b905eff55 100644
--- a/config/cmake/modules/FindBlitz.cmake
+++ b/config/cmake/modules/FindBlitz.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindCODIPACK.cmake b/config/cmake/modules/FindCODIPACK.cmake
index 01f796f9c9..ae0ede07d5 100644
--- a/config/cmake/modules/FindCODIPACK.cmake
+++ b/config/cmake/modules/FindCODIPACK.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindCXXABIDemangle.cmake b/config/cmake/modules/FindCXXABIDemangle.cmake
index 04fd5e3520..39c22abde4 100644
--- a/config/cmake/modules/FindCXXABIDemangle.cmake
+++ b/config/cmake/modules/FindCXXABIDemangle.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindCaliper.cmake b/config/cmake/modules/FindCaliper.cmake
index fb9d7aeccf..4845aad841 100644
--- a/config/cmake/modules/FindCaliper.cmake
+++ b/config/cmake/modules/FindCaliper.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindConduit.cmake b/config/cmake/modules/FindConduit.cmake
index 4b25ef46ad..6b5c263290 100644
--- a/config/cmake/modules/FindConduit.cmake
+++ b/config/cmake/modules/FindConduit.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindENZYME.cmake b/config/cmake/modules/FindENZYME.cmake
index 08374de15a..76b5b21f2b 100644
--- a/config/cmake/modules/FindENZYME.cmake
+++ b/config/cmake/modules/FindENZYME.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindFMS.cmake b/config/cmake/modules/FindFMS.cmake
index b71c78e342..1d3f1df458 100644
--- a/config/cmake/modules/FindFMS.cmake
+++ b/config/cmake/modules/FindFMS.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindGSLIB.cmake b/config/cmake/modules/FindGSLIB.cmake
index 7a314eb7f9..2f662daf79 100644
--- a/config/cmake/modules/FindGSLIB.cmake
+++ b/config/cmake/modules/FindGSLIB.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindHDF5.cmake b/config/cmake/modules/FindHDF5.cmake
index 2617fb9a4d..edfb981c39 100644
--- a/config/cmake/modules/FindHDF5.cmake
+++ b/config/cmake/modules/FindHDF5.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindHIOP.cmake b/config/cmake/modules/FindHIOP.cmake
index 19c9fa5924..e2cdf5299f 100644
--- a/config/cmake/modules/FindHIOP.cmake
+++ b/config/cmake/modules/FindHIOP.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindHYPRE.cmake b/config/cmake/modules/FindHYPRE.cmake
index b21a1f7190..eeaf453093 100644
--- a/config/cmake/modules/FindHYPRE.cmake
+++ b/config/cmake/modules/FindHYPRE.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindLIBDL.cmake b/config/cmake/modules/FindLIBDL.cmake
index 254b99fb5b..2d570b57fb 100644
--- a/config/cmake/modules/FindLIBDL.cmake
+++ b/config/cmake/modules/FindLIBDL.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindLibunwind.cmake b/config/cmake/modules/FindLibunwind.cmake
index 21dcf3c54c..ef927e5d48 100644
--- a/config/cmake/modules/FindLibunwind.cmake
+++ b/config/cmake/modules/FindLibunwind.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindMETIS.cmake b/config/cmake/modules/FindMETIS.cmake
index 8de8d6a223..c5154bf278 100644
--- a/config/cmake/modules/FindMETIS.cmake
+++ b/config/cmake/modules/FindMETIS.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindMFEMBacktrace.cmake b/config/cmake/modules/FindMFEMBacktrace.cmake
index 9ffcd88244..5ce9997b57 100644
--- a/config/cmake/modules/FindMFEMBacktrace.cmake
+++ b/config/cmake/modules/FindMFEMBacktrace.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindMKL_CPARDISO.cmake b/config/cmake/modules/FindMKL_CPARDISO.cmake
index a3798bddf2..bc909f7742 100644
--- a/config/cmake/modules/FindMKL_CPARDISO.cmake
+++ b/config/cmake/modules/FindMKL_CPARDISO.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindMKL_PARDISO.cmake b/config/cmake/modules/FindMKL_PARDISO.cmake
index 9a3d62080e..6f9eb94ab8 100644
--- a/config/cmake/modules/FindMKL_PARDISO.cmake
+++ b/config/cmake/modules/FindMKL_PARDISO.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindMPFR.cmake b/config/cmake/modules/FindMPFR.cmake
index 3490034559..ca7d6c59e5 100644
--- a/config/cmake/modules/FindMPFR.cmake
+++ b/config/cmake/modules/FindMPFR.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindMUMPS.cmake b/config/cmake/modules/FindMUMPS.cmake
index 2b034d216d..304e44d3e6 100644
--- a/config/cmake/modules/FindMUMPS.cmake
+++ b/config/cmake/modules/FindMUMPS.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindNetCDF.cmake b/config/cmake/modules/FindNetCDF.cmake
index 8755184016..fa64e7a107 100644
--- a/config/cmake/modules/FindNetCDF.cmake
+++ b/config/cmake/modules/FindNetCDF.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindOCCA.cmake b/config/cmake/modules/FindOCCA.cmake
index 75d3a18106..ca726654e7 100644
--- a/config/cmake/modules/FindOCCA.cmake
+++ b/config/cmake/modules/FindOCCA.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindPARELAG.cmake b/config/cmake/modules/FindPARELAG.cmake
index 547c647db9..2064857061 100644
--- a/config/cmake/modules/FindPARELAG.cmake
+++ b/config/cmake/modules/FindPARELAG.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindPOSIXClocks.cmake b/config/cmake/modules/FindPOSIXClocks.cmake
index 4d0bf8ade9..356798b02f 100644
--- a/config/cmake/modules/FindPOSIXClocks.cmake
+++ b/config/cmake/modules/FindPOSIXClocks.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindParMETIS.cmake b/config/cmake/modules/FindParMETIS.cmake
index 87ed238001..b5388ca737 100644
--- a/config/cmake/modules/FindParMETIS.cmake
+++ b/config/cmake/modules/FindParMETIS.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindRAJA.cmake b/config/cmake/modules/FindRAJA.cmake
index a4cd810ed7..0d0e2f10df 100644
--- a/config/cmake/modules/FindRAJA.cmake
+++ b/config/cmake/modules/FindRAJA.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindSLEPc.cmake b/config/cmake/modules/FindSLEPc.cmake
index b4e8d0951e..d13e7ebcca 100644
--- a/config/cmake/modules/FindSLEPc.cmake
+++ b/config/cmake/modules/FindSLEPc.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindSTRUMPACK.cmake b/config/cmake/modules/FindSTRUMPACK.cmake
index 543e164dcd..4089cbe857 100644
--- a/config/cmake/modules/FindSTRUMPACK.cmake
+++ b/config/cmake/modules/FindSTRUMPACK.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindSUNDIALS.cmake b/config/cmake/modules/FindSUNDIALS.cmake
index 889ca03175..9a624a9c51 100644
--- a/config/cmake/modules/FindSUNDIALS.cmake
+++ b/config/cmake/modules/FindSUNDIALS.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindScotch.cmake b/config/cmake/modules/FindScotch.cmake
index dbca25b6f2..2c98463f40 100644
--- a/config/cmake/modules/FindScotch.cmake
+++ b/config/cmake/modules/FindScotch.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindSuiteSparse.cmake b/config/cmake/modules/FindSuiteSparse.cmake
index ed6eef73a9..0ef1c79eaf 100644
--- a/config/cmake/modules/FindSuiteSparse.cmake
+++ b/config/cmake/modules/FindSuiteSparse.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindSuperLUDist.cmake b/config/cmake/modules/FindSuperLUDist.cmake
index 8a330b2db5..3d840fe633 100644
--- a/config/cmake/modules/FindSuperLUDist.cmake
+++ b/config/cmake/modules/FindSuperLUDist.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindUMPIRE.cmake b/config/cmake/modules/FindUMPIRE.cmake
index 50fd772393..8ed1d9569a 100644
--- a/config/cmake/modules/FindUMPIRE.cmake
+++ b/config/cmake/modules/FindUMPIRE.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/Find_GnuTLS.cmake b/config/cmake/modules/Find_GnuTLS.cmake
index 5d15292fbf..26e6a08393 100644
--- a/config/cmake/modules/Find_GnuTLS.cmake
+++ b/config/cmake/modules/Find_GnuTLS.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/FindlibCEED.cmake b/config/cmake/modules/FindlibCEED.cmake
index cf68a41469..9cd725f432 100644
--- a/config/cmake/modules/FindlibCEED.cmake
+++ b/config/cmake/modules/FindlibCEED.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/cmake/modules/MfemCmakeUtilities.cmake b/config/cmake/modules/MfemCmakeUtilities.cmake
index 204b7d87f1..b4f7264b70 100644
--- a/config/cmake/modules/MfemCmakeUtilities.cmake
+++ b/config/cmake/modules/MfemCmakeUtilities.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/config.hpp b/config/config.hpp
index a8d48de795..44610d614d 100644
--- a/config/config.hpp
+++ b/config/config.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/config/config.hpp.in b/config/config.hpp.in
index 39d7737c70..60d454a259 100644
--- a/config/config.hpp.in
+++ b/config/config.hpp.in
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/config/config.mk.in b/config/config.mk.in
index 303750bf5f..3679894d78 100644
--- a/config/config.mk.in
+++ b/config/config.mk.in
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/defaults.cmake b/config/defaults.cmake
index 3985ebd933..164b62110d 100644
--- a/config/defaults.cmake
+++ b/config/defaults.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/defaults.mk b/config/defaults.mk
index 7e359e06a1..63142abd8d 100644
--- a/config/defaults.mk
+++ b/config/defaults.mk
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/get_hypre_version.cpp b/config/get_hypre_version.cpp
index 05a7f06e0c..9520729707 100644
--- a/config/get_hypre_version.cpp
+++ b/config/get_hypre_version.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/config/get_mumps_version.cpp b/config/get_mumps_version.cpp
index 7f1626bdce..9bee645286 100644
--- a/config/get_mumps_version.cpp
+++ b/config/get_mumps_version.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/config/githooks/pre-push b/config/githooks/pre-push
index fc53aaab5e..1c7808a97f 100755
--- a/config/githooks/pre-push
+++ b/config/githooks/pre-push
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence 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,6 +21,7 @@ if [[ "${option}" == "--help" ]]; then
echo " --copyright"
echo " --license"
echo " --release"
+ echo " --math"
echo " --style"
echo " --history"
echo ""
@@ -35,8 +36,8 @@ cd $(git rev-parse --show-toplevel)
# copyright check
copyright=true
if [[ "${option}" == "--copyright" || "${option}" == "" ]]; then
- if git grep -n "^\(#\|//\).*Copyright.*2010-20\(2[^3]\|[^2].\)" > matches.txt; then
- echo "Please update the following files to Copyright (c) 2010-2023:"
+ if git grep -n "^\(#\|//\).*Copyright.*2010-20\(2[^4]\|[^2].\)" > matches.txt; then
+ echo "Please update the following files to Copyright (c) 2010-2024:"
cat matches.txt
copyright=false
fi
@@ -63,6 +64,18 @@ if [[ "${option}" == "--release" || "${option}" == "" ]]; then
fi
fi
+# math in doxygen check
+math=true
+if [[ "${option}" == "--math" || "${option}" == "" ]]; then
+ if grep '\\f' -R doc/CodeDocumentation.dox mfem.hpp config general linalg mesh fem examples miniapps | grep -v '\\frac' | grep -v fem/picojson.h | grep -v config/githooks/pre-push > matches.txt
+ then
+ echo "Please use $..$ and \$\$..\$\$ for LaTeX formulas in the following"
+ echo "comments instead of the Doxygen style \f$..\f$, \f[..\f], etc."
+ cat matches.txt
+ math=false
+ fi
+fi
+
# wrap-up
code=0
if ! $copyright ; then
@@ -77,6 +90,10 @@ if ! $release ; then
echo "release check failed, unroll log for details"
code=1
fi
+if ! $math ; then
+ echo "math in doxygen check failed, unroll log for details"
+ code=1
+fi
# `code-style` is not just a check, it will actually reformat the code if
# necessary. This means that if one pushes while the repo is in dirty state
diff --git a/config/makefile b/config/makefile
index 95a0390769..8082ac62b4 100644
--- a/config/makefile
+++ b/config/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/sample-runs.sh b/config/sample-runs.sh
index c0eb122115..788a223800 100755
--- a/config/sample-runs.sh
+++ b/config/sample-runs.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/config/tconfig.hpp b/config/tconfig.hpp
index b24d575762..44336d0b5b 100644
--- a/config/tconfig.hpp
+++ b/config/tconfig.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/config/test.mk b/config/test.mk
index b6137203a9..21d79f8a75 100644
--- a/config/test.mk
+++ b/config/test.mk
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/data/ball-nurbs.mesh b/data/ball-nurbs.mesh
index 590118d2da..9d9651d172 100644
--- a/data/ball-nurbs.mesh
+++ b/data/ball-nurbs.mesh
@@ -1,7 +1,7 @@
MFEM NURBS mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# SEGMENT = 1
# SQUARE = 3
diff --git a/data/beam-hex-nurbs.mesh b/data/beam-hex-nurbs.mesh
index f64a6da57f..599bc7678e 100644
--- a/data/beam-hex-nurbs.mesh
+++ b/data/beam-hex-nurbs.mesh
@@ -1,7 +1,7 @@
MFEM NURBS mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# SEGMENT = 1
# SQUARE = 3
diff --git a/data/beam-hex.mesh b/data/beam-hex.mesh
index 28d7b33625..e277359468 100644
--- a/data/beam-hex.mesh
+++ b/data/beam-hex.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/beam-quad-nurbs.mesh b/data/beam-quad-nurbs.mesh
index 11031b7660..2401e458f3 100644
--- a/data/beam-quad-nurbs.mesh
+++ b/data/beam-quad-nurbs.mesh
@@ -1,7 +1,7 @@
MFEM NURBS mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# SEGMENT = 1
# SQUARE = 3
diff --git a/data/beam-quad.mesh b/data/beam-quad.mesh
index 0fba24fe2f..29ba6e877d 100644
--- a/data/beam-quad.mesh
+++ b/data/beam-quad.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/beam-tet.mesh b/data/beam-tet.mesh
index 68a2edea0a..f828cbf01a 100644
--- a/data/beam-tet.mesh
+++ b/data/beam-tet.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/beam-tri.mesh b/data/beam-tri.mesh
index c53dd0795a..a96302e5f6 100644
--- a/data/beam-tri.mesh
+++ b/data/beam-tri.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/beam-wedge.mesh b/data/beam-wedge.mesh
index b28e493709..ba7987a897 100644
--- a/data/beam-wedge.mesh
+++ b/data/beam-wedge.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/cube-nurbs.mesh b/data/cube-nurbs.mesh
index 513b58982b..4c4d860859 100644
--- a/data/cube-nurbs.mesh
+++ b/data/cube-nurbs.mesh
@@ -1,7 +1,7 @@
MFEM NURBS mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# SEGMENT = 1
# SQUARE = 3
diff --git a/data/diag-segment-2d.mesh b/data/diag-segment-2d.mesh
index 793d883d85..54fc181332 100644
--- a/data/diag-segment-2d.mesh
+++ b/data/diag-segment-2d.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/diag-segment-3d.mesh b/data/diag-segment-3d.mesh
index 593c609986..dca4eb0e10 100644
--- a/data/diag-segment-3d.mesh
+++ b/data/diag-segment-3d.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/disc-nurbs.mesh b/data/disc-nurbs.mesh
index 13655d872e..9c2c7ee6b8 100644
--- a/data/disc-nurbs.mesh
+++ b/data/disc-nurbs.mesh
@@ -1,7 +1,7 @@
MFEM NURBS mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# SEGMENT = 1
# SQUARE = 3
diff --git a/data/escher-p2.mesh b/data/escher-p2.mesh
index 6a91aa875b..424e69cff2 100644
--- a/data/escher-p2.mesh
+++ b/data/escher-p2.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/escher-p3.mesh b/data/escher-p3.mesh
index eb1925f041..bb20b5e411 100644
--- a/data/escher-p3.mesh
+++ b/data/escher-p3.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/escher.mesh b/data/escher.mesh
index 2f04bada52..fe2fb4c214 100644
--- a/data/escher.mesh
+++ b/data/escher.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/fichera-mixed-p2.mesh b/data/fichera-mixed-p2.mesh
index b36ccf6018..05266b368b 100644
--- a/data/fichera-mixed-p2.mesh
+++ b/data/fichera-mixed-p2.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/fichera-mixed.mesh b/data/fichera-mixed.mesh
index f98134f4fb..1c18dae1a0 100644
--- a/data/fichera-mixed.mesh
+++ b/data/fichera-mixed.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/fichera-q2.mesh b/data/fichera-q2.mesh
index ce03d407ef..8d183d92e8 100644
--- a/data/fichera-q2.mesh
+++ b/data/fichera-q2.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/fichera-q3.mesh b/data/fichera-q3.mesh
index b1d3ec683d..0db43520c6 100644
--- a/data/fichera-q3.mesh
+++ b/data/fichera-q3.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/fichera-quad-mixed.mesh b/data/fichera-quad-mixed.mesh
index a3458665ac..e9f9ab6cfc 100644
--- a/data/fichera-quad-mixed.mesh
+++ b/data/fichera-quad-mixed.mesh
@@ -1,6 +1,6 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/fichera-quad.mesh b/data/fichera-quad.mesh
index afd2df9c85..be5ab2a68b 100644
--- a/data/fichera-quad.mesh
+++ b/data/fichera-quad.mesh
@@ -1,6 +1,6 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/fichera.mesh b/data/fichera.mesh
index b82f56d576..3d11c8ec42 100644
--- a/data/fichera.mesh
+++ b/data/fichera.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/hexagon.mesh b/data/hexagon.mesh
index 6014a43323..bbafc2877b 100644
--- a/data/hexagon.mesh
+++ b/data/hexagon.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/klein-bottle.mesh b/data/klein-bottle.mesh
index 9f50e97dd2..c87719f39e 100644
--- a/data/klein-bottle.mesh
+++ b/data/klein-bottle.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/klein-donut.mesh b/data/klein-donut.mesh
index c2312ef2e0..994e13c21b 100644
--- a/data/klein-donut.mesh
+++ b/data/klein-donut.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/l-shape.mesh b/data/l-shape.mesh
index 9244f83ec0..c093a01c83 100644
--- a/data/l-shape.mesh
+++ b/data/l-shape.mesh
@@ -1,6 +1,6 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/llnl-p3.mesh b/data/llnl-p3.mesh
index cd82b4bf1f..9434871649 100644
--- a/data/llnl-p3.mesh
+++ b/data/llnl-p3.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/mobius-strip.mesh b/data/mobius-strip.mesh
index c180f79108..88e88f58db 100644
--- a/data/mobius-strip.mesh
+++ b/data/mobius-strip.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/octahedron.mesh b/data/octahedron.mesh
index 4c281b52ff..1a51c38427 100644
--- a/data/octahedron.mesh
+++ b/data/octahedron.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/periodic-cube.mesh b/data/periodic-cube.mesh
index 8ea7aaa9a1..93373e94f5 100644
--- a/data/periodic-cube.mesh
+++ b/data/periodic-cube.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/periodic-hexagon.mesh b/data/periodic-hexagon.mesh
index 5a5d448bcb..63d59286f2 100644
--- a/data/periodic-hexagon.mesh
+++ b/data/periodic-hexagon.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/periodic-segment.mesh b/data/periodic-segment.mesh
index fd088747fc..751924e749 100644
--- a/data/periodic-segment.mesh
+++ b/data/periodic-segment.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/periodic-square.mesh b/data/periodic-square.mesh
index 7d0bf5af37..677ba0d24d 100644
--- a/data/periodic-square.mesh
+++ b/data/periodic-square.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/pipe-nurbs-2d.mesh b/data/pipe-nurbs-2d.mesh
index b02c040635..5d0de6135f 100644
--- a/data/pipe-nurbs-2d.mesh
+++ b/data/pipe-nurbs-2d.mesh
@@ -1,7 +1,7 @@
MFEM NURBS mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# SEGMENT = 1
# SQUARE = 3
diff --git a/data/pipe-nurbs.mesh b/data/pipe-nurbs.mesh
index 4d0e425de3..bc5cc2f729 100644
--- a/data/pipe-nurbs.mesh
+++ b/data/pipe-nurbs.mesh
@@ -1,7 +1,7 @@
MFEM NURBS mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# SEGMENT = 1
# SQUARE = 3
diff --git a/data/ref-cube.mesh b/data/ref-cube.mesh
index a9e5dedb94..54e054ea8a 100644
--- a/data/ref-cube.mesh
+++ b/data/ref-cube.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/ref-prism.mesh b/data/ref-prism.mesh
index 48ed733d0f..65493d6475 100644
--- a/data/ref-prism.mesh
+++ b/data/ref-prism.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/ref-pyramid.mesh b/data/ref-pyramid.mesh
index 73222008f3..0c9f641989 100644
--- a/data/ref-pyramid.mesh
+++ b/data/ref-pyramid.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/ref-segment.mesh b/data/ref-segment.mesh
index b69cf7ce90..a3e5ea59d5 100644
--- a/data/ref-segment.mesh
+++ b/data/ref-segment.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/ref-square.mesh b/data/ref-square.mesh
index b3c23dd588..733e198c3b 100644
--- a/data/ref-square.mesh
+++ b/data/ref-square.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/ref-tetrahedron.mesh b/data/ref-tetrahedron.mesh
index 5f6e8a6a56..859abcacfc 100644
--- a/data/ref-tetrahedron.mesh
+++ b/data/ref-tetrahedron.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/ref-triangle.mesh b/data/ref-triangle.mesh
index 804bdf1ea8..e9ddb03347 100644
--- a/data/ref-triangle.mesh
+++ b/data/ref-triangle.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/rt-2d-p4-tri.mesh b/data/rt-2d-p4-tri.mesh
index e7955b6e4e..2e4fadc1ef 100644
--- a/data/rt-2d-p4-tri.mesh
+++ b/data/rt-2d-p4-tri.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/rt-2d-q3.mesh b/data/rt-2d-q3.mesh
index d0d1de0a0b..d9359f8638 100644
--- a/data/rt-2d-q3.mesh
+++ b/data/rt-2d-q3.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/segment-nurbs.mesh b/data/segment-nurbs.mesh
index d204f9c74a..dcc9ae4aa9 100644
--- a/data/segment-nurbs.mesh
+++ b/data/segment-nurbs.mesh
@@ -1,7 +1,7 @@
MFEM NURBS mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# SEGMENT = 1
# SQUARE = 3
diff --git a/data/square-disc-nurbs.mesh b/data/square-disc-nurbs.mesh
index cc981641a8..259c4fa328 100644
--- a/data/square-disc-nurbs.mesh
+++ b/data/square-disc-nurbs.mesh
@@ -1,7 +1,7 @@
MFEM NURBS mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# SEGMENT = 1
# SQUARE = 3
diff --git a/data/square-disc-p2.mesh b/data/square-disc-p2.mesh
index b28c20673c..040cdf1241 100644
--- a/data/square-disc-p2.mesh
+++ b/data/square-disc-p2.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/square-disc-p3.mesh b/data/square-disc-p3.mesh
index bd5bf360c9..ff6f7f8410 100644
--- a/data/square-disc-p3.mesh
+++ b/data/square-disc-p3.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/square-disc-surf.mesh b/data/square-disc-surf.mesh
index 164f2aca36..b9bd696fbf 100644
--- a/data/square-disc-surf.mesh
+++ b/data/square-disc-surf.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/square-disc.mesh b/data/square-disc.mesh
index eb94e18327..77da4488fd 100644
--- a/data/square-disc.mesh
+++ b/data/square-disc.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/square-mixed.mesh b/data/square-mixed.mesh
index 96e84839d2..dcfcf79f5c 100644
--- a/data/square-mixed.mesh
+++ b/data/square-mixed.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/square-nurbs.mesh b/data/square-nurbs.mesh
index 282818ff41..d3bcb3f2b9 100644
--- a/data/square-nurbs.mesh
+++ b/data/square-nurbs.mesh
@@ -1,7 +1,7 @@
MFEM NURBS mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# SEGMENT = 1
# SQUARE = 3
diff --git a/data/star-mixed-p2.mesh b/data/star-mixed-p2.mesh
index 4f644c3ece..ff1dc96031 100644
--- a/data/star-mixed-p2.mesh
+++ b/data/star-mixed-p2.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/star-mixed.mesh b/data/star-mixed.mesh
index 118853cdc3..8fc158ba26 100644
--- a/data/star-mixed.mesh
+++ b/data/star-mixed.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/star-q2.mesh b/data/star-q2.mesh
index 31cd8c7081..e3987271bc 100644
--- a/data/star-q2.mesh
+++ b/data/star-q2.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/star-q3.mesh b/data/star-q3.mesh
index a0d96deb6e..f963d2cd5e 100644
--- a/data/star-q3.mesh
+++ b/data/star-q3.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/star-surf.mesh b/data/star-surf.mesh
index 22070fcc34..08bcf2bca6 100644
--- a/data/star-surf.mesh
+++ b/data/star-surf.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/star.mesh b/data/star.mesh
index f6d6f2d8c2..94cd1199f6 100644
--- a/data/star.mesh
+++ b/data/star.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/tinyzoo-3d.mesh b/data/tinyzoo-3d.mesh
index f269c4e765..b0c238a6b1 100644
--- a/data/tinyzoo-3d.mesh
+++ b/data/tinyzoo-3d.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/toroid-hex.mesh b/data/toroid-hex.mesh
index 5bfedaa45f..5944b70170 100644
--- a/data/toroid-hex.mesh
+++ b/data/toroid-hex.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/data/toroid-wedge.mesh b/data/toroid-wedge.mesh
index d5679aa239..0b86fbd5be 100644
--- a/data/toroid-wedge.mesh
+++ b/data/toroid-wedge.mesh
@@ -1,7 +1,7 @@
MFEM mesh v1.0
#
-# MFEM Geometry Types (see mesh/geom.hpp):
+# MFEM Geometry Types (see fem/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 9c0cc23211..fdb8857de9 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/doc/CodeDocumentation.conf.in b/doc/CodeDocumentation.conf.in
index 04d44d04a7..7438d0b981 100644
--- a/doc/CodeDocumentation.conf.in
+++ b/doc/CodeDocumentation.conf.in
@@ -1125,7 +1125,13 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+# Allow the use of standard LaTeX formulas in MFEM comments by replacing
+# $$...$$ with \f[...\f] and $...$ with \f$...\f$ before running Doxygen.
+# The regular expression ((?:.|\n)+?) is a lazy match for one or more
+# characters, include newline. If present, Doxygen-style LaTeX commands
+# such as \f$, \f[, etc., are left unchanged.
+
+INPUT_FILTER = perl -0777 -pe 's/\$\$((?:.|\n)+?)\$\$/\\f[\1\\f]/g; s/(?SPDE Solvers: SPDE solver random field generation
* - DPG Diffusion example: DPG formulation for the diffusion problem
* - DPG Maxwell example: DPG formulation for the indefinite Maxwell problem
+ * - LOR Elasticity: solve linear elasticity with LOR preconditioning on GPUs
*
* See also the examples documentation online.
*/
diff --git a/doc/makefile b/doc/makefile
index 738e223ec1..ac2a7c63b2 100644
--- a/doc/makefile
+++ b/doc/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 7865b71b95..eab250f7f0 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/amgx/CMakeLists.txt b/examples/amgx/CMakeLists.txt
index 43ee4d76b3..30e0674321 100644
--- a/examples/amgx/CMakeLists.txt
+++ b/examples/amgx/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/amgx/makefile b/examples/amgx/makefile
index 5d80737114..91f385efcc 100644
--- a/examples/amgx/makefile
+++ b/examples/amgx/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/caliper/CMakeLists.txt b/examples/caliper/CMakeLists.txt
index 572c5bb0e2..c63c321f46 100644
--- a/examples/caliper/CMakeLists.txt
+++ b/examples/caliper/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/caliper/makefile b/examples/caliper/makefile
index 688bac869f..1072ffc3ef 100644
--- a/examples/caliper/makefile
+++ b/examples/caliper/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/ex25.cpp b/examples/ex25.cpp
index adaf950e17..45df8fe7ef 100644
--- a/examples/ex25.cpp
+++ b/examples/ex25.cpp
@@ -305,7 +305,7 @@ int main(int argc, char *argv[])
for (int j = 0; j < mesh->GetNBE(); j++)
{
Vector center(dim);
- int bdrgeom = mesh->GetBdrElementBaseGeometry(j);
+ int bdrgeom = mesh->GetBdrElementGeometry(j);
ElementTransformation * tr = mesh->GetBdrElementTransformation(j);
tr->Transform(Geometries.GetCenter(bdrgeom),center);
int k = mesh->GetBdrAttribute(j);
diff --git a/examples/ex25p.cpp b/examples/ex25p.cpp
index cf5daf4123..2b5451f113 100644
--- a/examples/ex25p.cpp
+++ b/examples/ex25p.cpp
@@ -350,7 +350,7 @@ int main(int argc, char *argv[])
for (int j = 0; j < pmesh->GetNBE(); j++)
{
Vector center(dim);
- int bdrgeom = pmesh->GetBdrElementBaseGeometry(j);
+ int bdrgeom = pmesh->GetBdrElementGeometry(j);
ElementTransformation * tr = pmesh->GetBdrElementTransformation(j);
tr->Transform(Geometries.GetCenter(bdrgeom),center);
int k = pmesh->GetBdrAttribute(j);
diff --git a/examples/ex26.cpp b/examples/ex26.cpp
index c83f4db139..07f9b77dd7 100644
--- a/examples/ex26.cpp
+++ b/examples/ex26.cpp
@@ -43,43 +43,38 @@ using namespace mfem;
class DiffusionMultigrid : public GeometricMultigrid
{
private:
- ConstantCoefficient one;
+ ConstantCoefficient coeff;
public:
// Constructs a diffusion multigrid for the given FiniteElementSpaceHierarchy
// and the array of essential boundaries
DiffusionMultigrid(FiniteElementSpaceHierarchy& fespaces, Array& ess_bdr)
- : GeometricMultigrid(fespaces), one(1.0)
+ : GeometricMultigrid(fespaces, ess_bdr), coeff(1.0)
{
- ConstructCoarseOperatorAndSolver(fespaces.GetFESpaceAtLevel(0), ess_bdr);
-
+ ConstructCoarseOperatorAndSolver(fespaces.GetFESpaceAtLevel(0));
for (int level = 1; level < fespaces.GetNumLevels(); ++level)
{
- ConstructOperatorAndSmoother(fespaces.GetFESpaceAtLevel(level), ess_bdr);
+ ConstructOperatorAndSmoother(fespaces.GetFESpaceAtLevel(level), level);
}
}
private:
- void ConstructBilinearForm(FiniteElementSpace& fespace, Array& ess_bdr)
+ void ConstructBilinearForm(FiniteElementSpace& fespace)
{
BilinearForm* form = new BilinearForm(&fespace);
form->SetAssemblyLevel(AssemblyLevel::PARTIAL);
- form->AddDomainIntegrator(new DiffusionIntegrator(one));
+ form->AddDomainIntegrator(new DiffusionIntegrator(coeff));
form->Assemble();
bfs.Append(form);
-
- essentialTrueDofs.Append(new Array());
- fespace.GetEssentialTrueDofs(ess_bdr, *essentialTrueDofs.Last());
}
- void ConstructCoarseOperatorAndSolver(FiniteElementSpace& coarse_fespace,
- Array& ess_bdr)
+ void ConstructCoarseOperatorAndSolver(FiniteElementSpace& coarse_fespace)
{
- ConstructBilinearForm(coarse_fespace, ess_bdr);
+ ConstructBilinearForm(coarse_fespace);
OperatorPtr opr;
opr.SetType(Operator::ANY_TYPE);
- bfs.Last()->FormSystemMatrix(*essentialTrueDofs.Last(), opr);
+ bfs[0]->FormSystemMatrix(*essentialTrueDofs[0], opr);
opr.SetOperatorOwner(false);
CGSolver* pcg = new CGSolver();
@@ -92,21 +87,20 @@ private:
AddLevel(opr.Ptr(), pcg, true, true);
}
- void ConstructOperatorAndSmoother(FiniteElementSpace& fespace,
- Array& ess_bdr)
+ void ConstructOperatorAndSmoother(FiniteElementSpace& fespace, int level)
{
- ConstructBilinearForm(fespace, ess_bdr);
+ const Array &ess_tdof_list = *essentialTrueDofs[level];
+ ConstructBilinearForm(fespace);
OperatorPtr opr;
opr.SetType(Operator::ANY_TYPE);
- bfs.Last()->FormSystemMatrix(*essentialTrueDofs.Last(), opr);
+ bfs[level]->FormSystemMatrix(ess_tdof_list, opr);
opr.SetOperatorOwner(false);
Vector diag(fespace.GetTrueVSize());
- bfs.Last()->AssembleDiagonal(diag);
+ bfs[level]->AssembleDiagonal(diag);
- Solver* smoother = new OperatorChebyshevSmoother(*opr, diag,
- *essentialTrueDofs.Last(), 2);
+ Solver* smoother = new OperatorChebyshevSmoother(*opr, diag, ess_tdof_list, 2);
AddLevel(opr.Ptr(), smoother, true, true);
}
};
diff --git a/examples/ex26p.cpp b/examples/ex26p.cpp
index 85931dc5b0..ff02bb0720 100644
--- a/examples/ex26p.cpp
+++ b/examples/ex26p.cpp
@@ -40,7 +40,7 @@ using namespace mfem;
class DiffusionMultigrid : public GeometricMultigrid
{
private:
- ConstantCoefficient one;
+ ConstantCoefficient coeff;
HypreBoomerAMG* amg;
public:
@@ -48,13 +48,13 @@ public:
// and the array of essential boundaries
DiffusionMultigrid(ParFiniteElementSpaceHierarchy& fespaces,
Array& ess_bdr)
- : GeometricMultigrid(fespaces), one(1.0)
+ : GeometricMultigrid(fespaces, ess_bdr), coeff(1.0)
{
- ConstructCoarseOperatorAndSolver(fespaces.GetFESpaceAtLevel(0), ess_bdr);
+ ConstructCoarseOperatorAndSolver(fespaces.GetFESpaceAtLevel(0));
for (int level = 1; level < fespaces.GetNumLevels(); ++level)
{
- ConstructOperatorAndSmoother(fespaces.GetFESpaceAtLevel(level), ess_bdr);
+ ConstructOperatorAndSmoother(fespaces.GetFESpaceAtLevel(level), level);
}
}
@@ -64,7 +64,7 @@ public:
}
private:
- void ConstructBilinearForm(ParFiniteElementSpace& fespace, Array& ess_bdr,
+ void ConstructBilinearForm(ParFiniteElementSpace& fespace,
bool partial_assembly)
{
ParBilinearForm* form = new ParBilinearForm(&fespace);
@@ -72,21 +72,17 @@ private:
{
form->SetAssemblyLevel(AssemblyLevel::PARTIAL);
}
- form->AddDomainIntegrator(new DiffusionIntegrator(one));
+ form->AddDomainIntegrator(new DiffusionIntegrator(coeff));
form->Assemble();
bfs.Append(form);
-
- essentialTrueDofs.Append(new Array());
- fespace.GetEssentialTrueDofs(ess_bdr, *essentialTrueDofs.Last());
}
- void ConstructCoarseOperatorAndSolver(ParFiniteElementSpace& coarse_fespace,
- Array& ess_bdr)
+ void ConstructCoarseOperatorAndSolver(ParFiniteElementSpace& coarse_fespace)
{
- ConstructBilinearForm(coarse_fespace, ess_bdr, false);
+ ConstructBilinearForm(coarse_fespace, false);
HypreParMatrix* hypreCoarseMat = new HypreParMatrix();
- bfs.Last()->FormSystemMatrix(*essentialTrueDofs.Last(), *hypreCoarseMat);
+ bfs[0]->FormSystemMatrix(*essentialTrueDofs[0], *hypreCoarseMat);
amg = new HypreBoomerAMG(*hypreCoarseMat);
amg->SetPrintLevel(-1);
@@ -102,21 +98,21 @@ private:
AddLevel(hypreCoarseMat, pcg, true, true);
}
- void ConstructOperatorAndSmoother(ParFiniteElementSpace& fespace,
- Array& ess_bdr)
+ void ConstructOperatorAndSmoother(ParFiniteElementSpace& fespace, int level)
{
- ConstructBilinearForm(fespace, ess_bdr, true);
+ const Array &ess_tdof_list = *essentialTrueDofs[level];
+ ConstructBilinearForm(fespace, true);
OperatorPtr opr;
opr.SetType(Operator::ANY_TYPE);
- bfs.Last()->FormSystemMatrix(*essentialTrueDofs.Last(), opr);
+ bfs.Last()->FormSystemMatrix(ess_tdof_list, opr);
opr.SetOperatorOwner(false);
Vector diag(fespace.GetTrueVSize());
bfs.Last()->AssembleDiagonal(diag);
- Solver* smoother = new OperatorChebyshevSmoother(*opr, diag,
- *essentialTrueDofs.Last(), 2, fespace.GetParMesh()->GetComm());
+ Solver* smoother = new OperatorChebyshevSmoother(
+ *opr, diag, ess_tdof_list, 2, fespace.GetParMesh()->GetComm());
AddLevel(opr.Ptr(), smoother, true, true);
}
diff --git a/examples/ex37.cpp b/examples/ex37.cpp
index 94566e1d86..229dceca2b 100644
--- a/examples/ex37.cpp
+++ b/examples/ex37.cpp
@@ -102,7 +102,7 @@ double proj(GridFunction &psi, double target_volume, double tol=1e-12,
return int_sigmoid_psi.Sum();
}
-/**
+/*
* ---------------------------------------------------------------
* ALGORITHM PREAMBLE
* ---------------------------------------------------------------
diff --git a/examples/ex37p.cpp b/examples/ex37p.cpp
index 323493322c..fe6d654766 100644
--- a/examples/ex37p.cpp
+++ b/examples/ex37p.cpp
@@ -107,7 +107,7 @@ double proj(ParGridFunction &psi, double target_volume, double tol=1e-12,
return material_volume;
}
-/**
+/*
* ---------------------------------------------------------------
* ALGORITHM PREAMBLE
* ---------------------------------------------------------------
diff --git a/examples/ginkgo/CMakeLists.txt b/examples/ginkgo/CMakeLists.txt
index e460575ca7..a489efe88d 100644
--- a/examples/ginkgo/CMakeLists.txt
+++ b/examples/ginkgo/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/ginkgo/makefile b/examples/ginkgo/makefile
index 6384fb8439..68531a850f 100644
--- a/examples/ginkgo/makefile
+++ b/examples/ginkgo/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/hiop/CMakeLists.txt b/examples/hiop/CMakeLists.txt
index 8a0e9b007e..2274c906f0 100644
--- a/examples/hiop/CMakeLists.txt
+++ b/examples/hiop/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/hiop/makefile b/examples/hiop/makefile
index 8a6fe26ad5..9d1f87bf11 100644
--- a/examples/hiop/makefile
+++ b/examples/hiop/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/makefile b/examples/makefile
index f0cbce70b3..77a13d9b4b 100644
--- a/examples/makefile
+++ b/examples/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/moonolith/CMakeLists.txt b/examples/moonolith/CMakeLists.txt
index 6e321759dd..f02e747dfc 100644
--- a/examples/moonolith/CMakeLists.txt
+++ b/examples/moonolith/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/moonolith/makefile b/examples/moonolith/makefile
index 3efaa23fea..e8d1e68a8a 100644
--- a/examples/moonolith/makefile
+++ b/examples/moonolith/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/petsc/CMakeLists.txt b/examples/petsc/CMakeLists.txt
index 8f3f379c61..a04ee3bb00 100644
--- a/examples/petsc/CMakeLists.txt
+++ b/examples/petsc/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/petsc/makefile b/examples/petsc/makefile
index 03806144e7..4cdab502a0 100644
--- a/examples/petsc/makefile
+++ b/examples/petsc/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/pumi/CMakeLists.txt b/examples/pumi/CMakeLists.txt
index a75d1df6a7..a8e70a5df1 100644
--- a/examples/pumi/CMakeLists.txt
+++ b/examples/pumi/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/pumi/makefile b/examples/pumi/makefile
index 3784da8adf..e122cf332b 100644
--- a/examples/pumi/makefile
+++ b/examples/pumi/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/sundials/CMakeLists.txt b/examples/sundials/CMakeLists.txt
index ce1800a363..ba06626b42 100644
--- a/examples/sundials/CMakeLists.txt
+++ b/examples/sundials/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/sundials/makefile b/examples/sundials/makefile
index 15c5615de4..ce06ed94c1 100644
--- a/examples/sundials/makefile
+++ b/examples/sundials/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/superlu/CMakeLists.txt b/examples/superlu/CMakeLists.txt
index e5964b31e8..d9a6d890ae 100644
--- a/examples/superlu/CMakeLists.txt
+++ b/examples/superlu/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/examples/superlu/makefile b/examples/superlu/makefile
index 59efb8540a..b62f1a10df 100644
--- a/examples/superlu/makefile
+++ b/examples/superlu/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/fem/CMakeLists.txt b/fem/CMakeLists.txt
index e2490e7c6f..fea018a994 100644
--- a/fem/CMakeLists.txt
+++ b/fem/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -25,6 +25,8 @@ set(SRCS
integ/bilininteg_diffusion_ea.cpp
integ/bilininteg_diffusion_patch.cpp
integ/bilininteg_divdiv_pa.cpp
+ integ/bilininteg_elasticity_ea.cpp
+ integ/bilininteg_elasticity_pa.cpp
integ/bilininteg_gradient_pa.cpp
integ/bilininteg_interp_pa.cpp
integ/bilininteg_mass_mf.cpp
@@ -41,6 +43,7 @@ set(SRCS
integ/bilininteg_vectorfediv_pa.cpp
integ/bilininteg_vectorfemass_pa.cpp
integ/bilininteg_diffusion_kernels.cpp
+ integ/bilininteg_elasticity_kernels.cpp
integ/bilininteg_hcurl_kernels.cpp
integ/bilininteg_hdiv_kernels.cpp
integ/bilininteg_hcurlhdiv_kernels.cpp
@@ -153,6 +156,7 @@ set(HDRS
bilinearform_ext.hpp
bilininteg.hpp
integ/bilininteg_diffusion_kernels.hpp
+ integ/bilininteg_elasticity_kernels.hpp
integ/bilininteg_hcurl_kernels.hpp
integ/bilininteg_hdiv_kernels.hpp
integ/bilininteg_hcurlhdiv_kernels.hpp
diff --git a/fem/adios2datacollection.cpp b/fem/adios2datacollection.cpp
index 144fabc8cb..e36065cfae 100644
--- a/fem/adios2datacollection.cpp
+++ b/fem/adios2datacollection.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/adios2datacollection.hpp b/fem/adios2datacollection.hpp
index d7f0a5e143..f8e4be348a 100644
--- a/fem/adios2datacollection.hpp
+++ b/fem/adios2datacollection.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/bilinearform.cpp b/fem/bilinearform.cpp
index 2661ff7f13..bd076d848a 100644
--- a/fem/bilinearform.cpp
+++ b/fem/bilinearform.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -1585,9 +1585,10 @@ void MixedBilinearForm::Assemble(int skip_zeros)
ftr = mesh->GetBdrFaceTransformations(i);
if (ftr)
{
- trial_fes->GetFaceVDofs(ftr->ElementNo, trial_vdofs);
+ const int iface = mesh->GetBdrElementFaceIndex(i);
+ trial_fes->GetFaceVDofs(iface, trial_vdofs);
test_fes->GetElementVDofs(ftr->Elem1No, test_vdofs);
- trial_face_fe = trial_fes->GetFaceElement(ftr->ElementNo);
+ trial_face_fe = trial_fes->GetFaceElement(iface);
test_fe1 = test_fes->GetFE(ftr->Elem1No);
// The test_fe2 object is really a dummy and not used on the
// boundaries, but we can't dereference a NULL pointer, and we don't
diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp
index d4ffd4a376..571174339d 100644
--- a/fem/bilinearform.hpp
+++ b/fem/bilinearform.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -62,24 +62,29 @@ class BilinearForm : public Matrix
friend FABilinearFormExtension;
protected:
- /// Sparse matrix \f$ M \f$ to be associated with the form. Owned.
+ /// Sparse matrix $ M $ to be associated with the form. Owned.
SparseMatrix *mat;
- /** @brief Sparse Matrix \f$ M_e \f$ used to store the eliminations
+ /** @brief Sparse Matrix $ M_e $ used to store the eliminations
from the b.c. Owned.
- \f$ M + M_e = M_{original} \f$ */
+ $ M + M_e = M_{original} $ */
SparseMatrix *mat_e;
/// FE space on which the form lives. Not owned.
FiniteElementSpace *fes;
- /// The assembly level of the form (full, partial, etc.)
+ /** @brief The ::AssemblyLevel of the form (AssemblyLevel::LEGACY,
+ AssemblyLevel::FULL, AssemblyLevel::ELEMENT, AssemblyLevel::PARTIAL) */
AssemblyLevel assembly;
+
/// Element batch size used in the form action (1, 8, num_elems, etc.)
int batch;
- /** @brief Extension for supporting Full Assembly (FA), Element Assembly (EA),
- Partial Assembly (PA), or Matrix Free assembly (MF). */
+
+ /** @brief Extension for supporting Full Assembly (FA),
+ Element Assembly (EA),Partial Assembly (PA),
+ or Matrix Free assembly (MF). */
BilinearFormExtension *ext;
+
/** Indicates if the sparse matrix is sorted after assembly when using
Full Assembly (FA). */
bool sort_sparse_matrix = false;
@@ -95,6 +100,7 @@ protected:
/// Set of Domain Integrators to be applied.
Array domain_integs;
+
/// Element attribute marker (should be of length mesh->attributes.Max() or
/// 0 if mesh->attributes is empty)
/// Includes all by default.
@@ -121,18 +127,24 @@ protected:
StaticCondensation *static_cond; ///< Owned.
Hybridization *hybridization; ///< Owned.
- /** This data member allows one to specify what should be done to the
+ /** @brief This data member allows one to specify what should be done to the
diagonal matrix entries and corresponding RHS values upon elimination of
the constrained DoFs. */
DiagonalPolicy diag_policy;
int precompute_sparsity;
- // Allocate appropriate SparseMatrix and assign it to mat
+
+ /// Allocate appropriate SparseMatrix and assign it to #mat
void AllocMat();
+ /** @brief For partially conforming trial and/or test FE spaces, complete the
+ assembly process by performing $ P^t A P $ where $ A $ is the
+ internal sparse matrix and $ P $ is the conforming prolongation
+ matrix of the trial/test FE space. After this call the
+ BilinearForm becomes an operator on the conforming FE space. */
void ConformingAssemble();
- // may be used in the construction of derived classes
+ /// may be used in the construction of derived classes
BilinearForm() : Matrix (0)
{
fes = NULL; sequence = -1;
@@ -205,9 +217,9 @@ public:
Hybridization *GetHybridization() const { return hybridization; }
/** @brief Enable the use of static condensation. For details see the
- description for class StaticCondensation in fem/staticcond.hpp This method
- should be called before assembly. If the number of unknowns after static
- condensation is not reduced, it is not enabled. */
+ description for class StaticCondensation in fem/staticcond.hpp This
+ method should be called before assembly. If the number of unknowns after
+ static condensation is not reduced, it is not enabled. */
void EnableStaticCondensation();
/** @brief Check if static condensation was actually enabled by a previous
@@ -226,9 +238,9 @@ public:
BilinearFormIntegrator *constr_integ,
const Array &ess_tdof_list);
- /** @brief For scalar FE spaces, precompute the sparsity pattern of the matrix
- (assuming dense element matrices) based on the types of integrators
- present in the bilinear form. */
+ /** @brief For scalar FE spaces, precompute the sparsity pattern of the
+ matrix (assuming dense element matrices) based on the types of
+ integrators present in the bilinear form. */
void UsePrecomputedSparsity(int ps = 1) { precompute_sparsity = ps; }
/** @brief Use the given CSR sparsity pattern to allocate the internal
@@ -245,8 +257,8 @@ public:
/// Use the sparsity of @a A to allocate the internal SparseMatrix.
void UseSparsity(SparseMatrix &A);
- /// Pre-allocate the internal SparseMatrix before assembly.
- /** If the flag 'precompute sparsity'
+ /** @brief Pre-allocate the internal SparseMatrix before assembly.
+ If the internal flag #precompute_sparsity
is set, the matrix is allocated in CSR format (i.e.
finalized) and the entries are initialized with zeros. */
void AllocateMatrix() { if (mat == NULL) { AllocMat(); } }
@@ -254,10 +266,9 @@ public:
/// Access all the integrators added with AddDomainIntegrator().
Array *GetDBFI() { return &domain_integs; }
- /// @brief Access all boundary markers added with AddDomainIntegrator().
- ///
- /// If no marker was specified when the integrator was added, the
- /// corresponding pointer (to Array) will be NULL. */
+ /** @brief Access all boundary markers added with AddDomainIntegrator().
+ If no marker was specified when the integrator was added, the
+ corresponding pointer (to Array) will be NULL. */
Array*> *GetDBFI_Marker() { return &domain_integs_marker; }
/// Access all the integrators added with AddBoundaryIntegrator().
@@ -272,66 +283,71 @@ public:
/// Access all integrators added with AddBdrFaceIntegrator().
Array *GetBFBFI() { return &boundary_face_integs; }
+
/** @brief Access all boundary markers added with AddBdrFaceIntegrator().
If no marker was specified when the integrator was added, the
corresponding pointer (to Array) will be NULL. */
Array*> *GetBFBFI_Marker()
{ return &boundary_face_integs_marker; }
- /// Returns a reference to: \f$ M_{ij} \f$
+ /// Returns a reference to: $ M_{ij} $
const double &operator()(int i, int j) { return (*mat)(i,j); }
- /// Returns a reference to: \f$ M_{ij} \f$
+ /// Returns a reference to: $ M_{ij} $
virtual double &Elem(int i, int j);
- /// Returns constant reference to: \f$ M_{ij} \f$
+ /// Returns constant reference to: $ M_{ij} $
virtual const double &Elem(int i, int j) const;
- /// Matrix vector multiplication: \f$ y = M x \f$
+ /// Matrix vector multiplication: $ y = M x $
virtual void Mult(const Vector &x, Vector &y) const;
/** @brief Matrix vector multiplication with the original uneliminated
- matrix. The original matrix is \f$ M + M_e \f$ so we have:
- \f$ y = M x + M_e x \f$ */
+ matrix. The original matrix is $ M + M_e $ so we have:
+ $ y = M x + M_e x $ */
void FullMult(const Vector &x, Vector &y) const
{ mat->Mult(x, y); mat_e->AddMult(x, y); }
- /// Add the matrix vector multiple to a vector: \f$ y += a M x \f$
+ /// Add the matrix vector multiple to a vector: $ y += a M x $
virtual void AddMult(const Vector &x, Vector &y, const double a = 1.0) const
{ mat -> AddMult (x, y, a); }
/** @brief Add the original uneliminated matrix vector multiple to a vector.
- The original matrix is \f$ M + Me \f$ so we have:
- \f$ y += M x + M_e x \f$ */
+ The original matrix is $ M + Me $ so we have:
+ $ y += M x + M_e x $ */
void FullAddMult(const Vector &x, Vector &y) const
{ mat->AddMult(x, y); mat_e->AddMult(x, y); }
- /// Add the matrix transpose vector multiplication: \f$ y += a M^T x \f$
+ /// Add the matrix transpose vector multiplication: $ y += a M^T x $
virtual void AddMultTranspose(const Vector & x, Vector & y,
const double a = 1.0) const
{ mat->AddMultTranspose(x, y, a); }
/** @brief Add the original uneliminated matrix transpose vector
- multiple to a vector. The original matrix is \f$ M + M_e \f$
- so we have: \f$ y += M^T x + {M_e}^T x \f$ */
+ multiple to a vector. The original matrix is $ M + M_e $
+ so we have: $ y += M^T x + {M_e}^T x $ */
void FullAddMultTranspose(const Vector & x, Vector & y) const
{ mat->AddMultTranspose(x, y); mat_e->AddMultTranspose(x, y); }
- /// Matrix transpose vector multiplication: \f$ y = M^T x \f$
+ /// Matrix transpose vector multiplication: $ y = M^T x $
virtual void MultTranspose(const Vector & x, Vector & y) const;
- /// Compute \f$ y^T M x \f$
+ /// Compute $ y^T M x $
double InnerProduct(const Vector &x, const Vector &y) const
{ return mat->InnerProduct (x, y); }
- /// Returns a pointer to (approximation) of the matrix inverse: \f$ M^{-1} \f$
+ /** @brief Returns a pointer to (approximation) of the matrix inverse:
+ $ M^{-1} $ (currently returns NULL) */
virtual MatrixInverse *Inverse() const;
- /// Finalizes the matrix initialization.
+ /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is
+ AssemblyLevel::LEGACY.
+ THe matrix that gets finalized is different if you are using static
+ condensation or hybridization.*/
virtual void Finalize(int skip_zeros = 1);
- /** @brief Returns a const reference to the sparse matrix: \f$ M \f$
-
+ /** @brief Returns a const reference to the sparse matrix: $ M $
+ *
This will fail if HasSpMat() is false. */
const SparseMatrix &SpMat() const
{
@@ -339,8 +355,8 @@ public:
return *mat;
}
- /** @brief Returns a reference to the sparse matrix: \f$ M \f$
-
+ /** @brief Returns a reference to the sparse matrix: $ M $
+ *
This will fail if HasSpMat() is false. */
SparseMatrix &SpMat()
{
@@ -349,7 +365,7 @@ public:
}
/** @brief Returns true if the sparse matrix is not null, false otherwise.
-
+ *
@sa SpMat(). */
bool HasSpMat()
{
@@ -357,12 +373,12 @@ public:
}
- /** @brief Nullifies the internal matrix \f$ M \f$ and returns a pointer
+ /** @brief Nullifies the internal matrix $ M $ and returns a pointer
to it. Used for transferring ownership. */
SparseMatrix *LoseMat() { SparseMatrix *tmp = mat; mat = NULL; return tmp; }
/** @brief Returns a const reference to the sparse matrix of eliminated b.c.:
- \f$ M_e \f$
+ $ M_e $
This will fail if HasSpMatElim() is false. */
const SparseMatrix &SpMatElim() const
@@ -372,7 +388,7 @@ public:
}
/** @brief Returns a reference to the sparse matrix of eliminated b.c.:
- \f$ M_e \f$
+ $ M_e $
This will fail if HasSpMatElim() is false. */
SparseMatrix &SpMatElim()
@@ -381,8 +397,8 @@ public:
return *mat_e;
}
- /** @brief Returns true if the sparse matrix of eliminated b.c.s is not null,
- false otherwise.
+ /** @brief Returns true if the sparse matrix of eliminated b.c.s is not
+ null, false otherwise.
@sa SpMatElim(). */
bool HasSpMatElim()
@@ -392,6 +408,7 @@ public:
/// Adds new Domain Integrator. Assumes ownership of @a bfi.
void AddDomainIntegrator(BilinearFormIntegrator *bfi);
+
/// Adds new Domain Integrator restricted to certain elements specified by
/// the @a elem_attr_marker.
void AddDomainIntegrator(BilinearFormIntegrator *bfi,
@@ -422,7 +439,7 @@ public:
void AddBdrFaceIntegrator(BilinearFormIntegrator *bfi,
Array &bdr_marker);
- /// Sets all sparse values of \f$ M \f$ and \f$ M_e \f$ to 'a'.
+ /// Sets all sparse values of $ M $ and $ M_e $ to 'a'.
void operator=(const double a)
{
if (mat != NULL) { *mat = a; }
@@ -446,12 +463,15 @@ public:
/// Get the finite element space prolongation operator.
virtual const Operator *GetProlongation() const
{ return fes->GetConformingProlongation(); }
+
/// Get the finite element space restriction operator
virtual const Operator *GetRestriction() const
{ return fes->GetConformingRestriction(); }
+
/// Get the output finite element space prolongation matrix
virtual const Operator *GetOutputProlongation() const
{ return GetProlongation(); }
+
/** @brief Returns the output fe space restriction matrix, transposed
Logically, this is the transpose of GetOutputRestriction, but in
@@ -459,11 +479,12 @@ public:
construction of RAP operators in matrix-free methods. */
virtual const Operator *GetOutputRestrictionTranspose() const
{ return fes->GetRestrictionTransposeOperator(); }
+
/// Get the output finite element space restriction matrix
virtual const Operator *GetOutputRestriction() const
{ return GetRestriction(); }
- /// @brief Compute serial RAP operator and store it in @a A as a SparseMatrix.
+ /// Compute serial RAP operator and store it in @a A as a SparseMatrix.
void SerialRAP(OperatorHandle &A)
{
MFEM_ASSERT(mat, "SerialRAP requires the SparseMatrix to be assembled.");
@@ -595,8 +616,8 @@ public:
/** The boundary element matrix @a elmat is assembled for the boundary
element @a i, i.e. added to the system matrix. The vdofs of the element
are returned in @a vdofs. The flag @a skip_zeros skips the zero elements
- of the matrix, unless they are breaking the symmetry of the system matrix.
- */
+ of the matrix, unless they are breaking the symmetry of the system
+ matrix. */
void AssembleBdrElementMatrix(int i, const DenseMatrix &elmat,
Array &vdofs, int skip_zeros = 1);
@@ -617,24 +638,29 @@ public:
double value);
/// Eliminate the given @a vdofs. NOTE: here, @a vdofs is a list of DOFs.
- /** In this case the eliminations are applied to the internal \f$ M \f$
- and @a rhs without storing the elimination matrix \f$ M_e \f$. */
+ /** In this case the eliminations are applied to the internal $ M $
+ and @a rhs without storing the elimination matrix $ M_e $. */
void EliminateVDofs(const Array &vdofs, const Vector &sol, Vector &rhs,
DiagonalPolicy dpolicy = DIAG_ONE);
- /// Eliminate the given @a vdofs, storing the eliminated part internally in \f$ M_e \f$.
- /** This method works in conjunction with EliminateVDofsInRHS() and allows
+ /** @brief Eliminate the given @a vdofs, storing the eliminated part
+ internally in $ M_e $.
+
+ This method works in conjunction with EliminateVDofsInRHS() and allows
elimination of boundary conditions in multiple right-hand sides. In this
method, @a vdofs is a list of DOFs. */
void EliminateVDofs(const Array &vdofs,
DiagonalPolicy dpolicy = DIAG_ONE);
/** @brief Similar to
- EliminateVDofs(const Array &, const Vector &, Vector &, DiagonalPolicy)
+ EliminateVDofs(const Array &, const Vector &,
+ Vector &, DiagonalPolicy)
but here @a ess_dofs is a marker (boolean) array on all vector-dofs
(@a ess_dofs[i] < 0 is true). */
- void EliminateEssentialBCFromDofs(const Array &ess_dofs, const Vector &sol,
- Vector &rhs, DiagonalPolicy dpolicy = DIAG_ONE);
+ void EliminateEssentialBCFromDofs(const Array &ess_dofs,
+ const Vector &sol,
+ Vector &rhs,
+ DiagonalPolicy dpolicy = DIAG_ONE);
/** @brief Similar to EliminateVDofs(const Array &, DiagonalPolicy) but
here @a ess_dofs is a marker (boolean) array on all vector-dofs
@@ -651,11 +677,13 @@ public:
void EliminateVDofsInRHS(const Array &vdofs, const Vector &x,
Vector &b);
- /// Compute inner product for full uneliminated matrix \f$ y^T M x + y^T M_e x \f$
+ /** @brief Compute inner product for full uneliminated matrix:
+ $ y^T M x + y^T M_e x $ */
double FullInnerProduct(const Vector &x, const Vector &y) const
{ return mat->InnerProduct(x, y) + mat_e->InnerProduct(x, y); }
- /// Update the @a FiniteElementSpace and delete all data associated with the old one.
+ /** @brief Update the @a FiniteElementSpace and delete all data associated
+ with the old one. */
virtual void Update(FiniteElementSpace *nfes = NULL);
/// (DEPRECATED) Return the FE space associated with the BilinearForm.
@@ -664,11 +692,13 @@ public:
/// Return the FE space associated with the BilinearForm.
FiniteElementSpace *FESpace() { return fes; }
+
/// Read-only access to the associated FiniteElementSpace.
const FiniteElementSpace *FESpace() const { return fes; }
- /// Sets diagonal policy used upon construction of the linear system.
- /** Policies include:
+ /** @brief Sets Operator::DiagonalPolicy used upon construction of the
+ linear system.
+ Policies include:
- DIAG_ZERO (Set the diagonal values to zero)
- DIAG_ONE (Set the diagonal values to one)
@@ -679,7 +709,8 @@ public:
/// Indicate that integrators are not owned by the BilinearForm
void UseExternalIntegrators() { extern_bfs = 1; }
- /// Destroys bilinear form.
+ /** @brief Deletes internal matrices, bilinear integrators, and the
+ BilinearFormExtension */
virtual ~BilinearForm();
};
@@ -715,8 +746,10 @@ protected:
Partial Assembly (PA), or Matrix Free assembly (MF). */
MixedBilinearFormExtension *ext;
- /** @brief Indicates the BilinearFormIntegrator%s stored in #domain_integs,
- #boundary_integs, #trace_face_integs and #boundary_trace_face_integs
+ /** @brief Indicates the BilinearFormIntegrator%s stored in
+ MixedBilinearForm#domain_integs, MixedBilinearForm#boundary_integs,
+ MixedBilinearForm#trace_face_integs and
+ MixedBilinearForm#boundary_trace_face_integs
are owned by another MixedBilinearForm. */
int extern_bfs;
@@ -769,39 +802,49 @@ public:
FiniteElementSpace *te_fes,
MixedBilinearForm *mbf);
- /// Returns a reference to: \f$ M_{ij} \f$
+ /// Returns a reference to: $ M_{ij} $
virtual double &Elem(int i, int j);
- /// Returns a reference to: \f$ M_{ij} \f$
+ /// Returns a reference to: $ M_{ij} $
virtual const double &Elem(int i, int j) const;
- /// Matrix multiplication: \f$ y = M x \f$
+ /// Matrix multiplication: $ y = M x $
virtual void Mult(const Vector & x, Vector & y) const;
+ /// Add the matrix vector multiple to a vector: $ y += a M x $
virtual void AddMult(const Vector & x, Vector & y,
const double a = 1.0) const;
+ /// Matrix transpose vector multiplication: $ y = M^T x $
virtual void MultTranspose(const Vector & x, Vector & y) const;
+
+ /// Add the matrix transpose vector multiplication: $ y += a M^T x $
virtual void AddMultTranspose(const Vector & x, Vector & y,
const double a = 1.0) const;
+ /** @brief Returns a pointer to (approximation) of the matrix inverse:
+ $ M^{-1} $ (currently unimplemented and returns NULL)*/
virtual MatrixInverse *Inverse() const;
- /// Finalizes the matrix initialization.
+ /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is
+ AssemblyLevel::LEGACY.*/
virtual void Finalize(int skip_zeros = 1);
- /** Extract the associated matrix as SparseMatrix blocks. The number of
- block rows and columns is given by the vector dimensions (vdim) of the
+ /** @brief Extract the associated matrix as SparseMatrix blocks. The number
+ of block rows and columns is given by the vector dimensions (vdim) of the
test and trial spaces, respectively. */
void GetBlocks(Array2D &blocks) const;
- /// Returns a const reference to the sparse matrix: \f$ M \f$
+ /// Returns a const reference to the sparse matrix: $ M $
+ /** This will segfault if the usual sparse mat is not defined
+ like when static condensation is being used or AllocMat() has
+ not yet been called. */
const SparseMatrix &SpMat() const { return *mat; }
- /// Returns a reference to the sparse matrix: \f$ M \f$
+ /// Returns a reference to the sparse matrix: $ M $
SparseMatrix &SpMat() { return *mat; }
- /** @brief Nullifies the internal matrix \f$ M \f$ and returns a pointer
+ /** @brief Nullifies the internal matrix $ M $ and returns a pointer
to it. Used for transferring ownership. */
SparseMatrix *LoseMat() { SparseMatrix *tmp = mat; mat = NULL; return tmp; }
@@ -822,8 +865,8 @@ public:
/** @brief Add a trace face integrator. Assumes ownership of @a bfi.
This type of integrator assembles terms over all faces of the mesh using
- the face FE from the trial space and the two adjacent volume FEs from the
- test space. */
+ the face FE from the trial space and the two adjacent volume FEs from
+ the test space. */
void AddTraceFaceIntegrator(BilinearFormIntegrator *bfi);
/// Adds a boundary trace face integrator. Assumes ownership of @a bfi.
@@ -842,7 +885,9 @@ public:
/// Access all integrators added with AddBoundaryIntegrator().
Array *GetBBFI() { return &boundary_integs; }
+
/** @brief Access all boundary markers added with AddBoundaryIntegrator().
+
If no marker was specified when the integrator was added, the
corresponding pointer (to Array) will be NULL. */
Array*> *GetBBFI_Marker() { return &boundary_integs_marker; }
@@ -853,17 +898,19 @@ public:
/// Access all integrators added with AddBdrTraceFaceIntegrator().
Array *GetBTFBFI()
{ return &boundary_trace_face_integs; }
- /** @brief Access all boundary markers added with AddBdrTraceFaceIntegrator().
+
+ /** @brief Access all boundary markers added with AddBdrTraceFaceIntegrator()
+
If no marker was specified when the integrator was added, the
corresponding pointer (to Array) will be NULL. */
Array*> *GetBTFBFI_Marker()
{ return &boundary_trace_face_integs_marker; }
- /// Sets all sparse values of \f$ M \f$ to @a a.
+ /// Sets all sparse values of $ M $ to @a a.
void operator=(const double a) { *mat = a; }
/// Set the desired assembly level. The default is AssemblyLevel::LEGACY.
- /** This method must be called before assembly. */
+ /** This method must be called before assembly. See ::AssemblyLevel*/
void SetAssemblyLevel(AssemblyLevel assembly_level);
void Assemble(int skip_zeros = 1);
@@ -888,11 +935,12 @@ public:
virtual const Operator *GetOutputRestriction() const
{ return test_fes->GetRestrictionMatrix(); }
- /** For partially conforming trial and/or test FE spaces, complete the
- assembly process by performing A := P2^t A P1 where A is the internal
- sparse matrix; P1 and P2 are the conforming prolongation matrices of the
- trial and test FE spaces, respectively. After this call the
- MixedBilinearForm becomes an operator on the conforming FE spaces. */
+ /** @brief For partially conforming trial and/or test FE spaces, complete the
+ assembly process by performing $ P2^t A P1 $ where $ A $ is the
+ internal sparse matrix; $ P1 $ and $ P2 $ are the conforming
+ prolongation matrices of the trial and test FE spaces, respectively.
+ After this call the MixedBilinearForm becomes an operator on the
+ conforming FE spaces. */
void ConformingAssemble();
/// Compute the element matrix of the given element
@@ -935,18 +983,29 @@ public:
element @a i, i.e. added to the system matrix. The vdofs of the element
are returned in @a trial_vdofs and @a test_vdofs. The flag @a skip_zeros
skips the zero elements of the matrix, unless they are breaking the
- symmetry of the system matrix.
- */
+ symmetry of the system matrix.*/
void AssembleBdrElementMatrix(int i, const DenseMatrix &elmat,
- Array &trial_vdofs, Array &test_vdofs,
+ Array &trial_vdofs,
+ Array &test_vdofs,
int skip_zeros = 1);
+ /// Eliminate essential boundary DOFs from the columns of the system.
+ /** The array @a bdr_attr_is_ess marks boundary attributes that constitute
+ the essential part of the boundary. All entries in the columns will be
+ set to 0.0 through elimination.*/
void EliminateTrialDofs(const Array &bdr_attr_is_ess,
const Vector &sol, Vector &rhs);
+ /// Eliminate the list of DOFs from the columns of the system.
+ /** @a marked_vdofs is the of colunm numbers that will be eliminated. All
+ entries in the columns will be set to 0.0 through elimination.*/
void EliminateEssentialBCFromTrialDofs(const Array &marked_vdofs,
const Vector &sol, Vector &rhs);
+ /// Eliminate essential boundary DOFs from the rows of the system.
+ /** The array @a bdr_attr_is_ess marks boundary attributes that constitute
+ the essential part of the boundary. All entries in the rows will be
+ set to 0.0 through elimination.*/
virtual void EliminateTestDofs(const Array &bdr_attr_is_ess);
/** @brief Return in @a A that is column-constrained.
@@ -958,13 +1017,12 @@ public:
OperatorHandle &A);
/** @brief Form the column-constrained linear system matrix A.
- See FormRectangularSystemMatrix() for details.
- Version of the method FormRectangularSystemMatrix() where the system matrix is
- returned in the variable @a A, of type OpType, holding a *reference* to
- the system matrix (created with the method OpType::MakeRef()). The
- reference will be invalidated when SetOperatorType(), Update(), or the
- destructor is called. */
+ Version of the method FormRectangularSystemMatrix() where the system
+ matrix is returned in the variable @a A, of type OpType, holding a
+ *reference* to the system matrix (created with the method
+ OpType::MakeRef()). The reference will be invalidated when
+ SetOperatorType(), Update(), or the destructor is called. */
template
void FormRectangularSystemMatrix(const Array &trial_tdof_list,
const Array &test_tdof_list, OpType &A)
@@ -976,12 +1034,12 @@ public:
A.MakeRef(*A_ptr);
}
- /** @brief Form the linear system A X = B, corresponding to this mixed bilinear
- form and the linear form @a b(.).
+ /** @brief Form the linear system A X = B, corresponding to this mixed
+ bilinear form and the linear form @a b(.).
- Return in @a A a *reference* to the system matrix that is column-constrained.
- The reference will be invalidated when SetOperatorType(), Update(), or the
- destructor is called. */
+ Return in @a A a *reference* to the system matrix that is
+ column-constrained. The reference will be invalidated when
+ SetOperatorType(), Update(), or the destructor is called. */
virtual void FormRectangularLinearSystem(const Array &trial_tdof_list,
const Array &test_tdof_list,
Vector &x, Vector &b,
@@ -991,11 +1049,11 @@ public:
/** @brief Form the linear system A X = B, corresponding to this bilinear
form and the linear form @a b(.).
- Version of the method FormRectangularLinearSystem() where the system matrix is
- returned in the variable @a A, of type OpType, holding a *reference* to
- the system matrix (created with the method OpType::MakeRef()). The
- reference will be invalidated when SetOperatorType(), Update(), or the
- destructor is called. */
+ Version of the method FormRectangularLinearSystem() where the system
+ matrix is returned in the variable @a A, of type OpType, holding a
+ *reference* to the system matrix (created with the method
+ OpType::MakeRef()). The reference will be invalidated when
+ SetOperatorType(), Update(), or the destructor is called. */
template
void FormRectangularLinearSystem(const Array &trial_tdof_list,
const Array &test_tdof_list,
@@ -1003,24 +1061,30 @@ public:
OpType &A, Vector &X, Vector &B)
{
OperatorHandle Ah;
- FormRectangularLinearSystem(trial_tdof_list, test_tdof_list, x, b, Ah, X, B);
+ FormRectangularLinearSystem(trial_tdof_list, test_tdof_list, x, b,
+ Ah, X, B);
OpType *A_ptr = Ah.Is();
MFEM_VERIFY(A_ptr, "invalid OpType used");
A.MakeRef(*A_ptr);
}
+ /// Must be called after making changes to #trial_fes or #test_fes.
void Update();
/// Return the trial FE space associated with the BilinearForm.
FiniteElementSpace *TrialFESpace() { return trial_fes; }
+
/// Read-only access to the associated trial FiniteElementSpace.
const FiniteElementSpace *TrialFESpace() const { return trial_fes; }
/// Return the test FE space associated with the BilinearForm.
FiniteElementSpace *TestFESpace() { return test_fes; }
+
/// Read-only access to the associated test FiniteElementSpace.
const FiniteElementSpace *TestFESpace() const { return test_fes; }
+ /** @brief Deletes internal matrices, bilinear integrators, and the
+ BilinearFormExtension */
virtual ~MixedBilinearForm();
};
diff --git a/fem/bilinearform_ext.cpp b/fem/bilinearform_ext.cpp
index 7f523e24f6..1c26575b88 100644
--- a/fem/bilinearform_ext.cpp
+++ b/fem/bilinearform_ext.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -255,9 +255,7 @@ PABilinearFormExtension::PABilinearFormExtension(BilinearForm *form)
void PABilinearFormExtension::SetupRestrictionOperators(const L2FaceValues m)
{
if ( Device::Allows(Backend::CEED_MASK) ) { return; }
- ElementDofOrdering ordering = UsesTensorBasis(*a->FESpace())?
- ElementDofOrdering::LEXICOGRAPHIC:
- ElementDofOrdering::NATIVE;
+ ElementDofOrdering ordering = GetEVectorOrdering(*a->FESpace());
elem_restrict = trial_fes->GetElementRestriction(ordering);
if (elem_restrict)
{
diff --git a/fem/bilinearform_ext.hpp b/fem/bilinearform_ext.hpp
index 97334aa46b..69caf2d428 100644
--- a/fem/bilinearform_ext.hpp
+++ b/fem/bilinearform_ext.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/bilininteg.cpp b/fem/bilininteg.cpp
index 59a35f4606..fa91a77f2c 100644
--- a/fem/bilininteg.cpp
+++ b/fem/bilininteg.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence 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,6 +14,7 @@
#include "fem.hpp"
#include
#include
+#include
using namespace std;
@@ -2948,16 +2949,16 @@ void VectorDiffusionIntegrator::AssembleElementVector(
}
dshape.SetSize(dof, dim);
- dshapedxt.SetSize(dof, dim);
- // pelmat.SetSize(dim);
+ dshapedxt.SetSize(dof, sdim);
+ pelmat.SetSize(dof);
- elvect.SetSize(dim*dof);
+ elvect.SetSize(vdim*dof);
// NOTE: DenseMatrix is in column-major order. This is consistent with
// vectors ordered byNODES. In the resulting DenseMatrix, each column
// corresponds to a particular vdim.
- DenseMatrix mat_in(elfun.GetData(), dof, dim);
- DenseMatrix mat_out(elvect.GetData(), dof, dim);
+ DenseMatrix mat_in(elfun.GetData(), dof, vdim);
+ DenseMatrix mat_out(elvect.GetData(), dof, vdim);
const IntegrationRule *ir = IntRule;
if (ir == NULL)
@@ -3016,6 +3017,12 @@ void VectorDiffusionIntegrator::AssembleElementVector(
}
}
+ElasticityComponentIntegrator::ElasticityComponentIntegrator(
+ ElasticityIntegrator &parent_, int i_, int j_)
+ : parent(parent_),
+ i_block(i_),
+ j_block(j_)
+{ }
void ElasticityIntegrator::AssembleElementMatrix(
const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp
index a4ac630d64..84e4e809df 100644
--- a/fem/bilininteg.hpp
+++ b/fem/bilininteg.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -16,6 +16,8 @@
#include "nonlininteg.hpp"
#include "fespace.hpp"
#include "ceed/interface/util.hpp"
+#include "qfunction.hpp"
+#include
namespace mfem
{
@@ -40,8 +42,6 @@ public:
// make sense for the action of the nonlinear operator (but they all make
// sense for its Jacobian).
- using NonlinearFormIntegrator::AssemblePA;
-
/// Method defining partial assembly.
/** The result of the partial assembly is stored internally so that it can be
used later in the methods AddMultPA() and AddMultTransposePA(). */
@@ -64,7 +64,7 @@ public:
/// Assemble diagonal and add it to Vector @a diag.
virtual void AssembleDiagonalPA(Vector &diag);
- /// Assemble diagonal of \f$ADA^{\mathrm{T}}\f$ (\f$A\f$ is this integrator) and add it to @a diag.
+ /// Assemble diagonal of $A D A^T$ ($A$ is this integrator) and add it to @a diag.
virtual void AssembleDiagonalPA_ADAt(const Vector &D, Vector &diag);
/// Method for partially assembled action.
@@ -137,8 +137,8 @@ public:
DenseMatrix &elmat);
/** Compute the local matrix representation of a bilinear form
- \f$a(u,v)\f$ defined on different trial (given by \f$u\f$) and test
- (given by \f$v\f$) spaces. The rows in the local matrix correspond
+ $a(u,v)$ defined on different trial (given by $u$) and test
+ (given by $v$) spaces. The rows in the local matrix correspond
to the test dofs and the columns -- to the trial dofs. */
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe,
const FiniteElement &test_fe,
@@ -280,7 +280,7 @@ private:
DenseMatrix bfi_elmat;
public:
- TransposeIntegrator (BilinearFormIntegrator *bfi_, int own_bfi_ = 1)
+ TransposeIntegrator(BilinearFormIntegrator *bfi_, int own_bfi_ = 1)
{ bfi = bfi_; own_bfi = own_bfi_; }
virtual void SetIntRule(const IntegrationRule *ir);
@@ -300,8 +300,6 @@ public:
FaceElementTransformations &Trans,
DenseMatrix &elmat);
- using BilinearFormIntegrator::AssemblePA;
-
virtual void AssemblePA(const FiniteElementSpace& fes)
{
bfi->AssemblePA(fes);
@@ -706,9 +704,9 @@ private:
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q u, v)\f$ in either 1D, 2D,
- or 3D and where \f$Q\f$ is an optional scalar coefficient, \f$u\f$ and \f$v\f$ are each in \f$H^1\f$
- or \f$L_2\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (Q u, v)$ in either 1D, 2D,
+ or 3D and where $Q$ is an optional scalar coefficient, $u$ and $v$ are each in $H^1$
+ or $L_2$. */
class MixedScalarMassIntegrator : public MixedScalarIntegrator
{
public:
@@ -717,9 +715,9 @@ public:
: MixedScalarIntegrator(q) { same_calc_shape = true; }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} u, v)\f$ in either 2D, or
- 3D and where \f$\vec{V}\f$ is a vector coefficient, \f$u\f$ is in \f$H^1\f$ or \f$L_2\f$ and \f$v\f$ is in \f$H\f$(curl)
- or \f$H\f$(div). */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} u, v)$ in either 2D, or
+ 3D and where $\vec{V}$ is a vector coefficient, $u$ is in $H^1$ or $L_2$ and $v$ is in $H(curl$
+ or $H(div)$. */
class MixedVectorProductIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -727,8 +725,8 @@ public:
: MixedScalarVectorIntegrator(vq) {}
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q \nabla u, v)\f$ in 1D where Q
- is an optional scalar coefficient, \f$u\f$ is in \f$H^1\f$, and \f$v\f$ is in \f$L_2\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (Q \nabla u, v)$ in 1D where Q
+ is an optional scalar coefficient, $u$ is in $H^1$, and $v$ is in $L_2$. */
class MixedScalarDerivativeIntegrator : public MixedScalarIntegrator
{
public:
@@ -762,8 +760,8 @@ protected:
}
};
-/** Class for integrating the bilinear form \f$a(u,v) := -(Q u, \nabla v)\f$ in 1D where \f$Q\f$
- is an optional scalar coefficient, \f$u\f$ is in \f$L_2\f$, and \f$v\f$ is in \f$H^1\f$. */
+/** Class for integrating the bilinear form $a(u,v) := -(Q u, \nabla v)$ in 1D where $Q$
+ is an optional scalar coefficient, $u$ is in $L_2$, and $v$ is in $H^1$. */
class MixedScalarWeakDerivativeIntegrator : public MixedScalarIntegrator
{
public:
@@ -799,8 +797,8 @@ protected:
}
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q \nabla \cdot u, v)\f$ in either 2D
- or 3D where \f$Q\f$ is an optional scalar coefficient, \f$u\f$ is in \f$H\f$(div), and \f$v\f$ is a
+/** Class for integrating the bilinear form $a(u,v) := (Q \nabla \cdot u, v)$ in either 2D
+ or 3D where $Q$ is an optional scalar coefficient, $u$ is in $H(div)$, and $v$ is a
scalar field. */
class MixedScalarDivergenceIntegrator : public MixedScalarIntegrator
{
@@ -821,7 +819,7 @@ protected:
inline virtual const char * FiniteElementTypeFailureMessage() const
{
return "MixedScalarDivergenceIntegrator: "
- "Trial must be \f$H\f$(div) and the test space must be a "
+ "Trial must be $H(div)$ and the test space must be a "
"scalar field";
}
@@ -836,8 +834,8 @@ protected:
{ trial_fe.CalcPhysDivShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \nabla \cdot u, v)\f$ in either 2D
- or 3D where \f$\vec{V}\f$ is a vector coefficient, \f$u\f$ is in \f$H\f$(div), and \f$v\f$ is in \f$H\f$(div). */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \nabla \cdot u, v)$ in either 2D
+ or 3D where $\vec{V}$ is a vector coefficient, $u$ is in $H(div)$, and $v$ is in $H(div)$. */
class MixedVectorDivergenceIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -873,9 +871,9 @@ protected:
{ scalar_fe.CalcPhysDivShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := -(Q u, \nabla \cdot v)\f$ in either 2D
- or 3D where \f$Q\f$ is an optional scalar coefficient, \f$u\f$ is in \f$L_2\f$ or \f$H^1\f$, and \f$v\f$ is
- in \f$H\f$(div). */
+/** Class for integrating the bilinear form $a(u,v) := -(Q u, \nabla \cdot v)$ in either 2D
+ or 3D where $Q$ is an optional scalar coefficient, $u$ is in $L_2$ or $H^1$, and $v$ is
+ in $H(div)$. */
class MixedScalarWeakGradientIntegrator : public MixedScalarIntegrator
{
public:
@@ -913,9 +911,9 @@ protected:
}
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q \mathrm{curl}(u), v)\f$ in 2D where
- \f$Q\f$ is an optional scalar coefficient, \f$u\f$ is in \f$H\f$(curl), and \f$v\f$ is in \f$L_2\f$ or
- \f$H^1\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (Q \mathrm{curl}(u), v)$ in 2D where
+ $Q$ is an optional scalar coefficient, $u$ is in $H(curl$, and $v$ is in $L_2$ or
+ $H^1$. */
class MixedScalarCurlIntegrator : public MixedScalarIntegrator
{
public:
@@ -967,9 +965,9 @@ protected:
int dim, ne, dofs1D, quad1D, dofs1Dtest;
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q u, \mathrm{curl}(v))\f$ in 2D where
- \f$Q\f$ is an optional scalar coefficient, \f$u\f$ is in \f$L_2\f$ or \f$H^1\f$, and \f$v\f$ is in
- \f$H\f$(curl). Partial assembly (PA) is supported but could be further optimized
+/** Class for integrating the bilinear form $a(u,v) := (Q u, \mathrm{curl}(v))$ in 2D where
+ $Q$ is an optional scalar coefficient, $u$ is in $L_2$ or $H^1$, and $v$ is in
+ $H(curl$. Partial assembly (PA) is supported but could be further optimized
by using more efficient threading and shared memory.
*/
class MixedScalarWeakCurlIntegrator : public MixedScalarIntegrator
@@ -1005,9 +1003,9 @@ protected:
}
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q u, v)\f$ in either 2D or
- 3D and where \f$Q\f$ is an optional coefficient (of type scalar, matrix, or
- diagonal matrix) \f$u\f$ and \f$v\f$ are each in \f$H\f$(curl) or \f$H\f$(div). */
+/** Class for integrating the bilinear form $a(u,v) := (Q u, v)$ in either 2D or
+ 3D and where $Q$ is an optional coefficient (of type scalar, matrix, or
+ diagonal matrix) $u$ and $v$ are each in $H(curl$ or $H(div)$. */
class MixedVectorMassIntegrator : public MixedVectorIntegrator
{
public:
@@ -1020,8 +1018,8 @@ public:
: MixedVectorIntegrator(mq) { same_calc_shape = true; }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times u, v)\f$ in 3D and where
- \f$\vec{V}\f$ is a vector coefficient \f$u\f$ and \f$v\f$ are each in \f$H\f$(curl) or \f$H\f$(div). */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times u, v)$ in 3D and where
+ $\vec{V}$ is a vector coefficient $u$ and $v$ are each in $H(curl$ or $H(div)$. */
class MixedCrossProductIntegrator : public MixedVectorIntegrator
{
public:
@@ -1029,9 +1027,9 @@ public:
: MixedVectorIntegrator(vq, false) { same_calc_shape = true; }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \cdot u, v)\f$ in 2D or 3D and
- where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H\f$(curl) or \f$H\f$(div) and \f$v\f$ is in \f$H^1\f$ or
- \f$L_2\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \cdot u, v)$ in 2D or 3D and
+ where $\vec{V}$ is a vector coefficient $u$ is in $H(curl$ or $H(div)$ and $v$ is in $H^1$ or
+ $L_2$. */
class MixedDotProductIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -1054,9 +1052,9 @@ public:
}
};
-/** Class for integrating the bilinear form \f$a(u,v) := (-\vec{V} \cdot u, \nabla \cdot v)\f$ in 2D or
- 3D and where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H\f$(curl) or \f$H\f$(div) and \f$v\f$ is in
- \f$H\f$(div). */
+/** Class for integrating the bilinear form $a(u,v) := (-\vec{V} \cdot u, \nabla \cdot v)$ in 2D or
+ 3D and where $\vec{V}$ is a vector coefficient $u$ is in $H(curl$ or $H(div)$ and $v$ is in
+ $H(div)$. */
class MixedWeakGradDotIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -1092,8 +1090,8 @@ public:
{ scalar_fe.CalcPhysDivShape(Trans, shape); shape *= -1.0; }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (v \vec{V} \times u, \nabla v)\f$ in 3D and
- where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H\f$(curl) or \f$H\f$(div) and \f$v\f$ is in \f$H^1\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (v \vec{V} \times u, \nabla v)$ in 3D and
+ where $\vec{V}$ is a vector coefficient $u$ is in $H(curl$ or $H(div)$ and $v$ is in $H^1$. */
class MixedWeakDivCrossIntegrator : public MixedVectorIntegrator
{
public:
@@ -1126,9 +1124,9 @@ public:
{ test_fe.CalcPhysDShape(Trans, shape); shape *= -1.0; }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q \nabla u, \nabla v)\f$ in 3D
- or in 2D and where \f$Q\f$ is a scalar or matrix coefficient \f$u\f$ and \f$v\f$ are both in
- \f$H^1\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (Q \nabla u, \nabla v)$ in 3D
+ or in 2D and where $Q$ is a scalar or matrix coefficient $u$ and $v$ are both in
+ $H^1$. */
class MixedGradGradIntegrator : public MixedVectorIntegrator
{
public:
@@ -1184,8 +1182,8 @@ public:
{ test_fe.CalcPhysDShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times \nabla u, \nabla v)\f$ in 3D
- or in 2D and where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ and \f$v\f$ are both in \f$H^1\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times \nabla u, \nabla v)$ in 3D
+ or in 2D and where $\vec{V}$ is a vector coefficient $u$ and $v$ are both in $H^1$. */
class MixedCrossGradGradIntegrator : public MixedVectorIntegrator
{
public:
@@ -1226,9 +1224,9 @@ public:
{ test_fe.CalcPhysDShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q \mathrm{curl}(u), \mathrm{curl}(v))\f$ in 3D
- and where \f$Q\f$ is a scalar or matrix coefficient \f$u\f$ and \f$v\f$ are both in
- \f$H\f$(curl). */
+/** Class for integrating the bilinear form $a(u,v) := (Q \mathrm{curl}(u), \mathrm{curl}(v))$ in 3D
+ and where $Q$ is a scalar or matrix coefficient $u$ and $v$ are both in
+ $H(curl$. */
class MixedCurlCurlIntegrator : public MixedVectorIntegrator
{
public:
@@ -1275,8 +1273,8 @@ public:
{ test_fe.CalcPhysCurlShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times \mathrm{curl}(u), \mathrm{curl}(v))\f$ in 3D
- and where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ and \f$v\f$ are both in \f$H\f$(curl). */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times \mathrm{curl}(u), \mathrm{curl}(v))$ in 3D
+ and where $\vec{V}$ is a vector coefficient $u$ and $v$ are both in $H(curl$. */
class MixedCrossCurlCurlIntegrator : public MixedVectorIntegrator
{
public:
@@ -1319,8 +1317,8 @@ public:
{ test_fe.CalcPhysCurlShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times \mathrm{curl}(u), \nabla \cdot v)\f$ in 3D
- and where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H\f$(curl) and \f$v\f$ is in \f$H^1\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times \mathrm{curl}(u), \nabla \cdot v)$ in 3D
+ and where $\vec{V}$ is a vector coefficient $u$ is in $H(curl$ and $v$ is in $H^1$. */
class MixedCrossCurlGradIntegrator : public MixedVectorIntegrator
{
public:
@@ -1362,8 +1360,8 @@ public:
{ test_fe.CalcPhysDShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (v \times \nabla \cdot u, \mathrm{curl}(v))\f$ in 3D
- and where \f$v\f$ is a scalar coefficient \f$u\f$ is in \f$H^1\f$ and \f$v\f$ is in \f$H\f$(curl). */
+/** Class for integrating the bilinear form $a(u,v) := (v \times \nabla \cdot u, \mathrm{curl}(v))$ in 3D
+ and where $v$ is a scalar coefficient $u$ is in $H^1$ and $v$ is in $H(curl$. */
class MixedCrossGradCurlIntegrator : public MixedVectorIntegrator
{
public:
@@ -1405,9 +1403,9 @@ public:
{ test_fe.CalcPhysCurlShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times u, \mathrm{curl}(v))\f$ in 3D and
- where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H\f$(curl) or \f$H\f$(div) and \f$v\f$ is in
- \f$H\f$(curl). */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times u, \mathrm{curl}(v))$ in 3D and
+ where $\vec{V}$ is a vector coefficient $u$ is in $H(curl$ or $H(div)$ and $v$ is in
+ $H(curl$. */
class MixedWeakCurlCrossIntegrator : public MixedVectorIntegrator
{
public:
@@ -1440,9 +1438,9 @@ public:
{ test_fe.CalcPhysCurlShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times u, \mathrm{curl}(v))\f$ in 2D and
- where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H\f$(curl) or \f$H\f$(div) and \f$v\f$ is in
- \f$H\f$(curl). */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times u, \mathrm{curl}(v))$ in 2D and
+ where $\vec{V}$ is a vector coefficient $u$ is in $H(curl$ or $H(div)$ and $v$ is in
+ $H(curl$. */
class MixedScalarWeakCurlCrossIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -1475,9 +1473,9 @@ public:
}
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times \nabla \cdot u, v)\f$ in 3D or
- in 2D and where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H^1\f$ and \f$v\f$ is in \f$H\f$(curl) or
- \f$H\f$(div). */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times \nabla \cdot u, v)$ in 3D or
+ in 2D and where $\vec{V}$ is a vector coefficient $u$ is in $H^1$ and $v$ is in $H(curl$ or
+ $H(div)$. */
class MixedCrossGradIntegrator : public MixedVectorIntegrator
{
public:
@@ -1515,9 +1513,9 @@ public:
{ test_fe.CalcVShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times \mathrm{curl}(u), v)\f$ in 3D and
- where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H\f$(curl) and \f$v\f$ is in \f$H\f$(curl) or
- \f$H\f$(div). */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times \mathrm{curl}(u), v)$ in 3D and
+ where $\vec{V}$ is a vector coefficient $u$ is in $H(curl$ and $v$ is in $H(curl$ or
+ $H(div)$. */
class MixedCrossCurlIntegrator : public MixedVectorIntegrator
{
public:
@@ -1550,9 +1548,9 @@ public:
{ trial_fe.CalcPhysCurlShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times \mathrm{curl}(u), v)\f$ in 2D and
- where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H\f$(curl) and \f$v\f$ is in \f$H\f$(curl) or
- \f$H\f$(div). */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times \mathrm{curl}(u), v)$ in 2D and
+ where $\vec{V}$ is a vector coefficient $u$ is in $H(curl$ and $v$ is in $H(curl$ or
+ $H(div)$. */
class MixedScalarCrossCurlIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -1585,8 +1583,8 @@ public:
}
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times \nabla \cdot u, v)\f$ in 2D and
- where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H^1\f$ and \f$v\f$ is in \f$H^1\f$ or \f$L_2\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times \nabla \cdot u, v)$ in 2D and
+ where $\vec{V}$ is a vector coefficient $u$ is in $H^1$ and $v$ is in $H^1$ or $L_2$. */
class MixedScalarCrossGradIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -1619,8 +1617,8 @@ public:
{ vector_fe.CalcPhysDShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times u, v)\f$ in 2D and where
- \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H\f$(curl) or \f$H\f$(div) and \f$v\f$ is in \f$H^1\f$ or \f$L_2\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times u, v)$ in 2D and where
+ $\vec{V}$ is a vector coefficient $u$ is in $H(curl$ or $H(div)$ and $v$ is in $H^1$ or $L_2$. */
class MixedScalarCrossProductIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -1644,10 +1642,10 @@ public:
}
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \times u \hat{z}, v)\f$ in 2D and
- where \f$\vec{V}\f$ is a vector coefficient \f$u\f$ is in \f$H^1\f$ or \f$L_2\f$ and \f$v\f$ is in \f$H\f$(curl) or \f$H\f$(div).
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \times u \hat{z}, v)$ in 2D and
+ where $\vec{V}$ is a vector coefficient $u$ is in $H^1$ or $L_2$ and $v$ is in $H(curl$ or $H(div)$.
- \todo Documentation what \f$\hat{z}\f$ is (also missing in https://mfem.org/bilininteg/).
+ \todo Documentation what $\hat{z}$ is (also missing in https://mfem.org/bilininteg/).
*/
class MixedScalarWeakCrossProductIntegrator : public MixedScalarVectorIntegrator
{
@@ -1677,8 +1675,8 @@ public:
{ scalar_fe.CalcPhysShape(Trans, shape); shape *= -1.0; }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (\vec{V} \cdot \nabla u, v)\f$ in 2D or
- 3D and where \f$\vec{V}\f$ is a vector coefficient, \f$u\f$ is in \f$H^1\f$ and \f$v\f$ is in \f$H^1\f$ or \f$L_2\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (\vec{V} \cdot \nabla u, v)$ in 2D or
+ 3D and where $\vec{V}$ is a vector coefficient, $u$ is in $H^1$ and $v$ is in $H^1$ or $L_2$. */
class MixedDirectionalDerivativeIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -1710,8 +1708,8 @@ public:
{ vector_fe.CalcPhysDShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (-\hat{V} \cdot \nabla \cdot u, \nabla \cdot v)\f$ in 2D
- or 3D and where \f$\hat{V}\f$ is a vector coefficient, \f$u\f$ is in \f$H^1\f$ and \f$v\f$ is in \f$H\f$(div). */
+/** Class for integrating the bilinear form $a(u,v) := (-\hat{V} \cdot \nabla \cdot u, \nabla \cdot v)$ in 2D
+ or 3D and where $\hat{V}$ is a vector coefficient, $u$ is in $H^1$ and $v$ is in $H(div)$. */
class MixedGradDivIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -1749,8 +1747,8 @@ public:
{ scalar_fe.CalcPhysDivShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (-\hat{V} \nabla \cdot u, \nabla \cdot v)\f$ in 2D
- or 3D and where \f$\hat{V}\f$ is a vector coefficient, \f$u\f$ is in \f$H\f$(div) and \f$v\f$ is in \f$H^1\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (-\hat{V} \nabla \cdot u, \nabla \cdot v)$ in 2D
+ or 3D and where $\hat{V}$ is a vector coefficient, $u$ is in $H(div)$ and $v$ is in $H^1$. */
class MixedDivGradIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -1789,8 +1787,8 @@ public:
{ scalar_fe.CalcPhysDivShape(Trans, shape); }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (-\hat{V} u, \nabla \cdot v)\f$ in 2D or 3D
- and where \f$\hat{V}\f$ is a vector coefficient, \f$u\f$ is in \f$H^1\f$ or \f$L_2\f$ and \f$v\f$ is in \f$H^1\f$. */
+/** Class for integrating the bilinear form $a(u,v) := (-\hat{V} u, \nabla \cdot v)$ in 2D or 3D
+ and where $\hat{V}$ is a vector coefficient, $u$ is in $H^1$ or $L_2$ and $v$ is in $H^1$. */
class MixedScalarWeakDivergenceIntegrator : public MixedScalarVectorIntegrator
{
public:
@@ -1822,9 +1820,9 @@ public:
{ vector_fe.CalcPhysDShape(Trans, shape); shape *= -1.0; }
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q \nabla u, v)\f$ in either 2D
- or 3D and where \f$Q\f$ is an optional coefficient (of type scalar, matrix, or
- diagonal matrix) \f$u\f$ is in \f$H^1\f$ and \f$v\f$ is in \f$H\f$(curl) or \f$H\f$(div). Partial assembly
+/** Class for integrating the bilinear form $a(u,v) := (Q \nabla u, v)$ in either 2D
+ or 3D and where $Q$ is an optional coefficient (of type scalar, matrix, or
+ diagonal matrix) $u$ is in $H^1$ and $v$ is in $H(curl$ or $H(div)$. Partial assembly
(PA) is supported but could be further optimized by using more efficient
threading and shared memory.
*/
@@ -1851,7 +1849,7 @@ protected:
inline virtual const char * FiniteElementTypeFailureMessage() const
{
return "MixedVectorGradientIntegrator: "
- "Trial spaces must be \f$H^1\f$ and the test space must be a "
+ "Trial spaces must be $H^1$ and the test space must be a "
"vector field in 2D or 3D";
}
@@ -1883,9 +1881,9 @@ private:
int dim, ne, dofs1D, quad1D;
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q \mathrm{curl}(u), v)\f$ in 3D and
- where \f$Q\f$ is an optional coefficient (of type scalar, matrix, or diagonal
- matrix) \f$u\f$ is in \f$H\f$(curl) and \f$v\f$ is in \f$H\f$(div) or \f$H\f$(curl). */
+/** Class for integrating the bilinear form $a(u,v) := (Q \mathrm{curl}(u), v)$ in 3D and
+ where $Q$ is an optional coefficient (of type scalar, matrix, or diagonal
+ matrix) $u$ is in $H(curl$ and $v$ is in $H(div)$ or $H(curl$. */
class MixedVectorCurlIntegrator : public MixedVectorIntegrator
{
public:
@@ -1942,9 +1940,9 @@ private:
int dim, ne, dofs1D, dofs1Dtest,quad1D, testType, trialType, coeffDim;
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q u, \mathrm{curl}(v))\f$ in 3D and
- where \f$Q\f$ is an optional coefficient (of type scalar, matrix, or diagonal
- matrix) \f$u\f$ is in \f$H\f$(div) or \f$H\f$(curl) and \f$v\f$ is in \f$H\f$(curl). */
+/** Class for integrating the bilinear form $a(u,v) := (Q u, \mathrm{curl}(v))$ in 3D and
+ where $Q$ is an optional coefficient (of type scalar, matrix, or diagonal
+ matrix) $u$ is in $H(div)$ or $H(curl$ and $v$ is in $H(curl$. */
class MixedVectorWeakCurlIntegrator : public MixedVectorIntegrator
{
public:
@@ -1999,9 +1997,9 @@ private:
int dim, ne, dofs1D, quad1D, testType, trialType, coeffDim;
};
-/** Class for integrating the bilinear form \f$a(u,v) := - (Q u, \nabla v)\f$ in either
- 2D or 3D and where \f$Q\f$ is an optional coefficient (of type scalar, matrix, or
- diagonal matrix) \f$u\f$ is in \f$H\f$(div) or \f$H\f$(curl) and \f$v\f$ is in \f$H^1\f$. */
+/** Class for integrating the bilinear form $a(u,v) := - (Q u, \nabla v)$ in either
+ 2D or 3D and where $Q$ is an optional coefficient (of type scalar, matrix, or
+ diagonal matrix) $u$ is in $H(div)$ or $H(curl$ and $v$ is in $H^1$. */
class MixedVectorWeakDivergenceIntegrator : public MixedVectorIntegrator
{
public:
@@ -2041,11 +2039,11 @@ protected:
}
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q \nabla u, v)\f$ where \f$Q\f$ is a
- scalar coefficient, \f$u\f$ is in (\f$H^1\f$), and \f$v\f$ is a vector with components
- \f$v_i\f$ in (\f$H^1\f$) or (\f$L^2\f$).
+/** Class for integrating the bilinear form $a(u,v) := (Q \nabla u, v)$ where $Q$ is a
+ scalar coefficient, $u$ is in ($H^1$), and $v$ is a vector with components
+ $v_i$ in ($H^1$) or ($L^2$).
- See also MixedVectorGradientIntegrator when \f$v\f$ is in \f$H\f$(curl). */
+ See also MixedVectorGradientIntegrator when $v$ is in $H(curl$. */
class GradientIntegrator : public BilinearFormIntegrator
{
protected:
@@ -2092,7 +2090,7 @@ public:
ElementTransformation &Trans);
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q \nabla u, \nabla v)\f$ where \f$Q\f$
+/** Class for integrating the bilinear form $a(u,v) := (Q \nabla u, \nabla v)$ where $Q$
can be a scalar or a matrix coefficient. */
class DiffusionIntegrator: public BilinearFormIntegrator
{
@@ -2228,10 +2226,9 @@ public:
ElementTransformation &Trans,
Vector &flux, Vector *d_energy = NULL);
- using BilinearFormIntegrator::AssemblePA;
-
virtual void AssembleMF(const FiniteElementSpace &fes);
+ using BilinearFormIntegrator::AssemblePA;
virtual void AssemblePA(const FiniteElementSpace &fes);
virtual void AssembleEA(const FiniteElementSpace &fes, Vector &emat,
@@ -2259,7 +2256,7 @@ public:
Coefficient *GetCoefficient() const { return Q; }
};
-/** Class for local mass matrix assembling \f$a(u,v) := (Q u, v)\f$ */
+/** Class for local mass matrix assembling $a(u,v) := (Q u, v)$ */
class MassIntegrator: public BilinearFormIntegrator
{
friend class DGMassInverse;
@@ -2294,10 +2291,9 @@ public:
ElementTransformation &Trans,
DenseMatrix &elmat);
- using BilinearFormIntegrator::AssemblePA;
-
virtual void AssembleMF(const FiniteElementSpace &fes);
+ using BilinearFormIntegrator::AssemblePA;
virtual void AssemblePA(const FiniteElementSpace &fes);
virtual void AssemblePABoundary(const FiniteElementSpace &fes);
@@ -2324,21 +2320,20 @@ public:
const Coefficient *GetCoefficient() const { return Q; }
};
-/** Mass integrator \f$(u, v)\f$ restricted to the boundary of a domain */
+/** Mass integrator $(u, v)$ restricted to the boundary of a domain */
class BoundaryMassIntegrator : public MassIntegrator
{
public:
BoundaryMassIntegrator(Coefficient &q) : MassIntegrator(q) { }
using BilinearFormIntegrator::AssembleFaceMatrix;
-
virtual void AssembleFaceMatrix(const FiniteElement &el1,
const FiniteElement &el2,
FaceElementTransformations &Trans,
DenseMatrix &elmat);
};
-/// \f$ \alpha (Q \cdot \nabla u, v)\f$
+/// $\alpha (Q \cdot \nabla u, v)$
class ConvectionIntegrator : public BilinearFormIntegrator
{
protected:
@@ -2364,10 +2359,9 @@ public:
ElementTransformation &,
DenseMatrix &);
- using BilinearFormIntegrator::AssemblePA;
-
virtual void AssembleMF(const FiniteElementSpace &fes);
+ using BilinearFormIntegrator::AssemblePA;
virtual void AssemblePA(const FiniteElementSpace&);
virtual void AssembleEA(const FiniteElementSpace &fes, Vector &emat,
@@ -2396,7 +2390,7 @@ public:
// Alias for @ConvectionIntegrator.
using NonconservativeConvectionIntegrator = ConvectionIntegrator;
-/// \f$-\alpha (u, q \cdot \nabla v)\f$, negative transpose of ConvectionIntegrator
+/// $-\alpha (u, q \cdot \nabla v)$, negative transpose of ConvectionIntegrator
class ConservativeConvectionIntegrator : public TransposeIntegrator
{
public:
@@ -2404,7 +2398,7 @@ public:
: TransposeIntegrator(new ConvectionIntegrator(q, -a)) { }
};
-/// \f$ \alpha (Q \cdot \nabla u, v)\f$ using the "group" FE discretization
+/// $\alpha (Q \cdot \nabla u, v)$ using the "group" FE discretization
class GroupConvectionIntegrator : public BilinearFormIntegrator
{
protected:
@@ -2423,8 +2417,8 @@ public:
DenseMatrix &);
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q u, v)\f$,
- where \f$ u=(u_1,\dots,u_n) \f$ and \f$ v=(v_1,\dots,v_n)\f$, \f$u_i\f$ and \f$v_i\f$ are defined
+/** Class for integrating the bilinear form $a(u,v) := (Q u, v)$,
+ where $u=(u_1,\dots,u_n)$ and $v=(v_1,\dots,v_n)$, $u_i$ and $v_i$ are defined
by scalar FE through standard transformation. */
class VectorMassIntegrator: public BilinearFormIntegrator
{
@@ -2485,10 +2479,10 @@ public:
};
-/** Class for integrating \f$(\nabla \cdot u, p)\f$ where \f$u\f$ is a vector field given by
- VectorFiniteElement through Piola transformation (for Raviart-Thomas elements); \f$p\f$ is
+/** Class for integrating $(\nabla \cdot u, p)$ where $u$ is a vector field given by
+ VectorFiniteElement through Piola transformation (for Raviart-Thomas elements); $p$ is
scalar function given by FiniteElement through standard transformation.
- Here, \f$u\f$ is the trial function and \f$p\f$ is the test function.
+ Here, $u$ is the trial function and $p$ is the test function.
Note: if the test space does not have map type INTEGRAL, then the element
matrix returned by AssembleElementMatrix2 will not depend on the
@@ -2532,8 +2526,8 @@ public:
};
-/** Integrator for \f$(-Q u, \nabla v)\f$ for Nedelec (\f$u\f$) and \f$H^1\f$ (\f$v\f$) elements.
- This is equivalent to a weak divergence of the \f$H\f$(curl) basis functions. */
+/** Integrator for $(-Q u, \nabla v)$ for Nedelec ($u$) and $H^1$ ($v$) elements.
+ This is equivalent to a weak divergence of the $H(curl$ basis functions. */
class VectorFEWeakDivergenceIntegrator: public BilinearFormIntegrator
{
protected:
@@ -2559,8 +2553,8 @@ public:
DenseMatrix &elmat);
};
-/** Integrator for \f$(\mathrm{curl}(u), v)\f$ for Nedelec and Raviart-Thomas elements. If the trial and
- test spaces are switched, assembles the form \f$(u, \mathrm{curl}(v))\f$. */
+/** Integrator for $(\mathrm{curl}(u), v)$ for Nedelec and Raviart-Thomas elements. If the trial and
+ test spaces are switched, assembles the form $(u, \mathrm{curl}(v))$. */
class VectorFECurlIntegrator: public BilinearFormIntegrator
{
protected:
@@ -2585,7 +2579,7 @@ public:
DenseMatrix &elmat);
};
-/// Class for integrating \f$ (Q \partial_i(u), v) \f$ where \f$u\f$ and \f$v\f$ are scalars
+/// Class for integrating $ (Q \partial_i(u), v) $ where $u$ and $v$ are scalars
class DerivativeIntegrator : public BilinearFormIntegrator
{
protected:
@@ -2608,7 +2602,7 @@ public:
DenseMatrix &elmat);
};
-/// Integrator for \f$(\mathrm{curl}(u), \mathrm{curl}(v))\f$ for Nedelec elements
+/// Integrator for $(\mathrm{curl}(u), \mathrm{curl}(v))$ for Nedelec elements
class CurlCurlIntegrator: public BilinearFormIntegrator
{
private:
@@ -2673,7 +2667,7 @@ public:
const Coefficient *GetCoefficient() const { return Q; }
};
-/** Integrator for \f$(\mathrm{curl}(u), \mathrm{curl}(v))\f$ for FE spaces defined by 'dim' copies of a
+/** Integrator for $(\mathrm{curl}(u), \mathrm{curl}(v))$ for FE spaces defined by 'dim' copies of a
scalar FE space. */
class VectorCurlCurlIntegrator: public BilinearFormIntegrator
{
@@ -2694,19 +2688,19 @@ public:
virtual void AssembleElementMatrix(const FiniteElement &el,
ElementTransformation &Trans,
DenseMatrix &elmat);
- /// Compute element energy: \f$ \frac{1}{2} (\mathrm{curl}(u), \mathrm{curl}(u))_E\f$
+ /// Compute element energy: $ \frac{1}{2} (\mathrm{curl}(u), \mathrm{curl}(u))_E$
virtual double GetElementEnergy(const FiniteElement &el,
ElementTransformation &Tr,
const Vector &elfun);
};
-/** Class for integrating the bilinear form \f$a(u,v) := (Q \mathrm{curl}(u), v)\f$ where \f$Q\f$ is
- an optional scalar coefficient, and \f$v\f$ is a vector with components \f$v_i\f$ in
- the \f$L_2\f$ or \f$H^1\f$ space. This integrator handles 3 cases:
- 1. u ∈ \f$H\f$(curl) in 3D, \f$v\f$ is a 3D vector with components \f$v_i\f$ in \f$L^2\f$ or \f$H^1\f$
- 2. u ∈ \f$H\f$(curl) in 2D, \f$v\f$ is a scalar field in \f$L^2\f$ or \f$H^1\f$
- 3. u is a scalar field in \f$H^1\f$, i.e, \f$\mathrm{curl}(u) := \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}\f$, \f$\nabla u\f$ and \f$v\f$ is a
- 2D vector field with components \f$v_i\f$ in \f$L^2\f$ or \f$H^1\f$ space.
+/** Class for integrating the bilinear form $a(u,v) := (Q \mathrm{curl}(u), v)$ where $Q$ is
+ an optional scalar coefficient, and $v$ is a vector with components $v_i$ in
+ the $L_2$ or $H^1$ space. This integrator handles 3 cases:
+ 1. u ∈ $H(curl$ in 3D, $v$ is a 3D vector with components $v_i$ in $L^2$ or $H^1$
+ 2. u ∈ $H(curl$ in 2D, $v$ is a scalar field in $L^2$ or $H^1$
+ 3. u is a scalar field in $H^1$, i.e, $\mathrm{curl}(u) := \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}$, $\nabla u$ and $v$ is a
+ 2D vector field with components $v_i$ in $L^2$ or $H^1$ space.
Note: Case 2 can also be handled by MixedScalarCurlIntegrator */
class MixedCurlIntegrator : public BilinearFormIntegrator
@@ -2730,10 +2724,10 @@ public:
DenseMatrix &elmat);
};
-/** Integrator for \f$(Q u, v)\f$, where \f$Q\f$ is an optional coefficient (of type scalar,
- vector (diagonal matrix), or matrix), trial function \f$u\f$ is in \f$H\f$(curl) or
- \f$H\f$(div), and test function \f$v\f$ is in \f$H\f$(curl), \f$H\f$(div), or \f$v=(v_1,\dots,v_n)\f$, where
- \f$v_i\f$ are in \f$H^1\f$. */
+/** Integrator for $(Q u, v)$, where $Q$ is an optional coefficient (of type scalar,
+ vector (diagonal matrix), or matrix), trial function $u$ is in $H(curl$ or
+ $H(div)$, and test function $v$ is in $H(curl$, $H(div)$, or $v=(v_1,\dots,v_n)$, where
+ $v_i$ are in $H^1$. */
class VectorFEMassIntegrator: public BilinearFormIntegrator
{
private:
@@ -2781,7 +2775,6 @@ public:
ElementTransformation &Trans,
DenseMatrix &elmat);
- using BilinearFormIntegrator::AssemblePA;
virtual void AssemblePA(const FiniteElementSpace &fes);
virtual void AssemblePA(const FiniteElementSpace &trial_fes,
const FiniteElementSpace &test_fes);
@@ -2792,8 +2785,8 @@ public:
const Coefficient *GetCoefficient() const { return Q; }
};
-/** Integrator for \f$(Q \nabla \cdot u, v)\f$ where \f$u=(u_1,\cdots,u_n)\f$ and all \f$u_i\f$ are in the same
- scalar FE space; \f$v\f$ is also in a (different) scalar FE space. */
+/** Integrator for $(Q \nabla \cdot u, v)$ where $u=(u_1,\cdots,u_n)$ and all $u_i$ are in the same
+ scalar FE space; $v$ is also in a (different) scalar FE space. */
class VectorDivergenceIntegrator : public BilinearFormIntegrator
{
protected:
@@ -2840,7 +2833,7 @@ public:
ElementTransformation &Trans);
};
-/// \f$(Q \nabla \cdot u, \nabla \cdot v)\f$ for Raviart-Thomas elements
+/// $(Q \nabla \cdot u, \nabla \cdot v)$ for Raviart-Thomas elements
class DivDivIntegrator: public BilinearFormIntegrator
{
protected:
@@ -2881,10 +2874,10 @@ public:
};
/** Integrator for
- \f[
+ $$
(Q \nabla u, \nabla v) = \sum_i (Q \nabla u_i, \nabla v_i) e_i e_i^{\mathrm{T}}
- \f]
- for vector FE spaces, where \f$e_i\f$ is the unit vector in the \f$i\f$-th direction.
+ $$
+ for vector FE spaces, where $e_i$ is the unit vector in the $i$-th direction.
The resulting local element matrix is square, of size vdim*dof ,
where \c vdim is the vector dimension space and \c dof is the local degrees
of freedom. The integrator is not aware of the true vector dimension and
@@ -2945,7 +2938,7 @@ public:
\c Vector.
The element matrix is block-diagonal and each block is integrated with
- coefficient \f$q_{i}\f$.
+ coefficient $q_{i}$.
If the vector dimension does not match the true dimension of the space,
the resulting element matrix will be mathematically invalid. */
@@ -2957,7 +2950,7 @@ public:
\c Matrix.
The element matrix is populated in each block. Each block is integrated
- with coefficient \f$q_{ij}\f$.
+ with coefficient $q_{ij}$.
If the vector dimension does not match the true dimension of the space,
the resulting element matrix will be mathematically invalid. */
@@ -2981,14 +2974,16 @@ public:
};
/** Integrator for the linear elasticity form:
- \f[
+ $$
a(u,v) = (\lambda \mathrm{div}(u), \mathrm{div}(v)) + (2 \mu \varepsilon(u), \varepsilon(v)),
- \f]
- where \f$\varepsilon(v) = \frac{1}{2} (\mathrm{grad}(v) + \mathrm{grad}(v)^{\mathrm{T}})\f$.
+ $$
+ where $\varepsilon(v) = \frac{1}{2} (\mathrm{grad}(v) + \mathrm{grad}(v)^{\mathrm{T}})$.
This is a 'Vector' integrator, i.e. defined for FE spaces
using multiple copies of a scalar FE space. */
class ElasticityIntegrator : public BilinearFormIntegrator
{
+ friend class ElasticityComponentIntegrator;
+
protected:
double q_lambda, q_mu;
Coefficient *lambda, *mu;
@@ -3000,24 +2995,49 @@ private:
Vector divshape;
#endif
+ // PA extension
+
+ const DofToQuad *maps; ///< Not owned
+ const GeometricFactors *geom; ///< Not owned
+ int vdim, ndofs;
+ const FiniteElementSpace *fespace; ///< Not owned.
+
+ std::unique_ptr q_space;
+ /// Coefficients projected onto q_space
+ std::unique_ptr lambda_quad, mu_quad;
+ /// Workspace vector
+ std::unique_ptr q_vec;
+
+ /// Set up the quadrature space and project lambda and mu coefficients
+ void SetUpQuadratureSpaceAndCoefficients(const FiniteElementSpace &fes);
+
public:
ElasticityIntegrator(Coefficient &l, Coefficient &m)
{ lambda = &l; mu = &m; }
- /** With this constructor \f$\lambda = q_l * m\f$ and \f$\mu = q_m * m\f$
- if \f$dim * q_l + 2 * q_m = 0\f$ then \f$\tr(\sigma) = 0\f$. */
+ /** With this constructor $\lambda = q_l m$ and $\mu = q_m m$
+ if $dim q_l + 2 q_m = 0$ then $tr(\sigma) = 0$. */
ElasticityIntegrator(Coefficient &m, double q_l, double q_m)
{ lambda = NULL; mu = &m; q_lambda = q_l; q_mu = q_m; }
- virtual void AssembleElementMatrix(const FiniteElement &,
- ElementTransformation &,
- DenseMatrix &);
+ virtual void AssembleElementMatrix(const FiniteElement &el,
+ ElementTransformation &Tr,
+ DenseMatrix &elmat);
- /** Compute the stress corresponding to the local displacement @a \f$u\f$ and
+ using BilinearFormIntegrator::AssemblePA;
+ virtual void AssemblePA(const FiniteElementSpace &fes);
+
+ virtual void AssembleDiagonalPA(Vector &diag);
+
+ virtual void AddMultPA(const Vector &x, Vector &y) const;
+
+ virtual void AddMultTransposePA(const Vector &x, Vector &y) const;
+
+ /** Compute the stress corresponding to the local displacement @a $u$ and
interpolate it at the nodes of the given @a fluxelem. Only the symmetric
part of the stress is stored, so that the size of @a flux is equal to
the number of DOFs in @a fluxelem times dim*(dim+1)/2. In 2D, the order
- of the stress components is: \f$s_xx, s_yy, s_xy\f$. In 3D, it is: \f$s_xx, s_yy,
- s_zz, s_xy, s_xz, s_yz\f$. In other words, @a flux is the local vector for
+ of the stress components is: $s_xx, s_yy, s_xy$. In 3D, it is: $s_xx, s_yy,
+ s_zz, s_xy, s_xz, s_yz$. In other words, @a flux is the local vector for
a FE space with dim*(dim+1)/2 vector components, based on the finite
element @a fluxelem. The integration rule is taken from @a fluxelem.
@a ir exists to specific an alternative integration rule. */
@@ -3035,39 +3055,71 @@ public:
dim*(dim+1)/2 vector components, based on the finite element @a fluxelem.
The number of components, dim*(dim+1)/2 is such that it represents the
symmetric part of the (symmetric) stress tensor. The order of the
- components is: \f$s_xx, s_yy, s_xy\f$ in 2D, and \f$s_xx, s_yy, s_zz, s_xy, s_xz,
- s_yz\f$ in 3D. */
+ components is: $s_xx, s_yy, s_xy$ in 2D, and $s_xx, s_yy, s_zz, s_xy, s_xz,
+ s_yz$ in 3D. */
virtual double ComputeFluxEnergy(const FiniteElement &fluxelem,
ElementTransformation &Trans,
Vector &flux, Vector *d_energy = NULL);
};
-/** Integrator for the DG form:
- \f[
- \alpha \langle \rho_u (u \cdot n) \{v\},[w] \rangle + \beta \langle \rho_u |u \cdot n| [v],[w] \rangle,
- \f]
- where \f$v\f$ and \f$w\f$ are the trial and test variables, respectively, and \f$\rho\f$/\f$u\f$ are
- given scalar/vector coefficients. \f$\{v\}\f$ represents the average value of \f$v\f$ on
- the face and \f$[v]\f$ is the jump such that \f$\{v\}=(v_1+v_2)/2\f$ and \f$[v]=(v_1-v_2)\f$ for the
- face between elements \f$1\f$ and \f$2\f$. For boundary elements, \f$v2=0\f$. The vector
- coefficient, \f$u\f$, is assumed to be continuous across the faces and when given
- the scalar coefficient, \f$\rho\f$, is assumed to be discontinuous. The integrator
- uses the upwind value of \f$\rho\f$, denoted by \f$\rho_u\f$, which is value from the side into which
- the vector coefficient, \f$u\f$, points.
+/// @brief Integrator that computes the PA action of one of the blocks in an
+/// ElasticityIntegrator, considering the elasticity operator as a dim x dim
+/// block operator.
+class ElasticityComponentIntegrator : public BilinearFormIntegrator
+{
+ ElasticityIntegrator &parent;
+ const int i_block;
+ const int j_block;
- One use case for this integrator is to discretize the operator \f$-u \cdot \nabla v\f$
+ const DofToQuad *maps; ///< Not owned
+ const GeometricFactors *geom; ///< Not owned
+ const FiniteElementSpace *fespace; ///< Not owned.
+
+public:
+ /// @brief Given an ElasticityIntegrator, create an integrator that
+ /// represents the $(i,j)$th component block.
+ ///
+ /// @note The parent ElasticityIntegrator must remain valid throughout the
+ /// lifetime of this integrator.
+ ElasticityComponentIntegrator(ElasticityIntegrator &parent_, int i_, int j_);
+
+ using BilinearFormIntegrator::AssemblePA;
+ virtual void AssemblePA(const FiniteElementSpace &fes);
+
+ virtual void AssembleEA(const FiniteElementSpace &fes, Vector &emat,
+ const bool add = true);
+
+ virtual void AddMultPA(const Vector &x, Vector &y) const;
+
+ virtual void AddMultTransposePA(const Vector &x, Vector &y) const;
+};
+
+/** Integrator for the DG form:
+ $$
+ \alpha \langle \rho_u (u \cdot n) \{v\},[w] \rangle + \beta \langle \rho_u |u \cdot n| [v],[w] \rangle,
+ $$
+ where $v$ and $w$ are the trial and test variables, respectively, and $\rho$/$u$ are
+ given scalar/vector coefficients. $\{v\}$ represents the average value of $v$ on
+ the face and $[v]$ is the jump such that $\{v\}=(v_1+v_2)/2$ and $[v]=(v_1-v_2)$ for the
+ face between elements $1$ and $2$. For boundary elements, $v2=0$. The vector
+ coefficient, $u$, is assumed to be continuous across the faces and when given
+ the scalar coefficient, $\rho$, is assumed to be discontinuous. The integrator
+ uses the upwind value of $\rho$, denoted by $\rho_u$, which is value from the side into which
+ the vector coefficient, $u$, points.
+
+ One use case for this integrator is to discretize the operator $-u \cdot \nabla v$
with a DG formulation. The resulting formulation uses the
- ConvectionIntegrator (with coefficient \f$u\f$, and parameter \f$\alpha = -1\f$) and the
- transpose of the DGTraceIntegrator (with coefficient \f$u\f$, and parameters \f$\alpha
- = 1\f$, \f$\beta = -1/2\f$ to use the upwind face flux, see also
+ ConvectionIntegrator (with coefficient $u$, and parameter $\alpha = -1$) and the
+ transpose of the DGTraceIntegrator (with coefficient $u$, and parameters $\alpha = 1$,
+ $\beta = -1/2$ to use the upwind face flux, see also
NonconservativeDGTraceIntegrator). This discretization and the handling of
the inflow and outflow boundaries is illustrated in Example 9/9p.
- Another use case for this integrator is to discretize the operator \f$-\mathrm{div}(u v)\f$
+ Another use case for this integrator is to discretize the operator $-\mathrm{div}(u v)$
with a DG formulation. The resulting formulation is conservative and
- consists of the ConservativeConvectionIntegrator (with coefficient \f$u\f$, and
- parameter \f$\alpha = -1\f$) plus the DGTraceIntegrator (with coefficient \f$u\f$, and
- parameters \f$\alpha = -1\f$, \f$\beta = -1/2\f$ to use the upwind face flux).
+ consists of the ConservativeConvectionIntegrator (with coefficient $u$, and
+ parameter $\alpha = -1$) plus the DGTraceIntegrator (with coefficient $u$, and
+ parameters $\alpha = -1$, $\beta = -1/2$ to use the upwind face flux).
*/
class DGTraceIntegrator : public BilinearFormIntegrator
{
@@ -3085,11 +3137,11 @@ private:
Vector shape1, shape2;
public:
- /// Construct integrator with \f$\rho = 1\f$, \f$\beta = \alpha/2\f$.
+ /// Construct integrator with $\rho = 1$, $\beta = \alpha/2$.
DGTraceIntegrator(VectorCoefficient &u_, double a)
{ rho = NULL; u = &u_; alpha = a; beta = 0.5*a; }
- /// Construct integrator with \f$\rho = 1\f$.
+ /// Construct integrator with $\rho = 1$.
DGTraceIntegrator(VectorCoefficient &u_, double a, double b)
{ rho = NULL; u = &u_; alpha = a; beta = b; }
@@ -3103,8 +3155,6 @@ public:
FaceElementTransformations &Trans,
DenseMatrix &elmat);
- using BilinearFormIntegrator::AssemblePA;
-
virtual void AssemblePAInteriorFaces(const FiniteElementSpace &fes);
virtual void AssemblePABoundaryFaces(const FiniteElementSpace &fes);
@@ -3134,9 +3184,9 @@ using ConservativeDGTraceIntegrator = DGTraceIntegrator;
/** Integrator that represents the face terms used for the non-conservative
DG discretization of the convection equation:
- \f[
+ $$
-\alpha \langle \rho_u (u \cdot n) \{v\},[w] \rangle + \beta \langle \rho_u |u \cdot n| [v],[w] \rangle.
- \f]
+ $$
This integrator can be used with together with ConvectionIntegrator to
implement an upwind DG discretization in non-conservative form, see ex9 and
ex9p. */
@@ -3155,17 +3205,17 @@ public:
};
/** Integrator for the DG form:
- \f[
+ $$
- \langle \{(Q \nabla u) \cdot n\}, [v] \rangle + \sigma \langle [u], \{(Q \nabla v) \cdot n \} \rangle
+ \kappa \langle \{h^{-1} Q\} [u], [v] \rangle
- \f]
- where \f$Q\f$ is a scalar or matrix diffusion coefficient and \f$u\f$, \f$v\f$ are the trial
- and test spaces, respectively. The parameters \f$\sigma\f$ and \f$\kappa\f$ determine the
+ $$
+ where $Q$ is a scalar or matrix diffusion coefficient and $u$, $v$ are the trial
+ and test spaces, respectively. The parameters $\sigma$ and $\kappa$ determine the
DG method to be used (when this integrator is added to the "broken"
DiffusionIntegrator):
- - \f$\sigma = -1\f$, \f$\kappa \geq \kappa_0\f$: symm. interior penalty (IP or SIPG) method,
- - \f$\sigma = +1\f$, \f$\kappa > 0\f$: non-symmetric interior penalty (NIPG) method,
- - \f$\sigma = +1\f$, \f$\kappa = 0\f$: the method of Baumann and Oden.
+ - $\sigma = -1$, $\kappa \geq \kappa_0$: symm. interior penalty (IP or SIPG) method,
+ - $\sigma = +1$, $\kappa > 0$: non-symmetric interior penalty (NIPG) method,
+ - $\sigma = +1$, $\kappa = 0$: the method of Baumann and Oden.
\todo Clarify used notation. */
class DGDiffusionIntegrator : public BilinearFormIntegrator
@@ -3194,11 +3244,11 @@ public:
};
/** Integrator for the "BR2" diffusion stabilization term
- \f[
+ $$
\sum_e \eta (r_e([u]), r_e([v]))
- \f]
- where \f$r_e\f$ is the lifting operator defined on each edge \f$e\f$ (potentially
- weighted by a coefficient \f$Q\f$). The parameter eta can be chosen to be one to
+ $$
+ where $r_e$ is the lifting operator defined on each edge $e$ (potentially
+ weighted by a coefficient $Q$). The parameter eta can be chosen to be one to
obtain a stable discretization. The constructor for this integrator requires
the finite element space because the lifting operator depends on the
element-wise inverse mass matrix.
@@ -3260,52 +3310,52 @@ public:
Crouzeix-Raviart %Element: Application to Elasticity, PREPRINT 2000-09,
p.3
- \f[
+ $$
- \left< \{ \tau(u) \}, [v] \right> + \alpha \left< \{ \tau(v) \}, [u]
\right> + \kappa \left< h^{-1} \{ \lambda + 2 \mu \} [u], [v] \right>
- \f]
+ $$
- where \f$ \left = \int_{F} u \cdot v \f$, and \f$ F \f$ is a
- face which is either a boundary face \f$ F_b \f$ of an element \f$ K \f$ or
- an interior face \f$ F_i \f$ separating elements \f$ K_1 \f$ and \f$ K_2 \f$.
+ where $ \left = \int_{F} u \cdot v $, and $ F $ is a
+ face which is either a boundary face $ F_b $ of an element $ K $ or
+ an interior face $ F_i $ separating elements $ K_1 $ and $ K_2 $.
- In the bilinear form above \f$ \tau(u) \f$ is traction, and it's also
- \f$ \tau(u) = \sigma(u) \cdot \vec{n} \f$, where \f$ \sigma(u) \f$ is
- stress, and \f$ \vec{n} \f$ is the unit normal vector w.r.t. to \f$ F \f$.
+ In the bilinear form above $ \tau(u) $ is traction, and it's also
+ $ \tau(u) = \sigma(u) \cdot \vec{n} $, where $ \sigma(u) $ is
+ stress, and $ \vec{n} $ is the unit normal vector w.r.t. to $ F $.
In other words, we have
- \f[
+ $$
- \left< \{ \sigma(u) \cdot \vec{n} \}, [v] \right> + \alpha \left< \{
\sigma(v) \cdot \vec{n} \}, [u] \right> + \kappa \left< h^{-1} \{
\lambda + 2 \mu \} [u], [v] \right>
- \f]
+ $$
For isotropic media
- \f[
+ $$
\begin{split}
\sigma(u) &= \lambda \nabla \cdot u I + 2 \mu \varepsilon(u) \\
&= \lambda \nabla \cdot u I + 2 \mu \frac{1}{2} (\nabla u + \nabla
u^{\mathrm{T}}) \\
&= \lambda \nabla \cdot u I + \mu (\nabla u + \nabla u^{\mathrm{T}})
\end{split}
- \f]
+ $$
- where \f$ I \f$ is identity matrix, \f$ \lambda \f$ and \f$ \mu \f$ are Lame
- coefficients (see ElasticityIntegrator), \f$ u, v \f$ are the trial and test
+ where $ I $ is identity matrix, $ \lambda $ and $ \mu $ are Lame
+ coefficients (see ElasticityIntegrator), $ u, v $ are the trial and test
functions, respectively.
- The parameters \f$ \alpha \f$ and \f$ \kappa \f$ determine the DG method to
+ The parameters $ \alpha $ and $ \kappa $ determine the DG method to
use (when this integrator is added to the "broken" ElasticityIntegrator):
- - IIPG, \f$\alpha = 0\f$,
+ - IIPG, $\alpha = 0$,
C. Dawson, S. Sun, M. Wheeler, Compatible algorithms for coupled flow and
transport, Comp. Meth. Appl. Mech. Eng., 193(23-26), 2565-2580, 2004.
- - SIPG, \f$\alpha = -1\f$,
+ - SIPG, $\alpha = -1$,
M. Grote, A. Schneebeli, D. Schotzau, Discontinuous Galerkin Finite
%Element Method for the Wave Equation, SINUM, 44(6), 2408-2431, 2006.
- - NIPG, \f$\alpha = 1\f$,
+ - NIPG, $\alpha = 1$,
B. Riviere, M. Wheeler, V. Girault, A Priori Error Estimates for Finite
%Element Methods Based on Discontinuous Approximation Spaces for Elliptic
Problems, SINUM, 39(3), 902-931, 2001.
@@ -3363,8 +3413,8 @@ protected:
DenseMatrix &elmat, DenseMatrix &jmat);
};
-/** Integrator for the DPG form:\f$ \langle v, [w] \rangle \f$ over all faces (the interface) where
- the trial variable \f$v\f$ is defined on the interface and the test variable \f$w\f$ is
+/** Integrator for the DPG form:$ \langle v, [w] \rangle $ over all faces (the interface) where
+ the trial variable $v$ is defined on the interface and the test variable $w$ is
defined inside the elements, generally in a DG space. */
class TraceJumpIntegrator : public BilinearFormIntegrator
{
@@ -3381,9 +3431,9 @@ public:
DenseMatrix &elmat);
};
-/** Integrator for the form:\f$ \langle v, [w \cdot n] \rangle \f$ over all faces (the interface) where
- the trial variable \f$v\f$ is defined on the interface and the test variable \f$w\f$ is
- in an \f$H\f$(div)-conforming space. */
+/** Integrator for the form:$ \langle v, [w \cdot n] \rangle $ over all faces (the interface) where
+ the trial variable $v$ is defined on the interface and the test variable $w$ is
+ in an $H(div)$-conforming space. */
class NormalTraceJumpIntegrator : public BilinearFormIntegrator
{
private:
@@ -3400,10 +3450,10 @@ public:
DenseMatrix &elmat);
};
-/** Integrator for the DPG form:\f$ \langle v, w \rangle \f$ over a face (the interface) where
- the trial variable \f$v\f$ is defined on the interface
- (\f$H^{-1/2}\f$ i.e., \f$v := u \cdot n\f$ normal trace of \f$H\f$(div))
- and the test variable \f$w\f$ is in an \f$H^1\f$-conforming space. */
+/** Integrator for the DPG form:$ \langle v, w \rangle $ over a face (the interface) where
+ the trial variable $v$ is defined on the interface
+ ($H^{-1/2}$ i.e., $v := u \cdot n$ normal trace of $H(div)$)
+ and the test variable $w$ is in an $H^1$-conforming space. */
class TraceIntegrator : public BilinearFormIntegrator
{
private:
@@ -3417,9 +3467,9 @@ public:
DenseMatrix &elmat);
};
-/** Integrator for the form: \f$ \langle v, w \cdot n \rangle \f$ over a face (the interface) where
- the trial variable \f$v\f$ is defined on the interface (\f$H^{1/2}\f$, i.e., trace of \f$H^1\f$)
- and the test variable \f$w\f$ is in an \f$H\f$(div)-conforming space. */
+/** Integrator for the form: $ \langle v, w \cdot n \rangle $ over a face (the interface) where
+ the trial variable $v$ is defined on the interface ($H^{1/2}$, i.e., trace of $H^1$)
+ and the test variable $w$ is in an $H(div)$-conforming space. */
class NormalTraceIntegrator : public BilinearFormIntegrator
{
private:
@@ -3436,10 +3486,10 @@ public:
};
-/** Integrator for the form: \f$\langle v, w \times n \rangle\f$ over a face (the interface)
- * In 3D the trial variable \f$v\f$ is defined on the interface (\f$H^{-1/2}\f$(curl), trace of \f$H\f$(curl))
- * In 2D it's defined on the interface (\f$H^{1/2}\f$, trace of \f$H^1\f$)
- * The test variable \f$w\f$ is in an \f$H\f$(curl)-conforming space. */
+/** Integrator for the form: $\langle v, w \times n \rangle$ over a face (the interface)
+ * In 3D the trial variable $v$ is defined on the interface ($H^{-1/2}$(curl), trace of $H(curl$)
+ * In 2D it's defined on the interface ($H^{1/2}$, trace of $H^1$)
+ * The test variable $w$ is in an $H(curl$-conforming space. */
class TangentTraceIntegrator : public BilinearFormIntegrator
{
private:
@@ -3487,8 +3537,8 @@ class DiscreteInterpolator : public BilinearFormIntegrator { };
/** Class for constructing the gradient as a DiscreteLinearOperator from an
- \f$H^1\f$-conforming space to an \f$H\f$(curl)-conforming space. The range space can be
- vector \f$L_2\f$ space as well. */
+ $H^1$-conforming space to an $H(curl$-conforming space. The range space can be
+ vector $L_2$ space as well. */
class GradientInterpolator : public DiscreteInterpolator
{
public:
@@ -3505,8 +3555,8 @@ public:
/** @brief Setup method for PA data.
- @param[in] trial_fes \f$H^1\f$ Lagrange space
- @param[in] test_fes \f$H\f$(curl) Nedelec space
+ @param[in] trial_fes $H^1$ Lagrange space
+ @param[in] test_fes $H(curl$ Nedelec space
*/
virtual void AssemblePA(const FiniteElementSpace &trial_fes,
const FiniteElementSpace &test_fes);
@@ -3540,7 +3590,6 @@ public:
{ ran_fe.Project(dom_fe, Trans, elmat); }
using BilinearFormIntegrator::AssemblePA;
-
virtual void AssemblePA(const FiniteElementSpace &trial_fes,
const FiniteElementSpace &test_fes);
@@ -3580,7 +3629,7 @@ public:
the global discrete divergence matrix.
Note: Since the dofs in the L2_FECollection are nodal values, the local
- discrete divergence matrix (with an \f$H\f$(div)-type domain space) will depend on
+ discrete divergence matrix (with an $H(div)$-type domain space) will depend on
the transformation. On the other hand, the local matrix returned by
VectorFEDivergenceIntegrator is independent of the transformation. */
class DivergenceInterpolator : public DiscreteInterpolator
@@ -3595,8 +3644,8 @@ public:
/** A trace face interpolator class for interpolating the normal component of
- the domain space, e.g. vector \f$H^1\f$, into the range space, e.g. the trace of
- \f$H\f$(div) which uses FiniteElement::INTEGRAL map type. */
+ the domain space, e.g. vector $H^1$, into the range space, e.g. the trace of
+ $H(div)$ which uses FiniteElement::INTEGRAL map type. */
class NormalInterpolator : public DiscreteInterpolator
{
public:
@@ -3658,7 +3707,7 @@ protected:
};
/** Interpolator of the 2D cross product between a vector coefficient and an
- \f$H\f$(curl)-conforming field onto an \f$L_2\f$-conforming field. */
+ $H(curl$-conforming field onto an $L_2$-conforming field. */
class ScalarCrossProductInterpolator : public DiscreteInterpolator
{
public:
@@ -3674,8 +3723,8 @@ protected:
};
/** Interpolator of the cross product between a vector coefficient and an
- \f$H\f$(curl)-conforming field onto an \f$H\f$(div)-conforming field. The range space
- can also be vector \f$L_2\f$. */
+ $H(curl$-conforming field onto an $H(div)$-conforming field. The range space
+ can also be vector $L_2$. */
class VectorCrossProductInterpolator : public DiscreteInterpolator
{
public:
@@ -3691,8 +3740,8 @@ protected:
};
/** Interpolator of the inner product between a vector coefficient and an
- \f$H\f$(div)-conforming field onto an \f$L_2\f$-conforming field. The range space can
- also be \f$H^1\f$. */
+ $H(div)$-conforming field onto an $L_2$-conforming field. The range space can
+ also be $H^1$. */
class VectorInnerProductInterpolator : public DiscreteInterpolator
{
public:
diff --git a/fem/ceed/integrators/convection/convection.cpp b/fem/ceed/integrators/convection/convection.cpp
index c5560f354b..398fcbff25 100644
--- a/fem/ceed/integrators/convection/convection.cpp
+++ b/fem/ceed/integrators/convection/convection.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/convection/convection.hpp b/fem/ceed/integrators/convection/convection.hpp
index 1cd9687707..ecd60a8bd4 100644
--- a/fem/ceed/integrators/convection/convection.hpp
+++ b/fem/ceed/integrators/convection/convection.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/convection/convection_qf.h b/fem/ceed/integrators/convection/convection_qf.h
index 68e96895e2..c18cf19820 100644
--- a/fem/ceed/integrators/convection/convection_qf.h
+++ b/fem/ceed/integrators/convection/convection_qf.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/diffusion/diffusion.cpp b/fem/ceed/integrators/diffusion/diffusion.cpp
index 4cd68669f3..169526cfa2 100644
--- a/fem/ceed/integrators/diffusion/diffusion.cpp
+++ b/fem/ceed/integrators/diffusion/diffusion.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/diffusion/diffusion.hpp b/fem/ceed/integrators/diffusion/diffusion.hpp
index dd28c9d165..ba5737cc7e 100644
--- a/fem/ceed/integrators/diffusion/diffusion.hpp
+++ b/fem/ceed/integrators/diffusion/diffusion.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/diffusion/diffusion_qf.h b/fem/ceed/integrators/diffusion/diffusion_qf.h
index aa4850e372..db13be7385 100644
--- a/fem/ceed/integrators/diffusion/diffusion_qf.h
+++ b/fem/ceed/integrators/diffusion/diffusion_qf.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/mass/mass.cpp b/fem/ceed/integrators/mass/mass.cpp
index dfcc9a8ce6..0c6bc65cb5 100644
--- a/fem/ceed/integrators/mass/mass.cpp
+++ b/fem/ceed/integrators/mass/mass.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/mass/mass.hpp b/fem/ceed/integrators/mass/mass.hpp
index 696f8c3dcd..cf6bb0c5ee 100644
--- a/fem/ceed/integrators/mass/mass.hpp
+++ b/fem/ceed/integrators/mass/mass.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/mass/mass_qf.h b/fem/ceed/integrators/mass/mass_qf.h
index 85002ae04a..4fa73d89b0 100644
--- a/fem/ceed/integrators/mass/mass_qf.h
+++ b/fem/ceed/integrators/mass/mass_qf.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/nlconvection/nlconvection.cpp b/fem/ceed/integrators/nlconvection/nlconvection.cpp
index ba4a274dc2..afa7269e92 100644
--- a/fem/ceed/integrators/nlconvection/nlconvection.cpp
+++ b/fem/ceed/integrators/nlconvection/nlconvection.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/nlconvection/nlconvection.hpp b/fem/ceed/integrators/nlconvection/nlconvection.hpp
index 3efe887288..37cbadde13 100644
--- a/fem/ceed/integrators/nlconvection/nlconvection.hpp
+++ b/fem/ceed/integrators/nlconvection/nlconvection.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/integrators/nlconvection/nlconvection_qf.h b/fem/ceed/integrators/nlconvection/nlconvection_qf.h
index ef0d413270..a83e2eb71b 100644
--- a/fem/ceed/integrators/nlconvection/nlconvection_qf.h
+++ b/fem/ceed/integrators/nlconvection/nlconvection_qf.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/basis.cpp b/fem/ceed/interface/basis.cpp
index 37858cb785..50e7247703 100644
--- a/fem/ceed/interface/basis.cpp
+++ b/fem/ceed/interface/basis.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/basis.hpp b/fem/ceed/interface/basis.hpp
index 3781f4cf73..38d45ba05f 100644
--- a/fem/ceed/interface/basis.hpp
+++ b/fem/ceed/interface/basis.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/ceed.hpp b/fem/ceed/interface/ceed.hpp
index 4c522c74d9..00f70135fe 100644
--- a/fem/ceed/interface/ceed.hpp
+++ b/fem/ceed/interface/ceed.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/coefficient.hpp b/fem/ceed/interface/coefficient.hpp
index abb70e8b82..4c2f088974 100644
--- a/fem/ceed/interface/coefficient.hpp
+++ b/fem/ceed/interface/coefficient.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/integrator.hpp b/fem/ceed/interface/integrator.hpp
index 340ed12ca7..cbac7f87fe 100644
--- a/fem/ceed/interface/integrator.hpp
+++ b/fem/ceed/interface/integrator.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/interface.hpp b/fem/ceed/interface/interface.hpp
index 0a69121ad5..066ef3e314 100644
--- a/fem/ceed/interface/interface.hpp
+++ b/fem/ceed/interface/interface.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/mixed_integrator.hpp b/fem/ceed/interface/mixed_integrator.hpp
index 8d344f4d90..ab9e9f226c 100644
--- a/fem/ceed/interface/mixed_integrator.hpp
+++ b/fem/ceed/interface/mixed_integrator.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/operator.cpp b/fem/ceed/interface/operator.cpp
index 8545ccaa84..d6d4716bca 100644
--- a/fem/ceed/interface/operator.cpp
+++ b/fem/ceed/interface/operator.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/operator.hpp b/fem/ceed/interface/operator.hpp
index cffea2fc7e..ed16fe6fae 100644
--- a/fem/ceed/interface/operator.hpp
+++ b/fem/ceed/interface/operator.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/restriction.cpp b/fem/ceed/interface/restriction.cpp
index e7e8539bd3..796728477f 100644
--- a/fem/ceed/interface/restriction.cpp
+++ b/fem/ceed/interface/restriction.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/restriction.hpp b/fem/ceed/interface/restriction.hpp
index 221716b392..d7d019019c 100644
--- a/fem/ceed/interface/restriction.hpp
+++ b/fem/ceed/interface/restriction.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/util.cpp b/fem/ceed/interface/util.cpp
index 694f59fded..0897d1639e 100644
--- a/fem/ceed/interface/util.cpp
+++ b/fem/ceed/interface/util.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/interface/util.hpp b/fem/ceed/interface/util.hpp
index babae868f4..4bdb64c59a 100644
--- a/fem/ceed/interface/util.hpp
+++ b/fem/ceed/interface/util.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/solvers/algebraic.cpp b/fem/ceed/solvers/algebraic.cpp
index 9c4ae930d2..981b8d202c 100644
--- a/fem/ceed/solvers/algebraic.cpp
+++ b/fem/ceed/solvers/algebraic.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -305,7 +305,7 @@ AlgebraicMultigrid::AlgebraicMultigrid(
AlgebraicSpaceHierarchy &hierarchy,
BilinearForm &form,
const Array &ess_tdofs
-) : GeometricMultigrid(hierarchy)
+) : GeometricMultigrid(hierarchy, Array())
{
int nlevels = fespaces.GetNumLevels();
ceed_operators.SetSize(nlevels);
diff --git a/fem/ceed/solvers/algebraic.hpp b/fem/ceed/solvers/algebraic.hpp
index 49cdbca980..9d4cd508e2 100644
--- a/fem/ceed/solvers/algebraic.hpp
+++ b/fem/ceed/solvers/algebraic.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/solvers/full-assembly.cpp b/fem/ceed/solvers/full-assembly.cpp
index dc98b9de83..9df6e2bf96 100644
--- a/fem/ceed/solvers/full-assembly.cpp
+++ b/fem/ceed/solvers/full-assembly.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/solvers/full-assembly.hpp b/fem/ceed/solvers/full-assembly.hpp
index c65e3842d6..19f2f405a8 100644
--- a/fem/ceed/solvers/full-assembly.hpp
+++ b/fem/ceed/solvers/full-assembly.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/solvers/solvers-atpmg.cpp b/fem/ceed/solvers/solvers-atpmg.cpp
index f24762f915..6561b90c4a 100644
--- a/fem/ceed/solvers/solvers-atpmg.cpp
+++ b/fem/ceed/solvers/solvers-atpmg.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/ceed/solvers/solvers-atpmg.hpp b/fem/ceed/solvers/solvers-atpmg.hpp
index 8d85b18407..ea8699d07c 100644
--- a/fem/ceed/solvers/solvers-atpmg.hpp
+++ b/fem/ceed/solvers/solvers-atpmg.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/coefficient.cpp b/fem/coefficient.cpp
index 90eef2c9ce..70a8a9232f 100644
--- a/fem/coefficient.cpp
+++ b/fem/coefficient.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -1568,7 +1568,7 @@ double ComputeGlobalLpNorm(double p, VectorCoefficient &coeff, ParMesh &pmesh,
#endif
VectorQuadratureFunctionCoefficient::VectorQuadratureFunctionCoefficient(
- QuadratureFunction &qf)
+ const QuadratureFunction &qf)
: VectorCoefficient(qf.GetVDim()), QuadF(qf), index(0) { }
void VectorQuadratureFunctionCoefficient::SetComponent(int index_, int length_)
@@ -1622,7 +1622,7 @@ void VectorQuadratureFunctionCoefficient::Project(QuadratureFunction &qf)
}
QuadratureFunctionCoefficient::QuadratureFunctionCoefficient(
- QuadratureFunction &qf) : QuadF(qf)
+ const QuadratureFunction &qf) : QuadF(qf)
{
MFEM_VERIFY(qf.GetVDim() == 1, "QuadratureFunction's vdim must be 1");
}
diff --git a/fem/coefficient.hpp b/fem/coefficient.hpp
index 568c9376f0..9f8d0e1132 100644
--- a/fem/coefficient.hpp
+++ b/fem/coefficient.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -414,7 +414,7 @@ public:
/** @brief A coefficient that depends on 1 or 2 parent coefficients and a
transformation rule represented by a C-function.
- \f$ C(x,t) = T(Q1(x,t)) \f$ or \f$ C(x,t) = T(Q1(x,t), Q2(x,t)) \f$
+ $ C(x,t) = T(Q1(x,t)) $ or $ C(x,t) = T(Q1(x,t), Q2(x,t)) $
where T is the transformation rule, and Q1/Q2 are the parent coefficients.*/
class TransformedCoefficient : public Coefficient
@@ -442,7 +442,7 @@ public:
/** @brief Delta function coefficient optionally multiplied by a weight
coefficient and a scaled time dependent C-function.
- \f$ F(x,t) = w(x,t) s T(t) d(x - xc) \f$
+ $ F(x,t) = w(x,t) s T(t) d(x - xc) $
where w is the optional weight coefficient, @a s is a scale factor
T is an optional time-dependent function and d is a delta function.
@@ -517,7 +517,7 @@ public:
const double *Center() { return center; }
/** @brief Return the scale factor times the optional time dependent
- function. Returns \f$ s T(t) \f$ with \f$ T(t) = 1 \f$ when
+ function. Returns $ s T(t) $ with $ T(t) = 1 $ when
not set by the user. */
double Scale() { return tdf ? (*tdf)(GetTime())*scale : scale; }
@@ -1683,7 +1683,7 @@ private:
mutable Vector va;
mutable Vector vb;
public:
- /// Construct with the two vector coefficients. Result is \f$ A \cdot B \f$.
+ /// Construct with the two vector coefficients. Result is $ A \cdot B $.
InnerProductCoefficient(VectorCoefficient &A, VectorCoefficient &B);
/// Set the time for internally stored coefficients
@@ -1715,7 +1715,7 @@ private:
mutable Vector vb;
public:
- /// Constructor with two vector coefficients. Result is \f$ A_x B_y - A_y * B_x; \f$.
+ /// Constructor with two vector coefficients. Result is $ A_x B_y - A_y * B_x; $.
VectorRotProductCoefficient(VectorCoefficient &A, VectorCoefficient &B);
/// Set the time for internally stored coefficients
@@ -2119,7 +2119,7 @@ private:
MatrixCoefficient * a;
public:
- /// Construct with the matrix coefficient. Result is \f$ A^T \f$.
+ /// Construct with the matrix coefficient. Result is $ A^T $.
TransposeMatrixCoefficient(MatrixCoefficient &A);
/// Set the time for internally stored coefficients
@@ -2142,7 +2142,7 @@ private:
MatrixCoefficient * a;
public:
- /// Construct with the matrix coefficient. Result is \f$ A^{-1} \f$.
+ /// Construct with the matrix coefficient. Result is $ A^{-1} $.
InverseMatrixCoefficient(MatrixCoefficient &A);
/// Set the time for internally stored coefficients
@@ -2169,7 +2169,7 @@ private:
mutable Vector vb;
public:
- /// Construct with two vector coefficients. Result is \f$ A B^T \f$.
+ /// Construct with two vector coefficients. Result is $ A B^T $.
OuterProductCoefficient(VectorCoefficient &A, VectorCoefficient &B);
/// Set the time for internally stored coefficients
@@ -2192,8 +2192,8 @@ public:
/** @brief Matrix coefficient defined as -a k x k x, for a vector k and scalar a
- This coefficient returns \f$a * (|k|^2 I - k \otimes k)\f$, where I is
- the identity matrix and \f$\otimes\f$ indicates the outer product. This
+ This coefficient returns $a * (|k|^2 I - k \otimes k)$, where I is
+ the identity matrix and $\otimes$ indicates the outer product. This
can be evaluated for vectors of any dimension but in three
dimensions it corresponds to computing the cross product with k twice.
*/
@@ -2245,7 +2245,7 @@ private:
public:
/// Constructor with a quadrature function as input
- VectorQuadratureFunctionCoefficient(QuadratureFunction &qf);
+ VectorQuadratureFunctionCoefficient(const QuadratureFunction &qf);
/** Set the starting index within the QuadFunc that'll be used to project
outwards as well as the corresponding length. The projected length should
@@ -2273,7 +2273,7 @@ private:
public:
/// Constructor with a quadrature function as input
- QuadratureFunctionCoefficient(QuadratureFunction &qf);
+ QuadratureFunctionCoefficient(const QuadratureFunction &qf);
const QuadratureFunction& GetQuadFunction() const { return QuadF; }
@@ -2397,23 +2397,23 @@ public:
};
/** @brief Compute the Lp norm of a function f.
- \f$ \| f \|_{Lp} = ( \int_\Omega | f |^p d\Omega)^{1/p} \f$ */
+ $ \| f \|_{Lp} = ( \int_\Omega | f |^p d\Omega)^{1/p} $ */
double ComputeLpNorm(double p, Coefficient &coeff, Mesh &mesh,
const IntegrationRule *irs[]);
/** @brief Compute the Lp norm of a vector function f = {f_i}_i=1...N.
- \f$ \| f \|_{Lp} = ( \sum_i \| f_i \|_{Lp}^p )^{1/p} \f$ */
+ $ \| f \|_{Lp} = ( \sum_i \| f_i \|_{Lp}^p )^{1/p} $ */
double ComputeLpNorm(double p, VectorCoefficient &coeff, Mesh &mesh,
const IntegrationRule *irs[]);
#ifdef MFEM_USE_MPI
/** @brief Compute the global Lp norm of a function f.
- \f$ \| f \|_{Lp} = ( \int_\Omega | f |^p d\Omega)^{1/p} \f$ */
+ $ \| f \|_{Lp} = ( \int_\Omega | f |^p d\Omega)^{1/p} $ */
double ComputeGlobalLpNorm(double p, Coefficient &coeff, ParMesh &pmesh,
const IntegrationRule *irs[]);
/** @brief Compute the global Lp norm of a vector function f = {f_i}_i=1...N.
- \f$ \| f \|_{Lp} = ( \sum_i \| f_i \|_{Lp}^p )^{1/p} \f$ */
+ $ \| f \|_{Lp} = ( \sum_i \| f_i \|_{Lp}^p )^{1/p} $ */
double ComputeGlobalLpNorm(double p, VectorCoefficient &coeff, ParMesh &pmesh,
const IntegrationRule *irs[]);
#endif
diff --git a/fem/complex_fem.cpp b/fem/complex_fem.cpp
index 2cd4e68a84..95565804df 100644
--- a/fem/complex_fem.cpp
+++ b/fem/complex_fem.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/complex_fem.hpp b/fem/complex_fem.hpp
index 32b69b3686..c52dac3124 100644
--- a/fem/complex_fem.hpp
+++ b/fem/complex_fem.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/conduitdatacollection.cpp b/fem/conduitdatacollection.cpp
index 8da785bdfb..75bea64dc6 100644
--- a/fem/conduitdatacollection.cpp
+++ b/fem/conduitdatacollection.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/conduitdatacollection.hpp b/fem/conduitdatacollection.hpp
index f2904ba4cb..6ff1804e09 100644
--- a/fem/conduitdatacollection.hpp
+++ b/fem/conduitdatacollection.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/convergence.hpp b/fem/convergence.hpp
index 9b9d12e6f7..d38651b5b7 100644
--- a/fem/convergence.hpp
+++ b/fem/convergence.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/datacollection.cpp b/fem/datacollection.cpp
index 0dc718b070..d73d2bb5b7 100644
--- a/fem/datacollection.cpp
+++ b/fem/datacollection.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/datacollection.hpp b/fem/datacollection.hpp
index c216188afb..351c1239d0 100644
--- a/fem/datacollection.hpp
+++ b/fem/datacollection.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/dgmassinv.cpp b/fem/dgmassinv.cpp
index f9b494b36a..fef4605b0d 100644
--- a/fem/dgmassinv.cpp
+++ b/fem/dgmassinv.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/dgmassinv.hpp b/fem/dgmassinv.hpp
index 71c525cb51..e6a568299f 100644
--- a/fem/dgmassinv.hpp
+++ b/fem/dgmassinv.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/dgmassinv_kernels.hpp b/fem/dgmassinv_kernels.hpp
index 62f03e564c..814cec7647 100644
--- a/fem/dgmassinv_kernels.hpp
+++ b/fem/dgmassinv_kernels.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/doftrans.cpp b/fem/doftrans.cpp
index 0b4dbcef7e..d707a75492 100644
--- a/fem/doftrans.cpp
+++ b/fem/doftrans.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/doftrans.hpp b/fem/doftrans.hpp
index 81956bdbff..aa5d1ff2c8 100644
--- a/fem/doftrans.hpp
+++ b/fem/doftrans.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/eltrans.cpp b/fem/eltrans.cpp
index 96aa854a5a..1e6d3564ea 100644
--- a/fem/eltrans.cpp
+++ b/fem/eltrans.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/eltrans.hpp b/fem/eltrans.hpp
index 3d0ccb97f1..7087adefb3 100644
--- a/fem/eltrans.hpp
+++ b/fem/eltrans.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -127,7 +127,7 @@ public:
/** @brief Return the weight of the Jacobian matrix of the transformation
at the currently set IntegrationPoint.
- The Weight evaluates to \f$ \sqrt{\lvert J^T J \rvert} \f$. */
+ The Weight evaluates to $ \sqrt{\lvert J^T J \rvert} $. */
double Weight() { return (EvalState & WEIGHT_MASK) ? Wght : EvalWeight(); }
/** @brief Return the adjugate of the Jacobian matrix of the transformation
@@ -155,7 +155,7 @@ public:
of the transformation. */
virtual int OrderW() const = 0;
- /// Return the order of \f$ adj(J)^T \nabla fi \f$
+ /// Return the order of $ adj(J)^T \nabla fi $
virtual int OrderGrad(const FiniteElement *fe) const = 0;
/// Return the Geometry::Type of the reference element.
@@ -170,12 +170,13 @@ public:
virtual int GetSpaceDim() const = 0;
/** @brief Transform a point @a pt from physical space to a point @a ip in
- reference space. */
+ reference space and optionally can set a solver tolerance using @a phys_tol. */
/** Attempt to find the IntegrationPoint that is transformed into the given
point in physical space. If the inversion fails a non-zero value is
returned. This method is not 100 percent reliable for non-linear
transformations. */
- virtual int TransformBack(const Vector &pt, IntegrationPoint &ip) = 0;
+ virtual int TransformBack(const Vector &pt, IntegrationPoint &ip,
+ const double phys_tol = 1e-15) = 0;
virtual ~ElementTransformation() { }
};
@@ -391,11 +392,11 @@ public:
/// @brief Set the underlying point matrix describing the transformation.
/** The dimensions of the matrix are space-dim x dof. The transformation is
defined as
- \f$ x = F( \hat x ) = P \phi( \hat x ) \f$
+ $ x = F( \hat x ) = P \phi( \hat x ) $
- where \f$ \hat x \f$ is the reference point, @a x is the corresponding
- physical point, @a P is the point matrix, and \f$ \phi( \hat x ) \f$ is
- the column-vector of all basis functions evaluated at \f$ \hat x \f$ .
+ where $ \hat x $ is the reference point, @a x is the corresponding
+ physical point, @a P is the point matrix, and $ \phi( \hat x ) $ is
+ the column-vector of all basis functions evaluated at $ \hat x $ .
The columns of @a P represent the control points in physical space
defining the transformation. */
void SetPointMat(const DenseMatrix &pm) { PointMat = pm; EvalState = 0; }
@@ -436,20 +437,22 @@ public:
of the transformation. */
virtual int OrderW() const;
- /// Return the order of \f$ adj(J)^T \nabla fi \f$
+ /// Return the order of $ adj(J)^T \nabla fi $
virtual int OrderGrad(const FiniteElement *fe) const;
virtual int GetSpaceDim() const { return PointMat.Height(); }
/** @brief Transform a point @a pt from physical space to a point @a ip in
- reference space. */
+ reference space and optionally can set a solver tolerance using @a phys_tol. */
/** Attempt to find the IntegrationPoint that is transformed into the given
point in physical space. If the inversion fails a non-zero value is
returned. This method is not 100 percent reliable for non-linear
transformations. */
- virtual int TransformBack(const Vector & v, IntegrationPoint & ip)
+ virtual int TransformBack(const Vector & v, IntegrationPoint & ip,
+ const double phys_rel_tol = 1e-15)
{
InverseElementTransformation inv_tr(this);
+ inv_tr.SetPhysicalRelTol(phys_rel_tol);
return inv_tr.Transform(v, ip);
}
diff --git a/fem/estimators.cpp b/fem/estimators.cpp
index a141eb7c3c..09fd27d503 100644
--- a/fem/estimators.cpp
+++ b/fem/estimators.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/estimators.hpp b/fem/estimators.hpp
index 70f884940f..f456223bdb 100644
--- a/fem/estimators.hpp
+++ b/fem/estimators.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe.cpp b/fem/fe.cpp
index 44390f76c5..55aec6cb67 100644
--- a/fem/fe.cpp
+++ b/fem/fe.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe.hpp b/fem/fe.hpp
index 2c2ebb4694..91964e52d3 100644
--- a/fem/fe.hpp
+++ b/fem/fe.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/face_map_utils.cpp b/fem/fe/face_map_utils.cpp
index cdd1ae4285..bf6f296f52 100644
--- a/fem/fe/face_map_utils.cpp
+++ b/fem/fe/face_map_utils.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/face_map_utils.hpp b/fem/fe/face_map_utils.hpp
index 7c0300d8df..f31bcfbf9d 100644
--- a/fem/fe/face_map_utils.hpp
+++ b/fem/fe/face_map_utils.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_base.cpp b/fem/fe/fe_base.cpp
index 4387ae7750..87352e5a5b 100644
--- a/fem/fe/fe_base.cpp
+++ b/fem/fe/fe_base.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -648,6 +648,79 @@ void ScalarFiniteElement::ScalarLocalL2Restriction(
}
}
+void NodalFiniteElement::CreateLexicographicFullMap(const IntegrationRule &ir)
+const
+{
+ // Get the FULL version of the map.
+ auto &d2q = GetDofToQuad(ir, DofToQuad::FULL);
+ //Undo the native ordering which is what FiniteElement::GetDofToQuad returns.
+ auto *d2q_new = new DofToQuad(d2q);
+ d2q_new->mode = DofToQuad::LEXICOGRAPHIC_FULL;
+ const int nqpt = ir.GetNPoints();
+
+ const int b_dim = (range_type == VECTOR) ? dim : 1;
+
+ for (int i = 0; i < nqpt; i++)
+ {
+ for (int d = 0; d < b_dim; d++)
+ {
+ for (int j = 0; j < dof; j++)
+ {
+ const double val = d2q.B[i + nqpt*(d+b_dim*lex_ordering[j])];
+ d2q_new->B[i+nqpt*(d+b_dim*j)] = val;
+ d2q_new->Bt[j+dof*(i+nqpt*d)] = val;
+ }
+ }
+ }
+
+ const int g_dim = [this]()
+ {
+ switch (deriv_type)
+ {
+ case GRAD: return dim;
+ case DIV: return 1;
+ case CURL: return cdim;
+ default: return 0;
+ }
+ }();
+
+ for (int i = 0; i < nqpt; i++)
+ {
+ for (int d = 0; d < g_dim; d++)
+ {
+ for (int j = 0; j < dof; j++)
+ {
+ const double val = d2q.G[i + nqpt*(d+g_dim*lex_ordering[j])];
+ d2q_new->G[i+nqpt*(d+g_dim*j)] = val;
+ d2q_new->Gt[j+dof*(i+nqpt*d)] = val;
+ }
+ }
+ }
+
+ dof2quad_array.Append(d2q_new);
+}
+
+const DofToQuad &NodalFiniteElement::GetDofToQuad(const IntegrationRule &ir,
+ DofToQuad::Mode mode) const
+{
+ //Should make this loop a function of FiniteElement
+ for (int i = 0; i < dof2quad_array.Size(); i++)
+ {
+ const DofToQuad &d2q = *dof2quad_array[i];
+ if (d2q.IntRule == &ir && d2q.mode == mode) { return d2q; }
+ }
+
+ if (mode != DofToQuad::LEXICOGRAPHIC_FULL)
+ {
+ return FiniteElement::GetDofToQuad(ir, mode);
+ }
+ else
+ {
+ CreateLexicographicFullMap(ir);
+ return NodalFiniteElement::GetDofToQuad(ir, mode);
+ }
+}
+
void NodalFiniteElement::ProjectCurl_2D(
const FiniteElement &fe, ElementTransformation &Trans,
DenseMatrix &curl) const
@@ -2563,6 +2636,20 @@ void NodalTensorFiniteElement::SetMapType(const int map_type)
}
}
+const DofToQuad &NodalTensorFiniteElement::GetDofToQuad(
+ const IntegrationRule &ir,
+ DofToQuad::Mode mode) const
+{
+ if (mode != DofToQuad::TENSOR)
+ {
+ return NodalFiniteElement::GetDofToQuad(ir, mode);
+ }
+ else
+ {
+ return GetTensorDofToQuad(*this, ir, mode, basis1d, true, dof2quad_array);
+ }
+}
+
void NodalTensorFiniteElement::GetFaceMap(const int face_id,
Array &face_map) const
{
diff --git a/fem/fe/fe_base.hpp b/fem/fe/fe_base.hpp
index 421810b4f2..c943fbf4b8 100644
--- a/fem/fe/fe_base.hpp
+++ b/fem/fe/fe_base.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -158,7 +158,12 @@ public:
freedom. */
/** When representing a vector-valued FiniteElement, two DofToQuad objects
are used to describe the "closed" and "open" 1D basis functions. */
- TENSOR
+ TENSOR,
+
+ /** @brief Full multidimensional representation which does not use tensor
+ product structure. The ordering of the degrees of freedom is the
+ same as TENSOR, but the sizes of B and G are the same as FULL.*/
+ LEXICOGRAPHIC_FULL
};
/// Describes the contents of the #B, #Bt, #G, and #Gt arrays, see #Mode.
@@ -259,27 +264,27 @@ public:
/** @brief Enumeration for MapType: defines how reference functions are
mapped to physical space.
- A reference function \f$ \hat u(\hat x) \f$ can be mapped to a function
- \f$ u(x) \f$ on a general physical element in following ways:
- - \f$ x = T(\hat x) \f$ is the image of the reference point \f$ \hat x \f$
- - \f$ J = J(\hat x) \f$ is the Jacobian matrix of the transformation T
- - \f$ w = w(\hat x) = det(J) \f$ is the transformation weight factor for square J
- - \f$ w = w(\hat x) = det(J^t J)^{1/2} \f$ is the transformation weight factor in general
+ A reference function $ \hat u(\hat x) $ can be mapped to a function
+ $ u(x) $ on a general physical element in following ways:
+ - $ x = T(\hat x) $ is the image of the reference point $ \hat x $
+ - $ J = J(\hat x) $ is the Jacobian matrix of the transformation T
+ - $ w = w(\hat x) = det(J) $ is the transformation weight factor for square J
+ - $ w = w(\hat x) = det(J^t J)^{1/2} $ is the transformation weight factor in general
*/
enum MapType
{
UNKNOWN_MAP_TYPE = -1, /**< Used to distinguish an unset MapType variable
from the known values below. */
VALUE, /**< For scalar fields; preserves point values
- \f$ u(x) = \hat u(\hat x) \f$ */
+ $ u(x) = \hat u(\hat x) $ */
INTEGRAL, /**< For scalar fields; preserves volume integrals
- \f$ u(x) = (1/w) \hat u(\hat x) \f$ */
+ $ u(x) = (1/w) \hat u(\hat x) $ */
H_DIV, /**< For vector fields; preserves surface integrals of the
- normal component \f$ u(x) = (J/w) \hat u(\hat x) \f$ */
+ normal component $ u(x) = (J/w) \hat u(\hat x) $ */
H_CURL /**< For vector fields; preserves line integrals of the
tangential component
- \f$ u(x) = J^{-t} \hat u(\hat x) \f$ (square J),
- \f$ u(x) = J(J^t J)^{-1} \hat u(\hat x) \f$ (general J) */
+ $ u(x) = J^{-t} \hat u(\hat x) $ (square J),
+ $ u(x) = J(J^t J)^{-1} \hat u(\hat x) $ (general J) */
};
/** @brief Enumeration for DerivType: defines which derivative method
@@ -708,6 +713,9 @@ public:
/// Class for standard nodal finite elements.
class NodalFiniteElement : public ScalarFiniteElement
{
+private:
+ /// Create and cache the LEXICOGRAPHIC_FULL DofToQuad maps.
+ void CreateLexicographicFullMap(const IntegrationRule &ir) const;
protected:
Array lex_ordering;
void ProjectCurl_2D(const FiniteElement &fe,
@@ -726,6 +734,9 @@ public:
int F = FunctionSpace::Pk)
: ScalarFiniteElement(D, G, Do, O, F) { }
+ const DofToQuad &GetDofToQuad(const IntegrationRule &ir,
+ DofToQuad::Mode mode) const override;
+
void GetLocalInterpolation(ElementTransformation &Trans,
DenseMatrix &I) const override
{ NodalLocalInterpolation(Trans, I, *this); }
@@ -1249,12 +1260,7 @@ public:
const DofMapType dmtype);
const DofToQuad &GetDofToQuad(const IntegrationRule &ir,
- DofToQuad::Mode mode) const override
- {
- return (mode == DofToQuad::FULL) ?
- FiniteElement::GetDofToQuad(ir, mode) :
- GetTensorDofToQuad(*this, ir, mode, basis1d, true, dof2quad_array);
- }
+ DofToQuad::Mode mode) const override;
void SetMapType(const int map_type_) override;
@@ -1297,15 +1303,15 @@ public:
const DofToQuad &GetDofToQuad(const IntegrationRule &ir,
DofToQuad::Mode mode) const override
{
- return (mode == DofToQuad::FULL) ?
- FiniteElement::GetDofToQuad(ir, mode) :
- GetTensorDofToQuad(*this, ir, mode, basis1d, true, dof2quad_array);
+ return (mode == DofToQuad::TENSOR) ?
+ GetTensorDofToQuad(*this, ir, mode, basis1d, true, dof2quad_array) :
+ FiniteElement::GetDofToQuad(ir, mode);
}
const DofToQuad &GetDofToQuadOpen(const IntegrationRule &ir,
DofToQuad::Mode mode) const
{
- MFEM_VERIFY(mode != DofToQuad::FULL, "invalid mode requested");
+ MFEM_VERIFY(mode == DofToQuad::TENSOR, "invalid mode requested");
return GetTensorDofToQuad(*this, ir, mode, obasis1d, false,
dof2quad_array_open);
}
diff --git a/fem/fe/fe_fixed_order.cpp b/fem/fe/fe_fixed_order.cpp
index 938e70817b..33c7ca399a 100644
--- a/fem/fe/fe_fixed_order.cpp
+++ b/fem/fe/fe_fixed_order.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_fixed_order.hpp b/fem/fe/fe_fixed_order.hpp
index 0177af9ab0..9d5307099c 100644
--- a/fem/fe/fe_fixed_order.hpp
+++ b/fem/fe/fe_fixed_order.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_h1.cpp b/fem/fe/fe_h1.cpp
index 40357675a6..3a430e3ac0 100644
--- a/fem/fe/fe_h1.cpp
+++ b/fem/fe/fe_h1.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_h1.hpp b/fem/fe/fe_h1.hpp
index 0a9e767951..80755cfcbc 100644
--- a/fem/fe/fe_h1.hpp
+++ b/fem/fe/fe_h1.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_l2.cpp b/fem/fe/fe_l2.cpp
index 7b7a036010..706ae3f3b0 100644
--- a/fem/fe/fe_l2.cpp
+++ b/fem/fe/fe_l2.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_l2.hpp b/fem/fe/fe_l2.hpp
index 2b1bf3a604..4f575c94a2 100644
--- a/fem/fe/fe_l2.hpp
+++ b/fem/fe/fe_l2.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_nd.cpp b/fem/fe/fe_nd.cpp
index 7522b5a769..60dc55e3b2 100644
--- a/fem/fe/fe_nd.cpp
+++ b/fem/fe/fe_nd.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_nd.hpp b/fem/fe/fe_nd.hpp
index c01129aed9..1da01beb1b 100644
--- a/fem/fe/fe_nd.hpp
+++ b/fem/fe/fe_nd.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_nurbs.cpp b/fem/fe/fe_nurbs.cpp
index ddea7dd810..987db40298 100644
--- a/fem/fe/fe_nurbs.cpp
+++ b/fem/fe/fe_nurbs.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_nurbs.hpp b/fem/fe/fe_nurbs.hpp
index d919dcbcbc..cbf3d2aa2a 100644
--- a/fem/fe/fe_nurbs.hpp
+++ b/fem/fe/fe_nurbs.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_pos.cpp b/fem/fe/fe_pos.cpp
index 1f67479139..7e275065fb 100644
--- a/fem/fe/fe_pos.cpp
+++ b/fem/fe/fe_pos.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_pos.hpp b/fem/fe/fe_pos.hpp
index 0154798f6f..3391c9dc10 100644
--- a/fem/fe/fe_pos.hpp
+++ b/fem/fe/fe_pos.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_rt.cpp b/fem/fe/fe_rt.cpp
index e38dc7de00..d854131340 100644
--- a/fem/fe/fe_rt.cpp
+++ b/fem/fe/fe_rt.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_rt.hpp b/fem/fe/fe_rt.hpp
index 5d9851aff5..d7859d6259 100644
--- a/fem/fe/fe_rt.hpp
+++ b/fem/fe/fe_rt.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_ser.cpp b/fem/fe/fe_ser.cpp
index e6accd926d..9e5abbedf3 100644
--- a/fem/fe/fe_ser.cpp
+++ b/fem/fe/fe_ser.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe/fe_ser.hpp b/fem/fe/fe_ser.hpp
index 0ca3ce03d8..bbfce979ec 100644
--- a/fem/fe/fe_ser.hpp
+++ b/fem/fe/fe_ser.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe_coll.cpp b/fem/fe_coll.cpp
index 6556da637a..d12437aea0 100644
--- a/fem/fe_coll.cpp
+++ b/fem/fe_coll.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fe_coll.hpp b/fem/fe_coll.hpp
index 5d7a79dc36..3f1414c051 100644
--- a/fem/fe_coll.hpp
+++ b/fem/fe_coll.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fem.hpp b/fem/fem.hpp
index 7d67f1b61f..9ff31383a3 100644
--- a/fem/fem.hpp
+++ b/fem/fem.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fespace.cpp b/fem/fespace.cpp
index 6cdf693810..03ef7afd12 100644
--- a/fem/fespace.cpp
+++ b/fem/fespace.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -587,7 +587,7 @@ void FiniteElementSpace::GetEssentialVDofs(const Array &bdr_attr_is_ess,
void FiniteElementSpace::GetEssentialTrueDofs(const Array &bdr_attr_is_ess,
Array &ess_tdof_list,
- int component)
+ int component) const
{
Array ess_vdofs, ess_tdofs;
GetEssentialVDofs(bdr_attr_is_ess, ess_vdofs, component);
@@ -2858,12 +2858,12 @@ void FiniteElementSpace::GetBdrElementDofs(int bel, Array &dofs,
{
bdr_elem_dof->GetRow(bel, dofs);
- if (DoFTransArray[mesh->GetBdrElementBaseGeometry(bel)])
+ if (DoFTransArray[mesh->GetBdrElementGeometry(bel)])
{
Array Fo;
bdr_elem_fos -> GetRow (bel, Fo);
doftrans.SetDofTransformation(
- *DoFTransArray[mesh->GetBdrElementBaseGeometry(bel)]);
+ *DoFTransArray[mesh->GetBdrElementGeometry(bel)]);
doftrans.SetFaceOrientations(Fo);
doftrans.SetVDim();
}
@@ -2894,12 +2894,12 @@ void FiniteElementSpace::GetBdrElementDofs(int bel, Array &dofs,
{
mesh->GetBdrElementFace(bel, &F, &oF);
- if (DoFTransArray[mesh->GetBdrElementBaseGeometry(bel)])
+ if (DoFTransArray[mesh->GetBdrElementGeometry(bel)])
{
mfem::Array Fo(1);
Fo[0] = oF;
doftrans.SetDofTransformation(
- *DoFTransArray[mesh->GetBdrElementBaseGeometry(bel)]);
+ *DoFTransArray[mesh->GetBdrElementGeometry(bel)]);
doftrans.SetFaceOrientations(Fo);
doftrans.SetVDim();
}
@@ -3221,7 +3221,7 @@ const FiniteElement *FiniteElementSpace::GetBE(int i) const
break;
case 3:
default:
- BE = fec->GetFE(mesh->GetBdrElementBaseGeometry(i), order);
+ BE = fec->GetFE(mesh->GetBdrElementGeometry(i), order);
}
if (NURBSext)
@@ -3714,4 +3714,11 @@ FiniteElementCollection *FiniteElementSpace::Load(Mesh *m, std::istream &input)
return r_fec;
}
+ElementDofOrdering GetEVectorOrdering(const FiniteElementSpace& fes)
+{
+ return UsesTensorBasis(fes)?
+ ElementDofOrdering::LEXICOGRAPHIC:
+ ElementDofOrdering::NATIVE;
+}
+
} // namespace mfem
diff --git a/fem/fespace.hpp b/fem/fespace.hpp
index aaf95ea825..1e4d00857b 100644
--- a/fem/fespace.hpp
+++ b/fem/fespace.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -1199,7 +1199,7 @@ public:
to restricts the marked tDOFs to the specified component. */
virtual void GetEssentialTrueDofs(const Array &bdr_attr_is_ess,
Array &ess_tdof_list,
- int component = -1);
+ int component = -1) const;
/** @brief Get a list of all boundary true dofs, @a boundary_dofs. For spaces
with 'vdim' > 1, the 'component' parameter can be used to restricts the
@@ -1351,6 +1351,10 @@ inline bool UsesTensorBasis(const FiniteElementSpace& fes)
dynamic_cast(fes.GetFE(0))!=nullptr;
}
+/// @brief Return LEXICOGRAPHIC if mesh contains only one topology and the elements are tensor
+/// elements, otherwise, return NATIVE.
+ElementDofOrdering GetEVectorOrdering(const FiniteElementSpace& fes);
+
}
#endif
diff --git a/fem/fespacehierarchy.cpp b/fem/fespacehierarchy.cpp
index 8a6e3ee5d5..75a7b81d09 100644
--- a/fem/fespacehierarchy.cpp
+++ b/fem/fespacehierarchy.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fespacehierarchy.hpp b/fem/fespacehierarchy.hpp
index 87f23510b3..30f19f8de5 100644
--- a/fem/fespacehierarchy.hpp
+++ b/fem/fespacehierarchy.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fmsconvert.cpp b/fem/fmsconvert.cpp
index d9a05716c3..8a5e2d78d0 100644
--- a/fem/fmsconvert.cpp
+++ b/fem/fmsconvert.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fmsconvert.hpp b/fem/fmsconvert.hpp
index 17b2fa2f69..d0aa7639b5 100644
--- a/fem/fmsconvert.hpp
+++ b/fem/fmsconvert.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fmsdatacollection.cpp b/fem/fmsdatacollection.cpp
index c501f3bee2..372824ba56 100644
--- a/fem/fmsdatacollection.cpp
+++ b/fem/fmsdatacollection.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/fmsdatacollection.hpp b/fem/fmsdatacollection.hpp
index 03ec3c0614..4c604a240d 100644
--- a/fem/fmsdatacollection.hpp
+++ b/fem/fmsdatacollection.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/geom.cpp b/fem/geom.cpp
index 2d9f4e9074..fb20ff5957 100644
--- a/fem/geom.cpp
+++ b/fem/geom.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -252,6 +252,34 @@ Geometry::Geometry()
}
}
+template
+int GetInverseOrientation_(int orientation)
+{
+ using geom_t = Geometry::Constants;
+ MFEM_ASSERT(0 <= orientation && orientation < geom_t::NumOrient,
+ "Invalid orientation");
+ return geom_t::InvOrient[orientation];
+}
+
+int Geometry::GetInverseOrientation(Type geom_type, int orientation)
+{
+ switch (geom_type)
+ {
+ case Geometry::POINT:
+ return GetInverseOrientation_(orientation);
+ case Geometry::SEGMENT:
+ return GetInverseOrientation_(orientation);
+ case Geometry::TRIANGLE:
+ return GetInverseOrientation_(orientation);
+ case Geometry::SQUARE:
+ return GetInverseOrientation_(orientation);
+ case Geometry::TETRAHEDRON:
+ return GetInverseOrientation_(orientation);
+ default:
+ MFEM_ABORT("Geometry type does not have inverse orientations");
+ }
+}
+
Geometry::~Geometry()
{
for (int i = 0; i < NumGeom; i++)
diff --git a/fem/geom.hpp b/fem/geom.hpp
index 67293e0482..d64281d689 100644
--- a/fem/geom.hpp
+++ b/fem/geom.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -122,6 +122,9 @@ public:
}
}
+ /// Return the inverse of the given orientation for the specified geometry type.
+ static int GetInverseOrientation(Type geom_type, int orientation);
+
/// Return the number of boundary "faces" of a given Geometry::Type.
int NumBdr(int GeomType) const { return NumBdrArray[GeomType]; }
};
diff --git a/fem/gridfunc.cpp b/fem/gridfunc.cpp
index 310d8d7043..1c81680af5 100644
--- a/fem/gridfunc.cpp
+++ b/fem/gridfunc.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -1924,9 +1924,9 @@ void GridFunction::GetNodalValues(Vector &nval, int vdim) const
Array values;
Array overlap(fes->GetNV());
nval.SetSize(fes->GetNV());
-
nval = 0.0;
overlap = 0;
+ nval.HostReadWrite();
for (i = 0; i < fes->GetNE(); i++)
{
fes->GetElementVertices(i, vertices);
@@ -2058,7 +2058,7 @@ void GridFunction::AccumulateAndCountZones(VectorCoefficient &vcoeff,
}
void GridFunction::AccumulateAndCountBdrValues(
- Coefficient *coeff[], VectorCoefficient *vcoeff, Array &attr,
+ Coefficient *coeff[], VectorCoefficient *vcoeff, const Array &attr,
Array &values_counter)
{
int i, j, fdof, d, ind, vdim;
@@ -2200,7 +2200,7 @@ static void accumulate_dofs(const Array &dofs, const Vector &vals,
}
void GridFunction::AccumulateAndCountBdrTangentValues(
- VectorCoefficient &vcoeff, Array &bdr_attr,
+ VectorCoefficient &vcoeff, const Array &bdr_attr,
Array &values_counter)
{
const FiniteElement *fe;
@@ -2576,7 +2576,7 @@ void GridFunction::ProjectDiscCoefficient(VectorCoefficient &coeff,
}
void GridFunction::ProjectBdrCoefficient(VectorCoefficient &vcoeff,
- Array &attr)
+ const Array &attr)
{
Array values_counter;
AccumulateAndCountBdrValues(NULL, &vcoeff, attr, values_counter);
@@ -2593,7 +2593,8 @@ void GridFunction::ProjectBdrCoefficient(VectorCoefficient &vcoeff,
#endif
}
-void GridFunction::ProjectBdrCoefficient(Coefficient *coeff[], Array &attr)
+void GridFunction::ProjectBdrCoefficient(Coefficient *coeff[],
+ const Array &attr)
{
Array values_counter;
// this->HostReadWrite(); // done inside the next call
@@ -2623,7 +2624,7 @@ void GridFunction::ProjectBdrCoefficient(Coefficient *coeff[], Array &attr)
}
void GridFunction::ProjectBdrCoefficientNormal(
- VectorCoefficient &vcoeff, Array &bdr_attr)
+ VectorCoefficient &vcoeff, const Array &bdr_attr)
{
#if 0
// implementation for the case when the face dofs are integrals of the
@@ -2698,7 +2699,7 @@ void GridFunction::ProjectBdrCoefficientNormal(
}
void GridFunction::ProjectBdrCoefficientTangent(
- VectorCoefficient &vcoeff, Array &bdr_attr)
+ VectorCoefficient &vcoeff, const Array &bdr_attr)
{
Array values_counter;
AccumulateAndCountBdrTangentValues(vcoeff, bdr_attr, values_counter);
@@ -2746,7 +2747,8 @@ double GridFunction::ComputeL2Error(
for (j = 0; j < ir->GetNPoints(); j++)
{
const IntegrationPoint &ip = ir->IntPoint(j);
- fe->CalcShape(ip, shape);
+ transf->SetIntPoint(&ip);
+ fe->CalcPhysShape(*transf, shape);
for (d = 0; d < fes->GetVDim(); d++)
{
a = 0;
@@ -2759,7 +2761,6 @@ double GridFunction::ComputeL2Error(
{
a -= (*this)(-1-vdofs[fdof*d+k]) * shape(k);
}
- transf->SetIntPoint(&ip);
a -= exsol[d]->Eval(*transf, ip);
error += ip.weight * transf->Weight() * a * a;
}
diff --git a/fem/gridfunc.hpp b/fem/gridfunc.hpp
index d7cf303be5..74df80bb1b 100644
--- a/fem/gridfunc.hpp
+++ b/fem/gridfunc.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -355,8 +355,8 @@ public:
variable. */
void GetVectorGradientHat(ElementTransformation &T, DenseMatrix &gh) const;
- /** Compute \f$ (\int_{\Omega} (*this) \psi_i)/(\int_{\Omega} \psi_i) \f$,
- where \f$ \psi_i \f$ are the basis functions for the FE space of avgs.
+ /** Compute $ (\int_{\Omega} (*this) \psi_i)/(\int_{\Omega} \psi_i) $,
+ where $ \psi_i $ are the basis functions for the FE space of avgs.
Both FE spaces should be scalar and on the same mesh. */
void GetElementAverages(GridFunction &avgs) const;
@@ -446,11 +446,12 @@ protected:
Array &zones_per_dof);
void AccumulateAndCountBdrValues(Coefficient *coeff[],
- VectorCoefficient *vcoeff, Array &attr,
+ VectorCoefficient *vcoeff,
+ const Array &attr,
Array &values_counter);
void AccumulateAndCountBdrTangentValues(VectorCoefficient &vcoeff,
- Array &bdr_attr,
+ const Array &bdr_attr,
Array &values_counter);
// Complete the computation of averages; called e.g. after
@@ -465,7 +466,7 @@ public:
/** @brief Project a Coefficient on the GridFunction, modifying only DOFs on
the boundary associated with the boundary attributes marked in the
@a attr array. */
- void ProjectBdrCoefficient(Coefficient &coeff, Array &attr)
+ void ProjectBdrCoefficient(Coefficient &coeff, const Array &attr)
{
Coefficient *coeff_p = &coeff;
ProjectBdrCoefficient(&coeff_p, attr);
@@ -475,26 +476,27 @@ public:
DOFs on the boundary associated with the boundary attributes marked in
the @a attr array. */
virtual void ProjectBdrCoefficient(VectorCoefficient &vcoeff,
- Array &attr);
+ const Array &attr);
/** @brief Project a set of Coefficient%s on the components of the
GridFunction, modifying only DOFs on the boundary associated with the
boundary attributed marked in the @a attr array. */
/** If a Coefficient pointer in the array @a coeff is NULL, that component
will not be touched. */
- virtual void ProjectBdrCoefficient(Coefficient *coeff[], Array &attr);
+ virtual void ProjectBdrCoefficient(Coefficient *coeff[],
+ const Array &attr);
/** Project the normal component of the given VectorCoefficient on
the boundary. Only boundary attributes that are marked in
'bdr_attr' are projected. Assumes RT-type VectorFE GridFunction. */
void ProjectBdrCoefficientNormal(VectorCoefficient &vcoeff,
- Array &bdr_attr);
+ const Array &bdr_attr);
/** @brief Project the tangential components of the given VectorCoefficient
on the boundary. Only boundary attributes that are marked in @a bdr_attr
are projected. Assumes ND-type VectorFE GridFunction. */
virtual void ProjectBdrCoefficientTangent(VectorCoefficient &vcoeff,
- Array &bdr_attr);
+ const Array &bdr_attr);
virtual double ComputeL2Error(Coefficient *exsol[],
const IntegrationRule *irs[] = NULL,
diff --git a/fem/gslib.cpp b/fem/gslib.cpp
index 99f12fe355..270862feb4 100644
--- a/fem/gslib.cpp
+++ b/fem/gslib.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -159,7 +159,11 @@ void FindPointsGSLIB::Setup(Mesh &m, const double bb_t, const double newt_tol,
{
unsigned nr[2] = { dof1D, dof1D };
unsigned mr[2] = { 2*dof1D, 2*dof1D };
- double * const elx[2] = { &gsl_mesh(0), &gsl_mesh(pts_cnt) };
+ double * const elx[2] =
+ {
+ pts_cnt == 0 ? nullptr : &gsl_mesh(0),
+ pts_cnt == 0 ? nullptr : &gsl_mesh(pts_cnt)
+ };
fdata2D = findpts_setup_2(gsl_comm, elx, nr, NEtot, mr, bb_t,
pts_cnt, pts_cnt, npt_max, newt_tol);
}
@@ -168,7 +172,11 @@ void FindPointsGSLIB::Setup(Mesh &m, const double bb_t, const double newt_tol,
unsigned nr[3] = { dof1D, dof1D, dof1D };
unsigned mr[3] = { 2*dof1D, 2*dof1D, 2*dof1D };
double * const elx[3] =
- { &gsl_mesh(0), &gsl_mesh(pts_cnt), &gsl_mesh(2*pts_cnt) };
+ {
+ pts_cnt == 0 ? nullptr : &gsl_mesh(0),
+ pts_cnt == 0 ? nullptr : &gsl_mesh(pts_cnt),
+ pts_cnt == 0 ? nullptr : &gsl_mesh(2*pts_cnt)
+ };
fdata3D = findpts_setup_3(gsl_comm, elx, nr, NEtot, mr, bb_t,
pts_cnt, pts_cnt, npt_max, newt_tol);
}
@@ -1229,7 +1237,11 @@ void OversetFindPointsGSLIB::Setup(Mesh &m, const int meshid,
{
unsigned nr[2] = { dof1D, dof1D };
unsigned mr[2] = { 2*dof1D, 2*dof1D };
- double * const elx[2] = { &gsl_mesh(0), &gsl_mesh(pts_cnt) };
+ double * const elx[2] =
+ {
+ pts_cnt == 0 ? nullptr : &gsl_mesh(0),
+ pts_cnt == 0 ? nullptr : &gsl_mesh(pts_cnt)
+ };
fdata2D = findptsms_setup_2(gsl_comm, elx, nr, NEtot, mr, bb_t,
pts_cnt, pts_cnt, npt_max, newt_tol,
&u_meshid, &distfint(0));
@@ -1239,7 +1251,11 @@ void OversetFindPointsGSLIB::Setup(Mesh &m, const int meshid,
unsigned nr[3] = { dof1D, dof1D, dof1D };
unsigned mr[3] = { 2*dof1D, 2*dof1D, 2*dof1D };
double * const elx[3] =
- { &gsl_mesh(0), &gsl_mesh(pts_cnt), &gsl_mesh(2*pts_cnt) };
+ {
+ pts_cnt == 0 ? nullptr : &gsl_mesh(0),
+ pts_cnt == 0 ? nullptr : &gsl_mesh(pts_cnt),
+ pts_cnt == 0 ? nullptr : &gsl_mesh(2*pts_cnt)
+ };
fdata3D = findptsms_setup_3(gsl_comm, elx, nr, NEtot, mr, bb_t,
pts_cnt, pts_cnt, npt_max, newt_tol,
&u_meshid, &distfint(0));
diff --git a/fem/gslib.hpp b/fem/gslib.hpp
index 3be11924d5..c785f28d98 100644
--- a/fem/gslib.hpp
+++ b/fem/gslib.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/hybridization.cpp b/fem/hybridization.cpp
index f9d4699c2a..6fac83522a 100644
--- a/fem/hybridization.cpp
+++ b/fem/hybridization.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/hybridization.hpp b/fem/hybridization.hpp
index b8ea3a7d8f..1f600d73d4 100644
--- a/fem/hybridization.hpp
+++ b/fem/hybridization.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -22,38 +22,38 @@ namespace mfem
/** Auxiliary class Hybridization, used to implement BilinearForm hybridization.
Hybridization can be viewed as a technique for solving linear systems
- obtained through finite element assembly. The assembled matrix \f$ A \f$ can
+ obtained through finite element assembly. The assembled matrix $ A $ can
be written as:
- \f[ A = P^T \hat{A} P, \f]
- where \f$ P \f$ is the matrix mapping the conforming finite element space to
+ $$ A = P^T \hat{A} P, $$
+ where $ P $ is the matrix mapping the conforming finite element space to
the purely local finite element space without any inter-element constraints
- imposed, and \f$ \hat{A} \f$ is the block-diagonal matrix of all element
+ imposed, and $ \hat{A} $ is the block-diagonal matrix of all element
matrices.
We assume that:
- - \f$ \hat{A} \f$ is invertible,
- - \f$ P \f$ has a left inverse \f$ R \f$, such that \f$ R P = I \f$,
- - a constraint matrix \f$ C \f$ can be constructed, such that
- \f$ \operatorname{Ker}(C) = \operatorname{Im}(P) \f$.
+ - $ \hat{A} $ is invertible,
+ - $ P $ has a left inverse $ R $, such that $ R P = I $,
+ - a constraint matrix $ C $ can be constructed, such that
+ $ \operatorname{Ker}(C) = \operatorname{Im}(P) $.
- Under these conditions, the linear system \f$ A x = b \f$ can be solved
+ Under these conditions, the linear system $ A x = b $ can be solved
using the following procedure:
- - solve for \f$ \lambda \f$ in the linear system:
- \f[ (C \hat{A}^{-1} C^T) \lambda = C \hat{A}^{-1} R^T b \f]
- - compute \f$ x = R \hat{A}^{-1} (R^T b - C^T \lambda) \f$
+ - solve for $ \lambda $ in the linear system:
+ $$ (C \hat{A}^{-1} C^T) \lambda = C \hat{A}^{-1} R^T b $$
+ - compute $ x = R \hat{A}^{-1} (R^T b - C^T \lambda) $
Hybridization is advantageous when the matrix
- \f$ H = (C \hat{A}^{-1} C^T) \f$ of the hybridized system is either smaller
+ $ H = (C \hat{A}^{-1} C^T) $ of the hybridized system is either smaller
than the original system, or is simpler to invert with a known method.
- In some cases, e.g. high-order elements, the matrix \f$ C \f$ can be written
+ In some cases, e.g. high-order elements, the matrix $ C $ can be written
as
- \f[ C = \begin{pmatrix} 0 & C_b \end{pmatrix}, \f]
- and then the hybridized matrix \f$ H \f$ can be assembled using the identity
- \f[ H = C_b S_b^{-1} C_b^T, \f]
- where \f$ S_b \f$ is the Schur complement of \f$ \hat{A} \f$ with respect to
- the same decomposition as the columns of \f$ C \f$:
- \f[ S_b = \hat{A}_b - \hat{A}_{bf} \hat{A}_{f}^{-1} \hat{A}_{fb}. \f]
+ $$ C = \begin{pmatrix} 0 & C_b \end{pmatrix}, $$
+ and then the hybridized matrix $ H $ can be assembled using the identity
+ $$ H = C_b S_b^{-1} C_b^T, $$
+ where $ S_b $ is the Schur complement of $ \hat{A} $ with respect to
+ the same decomposition as the columns of $ C $:
+ $$ S_b = \hat{A}_b - \hat{A}_{bf} \hat{A}_{f}^{-1} \hat{A}_{fb}. $$
Hybridization can also be viewed as a discretization method for imposing
(weak) continuity constraints between neighboring elements. */
diff --git a/fem/integ/bilininteg_br2.cpp b/fem/integ/bilininteg_br2.cpp
index 1599470292..7953617c07 100644
--- a/fem/integ/bilininteg_br2.cpp
+++ b/fem/integ/bilininteg_br2.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_convection_ea.cpp b/fem/integ/bilininteg_convection_ea.cpp
index f90032bab3..6c70cb292e 100644
--- a/fem/integ/bilininteg_convection_ea.cpp
+++ b/fem/integ/bilininteg_convection_ea.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_convection_mf.cpp b/fem/integ/bilininteg_convection_mf.cpp
index 22ed53c33b..e695ea7e04 100644
--- a/fem/integ/bilininteg_convection_mf.cpp
+++ b/fem/integ/bilininteg_convection_mf.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_convection_pa.cpp b/fem/integ/bilininteg_convection_pa.cpp
index 8c9689e8ea..2f434c0f49 100644
--- a/fem/integ/bilininteg_convection_pa.cpp
+++ b/fem/integ/bilininteg_convection_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_curlcurl_pa.cpp b/fem/integ/bilininteg_curlcurl_pa.cpp
index 68914fe141..aa69244ccc 100644
--- a/fem/integ/bilininteg_curlcurl_pa.cpp
+++ b/fem/integ/bilininteg_curlcurl_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_dgtrace_ea.cpp b/fem/integ/bilininteg_dgtrace_ea.cpp
index f957276641..60d5ef44ed 100644
--- a/fem/integ/bilininteg_dgtrace_ea.cpp
+++ b/fem/integ/bilininteg_dgtrace_ea.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_dgtrace_pa.cpp b/fem/integ/bilininteg_dgtrace_pa.cpp
index fc27f04567..51887b1f11 100644
--- a/fem/integ/bilininteg_dgtrace_pa.cpp
+++ b/fem/integ/bilininteg_dgtrace_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_diffusion_ea.cpp b/fem/integ/bilininteg_diffusion_ea.cpp
index baedc64ebf..a789288d34 100644
--- a/fem/integ/bilininteg_diffusion_ea.cpp
+++ b/fem/integ/bilininteg_diffusion_ea.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_diffusion_kernels.cpp b/fem/integ/bilininteg_diffusion_kernels.cpp
index 162444bee0..ad8552bf9a 100644
--- a/fem/integ/bilininteg_diffusion_kernels.cpp
+++ b/fem/integ/bilininteg_diffusion_kernels.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_diffusion_kernels.hpp b/fem/integ/bilininteg_diffusion_kernels.hpp
index 8df5623ce0..f50cc819dd 100644
--- a/fem/integ/bilininteg_diffusion_kernels.hpp
+++ b/fem/integ/bilininteg_diffusion_kernels.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_diffusion_mf.cpp b/fem/integ/bilininteg_diffusion_mf.cpp
index 449246a02f..de388a8356 100644
--- a/fem/integ/bilininteg_diffusion_mf.cpp
+++ b/fem/integ/bilininteg_diffusion_mf.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_diffusion_pa.cpp b/fem/integ/bilininteg_diffusion_pa.cpp
index 52521bf0ff..7d9c407166 100644
--- a/fem/integ/bilininteg_diffusion_pa.cpp
+++ b/fem/integ/bilininteg_diffusion_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_diffusion_patch.cpp b/fem/integ/bilininteg_diffusion_patch.cpp
index 148ccc5c42..5707bc93a2 100644
--- a/fem/integ/bilininteg_diffusion_patch.cpp
+++ b/fem/integ/bilininteg_diffusion_patch.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -12,7 +12,6 @@
#include "../fem.hpp"
#include "../../mesh/nurbs.hpp"
-#include "../../general/tic_toc.hpp"
#include "../../linalg/dtensor.hpp" // For Reshape
#include "../../general/forall.hpp"
diff --git a/fem/integ/bilininteg_divdiv_pa.cpp b/fem/integ/bilininteg_divdiv_pa.cpp
index aee788e555..14a8097839 100644
--- a/fem/integ/bilininteg_divdiv_pa.cpp
+++ b/fem/integ/bilininteg_divdiv_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_elasticity_ea.cpp b/fem/integ/bilininteg_elasticity_ea.cpp
new file mode 100644
index 0000000000..77b0e2e68c
--- /dev/null
+++ b/fem/integ/bilininteg_elasticity_ea.cpp
@@ -0,0 +1,28 @@
+// Copyright (c) 2010-2024, Lawrence 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.
+
+#include "../../general/forall.hpp"
+#include "../bilininteg.hpp"
+#include "bilininteg_elasticity_kernels.hpp"
+
+namespace mfem
+{
+void ElasticityComponentIntegrator::AssembleEA(const FiniteElementSpace &fes,
+ Vector &emat,
+ const bool add)
+{
+ AssemblePA(fes);
+ const auto &ir = parent.q_space->GetIntRule(0);
+ internal::ElasticityAssembleEA(parent.vdim, i_block, j_block, parent.ndofs, ir,
+ *parent.lambda_quad, *parent.mu_quad,
+ *geom, *maps, emat);
+}
+}
diff --git a/fem/integ/bilininteg_elasticity_kernels.cpp b/fem/integ/bilininteg_elasticity_kernels.cpp
new file mode 100644
index 0000000000..314c01dfdd
--- /dev/null
+++ b/fem/integ/bilininteg_elasticity_kernels.cpp
@@ -0,0 +1,132 @@
+// Copyright (c) 2010-2024, Lawrence 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.
+
+#include "bilininteg_elasticity_kernels.hpp"
+
+namespace mfem
+{
+
+namespace internal
+{
+
+void ElasticityComponentAddMultPA(const int dim, const int nDofs,
+ const FiniteElementSpace &fespace, const CoefficientVector &lambda,
+ const CoefficientVector &mu, const GeometricFactors &geom,
+ const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y,
+ const int i_block, const int j_block)
+{
+ const int id = (dim << 8)| (i_block << 4) | j_block;
+ switch (id)
+ {
+ case 0x200:
+ ElasticityAddMultPA_<2,0,0>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x211:
+ ElasticityAddMultPA_<2,1,1>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x201:
+ ElasticityAddMultPA_<2,0,1>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x210:
+ ElasticityAddMultPA_<2,1,0>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x300:
+ ElasticityAddMultPA_<3,0,0>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x311:
+ ElasticityAddMultPA_<3,1,1>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x322:
+ ElasticityAddMultPA_<3,2,2>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x301:
+ ElasticityAddMultPA_<3,0,1>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x302:
+ ElasticityAddMultPA_<3,0,2>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x312:
+ ElasticityAddMultPA_<3,1,2>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x310:
+ ElasticityAddMultPA_<3,1,0>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x320:
+ ElasticityAddMultPA_<3,2,0>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 0x321:
+ ElasticityAddMultPA_<3,2,1>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ default:
+ MFEM_ABORT("Invalid configuration.");
+ }
+}
+
+void ElasticityAddMultPA(const int dim, const int nDofs,
+ const FiniteElementSpace &fespace, const CoefficientVector &lambda,
+ const CoefficientVector &mu, const GeometricFactors &geom,
+ const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y)
+{
+ switch (dim)
+ {
+ case 2:
+ ElasticityAddMultPA_<2>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ case 3:
+ ElasticityAddMultPA_<3>(nDofs, fespace, lambda, mu, geom, maps, x, QVec, y);
+ break;
+ default:
+ MFEM_ABORT("Only dimensions 2 and 3 supported.");
+ }
+}
+
+void ElasticityAssembleDiagonalPA(const int dim, const int nDofs,
+ const CoefficientVector &lambda,
+ const CoefficientVector &mu, const GeometricFactors &geom,
+ const DofToQuad &maps, QuadratureFunction &QVec, Vector &diag)
+{
+ switch (dim)
+ {
+ case 2:
+ ElasticityAssembleDiagonalPA_<2>(nDofs, lambda, mu, geom, maps, QVec, diag);
+ break;
+ case 3:
+ ElasticityAssembleDiagonalPA_<3>(nDofs, lambda, mu, geom, maps, QVec, diag);
+ break;
+ default:
+ MFEM_ABORT("Only dimensions 2 and 3 supported.");
+ }
+}
+
+void ElasticityAssembleEA(const int dim, const int i_block, const int j_block,
+ const int nDofs, const IntegrationRule &ir,
+ const CoefficientVector &lambda,
+ const CoefficientVector &mu, const GeometricFactors &geom,
+ const DofToQuad &maps, Vector &emat)
+{
+ switch (dim)
+ {
+ case 2:
+ ElasticityAssembleEA_<2>(i_block, j_block, nDofs, ir, lambda, mu, geom, maps,
+ emat);
+ break;
+ case 3:
+ ElasticityAssembleEA_<3>(i_block, j_block, nDofs, ir, lambda, mu, geom, maps,
+ emat);
+ break;
+ default:
+ MFEM_ABORT("Only dimensions 2 and 3 supported.");
+ }
+}
+
+} // namespace internal
+
+} // namespace mfem
diff --git a/fem/integ/bilininteg_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp
new file mode 100644
index 0000000000..4f3693a5fd
--- /dev/null
+++ b/fem/integ/bilininteg_elasticity_kernels.hpp
@@ -0,0 +1,417 @@
+// Copyright (c) 2010-2024, Lawrence 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.
+
+/**
+ * @brief Header for small strain, isotropic, linear elasticity kernels.
+ *
+ * Strong form: -div(sigma(u))
+ *
+ * The constitutive model is given in terms of Lame parameters,
+ * sigma(u) = lambda*div(u)I + 2*mu*sym(grad(u)).
+ * The weak form implemented is (suppressing integral)
+ *
+ * Weak form : lambda*div(u)*div(v) + 2*mu*sym(grad(u))*sym(grad(v))
+ *
+ * DATA LAYOUT ASSUMPTIONS :
+ * Finite element space - Ordering::byNODES
+ * Finite element basis - ElementDofOrdering::NATIVE
+ * Quadrature functions - QVectorLayout::byNODES
+ * All elements in "fespace" are the same.
+ */
+
+#ifndef MFEM_BILININTEG_ELASTICITY_KERNELS_HPP
+#define MFEM_BILININTEG_ELASTICITY_KERNELS_HPP
+
+#include "../../config/config.hpp"
+#include "../../general/array.hpp"
+#include "../../general/forall.hpp"
+#include "../../linalg/dtensor.hpp"
+#include "../../linalg/vector.hpp"
+#include "../../linalg/tensor.hpp"
+#include "../quadinterpolator.hpp"
+#include "../bilininteg.hpp"
+#include "../coefficient.hpp"
+#include "../qfunction.hpp"
+
+namespace mfem
+{
+
+namespace internal
+{
+
+/// @brief Elasticity kernel for AddMultPA.
+///
+/// Performs y += Ax. Implemented for byNODES ordering only, and does not use
+/// tensor basis, so it should work for any H1 element.
+///
+/// @param[in] dim 2 or 3
+/// @param[in] nDofs Number of scalar dofs per element.
+/// @param[in] fespace Vector-valued finite element space.
+/// @param[in] lambda Quadrature function for first Lame param.
+/// @param[in] mu Quadrature function for second Lame param.
+/// @param[in] geom Geometric factors corresponding to fespace.
+/// @param[in] maps DofToQuad maps for one element (assume elements all same).
+/// @param[in] x Input vector. nDofs x dim x numEls.
+/// @param Q Scratch Q-Vector. nQuad x dim x dim x numEls.
+/// @param[in,out] y Ax gets added to this. nDofs x dim x numEls.
+void ElasticityAddMultPA(const int dim, const int nDofs,
+ const FiniteElementSpace &fespace, const CoefficientVector &lambda,
+ const CoefficientVector &mu, const GeometricFactors &geom,
+ const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y);
+
+/// @brief Elasticity component kernel for AddMultPA.
+///
+/// Performs y += Ax. Implemented for byNODES ordering only, and does not use
+/// tensor basis, so it should work for any H1 element. i_block and j_block are
+/// the dimensional component that is integrated. They must both be
+/// non-negative.
+///
+/// Example: In 2D, A = [A_00 A_01], x = [x_0], y = [y_0]
+/// [A_10 A_11] [x_1] [y_1].
+/// So i_block = 0, j_block = 1 implies only y_0 += A_01*x_1 is evaluated.
+///
+/// @param[in] dim 2 or 3
+/// @param[in] nDofs Number of scalar dofs per element.
+/// @param[in] fespace Scalar-valued finite element space.
+/// @param[in] lambda Quadrature function for first Lame param.
+/// @param[in] mu Quadrature function for second Lame param.
+/// @param[in] geom Geometric factors corresponding to fespace.
+/// @param[in] maps DofToQuad maps for one element (assume elements all same).
+/// @param[in] x Input vector. nDofs x numEls.
+/// @param Q Scratch Q-Vector. nQuad x dim x numEls.
+/// @param[in,out] y Ax gets added to this. nDofs x numEls.
+/// @param[in] i_block The row dimensional component. <= dim - 1
+/// @param[in] j_block The column dimensional component. <= dim -1
+void ElasticityComponentAddMultPA(
+ const int dim, const int nDofs, const FiniteElementSpace &fespace,
+ const CoefficientVector &lambda, const CoefficientVector &mu,
+ const GeometricFactors &geom, const DofToQuad &maps, const Vector &x,
+ QuadratureFunction &QVec, Vector &y, const int i_block, const int j_block);
+
+/// @brief Elasticity kernel for AssembleEA.
+///
+/// Assembles the E-Matrix for a single dimensional component. Does not require
+/// tensor product elements.
+///
+/// Example: In 2D, A = [A_00 A_01]
+/// [A_10 A_11].
+/// So i_block = 0, j_block = 1 implies only A_01 is assembled.
+///
+/// Mainly intended to be used for order 1 elements on gpus to enable
+/// preconditioning with a LOR-AMG operator. It's expected behavior that higher
+/// orders may request too many resources.
+///
+/// @param[in] dim 2 or 3
+/// @param[in] i_block The row dimensional component. 0 <= i_block <= dim - 1
+/// @param[in] j_block The column dimensional component. 0 <= j_block<= dim -1
+/// @param[in] nDofs Number of scalar dofs per element.
+/// @param[in] lambda Quadrature function for first Lame param.
+/// @param[in] mu Quadrature function for second Lame param.
+/// @param[in] geom Geometric factors corresponding to fespace.
+/// @param[in] maps DofToQuad maps for one element (assume elements all same).
+/// @param[out] emat Resulting E-Matrix Vector. nDofs x nDofs x numEls.
+void ElasticityAssembleEA(const int dim, const int i_block, const int j_block,
+ const int nDofs, const IntegrationRule &ir,
+ const CoefficientVector &lambda,
+ const CoefficientVector &mu, const GeometricFactors &geom,
+ const DofToQuad &maps, Vector &emat);
+
+/// @brief Elasticity kernel for AssembleDiagonalPA.
+///
+/// @param[in] dim 2 or 3
+/// @param[in] nDofs Number of scalar dofs per element.
+/// @param[in] lambda Quadrature function for first Lame param.
+/// @param[in] mu Quadrature function for second Lame param.
+/// @param[in] geom Geometric factors corresponding to fespace.
+/// @param[in] maps DofToQuad maps for one element (assume elements all same).
+/// @param QVec Scratch Q-Vector. nQuad x dim x dim x dim x dim x numEls.
+/// @param[out] diag diagonal of A. nDofs x dim x numEls.
+void ElasticityAssembleDiagonalPA(const int dim, const int nDofs,
+ const CoefficientVector &lambda,
+ const CoefficientVector &mu, const GeometricFactors &geom,
+ const DofToQuad &maps, QuadratureFunction &QVec, Vector &diag);
+
+/// Templated implementation of ElasticityAddMultPA.
+template
+void ElasticityAddMultPA_(const int nDofs, const FiniteElementSpace &fespace,
+ const CoefficientVector &lambda, const CoefficientVector &mu,
+ const GeometricFactors &geom, const DofToQuad &maps, const Vector &x,
+ QuadratureFunction &QVec, Vector &y)
+{
+ static_assert((i_block < 0) == (j_block < 0),
+ "i_block and j_block must both be non-negative or strictly negative.");
+ static constexpr int d = dim;
+ static constexpr int qLower = (i_block < 0) ? 0 : i_block;
+ static constexpr int qUpper = (i_block < 0) ? d : i_block+1;
+ static constexpr int qSize = qUpper-qLower;
+ static constexpr int aLower = (j_block < 0) ? 0 : j_block;
+ static constexpr int aUpper = (j_block < 0) ? d : j_block+1;
+ static constexpr int aSize = aUpper-aLower;
+ static constexpr bool isComponent = (i_block >= 0);
+
+ //Assuming all elements are the same
+ const auto &ir = QVec.GetIntRule(0);
+ const QuadratureInterpolator *E_To_Q_Map = fespace.GetQuadratureInterpolator(
+ ir);
+ E_To_Q_Map->SetOutputLayout(QVectorLayout::byNODES);
+ // interpolate physical derivatives to quadrature points.
+ E_To_Q_Map->PhysDerivatives(x, QVec);
+
+ const int numPoints = ir.GetNPoints();
+ const int numEls = fespace.GetNE();
+ const auto lamDev = Reshape(lambda.Read(), numPoints, numEls);
+ const auto muDev = Reshape(mu.Read(), numPoints, numEls);
+ const auto J = Reshape(geom.J.Read(), numPoints, d, d, numEls);
+ auto Q = Reshape(QVec.ReadWrite(), numPoints, d, qSize, numEls);
+ const double *ipWeights = ir.GetWeights().Read();
+ mfem::forall_2D(numEls, numPoints, 1, [=] MFEM_HOST_DEVICE (int e)
+ {
+ // for(int p = 0; p < numPoints, )
+ MFEM_FOREACH_THREAD(p, x,numPoints)
+ {
+ auto invJ = inv(make_tensor(
+ [&](int i, int j) { return J(p, i, j, e); }));
+ tensor gradx;
+ //load grad(x) into gradx
+ if (isComponent)
+ {
+ for (int i = 0; i < d; i++)
+ {
+ gradx(0,i) = Q(p, i, 0, e);
+ }
+ }
+ else
+ {
+ for (int j = 0; j < d; j++)
+ {
+ for (int i = 0; i < d; i++)
+ {
+ gradx(i,j) = Q(p, i, j, e);
+ }
+ }
+ }
+ //compute divergence
+ double div = 0.;
+ for (int i = aLower; i < aUpper; i++)
+ {
+ //take size of gradx into account
+ const int iIndex = isComponent ? 0 : i;
+ div += gradx(iIndex,i);
+ }
+ const double w = ipWeights[p] /det(invJ);
+ for (int m = 0; m < d; m++)
+ {
+ for (int q = qLower; q < qUpper; q++)
+ {
+ //compute contraction of 4*sym(grad(u))sym(grad(v)) term.
+ //this contraction could be made slightly cheaper using Voigt
+ //notation, but repeated entries are summed for simplicity.
+ double contraction = 0.;
+ //not sure how to combine cases
+ if (isComponent)
+ {
+ for (int a = 0; a < d; a++)
+ {
+ contraction += 2*((a == q)*invJ(m,j_block) + (j_block==q)*invJ(m,a))*(gradx(0,
+ a));
+ }
+ }
+ else
+ {
+ for (int a = 0; a < d; a++)
+ {
+ for (int b = 0; b < d; b++)
+ {
+ contraction += ((a == q)*invJ(m,b) + (b==q)*invJ(m,a))
+ *(gradx(a,b) + gradx(b, a));
+ }
+ }
+ }
+ // lambda*div(u)*div(v) + 2*mu*sym(grad(u))*sym(grad(v))
+ // contraction = 4*sym(grad(u))sym(grad(v))
+ const int qIndex = isComponent ? 0 : q;
+ Q(p,m,qIndex,e) = w*(lamDev(p, e)*invJ(m,q)*div + 0.5*muDev(p, e)*contraction);
+ }
+ }
+ }
+ });
+
+ // Reduce quadrature function to an E-Vector
+ const auto QRead = Reshape(QVec.Read(), numPoints, d, qSize, numEls);
+ const auto G = Reshape(maps.G.Read(), numPoints, d, nDofs);
+ auto yDev = Reshape(y.ReadWrite(), nDofs, qSize, numEls);
+ mfem::forall_2D(numEls, qSize, nDofs, [=] MFEM_HOST_DEVICE (int e)
+ {
+ MFEM_FOREACH_THREAD(i, y, nDofs)
+ {
+ MFEM_FOREACH_THREAD(q, x, qSize)
+ {
+ const int qIndex = isComponent ? 0 : q;
+ double sum = 0.;
+ for (int m = 0; m < d; m++ )
+ {
+ for (int p = 0; p < numPoints; p++ )
+ {
+ sum += QRead(p,m,qIndex,e)*G(p,m,i);
+ }
+ }
+ yDev(i, qIndex, e) += sum;
+ }
+ }
+ });
+}
+
+/// Templated implementation of ElasticityAssembleDiagonalPA.
+template
+void ElasticityAssembleDiagonalPA_(const int nDofs,
+ const CoefficientVector &lambda,
+ const CoefficientVector &mu, const GeometricFactors &geom,
+ const DofToQuad &maps, QuadratureFunction &QVec, Vector &diag)
+{
+ //Assuming all elements are the same
+ const auto &ir = QVec.GetIntRule(0);
+ static constexpr int d = dim;
+ const int numPoints = ir.GetNPoints();
+ const int numEls = lambda.Size()/numPoints;
+ const auto lamDev = Reshape(lambda.Read(), numPoints, numEls);
+ const auto muDev = Reshape(mu.Read(), numPoints, numEls);
+ const auto J = Reshape(geom.J.Read(), numPoints, d, d, numEls);
+ auto Q = Reshape(QVec.ReadWrite(), numPoints, d,d, d, numEls);
+ const double *ipWeights = ir.GetWeights().Read();
+ mfem::forall_2D(numEls, numPoints,1, [=] MFEM_HOST_DEVICE (int e)
+ {
+ MFEM_FOREACH_THREAD(p, x,numPoints)
+ {
+ auto invJ = inv(make_tensor(
+ [&](int i, int j) { return J(p, i, j, e); }));
+ const double w = ipWeights[p] /det(invJ);
+ for (int n = 0; n < d; n++)
+ {
+ for (int m = 0; m < d; m++)
+ {
+ for (int q = 0; q < d; q++)
+ {
+ //compute contraction of 4*sym(grad(u))sym(grad(v)) term.
+ //this contraction could be made slightly cheaper using Voigt
+ //notation, but repeated entries are summed for simplicity.
+ double contraction = 0.;
+ for (int a = 0; a < d; a++)
+ {
+ for (int b = 0; b < d; b++)
+ {
+ contraction += ((a == q)*invJ(m,b) + (b==q)*invJ(m,a))*((a == q)
+ *invJ(n, b) + (b==q)*invJ(n,a));
+ }
+ }
+ // lambda*div(u)*div(v) + 2*mu*sym(grad(u))*sym(grad(v))
+ // contraction = 4*sym(grad(u))sym(grad(v))
+ Q(p,m,n,q,e) = w*(lamDev(p, e)*invJ(m,q)*invJ(n,q)
+ + 0.5*muDev(p, e)*contraction);
+ }
+ }
+ }
+ }
+ });
+
+ //Reduce quadrature function to an E-Vector
+ const auto QRead = Reshape(QVec.Read(), numPoints, d, d, d, numEls);
+ auto diagDev = Reshape(diag.Write(), nDofs, d, numEls);
+ const auto G = Reshape(maps.G.Read(), numPoints, d, nDofs);
+ mfem::forall_2D(numEls, d, nDofs, [=] MFEM_HOST_DEVICE (int e)
+ {
+ MFEM_FOREACH_THREAD(i, y, nDofs)
+ {
+ MFEM_FOREACH_THREAD(q, x, d)
+ {
+ double sum = 0.;
+ for (int n = 0; n < d; n++)
+ {
+ for (int m = 0; m < d; m++)
+ {
+ for (int p = 0; p < numPoints; p++ )
+ {
+ sum += QRead(p,m,n,q,e)*G(p,m,i)*G(p,n,i);
+ }
+ }
+ }
+ diagDev(i, q, e) = sum;
+ }
+ }
+ });
+}
+
+//Templated implementation of ElasticityAssembleEA.
+template
+void ElasticityAssembleEA_(const int i_block,
+ const int j_block,
+ const int nDofs,
+ const IntegrationRule &ir,
+ const CoefficientVector &lambda,
+ const CoefficientVector &mu,
+ const GeometricFactors &geom,
+ const DofToQuad &maps,
+ Vector &emat)
+{
+ //Assuming all elements are the same
+ static constexpr int d = dim;
+ const int numPoints = ir.GetNPoints();
+ const int numEls = lambda.Size()/numPoints;
+ const auto lamDev = Reshape(lambda.Read(), numPoints, numEls);
+ const auto muDev = Reshape(mu.Read(), numPoints, numEls);
+ const auto J = Reshape(geom.J.Read(), numPoints, d, d, numEls);
+ const auto G = Reshape(maps.G.Read(), numPoints, d, nDofs);
+ auto ematDev = Reshape(emat.Write(), nDofs, nDofs, numEls);
+ const double *ipWeights = ir.GetWeights().Read();
+ mfem::forall_2D(numEls, nDofs, nDofs, [=] MFEM_HOST_DEVICE (int e)
+ {
+ MFEM_FOREACH_THREAD(JDof, y, nDofs)
+ {
+ MFEM_FOREACH_THREAD(IDof, x, nDofs)
+ {
+ double sum = 0;
+ for (int p = 0 ; p < numPoints; p++)
+ {
+ auto invJ = inv(make_tensor(
+ [&](int i, int j) { return J(p, i, j, e); }));
+ const double w = ipWeights[p] /det(invJ);
+ for (int n = 0; n < d; n++)
+ {
+ for (int m = 0; m < d; m++)
+ {
+ //compute contraction of 4*sym(grad(u))sym(grad(v)) term.
+ double contraction = 0.;
+ for (int a = 0; a < d; a++)
+ {
+ for (int b = 0; b < d; b++)
+ {
+ contraction += ((a == i_block)*invJ(m,b) + (b==i_block)*invJ(m,
+ a))*((a == j_block)*invJ(n,
+ b) + (b==j_block)*invJ(n,a));
+ }
+ }
+ // lambda*div(u)*div(v) + 2*mu*sym(grad(u))*sym(grad(v))
+ // contraction = 4*sym(grad(u))sym(grad(v))
+ sum += w*(lamDev(p, e)*invJ(m,i_block)*invJ(n,j_block)
+ + 0.5*muDev(p, e)*contraction)*G(p,m,IDof)*G(p,n,JDof);
+ }
+ }
+ }
+ ematDev(IDof, JDof, e) = sum;
+ }
+ }
+ });
+}
+
+} // namespace internal
+
+} // namespace mfem
+
+#endif
diff --git a/fem/integ/bilininteg_elasticity_pa.cpp b/fem/integ/bilininteg_elasticity_pa.cpp
new file mode 100644
index 0000000000..ddbf283e42
--- /dev/null
+++ b/fem/integ/bilininteg_elasticity_pa.cpp
@@ -0,0 +1,118 @@
+// Copyright (c) 2010-2024, Lawrence 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.
+
+#include "../bilininteg.hpp"
+#include "../gridfunc.hpp"
+#include "../qfunction.hpp"
+#include "bilininteg_elasticity_kernels.hpp"
+
+namespace mfem
+{
+
+void ElasticityIntegrator::SetUpQuadratureSpaceAndCoefficients(
+ const FiniteElementSpace &fes)
+{
+ if (IntRule == nullptr)
+ {
+ // This is where it's assumed that all elements are the same.
+ const auto &T = *fes.GetElementTransformation(0);
+ int quad_order = 2 * T.OrderGrad(fes.GetFE(0));
+ IntRule = &IntRules.Get(T.GetGeometryType(), quad_order);
+ }
+
+ Mesh &mesh = *fespace->GetMesh();
+
+ q_space.reset(new QuadratureSpace(mesh, *IntRule));
+ lambda_quad.reset(new CoefficientVector(lambda, *q_space,
+ CoefficientStorage::FULL));
+ mu_quad.reset(new CoefficientVector(mu, *q_space, CoefficientStorage::FULL));
+ q_vec.reset(new QuadratureFunction(*q_space, vdim*vdim));
+}
+
+void ElasticityIntegrator::AssemblePA(const FiniteElementSpace &fes)
+{
+ MFEM_VERIFY(fes.GetOrdering() == Ordering::byNODES,
+ "Elasticity PA only implemented for byNODES ordering.");
+
+ fespace = &fes;
+ Mesh &mesh = *fespace->GetMesh();
+ MFEM_VERIFY(fespace->GetVDim() == mesh.Dimension(), "");
+ vdim = fespace->GetVDim();
+ ndofs = fespace->GetFE(0)->GetDof();
+
+ SetUpQuadratureSpaceAndCoefficients(fes);
+
+ auto ordering = GetEVectorOrdering(*fespace);
+ auto mode = ordering == ElementDofOrdering::NATIVE ? DofToQuad::FULL :
+ DofToQuad::LEXICOGRAPHIC_FULL;
+ maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, mode);
+ geom = mesh.GetGeometricFactors(*IntRule, GeometricFactors::JACOBIANS);
+}
+
+void ElasticityIntegrator::AssembleDiagonalPA(Vector &diag)
+{
+ q_vec->SetVDim(vdim*vdim*vdim*vdim);
+ internal::ElasticityAssembleDiagonalPA(vdim, ndofs, *lambda_quad, *mu_quad,
+ *geom, *maps, *q_vec, diag);
+}
+
+void ElasticityIntegrator::AddMultPA(const Vector &x, Vector &y) const
+{
+ internal::ElasticityAddMultPA(vdim, ndofs, *fespace, *lambda_quad, *mu_quad,
+ *geom, *maps, x, *q_vec, y);
+}
+
+void ElasticityIntegrator::AddMultTransposePA(const Vector &x, Vector &y) const
+{
+ AddMultPA(x, y); // Operator is symmetric
+}
+
+void ElasticityComponentIntegrator::AssemblePA(const FiniteElementSpace &fes)
+{
+ fespace = &fes;
+
+ // Avoid projecting the coefficients more than once. If the coefficients
+ // change, the parent ElasticityIntegrator must be reassembled.
+ if (!parent.q_space)
+ {
+ parent.SetUpQuadratureSpaceAndCoefficients(fes);
+ }
+ else
+ {
+ IntRule = parent.IntRule;
+ }
+
+ auto ordering = GetEVectorOrdering(*fespace);
+ auto mode = ordering == ElementDofOrdering::NATIVE ? DofToQuad::FULL :
+ DofToQuad::LEXICOGRAPHIC_FULL;
+ geom = fes.GetMesh()->GetGeometricFactors(*IntRule,
+ GeometricFactors::JACOBIANS);
+ maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, mode);
+}
+
+void ElasticityComponentIntegrator::AddMultPA(const Vector &x, Vector &y) const
+{
+ internal::ElasticityComponentAddMultPA(
+ parent.vdim, parent.ndofs, *fespace, *parent.lambda_quad, *parent.mu_quad,
+ *geom, *maps, x, *parent.q_vec, y, i_block, j_block);
+}
+
+void ElasticityComponentIntegrator::AddMultTransposePA(const Vector &x,
+ Vector &y) const
+{
+ // Each block in the operator is symmetric, so we can just switch the roles
+ // of i_block and j_block
+ internal::ElasticityComponentAddMultPA(
+ parent.vdim, parent.ndofs, *fespace, *parent.lambda_quad, *parent.mu_quad,
+ *geom, *maps, x, *parent.q_vec, y, j_block, i_block);
+}
+
+} // namespace mfem
diff --git a/fem/integ/bilininteg_gradient_pa.cpp b/fem/integ/bilininteg_gradient_pa.cpp
index 89c00e683c..51390b321f 100644
--- a/fem/integ/bilininteg_gradient_pa.cpp
+++ b/fem/integ/bilininteg_gradient_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_hcurl_kernels.cpp b/fem/integ/bilininteg_hcurl_kernels.cpp
index 92d3ceae98..6d55a58542 100644
--- a/fem/integ/bilininteg_hcurl_kernels.cpp
+++ b/fem/integ/bilininteg_hcurl_kernels.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_hcurl_kernels.hpp b/fem/integ/bilininteg_hcurl_kernels.hpp
index 049cfa0721..a806934cf7 100644
--- a/fem/integ/bilininteg_hcurl_kernels.hpp
+++ b/fem/integ/bilininteg_hcurl_kernels.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_hcurlhdiv_kernels.cpp b/fem/integ/bilininteg_hcurlhdiv_kernels.cpp
index 942d17db1c..ddb6bd2d59 100644
--- a/fem/integ/bilininteg_hcurlhdiv_kernels.cpp
+++ b/fem/integ/bilininteg_hcurlhdiv_kernels.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_hcurlhdiv_kernels.hpp b/fem/integ/bilininteg_hcurlhdiv_kernels.hpp
index 2508d9f848..e7ebe5b854 100644
--- a/fem/integ/bilininteg_hcurlhdiv_kernels.hpp
+++ b/fem/integ/bilininteg_hcurlhdiv_kernels.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_hdiv_kernels.cpp b/fem/integ/bilininteg_hdiv_kernels.cpp
index 52a6fe65aa..835d2cdca8 100644
--- a/fem/integ/bilininteg_hdiv_kernels.cpp
+++ b/fem/integ/bilininteg_hdiv_kernels.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_hdiv_kernels.hpp b/fem/integ/bilininteg_hdiv_kernels.hpp
index 2dbe444a85..11715bf372 100644
--- a/fem/integ/bilininteg_hdiv_kernels.hpp
+++ b/fem/integ/bilininteg_hdiv_kernels.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -155,6 +155,7 @@ inline void SmemPAHdivMassApply2D(const int NE,
DeviceMatrix X(sm0, D1D*(D1D-1), VDIM);
DeviceCube QD(sm1, Q1D, D1D, VDIM);
DeviceCube QQ(sm0, Q1D, Q1D, VDIM);
+ DeviceCube DQ(sm1, D1D, Q1D, VDIM);
// Load X, Bo and Bc into shared memory
MFEM_FOREACH_THREAD(vd,z,VDIM)
@@ -163,7 +164,10 @@ inline void SmemPAHdivMassApply2D(const int NE,
{
MFEM_FOREACH_THREAD(qx,x,Q1D)
{
- if (qx < D1D && dy < (D1D-1)) { X(qx + dy*D1D,vd) = x(qx+dy*D1D,vd,e); }
+ if (qx < D1D && dy < (D1D-1))
+ {
+ X(qx + dy*D1D,vd) = x(qx+dy*D1D,vd,e);
+ }
if (tidz == 0)
{
if (dy < (D1D-1)) { Bo(dy,qx) = bo(qx,dy); }
@@ -247,7 +251,7 @@ inline void SmemPAHdivMassApply2D(const int NE,
{
qd += QQ(qx,qy,vd) * Btx(dx,qx);
}
- QD(dx,qy,vd) = qd;
+ DQ(dx,qy,vd) = qd;
}
}
}
@@ -265,7 +269,7 @@ inline void SmemPAHdivMassApply2D(const int NE,
double dd = 0.0;
for (int qy = 0; qy < Q1D; ++qy)
{
- dd += QD(dx,qy,vd) * Bty(dy,qy);
+ dd += DQ(dx,qy,vd) * Bty(dy,qy);
}
Yxy(dx,dy,vd,e) += dd;
}
diff --git a/fem/integ/bilininteg_interp_pa.cpp b/fem/integ/bilininteg_interp_pa.cpp
index 70a2123050..79b324bdaa 100644
--- a/fem/integ/bilininteg_interp_pa.cpp
+++ b/fem/integ/bilininteg_interp_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_mass_ea.cpp b/fem/integ/bilininteg_mass_ea.cpp
index 55aab027e0..2edd5f75c9 100644
--- a/fem/integ/bilininteg_mass_ea.cpp
+++ b/fem/integ/bilininteg_mass_ea.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_mass_kernels.cpp b/fem/integ/bilininteg_mass_kernels.cpp
index 23a65d8b7f..c7a5a3b40b 100644
--- a/fem/integ/bilininteg_mass_kernels.cpp
+++ b/fem/integ/bilininteg_mass_kernels.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_mass_kernels.hpp b/fem/integ/bilininteg_mass_kernels.hpp
index 3536988f54..869a0612e1 100644
--- a/fem/integ/bilininteg_mass_kernels.hpp
+++ b/fem/integ/bilininteg_mass_kernels.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_mass_mf.cpp b/fem/integ/bilininteg_mass_mf.cpp
index 18a0edfca6..0789b49796 100644
--- a/fem/integ/bilininteg_mass_mf.cpp
+++ b/fem/integ/bilininteg_mass_mf.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_mass_pa.cpp b/fem/integ/bilininteg_mass_pa.cpp
index fce1f3df86..7d962ad0e6 100644
--- a/fem/integ/bilininteg_mass_pa.cpp
+++ b/fem/integ/bilininteg_mass_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_mixedcurl_pa.cpp b/fem/integ/bilininteg_mixedcurl_pa.cpp
index 8be2134dd9..d506a2519d 100644
--- a/fem/integ/bilininteg_mixedcurl_pa.cpp
+++ b/fem/integ/bilininteg_mixedcurl_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_mixedvecgrad_pa.cpp b/fem/integ/bilininteg_mixedvecgrad_pa.cpp
index d2e7758a8e..97645d1aee 100644
--- a/fem/integ/bilininteg_mixedvecgrad_pa.cpp
+++ b/fem/integ/bilininteg_mixedvecgrad_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_transpose_ea.cpp b/fem/integ/bilininteg_transpose_ea.cpp
index 4ff8be04bc..812d80a77c 100644
--- a/fem/integ/bilininteg_transpose_ea.cpp
+++ b/fem/integ/bilininteg_transpose_ea.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_vecdiffusion_mf.cpp b/fem/integ/bilininteg_vecdiffusion_mf.cpp
index 150b662f1b..5f5ff480da 100644
--- a/fem/integ/bilininteg_vecdiffusion_mf.cpp
+++ b/fem/integ/bilininteg_vecdiffusion_mf.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_vecdiffusion_pa.cpp b/fem/integ/bilininteg_vecdiffusion_pa.cpp
index e36eec8d48..453a47b897 100644
--- a/fem/integ/bilininteg_vecdiffusion_pa.cpp
+++ b/fem/integ/bilininteg_vecdiffusion_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_vecdiv_pa.cpp b/fem/integ/bilininteg_vecdiv_pa.cpp
index 7e1f61a5cd..341a697db0 100644
--- a/fem/integ/bilininteg_vecdiv_pa.cpp
+++ b/fem/integ/bilininteg_vecdiv_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_vecmass_mf.cpp b/fem/integ/bilininteg_vecmass_mf.cpp
index d71f058084..0e3bfb5f49 100644
--- a/fem/integ/bilininteg_vecmass_mf.cpp
+++ b/fem/integ/bilininteg_vecmass_mf.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_vecmass_pa.cpp b/fem/integ/bilininteg_vecmass_pa.cpp
index 88364ce89d..0fb5d71943 100644
--- a/fem/integ/bilininteg_vecmass_pa.cpp
+++ b/fem/integ/bilininteg_vecmass_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_vectorfediv_pa.cpp b/fem/integ/bilininteg_vectorfediv_pa.cpp
index 97843a5763..47b215c81a 100644
--- a/fem/integ/bilininteg_vectorfediv_pa.cpp
+++ b/fem/integ/bilininteg_vectorfediv_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/bilininteg_vectorfemass_pa.cpp b/fem/integ/bilininteg_vectorfemass_pa.cpp
index f8d6f63d49..94c9cbf612 100644
--- a/fem/integ/bilininteg_vectorfemass_pa.cpp
+++ b/fem/integ/bilininteg_vectorfemass_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/lininteg_boundary.cpp b/fem/integ/lininteg_boundary.cpp
index 77e39204f2..01e35c4aa7 100644
--- a/fem/integ/lininteg_boundary.cpp
+++ b/fem/integ/lininteg_boundary.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/lininteg_boundary_flux.cpp b/fem/integ/lininteg_boundary_flux.cpp
index cefebc6352..8734d5ad2f 100644
--- a/fem/integ/lininteg_boundary_flux.cpp
+++ b/fem/integ/lininteg_boundary_flux.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/lininteg_domain.cpp b/fem/integ/lininteg_domain.cpp
index b8e0d2f6c0..0b1357d3eb 100644
--- a/fem/integ/lininteg_domain.cpp
+++ b/fem/integ/lininteg_domain.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/lininteg_domain_grad.cpp b/fem/integ/lininteg_domain_grad.cpp
index 906ebca7dc..b64995e4b0 100644
--- a/fem/integ/lininteg_domain_grad.cpp
+++ b/fem/integ/lininteg_domain_grad.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/lininteg_domain_vectorfe.cpp b/fem/integ/lininteg_domain_vectorfe.cpp
index a9af17e0cb..3d81023837 100644
--- a/fem/integ/lininteg_domain_vectorfe.cpp
+++ b/fem/integ/lininteg_domain_vectorfe.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/nonlininteg_vecconvection_mf.cpp b/fem/integ/nonlininteg_vecconvection_mf.cpp
index edcf7d20fb..e52bde3548 100644
--- a/fem/integ/nonlininteg_vecconvection_mf.cpp
+++ b/fem/integ/nonlininteg_vecconvection_mf.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/integ/nonlininteg_vecconvection_pa.cpp b/fem/integ/nonlininteg_vecconvection_pa.cpp
index a361ffdd00..d1740d7dac 100644
--- a/fem/integ/nonlininteg_vecconvection_pa.cpp
+++ b/fem/integ/nonlininteg_vecconvection_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/intrules.cpp b/fem/intrules.cpp
index cb9544852f..7e7bb4e398 100644
--- a/fem/intrules.cpp
+++ b/fem/intrules.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -917,6 +917,7 @@ int Quadrature1D::CheckClosed(int type)
{
case GaussLobatto:
case ClosedUniform:
+ case ClosedGL:
return type;
default:
return Invalid;
diff --git a/fem/intrules.hpp b/fem/intrules.hpp
index 1d57579943..08654b79da 100644
--- a/fem/intrules.hpp
+++ b/fem/intrules.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/intrules_cut.cpp b/fem/intrules_cut.cpp
index 823cfeaf72..cf14a4c307 100644
--- a/fem/intrules_cut.cpp
+++ b/fem/intrules_cut.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/intrules_cut.hpp b/fem/intrules_cut.hpp
index 89fb3a9bde..eee8b10961 100644
--- a/fem/intrules_cut.hpp
+++ b/fem/intrules_cut.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/kdtree.cpp b/fem/kdtree.cpp
index 2e1779da95..7915210583 100644
--- a/fem/kdtree.cpp
+++ b/fem/kdtree.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/kdtree.hpp b/fem/kdtree.hpp
index 43787b6fd0..83c8caf4b1 100644
--- a/fem/kdtree.hpp
+++ b/fem/kdtree.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/kernels.hpp b/fem/kernels.hpp
index b27b0bb1a6..0eac5ec3af 100644
--- a/fem/kernels.hpp
+++ b/fem/kernels.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/linearform.cpp b/fem/linearform.cpp
index 84efbaa3ae..c0c8ab79af 100644
--- a/fem/linearform.cpp
+++ b/fem/linearform.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/linearform.hpp b/fem/linearform.hpp
index c241184265..54cd7815ba 100644
--- a/fem/linearform.hpp
+++ b/fem/linearform.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/linearform_ext.cpp b/fem/linearform_ext.cpp
index b5999f6079..355431eb7f 100644
--- a/fem/linearform_ext.cpp
+++ b/fem/linearform_ext.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/linearform_ext.hpp b/fem/linearform_ext.hpp
index 2cc861cea3..0103185e02 100644
--- a/fem/linearform_ext.hpp
+++ b/fem/linearform_ext.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lininteg.cpp b/fem/lininteg.cpp
index e531d589a7..a782aff0d5 100644
--- a/fem/lininteg.cpp
+++ b/fem/lininteg.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lininteg.hpp b/fem/lininteg.hpp
index 0cc5a80d44..08f42e21b8 100644
--- a/fem/lininteg.hpp
+++ b/fem/lininteg.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -104,7 +104,7 @@ public:
};
-/// Class for domain integration \f$ L(v) := (f, v) \f$
+/// Class for domain integration $ L(v) := (f, v) $
class DomainLFIntegrator : public DeltaLFIntegrator
{
Vector shape;
@@ -141,7 +141,7 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/// Class for domain integrator \f$ L(v) := (f, \nabla v) \f$
+/// Class for domain integrator $ L(v) := (f, \nabla v) $
class DomainLFGradIntegrator : public DeltaLFIntegrator
{
private:
@@ -150,7 +150,7 @@ private:
DenseMatrix dshape;
public:
- /// Constructs the domain integrator \f$ (Q, \nabla v) \f$
+ /// Constructs the domain integrator $ (Q, \nabla v) $
DomainLFGradIntegrator(VectorCoefficient &QF)
: DeltaLFIntegrator(QF), Q(QF) { }
@@ -175,7 +175,7 @@ public:
};
-/// Class for boundary integration \f$ L(v) := (g, v) \f$
+/// Class for boundary integration $ L(v) := (g, v) $
class BoundaryLFIntegrator : public LinearFormIntegrator
{
Vector shape;
@@ -206,7 +206,7 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/// Class for boundary integration \f$ L(v) = (g \cdot n, v) \f$
+/// Class for boundary integration $ L(v) = (g \cdot n, v) $
class BoundaryNormalLFIntegrator : public LinearFormIntegrator
{
Vector shape;
@@ -231,7 +231,7 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/// Class for boundary integration \f$ L(v) = (g \cdot \tau, v) \f$ in 2D
+/// Class for boundary integration $ L(v) = (g \cdot \tau, v) $ in 2D
class BoundaryTangentialLFIntegrator : public LinearFormIntegrator
{
Vector shape;
@@ -249,8 +249,8 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/** Class for domain integration of \f$ L(v) := (f, v) \f$, where
- \f$ f = (f_1,\dots,f_n)\f$ and \f$ v = (v_1,\dots,v_n) \f$. */
+/** Class for domain integration of $ L(v) := (f, v) $, where
+ $ f = (f_1,\dots,f_n)$ and $ v = (v_1,\dots,v_n) $. */
class VectorDomainLFIntegrator : public DeltaLFIntegrator
{
private:
@@ -282,8 +282,8 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/** Class for domain integrator \f$ L(v) := (f, \nabla v) \f$, where
- \f$ f = (f_{1x},f_{1y},f_{1z},\dots,f_{nx},f_{ny},f_{nz})\f$ and \f$v=(v_1,\dots,v_n)\f$. */
+/** Class for domain integrator $ L(v) := (f, \nabla v) $, where
+ $ f = (f_{1x},f_{1y},f_{1z},\dots,f_{nx},f_{ny},f_{nz})$ and $v=(v_1,\dots,v_n)$. */
class VectorDomainLFGradIntegrator : public DeltaLFIntegrator
{
private:
@@ -316,8 +316,8 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/** Class for boundary integration of \f$ L(v) := (g, v) \f$, where
- \f$f=(f_1,\dots,f_n)\f$ and \f$v=(v_1,\dots,v_n)\f$. */
+/** Class for boundary integration of $ L(v) := (g, v) $, where
+ $g=(g_1,\dots,g_n)$ and $v=(v_1,\dots,v_n)$. */
class VectorBoundaryLFIntegrator : public LinearFormIntegrator
{
private:
@@ -342,7 +342,7 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/// \f$ (f, v)_{\Omega} \f$ for VectorFiniteElements (Nedelec, Raviart-Thomas)
+/// $ (f, v)_{\Omega} $ for VectorFiniteElements (Nedelec, Raviart-Thomas)
class VectorFEDomainLFIntegrator : public DeltaLFIntegrator
{
private:
@@ -371,7 +371,7 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/// \f$ (Q, \mathrm{curl}(v))_{\Omega} \f$ for Nedelec Elements
+/// $ (Q, \mathrm{curl}(v))_{\Omega} $ for Nedelec Elements
class VectorFEDomainLFCurlIntegrator : public DeltaLFIntegrator
{
private:
@@ -380,7 +380,7 @@ private:
Vector vec;
public:
- /// Constructs the domain integrator \f$(Q, \mathrm{curl}(v)) \f$
+ /// Constructs the domain integrator $(Q, \mathrm{curl}(v)) $
VectorFEDomainLFCurlIntegrator(VectorCoefficient &F)
: DeltaLFIntegrator(F), QF(&F) { }
@@ -395,14 +395,14 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/// \f$ (Q, \mathrm{div}(v))_{\Omega} \f$ for RT Elements
+/// $ (Q, \mathrm{div}(v))_{\Omega} $ for RT Elements
class VectorFEDomainLFDivIntegrator : public DeltaLFIntegrator
{
private:
Vector divshape;
Coefficient &Q;
public:
- /// Constructs the domain integrator \f$ (Q, \mathrm{div}(v)) \f$
+ /// Constructs the domain integrator $ (Q, \mathrm{div}(v)) $
VectorFEDomainLFDivIntegrator(Coefficient &QF)
: DeltaLFIntegrator(QF), Q(QF) { }
@@ -419,8 +419,8 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/** \f$ (f, v \cdot n)_{\partial\Omega} \f$ for vector test function
- \f$v=(v_1,\dots,v_n)\f$ where all vi are in the same scalar FE space and \f$f\f$ is a
+/** $ (f, v \cdot n)_{\partial\Omega} $ for vector test function
+ $v=(v_1,\dots,v_n)$ where all vi are in the same scalar FE space and $f$ is a
scalar function. */
class VectorBoundaryFluxLFIntegrator : public LinearFormIntegrator
{
@@ -441,8 +441,8 @@ public:
using LinearFormIntegrator::AssembleRHSElementVect;
};
-/** Class for boundary integration of \f$ (f, v \cdot n)\f$ for scalar coefficient \f$f\f$ and
- RT vector test function \f$v\f$. This integrator works with RT spaces defined
+/** Class for boundary integration of $ (f, v \cdot n) $ for scalar coefficient $f$ and
+ RT vector test function $v$. This integrator works with RT spaces defined
using the RT_FECollection class. */
class VectorFEBoundaryFluxLFIntegrator : public LinearFormIntegrator
{
@@ -470,7 +470,7 @@ public:
Vector &b);
};
-/// Class for boundary integration \f$ L(v) = (n \times f, v) \f$
+/// Class for boundary integration $ L(v) = (n \times f, v) $
class VectorFEBoundaryTangentLFIntegrator : public LinearFormIntegrator
{
private:
@@ -491,9 +491,9 @@ public:
/** Class for boundary integration of the linear form:
- \f$ \frac{\alpha}{2} \langle (u \cdot n) f, w \rangle - \beta \langle |u \cdot n| f, w \rangle \f$
- where \f$f\f$ and \f$u\f$ are given scalar and vector coefficients, respectively,
- and \f$w\f$ is the scalar test function. */
+ $ \frac{\alpha}{2} \langle (u \cdot n) f, w \rangle - \beta \langle |u \cdot n| f, w \rangle $
+ where $f$ and $u$ are given scalar and vector coefficients, respectively,
+ and $w$ is the scalar test function. */
class BoundaryFlowIntegrator : public LinearFormIntegrator
{
private:
@@ -525,13 +525,13 @@ public:
/** Boundary linear integrator for imposing non-zero Dirichlet boundary
conditions, to be used in conjunction with DGDiffusionIntegrator.
- Specifically, given the Dirichlet data \f$u_D\f$, the linear form assembles the
+ Specifically, given the Dirichlet data $u_D$, the linear form assembles the
following integrals on the boundary:
- \f[
+ $$
\sigma \langle u_D, (Q \nabla v)) \cdot n \rangle + \kappa \langle {h^{-1} Q} u_D, v \rangle,
- \f]
+ $$
where Q is a scalar or matrix diffusion coefficient and v is the test
- function. The parameters \f$\sigma\f$ and \f$\kappa\f$ should be the same as the ones
+ function. The parameters $\sigma$ and $\kappa$ should be the same as the ones
used in the DGDiffusionIntegrator. */
class DGDirichletLFIntegrator : public LinearFormIntegrator
{
@@ -568,12 +568,12 @@ public:
/** Boundary linear form integrator for imposing non-zero Dirichlet boundary
conditions, in a DG elasticity formulation. Specifically, the linear form is
given by
- \f[
+ $$
\alpha \langle u_D, (\lambda \mathrm{div}(v) I + \mu (\nabla v + \nabla v^{\mathrm{T}})) \cdot n \rangle +
+ \kappa \langle h^{-1} (\lambda + 2 \mu) u_D, v \rangle,
- \f]
- where u_D is the given Dirichlet data. The parameters \f$\alpha\f$, \f$\kappa\f$, \f$\lambda\f$
- and \f$\mu\f$, should match the parameters with the same names used in the bilinear
+ $$
+ where u_D is the given Dirichlet data. The parameters $\alpha$, $\kappa$, $\lambda$
+ and $\mu$, should match the parameters with the same names used in the bilinear
form integrator, DGElasticityIntegrator. */
class DGElasticityDirichletLFIntegrator : public LinearFormIntegrator
{
@@ -612,18 +612,18 @@ public:
/** Class for spatial white Gaussian noise integration.
- The target problem is the linear SPDE \f$ a(u,v) = F(v)\f$ with \f$F(v) := <\dot{W},v> \f$,
- where \f$\dot{W}\f$ is spatial white Gaussian noise. When the Galerkin method is used to
- discretize this problem into a linear system of equations \f$Ax = b\f$, the RHS is
- a Gaussian random vector \f$b \sim N(0,M)\f$ whose covariance matrix is the same as the
- mass matrix \f$M_{ij} = (v_i,v_j)\f$. This property can be ensured if \f$b = H w\f$, where
- \f$HH^{\mathrm{T}} = M\f$ and each component \f$w_i\sim N(0,1)\f$.
+ The target problem is the linear SPDE $ a(u,v) = F(v)$ with $F(v) := <\dot{W},v> $,
+ where $\dot{W}$ is spatial white Gaussian noise. When the Galerkin method is used to
+ discretize this problem into a linear system of equations $Ax = b$, the RHS is
+ a Gaussian random vector $b \sim N(0,M)$ whose covariance matrix is the same as the
+ mass matrix $M_{ij} = (v_i,v_j)$. This property can be ensured if $b = H w$, where
+ $HH^{\mathrm{T}} = M$ and each component $w_i\sim N(0,1)$.
- There is much flexibility in how we may wish to define \f$H\f$. In this PR, we
- define \f$H = P^{\mathrm{T}} diag(L_e)\f$, where \f$P\f$ is the local-to-global dof assembly matrix
- and \f$\mathrm{diag}(L_e)\f$ is a block-diagonal matrix with \f$L_e L_e^{\mathrm{T}} = M_e\f$, where \f$M_e\f$ is
- the element mass matrix for element \f$e\f$. A straightforward computation shows
- that \f$HH^{\mathrm{T}} = P^{\mathrm{T}} diag(M_e) P = M\f$, as necessary. */
+ There is much flexibility in how we may wish to define $H$. In this PR, we
+ define $H = P^{\mathrm{T}} diag(L_e)$, where $P$ is the local-to-global dof assembly matrix
+ and $\mathrm{diag}(L_e)$ is a block-diagonal matrix with $L_e L_e^{\mathrm{T}} = M_e$, where $M_e$ is
+ the element mass matrix for element $e$. A straightforward computation shows
+ that $HH^{\mathrm{T}} = P^{\mathrm{T}} diag(M_e) P = M$, as necessary. */
class WhiteGaussianNoiseDomainLFIntegrator : public LinearFormIntegrator
{
#ifdef MFEM_USE_MPI
@@ -718,8 +718,8 @@ public:
};
-/** Class for domain integration of \f$ L(v) := (f, v) \f$, where
- \f$ f=(f_1,\dots,f_n)\f$ and \f$v=(v_1,\dots,v_n)\f$. that makes use of
+/** Class for domain integration of $ L(v) := (f, v) $, where
+ $ f=(f_1,\dots,f_n)$ and $v=(v_1,\dots,v_n)$. that makes use of
VectorQuadratureFunctionCoefficient*/
class VectorQuadratureLFIntegrator : public LinearFormIntegrator
{
@@ -728,7 +728,7 @@ private:
public:
VectorQuadratureLFIntegrator(VectorQuadratureFunctionCoefficient &vqfc,
- const IntegrationRule *ir)
+ const IntegrationRule *ir = NULL)
: LinearFormIntegrator(ir), vqfc(vqfc)
{
if (ir)
@@ -751,7 +751,7 @@ public:
};
-/** Class for domain integration \f$ L(v) := (f, v) \f$ that makes use
+/** Class for domain integration $ L(v) := (f, v) $ that makes use
of QuadratureFunctionCoefficient. */
class QuadratureLFIntegrator : public LinearFormIntegrator
{
@@ -760,7 +760,7 @@ private:
public:
QuadratureLFIntegrator(QuadratureFunctionCoefficient &qfc,
- const IntegrationRule *ir)
+ const IntegrationRule *ir = NULL)
: LinearFormIntegrator(ir), qfc(qfc)
{
if (ir)
diff --git a/fem/lor/lor.cpp b/fem/lor/lor.cpp
index b78fd83b0f..312d2b278f 100644
--- a/fem/lor/lor.cpp
+++ b/fem/lor/lor.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor.hpp b/fem/lor/lor.hpp
index 3a9e122f8a..cae433aef9 100644
--- a/fem/lor/lor.hpp
+++ b/fem/lor/lor.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_ads.cpp b/fem/lor/lor_ads.cpp
index 3ba4816ee5..7e0017319a 100644
--- a/fem/lor/lor_ads.cpp
+++ b/fem/lor/lor_ads.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_ads.hpp b/fem/lor/lor_ads.hpp
index 5f99cd8944..7675932ba9 100644
--- a/fem/lor/lor_ads.hpp
+++ b/fem/lor/lor_ads.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_ams.cpp b/fem/lor/lor_ams.cpp
index 98ccfc2ae4..f8d0dfd8c9 100644
--- a/fem/lor/lor_ams.cpp
+++ b/fem/lor/lor_ams.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_ams.hpp b/fem/lor/lor_ams.hpp
index f7a4d50540..39a1177613 100644
--- a/fem/lor/lor_ams.hpp
+++ b/fem/lor/lor_ams.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_batched.cpp b/fem/lor/lor_batched.cpp
index e0e762e3bc..0a62c1874e 100644
--- a/fem/lor/lor_batched.cpp
+++ b/fem/lor/lor_batched.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_batched.hpp b/fem/lor/lor_batched.hpp
index 53a9a7bfa8..6cc24b4776 100644
--- a/fem/lor/lor_batched.hpp
+++ b/fem/lor/lor_batched.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_h1.hpp b/fem/lor/lor_h1.hpp
index 8ea3138010..9ee5efab65 100644
--- a/fem/lor/lor_h1.hpp
+++ b/fem/lor/lor_h1.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_h1_impl.hpp b/fem/lor/lor_h1_impl.hpp
index 4a8d51fa83..a413e55b98 100644
--- a/fem/lor/lor_h1_impl.hpp
+++ b/fem/lor/lor_h1_impl.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_nd.hpp b/fem/lor/lor_nd.hpp
index e33492e805..e9683cbeaa 100644
--- a/fem/lor/lor_nd.hpp
+++ b/fem/lor/lor_nd.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_nd_impl.hpp b/fem/lor/lor_nd_impl.hpp
index e32d3d2dea..0f107a1313 100644
--- a/fem/lor/lor_nd_impl.hpp
+++ b/fem/lor/lor_nd_impl.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_rt.hpp b/fem/lor/lor_rt.hpp
index d3f7de1911..48b6148907 100644
--- a/fem/lor/lor_rt.hpp
+++ b/fem/lor/lor_rt.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_rt_impl.hpp b/fem/lor/lor_rt_impl.hpp
index 87039d2082..368b1d146c 100644
--- a/fem/lor/lor_rt_impl.hpp
+++ b/fem/lor/lor_rt_impl.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/lor/lor_util.hpp b/fem/lor/lor_util.hpp
index 3534ad1d07..1dff6c8cde 100644
--- a/fem/lor/lor_util.hpp
+++ b/fem/lor/lor_util.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/CMakeLists.txt b/fem/moonolith/CMakeLists.txt
index a3b5621647..7b8dcb6e59 100644
--- a/fem/moonolith/CMakeLists.txt
+++ b/fem/moonolith/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/fem/moonolith/cut.cpp b/fem/moonolith/cut.cpp
index 7b4d3661c7..d40b26e9c7 100644
--- a/fem/moonolith/cut.cpp
+++ b/fem/moonolith/cut.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/cut.hpp b/fem/moonolith/cut.hpp
index 37bcf8df53..9cc7441f4c 100644
--- a/fem/moonolith/cut.hpp
+++ b/fem/moonolith/cut.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/mortarassembler.cpp b/fem/moonolith/mortarassembler.cpp
index e610c6d0a2..60c2af8759 100644
--- a/fem/moonolith/mortarassembler.cpp
+++ b/fem/moonolith/mortarassembler.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/mortarassembler.hpp b/fem/moonolith/mortarassembler.hpp
index bef0163134..c2e835d646 100644
--- a/fem/moonolith/mortarassembler.hpp
+++ b/fem/moonolith/mortarassembler.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/mortarintegrator.cpp b/fem/moonolith/mortarintegrator.cpp
index 75dfdec7e6..b8c22c6897 100644
--- a/fem/moonolith/mortarintegrator.cpp
+++ b/fem/moonolith/mortarintegrator.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/mortarintegrator.hpp b/fem/moonolith/mortarintegrator.hpp
index eec402229b..6414aff80f 100644
--- a/fem/moonolith/mortarintegrator.hpp
+++ b/fem/moonolith/mortarintegrator.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -67,8 +67,8 @@ public:
/*!
* @brief Integrator for scalar finite elements
- * \f$ (u, v)_{L^2(\mathcal{T}_m \cap \mathcal{T}_s)}, u \in U(\mathcal{T}_m )
- * and v \in V(\mathcal{T}_s ) \f$
+ * $$ (u, v)_{L^2(\mathcal{T}_m \cap \mathcal{T}_s)}, u \in U(\mathcal{T}_m )
+ * and v \in V(\mathcal{T}_s ) $$
*/
class L2MortarIntegrator : public MortarIntegrator
{
@@ -86,8 +86,8 @@ public:
/*!
* @brief Integrator for vector finite elements. Experimental.
- * \f$ (u, v)_{L^2(\mathcal{T}_m \cap \mathcal{T}_s)}, u \in U(\mathcal{T}_m )
- * and v \in V(\mathcal{T}_s ) \f$
+ * $$ (u, v)_{L^2(\mathcal{T}_m \cap \mathcal{T}_s)}, u \in U(\mathcal{T}_m )
+ * and v \in V(\mathcal{T}_s ) $$
*/
class VectorL2MortarIntegrator : public MortarIntegrator
{
diff --git a/fem/moonolith/pmortarassembler.cpp b/fem/moonolith/pmortarassembler.cpp
index 0c80f76534..e6e581eee4 100644
--- a/fem/moonolith/pmortarassembler.cpp
+++ b/fem/moonolith/pmortarassembler.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/pmortarassembler.hpp b/fem/moonolith/pmortarassembler.hpp
index ad7664c480..796dcb360b 100644
--- a/fem/moonolith/pmortarassembler.hpp
+++ b/fem/moonolith/pmortarassembler.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/transfer.cpp b/fem/moonolith/transfer.cpp
index eef8d518a6..2d53580178 100644
--- a/fem/moonolith/transfer.cpp
+++ b/fem/moonolith/transfer.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/transfer.hpp b/fem/moonolith/transfer.hpp
index f088c36275..648cfa5c38 100644
--- a/fem/moonolith/transfer.hpp
+++ b/fem/moonolith/transfer.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/transferutils.cpp b/fem/moonolith/transferutils.cpp
index 8c83d96f20..52855cf573 100644
--- a/fem/moonolith/transferutils.cpp
+++ b/fem/moonolith/transferutils.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/moonolith/transferutils.hpp b/fem/moonolith/transferutils.hpp
index 2c1ccc1b03..eb163637fb 100644
--- a/fem/moonolith/transferutils.hpp
+++ b/fem/moonolith/transferutils.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/multigrid.cpp b/fem/multigrid.cpp
index ff1be5b2a4..8368f94669 100644
--- a/fem/multigrid.cpp
+++ b/fem/multigrid.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -231,10 +231,6 @@ void MultigridBase::Cycle(int level) const
}
}
-Multigrid::Multigrid()
- : MultigridBase()
-{}
-
Multigrid::Multigrid(const Array& operators_,
const Array& smoothers_,
const Array& prolongations_,
@@ -258,10 +254,64 @@ Multigrid::~Multigrid()
}
}
-GeometricMultigrid::
-GeometricMultigrid(const FiniteElementSpaceHierarchy& fespaces_)
- : MultigridBase(), fespaces(fespaces_)
-{}
+GeometricMultigrid::GeometricMultigrid(
+ const FiniteElementSpaceHierarchy& fespaces_)
+ : fespaces(fespaces_)
+{
+ const int nlevels = fespaces.GetNumLevels();
+ ownedProlongations.SetSize(nlevels - 1);
+ ownedProlongations = false;
+
+ prolongations.SetSize(nlevels - 1);
+ for (int level = 0; level < nlevels - 1; ++level)
+ {
+ prolongations[level] = fespaces.GetProlongationAtLevel(level);
+ }
+}
+
+GeometricMultigrid::GeometricMultigrid(
+ const FiniteElementSpaceHierarchy& fespaces_,
+ const Array &ess_bdr)
+ : fespaces(fespaces_)
+{
+ bool have_ess_bdr = false;
+ for (int i = 0; i < ess_bdr.Size(); i++)
+ {
+ if (ess_bdr[i]) { have_ess_bdr = true; break; }
+ }
+
+ const int nlevels = fespaces.GetNumLevels();
+ ownedProlongations.SetSize(nlevels - 1);
+ ownedProlongations = have_ess_bdr;
+
+ if (have_ess_bdr)
+ {
+ essentialTrueDofs.SetSize(nlevels);
+ for (int level = 0; level < nlevels; ++level)
+ {
+ essentialTrueDofs[level] = new Array;
+ fespaces.GetFESpaceAtLevel(level).GetEssentialTrueDofs(
+ ess_bdr, *essentialTrueDofs[level]);
+ }
+ }
+
+ prolongations.SetSize(nlevels - 1);
+ for (int level = 0; level < nlevels - 1; ++level)
+ {
+ if (have_ess_bdr)
+ {
+ prolongations[level] = new RectangularConstrainedOperator(
+ fespaces.GetProlongationAtLevel(level),
+ *essentialTrueDofs[level],
+ *essentialTrueDofs[level + 1]
+ );
+ }
+ else
+ {
+ prolongations[level] = fespaces.GetProlongationAtLevel(level);
+ }
+ }
+}
GeometricMultigrid::~GeometricMultigrid()
{
diff --git a/fem/multigrid.hpp b/fem/multigrid.hpp
index b97acb8bfb..3e6f0c2116 100644
--- a/fem/multigrid.hpp
+++ b/fem/multigrid.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -140,7 +140,7 @@ protected:
public:
/// Constructs an empty multigrid hierarchy
- Multigrid();
+ Multigrid() = default;
/// Constructs a multigrid hierarchy from the given inputs
/** Inputs include operators and smoothers on all levels, prolongation
@@ -162,7 +162,7 @@ private:
};
/// Geometric multigrid associated with a hierarchy of finite element spaces
-class GeometricMultigrid : public MultigridBase
+class GeometricMultigrid : public Multigrid
{
protected:
const FiniteElementSpaceHierarchy& fespaces;
@@ -170,10 +170,28 @@ protected:
Array bfs;
public:
- /** Construct an empty multigrid object for the given finite element space
- hierarchy @a fespaces_ */
+ /// @brief Deprecated.
+ ///
+ /// Construct an empty geometric multigrid object for the given finite
+ /// element space hierarchy @a fespaces_.
+ ///
+ /// @deprecated Use GeometricMultigrid::GeometricMultigrid(const
+ /// FiniteElementSpaceHierarchy&, const Array&) instead. This version
+ /// constructs prolongation and restriction operators without eliminated
+ /// essential boundary conditions.
+ MFEM_DEPRECATED
GeometricMultigrid(const FiniteElementSpaceHierarchy& fespaces_);
+ /// @brief Construct a geometric multigrid object for the given finite
+ /// element space hierarchy @a fespaces_, where @a ess_bdr is a list of
+ /// mesh boundary element attributes that define the essential DOFs.
+ ///
+ /// If @a ess_bdr is empty, or all its entries are 0, then no essential
+ /// boundary conditions are imposed and the protected array essentialTrueDofs
+ /// remains empty.
+ GeometricMultigrid(const FiniteElementSpaceHierarchy& fespaces_,
+ const Array &ess_bdr);
+
/// Destructor
virtual ~GeometricMultigrid();
@@ -184,13 +202,6 @@ public:
/// Recover the solution of a linear system formed with FormFineLinearSystem()
void RecoverFineFEMSolution(const Vector& X, const Vector& b, Vector& x);
-
-private:
- /// Returns prolongation operator at given level
- virtual const Operator* GetProlongationAtLevel(int level) const override
- {
- return fespaces.GetProlongationAtLevel(level);
- }
};
} // namespace mfem
diff --git a/fem/nonlinearform.cpp b/fem/nonlinearform.cpp
index 88271e234a..003e54611b 100644
--- a/fem/nonlinearform.cpp
+++ b/fem/nonlinearform.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -143,6 +143,50 @@ double NonlinearForm::GetGridFunctionEnergy(const Vector &x) const
}
}
+ if (bnfi.Size())
+ {
+ // Which boundary attributes need to be processed?
+ Array bdr_attr_marker(mesh->bdr_attributes.Size() ?
+ mesh->bdr_attributes.Max() : 0);
+ bdr_attr_marker = 0;
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] == NULL)
+ {
+ bdr_attr_marker = 1;
+ break;
+ }
+ Array &bdr_marker = *bnfi_marker[k];
+ MFEM_ASSERT(bdr_marker.Size() == bdr_attr_marker.Size(),
+ "invalid boundary marker for boundary integrator #"
+ << k << ", counting from zero");
+ for (int i = 0; i < bdr_attr_marker.Size(); i++)
+ {
+ bdr_attr_marker[i] |= bdr_marker[i];
+ }
+ }
+
+ for (int i = 0; i < fes->GetNBE(); i++)
+ {
+ const int bdr_attr = mesh->GetBdrAttribute(i);
+ if (bdr_attr_marker[bdr_attr-1] == 0) { continue; }
+
+ fe = fes->GetBE(i);
+ doftrans = fes->GetBdrElementVDofs(i, vdofs);
+ T = fes->GetBdrElementTransformation(i);
+ x.GetSubVector(vdofs, el_x);
+ if (doftrans) {doftrans->InvTransformPrimal(el_x); }
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] &&
+ (*bnfi_marker[k])[bdr_attr-1] == 0) { continue; }
+
+ energy += bnfi[k]->GetElementEnergy(*fe, *T, el_x);
+ }
+ }
+
+ }
+
if (fnfi.Size())
{
MFEM_ABORT("TODO: add energy contribution from interior face terms");
@@ -246,6 +290,51 @@ void NonlinearForm::Mult(const Vector &x, Vector &y) const
}
}
+ if (bnfi.Size())
+ {
+ // Which boundary attributes need to be processed?
+ Array bdr_attr_marker(mesh->bdr_attributes.Size() ?
+ mesh->bdr_attributes.Max() : 0);
+ bdr_attr_marker = 0;
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] == NULL)
+ {
+ bdr_attr_marker = 1;
+ break;
+ }
+ Array &bdr_marker = *bnfi_marker[k];
+ MFEM_ASSERT(bdr_marker.Size() == bdr_attr_marker.Size(),
+ "invalid boundary marker for boundary integrator #"
+ << k << ", counting from zero");
+ for (int i = 0; i < bdr_attr_marker.Size(); i++)
+ {
+ bdr_attr_marker[i] |= bdr_marker[i];
+ }
+ }
+
+ for (int i = 0; i < fes->GetNBE(); i++)
+ {
+ const int bdr_attr = mesh->GetBdrAttribute(i);
+ if (bdr_attr_marker[bdr_attr-1] == 0) { continue; }
+
+ fe = fes->GetBE(i);
+ doftrans = fes->GetBdrElementVDofs(i, vdofs);
+ T = fes->GetBdrElementTransformation(i);
+ px.GetSubVector(vdofs, el_x);
+ if (doftrans) {doftrans->InvTransformPrimal(el_x); }
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] &&
+ (*bnfi_marker[k])[bdr_attr-1] == 0) { continue; }
+
+ bnfi[k]->AssembleElementVector(*fe, *T, el_x, el_y);
+ if (doftrans) {doftrans->TransformDual(el_y); }
+ py.AddElementVector(vdofs, el_y);
+ }
+ }
+ }
+
if (fnfi.Size())
{
FaceElementTransformations *tr;
@@ -421,6 +510,51 @@ Operator &NonlinearForm::GetGradient(const Vector &x) const
}
}
+ if (bnfi.Size())
+ {
+ // Which boundary attributes need to be processed?
+ Array bdr_attr_marker(mesh->bdr_attributes.Size() ?
+ mesh->bdr_attributes.Max() : 0);
+ bdr_attr_marker = 0;
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] == NULL)
+ {
+ bdr_attr_marker = 1;
+ break;
+ }
+ Array &bdr_marker = *bnfi_marker[k];
+ MFEM_ASSERT(bdr_marker.Size() == bdr_attr_marker.Size(),
+ "invalid boundary marker for boundary integrator #"
+ << k << ", counting from zero");
+ for (int i = 0; i < bdr_attr_marker.Size(); i++)
+ {
+ bdr_attr_marker[i] |= bdr_marker[i];
+ }
+ }
+
+ for (int i = 0; i < fes->GetNBE(); i++)
+ {
+ const int bdr_attr = mesh->GetBdrAttribute(i);
+ if (bdr_attr_marker[bdr_attr-1] == 0) { continue; }
+
+ fe = fes->GetBE(i);
+ doftrans = fes->GetBdrElementVDofs(i, vdofs);
+ T = fes->GetBdrElementTransformation(i);
+ px.GetSubVector(vdofs, el_x);
+ if (doftrans) {doftrans->InvTransformPrimal(el_x); }
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] &&
+ (*bnfi_marker[k])[bdr_attr-1] == 0) { continue; }
+
+ bnfi[k]->AssembleElementGrad(*fe, *T, el_x, elmat);
+ if (doftrans) { doftrans->TransformDual(elmat); }
+ Grad->AddSubMatrix(vdofs, vdofs, elmat, skip_zeros);
+ }
+ }
+ }
+
if (fnfi.Size())
{
FaceElementTransformations *tr;
@@ -554,6 +688,7 @@ NonlinearForm::~NonlinearForm()
delete cGrad;
delete Grad;
for (int i = 0; i < dnfi.Size(); i++) { delete dnfi[i]; }
+ for (int i = 0; i < bnfi.Size(); i++) { delete bnfi[i]; }
for (int i = 0; i < fnfi.Size(); i++) { delete fnfi[i]; }
for (int i = 0; i < bfnfi.Size(); i++) { delete bfnfi[i]; }
delete ext;
@@ -723,6 +858,53 @@ double BlockNonlinearForm::GetEnergyBlocked(const BlockVector &bx) const
}
}
+ if (bnfi.Size())
+ {
+ // Which boundary attributes need to be processed?
+ Array bdr_attr_marker(mesh->bdr_attributes.Size() ?
+ mesh->bdr_attributes.Max() : 0);
+ bdr_attr_marker = 0;
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] == NULL)
+ {
+ bdr_attr_marker = 1;
+ break;
+ }
+ Array &bdr_marker = *bnfi_marker[k];
+ MFEM_ASSERT(bdr_marker.Size() == bdr_attr_marker.Size(),
+ "invalid boundary marker for boundary integrator #"
+ << k << ", counting from zero");
+ for (int i = 0; i < bdr_attr_marker.Size(); i++)
+ {
+ bdr_attr_marker[i] |= bdr_marker[i];
+ }
+ }
+
+ for (int i = 0; i < mesh->GetNBE(); i++)
+ {
+ const int bdr_attr = mesh->GetBdrAttribute(i);
+ if (bdr_attr_marker[bdr_attr-1] == 0) { continue; }
+
+ T = fes[0]->GetBdrElementTransformation(i);
+ for (int s = 0; s < fes.Size(); ++s)
+ {
+ fe[s] = fes[s]->GetBE(i);
+ doftrans = fes[s]->GetBdrElementVDofs(i, *(vdofs[s]));
+ bx.GetBlock(s).GetSubVector(*(vdofs[s]), *el_x[s]);
+ if (doftrans) {doftrans->InvTransformPrimal(*el_x[s]); }
+ }
+
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] &&
+ (*bnfi_marker[k])[bdr_attr-1] == 0) { continue; }
+
+ energy += bnfi[k]->GetElementEnergy(fe, *T, el_x_const);
+ }
+ }
+ }
+
// free the allocated memory
for (int i = 0; i < fes.Size(); ++i)
{
@@ -829,6 +1011,61 @@ void BlockNonlinearForm::MultBlocked(const BlockVector &bx,
}
}
+ if (bnfi.Size())
+ {
+ // Which boundary attributes need to be processed?
+ Array bdr_attr_marker(mesh->bdr_attributes.Size() ?
+ mesh->bdr_attributes.Max() : 0);
+ bdr_attr_marker = 0;
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] == NULL)
+ {
+ bdr_attr_marker = 1;
+ break;
+ }
+ Array &bdr_marker = *bnfi_marker[k];
+ MFEM_ASSERT(bdr_marker.Size() == bdr_attr_marker.Size(),
+ "invalid boundary marker for boundary integrator #"
+ << k << ", counting from zero");
+ for (int i = 0; i < bdr_attr_marker.Size(); i++)
+ {
+ bdr_attr_marker[i] |= bdr_marker[i];
+ }
+ }
+
+ for (int i = 0; i < mesh->GetNBE(); i++)
+ {
+ const int bdr_attr = mesh->GetBdrAttribute(i);
+ if (bdr_attr_marker[bdr_attr-1] == 0) { continue; }
+
+ T = fes[0]->GetBdrElementTransformation(i);
+ for (int s = 0; s < fes.Size(); ++s)
+ {
+ doftrans[s] = fes[s]->GetBdrElementVDofs(i, *(vdofs[s]));
+ fe[s] = fes[s]->GetBE(i);
+ bx.GetBlock(s).GetSubVector(*(vdofs[s]), *el_x[s]);
+ if (doftrans[s]) {doftrans[s]->InvTransformPrimal(*el_x[s]); }
+ }
+
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] &&
+ (*bnfi_marker[k])[bdr_attr-1] == 0) { continue; }
+
+ bnfi[k]->AssembleElementVector(fe, *T, el_x_const, el_y);
+
+ for (int s=0; sSize() == 0) { continue; }
+ if (doftrans[s]) {doftrans[s]->TransformDual(*el_y[s]); }
+ by.GetBlock(s).AddElementVector(*(vdofs[s]), *el_y[s]);
+ }
+ }
+ }
+ }
+
+
if (fnfi.Size())
{
FaceElementTransformations *tr;
@@ -1080,6 +1317,67 @@ void BlockNonlinearForm::ComputeGradientBlocked(const BlockVector &bx) const
}
}
+ if (bnfi.Size())
+ {
+ // Which boundary attributes need to be processed?
+ Array bdr_attr_marker(mesh->bdr_attributes.Size() ?
+ mesh->bdr_attributes.Max() : 0);
+ bdr_attr_marker = 0;
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] == NULL)
+ {
+ bdr_attr_marker = 1;
+ break;
+ }
+ Array &bdr_marker = *bnfi_marker[k];
+ MFEM_ASSERT(bdr_marker.Size() == bdr_attr_marker.Size(),
+ "invalid boundary marker for boundary integrator #"
+ << k << ", counting from zero");
+ for (int i = 0; i < bdr_attr_marker.Size(); i++)
+ {
+ bdr_attr_marker[i] |= bdr_marker[i];
+ }
+ }
+
+ for (int i = 0; i < mesh->GetNBE(); i++)
+ {
+ const int bdr_attr = mesh->GetBdrAttribute(i);
+ if (bdr_attr_marker[bdr_attr-1] == 0) { continue; }
+
+ T = fes[0]->GetBdrElementTransformation(i);
+ for (int s = 0; s < fes.Size(); ++s)
+ {
+ fe[s] = fes[s]->GetBE(i);
+ doftrans[s] = fes[s]->GetBdrElementVDofs(i, *(vdofs[s]));
+ bx.GetBlock(s).GetSubVector(*(vdofs[s]), *el_x[s]);
+ if (doftrans[s]) {doftrans[s]->InvTransformPrimal(*el_x[s]); }
+ }
+
+ for (int k = 0; k < bnfi.Size(); k++)
+ {
+ if (bnfi_marker[k] &&
+ (*bnfi_marker[k])[bdr_attr-1] == 0) { continue; }
+
+ bnfi[k]->AssembleElementGrad(fe, *T, el_x_const, elmats);
+
+ for (int j=0; jHeight() == 0) { continue; }
+ if (doftrans[j] || doftrans[l])
+ {
+ TransformDual(doftrans[j], doftrans[l], *elmats(j,l));
+ }
+ Grads(j,l)->AddSubMatrix(*vdofs[j], *vdofs[l],
+ *elmats(j,l), skip_zeros);
+ }
+ }
+ }
+ }
+ }
+
if (fnfi.Size())
{
FaceElementTransformations *tr;
@@ -1272,6 +1570,11 @@ BlockNonlinearForm::~BlockNonlinearForm()
delete dnfi[i];
}
+ for (int i = 0; i < bnfi.Size(); ++i)
+ {
+ delete bnfi[i];
+ }
+
for (int i = 0; i < fnfi.Size(); ++i)
{
delete fnfi[i];
diff --git a/fem/nonlinearform.hpp b/fem/nonlinearform.hpp
index 77da539f7e..980d0dd149 100644
--- a/fem/nonlinearform.hpp
+++ b/fem/nonlinearform.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence 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,10 @@ protected:
Array dnfi; // owned
Array*> dnfi_marker; // not owned
+ /// Set of Boundary Integrators to be assembled (added).
+ Array bnfi; // owned
+ Array*> bnfi_marker; // not owned
+
/// Set of interior face Integrators to be assembled (added).
Array fnfi; // owned
@@ -120,6 +124,19 @@ public:
Array *GetDNFI() { return &dnfi; }
const Array *GetDNFI() const { return &dnfi; }
+ /// Adds new Boundary Integrator.
+ void AddBoundaryIntegrator(NonlinearFormIntegrator *nlfi)
+ { bnfi.Append(nlfi); bnfi_marker.Append(NULL); }
+
+ /// Adds new Boundary Integrator, restricted to specific attributes.
+ void AddBoundaryIntegrator(NonlinearFormIntegrator *nlfi,
+ Array &elem_marker)
+ { bnfi.Append(nlfi); bnfi_marker.Append(&elem_marker); }
+
+ /// Access all integrators added with AddBoundaryIntegrator().
+ Array *GetBNFI() { return &bnfi; }
+ const Array *GetBNFI() const { return &bnfi; }
+
/// Adds new Interior Face Integrator.
void AddInteriorFaceIntegrator(NonlinearFormIntegrator *nlfi)
{ fnfi.Append(nlfi); }
@@ -235,6 +252,10 @@ protected:
Array dnfi;
Array*> dnfi_marker;
+ /// Set of Boundary Integrators to be assembled (added).
+ Array bnfi;
+ Array*> bnfi_marker;
+
/// Set of interior face Integrators to be assembled (added).
Array fnfi;
@@ -312,6 +333,15 @@ public:
Array &elem_marker)
{ dnfi.Append(nlfi); dnfi_marker.Append(&elem_marker); }
+ /// Adds new Boundary Integrator.
+ void AddBoundaryIntegrator(BlockNonlinearFormIntegrator *nlfi)
+ { bnfi.Append(nlfi); bnfi_marker.Append(NULL); }
+
+ /// Adds new Boundary Integrator, restricted to specific attributes.
+ void AddBoundaryIntegrator(BlockNonlinearFormIntegrator *nlfi,
+ Array &elem_marker)
+ { bnfi.Append(nlfi); bnfi_marker.Append(&elem_marker); }
+
/// Adds new Interior Face Integrator.
void AddInteriorFaceIntegrator(BlockNonlinearFormIntegrator *nlfi)
{ fnfi.Append(nlfi); }
diff --git a/fem/nonlinearform_ext.cpp b/fem/nonlinearform_ext.cpp
index a7adae127a..2d57b62cc3 100644
--- a/fem/nonlinearform_ext.cpp
+++ b/fem/nonlinearform_ext.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/nonlinearform_ext.hpp b/fem/nonlinearform_ext.hpp
index 87caff54e1..eaa61f5e05 100644
--- a/fem/nonlinearform_ext.hpp
+++ b/fem/nonlinearform_ext.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/nonlininteg.cpp b/fem/nonlininteg.cpp
index e1558fda4b..0cc0b50c01 100644
--- a/fem/nonlininteg.cpp
+++ b/fem/nonlininteg.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/nonlininteg.hpp b/fem/nonlininteg.hpp
index fa3d2c75cc..9426e1aac0 100644
--- a/fem/nonlininteg.hpp
+++ b/fem/nonlininteg.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -140,14 +140,14 @@ public:
method AssembleGradPA() has been called.
@param[in] x The gradient Operator is applied to the Vector @a x.
- @param[in,out] y The result Vector: @f$ y += G x @f$. */
+ @param[in,out] y The result Vector: $ y += G x $. */
virtual void AddMultGradPA(const Vector &x, Vector &y) const;
/// Method for computing the diagonal of the gradient with partial assembly.
/** The result Vector @a diag is an E-Vector. This method can be called only
after the method AssembleGradPA() has been called.
- @param[in,out] diag The result Vector: @f$ diag += diag(G) @f$. */
+ @param[in,out] diag The result Vector: $ diag += diag(G) $. */
virtual void AssembleGradDiagonalPA(Vector &diag) const;
/// Indicates whether this integrator can use a Ceed backend.
@@ -277,9 +277,9 @@ public:
/** Neo-Hookean hyperelastic model with a strain energy density function given
- by the formula: \f$(\mu/2)(\bar{I}_1 - dim) + (K/2)(det(J)/g - 1)^2\f$ where
- J is the deformation gradient and \f$\bar{I}_1 = (det(J))^{-2/dim} Tr(J
- J^t)\f$. The parameters \f$\mu\f$ and K are the shear and bulk moduli,
+ by the formula: $(\mu/2)(\bar{I}_1 - dim) + (K/2)(det(J)/g - 1)^2$ where
+ J is the deformation gradient and $$\bar{I}_1 = (det(J))^{-2/dim} Tr(J
+ J^t)$$. The parameters $\mu$ and K are the shear and bulk moduli,
respectively, and g is a reference volumetric scaling. */
class NeoHookeanModel : public HyperelasticModel
{
@@ -312,7 +312,7 @@ public:
/** Hyperelastic integrator for any given HyperelasticModel.
- Represents @f$ \int W(Jpt) dx @f$ over a target zone, where W is the
+ Represents $ \int W(Jpt) dx $ over a target zone, where W is the
@a model's strain energy density function, and Jpt is the Jacobian of the
target->physical coordinates transformation. The target configuration is
given by the current mesh at the time of the evaluation of the integrator.
@@ -356,8 +356,8 @@ public:
};
/** Hyperelastic incompressible Neo-Hookean integrator with the PK1 stress
- \f$P = \mu F - p F^{-T}\f$ where \f$\mu\f$ is the shear modulus,
- \f$p\f$ is the pressure, and \f$F\f$ is the deformation gradient */
+ $P = \mu F - p F^{-T}$ where $\mu$ is the shear modulus,
+ $p$ is the pressure, and $F$ is the deformation gradient */
class IncompressibleNeoHookeanIntegrator : public BlockNonlinearFormIntegrator
{
private:
@@ -430,7 +430,7 @@ public:
/** This class is used to assemble the convective form of the nonlinear term
- arising in the Navier-Stokes equations \f$(u \cdot \nabla v, w )\f$ */
+ arising in the Navier-Stokes equations $(u \cdot \nabla v, w )$ */
class ConvectiveVectorConvectionNLFIntegrator :
public VectorConvectionNLFIntegrator
{
@@ -453,7 +453,7 @@ public:
/** This class is used to assemble the skew-symmetric form of the nonlinear term
arising in the Navier-Stokes equations
- \f$.5*(u \cdot \nabla v, w ) - .5*(u \cdot \nabla w, v )\f$ */
+ $.5*(u \cdot \nabla v, w ) - .5*(u \cdot \nabla w, v )$ */
class SkewSymmetricVectorConvectionNLFIntegrator :
public VectorConvectionNLFIntegrator
{
diff --git a/fem/occa.okl b/fem/occa.okl
index 92890767bf..e43c78dee0 100644
--- a/fem/occa.okl
+++ b/fem/occa.okl
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/pbilinearform.cpp b/fem/pbilinearform.cpp
index ee1030c485..b593c9bcc2 100644
--- a/fem/pbilinearform.cpp
+++ b/fem/pbilinearform.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/pbilinearform.hpp b/fem/pbilinearform.hpp
index c8fef567b8..c6c4e33223 100644
--- a/fem/pbilinearform.hpp
+++ b/fem/pbilinearform.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/pfespace.cpp b/fem/pfespace.cpp
index 78a76041c2..00d4f5d5ee 100644
--- a/fem/pfespace.cpp
+++ b/fem/pfespace.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -497,12 +497,12 @@ void ParFiniteElementSpace::GetBdrElementDofs(int i, Array &dofs,
{
bdr_elem_dof->GetRow(i, dofs);
- if (DoFTransArray[mesh->GetBdrElementBaseGeometry(i)])
+ if (DoFTransArray[mesh->GetBdrElementGeometry(i)])
{
Array Fo;
bdr_elem_fos->GetRow(i, Fo);
doftrans.SetDofTransformation(
- *DoFTransArray[mesh->GetBdrElementBaseGeometry(i)]);
+ *DoFTransArray[mesh->GetBdrElementGeometry(i)]);
doftrans.SetFaceOrientations(Fo);
doftrans.SetVDim();
}
@@ -1031,7 +1031,7 @@ void ParFiniteElementSpace::GetEssentialVDofs(const Array &bdr_attr_is_ess,
void ParFiniteElementSpace::GetEssentialTrueDofs(const Array
&bdr_attr_is_ess,
Array &ess_tdof_list,
- int component)
+ int component) const
{
Array ess_dofs, true_ess_dofs;
diff --git a/fem/pfespace.hpp b/fem/pfespace.hpp
index 2b93230d51..e1aabf3dbc 100644
--- a/fem/pfespace.hpp
+++ b/fem/pfespace.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -365,7 +365,7 @@ public:
boundary attributes marked in the array bdr_attr_is_ess. */
void GetEssentialTrueDofs(const Array &bdr_attr_is_ess,
Array &ess_tdof_list,
- int component = -1) override;
+ int component = -1) const override;
/** If the given ldof is owned by the current processor, return its local
tdof number, otherwise return -1 */
diff --git a/fem/pgridfunc.cpp b/fem/pgridfunc.cpp
index e546093599..111b523746 100644
--- a/fem/pgridfunc.cpp
+++ b/fem/pgridfunc.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -666,7 +666,7 @@ void ParGridFunction::ProjectDiscCoefficient(VectorCoefficient &vcoeff,
}
void ParGridFunction::ProjectBdrCoefficient(
- Coefficient *coeff[], VectorCoefficient *vcoeff, Array &attr)
+ Coefficient *coeff[], VectorCoefficient *vcoeff, const Array &attr)
{
Array values_counter;
AccumulateAndCountBdrValues(coeff, vcoeff, attr, values_counter);
@@ -720,7 +720,7 @@ void ParGridFunction::ProjectBdrCoefficient(
}
void ParGridFunction::ProjectBdrCoefficientTangent(VectorCoefficient &vcoeff,
- Array &bdr_attr)
+ const Array &bdr_attr)
{
Array values_counter;
AccumulateAndCountBdrTangentValues(vcoeff, bdr_attr, values_counter);
diff --git a/fem/pgridfunc.hpp b/fem/pgridfunc.hpp
index 58c6c02862..1ed4d30007 100644
--- a/fem/pgridfunc.hpp
+++ b/fem/pgridfunc.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -44,7 +44,7 @@ protected:
Vector send_data;
void ProjectBdrCoefficient(Coefficient *coeff[], VectorCoefficient *vcoeff,
- Array &attr);
+ const Array &attr);
public:
ParGridFunction() { pfes = NULL; }
@@ -256,16 +256,17 @@ public:
// Only the values in the master are guaranteed to be correct!
void ProjectBdrCoefficient(VectorCoefficient &vcoeff,
- Array &attr) override
+ const Array &attr) override
{ ProjectBdrCoefficient(NULL, &vcoeff, attr); }
// Only the values in the master are guaranteed to be correct!
- void ProjectBdrCoefficient(Coefficient *coeff[], Array &attr) override
+ void ProjectBdrCoefficient(Coefficient *coeff[],
+ const Array &attr) override
{ ProjectBdrCoefficient(coeff, NULL, attr); }
// Only the values in the master are guaranteed to be correct!
void ProjectBdrCoefficientTangent(VectorCoefficient &vcoeff,
- Array &bdr_attr) override;
+ const Array &bdr_attr) override;
double ComputeL1Error(Coefficient *exsol[],
const IntegrationRule *irs[] = NULL) const override
diff --git a/fem/plinearform.cpp b/fem/plinearform.cpp
index 08f36c8ca1..42f872bfd2 100644
--- a/fem/plinearform.cpp
+++ b/fem/plinearform.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/plinearform.hpp b/fem/plinearform.hpp
index 08361ed86e..cfdc0b4b84 100644
--- a/fem/plinearform.hpp
+++ b/fem/plinearform.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/pnonlinearform.cpp b/fem/pnonlinearform.cpp
index 880c560e59..d3eb8bead1 100644
--- a/fem/pnonlinearform.cpp
+++ b/fem/pnonlinearform.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/pnonlinearform.hpp b/fem/pnonlinearform.hpp
index dc3611c511..982f87618f 100644
--- a/fem/pnonlinearform.hpp
+++ b/fem/pnonlinearform.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/prestriction.cpp b/fem/prestriction.cpp
index b383af103c..63bf39ab20 100644
--- a/fem/prestriction.cpp
+++ b/fem/prestriction.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/prestriction.hpp b/fem/prestriction.hpp
index 991c6d2d10..3fe45824a6 100644
--- a/fem/prestriction.hpp
+++ b/fem/prestriction.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/qfunction.cpp b/fem/qfunction.cpp
index f22954cc1a..76ea894f27 100644
--- a/fem/qfunction.cpp
+++ b/fem/qfunction.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence 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,6 +12,8 @@
#include "qfunction.hpp"
#include "quadinterpolator.hpp"
#include "quadinterpolator_face.hpp"
+#include "../general/forall.hpp"
+#include "../mesh/pmesh.hpp"
namespace mfem
{
@@ -240,4 +242,46 @@ void QuadratureFunction::SaveVTU(const std::string &filename, VTKFormat format,
SaveVTU(f, format, compression_level, field_name);
}
+static double ReduceDouble(const Mesh *mesh, double value)
+{
+#ifdef MFEM_USE_MPI
+ if (auto *pmesh = dynamic_cast(mesh))
+ {
+ MPI_Comm comm = pmesh->GetComm();
+ MPI_Allreduce(MPI_IN_PLACE, &value, 1, MPI_DOUBLE, MPI_SUM, comm);
+ }
+#endif
+ return value;
+}
+
+double QuadratureFunction::Integrate() const
+{
+ MFEM_VERIFY(vdim == 1, "Only scalar functions are supported.")
+ const double local_integral = InnerProduct(*this, qspace->GetWeights());
+ return ReduceDouble(qspace->GetMesh(), local_integral);
+}
+
+void QuadratureFunction::Integrate(Vector &integrals) const
+{
+ integrals.SetSize(vdim);
+
+ const Vector &weights = qspace->GetWeights();
+ QuadratureFunction component(qspace);
+ const int N = component.Size();
+ const int VDIM = vdim; // avoid capturing 'this' in lambda body
+ const double *d_v = Read();
+
+ for (int vd = 0; vd < vdim; ++vd)
+ {
+ // Extract the component 'vd' into component.
+ double *d_c = component.Write();
+ mfem::forall(N, [=] MFEM_HOST_DEVICE (int i)
+ {
+ d_c[i] = d_v[vd + i*VDIM];
+ });
+ integrals[vd] = ReduceDouble(qspace->GetMesh(),
+ InnerProduct(component, weights));
+ }
+}
+
}
diff --git a/fem/qfunction.hpp b/fem/qfunction.hpp
index 1b4f19f637..3b26182bf1 100644
--- a/fem/qfunction.hpp
+++ b/fem/qfunction.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -195,6 +195,14 @@ public:
void SaveVTU(const std::string &filename, VTKFormat format=VTKFormat::ASCII,
int compression_level=0, const std::string &field_name="u") const;
+
+ /// Return the integral of the quadrature function (vdim = 1 only).
+ double Integrate() const;
+
+ /// @brief Integrate the (potentially vector-valued) quadrature function,
+ /// storing the results in @a integrals (length @a vdim).
+ void Integrate(Vector &integrals) const;
+
virtual ~QuadratureFunction()
{
if (own_qspace) { delete qspace; }
diff --git a/fem/qinterp/det.cpp b/fem/qinterp/det.cpp
index de1ef235d0..e0b034b826 100644
--- a/fem/qinterp/det.cpp
+++ b/fem/qinterp/det.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence 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,11 +58,10 @@ static void Det2D(const int NE,
const double *g,
const double *x,
double *y,
- const int vdim = 1,
const int d1d = 0,
const int q1d = 0)
{
- constexpr int DIM = 2;
+ static constexpr int SDIM = 2;
static constexpr int NBZ = 1;
const int D1D = T_D1D ? T_D1D : d1d;
@@ -70,7 +69,7 @@ static void Det2D(const int NE,
const auto B = Reshape(b, Q1D, D1D);
const auto G = Reshape(g, Q1D, D1D);
- const auto X = Reshape(x, D1D, D1D, DIM, NE);
+ const auto X = Reshape(x, D1D, D1D, SDIM, NE);
auto Y = Reshape(y, Q1D, Q1D, NE);
mfem::forall_2D_batch(NE, Q1D, Q1D, NBZ, [=] MFEM_HOST_DEVICE (int e)
@@ -81,9 +80,9 @@ static void Det2D(const int NE,
const int Q1D = T_Q1D ? T_Q1D : q1d;
MFEM_SHARED double BG[2][MQ1*MD1];
- MFEM_SHARED double XY[2][NBZ][MD1*MD1];
- MFEM_SHARED double DQ[4][NBZ][MD1*MQ1];
- MFEM_SHARED double QQ[4][NBZ][MQ1*MQ1];
+ MFEM_SHARED double XY[SDIM][NBZ][MD1*MD1];
+ MFEM_SHARED double DQ[2*SDIM][NBZ][MD1*MQ1];
+ MFEM_SHARED double QQ[2*SDIM][NBZ][MQ1*MQ1];
kernels::internal::LoadX(e,D1D,X,XY);
kernels::internal::LoadBG(D1D,Q1D,B,G,BG);
@@ -103,13 +102,107 @@ static void Det2D(const int NE,
});
}
+template
+static void Det2DSurface(const int NE,
+ const double *b,
+ const double *g,
+ const double *x,
+ double *y,
+ const int d1d = 0,
+ const int q1d = 0)
+{
+ static constexpr int SDIM = 3;
+ static constexpr int NBZ = 1;
+
+ const int D1D = T_D1D ? T_D1D : d1d;
+ const int Q1D = T_Q1D ? T_Q1D : q1d;
+
+ const auto B = Reshape(b, Q1D, D1D);
+ const auto G = Reshape(g, Q1D, D1D);
+ const auto X = Reshape(x, D1D, D1D, SDIM, NE);
+ auto Y = Reshape(y, Q1D, Q1D, NE);
+
+ mfem::forall_2D_batch(NE, Q1D, Q1D, NBZ, [=] MFEM_HOST_DEVICE (int e)
+ {
+ constexpr int MQ1 = T_Q1D ? T_Q1D : DofQuadLimits::MAX_Q1D;
+ constexpr int MD1 = T_D1D ? T_D1D : DofQuadLimits::MAX_D1D;
+ const int D1D = T_D1D ? T_D1D : d1d;
+ const int Q1D = T_Q1D ? T_Q1D : q1d;
+ const int tidz = MFEM_THREAD_ID(z);
+
+ MFEM_SHARED double BG[2][MQ1*MD1];
+ MFEM_SHARED double XYZ[SDIM][NBZ][MD1*MD1];
+ MFEM_SHARED double DQ[2*SDIM][NBZ][MD1*MQ1];
+
+ kernels::internal::LoadBG(D1D,Q1D,B,G,BG);
+
+ // Load XYZ components
+ MFEM_FOREACH_THREAD(dy,y,D1D)
+ {
+ MFEM_FOREACH_THREAD(dx,x,D1D)
+ {
+ for (int d = 0; d < SDIM; ++d)
+ {
+ XYZ[d][tidz][dx + dy*D1D] = X(dx,dy,d,e);
+ }
+ }
+ }
+ MFEM_SYNC_THREAD;
+
+ ConstDeviceMatrix B_mat(BG[0], D1D, Q1D);
+ ConstDeviceMatrix G_mat(BG[1], D1D, Q1D);
+
+ // x contraction
+ MFEM_FOREACH_THREAD(dy,y,D1D)
+ {
+ MFEM_FOREACH_THREAD(qx,x,Q1D)
+ {
+ for (int d = 0; d < SDIM; ++d)
+ {
+ double u = 0.0;
+ double v = 0.0;
+ for (int dx = 0; dx < D1D; ++dx)
+ {
+ const double xval = XYZ[d][tidz][dx + dy*D1D];
+ u += xval * G_mat(dx,qx);
+ v += xval * B_mat(dx,qx);
+ }
+ DQ[d][tidz][dy + qx*D1D] = u;
+ DQ[3 + d][tidz][dy + qx*D1D] = v;
+ }
+ }
+ }
+ MFEM_SYNC_THREAD;
+ // y contraction and determinant computation
+ MFEM_FOREACH_THREAD(qy,y,Q1D)
+ {
+ MFEM_FOREACH_THREAD(qx,x,Q1D)
+ {
+ double J_[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
+ for (int d = 0; d < SDIM; ++d)
+ {
+ for (int dy = 0; dy < D1D; ++dy)
+ {
+ J_[d] += DQ[d][tidz][dy + qx*D1D] * B_mat(dy,qy);
+ J_[3 + d] += DQ[3 + d][tidz][dy + qx*D1D] * G_mat(dy,qy);
+ }
+ }
+ DeviceTensor<2> J(J_, 3, 2);
+ const double E = J(0,0)*J(0,0) + J(1,0)*J(1,0) + J(2,0)*J(2,0);
+ const double F = J(0,0)*J(0,1) + J(1,0)*J(1,1) + J(2,0)*J(2,1);
+ const double G = J(0,1)*J(0,1) + J(1,1)*J(1,1) + J(2,1)*J(2,1);
+ Y(qx,qy,e) = sqrt(E*G - F*F);
+ }
+ }
+ });
+}
+
template
static void Det3D(const int NE,
const double *b,
const double *g,
const double *x,
double *y,
- const int vdim = 1,
const int d1d = 0,
const int q1d = 0,
Vector *d_buff = nullptr) // used only with SMEM = false
@@ -231,7 +324,9 @@ void TensorDeterminants(const int NE,
<< " are not supported!");
MFEM_VERIFY(Q1D <= MQ, "Quadrature rules with more than "
<< MQ << " 1D points are not supported!");
- Det2D(NE,B,G,X,Y,vdim,D1D,Q1D);
+ if (vdim == 2) { Det2D(NE,B,G,X,Y,D1D,Q1D); }
+ else if (vdim == 3) { Det2DSurface(NE,B,G,X,Y,D1D,Q1D); }
+ else { MFEM_ABORT("Invalid space dimension."); }
return;
}
}
@@ -250,10 +345,10 @@ void TensorDeterminants(const int NE,
const int MQ = DeviceDofQuadLimits::Get().MAX_DET_1D;
// Highest orders that fit in shared memory
if (D1D <= MD && Q1D <= MQ)
- { return Det3D<0,0,true>(NE,B,G,X,Y,vdim,D1D,Q1D); }
+ { return Det3D<0,0,true>(NE,B,G,X,Y,D1D,Q1D); }
// Last fall-back will use global memory
return Det3D<0,0,false>(
- NE,B,G,X,Y,vdim,D1D,Q1D,&d_buff);
+ NE,B,G,X,Y,D1D,Q1D,&d_buff);
}
}
}
diff --git a/fem/qinterp/dispatch.hpp b/fem/qinterp/dispatch.hpp
index 4b076740e6..7e7c0ebfa7 100644
--- a/fem/qinterp/dispatch.hpp
+++ b/fem/qinterp/dispatch.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/qinterp/eval.hpp b/fem/qinterp/eval.hpp
index 7611ec6461..cb17cddc0f 100644
--- a/fem/qinterp/eval.hpp
+++ b/fem/qinterp/eval.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/qinterp/eval_by_nodes.cpp b/fem/qinterp/eval_by_nodes.cpp
index 6d218b75eb..baabf92f5e 100644
--- a/fem/qinterp/eval_by_nodes.cpp
+++ b/fem/qinterp/eval_by_nodes.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/qinterp/eval_by_vdim.cpp b/fem/qinterp/eval_by_vdim.cpp
index f2fd5d1cec..0b8b2d4b4c 100644
--- a/fem/qinterp/eval_by_vdim.cpp
+++ b/fem/qinterp/eval_by_vdim.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/qinterp/grad.hpp b/fem/qinterp/grad.hpp
index 31d6deb898..368bb49a5f 100644
--- a/fem/qinterp/grad.hpp
+++ b/fem/qinterp/grad.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/qinterp/grad_by_nodes.cpp b/fem/qinterp/grad_by_nodes.cpp
index f4dbbfd8ec..5fbc1e1cf8 100644
--- a/fem/qinterp/grad_by_nodes.cpp
+++ b/fem/qinterp/grad_by_nodes.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/qinterp/grad_by_vdim.cpp b/fem/qinterp/grad_by_vdim.cpp
index 24152ff450..3321b85415 100644
--- a/fem/qinterp/grad_by_vdim.cpp
+++ b/fem/qinterp/grad_by_vdim.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/qinterp/grad_phys_by_nodes.cpp b/fem/qinterp/grad_phys_by_nodes.cpp
index 0c137e1907..282a8afcb1 100644
--- a/fem/qinterp/grad_phys_by_nodes.cpp
+++ b/fem/qinterp/grad_phys_by_nodes.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/qinterp/grad_phys_by_vdim.cpp b/fem/qinterp/grad_phys_by_vdim.cpp
index fcef744ec6..e0c723b24f 100644
--- a/fem/qinterp/grad_phys_by_vdim.cpp
+++ b/fem/qinterp/grad_phys_by_vdim.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/qspace.cpp b/fem/qspace.cpp
index 826017237b..937f8ac939 100644
--- a/fem/qspace.cpp
+++ b/fem/qspace.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -10,6 +10,8 @@
// CONTRIBUTING.md for details.
#include "qspace.hpp"
+#include "qfunction.hpp"
+#include "../general/forall.hpp"
namespace mfem
{
@@ -35,6 +37,63 @@ void QuadratureSpaceBase::ConstructIntRules(int dim)
}
}
+namespace
+{
+
+void ScaleByQuadratureWeights(Vector &weights, const IntegrationRule &ir)
+{
+ const int N = weights.Size();
+ const int n = ir.Size();
+ double *d_weights = weights.ReadWrite();
+ const double *d_w = ir.GetWeights().Read();
+
+ mfem::forall(N, [=] MFEM_HOST_DEVICE (int i)
+ {
+ d_weights[i] *= d_w[i%n];
+ });
+}
+
+} // anonymous namespace
+
+void QuadratureSpaceBase::ConstructWeights() const
+{
+ // First get the Jacobian determinants (without the quadrature weight
+ // contributions). We also store the pointer to the Vector object, so that
+ // we know when the cached weights are invalidated.
+ nodes_sequence = mesh.GetNodesSequence();
+ weights = GetGeometricFactorWeights();
+
+ // Then scale by the quadrature weights.
+ const IntegrationRule &ir = GetIntRule(0);
+ ScaleByQuadratureWeights(weights, ir);
+}
+
+const Vector &QuadratureSpaceBase::GetWeights() const
+{
+ if (GetNE() == 0) { return weights; }
+ if (weights.Size() == 0 || nodes_sequence != mesh.GetNodesSequence())
+ {
+ ConstructWeights();
+ }
+ return weights;
+}
+
+double QuadratureSpaceBase::Integrate(Coefficient &coeff) const
+{
+ QuadratureFunction qf(const_cast(this));
+ coeff.Project(qf);
+ return qf.Integrate();
+}
+
+void QuadratureSpaceBase::Integrate(VectorCoefficient &coeff,
+ Vector &integrals) const
+{
+ const int vdim = coeff.GetVDim();
+ QuadratureFunction qf(const_cast(this), vdim);
+ coeff.Project(qf);
+ qf.Integrate(integrals);
+}
+
void QuadratureSpace::ConstructOffsets()
{
const int num_elem = mesh.GetNE();
@@ -94,6 +153,17 @@ void QuadratureSpace::Save(std::ostream &os) const
<< "Order: " << order << '\n';
}
+const Vector &QuadratureSpace::GetGeometricFactorWeights() const
+{
+ auto flags = GeometricFactors::DETERMINANTS;
+ // TODO: assumes only one integration rule. This should be fixed once
+ // Mesh::GetGeometricFactors acceps a QuadratureSpace instead of
+ // IntegrationRule.
+ const IntegrationRule &ir = GetIntRule(0);
+ auto *geom = mesh.GetGeometricFactors(ir, flags);
+ return geom->detJ;
+}
+
FaceQuadratureSpace::FaceQuadratureSpace(Mesh &mesh_, int order_,
FaceType face_type_)
: QuadratureSpaceBase(mesh_, order_),
@@ -191,4 +261,15 @@ void FaceQuadratureSpace::Save(std::ostream &os) const
<< "Order: " << order << '\n';
}
+const Vector &FaceQuadratureSpace::GetGeometricFactorWeights() const
+{
+ auto flags = FaceGeometricFactors::DETERMINANTS;
+ // TODO: assumes only one integration rule. This should be fixed once
+ // Mesh::GetFaceGeometricFactors acceps a QuadratureSpace instead of
+ // IntegrationRule.
+ const IntegrationRule &ir = GetIntRule(0);
+ auto *geom = mesh.GetFaceGeometricFactors(ir, flags, face_type);
+ return geom->detJ;
+}
+
} // namespace mfem
diff --git a/fem/qspace.hpp b/fem/qspace.hpp
index 7e4048ce21..57dcfe94d9 100644
--- a/fem/qspace.hpp
+++ b/fem/qspace.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence 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,6 +30,8 @@ protected:
Mesh &mesh; ///< The underlying mesh.
int order; ///< The order of integration rule.
int size; ///< Total number of quadrature points.
+ mutable Vector weights; ///< Integration weights.
+ mutable long nodes_sequence = 0; ///< Nodes counter for cache invalidation.
/// @brief Entity quadrature point offset array, of size num_entities + 1.
///
@@ -50,6 +52,12 @@ protected:
/// Fill the @ref int_rule array for each geometry type using @ref order.
void ConstructIntRules(int dim);
+ /// Compute the det(J) (volume or faces, depending on the type).
+ virtual const Vector &GetGeometricFactorWeights() const = 0;
+
+ /// Compute the integration weights.
+ void ConstructWeights() const;
+
public:
/// Return the total number of quadrature points.
int GetSize() const { return size; }
@@ -94,6 +102,15 @@ public:
/// Write the QuadratureSpace to the stream @a out.
virtual void Save(std::ostream &out) const = 0;
+ /// Return the integration weights (including geometric factors).
+ const Vector &GetWeights() const;
+
+ /// Return the integral of the scalar Coefficient @a coeff.
+ double Integrate(Coefficient &coeff) const;
+
+ /// Return the integral of the VectorCoefficient @a coeff in @a integrals.
+ void Integrate(VectorCoefficient &coeff, Vector &integrals) const;
+
virtual ~QuadratureSpaceBase() { }
};
@@ -102,6 +119,7 @@ public:
class QuadratureSpace : public QuadratureSpaceBase
{
protected:
+ const Vector &GetGeometricFactorWeights() const override;
void ConstructOffsets();
void Construct();
public:
@@ -159,6 +177,7 @@ class FaceQuadratureSpace : public QuadratureSpaceBase
/// Inverse of the map @a face_indices.
std::unordered_map face_indices_inv;
+ const Vector &GetGeometricFactorWeights() const override;
void ConstructOffsets();
void Construct();
diff --git a/fem/quadinterpolator.cpp b/fem/quadinterpolator.cpp
index 31c03a63a8..8314fdcfbd 100644
--- a/fem/quadinterpolator.cpp
+++ b/fem/quadinterpolator.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -168,7 +168,6 @@ static void Eval2D(const int NE,
MFEM_ASSERT(!geom || geom->mesh->SpaceDimension() == 2, "");
MFEM_VERIFY(ND <= QI::MAX_ND2D, "");
MFEM_VERIFY(NQ <= QI::MAX_NQ2D, "");
- MFEM_VERIFY(VDIM == 2 || !(eval_flags & QI::DETERMINANTS), "");
MFEM_VERIFY(bool(geom) == bool(eval_flags & QI::PHYSICAL_DERIVATIVES),
"'geom' must be given (non-null) only when evaluating physical"
" derivatives");
@@ -277,11 +276,17 @@ static void Eval2D(const int NE,
}
}
}
- if (VDIM == 2 && (eval_flags & QI::DETERMINANTS))
+ if (eval_flags & QI::DETERMINANTS)
{
- // The check (VDIM == 2) should eliminate this block when VDIM is
- // known at compile time and (VDIM != 2).
- det(q,e) = kernels::Det<2>(D);
+ if (VDIM == 2) { det(q,e) = kernels::Det<2>(D); }
+ else
+ {
+ DeviceTensor<2> j(D, 3, 2);
+ const double E = j(0,0)*j(0,0) + j(1,0)*j(1,0) + j(2,0)*j(2,0);
+ const double F = j(0,0)*j(0,1) + j(1,0)*j(1,1) + j(2,0)*j(2,1);
+ const double G = j(0,1)*j(0,1) + j(1,1)*j(1,1) + j(2,1)*j(2,1);
+ det(q,e) = sqrt(E*G - F*F);
+ }
}
}
}
@@ -471,6 +476,7 @@ void QuadratureInterpolator::Mult(const Vector &e_vec,
const DofToQuad::Mode mode =
use_tensor_eval ? DofToQuad::TENSOR : DofToQuad::FULL;
const DofToQuad &maps = fe->GetDofToQuad(*ir, mode);
+ const int dim = maps.FE->GetDim();
const GeometricFactors *geom = nullptr;
if (eval_flags & PHYSICAL_DERIVATIVES)
{
@@ -478,6 +484,8 @@ void QuadratureInterpolator::Mult(const Vector &e_vec,
geom = fespace->GetMesh()->GetGeometricFactors(*ir, jacobians);
}
+ MFEM_ASSERT(!(eval_flags & DETERMINANTS) || dim == vdim ||
+ (dim == 2 && vdim == 3), "Invalid dimensions for determinants.");
MFEM_ASSERT(fespace->GetMesh()->GetNumGeometries(
fespace->GetMesh()->Dimension()) == 1,
"mixed meshes are not supported");
@@ -529,7 +537,6 @@ void QuadratureInterpolator::Mult(const Vector &e_vec,
{
const int nd = maps.ndof;
const int nq = maps.nqpt;
- const int dim = maps.FE->GetDim();
void (*mult)(const int NE,
const int vdim,
diff --git a/fem/quadinterpolator.hpp b/fem/quadinterpolator.hpp
index 513bd4495b..6672ee2f1c 100644
--- a/fem/quadinterpolator.hpp
+++ b/fem/quadinterpolator.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/quadinterpolator_face.cpp b/fem/quadinterpolator_face.cpp
index b6b2e71e16..9decd0694f 100644
--- a/fem/quadinterpolator_face.cpp
+++ b/fem/quadinterpolator_face.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/quadinterpolator_face.hpp b/fem/quadinterpolator_face.hpp
index bbf3564d04..307076db9b 100644
--- a/fem/quadinterpolator_face.hpp
+++ b/fem/quadinterpolator_face.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/restriction.cpp b/fem/restriction.cpp
index da4eab5fac..25e06a06b9 100644
--- a/fem/restriction.cpp
+++ b/fem/restriction.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -360,6 +360,10 @@ int ElementRestriction::FillI(SparseMatrix &mat) const
const int j_offset = d_offsets[j_L];
const int j_next_offset = d_offsets[j_L+1];
const int j_nbElts = j_next_offset - j_offset;
+ MFEM_ASSERT_KERNEL(
+ j_nbElts <= Max,
+ "The connectivity of this mesh is beyond the max, increase the "
+ "MaxNbNbr variable to comply with your mesh.");
if (i_nbElts == 1 || j_nbElts == 1) // no assembly required
{
GetAndIncrementNnzIndex(i_L, I);
diff --git a/fem/restriction.hpp b/fem/restriction.hpp
index 6ee367cde3..023fb5bb4d 100644
--- a/fem/restriction.hpp
+++ b/fem/restriction.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/sidredatacollection.cpp b/fem/sidredatacollection.cpp
index e2350b84cc..a90cbdb5ca 100644
--- a/fem/sidredatacollection.cpp
+++ b/fem/sidredatacollection.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/sidredatacollection.hpp b/fem/sidredatacollection.hpp
index 4ddbac9320..217f076d68 100644
--- a/fem/sidredatacollection.hpp
+++ b/fem/sidredatacollection.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/staticcond.cpp b/fem/staticcond.cpp
index e9640af9cc..c7432f6220 100644
--- a/fem/staticcond.cpp
+++ b/fem/staticcond.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/staticcond.hpp b/fem/staticcond.hpp
index 99946ab485..fde042b10a 100644
--- a/fem/staticcond.hpp
+++ b/fem/staticcond.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence 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,32 +36,32 @@ namespace mfem
(associated with the element boundaries) are interfacial.
In block form the matrix of the system can be written as
- \f[ A =
+ $$ A =
\begin{pmatrix}
A_{11} & A_{12} \\
A_{21} & A_{22}
\end{pmatrix}
\begin{array}{l}
- \text{-- groups: element interior/private DOFs} \\
- \text{-- interface: element boundary/exposed DOFs}
- \end{array} \f]
- where the block \f$ A_1 \f$ is itself block diagonal with small local blocks
+ \text{- groups: element interior/private DOFs} \\
+ \text{- interface: element boundary/exposed DOFs}
+ \end{array} $$
+ where the block $ A_1 $ is itself block diagonal with small local blocks
and it is, therefore, easily invertible.
Starting with the block system
- \f[ \begin{pmatrix}
+ $$ \begin{pmatrix}
A_{11} & A_{12} \\
A_{21} & A_{22}
\end{pmatrix}
\begin{pmatrix} X_1 \\ X_2 \end{pmatrix} =
- \begin{pmatrix} B_1 \\ B_2 \end{pmatrix} \f]
+ \begin{pmatrix} B_1 \\ B_2 \end{pmatrix} $$
the reduced, statically condensed system is given by
- \f[ S_{22} X_2 = B_2 - A_{21} A_{11}^{-1} B_1 \f]
- where the Schur complement matrix \f$ S_{22} \f$ is given by
- \f[ S_{22} = A_{22} - A_{21} A_{11}^{-1} A_{12}. \f]
- After solving the Schur complement system, the \f$ X_1 \f$ part of the
+ $$ S_{22} X_2 = B_2 - A_{21} A_{11}^{-1} B_1 $$
+ where the Schur complement matrix $ S_{22} $ is given by
+ $$ S_{22} = A_{22} - A_{21} A_{11}^{-1} A_{12}. $$
+ After solving the Schur complement system, the $ X_1 $ part of the
solution can be recovered using the formula
- \f[ X_1 = A_{11}^{-1} ( B_1 - A_{12} X_2 ). \f] */
+ $$ X_1 = A_{11}^{-1} ( B_1 - A_{12} X_2 ). $$ */
class StaticCondensation
{
FiniteElementSpace *fes, *tr_fes;
diff --git a/fem/tbilinearform.hpp b/fem/tbilinearform.hpp
index e789121067..5d6aa4b3bf 100644
--- a/fem/tbilinearform.hpp
+++ b/fem/tbilinearform.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tbilininteg.hpp b/fem/tbilininteg.hpp
index 4063c03625..89df119f00 100644
--- a/fem/tbilininteg.hpp
+++ b/fem/tbilininteg.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tcoefficient.hpp b/fem/tcoefficient.hpp
index 8b6c4d2c5b..893c866555 100644
--- a/fem/tcoefficient.hpp
+++ b/fem/tcoefficient.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/teltrans.hpp b/fem/teltrans.hpp
index 2eefb4c202..0f3ee37c06 100644
--- a/fem/teltrans.hpp
+++ b/fem/teltrans.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tevaluator.hpp b/fem/tevaluator.hpp
index 745b5dea23..2a4857487f 100644
--- a/fem/tevaluator.hpp
+++ b/fem/tevaluator.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tfe.hpp b/fem/tfe.hpp
index 0617d916ef..70ecc9d50b 100644
--- a/fem/tfe.hpp
+++ b/fem/tfe.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -24,9 +24,9 @@ namespace mfem
element.
For tensor product evaluation, this is only called on the 1D reference
element, and higher dimensions are put together from that.
- The element mass matrix can be written \f$ M_E = B^T D_E B \f$ where the B
+ The element mass matrix can be written $ M_E = B^T D_E B $ where the B
built here is the B, and is unchanging across the mesh. The diagonal matrix
- \f$ D_E \f$ then contains all the element-specific geometry and physics data.
+ $ D_E $ then contains all the element-specific geometry and physics data.
@param fe the element we are calculating on
@param ir the integration rule to calculate the shape matrix on
@param B must be (nip x dof) with column major storage
@@ -58,12 +58,12 @@ void CalcShapeMatrix(const FiniteElement &fe, const IntegrationRule &ir,
For tensor product evaluation, this is only called on the 1D reference
element, and higher dimensions are put together from that.
The element stiffness matrix can be written
- \f[
+ $$
S_E = \sum_{k=1}^{nq} G_{k,i}^T (D_E^G)_{k,k} G_{k,j}
- \f]
- where \f$ nq \f$ is the number of quadrature points, \f$ D_E^G \f$ contains
+ $$
+ where $ nq $ is the number of quadrature points, $ D_E^G $ contains
all the information about the element geometry and coefficients (Jacobians
- etc.), and \f$ G \f$ is the matrix built in this routine, which is the same
+ etc.), and $ G $ is the matrix built in this routine, which is the same
for all elements in a mesh.
@param fe the element we are calculating on
@param ir the integration rule to calculate the gradients on
diff --git a/fem/tfespace.hpp b/fem/tfespace.hpp
index 359accb570..e04fefc0b7 100644
--- a/fem/tfespace.hpp
+++ b/fem/tfespace.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tintrules.hpp b/fem/tintrules.hpp
index c602de56dd..40d1578f19 100644
--- a/fem/tintrules.hpp
+++ b/fem/tintrules.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop.cpp b/fem/tmop.cpp
index 35780c29f2..9e44e8e6de 100644
--- a/fem/tmop.cpp
+++ b/fem/tmop.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop.hpp b/fem/tmop.hpp
index 8547756aed..80f6ce2a89 100644
--- a/fem/tmop.hpp
+++ b/fem/tmop.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -1730,7 +1730,7 @@ class TMOPNewtonSolver;
/** @brief A TMOP integrator class based on any given TMOP_QualityMetric and
TargetConstructor.
- Represents @f$ \int W(Jpt) dx @f$ over a target zone, where W is the
+ Represents $ \int W(Jpt) dx $ over a target zone, where W is the
metric's strain energy density function, and Jpt is the Jacobian of the
target->physical coordinates transformation. The virtual target zone is
defined by the TargetConstructor. */
@@ -2038,7 +2038,7 @@ public:
/// Sets a scaling Coefficient for the quality metric term of the integrator.
/** With this addition, the integrator becomes
- @f$ \int w1 W(Jpt) dx @f$.
+ $ \int w1 W(Jpt) dx $.
Note that the Coefficient is evaluated in the physical configuration and
not in the target configuration which may be undefined. */
@@ -2046,7 +2046,7 @@ public:
/** @brief Limiting of the mesh displacements (general version).
- Adds the term @f$ \int w_0 f(x, x_0, d) dx @f$, where f is a measure of
+ Adds the term $ \int w_0 f(x, x_0, d) dx $, where f is a measure of
the displacement between x and x_0, given the max allowed displacement d.
@param[in] n0 Original mesh node coordinates (x0 above).
@@ -2065,7 +2065,7 @@ public:
/** @brief Restriction of the node positions to certain regions.
- Adds the term @f$ \int c (z(x) - z_0(x_0))^2 @f$, where z0(x0) is a given
+ Adds the term $ \int c (z(x) - z_0(x_0))^2 $, where z0(x0) is a given
function on the starting mesh, and z(x) is its image on the new mesh.
Minimizing this term means that a node at x0 is allowed to move to a
position x(x0) only if z(x) ~ z0(x0).
@@ -2087,8 +2087,8 @@ public:
Having a level set function s0(x0) on the starting mesh, and a set of
marked nodes (or DOFs), we move these nodes to the zero level set of s0.
If s(x) is the image of s0(x0) on the current mesh, this function adds to
- the TMOP functional the term @f$ \int c \bar{s}(x))^2 @f$, where
- @f$\bar{s}(x)@f$ is the restriction of s(x) on the aligned DOFs.
+ the TMOP functional the term $ \int c \bar{s}(x))^2 $, where
+ $\bar{s}(x)$ is the restriction of s(x) on the aligned DOFs.
Minimizing this term means that a marked node at x0 is allowed to move to
a position x(x0) only if s(x) ~ 0.
Such term can be used for surface fitting and tangential relaxation.
@@ -2146,8 +2146,8 @@ public:
physical space x_t, we move these nodes to the target positions during
the optimization process.
This function adds to the TMOP functional the term
- @f$ \sum_{i \in S} c \frac{1}{2} (x_i - x_{t,i})^2 @f$,
- where @f$c@f$ corresponds to @a coeff below and is evaluated at the
+ $ \sum_{i \in S} c \frac{1}{2} (x_i - x_{t,i})^2 $,
+ where $c$ corresponds to @a coeff below and is evaluated at the
DOF locations.
@param[in] pos The desired positions for the mesh nodes.
diff --git a/fem/tmop/tmop_pa.cpp b/fem/tmop/tmop_pa.cpp
index ee3f2b8e28..5dc3ed66c7 100644
--- a/fem/tmop/tmop_pa.cpp
+++ b/fem/tmop/tmop_pa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa.hpp b/fem/tmop/tmop_pa.hpp
index 70cf6a5ffd..d27ce9c3d0 100644
--- a/fem/tmop/tmop_pa.hpp
+++ b/fem/tmop/tmop_pa.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_da3.cpp b/fem/tmop/tmop_pa_da3.cpp
index bba902ff01..17b801ac2e 100644
--- a/fem/tmop/tmop_pa_da3.cpp
+++ b/fem/tmop/tmop_pa_da3.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h2d.cpp b/fem/tmop/tmop_pa_h2d.cpp
index 353ef368a4..3430db070c 100644
--- a/fem/tmop/tmop_pa_h2d.cpp
+++ b/fem/tmop/tmop_pa_h2d.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h2d_c0.cpp b/fem/tmop/tmop_pa_h2d_c0.cpp
index 5556f9d5de..3e7e48db50 100644
--- a/fem/tmop/tmop_pa_h2d_c0.cpp
+++ b/fem/tmop/tmop_pa_h2d_c0.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h2m.cpp b/fem/tmop/tmop_pa_h2m.cpp
index f96d2b54b8..61ec741dae 100644
--- a/fem/tmop/tmop_pa_h2m.cpp
+++ b/fem/tmop/tmop_pa_h2m.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h2m_c0.cpp b/fem/tmop/tmop_pa_h2m_c0.cpp
index be405fba33..583bca8ef9 100644
--- a/fem/tmop/tmop_pa_h2m_c0.cpp
+++ b/fem/tmop/tmop_pa_h2m_c0.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h2s.cpp b/fem/tmop/tmop_pa_h2s.cpp
index cfdc7fcb04..8e9593ab34 100644
--- a/fem/tmop/tmop_pa_h2s.cpp
+++ b/fem/tmop/tmop_pa_h2s.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h2s_c0.cpp b/fem/tmop/tmop_pa_h2s_c0.cpp
index 95cffbf6e1..20a462c416 100644
--- a/fem/tmop/tmop_pa_h2s_c0.cpp
+++ b/fem/tmop/tmop_pa_h2s_c0.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h3d.cpp b/fem/tmop/tmop_pa_h3d.cpp
index 85c8220e51..3c47eed524 100644
--- a/fem/tmop/tmop_pa_h3d.cpp
+++ b/fem/tmop/tmop_pa_h3d.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h3d_c0.cpp b/fem/tmop/tmop_pa_h3d_c0.cpp
index 0a6460f213..f3a8880761 100644
--- a/fem/tmop/tmop_pa_h3d_c0.cpp
+++ b/fem/tmop/tmop_pa_h3d_c0.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h3m.cpp b/fem/tmop/tmop_pa_h3m.cpp
index 334bb1e844..21db1a3453 100644
--- a/fem/tmop/tmop_pa_h3m.cpp
+++ b/fem/tmop/tmop_pa_h3m.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h3m_c0.cpp b/fem/tmop/tmop_pa_h3m_c0.cpp
index ba966c9193..d60f8bd417 100644
--- a/fem/tmop/tmop_pa_h3m_c0.cpp
+++ b/fem/tmop/tmop_pa_h3m_c0.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h3s.cpp b/fem/tmop/tmop_pa_h3s.cpp
index 10629cf49b..4259fdd645 100644
--- a/fem/tmop/tmop_pa_h3s.cpp
+++ b/fem/tmop/tmop_pa_h3s.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_h3s_c0.cpp b/fem/tmop/tmop_pa_h3s_c0.cpp
index dfa8ebee21..f7cc1fb09f 100644
--- a/fem/tmop/tmop_pa_h3s_c0.cpp
+++ b/fem/tmop/tmop_pa_h3s_c0.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_jp2.cpp b/fem/tmop/tmop_pa_jp2.cpp
index 7b26141d58..a0a65c8f01 100644
--- a/fem/tmop/tmop_pa_jp2.cpp
+++ b/fem/tmop/tmop_pa_jp2.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_jp3.cpp b/fem/tmop/tmop_pa_jp3.cpp
index a122dcedd5..a55d8dce30 100644
--- a/fem/tmop/tmop_pa_jp3.cpp
+++ b/fem/tmop/tmop_pa_jp3.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_p2.cpp b/fem/tmop/tmop_pa_p2.cpp
index 609c60707e..02718b0833 100644
--- a/fem/tmop/tmop_pa_p2.cpp
+++ b/fem/tmop/tmop_pa_p2.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_p2_c0.cpp b/fem/tmop/tmop_pa_p2_c0.cpp
index cd161cce97..643cb62929 100644
--- a/fem/tmop/tmop_pa_p2_c0.cpp
+++ b/fem/tmop/tmop_pa_p2_c0.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_p3.cpp b/fem/tmop/tmop_pa_p3.cpp
index f950cb95b6..a013f990f6 100644
--- a/fem/tmop/tmop_pa_p3.cpp
+++ b/fem/tmop/tmop_pa_p3.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_p3_c0.cpp b/fem/tmop/tmop_pa_p3_c0.cpp
index 744ab77c6f..71fe0e4550 100644
--- a/fem/tmop/tmop_pa_p3_c0.cpp
+++ b/fem/tmop/tmop_pa_p3_c0.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_tc2.cpp b/fem/tmop/tmop_pa_tc2.cpp
index 6badb139ae..0d81a24838 100644
--- a/fem/tmop/tmop_pa_tc2.cpp
+++ b/fem/tmop/tmop_pa_tc2.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_tc3.cpp b/fem/tmop/tmop_pa_tc3.cpp
index 3e2cd1a6c2..783f39cfa1 100644
--- a/fem/tmop/tmop_pa_tc3.cpp
+++ b/fem/tmop/tmop_pa_tc3.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_w2.cpp b/fem/tmop/tmop_pa_w2.cpp
index 7a22058f90..5f8feb3cf9 100644
--- a/fem/tmop/tmop_pa_w2.cpp
+++ b/fem/tmop/tmop_pa_w2.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_w2_c0.cpp b/fem/tmop/tmop_pa_w2_c0.cpp
index a270de8a88..72a0e185e2 100644
--- a/fem/tmop/tmop_pa_w2_c0.cpp
+++ b/fem/tmop/tmop_pa_w2_c0.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_w3.cpp b/fem/tmop/tmop_pa_w3.cpp
index 14dd0ba075..a483bf5a26 100644
--- a/fem/tmop/tmop_pa_w3.cpp
+++ b/fem/tmop/tmop_pa_w3.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop/tmop_pa_w3_c0.cpp b/fem/tmop/tmop_pa_w3_c0.cpp
index 9f464fa19a..39e446cc86 100644
--- a/fem/tmop/tmop_pa_w3_c0.cpp
+++ b/fem/tmop/tmop_pa_w3_c0.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop_amr.cpp b/fem/tmop_amr.cpp
index 8ec3685daf..563cdfa29a 100644
--- a/fem/tmop_amr.cpp
+++ b/fem/tmop_amr.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop_amr.hpp b/fem/tmop_amr.hpp
index 17f4968386..8dd86de643 100644
--- a/fem/tmop_amr.hpp
+++ b/fem/tmop_amr.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop_tools.cpp b/fem/tmop_tools.cpp
index 2ee2e1c038..0d1c803864 100644
--- a/fem/tmop_tools.cpp
+++ b/fem/tmop_tools.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/tmop_tools.hpp b/fem/tmop_tools.hpp
index 062be361b9..e2c80ad68b 100644
--- a/fem/tmop_tools.hpp
+++ b/fem/tmop_tools.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/fem/transfer.cpp b/fem/transfer.cpp
index 7c08f5efff..a1eee41db9 100644
--- a/fem/transfer.cpp
+++ b/fem/transfer.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -1420,14 +1420,20 @@ void Prolongation2D(const int NE, const int D1D, const int Q1D,
const Array& B, const Vector& mask)
{
auto x_ = Reshape(localL.Read(), D1D, D1D, NE);
- auto y_ = Reshape(localH.ReadWrite(), Q1D, Q1D, NE);
+ auto y_ = Reshape(localH.Write(), Q1D, Q1D, NE);
auto B_ = Reshape(B.Read(), Q1D, D1D);
auto m_ = Reshape(mask.Read(), Q1D, Q1D, NE);
- localH = 0.0;
-
mfem::forall(NE, [=] MFEM_HOST_DEVICE (int e)
{
+ for (int qy = 0; qy < Q1D; ++qy)
+ {
+ for (int qx = 0; qx < Q1D; ++qx)
+ {
+ y_(qx, qy, e) = 0.0;
+ }
+ }
+
for (int dy = 0; dy < D1D; ++dy)
{
double sol_x[DofQuadLimits::MAX_Q1D];
@@ -1467,14 +1473,23 @@ void Prolongation3D(const int NE, const int D1D, const int Q1D,
const Array& B, const Vector& mask)
{
auto x_ = Reshape(localL.Read(), D1D, D1D, D1D, NE);
- auto y_ = Reshape(localH.ReadWrite(), Q1D, Q1D, Q1D, NE);
+ auto y_ = Reshape(localH.Write(), Q1D, Q1D, Q1D, NE);
auto B_ = Reshape(B.Read(), Q1D, D1D);
auto m_ = Reshape(mask.Read(), Q1D, Q1D, Q1D, NE);
- localH = 0.0;
-
mfem::forall(NE, [=] MFEM_HOST_DEVICE (int e)
{
+ for (int qz = 0; qz < Q1D; ++qz)
+ {
+ for (int qy = 0; qy < Q1D; ++qy)
+ {
+ for (int qx = 0; qx < Q1D; ++qx)
+ {
+ y_(qx, qy, qz, e) = 0.0;
+ }
+ }
+ }
+
for (int dz = 0; dz < D1D; ++dz)
{
double sol_xy[DofQuadLimits::MAX_Q1D][DofQuadLimits::MAX_Q1D];
@@ -1539,14 +1554,20 @@ void Restriction2D(const int NE, const int D1D, const int Q1D,
const Array& Bt, const Vector& mask)
{
auto x_ = Reshape(localH.Read(), Q1D, Q1D, NE);
- auto y_ = Reshape(localL.ReadWrite(), D1D, D1D, NE);
+ auto y_ = Reshape(localL.Write(), D1D, D1D, NE);
auto Bt_ = Reshape(Bt.Read(), D1D, Q1D);
auto m_ = Reshape(mask.Read(), Q1D, Q1D, NE);
- localL = 0.0;
-
mfem::forall(NE, [=] MFEM_HOST_DEVICE (int e)
{
+ for (int dy = 0; dy < D1D; ++dy)
+ {
+ for (int dx = 0; dx < D1D; ++dx)
+ {
+ y_(dx, dy, e) = 0.0;
+ }
+ }
+
for (int qy = 0; qy < Q1D; ++qy)
{
double sol_x[DofQuadLimits::MAX_D1D];
@@ -1578,14 +1599,23 @@ void Restriction3D(const int NE, const int D1D, const int Q1D,
const Array& Bt, const Vector& mask)
{
auto x_ = Reshape(localH.Read(), Q1D, Q1D, Q1D, NE);
- auto y_ = Reshape(localL.ReadWrite(), D1D, D1D, D1D, NE);
+ auto y_ = Reshape(localL.Write(), D1D, D1D, D1D, NE);
auto Bt_ = Reshape(Bt.Read(), D1D, Q1D);
auto m_ = Reshape(mask.Read(), Q1D, Q1D, Q1D, NE);
- localL = 0.0;
-
mfem::forall(NE, [=] MFEM_HOST_DEVICE (int e)
{
+ for (int dz = 0; dz < D1D; ++dz)
+ {
+ for (int dy = 0; dy < D1D; ++dy)
+ {
+ for (int dx = 0; dx < D1D; ++dx)
+ {
+ y_(dx, dy, dz, e) = 0.0;
+ }
+ }
+ }
+
for (int qz = 0; qz < Q1D; ++qz)
{
double sol_xy[DofQuadLimits::MAX_D1D][DofQuadLimits::MAX_D1D];
diff --git a/fem/transfer.hpp b/fem/transfer.hpp
index 553f037cc6..10e3a3de3b 100644
--- a/fem/transfer.hpp
+++ b/fem/transfer.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt
index 3c8006fbb1..278b323cc9 100644
--- a/general/CMakeLists.txt
+++ b/general/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/general/adios2stream.cpp b/general/adios2stream.cpp
index c8560ba97d..929525f1b2 100644
--- a/general/adios2stream.cpp
+++ b/general/adios2stream.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/adios2stream.hpp b/general/adios2stream.hpp
index aae63dfc3e..1e21c85776 100644
--- a/general/adios2stream.hpp
+++ b/general/adios2stream.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/annotation.hpp b/general/annotation.hpp
index adb7dd1897..7988a5d251 100644
--- a/general/annotation.hpp
+++ b/general/annotation.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/array.cpp b/general/array.cpp
index 12c3e3c06f..4ccf73ba4a 100644
--- a/general/array.cpp
+++ b/general/array.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/array.hpp b/general/array.hpp
index e85a6b71e3..c878a7c483 100644
--- a/general/array.hpp
+++ b/general/array.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/backends.hpp b/general/backends.hpp
index 4a16f6b593..35680a5784 100644
--- a/general/backends.hpp
+++ b/general/backends.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/binaryio.cpp b/general/binaryio.cpp
index 86bff72743..448243f52e 100644
--- a/general/binaryio.cpp
+++ b/general/binaryio.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/binaryio.hpp b/general/binaryio.hpp
index f428d1d7db..d7a3873dc8 100644
--- a/general/binaryio.hpp
+++ b/general/binaryio.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/communication.cpp b/general/communication.cpp
index 0c2fffc1fd..840d1e39c8 100644
--- a/general/communication.cpp
+++ b/general/communication.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/communication.hpp b/general/communication.hpp
index 8638202bef..389f4689fd 100644
--- a/general/communication.hpp
+++ b/general/communication.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/cuda.cpp b/general/cuda.cpp
index d183f1c077..12b743e809 100644
--- a/general/cuda.cpp
+++ b/general/cuda.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/cuda.hpp b/general/cuda.hpp
index 5ec67adb59..d71d738aa0 100644
--- a/general/cuda.hpp
+++ b/general/cuda.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/device.cpp b/general/device.cpp
index ccee71cd7d..b239eea598 100644
--- a/general/device.cpp
+++ b/general/device.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/device.hpp b/general/device.hpp
index baa27397fe..5e236430b1 100644
--- a/general/device.hpp
+++ b/general/device.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/enzyme.hpp b/general/enzyme.hpp
index fd480841c1..fa59b015b0 100644
--- a/general/enzyme.hpp
+++ b/general/enzyme.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/error.cpp b/general/error.cpp
index 5271337690..527164ceaa 100644
--- a/general/error.cpp
+++ b/general/error.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/error.hpp b/general/error.hpp
index 80cc1e10cd..d4f7531b21 100644
--- a/general/error.hpp
+++ b/general/error.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/forall.hpp b/general/forall.hpp
index fec5afde4e..f635c68e6e 100644
--- a/general/forall.hpp
+++ b/general/forall.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/gecko.cpp b/general/gecko.cpp
index 0bd8c442ae..eeae34d608 100644
--- a/general/gecko.cpp
+++ b/general/gecko.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/gecko.hpp b/general/gecko.hpp
index b60f04bd67..cff5976f08 100644
--- a/general/gecko.hpp
+++ b/general/gecko.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/globals.cpp b/general/globals.cpp
index 51a161d5e7..d589af64e8 100644
--- a/general/globals.cpp
+++ b/general/globals.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/globals.hpp b/general/globals.hpp
index ccf0e3722a..13eb2ed5bc 100644
--- a/general/globals.hpp
+++ b/general/globals.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/hash.cpp b/general/hash.cpp
index 5159b1d26e..2257f67941 100644
--- a/general/hash.cpp
+++ b/general/hash.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/hash.hpp b/general/hash.hpp
index b517172aa9..73c8be2392 100644
--- a/general/hash.hpp
+++ b/general/hash.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/hip.cpp b/general/hip.cpp
index d92aeb1e25..5a5396bfd8 100644
--- a/general/hip.cpp
+++ b/general/hip.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/hip.hpp b/general/hip.hpp
index e37f36a70b..7f32a4c79a 100644
--- a/general/hip.hpp
+++ b/general/hip.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/isockstream.cpp b/general/isockstream.cpp
index b3208d5e1b..55d9c601a9 100644
--- a/general/isockstream.cpp
+++ b/general/isockstream.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/isockstream.hpp b/general/isockstream.hpp
index f26167a744..4cc141fe39 100644
--- a/general/isockstream.hpp
+++ b/general/isockstream.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/kdtree.hpp b/general/kdtree.hpp
index b11248ea2e..1c643412ef 100644
--- a/general/kdtree.hpp
+++ b/general/kdtree.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/mem_alloc.hpp b/general/mem_alloc.hpp
index cdfe0adc5f..b5cd60713b 100644
--- a/general/mem_alloc.hpp
+++ b/general/mem_alloc.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/mem_manager.cpp b/general/mem_manager.cpp
index acb54d2083..3315eeaf86 100644
--- a/general/mem_manager.cpp
+++ b/general/mem_manager.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/mem_manager.hpp b/general/mem_manager.hpp
index c7c1a23d2f..c5fed95a00 100644
--- a/general/mem_manager.hpp
+++ b/general/mem_manager.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/occa.cpp b/general/occa.cpp
index 5c96ee6f87..6af9731ef9 100644
--- a/general/occa.cpp
+++ b/general/occa.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/occa.hpp b/general/occa.hpp
index 9bdbea1f2f..f46f3bab89 100644
--- a/general/occa.hpp
+++ b/general/occa.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/optparser.cpp b/general/optparser.cpp
index a598548994..58005f1247 100644
--- a/general/optparser.cpp
+++ b/general/optparser.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/optparser.hpp b/general/optparser.hpp
index eecf0f74a6..916915fecc 100644
--- a/general/optparser.hpp
+++ b/general/optparser.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/osockstream.cpp b/general/osockstream.cpp
index 95d12a19bd..795849923e 100644
--- a/general/osockstream.cpp
+++ b/general/osockstream.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/osockstream.hpp b/general/osockstream.hpp
index ae5de7ea54..57d2e297f3 100644
--- a/general/osockstream.hpp
+++ b/general/osockstream.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/sets.cpp b/general/sets.cpp
index 24dbaa405a..14fd109557 100644
--- a/general/sets.cpp
+++ b/general/sets.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/sets.hpp b/general/sets.hpp
index a5cbdf4e25..86fe2bf31d 100644
--- a/general/sets.hpp
+++ b/general/sets.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/socketstream.cpp b/general/socketstream.cpp
index fdaf8a8aec..b92440c329 100644
--- a/general/socketstream.cpp
+++ b/general/socketstream.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/socketstream.hpp b/general/socketstream.hpp
index 8f53efae3a..2b2a683ac6 100644
--- a/general/socketstream.hpp
+++ b/general/socketstream.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/sort_pairs.hpp b/general/sort_pairs.hpp
index 3118563c18..c4fe2ee459 100644
--- a/general/sort_pairs.hpp
+++ b/general/sort_pairs.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/stable3d.cpp b/general/stable3d.cpp
index 6981b00a32..40f91432ed 100644
--- a/general/stable3d.cpp
+++ b/general/stable3d.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/stable3d.hpp b/general/stable3d.hpp
index 6f122eeeef..18d02784c8 100644
--- a/general/stable3d.hpp
+++ b/general/stable3d.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/table.cpp b/general/table.cpp
index e788c7b3aa..a9ddbf1999 100644
--- a/general/table.cpp
+++ b/general/table.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/table.hpp b/general/table.hpp
index 2ed9f4a1bc..6f90e95bfb 100644
--- a/general/table.hpp
+++ b/general/table.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/tassign.hpp b/general/tassign.hpp
index 013661f6fe..1a6fd6a608 100644
--- a/general/tassign.hpp
+++ b/general/tassign.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/text.hpp b/general/text.hpp
index f7003afbb9..8907391b16 100644
--- a/general/text.hpp
+++ b/general/text.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/tic_toc.cpp b/general/tic_toc.cpp
index 986b8559d5..d99a92d7ad 100644
--- a/general/tic_toc.cpp
+++ b/general/tic_toc.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/tic_toc.hpp b/general/tic_toc.hpp
index 36b50f1a75..3ab166e9d5 100644
--- a/general/tic_toc.hpp
+++ b/general/tic_toc.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/version.cpp b/general/version.cpp
index d2b05f8edd..131b90f134 100644
--- a/general/version.cpp
+++ b/general/version.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/general/version.hpp b/general/version.hpp
index d4e81b05f8..8ddaa7d01a 100644
--- a/general/version.hpp
+++ b/general/version.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/CMakeLists.txt b/linalg/CMakeLists.txt
index c257e5133a..de5ccb5025 100644
--- a/linalg/CMakeLists.txt
+++ b/linalg/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/linalg/amgxsolver.cpp b/linalg/amgxsolver.cpp
index 124e2c25ea..d867e66aec 100644
--- a/linalg/amgxsolver.cpp
+++ b/linalg/amgxsolver.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/amgxsolver.hpp b/linalg/amgxsolver.hpp
index b88c333b11..315f8c4155 100644
--- a/linalg/amgxsolver.hpp
+++ b/linalg/amgxsolver.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -28,7 +28,7 @@
namespace mfem
{
-/**
+/** @brief
MFEM wrapper for Nvidia's multigrid library, AmgX (github.com/NVIDIA/AMGX)
AmgX requires building MFEM with CUDA, and AMGX enabled. For distributed
@@ -71,85 +71,122 @@ class AmgXSolver : public Solver
public:
/// Flags to configure AmgXSolver as a solver or preconditioner
- enum AMGX_MODE {SOLVER, PRECONDITIONER};
+ enum AMGX_MODE
+ {
+ /// Use the preconditioned conjugate gradient method with the AMG
+ /// V-cycle used as a proconditioner. With the default configuration
+ /// a block Jacobi smoother is used.
+ SOLVER,
+ /// Directly apply iterations of the AMG V cycle to the matrix
+ /// With the default configuration this will be 2 iterations
+ /// with block Jacobi smoother.
+ PRECONDITIONER
+ };
/// Flag to check for convergence
bool ConvergenceCheck;
- /**
+ /** @brief
Flags to determine whether user solver settings are defined internally in
the source code or will be read through an external JSON file.
*/
- enum CONFIG_SRC {INTERNAL, EXTERNAL, UNDEFINED};
+ enum CONFIG_SRC
+ {
+ /// Configuration will be read directly from a string
+ INTERNAL,
+ /// Configure will be read from a specified file
+ EXTERNAL,
+ UNDEFINED
+ };
AmgXSolver();
- /**
+ /** @brief
Configures AmgX with a default configuration based on the AmgX mode, and
- verbosity. Assumes no MPI parallism.
+ verbosity. Assumes no MPI parallelism.
*/
AmgXSolver(const AMGX_MODE amgxMode_, const bool verbose);
- /**
- Once the solver configuration has been established through either the
- ReadParameters method or the constructor, InitSerial will initialize the
- library. If configuring with constructor, the constructor will make this
- call.
+ /** @brief Initialize the AmgX library for serial execution once
+ the solver configuration has been established through either the
+ AmgXSolver::ReadParameters method or the constructor. The constructor
+ will make this call.
*/
void InitSerial();
#ifdef MFEM_USE_MPI
- /**
- Configures AmgX with a default configuration based on the AmgX mode, and
- verbosity. Pairs each MPI rank with one GPU.
+ /** @brief
+ Configures AmgX with a default configuration based on the AMGX_MODE
+ (AmgXSolver::SOLVER, AmgXSolver::PRECONDITIONER)
+ and verbosity. Pairs each MPI rank with one GPU.
*/
- AmgXSolver(const MPI_Comm &comm, const AMGX_MODE amgxMode_, const bool verbose);
+ AmgXSolver(const MPI_Comm &comm, const AMGX_MODE amgxMode_,
+ const bool verbose);
- /**
- Configures AmgX with a default configuration based on the AmgX mode, and
- verbosity. Creates MPI teams around GPUs to support MPI ranks >
+ /** @brief
+ Configures AmgX with a default configuration based on the AMGX_MODE
+ (AmgXSolver::SOLVER, AmgXSolver::PRECONDITIONER)
+ and verbosity. Creates MPI teams around GPUs to support more ranks than
GPUs. Consolidates linear solver data to avoid multiple ranks sharing
- GPUs. Requires specifying number of devices in each compute node.
+ GPUs. Requires specifying the number of devices in each compute node as
+ @a nDevs.
*/
AmgXSolver(const MPI_Comm &comm, const int nDevs,
const AMGX_MODE amgx_Mode_, const bool verbose);
- /**
- Once the solver configuration has been established, either through the
- constructor or the ReadParameters method, InitSerial will initialize the
- library. If configuring with constructor, the constructor will make this
- call.
+ /** @brief Initialize the AmgX library in parallel mode with exactly one
+ GPU per rank after the solver configuration has been established,
+ either through the constructor or the AmgXSolver::ReadParameters
+ method. If configuring with a constructor, the constructor will make
+ this call.
*/
void InitExclusiveGPU(const MPI_Comm &comm);
- /**
- Once the solver configuration has been established, either through the
- ReadParameters method, InitMPITeams will initialize the library and create
- MPI teams based on the number of devices on each node (nDevs). If
- configuring with constructor, the constructor will make this call.
+ /** @brief Initialize the AmgX library and create MPI teams based on the
+ number of devices on each node @a nDevs. If configuring with a
+ constructor, the constructor will make this call, otherwise this will need
+ to be called after the solver configuration has been established through
+ the AmgXSolver::ReadParameters call.
*/
void InitMPITeams(const MPI_Comm &comm,
const int nDevs);
#endif
- /**
- Sets Operator for AmgX library, either MFEM SparseMatrix or HypreParMatrix
+ /** @brief Sets the Operator that is going to be solved via AmgX.
+ Supports operators based on either an MFEM SparseMatrix or
+ HypreParMatrix.
*/
virtual void SetOperator(const Operator &op);
- /**
- Replaces the matrix coefficients in the AmgX solver.
+ /** @brief Change the input operator that is being solved via AmgX.
+ Supports operators based on either an MFEM SparseMatrix or
+ HypreParMatrix.
*/
void UpdateOperator(const Operator &op);
+ /** @brief Utilize the AmgX library to solve the linear system
+ where the "matrix" is the AMG approximation to the operator set
+ by AmgXSolver::SetOperator. If the mode is set to
+ AmgXSolver::PRECONDITIONER the initial guess for the
+ @a x vector will be set to zero, otherwise the value of @a x passed
+ in will be used.
+ */
virtual void Mult(const Vector& b, Vector& x) const;
+ /** @brief Return the number of iterations that were executed during the
+ last solve phase. */
int GetNumIterations();
+ /** @brief Read in the AmgX parameters either through a file or directly
+ through a properly formated string. If @a source is set to
+ AmgXSolver::EXTERNAL the parameters are loaded from a filename set by
+ @a config. If @a source is set to AmgXSolver::INTERNAL the parameters
+ are set directly by the string defined by @a config.
+ */
void ReadParameters(const std::string config, CONFIG_SRC source);
- /**
+ /** @brief Set up the AmgX library with the default paramaters.
@param [in] amgxMode_ AmgXSolver::PRECONDITIONER,
AmgXSolver::SOLVER.
@@ -160,16 +197,19 @@ public:
two iterations of an AMG V cycle with AmgX's default smoother (block
Jacobi).
- As a solver the preconditioned conjugate gradient method is used. The AMG
- V-cycle with a block Jacobi smoother is used as a preconditioner.
+ When configured as a solver the preconditioned conjugate gradient method
+ is used with the AMG V-cycle and a block Jacobi smoother is used as a
+ preconditioner.
*/
void DefaultParameters(const AMGX_MODE amgxMode_, const bool verbose);
/// Add a check for convergence after applying Mult.
void SetConvergenceCheck(bool setConvergenceCheck_=true);
+ /// Close down the AmgX library and free up any MPI Comms set up for it
~AmgXSolver();
+ /// Close down the AmgX library and free up any MPI Comms set up for it
void Finalize();
private:
@@ -181,36 +221,41 @@ private:
CONFIG_SRC configSrc = UNDEFINED;
#ifdef MFEM_USE_MPI
- // Consolidates matrix diagonal and off diagonal data and uploads matrix to
- // AmgX.
+ /** @brief Consolidates matrix diagonal and off diagonal data and uploads
+ matrix to AmgX. */
void SetMatrixMPIGPUExclusive(const HypreParMatrix &A,
const Array &loc_A,
- const Array &loc_I, const Array &loc_J,
+ const Array &loc_I,
+ const Array &loc_J,
const bool update_mat = false);
- // Consolidates matrix diagonal and off diagonal data for all ranks in an MPI
- // team. Root rank of each MPI team holds the the consolidated data and sets
- // matrix.
+ /** @brief Consolidates matrix diagonal and off diagonal data for all ranks
+ in an MPI team. Root rank of each MPI team holds the consolidated
+ data and matrix. */
void SetMatrixMPITeams(const HypreParMatrix &A, const Array &loc_A,
const Array &loc_I, const Array &loc_J,
const bool update_mat = false);
- // The following methods consolidate array data to the root node in a MPI
- // team.
+ /// Consolidate array data to the root node in a MPI team.
void GatherArray(const Array &inArr, Array &outArr,
const int mpiTeamSz, const MPI_Comm &mpiTeam) const;
+ /// Consolidate array data to the root node in a MPI team.
void GatherArray(const Vector &inArr, Vector &outArr,
const int mpiTeamSz, const MPI_Comm &mpiTeam) const;
+ /// Consolidate array data to the root node in a MPI team.
void GatherArray(const Array &inArr, Array &outArr,
const int mpiTeamSz, const MPI_Comm &mpiTeam) const;
+ /// Consolidate array data to the root node in a MPI team.
void GatherArray(const Array &inArr, Array &outArr,
const int mpiTeamSz, const MPI_Comm &mpiTeam) const;
- // The following methods consolidate array data to the root node in a MPI
- // team as well as store array partitions and displacements.
+ /** @brief Consolidate array data to the root node in a MPI
+ team as well as store array partitions and displacements in
+ @a Apart and @a Adisp.
+ */
void GatherArray(const Vector &inArr, Vector &outArr,
const int mpiTeamSz, const MPI_Comm &mpiTeamComm,
Array &Apart, Array &Adisp) const;
@@ -299,10 +344,10 @@ private:
// AmgX resource object.
static AMGX_resources_handle rsrc;
- // Set the ID of the corresponding GPU used by this process.
+ /// Set the ID of the corresponding GPU used by this process.
void SetDeviceIDs(const int nDevs);
- // Initialize all MPI communicators.
+ /// Initialize all MPI communicators.
#ifdef MFEM_USE_MPI
void InitMPIcomms(const MPI_Comm &comm, const int nDevs);
#endif
diff --git a/linalg/auxiliary.cpp b/linalg/auxiliary.cpp
index 003e526955..e8fdf91a94 100644
--- a/linalg/auxiliary.cpp
+++ b/linalg/auxiliary.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/auxiliary.hpp b/linalg/auxiliary.hpp
index 62b87336be..1409b7898b 100644
--- a/linalg/auxiliary.hpp
+++ b/linalg/auxiliary.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/blockmatrix.cpp b/linalg/blockmatrix.cpp
index 289601ebd2..4113fafe06 100644
--- a/linalg/blockmatrix.cpp
+++ b/linalg/blockmatrix.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/blockmatrix.hpp b/linalg/blockmatrix.hpp
index 8cf3f75e85..589c8ccabd 100644
--- a/linalg/blockmatrix.hpp
+++ b/linalg/blockmatrix.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/blockoperator.cpp b/linalg/blockoperator.cpp
index b1c0c3c311..f5e1d02c7b 100644
--- a/linalg/blockoperator.cpp
+++ b/linalg/blockoperator.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -45,12 +45,12 @@ BlockOperator::BlockOperator(const Array & row_offsets_,
op = static_cast(NULL);
}
-void BlockOperator::SetDiagonalBlock(int iblock, Operator *opt, double c)
+void BlockOperator::SetDiagonalBlock(int iblock, const Operator *opt, double c)
{
SetBlock(iblock, iblock, opt, c);
}
-void BlockOperator::SetBlock(int iRow, int iCol, Operator *opt, double c)
+void BlockOperator::SetBlock(int iRow, int iCol, const Operator *opt, double c)
{
if (owns_blocks && op(iRow, iCol))
{
diff --git a/linalg/blockoperator.hpp b/linalg/blockoperator.hpp
index c9f9c8e46a..a6c05c4773 100644
--- a/linalg/blockoperator.hpp
+++ b/linalg/blockoperator.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -61,14 +61,14 @@ public:
* op: the Operator to be inserted.
* c: optional scalar multiple for this block.
*/
- void SetDiagonalBlock(int iblock, Operator *op, double c = 1.0);
+ void SetDiagonalBlock(int iblock, const Operator *op, double c = 1.0);
//! Add a block op in the block-entry (iblock, jblock).
/**
* irow, icol: The block will be inserted in location (irow, icol).
* op: the Operator to be inserted.
* c: optional scalar multiple for this block.
*/
- void SetBlock(int iRow, int iCol, Operator *op, double c = 1.0);
+ void SetBlock(int iRow, int iCol, const Operator *op, double c = 1.0);
//! Return the number of row blocks
int NumRowBlocks() const { return nRowBlocks; }
@@ -78,9 +78,6 @@ public:
//! Check if block (i,j) is a zero block
int IsZeroBlock(int i, int j) const { return (op(i,j)==NULL) ? 1 : 0; }
//! Return a reference to block i,j
- Operator & GetBlock(int i, int j)
- { MFEM_VERIFY(op(i,j), ""); return *op(i,j); }
- //! Return a reference to block i,j (const version)
const Operator & GetBlock(int i, int j) const
{ MFEM_VERIFY(op(i,j), ""); return *op(i,j); }
//! Return the coefficient for block i,j
@@ -123,7 +120,7 @@ private:
//! Column offsets for the starting position of each block
Array col_offsets;
//! 2D array that stores each block of the operator.
- Array2D op;
+ Array2D op;
//! 2D array that stores a coefficient for each block of the operator.
Array2D coef;
diff --git a/linalg/blockvector.cpp b/linalg/blockvector.cpp
index 27b87a3750..c2d3d5fb57 100644
--- a/linalg/blockvector.cpp
+++ b/linalg/blockvector.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/blockvector.hpp b/linalg/blockvector.hpp
index 9b29901f32..24fda8d311 100644
--- a/linalg/blockvector.hpp
+++ b/linalg/blockvector.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/complex_densemat.cpp b/linalg/complex_densemat.cpp
index f43ce6e49f..e105033c16 100644
--- a/linalg/complex_densemat.cpp
+++ b/linalg/complex_densemat.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/complex_densemat.hpp b/linalg/complex_densemat.hpp
index 467d9f21bf..054175d314 100644
--- a/linalg/complex_densemat.hpp
+++ b/linalg/complex_densemat.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/complex_operator.cpp b/linalg/complex_operator.cpp
index b4d1790075..a71adfdd61 100644
--- a/linalg/complex_operator.cpp
+++ b/linalg/complex_operator.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/complex_operator.hpp b/linalg/complex_operator.hpp
index 276f5b7486..730db741fb 100644
--- a/linalg/complex_operator.hpp
+++ b/linalg/complex_operator.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/constraints.cpp b/linalg/constraints.cpp
index 4730dee8f1..78afc617ff 100644
--- a/linalg/constraints.cpp
+++ b/linalg/constraints.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/constraints.hpp b/linalg/constraints.hpp
index 82101ee7fd..43b35ee405 100644
--- a/linalg/constraints.hpp
+++ b/linalg/constraints.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -25,8 +25,8 @@ class FiniteElementSpace;
class ParFiniteElementSpace;
#endif
-/** @brief An abstract class to solve the constrained system \f$ Ax = f \f$
- subject to the constraint \f$ B x = r \f$.
+/** @brief An abstract class to solve the constrained system $ Ax = f $
+ subject to the constraint $ B x = r $.
Although implementations may not use the below formulation, for
understanding some of its methods and notation you can think of
@@ -39,8 +39,8 @@ class ParFiniteElementSpace;
pointwise constraints and is not a Solver.
The height and width of this object as an IterativeSolver are the same as
- just the unconstrained operator \f$ A \f$, and the Mult() interface just
- takes \f$ f \f$ as an argument. You can set \f$ r \f$ with
+ just the unconstrained operator $ A $, and the Mult() interface just
+ takes $ f $ as an argument. You can set $ r $ with
SetConstraintRHS() (it defaults to zero) and get the Lagrange multiplier
solution with GetMultiplierSolution().
@@ -75,11 +75,11 @@ public:
system with Mult() or LagrangeSystemMult() */
void GetMultiplierSolution(Vector& lambda) const { lambda = multiplier_sol; }
- /** @brief Solve for \f$ x \f$ given \f$ f \f$.
+ /** @brief Solve for $ x $ given $ f $.
- If you want to set \f$ r \f$, call SetConstraintRHS() before this.
+ If you want to set $ r $, call SetConstraintRHS() before this.
- If you want to get \f$ \lambda \f$, call GetMultiplierSolution() after
+ If you want to get $ \lambda $, call GetMultiplierSolution() after
this.
The base class implementation calls LagrangeSystemMult(), so derived
@@ -114,8 +114,8 @@ private:
This keeps track of primary / secondary tdofs and does small dense block
solves to eliminate constraints from a global system.
- \f$ B_s^{-1} \f$ maps the lagrange space into secondary dofs, while
- \f$ -B_s^{-1} B_p \f$ maps primary dofs to secondary dofs. */
+ $ B_s^{-1} $ maps the lagrange space into secondary dofs, while
+ $ -B_s^{-1} B_p $ maps primary dofs to secondary dofs. */
class Eliminator
{
public:
@@ -128,19 +128,19 @@ public:
const Array& SecondaryDofs() const { return secondary_tdofs; }
/// Given primary dofs in in, return secondary dofs in out
- /// This applies \f$ -B_s^{-1} B_p \f$.
+ /// This applies $ -B_s^{-1} B_p $.
void Eliminate(const Vector& in, Vector& out) const;
- /// Transpose of Eliminate(), applies \f$ -B_p^T B_s^{-T} \f$
+ /// Transpose of Eliminate(), applies $ -B_p^T B_s^{-T} $
void EliminateTranspose(const Vector& in, Vector& out) const;
- /// Maps Lagrange multipliers to secondary dofs, applies \f$ B_s^{-1} \f$
+ /// Maps Lagrange multipliers to secondary dofs, applies $ B_s^{-1} $
void LagrangeSecondary(const Vector& in, Vector& out) const;
/// Transpose of LagrangeSecondary()
void LagrangeSecondaryTranspose(const Vector& in, Vector& out) const;
- /// Return \f$ -B_s^{-1} B_p \f$ explicitly assembled in mat
+ /// Return $ -B_s^{-1} B_p $ explicitly assembled in mat
void ExplicitAssembly(DenseMatrix& mat) const;
private:
@@ -179,8 +179,8 @@ public:
Some day we may also want to try approximate variants. */
SparseMatrix * AssembleExact() const;
- /** Given Lagrange multiplier right-hand-side \f$ g \f$, return
- \f$ \tilde{g} \f$ */
+ /** Given Lagrange multiplier right-hand-side $ g $, return
+ $ \tilde{g} $ */
void BuildGTilde(const Vector& g, Vector& gtilde) const;
/** After a solve, recover the Lagrange multiplier. */
@@ -197,7 +197,7 @@ private:
/** @brief Solve constrained system by eliminating the constraint; see
ConstrainedSolver
- Solves the system with the operator \f$ P^T A P + Z_P \f$, where P is
+ Solves the system with the operator $ P^T A P + Z_P $, where P is
EliminationProjection and Z_P is the identity on the eliminated dofs. */
class EliminationSolver : public ConstrainedSolver
{
@@ -484,11 +484,11 @@ private:
operators are assembled HypreParMatrix objects.)
This uses a block-diagonal preconditioner that approximates
- \f$ [ A^{-1} 0; 0 (B A^{-1} B^T)^{-1} ] \f$.
+ $ [ A^{-1} 0; 0 (B A^{-1} B^T)^{-1} ] $.
- In the top-left block, we approximate \f$ A^{-1} \f$ with HypreBoomerAMG.
- In the bottom-right, we approximate \f$ A^{-1} \f$ with the inverse of the
- diagonal of \f$ A \f$, assemble \f$ B diag(A)^{-1} B^T \f$, and use
+ In the top-left block, we approximate $ A^{-1} $ with HypreBoomerAMG.
+ In the bottom-right, we approximate $ A^{-1} $ with the inverse of the
+ diagonal of $ A $, assemble $ B diag(A)^{-1} B^T $, and use
HypreBoomerAMG on that assembled matrix. */
class SchurConstrainedHypreSolver : public SchurConstrainedSolver
{
diff --git a/linalg/cpardiso.hpp b/linalg/cpardiso.hpp
index 59eb12c12e..219499db9a 100644
--- a/linalg/cpardiso.hpp
+++ b/linalg/cpardiso.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/densemat.cpp b/linalg/densemat.cpp
index 86391f2397..d7350aa0aa 100644
--- a/linalg/densemat.cpp
+++ b/linalg/densemat.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/densemat.hpp b/linalg/densemat.hpp
index d1f0472950..9da8a221bd 100644
--- a/linalg/densemat.hpp
+++ b/linalg/densemat.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/dinvariants.hpp b/linalg/dinvariants.hpp
index 43285e4239..a60156cd46 100644
--- a/linalg/dinvariants.hpp
+++ b/linalg/dinvariants.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/dtensor.hpp b/linalg/dtensor.hpp
index 89735d7f50..298fceac8a 100644
--- a/linalg/dtensor.hpp
+++ b/linalg/dtensor.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/dual.hpp b/linalg/dual.hpp
index 87e59a6c70..967fe32602 100644
--- a/linalg/dual.hpp
+++ b/linalg/dual.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/ginkgo.cpp b/linalg/ginkgo.cpp
index bcfe720b74..0361e2fc7c 100644
--- a/linalg/ginkgo.cpp
+++ b/linalg/ginkgo.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/ginkgo.hpp b/linalg/ginkgo.hpp
index c99d315e0c..42b2ff2455 100644
--- a/linalg/ginkgo.hpp
+++ b/linalg/ginkgo.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/handle.cpp b/linalg/handle.cpp
index fa84b17933..283e667162 100644
--- a/linalg/handle.cpp
+++ b/linalg/handle.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/handle.hpp b/linalg/handle.hpp
index 818294985b..5c77176a1e 100644
--- a/linalg/handle.hpp
+++ b/linalg/handle.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/hiop.cpp b/linalg/hiop.cpp
index 411d91dde7..b4e828e678 100644
--- a/linalg/hiop.cpp
+++ b/linalg/hiop.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/hiop.hpp b/linalg/hiop.hpp
index 476361a932..eb8829ccb7 100644
--- a/linalg/hiop.hpp
+++ b/linalg/hiop.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/hypre.cpp b/linalg/hypre.cpp
index 991ee88652..0fd16be03b 100644
--- a/linalg/hypre.cpp
+++ b/linalg/hypre.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/hypre.hpp b/linalg/hypre.hpp
index b2222923e4..8e78027131 100644
--- a/linalg/hypre.hpp
+++ b/linalg/hypre.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/hypre_parcsr.cpp b/linalg/hypre_parcsr.cpp
index f1cdff4dac..2756576804 100644
--- a/linalg/hypre_parcsr.cpp
+++ b/linalg/hypre_parcsr.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/hypre_parcsr.hpp b/linalg/hypre_parcsr.hpp
index d113711fac..3f428ecaa6 100644
--- a/linalg/hypre_parcsr.hpp
+++ b/linalg/hypre_parcsr.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/invariants.hpp b/linalg/invariants.hpp
index b1f6b6059a..329cb8ce30 100644
--- a/linalg/invariants.hpp
+++ b/linalg/invariants.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/kernels.hpp b/linalg/kernels.hpp
index 62230548e0..99b71dcdc1 100644
--- a/linalg/kernels.hpp
+++ b/linalg/kernels.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/linalg.hpp b/linalg/linalg.hpp
index 320a1b88ce..c78bc391a1 100644
--- a/linalg/linalg.hpp
+++ b/linalg/linalg.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/matrix.cpp b/linalg/matrix.cpp
index 638ad80615..a49c6e34cc 100644
--- a/linalg/matrix.cpp
+++ b/linalg/matrix.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/matrix.hpp b/linalg/matrix.hpp
index e6cbb2cabc..b5ea78f5c7 100644
--- a/linalg/matrix.hpp
+++ b/linalg/matrix.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/mumps.cpp b/linalg/mumps.cpp
index 6efb98e3e5..785b855c00 100644
--- a/linalg/mumps.cpp
+++ b/linalg/mumps.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/mumps.hpp b/linalg/mumps.hpp
index 9fef9a2928..fb73080ebf 100644
--- a/linalg/mumps.hpp
+++ b/linalg/mumps.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence 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,22 +34,35 @@ namespace mfem
class MUMPSSolver : public Solver
{
public:
+ /// Specify the type of matrix we are applying the solver to
enum MatType
{
+ /// General sparse matrix, no symmetry is assumed
UNSYMMETRIC = 0,
+ /// A sparse symmetric positive definite matrix
SYMMETRIC_POSITIVE_DEFINITE = 1,
+ /// A sparse symmetric matrix that is not necessarily positive definite
SYMMETRIC_INDEFINITE = 2
};
+ /// Specify the reordering strategy for the MUMPS solver
enum ReorderingStrategy
{
+ /// Let MUMPS automatically decide the reording strategy
AUTOMATIC = 0,
+ /// Approximate Minimum Degree with auto quasi-dense row detection is used
AMD,
+ /// Approximate Minimum Fill method will be used
AMF,
+ /// The PORD library will be used
PORD,
+ /// The METIS library will be used
METIS,
+ /// The ParMETIS library will be used
PARMETIS,
+ /// The Scotch library will be used
SCOTCH,
+ /// The PTScotch library will be used
PTSCOTCH
};
@@ -73,28 +86,49 @@ public:
void SetOperator(const Operator &op);
/**
- * @brief Solve y = Op^{-1} x.
+ * @brief Solve $ y = Op^{-1} x $
*
* @param x RHS vector
* @param y Solution vector
*/
void Mult(const Vector &x, Vector &y) const;
+
+ /**
+ * @brief Solve $ Y_i = Op^{-T} X_i $
+ *
+ * @param X Array of RHS vectors
+ * @param Y Array of Solution vectors
+ */
void ArrayMult(const Array &X, Array &Y) const;
/**
- * @brief Transpose Solve y = Op^{-T} x.
+ * @brief Transpose Solve $ y = Op^{-T} x $
*
* @param x RHS vector
* @param y Solution vector
*/
void MultTranspose(const Vector &x, Vector &y) const;
+
+ /**
+ * @brief Transpose Solve $ Y_i = Op^{-T} X_i $
+ *
+ * @param X Array of RHS vectors
+ * @param Y Array of Solution vectors
+ */
void ArrayMultTranspose(const Array &X,
Array &Y) const;
/**
* @brief Set the error print level for MUMPS
*
- * @param print_lvl Print level
+ * Supported values are:
+ * - 0: No output printed
+ * - 1: Only errors printed
+ * - 2: Errors, warnings, and main stats printed
+ * - 3: Errors, warning, main stats, and terse diagnostics printed
+ * - 4: Errors, warning, main stats, diagnostics, and input/output printed
+ *
+ * @param print_lvl Print level, default is 2
*
* @note This method has to be called before SetOperator
*/
@@ -103,8 +137,9 @@ public:
/**
* @brief Set the matrix type
*
- * Supported matrix types: General, symmetric indefinite and
- * symmetric positive definite
+ * Supported matrix types: MUMPSSolver::UNSYMMETRIC,
+ * MUMPSSolver::SYMMETRIC_POSITIVE_DEFINITE,
+ * and MUMPSSolver::SYMMETRIC_INDEFINITE
*
* @param mtype Matrix type
*
@@ -115,8 +150,10 @@ public:
/**
* @brief Set the reordering strategy
*
- * Supported reorderings are: AUTOMATIC, AMD, AMF, PORD, METIS, PARMETIS,
- * SCOTCH, and PTSCOTCH
+ * Supported reorderings are: MUMPSSolver::AUTOMATIC,
+ * MUMPSSolver::AMD, MUMPSSolver::AMF, MUMPSSolver::PORD,
+ * MUMPSSolver::METIS, MUMPSSolver::PARMETIS,
+ * MUMPSSolver::SCOTCH, and MUMPSSolver::PTSCOTCH
*
* @param method Reordering method
*
@@ -183,14 +220,14 @@ private:
// MUMPS object
DMUMPS_STRUC_C *id;
- // Method for initialization
+ /// Method for initialization
void Init(MPI_Comm comm_);
- // Method for setting MUMPS internal parameters
+ /// Method for setting MUMPS internal parameters
void SetParameters();
- // Method for configuring storage for distributed/centralized RHS and
- // solution
+ /// Method for configuring storage for distributed/centralized RHS and
+ /// solution
void InitRhsSol(int nrhs) const;
#if MFEM_MUMPS_VERSION >= 530
diff --git a/linalg/ode.cpp b/linalg/ode.cpp
index 39c31ed57e..1aac7356a0 100644
--- a/linalg/ode.cpp
+++ b/linalg/ode.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/ode.hpp b/linalg/ode.hpp
index 475a8468ec..f0ffee83fa 100644
--- a/linalg/ode.hpp
+++ b/linalg/ode.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/operator.cpp b/linalg/operator.cpp
index 1f214ece7a..3fd4d64f97 100644
--- a/linalg/operator.cpp
+++ b/linalg/operator.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -365,6 +365,44 @@ void SecondOrderTimeDependentOperator::ImplicitSolve(const double dt0,
mfem_error("SecondOrderTimeDependentOperator::ImplicitSolve() is not overridden!");
}
+SumOperator::SumOperator(const Operator *A, const double alpha,
+ const Operator *B, const double beta,
+ bool ownA, bool ownB)
+ : Operator(A->Height(), A->Width()),
+ A(A), B(B), alpha(alpha), beta(beta), ownA(ownA), ownB(ownB),
+ z(A->Height())
+{
+ MFEM_VERIFY(A->Width() == B->Width(),
+ "incompatible Operators: different widths\n"
+ << "A->Width() = " << A->Width()
+ << ", B->Width() = " << B->Width() );
+ MFEM_VERIFY(A->Height() == B->Height(),
+ "incompatible Operators: different heights\n"
+ << "A->Height() = " << A->Height()
+ << ", B->Height() = " << B->Height() );
+
+ {
+ const Solver* SolverA = dynamic_cast(A);
+ const Solver* SolverB = dynamic_cast(B);
+ if (SolverA)
+ {
+ MFEM_VERIFY(!(SolverA->iterative_mode),
+ "Operator A of a SumOperator should not be in iterative mode");
+ }
+ if (SolverB)
+ {
+ MFEM_VERIFY(!(SolverB->iterative_mode),
+ "Operator B of a SumOperator should not be in iterative mode");
+ }
+ }
+
+}
+
+SumOperator::~SumOperator()
+{
+ if (ownA) { delete A; }
+ if (ownB) { delete B; }
+}
ProductOperator::ProductOperator(const Operator *A, const Operator *B,
bool ownA, bool ownB)
@@ -481,7 +519,8 @@ ConstrainedOperator::ConstrainedOperator(Operator *A, const Array &list,
MemoryType mem_type = GetMemoryType(mem_class);
list.Read(); // TODO: just ensure 'list' is registered, no need to copy it
constraint_list.MakeRef(list);
- // typically z and w are large vectors, so store them on the device
+ // typically z and w are large vectors, so use the device (GPU) to perform
+ // operations on them
z.SetSize(height, mem_type); z.UseDevice(true);
w.SetSize(height, mem_type); w.UseDevice(true);
}
@@ -544,12 +583,20 @@ void ConstrainedOperator::EliminateRHS(const Vector &x, Vector &b) const
});
}
-void ConstrainedOperator::Mult(const Vector &x, Vector &y) const
+void ConstrainedOperator::ConstrainedMult(const Vector &x, Vector &y,
+ const bool transpose) const
{
const int csz = constraint_list.Size();
if (csz == 0)
{
- A->Mult(x, y);
+ if (transpose)
+ {
+ A->MultTranspose(x, y);
+ }
+ else
+ {
+ A->Mult(x, y);
+ }
return;
}
@@ -560,7 +607,14 @@ void ConstrainedOperator::Mult(const Vector &x, Vector &y) const
auto d_z = z.ReadWrite();
mfem::forall(csz, [=] MFEM_HOST_DEVICE (int i) { d_z[idx[i]] = 0.0; });
- A->Mult(z, y);
+ if (transpose)
+ {
+ A->MultTranspose(z, y);
+ }
+ else
+ {
+ A->Mult(z, y);
+ }
auto d_x = x.Read();
// Use read+write access - we are modifying sub-vector of y
@@ -591,6 +645,25 @@ void ConstrainedOperator::Mult(const Vector &x, Vector &y) const
}
}
+void ConstrainedOperator::Mult(const Vector &x, Vector &y) const
+{
+ constexpr bool transpose = false;
+ ConstrainedMult(x, y, transpose);
+}
+
+void ConstrainedOperator::MultTranspose(const Vector &x, Vector &y) const
+{
+ constexpr bool transpose = true;
+ ConstrainedMult(x, y, transpose);
+}
+
+void ConstrainedOperator::AddMult(const Vector &x, Vector &y,
+ const double a) const
+{
+ Mult(x, w);
+ y.Add(a, w);
+}
+
RectangularConstrainedOperator::RectangularConstrainedOperator(
Operator *A,
const Array &trial_list,
@@ -625,9 +698,7 @@ void RectangularConstrainedOperator::EliminateRHS(const Vector &x,
d_w[id] = d_x[id];
});
- // A.AddMult(w, b, -1.0); // if available to all Operators
- A->Mult(w, z);
- b -= z;
+ A->AddMult(w, b, -1.0);
const int test_csz = test_constraints.Size();
auto test_idx = test_constraints.Read();
diff --git a/linalg/operator.hpp b/linalg/operator.hpp
index baa9bf7672..aba74453ba 100644
--- a/linalg/operator.hpp
+++ b/linalg/operator.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -435,11 +435,11 @@ public:
details, see the PETSc Manual. */
virtual Operator& GetExplicitGradient(const Vector &x) const;
- /** @brief Setup the ODE linear system \f$ A(x,t) = (I - gamma J) \f$ or
- \f$ A = (M - gamma J) \f$, where \f$ J(x,t) = \frac{df}{dt(x,t)} \f$.
+ /** @brief Setup the ODE linear system $ A(x,t) = (I - gamma J) $ or
+ $ A = (M - gamma J) $, where $ J(x,t) = \frac{df}{dt(x,t)} $.
- @param[in] x The state at which \f$A(x,t)\f$ should be evaluated.
- @param[in] fx The current value of the ODE rhs function, \f$f(x,t)\f$.
+ @param[in] x The state at which $A(x,t)$ should be evaluated.
+ @param[in] fx The current value of the ODE rhs function, $f(x,t)$.
@param[in] jok Flag indicating if the Jacobian should be updated.
@param[out] jcur Flag to signal if the Jacobian was updated.
@param[in] gamma The scaled time step value.
@@ -451,7 +451,7 @@ public:
virtual int SUNImplicitSetup(const Vector &x, const Vector &fx,
int jok, int *jcur, double gamma);
- /** @brief Solve the ODE linear system \f$ A x = b \f$ as setup by
+ /** @brief Solve the ODE linear system $ A x = b $ as setup by
the method SUNImplicitSetup().
@param[in] b The linear system right-hand side.
@@ -464,7 +464,7 @@ public:
details, see the SUNDIALS User Guides. */
virtual int SUNImplicitSolve(const Vector &b, Vector &x, double tol);
- /** @brief Setup the mass matrix in the ODE system \f$ M y' = f(y,t) \f$ .
+ /** @brief Setup the mass matrix in the ODE system $ M y' = f(y,t) $ .
If not re-implemented, this method simply generates an error.
@@ -472,7 +472,7 @@ public:
details, see the ARKode User Guide. */
virtual int SUNMassSetup();
- /** @brief Solve the mass matrix linear system \f$ M x = b \f$
+ /** @brief Solve the mass matrix linear system $ M x = b $
as setup by the method SUNMassSetup().
@param[in] b The linear system right-hand side.
@@ -485,7 +485,7 @@ public:
details, see the ARKode User Guide. */
virtual int SUNMassSolve(const Vector &b, Vector &x, double tol);
- /** @brief Compute the mass matrix-vector product \f$ v = M x \f$ .
+ /** @brief Compute the mass matrix-vector product $ v = M x $ .
@param[in] x The vector to multiply.
@param[out] v The result of the matrix-vector product.
@@ -574,13 +574,13 @@ public:
virtual void QuadratureSensitivityMult(const Vector &y, const Vector &yB,
Vector &qBdot) const {}
- /** @brief Setup the ODE linear system \f$ A(x,t) = (I - gamma J) \f$ or
- \f$ A = (M - gamma J) \f$, where \f$ J(x,t) = \frac{df}{dt(x,t)} \f$.
+ /** @brief Setup the ODE linear system $ A(x,t) = (I - gamma J) $ or
+ $ A = (M - gamma J) $, where $ J(x,t) = \frac{df}{dt(x,t)} $.
@param[in] t The current time
- @param[in] x The state at which \f$A(x,xB,t)\f$ should be evaluated.
- @param[in] xB The state at which \f$A(x,xB,t)\f$ should be evaluated.
- @param[in] fxB The current value of the ODE rhs function, \f$f(x,t)\f$.
+ @param[in] x The state at which $A(x,xB,t)$ should be evaluated.
+ @param[in] xB The state at which $A(x,xB,t)$ should be evaluated.
+ @param[in] fxB The current value of the ODE rhs function, $f(x,t)$.
@param[in] jokB Flag indicating if the Jacobian should be updated.
@param[out] jcurB Flag to signal if the Jacobian was updated.
@param[in] gammaB The scaled time step value.
@@ -599,7 +599,7 @@ public:
return (-1);
}
- /** @brief Solve the ODE linear system \f$ A(x,xB,t) xB = b \f$ as setup by
+ /** @brief Solve the ODE linear system $ A(x,xB,t) xB = b $ as setup by
the method SUNImplicitSetup().
@param[in] b The linear system right-hand side.
@@ -769,6 +769,28 @@ public:
{ A.Mult(x, y); }
};
+/// General linear combination operator: x -> a A(x) + b B(x).
+class SumOperator : public Operator
+{
+ const Operator *A, *B;
+ const double alpha, beta;
+ bool ownA, ownB;
+ mutable Vector z;
+
+public:
+ SumOperator(
+ const Operator *A, const double alpha,
+ const Operator *B, const double beta,
+ bool ownA, bool ownB);
+
+ virtual void Mult(const Vector &x, Vector &y) const
+ { z.SetSize(A->Height()); A->Mult(x, z); B->Mult(x, y); add(alpha, z, beta, y, y); }
+
+ virtual void MultTranspose(const Vector &x, Vector &y) const
+ { z.SetSize(A->Width()); A->MultTranspose(x, z); B->MultTranspose(x, y); add(alpha, z, beta, y, y); }
+
+ virtual ~SumOperator();
+};
/// General product operator: x -> (A*B)(x) = A(B(x)).
class ProductOperator : public Operator
@@ -892,14 +914,14 @@ public:
DiagonalPolicy diag_policy = DIAG_ONE);
/// Returns the type of memory in which the solution and temporaries are stored.
- virtual MemoryClass GetMemoryClass() const { return mem_class; }
+ MemoryClass GetMemoryClass() const override { return mem_class; }
/// Set the diagonal policy for the constrained operator.
void SetDiagonalPolicy(const DiagonalPolicy diag_policy_)
{ diag_policy = diag_policy_; }
/// Diagonal of A, modified according to the used DiagonalPolicy.
- virtual void AssembleDiagonal(Vector &diag) const;
+ void AssembleDiagonal(Vector &diag) const override;
/** @brief Eliminate "essential boundary condition" values specified in @a x
from the given right-hand side @a b.
@@ -922,10 +944,19 @@ public:
where the "_b" subscripts denote the essential (boundary) indices/dofs of
the vectors, and "_i" -- the rest of the entries. */
- virtual void Mult(const Vector &x, Vector &y) const;
+ void Mult(const Vector &x, Vector &y) const override;
+
+ void AddMult(const Vector &x, Vector &y, const double a = 1.0) const override;
+
+ void MultTranspose(const Vector &x, Vector &y) const override;
+
+ /** @brief Implementation of Mult or MultTranspose.
+ * TODO - Generalize to allow constraining rows and columns differently.
+ */
+ void ConstrainedMult(const Vector &x, Vector &y, const bool transpose) const;
/// Destructor: destroys the unconstrained Operator, if owned.
- virtual ~ConstrainedOperator() { if (own_A) { delete A; } }
+ ~ConstrainedOperator() override { if (own_A) { delete A; } }
};
/** @brief Rectangular Operator for imposing essential boundary conditions on
diff --git a/linalg/pardiso.cpp b/linalg/pardiso.cpp
index 6053da722b..75c3813f88 100644
--- a/linalg/pardiso.cpp
+++ b/linalg/pardiso.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/pardiso.hpp b/linalg/pardiso.hpp
index 0f1871f44e..c92b67944b 100644
--- a/linalg/pardiso.hpp
+++ b/linalg/pardiso.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/petsc.cpp b/linalg/petsc.cpp
index 7f67d270be..d2ddc3224f 100644
--- a/linalg/petsc.cpp
+++ b/linalg/petsc.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/petsc.hpp b/linalg/petsc.hpp
index 18cf6ba1cd..9d960910c8 100644
--- a/linalg/petsc.hpp
+++ b/linalg/petsc.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/petscinternals.hpp b/linalg/petscinternals.hpp
index 6a2b34b0ee..3a2b13aec3 100644
--- a/linalg/petscinternals.hpp
+++ b/linalg/petscinternals.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd.hpp b/linalg/simd.hpp
index a5f0e0ab0d..858f4e7b23 100644
--- a/linalg/simd.hpp
+++ b/linalg/simd.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd/auto.hpp b/linalg/simd/auto.hpp
index 89ecc8176d..2dd1d5fc0c 100644
--- a/linalg/simd/auto.hpp
+++ b/linalg/simd/auto.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd/m128.hpp b/linalg/simd/m128.hpp
index d6b7473a1d..c19e321d1d 100644
--- a/linalg/simd/m128.hpp
+++ b/linalg/simd/m128.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd/m256.hpp b/linalg/simd/m256.hpp
index 887ddc0663..469f9347f3 100644
--- a/linalg/simd/m256.hpp
+++ b/linalg/simd/m256.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd/m512.hpp b/linalg/simd/m512.hpp
index 3253bfb12b..f6736dc982 100644
--- a/linalg/simd/m512.hpp
+++ b/linalg/simd/m512.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd/qpx.hpp b/linalg/simd/qpx.hpp
index 4e0932b777..9c03f6c5d6 100644
--- a/linalg/simd/qpx.hpp
+++ b/linalg/simd/qpx.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd/qpx256.hpp b/linalg/simd/qpx256.hpp
index 65679ddc9b..18f21ef528 100644
--- a/linalg/simd/qpx256.hpp
+++ b/linalg/simd/qpx256.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd/sve.hpp b/linalg/simd/sve.hpp
index 0a4b7fec96..cb1722eb20 100644
--- a/linalg/simd/sve.hpp
+++ b/linalg/simd/sve.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd/vsx.hpp b/linalg/simd/vsx.hpp
index 361b12cb82..9433db3336 100644
--- a/linalg/simd/vsx.hpp
+++ b/linalg/simd/vsx.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd/vsx128.hpp b/linalg/simd/vsx128.hpp
index 693eefaa80..7112d05312 100644
--- a/linalg/simd/vsx128.hpp
+++ b/linalg/simd/vsx128.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/simd/x86.hpp b/linalg/simd/x86.hpp
index d023c0170c..43771ab03a 100644
--- a/linalg/simd/x86.hpp
+++ b/linalg/simd/x86.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/slepc.cpp b/linalg/slepc.cpp
index 122b32ab7c..ed9c2769e2 100644
--- a/linalg/slepc.cpp
+++ b/linalg/slepc.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/slepc.hpp b/linalg/slepc.hpp
index 63b9e748d0..329472b8e9 100644
--- a/linalg/slepc.hpp
+++ b/linalg/slepc.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -51,16 +51,24 @@ public:
virtual ~SlepcEigenSolver();
- /// Set solver tolerance
+ /** @brief Set solver convergence tolerance relative to the magnitude of the
+ eigenvalue.
+
+ @note Default value is 1e-8
+ */
void SetTol(double tol);
- /// Set maximum number of iterations
+ /** @brief Set maximum number of iterations allowed in the call to
+ SlepcEigenSolver::Solve */
void SetMaxIter(int max_iter);
- /// Set the number of required eigenmodes
+
+ /// Set the number of eigenmodes to compute
void SetNumModes(int num_eigs);
+
/// Set operator for standard eigenvalue problem
void SetOperator(const PetscParMatrix &op);
- /// Set operator for generalized eigenvalue problem
+
+ /// Set operators for generalized eigenvalue problem
void SetOperators(const PetscParMatrix &op, const PetscParMatrix &opB);
/// Customize object with options set
@@ -69,39 +77,105 @@ public:
/// Solve the eigenvalue problem for the specified number of eigenvalues
void Solve();
- /// Get the number of converged eigenvalues
+ /** @brief Get the number of converged eigenvalues after the call to
+ SlepcEigenSolver::Solve */
int GetNumConverged();
- /// Get the corresponding eigenvalue
+ /** @brief Get the ith eigenvalue after the system has been solved
+ @param[in] i The index for the eigenvalue you want ordered by
+ SlepcEigenSolver::SetWhichEigenpairs
+ @param[out] lr The real component of the eigenvalue
+ @note the index @a i must be between 0 and
+ SlepcEigenSolver::GetNumConverged - 1
+ */
void GetEigenvalue(unsigned int i, double & lr) const;
+
+ /** @brief Get the ith eigenvalue after the system has been solved
+ @param[in] i The index for the eigenvalue you want ordered by
+ SlepcEigenSolver::SetWhichEigenpairs
+ @param[out] lr The real component of the eigenvalue
+ @param[out] lc The imaginary component of the eigenvalue
+ @note the index @a i must be between 0 and
+ SlepcEigenSolver::GetNumConverged - 1
+ */
void GetEigenvalue(unsigned int i, double & lr, double & lc) const;
- /// Get the corresponding eigenvector
+ /** @brief Get the ith eigenvector after the system has been solved
+ @param[in] i The index for the eigenvector you want ordered by
+ SlepcEigenSolver::SetWhichEigenpairs
+ @param[out] vr The real components of the eigenvector
+ @note the index @a i must be between 0 and
+ SlepcEigenSolver::GetNumConverged - 1
+ */
void GetEigenvector(unsigned int i, Vector & vr) const;
+
+ /** @brief Get the ith eigenvector after the system has been solved
+ @param[in] i The index for the eigenvector you want ordered by
+ SlepcEigenSolver::SetWhichEigenpairs
+ @param[out] vr The real components of the eigenvector
+ @param[out] vc The imaginary components of the eigenvector
+ @note the index @a i must be between 0 and
+ SlepcEigenSolver::GetNumConverged - 1
+ */
void GetEigenvector(unsigned int i, Vector & vr, Vector & vc) const;
- /// Target spectrum for the eigensolver. Target imaginary is not supported
- /// without complex support in SLEPc, and intervals are not implemented.
+ /** @brief Target spectrum for the eigensolver.
+
+ This will define the order in which the eigenvalues/eigenvectors are
+ indexed after the call to SlepcEigenSolver::Solve.
+ @note Target imaginary is not supported without complex support in SLEPc,
+ and intervals are not implemented.
+ */
enum Which
{
+ /// The eigenvalues with the largest complex magnitude (default)
LARGEST_MAGNITUDE,
+ /// The eigenvalues with the smallest complex magnitude
SMALLEST_MAGNITUDE,
+ /// The eigenvalues with the largest real component
LARGEST_REAL,
+ /// The eigenvalues with the smallest real component
SMALLEST_REAL,
+ /// The eigenvalues with the largest imaginary component
LARGEST_IMAGINARY,
+ /// The eigenvalues with the smallest imaginary component
SMALLEST_IMAGINARY,
+ /// The eigenvalues with complex magnitude closest to the target value
TARGET_MAGNITUDE,
+ /// The eigenvalues with the real component closest to the target value
TARGET_REAL
};
+ /** @brief Spectral transformations that can be used by the solver in order
+ to accelerate the convergence to the target eignevalues
+ */
enum SpectralTransformation
{
+ /// Utilize the shift of origin strategy
SHIFT,
+ /// Utilize the shift and invert strategy
SHIFT_INVERT
};
+ /** @brief Set the which eigenvalues the solver will target and the order
+ they will be indexed in.
+
+ For SlepcEigenSolver::TARGET_MAGNITUDE or SlepcEigenSolver::TARGET_REAL
+ you will also need to set the target value with
+ SlepcEigenSolver::SetTarget.
+ */
void SetWhichEigenpairs(Which which);
+
+ /** @brief Set the target value for the eigenpairs you want when using
+ SlepcEigenSolver::TARGET_MAGNITUDE or SlepcEigenSolver::TARGET_REAL in
+ the SlepcEigenSolver::SetWhichEigenpairs method.
+ */
void SetTarget(double target);
+
+ /** @brief Set the spectral transformation strategy for acceletating
+ convergenvce. Both SlepcEigenSolver::SHIFT and
+ SlepcEigenSolver::SHIFT_INVERT are available.
+ */
void SetSpectralTransformation(SpectralTransformation transformation);
/// Conversion function to SLEPc's EPS type.
diff --git a/linalg/solvers.cpp b/linalg/solvers.cpp
index 810e36e9f5..ba0af7e91f 100644
--- a/linalg/solvers.cpp
+++ b/linalg/solvers.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/solvers.hpp b/linalg/solvers.hpp
index d951476bf3..c5b5f98b4d 100644
--- a/linalg/solvers.hpp
+++ b/linalg/solvers.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -106,7 +106,8 @@ public:
PrintLevel &Iterations() { iterations=true; return *this; }
PrintLevel &FirstAndLast() { first_and_last=true; return *this; }
PrintLevel &Summary() { summary=true; return *this; }
- PrintLevel &All() { return Warnings().Errors().Iterations().FirstAndLast().Summary(); }
+ PrintLevel &All()
+ { return Warnings().Errors().Iterations().FirstAndLast().Summary(); }
///@}
};
@@ -168,8 +169,13 @@ protected:
///@}
+ /// Return the dot product of @a x and @a y
double Dot(const Vector &x, const Vector &y) const;
+
+ /// Return the 2-norm of @a x
double Norm(const Vector &x) const { return sqrt(Dot(x, x)); }
+
+ /// Monitor both the residual @a r and the solution @a x
void Monitor(int it, double norm, const Vector& r, const Vector& x,
bool final=false) const;
@@ -186,11 +192,11 @@ public:
@details While the convergence criterion is solver specific, most of the
provided iterative solvers use one of the following criteria
- \f$ ||r||_X \leq tol_{rel}||r_0||_X \f$,
+ $ ||r||_X \leq tol_{rel}||r_0||_X $,
- \f$ ||r||_X \leq tol_{abs} \f$,
+ $ ||r||_X \leq tol_{abs} $,
- \f$ ||r||_X \leq \max\{ tol_{abs}, tol_{rel} ||r_0||_X \} \f$,
+ $ ||r||_X \leq \max\{ tol_{abs}, tol_{rel} ||r_0||_X \} $,
where X denotes the space in which the norm is measured. The choice of
X depends on the specific iterative solver.
@@ -338,7 +344,11 @@ public:
/// Replace diagonal entries with their absolute values.
void SetPositiveDiagonal(bool pos_diag = true) { use_abs_diag = pos_diag; }
+ /// Approach the solution of the linear system by applying Jacobi smoothing.
void Mult(const Vector &x, Vector &y) const;
+
+ /** @brief Approach the solution of the transposed linear system by applying
+ Jacobi smoothing. */
void MultTranspose(const Vector &x, Vector &y) const { Mult(x, y); }
/** @brief Recompute the diagonal using the method AssembleDiagonal of the
@@ -432,8 +442,12 @@ public:
~OperatorChebyshevSmoother() {}
+ /** @brief Approach the solution of the linear system by applying Chebyshev
+ smoothing. */
void Mult(const Vector &x, Vector &y) const;
+ /** @brief Approach the solution of the transposed linear system by applying
+ Chebyshev smoothing. */
void MultTranspose(const Vector &x, Vector &y) const { Mult(x, y); }
void SetOperator(const Operator &op_)
@@ -475,6 +489,7 @@ public:
virtual void SetOperator(const Operator &op)
{ IterativeSolver::SetOperator(op); UpdateVectors(); }
+ /// Iterative solution of the linear system using Stationary Linear Iteration
virtual void Mult(const Vector &b, Vector &x) const;
};
@@ -507,6 +522,8 @@ public:
virtual void SetOperator(const Operator &op)
{ IterativeSolver::SetOperator(op); UpdateVectors(); }
+ /** @brief Iterative solution of the linear system using the Conjugate
+ Gradient method. */
virtual void Mult(const Vector &b, Vector &x) const;
};
@@ -537,6 +554,7 @@ public:
/// Set the number of iteration to perform between restarts, default is 50.
void SetKDim(int dim) { m = dim; }
+ /// Iterative solution of the linear system using the GMRES method
virtual void Mult(const Vector &b, Vector &x) const;
};
@@ -555,6 +573,7 @@ public:
void SetKDim(int dim) { m = dim; }
+ /// Iterative solution of the linear system using the FGMRES method.
virtual void Mult(const Vector &b, Vector &x) const;
};
@@ -586,6 +605,7 @@ public:
virtual void SetOperator(const Operator &op)
{ IterativeSolver::SetOperator(op); UpdateVectors(); }
+ /// Iterative solution of the linear system using the BiCGSTAB method
virtual void Mult(const Vector &b, Vector &x) const;
};
@@ -621,6 +641,7 @@ public:
virtual void SetOperator(const Operator &op);
+ /// Iterative solution of the linear system using the MINRES method
virtual void Mult(const Vector &b, Vector &x) const;
};
@@ -1101,7 +1122,10 @@ public:
/// Set the print level field in the #Control data member.
void SetPrintLevel(int print_lvl) { Control[UMFPACK_PRL] = print_lvl; }
+ /// Direct solution of the linear system using UMFPACK
virtual void Mult(const Vector &b, Vector &x) const;
+
+ /// Direct solution of the transposed linear system using UMFPACK
virtual void MultTranspose(const Vector &b, Vector &x) const;
virtual ~UMFPackSolver();
@@ -1128,7 +1152,10 @@ public:
// Works on sparse matrices only; calls SparseMatrix::SortColumnIndices().
virtual void SetOperator(const Operator &op);
+ /// Direct solution of the linear system using KLU
virtual void Mult(const Vector &b, Vector &x) const;
+
+ /// Direct solution of the transposed linear system using KLU
virtual void MultTranspose(const Vector &b, Vector &x) const;
virtual ~KLUSolver();
@@ -1150,6 +1177,8 @@ public:
/// block_dof is a boolean matrix, block_dof(i, j) = 1 if j-th dof belongs to
/// i-th block, block_dof(i, j) = 0 otherwise.
DirectSubBlockSolver(const SparseMatrix& A, const SparseMatrix& block_dof);
+
+ /// Direct solution of the block diagonal linear system
virtual void Mult(const Vector &x, Vector &y) const;
virtual void SetOperator(const Operator &op) { }
};
@@ -1165,7 +1194,11 @@ public:
ProductSolver(Operator* A_, Solver* S0_, Solver* S1_,
bool ownA, bool ownS0, bool ownS1)
: Solver(A_->NumRows()), A(A_, ownA), S0(S0_, ownS0), S1(S1_, ownS1) { }
+
+ /// Solution of the linear system using a product of subsolvers
virtual void Mult(const Vector &x, Vector &y) const;
+
+ /// Solution of the transposed linear system using a product of subsolvers
virtual void MultTranspose(const Vector &x, Vector &y) const;
virtual void SetOperator(const Operator &op) { }
};
@@ -1238,7 +1271,8 @@ public:
AuxSpaceSmoother(const HypreParMatrix &op, HypreParMatrix *aux_map,
bool op_is_symmetric = true, bool own_aux_map = false);
virtual void Mult(const Vector &x, Vector &y) const { Mult(x, y, false); }
- virtual void MultTranspose(const Vector &x, Vector &y) const { Mult(x, y, true); }
+ virtual void MultTranspose(const Vector &x, Vector &y) const
+ { Mult(x, y, true); }
virtual void SetOperator(const Operator &op) { }
HypreSmoother& GetSmoother() { return *aux_smoother_.As(); }
using Operator::Mult;
@@ -1259,28 +1293,34 @@ public:
/// The operator must be a DenseMatrix.
void SetOperator(const Operator &op) override;
+ /** @brief Compute the non-negative least squares solution to the
+ underdetermined system. */
void Mult(const Vector &w, Vector &sol) const override;
- /**
- * Set verbosity. If set to 0: print nothing; if 1: just print results;
- * if 2: print short update on every iteration; if 3: print longer update
- * each iteration.
+ /** @brief
+ Set verbosity. If set to 0: print nothing; if 1: just print results;
+ if 2: print short update on every iteration; if 3: print longer update
+ each iteration.
*/
void SetVerbosity(int v) { verbosity_ = v; }
+ /// Set the target absolute residual norm tolerance for convergence
void SetTolerance(double tol) { const_tol_ = tol; }
/// Set the minimum number of nonzeros required for the solution.
void SetMinNNZ(int min_nnz) { min_nnz_ = min_nnz; }
- /// Set the maximum number of nonzeros required for the solution, as an early
- /// termination condition.
+ /** @brief Set the maximum number of nonzeros required for the solution, as
+ an early termination condition. */
void SetMaxNNZ(int max_nnz) { max_nnz_ = max_nnz; }
- /// Set threshold on relative change in residual over nStallCheck_ iterations.
+ /** @brief Set threshold on relative change in residual over nStallCheck_
+ iterations. */
void SetResidualChangeTolerance(double tol)
{ res_change_termination_tol_ = tol; }
+ /** @brief Set the magnitude of projected residual entries that are
+ considered zero. Increasing this value relaxes solution constraints. */
void SetZeroTolerance(double tol) { zero_tol_ = tol; }
/// Set RHS vector constant shift, defining rhs_lb and rhs_ub in Solve().
@@ -1298,7 +1338,7 @@ public:
/// Set a flag to determine whether to call NormalizeConstraints().
void SetNormalize(bool n) { normalize_ = n; }
- /**
+ /** @brief
* Enumerated types of QRresidual mode. Options are 'off': the residual is
* calculated normally, 'on': the residual is calculated using the QR
* method, 'hybrid': the residual is calculated normally until we experience
@@ -1308,7 +1348,7 @@ public:
*/
enum class QRresidualMode {off, on, hybrid};
- /**
+ /** @brief
* Set the residual calculation mode for the NNLS solver. See QRresidualMode
* enum above for details.
*/
@@ -1329,7 +1369,7 @@ public:
*/
void Solve(const Vector& rhs_lb, const Vector& rhs_ub, Vector& soln) const;
- /**
+ /** @brief
* Normalize the constraints such that the tolerances for each constraint
* (i.e. (UB - LB)/2) are equal. This seems to help the performance in most
* cases.
diff --git a/linalg/sparsemat.cpp b/linalg/sparsemat.cpp
index 6f1b0d6828..99b41042f3 100644
--- a/linalg/sparsemat.cpp
+++ b/linalg/sparsemat.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -1767,6 +1767,7 @@ void SparseMatrix::EliminateCol(int col, DiagonalPolicy dpolicy)
if (aux->Column == col)
{
aux->Value = 0.0;
+ break;
}
}
}
@@ -3293,16 +3294,35 @@ void SparseMatrix::PrintMatlab(std::ostream & os) const
{
os << "% size " << height << " " << width << "\n";
os << "% Non Zeros " << NumNonZeroElems() << "\n";
+
int i, j;
ios::fmtflags old_fmt = os.flags();
os.setf(ios::scientific);
std::streamsize old_prec = os.precision(14);
- for (i = 0; i < height; i++)
+ if (A == NULL)
{
- for (j = I[i]; j < I[i+1]; j++)
+ RowNode *nd;
+ for (i = 0; i < height; i++)
{
- os << i+1 << " " << J[j]+1 << " " << A[j] << '\n';
+ for (nd = Rows[i], j = 0; nd != NULL; nd = nd->Prev, j++)
+ {
+ os << i+1 << " " << nd->Column+1 << " " << nd->Value << '\n';
+ }
+ }
+ }
+ else
+ {
+ // HostRead forces synchronization
+ HostReadI();
+ HostReadJ();
+ HostReadData();
+ for (i = 0; i < height; i++)
+ {
+ for (j = I[i]; j < I[i+1]; j++)
+ {
+ os << i+1 << " " << J[j]+1 << " " << A[j] << '\n';
+ }
}
}
// Write a zero entry at (m,n) to make sure MATLAB doesn't shrink the matrix
@@ -3322,11 +3342,30 @@ void SparseMatrix::PrintMM(std::ostream & os) const
<< "% Generated by MFEM" << '\n';
os << height << " " << width << " " << NumNonZeroElems() << '\n';
- for (i = 0; i < height; i++)
+
+ if (A == NULL)
{
- for (j = I[i]; j < I[i+1]; j++)
+ RowNode *nd;
+ for (i = 0; i < height; i++)
{
- os << i+1 << " " << J[j]+1 << " " << A[j] << '\n';
+ for (nd = Rows[i], j = 0; nd != NULL; nd = nd->Prev, j++)
+ {
+ os << i+1 << " " << nd->Column+1 << " " << nd->Value << '\n';
+ }
+ }
+ }
+ else
+ {
+ // HostRead forces synchronization
+ HostReadI();
+ HostReadJ();
+ HostReadData();
+ for (i = 0; i < height; i++)
+ {
+ for (j = I[i]; j < I[i+1]; j++)
+ {
+ os << i+1 << " " << J[j]+1 << " " << A[j] << '\n';
+ }
}
}
os.precision(old_prec);
@@ -3341,6 +3380,10 @@ void SparseMatrix::PrintCSR(std::ostream & os) const
os << height << '\n'; // number of rows
+ // HostRead forces synchronization
+ HostReadI();
+ HostReadJ();
+ HostReadData();
for (i = 0; i <= height; i++)
{
os << I[i]+1 << '\n';
@@ -3366,6 +3409,10 @@ void SparseMatrix::PrintCSR2(std::ostream & os) const
os << height << '\n'; // number of rows
os << width << '\n'; // number of columns
+ // HostRead forces synchronization
+ HostReadI();
+ HostReadJ();
+ HostReadData();
for (i = 0; i <= height; i++)
{
os << I[i] << '\n';
diff --git a/linalg/sparsemat.hpp b/linalg/sparsemat.hpp
index bc472739f0..5b0c87fd54 100644
--- a/linalg/sparsemat.hpp
+++ b/linalg/sparsemat.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -433,9 +433,9 @@ public:
/// Compute y^t A x
double InnerProduct(const Vector &x, const Vector &y) const;
- /// For all i compute \f$ x_i = \sum_j A_{ij} \f$
+ /// For all i compute $ x_i = \sum_j A_{ij} $
void GetRowSums(Vector &x) const;
- /// For i = irow compute \f$ x_i = \sum_j | A_{i, j} | \f$
+ /// For i = irow compute $ x_i = \sum_j | A_{i, j} | $
double GetRowNorml1(int irow) const;
/// This virtual method is not supported: it always returns NULL.
@@ -530,11 +530,11 @@ public:
void DiagScale(const Vector &b, Vector &x,
double sc = 1.0, bool use_abs_diag = false) const;
- /** x1 = x0 + sc D^{-1} (b - A x0) where \f$ D_{ii} = \sum_j |A_{ij}| \f$. */
+ /** x1 = x0 + sc D^{-1} (b - A x0) where $ D_{ii} = \sum_j |A_{ij}| $. */
void Jacobi2(const Vector &b, const Vector &x0, Vector &x1,
double sc = 1.0) const;
- /** x1 = x0 + sc D^{-1} (b - A x0) where \f$ D_{ii} = \sum_j A_{ij} \f$. */
+ /** x1 = x0 + sc D^{-1} (b - A x0) where $ D_{ii} = \sum_j A_{ij} $. */
void Jacobi3(const Vector &b, const Vector &x0, Vector &x1,
double sc = 1.0) const;
@@ -650,18 +650,23 @@ public:
SparseMatrix &operator*=(double a);
/// Prints matrix to stream out.
+ /** @note The host in synchronized when the finalized matrix is on the device. */
void Print(std::ostream &out = mfem::out, int width_ = 4) const;
/// Prints matrix in matlab format.
+ /** @note The host in synchronized when the finalized matrix is on the device. */
virtual void PrintMatlab(std::ostream &out = mfem::out) const;
/// Prints matrix in Matrix Market sparse format.
+ /** @note The host in synchronized when the finalized matrix is on the device. */
void PrintMM(std::ostream &out = mfem::out) const;
/// Prints matrix to stream out in hypre_CSRMatrix format.
+ /** @note The host in synchronized when the finalized matrix is on the device. */
void PrintCSR(std::ostream &out) const;
/// Prints a sparse matrix to stream out in CSR format.
+ /** @note The host in synchronized when the finalized matrix is on the device. */
void PrintCSR2(std::ostream &out) const;
/// Print various sparse matrix statistics.
diff --git a/linalg/sparsesmoothers.cpp b/linalg/sparsesmoothers.cpp
index 5c15d41361..5ead162986 100644
--- a/linalg/sparsesmoothers.cpp
+++ b/linalg/sparsesmoothers.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/sparsesmoothers.hpp b/linalg/sparsesmoothers.hpp
index d067cecd79..0641c6b221 100644
--- a/linalg/sparsesmoothers.hpp
+++ b/linalg/sparsesmoothers.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/strumpack.cpp b/linalg/strumpack.cpp
index 270a4483a5..a6f38f9046 100644
--- a/linalg/strumpack.cpp
+++ b/linalg/strumpack.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/strumpack.hpp b/linalg/strumpack.hpp
index 42ae555c79..a03b89d707 100644
--- a/linalg/strumpack.hpp
+++ b/linalg/strumpack.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -31,30 +31,37 @@ namespace mfem
class STRUMPACKRowLocMatrix : public Operator
{
public:
- /** Creates a general parallel matrix from a local CSR matrix on each
- processor described by the I, J and data arrays. The local matrix should
- be of size (local) nrows by (global) glob_ncols. The new parallel matrix
- contains copies of all input arrays (so they can be deleted). */
+ /** @brief Creates a general parallel matrix from a local CSR matrix on each
+ processor.
+
+ The CSR matrix is described by the I, J and data arrays. The local matrix
+ should be of size (local) nrows by (global) glob_ncols. The new parallel
+ matrix contains copies of all input arrays (so they can be deleted). */
STRUMPACKRowLocMatrix(MPI_Comm comm,
int num_loc_rows, HYPRE_BigInt first_loc_row,
HYPRE_BigInt glob_nrows, HYPRE_BigInt glob_ncols,
int *I, HYPRE_BigInt *J, double *data,
bool sym_sparse = false);
- /** Creates a copy of the parallel matrix hypParMat in STRUMPACK's RowLoc
- format. All data is copied so the original matrix may be deleted. */
+ /** @brief Creates a copy of the parallel matrix hypParMat in STRUMPACK's
+ RowLoc format.
+
+ All data is copied so the original matrix may be deleted. */
STRUMPACKRowLocMatrix(const Operator &op, bool sym_sparse = false);
~STRUMPACKRowLocMatrix();
+ /// Matrix vector products are not supported for this type of matrix.
void Mult(const Vector &x, Vector &y) const
{
MFEM_ABORT("STRUMPACKRowLocMatrix::Mult: Matrix vector products are not "
"supported!");
}
+ /// Get the MPI Comm being used by the parallel matrix.
MPI_Comm GetComm() const { return A_->comm(); }
+ /// Get access to the internal CSR matrix.
strumpack::CSRMatrixMPI *GetA() const { return A_; }
private:
@@ -66,52 +73,80 @@ private:
The mfem::STRUMPACKSolver class uses the STRUMPACK library to perform LU
factorization of a parallel sparse matrix. The solver is capable of handling
double precision types. See
- http://portal.nersc.gov/project/sparse/strumpack/.
-*/
+ http://portal.nersc.gov/project/sparse/strumpack/. */
template
class STRUMPACKSolverBase : public Solver
{
protected:
- // Constructor with MPI_Comm parameter and command line arguments.
+ /** @brief Constructor with MPI_Comm parameter and command line arguments.
+
+ STRUMPACKSolverBase::SetFromCommandLine must be called for the command
+ line arguments to be used. */
STRUMPACKSolverBase(MPI_Comm comm, int argc, char *argv[]);
- // Constructor with STRUMPACK matrix object and command line arguments.
+ /** @brief Constructor with STRUMPACK matrix object and command line
+ arguments.
+
+ STRUMPACKSolverBase::SetFromCommandLine must be called for the command
+ line arguments to be used. */
STRUMPACKSolverBase(STRUMPACKRowLocMatrix &A, int argc, char *argv[]);
public:
- // Default destructor.
+ /// Default destructor.
virtual ~STRUMPACKSolverBase();
- // Factor and solve the linear system y = Op^{-1} x.
+ /// Factor and solve the linear system $y = Op^{-1} x $.
void Mult(const Vector &x, Vector &y) const;
+
+ /** @brief Factor and solve the linear systems $ Y_i = Op^{-1} X_i $
+ across the array of vectors. */
void ArrayMult(const Array &X, Array &Y) const;
- // Set the operator.
+ /** @brief Set the operator/matrix.
+ \note @a A must be a STRUMPACKRowLocMatrix. */
void SetOperator(const Operator &op);
- // Set various solver options. Refer to STRUMPACK documentation for
- // details.
+ /** @brief Set options that were captured from the command line.
+
+ These were captured in the constructer STRUMPACKSolverBase. Refer
+ to the STRUMPACK documentation for details. */
void SetFromCommandLine();
+
+ /// Set up verbose printing during the factor step
void SetPrintFactorStatistics(bool print_stat);
+
+ /// Set up verbose printing during the solve step
void SetPrintSolveStatistics(bool print_stat);
- // Set tolerances and iterations for iterative solvers. Compression
- // tolerance is handled below.
+ /// Set the relative tolerance for interative solvers
void SetRelTol(double rtol);
+
+ /// Set the absolute tolerance for iterative solvers
void SetAbsTol(double atol);
+
+ /// Set the maximum number of iterations for iterative solvers
void SetMaxIter(int max_it);
- // Set the flag controlling reuse of the symbolic factorization for multiple
- // operators. This method has to be called before repeated calls to
- // SetOperator.
+ /** @brief Set the flag controlling reuse of the symbolic factorization for
+ multiple operators.
+
+ This method must be called before repeated calls to SetOperator. */
void SetReorderingReuse(bool reuse);
- // Enable or not GPU off-loading available if STRUMPACK was compiled with CUDA. Note
- // that input/output from MFEM to STRUMPACK is all still through host memory.
+ /** @brief Enable GPU off-loading available if STRUMPACK was compiled with
+ CUDA.
+ @note Input/Output from MFEM to STRUMPACK is all still through host
+ memory. */
void EnableGPU();
+
+ /** @brief Disable GPU off-loading available if STRUMPACK was compiled with
+ CUDA.
+ @note Input/Output from MFEM to STRUMPACK is all still through host
+ memory. */
void DisableGPU();
- /**
+ /** @brief Set the Krylov solver method to use
+ *
* STRUMPACK is an (approximate) direct solver. It can be used as a direct
* solver or as a preconditioner. To use STRUMPACK as only a preconditioner,
* set the Krylov solver to DIRECT. STRUMPACK also provides iterative solvers
@@ -119,91 +154,117 @@ public:
* used without preconditioner.
*
* Supported values are:
- * AUTO: Use iterative refinement if no HSS compression is
- * used, otherwise use GMRes
- * DIRECT: No outer iterative solver, just a single application
+ * - AUTO: Use iterative refinement if no HSS compression is
+ * used, otherwise use GMRES
+ * - DIRECT: No outer iterative solver, just a single application
* of the multifrontal solver
- * REFINE: Iterative refinement
- * PREC_GMRES: Preconditioned GMRes
+ * - REFINE: Iterative refinement
+ * - PREC_GMRES: Preconditioned GMRES
* The preconditioner is the (approx) multifrontal solver
- * GMRES: UN-preconditioned GMRes (for testing mainly)
- * PREC_BICGSTAB: Preconditioned BiCGStab
+ * - GMRES: UN-preconditioned GMRES (for testing mainly)
+ * - PREC_BICGSTAB: Preconditioned BiCGStab
* The preconditioner is the (approx) multifrontal solver
- * BICGSTAB: UN-preconditioned BiCGStab. (for testing mainly)
+ * - BICGSTAB: UN-preconditioned BiCGStab. (for testing mainly)
*/
void SetKrylovSolver(strumpack::KrylovSolver method);
- /**
+ /** @brief Set matrix reordering strategy
+ *
* Supported reorderings are:
- * NATURAL: Do not reorder the system
- * METIS: Use Metis nested-dissection reordering (default)
- * PARMETIS: Use ParMetis nested-dissection reordering
- * SCOTCH: Use Scotch nested-dissection reordering
- * PTSCOTCH: Use PT-Scotch nested-dissection reordering
- * RCM: Use RCM reordering
- * GEOMETRIC: A simple geometric nested dissection code that
+ * - NATURAL: Do not reorder the system
+ * - METIS: Use Metis nested-dissection reordering (default)
+ * - PARMETIS: Use ParMetis nested-dissection reordering
+ * - SCOTCH: Use Scotch nested-dissection reordering
+ * - PTSCOTCH: Use PT-Scotch nested-dissection reordering
+ * - RCM: Use RCM reordering
+ * - GEOMETRIC: A simple geometric nested dissection code that
* only works for regular meshes
- * AMD: Approximate minimum degree
- * MMD: Multiple minimum degree
- * AND: Nested dissection
- * MLF: Minimum local fill
- * SPECTRAL: Spectral nested dissection
+ * - AMD: Approximate minimum degree
+ * - MMD: Multiple minimum degree
+ * - AND: Nested dissection
+ * - MLF: Minimum local fill
+ * - SPECTRAL: Spectral nested dissection
*/
void SetReorderingStrategy(strumpack::ReorderingStrategy method);
- /**
- * Configure static pivoting for stability. The static pivoting in STRUMPACK
+ /** @brief Configure static pivoting for stability.
+ *
+ * The static pivoting in STRUMPACK
* permutes the sparse input matrix in order to get large (nonzero) elements
* on the diagonal. If the input matrix is already diagonally dominant, this
* reordering can be disabled.
*
* Supported matching algorithms are:
- * NONE: Don't do anything
- * MAX_CARDINALITY: Maximum cardinality
- * MAX_SMALLEST_DIAGONAL: Maximum smallest diagonal value
- * MAX_SMALLEST_DIAGONAL_2: Same as MAX_SMALLEST_DIAGONAL
+ * - NONE: Don't do anything
+ * - MAX_CARDINALITY: Maximum cardinality
+ * - MAX_SMALLEST_DIAGONAL: Maximum smallest diagonal value
+ * - MAX_SMALLEST_DIAGONAL_2: Same as MAX_SMALLEST_DIAGONAL
* but different algorithm
- * MAX_DIAGONAL_SUM: Maximum sum of diagonal values
- * MAX_DIAGONAL_PRODUCT_SCALING: Maximum product of diagonal values
+ * - MAX_DIAGONAL_SUM: Maximum sum of diagonal values
+ * - MAX_DIAGONAL_PRODUCT_SCALING: Maximum product of diagonal values
* and row and column scaling (default)
- * COMBBLAS: Use AWPM from CombBLAS (only with
+ * - COMBBLAS: Use AWPM from CombBLAS (only with
* version >= 3)
*/
void SetMatching(strumpack::MatchingJob job);
- /**
+ /** @brief Select compression for sparse data types
+ *
* Enable support for rank-structured data formats, which can be used
* for compression within the sparse solver.
*
* Supported compression types are:
- * NONE: No compression, purely direct solver (default)
- * HSS: HSS compression of frontal matrices
- * BLR: Block low-rank compression of fronts
- * HODLR: Hierarchically Off-diagonal Low-Rank
+ * - NONE: No compression, purely direct solver (default)
+ * - HSS: HSS compression of frontal matrices
+ * - BLR: Block low-rank compression of fronts
+ * - HODLR: Hierarchically Off-diagonal Low-Rank
* compression of frontal matrices
- * BLR_HODLR: Block low-rank compression of medium
+ * - BLR_HODLR: Block low-rank compression of medium
* fronts and Hierarchically Off-diagonal
* Low-Rank compression of large fronts
- * ZFP_BLR_HODLR: ZFP compression for small fronts,
+ * - ZFP_BLR_HODLR: ZFP compression for small fronts,
* Block low-rank compression of medium
* fronts and Hierarchically Off-diagonal
* Low-Rank compression of large fronts
- * LOSSLESS: Lossless compression
- * LOSSY: Lossy compression
+ * - LOSSLESS: Lossless compression
+ * - LOSSY: Lossy compression
*
* For versions of STRUMPACK < 5, we support only NONE, HSS, and BLR.
* BLR_HODLR and ZPR_BLR_HODLR are supported in STRUMPACK >= 6.
*/
void SetCompression(strumpack::CompressionType type);
+
+ /** @brief Set the relative tolerance for low rank compression methods
+ *
+ * This currently affects BLR, HSS, and HODLR. Use
+ * STRUMPACKSolverBase::SetCompression to set the proper compression type.
+ */
void SetCompressionRelTol(double rtol);
+
+ /** @brief Set the absolute tolerance for low rank compression methods
+ *
+ * This currently affects BLR, HSS, and HODLR. Use
+ * STRUMPACKSolverBase::SetCompression to set the proper compression type.
+ */
void SetCompressionAbsTol(double atol);
+
#if STRUMPACK_VERSION_MAJOR >= 5
+ /** @brief Set the precision for the lossy compression option
+ *
+ * Use STRUMPACKSolverBase::SetCompression to set the proper compression
+ * type. */
void SetCompressionLossyPrecision(int precision);
+
+ /** @brief Set the number of butterfly levels for the HODLR compression
+ * option.
+ *
+ * Use STRUMPACKSolverBase::SetCompression to set the proper compression
+ * type. */
void SetCompressionButterflyLevels(int levels);
#endif
private:
- // Helper method for calling the STRUMPACK factoriation routine.
+ /// Helper method for calling the STRUMPACK factoriation routine.
void FactorInternal() const;
protected:
@@ -223,21 +284,30 @@ class STRUMPACKSolver :
SparseSolverMPIDist>
{
public:
- // Constructor with MPI_Comm parameter.
+ /// Constructor with the MPI Comm parameter
STRUMPACKSolver(MPI_Comm comm);
- // Constructor with STRUMPACK matrix object.
+ /// Constructor with STRUMPACK matrix object.
STRUMPACKSolver(STRUMPACKRowLocMatrix &A);
- // Constructor with MPI_Comm parameter and command line arguments.
+ /** @brief Constructor with MPI_Comm parameter and command line arguments.
+
+ SetFromCommandLine must be called for the command line arguments
+ to be used.
+ */
STRUMPACKSolver(MPI_Comm comm, int argc, char *argv[]);
MFEM_DEPRECATED STRUMPACKSolver(int argc, char *argv[], MPI_Comm comm)
: STRUMPACKSolver(comm, argc, argv) {}
- // Constructor with STRUMPACK matrix object and command line arguments.
+ /** @brief Constructor with STRUMPACK matrix object and command line
+ arguments.
+
+ SetFromCommandLine must be called for the command line arguments
+ to be used.
+ */
STRUMPACKSolver(STRUMPACKRowLocMatrix &A, int argc, char *argv[]);
- // Destructor.
+ /// Destructor.
~STRUMPACKSolver() {}
};
@@ -247,20 +317,29 @@ class STRUMPACKMixedPrecisionSolver :
SparseSolverMixedPrecisionMPIDist>
{
public:
- // Constructor with MPI_Comm parameter.
+ /// Constructor with MPI_Comm parameter.
STRUMPACKMixedPrecisionSolver(MPI_Comm comm);
- // Constructor with STRUMPACK matrix object.
+ /// Constructor with STRUMPACK matrix object.
STRUMPACKMixedPrecisionSolver(STRUMPACKRowLocMatrix &A);
- // Constructor with MPI_Comm parameter and command line arguments.
+ /** @brief Constructor with MPI_Comm parameter and command line arguments.
+
+ SetFromCommandLine must be called for the command line arguments
+ to be used.
+ */
STRUMPACKMixedPrecisionSolver(MPI_Comm comm, int argc, char *argv[]);
- // Constructor with STRUMPACK matrix object and command line arguments.
+ /** @brief Constructor with STRUMPACK matrix object and command line
+ arguments.
+
+ SetFromCommandLine must be called for the command line arguments
+ to be used.
+ */
STRUMPACKMixedPrecisionSolver(STRUMPACKRowLocMatrix &A,
int argc, char *argv[]);
- // Destructor.
+ /// Destructor.
~STRUMPACKMixedPrecisionSolver() {}
};
#endif
diff --git a/linalg/sundials.cpp b/linalg/sundials.cpp
index 59cc4dd7f9..55414c32d3 100644
--- a/linalg/sundials.cpp
+++ b/linalg/sundials.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/sundials.hpp b/linalg/sundials.hpp
index 451c12b02e..f34b4deaf7 100644
--- a/linalg/sundials.hpp
+++ b/linalg/sundials.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -392,13 +392,13 @@ protected:
/// Wrapper to compute the ODE rhs function.
static int RHS(realtype t, const N_Vector y, N_Vector ydot, void *user_data);
- /// Setup the linear system \f$ A x = b \f$.
+ /// Setup the linear system $ A x = b $.
static int LinSysSetup(realtype t, N_Vector y, N_Vector fy, SUNMatrix A,
booleantype jok, booleantype *jcur,
realtype gamma, void *user_data, N_Vector tmp1,
N_Vector tmp2, N_Vector tmp3);
- /// Solve the linear system \f$ A x = b \f$.
+ /// Solve the linear system $ A x = b $.
static int LinSysSolve(SUNLinearSolver LS, SUNMatrix A, N_Vector x,
N_Vector b, realtype tol);
@@ -693,28 +693,28 @@ protected:
static int RHS2(realtype t, const N_Vector y, N_Vector ydot, void *user_data);
///@}
- /// Setup the linear system \f$ A x = b \f$.
+ /// Setup the linear system $ A x = b $.
static int LinSysSetup(realtype t, N_Vector y, N_Vector fy, SUNMatrix A,
SUNMatrix M, booleantype jok, booleantype *jcur,
realtype gamma, void *user_data, N_Vector tmp1,
N_Vector tmp2, N_Vector tmp3);
- /// Solve the linear system \f$ A x = b \f$.
+ /// Solve the linear system $ A x = b $.
static int LinSysSolve(SUNLinearSolver LS, SUNMatrix A, N_Vector x,
N_Vector b, realtype tol);
- /// Setup the linear system \f$ M x = b \f$.
+ /// Setup the linear system $ M x = b $.
static int MassSysSetup(realtype t, SUNMatrix M, void *user_data,
N_Vector tmp1, N_Vector tmp2, N_Vector tmp3);
- /// Solve the linear system \f$ M x = b \f$.
+ /// Solve the linear system $ M x = b $.
static int MassSysSolve(SUNLinearSolver LS, SUNMatrix M, N_Vector x,
N_Vector b, realtype tol);
- /// Compute the matrix-vector product \f$ v = M x \f$.
+ /// Compute the matrix-vector product $ v = M x $.
static int MassMult1(SUNMatrix M, N_Vector x, N_Vector v);
- /// Compute the matrix-vector product \f$v = M_t x \f$ at time t.
+ /// Compute the matrix-vector product $v = M_t x $ at time t.
static int MassMult2(N_Vector x, N_Vector v, realtype t,
void* mtimes_data);
@@ -856,18 +856,18 @@ protected:
int maxli = 5; ///< Maximum linear iterations
int maxlrs = 0; ///< Maximum linear solver restarts
- /// Wrapper to compute the nonlinear residual \f$ F(u) = 0 \f$.
+ /// Wrapper to compute the nonlinear residual $ F(u) = 0 $.
static int Mult(const N_Vector u, N_Vector fu, void *user_data);
- /// Wrapper to compute the Jacobian-vector product \f$ J(u) v = Jv \f$.
+ /// Wrapper to compute the Jacobian-vector product $ J(u) v = Jv $.
static int GradientMult(N_Vector v, N_Vector Jv, N_Vector u,
booleantype *new_u, void *user_data);
- /// Setup the linear system \f$ J u = b \f$.
+ /// Setup the linear system $ J u = b $.
static int LinSysSetup(N_Vector u, N_Vector fu, SUNMatrix J,
void *user_data, N_Vector tmp1, N_Vector tmp2);
- /// Solve the linear system \f$ J u = b \f$.
+ /// Solve the linear system $ J u = b $.
static int LinSysSolve(SUNLinearSolver LS, SUNMatrix J, N_Vector u,
N_Vector b, realtype tol);
@@ -878,7 +878,7 @@ protected:
N_Vector fscale,
void *user_data);
- /// Solve the preconditioner equation \f$ Pz = v \f$.
+ /// Solve the preconditioner equation $ Pz = v $.
static int PrecSolve(N_Vector uu,
N_Vector uscale,
N_Vector fval,
@@ -930,7 +930,7 @@ public:
virtual void SetPreconditioner(Solver &solver) { SetSolver(solver); }
/// Set KINSOL's scaled step tolerance.
- /** The default tolerance is \f$ U^\frac{2}{3} \f$ , where
+ /** The default tolerance is $ U^\frac{2}{3} $ , where
U = machine unit round-off.
@note This method must be called after SetOperator(). */
void SetScaledStepTol(double sstol);
@@ -972,7 +972,7 @@ public:
/// This method is not supported and will throw an error.
virtual void SetPrintLevel(PrintLevel);
- /// Solve the nonlinear system \f$ F(x) = 0 \f$.
+ /// Solve the nonlinear system $ F(x) = 0 $.
/** This method computes the x_scale and fx_scale vectors and calls the
other Mult(Vector&, Vector&, Vector&) const method. The x_scale vector
is a vector of ones and values of fx_scale are determined by comparing
@@ -983,7 +983,7 @@ public:
solution */
virtual void Mult(const Vector &b, Vector &x) const;
- /// Solve the nonlinear system \f$ F(x) = 0 \f$.
+ /// Solve the nonlinear system $ F(x) = 0 $.
/** Calls KINSol() to solve the nonlinear system. Before calling KINSol(),
this functions uses the data members inherited from class IterativeSolver
to set corresponding KINSOL options.
diff --git a/linalg/superlu.cpp b/linalg/superlu.cpp
index c120c4f228..0267960922 100644
--- a/linalg/superlu.cpp
+++ b/linalg/superlu.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/superlu.hpp b/linalg/superlu.hpp
index e220207518..6b71a147ba 100644
--- a/linalg/superlu.hpp
+++ b/linalg/superlu.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -29,22 +29,89 @@ namespace superlu
// Copy selected enumerations from SuperLU (from superlu_enum_consts.h)
#ifdef MFEM_USE_SUPERLU5
-typedef enum {NOROWPERM, LargeDiag, MY_PERMR} RowPerm;
+typedef enum
+{
+ NOROWPERM,
+ LargeDiag,
+ MY_PERMR
+} RowPerm;
#else
-typedef enum {NOROWPERM, LargeDiag_MC64, LargeDiag_HWPM, MY_PERMR} RowPerm;
+/// Define the type of row permutation
+typedef enum
+{
+ /// No row permutation
+ NOROWPERM,
+ /** @brief Duff/Koster algorithm to make the diagonals large compared to the
+ off-diagonals. Use LargeDiag for SuperLU version 5 and below. */
+ LargeDiag_MC64,
+ /** @brief Parallel approximate weight perfect matching to make the diagonals
+ large compared to the off-diagonals. Option doesn't exist in SuperLU
+ version 5 and below. */
+ LargeDiag_HWPM,
+ /// User defined row permutation
+ MY_PERMR
+} RowPerm;
#endif
-typedef enum {NATURAL, MMD_ATA, MMD_AT_PLUS_A, COLAMD,
- METIS_AT_PLUS_A, PARMETIS, ZOLTAN, MY_PERMC
- } ColPerm;
-typedef enum {NOREFINE, SLU_SINGLE=1, SLU_DOUBLE, SLU_EXTRA} IterRefine;
-typedef enum {DOFACT, SamePattern, SamePattern_SameRowPerm, FACTORED} Fact;
+
+/// Define the type of column permutation
+typedef enum
+{
+ /// Natural ordering
+ NATURAL,
+ /// Minimum degree ordering on structure of $ A^T*A $
+ MMD_ATA,
+ /// Minimum degree ordering on structure of $ A^T+A $
+ MMD_AT_PLUS_A,
+ /// Approximate minimum degree column ordering
+ COLAMD,
+ /// Sequential ordering on structure of $ A^T+A $ using the METIS package
+ METIS_AT_PLUS_A,
+ /** @brief Sequential ordering on structure of $ A^T+A $ using the
+ PARMETIS package */
+ PARMETIS,
+ /// Use the Zoltan library from Sandia to define the column ordering
+ ZOLTAN,
+ /// User defined column permutation
+ MY_PERMC
+} ColPerm;
+
+/// Define how to do iterative refinement
+typedef enum
+{
+ /// No interative refinement
+ NOREFINE,
+ /// Iterative refinement accumulating residuals in a float.
+ SLU_SINGLE=1,
+ /// Iterative refinement accumulating residuals in a double.
+ SLU_DOUBLE,
+ /// Iterative refinement accumulating residuals in a higher precision variable.
+ SLU_EXTRA
+} IterRefine;
+
+/** @brief Define the information that is provided about the matrix
+ factorization ahead of time. */
+typedef enum
+{
+ /// No information is provided, do the full factorization.
+ DOFACT,
+ /** @brief Matrix A will be factored assuming the sparsity is the same as a
+ previous factorization. Column permutations will be reused. */
+ SamePattern,
+ /** @brief Matrix A will be factored assuming the sparsity is the same and
+ the matrix as a previous are similar as a previous factorization. Column
+ permutations and row permutations will be reused. */
+ SamePattern_SameRowPerm,
+ /** @brief The matrix A was provided in fully factored form and no
+ factorization is needed. */
+ FACTORED
+} Fact;
} // namespace superlu
class SuperLURowLocMatrix : public Operator
{
public:
- /** Creates a general parallel matrix from a local CSR matrix on each
+ /** @brief Creates a general parallel matrix from a local CSR matrix on each
processor described by the I, J and data arrays. The local matrix should
be of size (local) nrows by (global) glob_ncols. The new parallel matrix
contains copies of all input arrays (so they can be deleted). */
@@ -53,12 +120,14 @@ public:
HYPRE_BigInt glob_nrows, HYPRE_BigInt glob_ncols,
int *I, HYPRE_BigInt *J, double *data);
- /** Creates a copy of the parallel matrix hypParMat in SuperLU's RowLoc
- format. All data is copied so the original matrix may be deleted. */
+ /** @brief Creates a copy of the parallel matrix hypParMat in SuperLU's
+ RowLoc format. All data is copied so the original matrix may be
+ deleted. */
SuperLURowLocMatrix(const Operator &op);
~SuperLURowLocMatrix();
+ /// Matrix Vector products are not supported for this type of matrix
void Mult(const Vector &x, Vector &y) const
{
MFEM_ABORT("SuperLURowLocMatrix::Mult: Matrix vector products are not "
@@ -67,10 +136,13 @@ public:
void *InternalData() const { return rowLocPtr_; }
+ /// Get the MPI communicator for this matrix
MPI_Comm GetComm() const { return comm_; }
+ /// Get the number of global rows in this matrix
HYPRE_BigInt GetGlobalNumRows() const { return num_global_rows_; }
+ /// Get the number of global columns in this matrix
HYPRE_BigInt GetGlobalNumColumns() const { return num_global_cols_; }
private:
@@ -79,7 +151,7 @@ private:
HYPRE_BigInt num_global_rows_, num_global_cols_;
};
-/** The MFEM SuperLU Direct Solver class.
+/** The MFEM wrapper around the SuperLU Direct Solver class.
The mfem::SuperLUSolver class uses the SuperLU_DIST library to perform LU
factorization of a parallel sparse matrix. The solver is capable of handling
@@ -89,41 +161,106 @@ private:
class SuperLUSolver : public Solver
{
public:
- // Constructor with MPI_Comm parameter.
+ /** @brief Constructor with MPI_Comm parameter.
+
+ @a npdep is the replication factor for the matrix
+ data and must be a power of 2 and divide evenly
+ into the number of processors. */
SuperLUSolver(MPI_Comm comm, int npdep = 1);
- // Constructor with SuperLU matrix object.
+ /** @brief Constructor with SuperLU matrix object.
+
+ @a npdep is the replication factor for the matrix
+ data and must be a power of 2 and divide evenly
+ into the number of processors. */
SuperLUSolver(SuperLURowLocMatrix &A, int npdep = 1);
- // Default destructor.
+ /// Default destructor.
~SuperLUSolver();
- // Set the operator.
+ /** @brief Set the operator/matrix.
+ @note @a A must be a SuperLURowLocMatrix. */
void SetOperator(const Operator &op);
- // Factor and solve the linear system y = Op^{-1} x.
- // Note: Factorization modifies the operator matrix.
+ /** @brief Factor and solve the linear system $ y = Op^{-1} x $
+ @note Factorization modifies the operator matrix. */
void Mult(const Vector &x, Vector &y) const;
+
+ /** @brief Factor and solve the linear systems $ y_i = Op^{-1} x_i $
+ for all i in the @a X and @a Y arrays.
+ @note Factorization modifies the operator matrix. */
void ArrayMult(const Array &X, Array &Y) const;
- // Factor and solve the linear system y = Op^{-T} x.
- // Note: Factorization modifies the operator matrix.
+ /** @brief Factor and solve the transposed linear system
+ $ y = Op^{-T} x $
+ @note Factorization modifies the operator matrix. */
void MultTranspose(const Vector &x, Vector &y) const;
+
+ /** @brief Factor and solve the transposed linear systems
+ $ y_i = Op^{-T} x_i $ for all i in the @a X and @a Y arrays.
+ @note Factorization modifies the operator matrix. */
void ArrayMultTranspose(const Array &X,
Array &Y) const;
- // Set various solver options. Refer to SuperLU_DIST documentation for
- // details.
+ /// Specify whether to print the solver statistics (default true)
void SetPrintStatistics(bool print_stat);
+
+ /** @brief Specify whether to equibrate the system scaling to make
+ the rows and columns have unit norms. (default true) */
void SetEquilibriate(bool equil);
+
+ /** @brief Specify how to permute the columns of the matrix.
+
+ Supported options are:
+ superlu::NATURAL, superlu::MMD_ATA, superlu::MMD_AT_PLUS_A,
+ superlu::COLAMD, superlu::METIS_AT_PLUS_A (default),
+ superlu::PARMETIS, superlu::ZOLTAN, superlu::MY_PERMC */
void SetColumnPermutation(superlu::ColPerm col_perm);
+
+ /** @brief Specify how to permute the rows of the matrix.
+
+ Supported options are:
+ superlu::NOROWPERM, superlu::LargeDiag (default), superlu::MY_PERMR for
+ SuperLU version 5. For later versions the supported options are:
+ superlu::NOROWPERM, superlu::LargeDiag_MC64 (default),
+ superlu::LargeDiag_HWPM, superlu::MY_PERMR */
void SetRowPermutation(superlu::RowPerm row_perm);
+
+ /** @brief Specify how to handle iterative refinement
+
+ Supported options are:
+ superlu::NOREFINE, superlu::SLU_SINGLE,
+ superlu::SLU_DOUBLE (default), superlu::SLU_EXTRA */
void SetIterativeRefine(superlu::IterRefine iter_ref);
+
+ /** @brief Specify whether to replace tiny diagonals encountered
+ during pivot with $ \sqrt{\epsilon} \lVert A \rVert $
+ (default false) */
void SetReplaceTinyPivot(bool rtp);
+
+ /// Specify the number of levels in the look-ahead factorization (default 10)
void SetNumLookAheads(int num_lookaheads);
+
+ /** @brief Specifies whether to use the elimination tree computed from the
+ serial symbolic factorization to perform static scheduling
+ (default false) */
void SetLookAheadElimTree(bool etree);
+
+ /** @brief Specify whether the matrix has a symmetric pattern to avoid extra
+ work (default false) */
void SetSymmetricPattern(bool sym);
+
+ /** @brief Specify whether to perform parallel symbolic factorization.
+ @note If true SuperLU will use superlu::PARMETIS for the Column
+ Permutation regardless of the setting */
void SetParSymbFact(bool par);
+
+ /** @brief Specify what information has been provided ahead of time about the
+ factorization of A.
+
+ Supported options are:
+ superlu::DOFACT, superlu::SamePattern, superlu::SamePattern_SameRowPerm,
+ superlu::FACTORED*/
void SetFact(superlu::Fact fact);
// Processor grid for SuperLU_DIST.
diff --git a/linalg/symmat.cpp b/linalg/symmat.cpp
index 2625416f28..3fda1c9f45 100644
--- a/linalg/symmat.cpp
+++ b/linalg/symmat.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/symmat.hpp b/linalg/symmat.hpp
index dbb137ba1d..ac2b74a3dc 100644
--- a/linalg/symmat.hpp
+++ b/linalg/symmat.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/tensor.hpp b/linalg/tensor.hpp
index a503abb09c..12c8c48b47 100644
--- a/linalg/tensor.hpp
+++ b/linalg/tensor.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/tlayout.hpp b/linalg/tlayout.hpp
index e20c4bbc05..fce3dd9b97 100644
--- a/linalg/tlayout.hpp
+++ b/linalg/tlayout.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/tmatrix.hpp b/linalg/tmatrix.hpp
index cf6a301915..6f2b4925bd 100644
--- a/linalg/tmatrix.hpp
+++ b/linalg/tmatrix.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/ttensor.hpp b/linalg/ttensor.hpp
index 28115d1d35..91ca2bb95b 100644
--- a/linalg/ttensor.hpp
+++ b/linalg/ttensor.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/vector.cpp b/linalg/vector.cpp
index 21f4b8c2c2..60991fd7ad 100644
--- a/linalg/vector.cpp
+++ b/linalg/vector.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/linalg/vector.hpp b/linalg/vector.hpp
index 6037a5fa80..7c8a5f7c17 100644
--- a/linalg/vector.hpp
+++ b/linalg/vector.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/makefile b/makefile
index d6e8f11e00..b7ab09d847 100644
--- a/makefile
+++ b/makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/mesh/CMakeLists.txt b/mesh/CMakeLists.txt
index d107ff7763..1e53ded29a 100644
--- a/mesh/CMakeLists.txt
+++ b/mesh/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
diff --git a/mesh/element.cpp b/mesh/element.cpp
index c21b8f9bd0..19586e7240 100644
--- a/mesh/element.cpp
+++ b/mesh/element.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/mesh/element.hpp b/mesh/element.hpp
index 1a265a5068..e9dd07217c 100644
--- a/mesh/element.hpp
+++ b/mesh/element.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/mesh/gmsh.cpp b/mesh/gmsh.cpp
index b164cad89b..d5d8dd3a79 100644
--- a/mesh/gmsh.cpp
+++ b/mesh/gmsh.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/mesh/gmsh.hpp b/mesh/gmsh.hpp
index 5841a962df..5ba0df2d06 100644
--- a/mesh/gmsh.hpp
+++ b/mesh/gmsh.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/mesh/hexahedron.cpp b/mesh/hexahedron.cpp
index e86e209c1c..163b8260f0 100644
--- a/mesh/hexahedron.cpp
+++ b/mesh/hexahedron.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/mesh/hexahedron.hpp b/mesh/hexahedron.hpp
index 99c26167f7..d8a74044e1 100644
--- a/mesh/hexahedron.hpp
+++ b/mesh/hexahedron.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
diff --git a/mesh/mesh.cpp b/mesh/mesh.cpp
index 30e082d9d2..b50dd4e074 100644
--- a/mesh/mesh.cpp
+++ b/mesh/mesh.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -302,7 +302,7 @@ void Mesh::PrintCharacteristics(Vector *Vh, Vector *Vk, std::ostream &os)
num_bdr_elems_by_geom = 0;
for (int i = 0; i < GetNBE(); i++)
{
- num_bdr_elems_by_geom[GetBdrElementBaseGeometry(i)]++;
+ num_bdr_elems_by_geom[GetBdrElementGeometry(i)]++;
}
Array num_faces_by_geom(Geometry::NumGeom);
num_faces_by_geom = 0;
@@ -473,14 +473,18 @@ void Mesh::GetBdrElementTransformation(int i,
else // L2 Nodes (e.g., periodic mesh)
{
int elem_id, face_info;
- GetBdrElementAdjacentElement2(i, elem_id, face_info);
+ GetBdrElementAdjacentElement(i, elem_id, face_info);
+ Geometry::Type face_geom = GetBdrElementGeometry(i);
+ face_info = EncodeFaceInfo(
+ DecodeFaceInfoLocalIndex(face_info),
+ Geometry::GetInverseOrientation(
+ face_geom, DecodeFaceInfoOrientation(face_info))
+ );
IntegrationPointTransformation Loc1;
GetLocalFaceTransformation(GetBdrElementType(i),
GetElementType(elem_id),
Loc1.Transf, face_info);
-
- Geometry::Type face_geom = GetBdrElementBaseGeometry(i);
const FiniteElement *face_el =
Nodes->FESpace()->GetTraceElement(elem_id, face_geom);
MFEM_VERIFY(dynamic_cast(face_el),
@@ -902,6 +906,8 @@ void Mesh::DeleteGeometricFactors()
delete face_geom_factors[i];
}
face_geom_factors.SetSize(0);
+
+ ++nodes_sequence;
}
void Mesh::GetLocalFaceTransformation(int face_type, int elem_type,
@@ -1489,6 +1495,7 @@ void Mesh::Init()
nbBoundaryFaces = -1;
meshgen = mesh_geoms = 0;
sequence = 0;
+ nodes_sequence = 0;
Nodes = NULL;
own_nodes = 1;
NURBSext = NULL;
@@ -2583,6 +2590,7 @@ void Mesh::ReorderElements(const Array &ordering, bool reorder_vertices)
{
// To force FE space update, we need to increase 'sequence':
sequence++;
+ nodes_sequence++;
last_operation = Mesh::NONE;
nodes_fes->Update(false); // want_transform = false
Nodes->Update(); // just needed to update Nodes->sequence
@@ -2969,6 +2977,7 @@ void Mesh::DoNodeReorder(DSTable *old_v_to_v, Table *old_elem_vert)
}
// To force FE space update, we need to increase 'sequence':
sequence++;
+ nodes_sequence++;
last_operation = Mesh::NONE;
fes->Update(false); // want_transform = false
Nodes->Update(); // just needed to update Nodes->sequence
@@ -4093,6 +4102,7 @@ Mesh::Mesh(const Mesh &mesh, bool copy_nodes)
// Create the new Mesh instance without a record of its refinement history
sequence = 0;
+ nodes_sequence = 0;
last_operation = Mesh::NONE;
// Duplicate the elements
@@ -4971,7 +4981,7 @@ void Mesh::MakeRefined_(Mesh &orig_mesh, const Array &ref_factors,
{
int i, info;
orig_mesh.GetBdrElementAdjacentElement(el, i, info);
- Geometry::Type geom = orig_mesh.GetBdrElementBaseGeometry(el);
+ Geometry::Type geom = orig_mesh.GetBdrElementGeometry(el);
int attrib = orig_mesh.GetBdrAttribute(el);
int nvert = Geometry::NumVerts[geom];
RefinedGeometry &RG = *refiner.Refine(geom, ref_factors[i]);
@@ -5155,7 +5165,7 @@ void Mesh::MakeSimplicial_(const Mesh &orig_mesh, int *vglobal)
}
for (int i=0; iGetVertices();
const int attrib = orig_mesh.GetBdrAttribute(i);
- const Geometry::Type orig_geom = orig_mesh.GetBdrElementBaseGeometry(i);
+ const Geometry::Type orig_geom = orig_mesh.GetBdrElementGeometry(i);
if (num_subdivisions[orig_geom] == 1)
{
Element *be = NewElement(orig_geom);
@@ -5750,6 +5760,7 @@ void Mesh::UpdateNURBS()
Nodes->FESpace()->Update();
Nodes->Update();
+ NodesUpdated();
NURBSext->SetCoordsFromPatches(*Nodes);
if (NumOfVertices != NURBSext->GetNV())
@@ -7209,7 +7220,8 @@ void Mesh::GetBdrElementAdjacentElement(int bdr_el, int &el, int &info) const
info = fi.Elem1Inf + ori;
}
-void Mesh::GetBdrElementAdjacentElement2(int bdr_el, int &el, int &info) const
+void Mesh::GetBdrElementAdjacentElement2(
+ int bdr_el, int &el, int &info) const
{
int fid = GetBdrElementFaceIndex(bdr_el);
@@ -10137,11 +10149,7 @@ void Mesh::NonconformingRefinement(const Array &refinements,
last_operation = Mesh::REFINE;
sequence++;
- if (Nodes) // update/interpolate curved mesh
- {
- Nodes->FESpace()->Update();
- Nodes->Update();
- }
+ UpdateNodes();
}
double Mesh::AggregateError(const Array &elem_error,
@@ -10343,6 +10351,7 @@ void Mesh::Swap(Mesh& other, bool non_geometry)
mfem::Swap(CoarseFineTr, other.CoarseFineTr);
mfem::Swap(sequence, other.sequence);
+ mfem::Swap(nodes_sequence, other.nodes_sequence);
mfem::Swap(last_operation, other.last_operation);
}
}
@@ -11212,7 +11221,7 @@ void Mesh::Printer(std::ostream &os, std::string section_delimiter,
if (!comments.empty()) { os << '\n' << comments << '\n'; }
os <<
- "\n#\n# MFEM Geometry Types (see mesh/geom.hpp):\n#\n"
+ "\n#\n# MFEM Geometry Types (see fem/geom.hpp):\n#\n"
"# POINT = 0\n"
"# SEGMENT = 1\n"
"# TRIANGLE = 2\n"
@@ -11288,7 +11297,7 @@ void Mesh::PrintTopo(std::ostream &os, const Array &e_to_k,
if (!comments.empty()) { os << '\n' << comments << '\n'; }
os <<
- "\n#\n# MFEM Geometry Types (see mesh/geom.hpp):\n#\n"
+ "\n#\n# MFEM Geometry Types (see fem/geom.hpp):\n#\n"
"# SEGMENT = 1\n"
"# SQUARE = 3\n"
"# CUBE = 5\n"
@@ -11548,7 +11557,7 @@ void Mesh::PrintVTU(std::ostream &os, int ref, VTKFormat format,
auto get_geom = [&](int i)
{
- if (bdr_elements) { return GetBdrElementBaseGeometry(i); }
+ if (bdr_elements) { return GetBdrElementGeometry(i); }
else { return GetElementBaseGeometry(i); }
};
@@ -11973,7 +11982,7 @@ void Mesh::PrintWithPartitioning(int *partitioning, std::ostream &os,
// optional
os <<
- "\n#\n# MFEM Geometry Types (see mesh/geom.hpp):\n#\n"
+ "\n#\n# MFEM Geometry Types (see fem/geom.hpp):\n#\n"
"# POINT = 0\n"
"# SEGMENT = 1\n"
"# TRIANGLE = 2\n"
@@ -12469,7 +12478,7 @@ void Mesh::PrintSurfaces(const Table & Aface_face, std::ostream &os) const
// optional
os <<
- "\n#\n# MFEM Geometry Types (see mesh/geom.hpp):\n#\n"
+ "\n#\n# MFEM Geometry Types (see fem/geom.hpp):\n#\n"
"# POINT = 0\n"
"# SEGMENT = 1\n"
"# TRIANGLE = 2\n"
diff --git a/mesh/mesh.hpp b/mesh/mesh.hpp
index 59b6b0d480..a8f07a49e2 100644
--- a/mesh/mesh.hpp
+++ b/mesh/mesh.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced
+// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -83,6 +83,9 @@ protected:
// Mesh, such as FiniteElementSpace, GridFunction, etc.
long sequence;
+ /// Counter for geometric factor invalidation
+ long nodes_sequence;
+
Array