From 2932862fe96fd831fed23bc17033ffa31c9f09a2 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Thu, 6 Jul 2023 10:48:50 -0600 Subject: [PATCH 001/200] Adding capability to do partial assembly and full assembly for components of elasticity on GPUs. Added lor_elast miniapp. --- .gitignore | 1 + fem/CMakeLists.txt | 4 + fem/bilinearform.cpp | 7 + fem/bilinearform.hpp | 10 + fem/bilinearform_ext.cpp | 14 +- fem/bilinearform_ext.hpp | 3 + fem/bilininteg.cpp | 40 ++ fem/bilininteg.hpp | 58 +++ fem/fespace.cpp | 2 +- fem/fespace.hpp | 2 +- fem/integ/bilininteg_elasticity_ea.cpp | 29 ++ fem/integ/bilininteg_elasticity_kernels.cpp | 121 +++++ fem/integ/bilininteg_elasticity_kernels.hpp | 400 +++++++++++++++ fem/integ/bilininteg_elasticity_pa.cpp | 98 ++++ fem/pfespace.cpp | 2 +- fem/pfespace.hpp | 2 +- fem/restriction.cpp | 4 + linalg/blockoperator.cpp | 55 +- linalg/blockoperator.hpp | 5 +- linalg/operator.cpp | 34 +- linalg/operator.hpp | 7 + miniapps/solvers/CMakeLists.txt | 6 + miniapps/solvers/README | 33 ++ miniapps/solvers/block_fespace_operator.cpp | 97 ++++ miniapps/solvers/block_fespace_operator.hpp | 44 ++ miniapps/solvers/lor_elast.cpp | 525 ++++++++++++++++++++ miniapps/solvers/makefile | 8 +- 27 files changed, 1587 insertions(+), 24 deletions(-) create mode 100644 fem/integ/bilininteg_elasticity_ea.cpp create mode 100644 fem/integ/bilininteg_elasticity_kernels.cpp create mode 100644 fem/integ/bilininteg_elasticity_kernels.hpp create mode 100644 fem/integ/bilininteg_elasticity_pa.cpp create mode 100644 miniapps/solvers/block_fespace_operator.cpp create mode 100644 miniapps/solvers/block_fespace_operator.hpp create mode 100644 miniapps/solvers/lor_elast.cpp diff --git a/.gitignore b/.gitignore index 9a279ec71d..1cbb85e96f 100644 --- a/.gitignore +++ b/.gitignore @@ -320,6 +320,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/fem/CMakeLists.txt b/fem/CMakeLists.txt index aea1f901de..26f06e764e 100644 --- a/fem/CMakeLists.txt +++ b/fem/CMakeLists.txt @@ -24,6 +24,8 @@ set(SRCS integ/bilininteg_diffusion_pa.cpp integ/bilininteg_diffusion_ea.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 @@ -40,6 +42,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/bilinearform.cpp b/fem/bilinearform.cpp index fad9717aa6..a0b62807e9 100644 --- a/fem/bilinearform.cpp +++ b/fem/bilinearform.cpp @@ -112,6 +112,13 @@ BilinearForm::BilinearForm (FiniteElementSpace * f, BilinearForm * bf, int ps) AllocMat(); } +void BilinearForm::ExtUseTensorBasis(const bool use_tensor_basis) +{ + MFEM_VERIFY(ext, + "Extension is NULL. Set AssemblyLevel to something besides LEGACY first."); + ext->UseTensorBasis(use_tensor_basis); +} + void BilinearForm::SetAssemblyLevel(AssemblyLevel assembly_level) { if (ext) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index b23df92802..0f4f9c2172 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -199,6 +199,16 @@ public: sort_sparse_matrix = enable_it; } + /** @brief Whether or not to allow tensor basis, if available, in the + * extension. + * + * By default, the element restriction operators in PABilinearFormExtension + * will use the tensor basis ordering if the elements are tensor elements. + * This option disables that. assembly must have been set to something + * besides AssemblyLevel::LEGACY before calling this. + */ + void ExtUseTensorBasis(const bool use_tensor_basis); + /// Returns the assembly level AssemblyLevel GetAssemblyLevel() const { return assembly; } diff --git a/fem/bilinearform_ext.cpp b/fem/bilinearform_ext.cpp index d21a43cccd..bc4ca6e528 100644 --- a/fem/bilinearform_ext.cpp +++ b/fem/bilinearform_ext.cpp @@ -255,7 +255,8 @@ PABilinearFormExtension::PABilinearFormExtension(BilinearForm *form) void PABilinearFormExtension::SetupRestrictionOperators(const L2FaceValues m) { if ( Device::Allows(Backend::CEED_MASK) ) { return; } - ElementDofOrdering ordering = UsesTensorBasis(*a->FESpace())? + ElementDofOrdering ordering = UsesTensorBasis(*a->FESpace()) && + use_tensor_basis ? ElementDofOrdering::LEXICOGRAPHIC: ElementDofOrdering::NATIVE; elem_restrict = trial_fes->GetElementRestriction(ordering); @@ -386,6 +387,11 @@ void PABilinearFormExtension::Update() bdr_face_restrict_lex = nullptr; } +void BilinearFormExtension::UseTensorBasis(const bool use_tensor_basis_) +{ + use_tensor_basis = use_tensor_basis_; +} + void PABilinearFormExtension::FormSystemMatrix(const Array &ess_tdof_list, OperatorHandle &A) { @@ -887,6 +893,12 @@ FABilinearFormExtension::FABilinearFormExtension(BilinearForm *form) void FABilinearFormExtension::Assemble() { + //Not having any domain integrators currently causes a seg fault in mfem::ElementRestriction::FillJAndData, + //so verify at least on domain integrator is present. + Array &integrators = *a->GetDBFI(); + const int integratorCount = integrators.Size(); + MFEM_VERIFY(integratorCount > 0, + "Full Assembly requires at least one domain integrator."); EABilinearFormExtension::Assemble(); FiniteElementSpace &fes = *a->FESpace(); int width = fes.GetVSize(); diff --git a/fem/bilinearform_ext.hpp b/fem/bilinearform_ext.hpp index ef54dc71c1..8789313e5f 100644 --- a/fem/bilinearform_ext.hpp +++ b/fem/bilinearform_ext.hpp @@ -33,6 +33,7 @@ class BilinearFormExtension : public Operator { protected: BilinearForm *a; ///< Not owned + bool use_tensor_basis = true; public: BilinearFormExtension(BilinearForm *form); @@ -61,6 +62,8 @@ public: OperatorHandle &A, Vector &X, Vector &B, int copy_interior = 0) = 0; virtual void Update() = 0; + /** @brief Whether or not ext will use tensor basis, if available.*/ + void UseTensorBasis(const bool use_tensor_basis_); }; /// Data and methods for partially-assembled bilinear forms diff --git a/fem/bilininteg.cpp b/fem/bilininteg.cpp index cd7570c69e..50b21a2742 100644 --- a/fem/bilininteg.cpp +++ b/fem/bilininteg.cpp @@ -14,6 +14,7 @@ #include "fem.hpp" #include #include +#include using namespace std; @@ -3061,6 +3062,40 @@ void ElasticityIntegrator::AssembleElementMatrix( } } +BilinearFormIntegrator* ElasticityIntegrator::ComponentIntegrator(const int I, + const int J) +{ + //Make sure this isn't already a component integrator. + MFEM_VERIFY(!parent, + "Cannot get component. This integrator is already a component."); + auto compIntegrator = new ElasticityIntegrator(*this); + compIntegrator->IBlock = I; + compIntegrator->JBlock = J; + compIntegrator->parent = this; + //There only needs to be one instance of componentFESpace, but need to check + //if it exists yet. + if (!componentFESpace) + { + const auto *parfespace = dynamic_cast(fespace); + auto isParallelFES = static_cast(parfespace); + const int vdim = 1; + if (isParallelFES) + { + componentFESpace = std::make_shared + (parfespace->GetParMesh(), parfespace->FEColl(), vdim, + parfespace->GetOrdering()); + } + else + { + componentFESpace = std::make_shared + (fespace->GetMesh(), fespace->FEColl(), vdim, fespace->GetOrdering()); + } + } + compIntegrator->fespace = componentFESpace.get(); + compIntegrator->componentFESpace = nullptr; + return compIntegrator; +} + void ElasticityIntegrator::ComputeElementFlux( const mfem::FiniteElement &el, ElementTransformation &Trans, Vector &u, const mfem::FiniteElement &fluxelem, Vector &flux, @@ -3233,6 +3268,11 @@ double ElasticityIntegrator::ComputeFluxEnergy(const FiniteElement &fluxelem, return energy; } +const FiniteElementSpace* ElasticityIntegrator::GetFESpace() const +{ + return fespace; +} + void DGTraceIntegrator::AssembleFaceMatrix(const FiniteElement &el1, const FiniteElement &el2, FaceElementTransformations &Trans, diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index 62a16935ae..00efdfe10a 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -16,6 +16,8 @@ #include "nonlininteg.hpp" #include "fespace.hpp" #include "ceed/interface/util.hpp" +#include "qfunction.hpp" +#include namespace mfem { @@ -2926,6 +2928,26 @@ private: Vector divshape; #endif + // PA extension + std::shared_ptr lambda_quad, mu_quad; + std::shared_ptr q_vec; + std::shared_ptr quad_space; + + const DofToQuad *maps; ///< Not owned + const GeometricFactors *geom; ///< Not owned + int dim, ndofs; + const FiniteElementSpace + *fespace; ///< Not owned. Not const because it is used in a getter to construct bilinearforms which require non-const fespaces for some reason. Can it be const? + bool PACalled = false; + + //Component integrator + int IBlock = -1; + int JBlock = -1; + /// @brief Pointer to an integrator from which a component integrator is + /// derived. Should be nullptr for the original integrator. Not owned. + const ElasticityIntegrator *parent = nullptr; + std::shared_ptr componentFESpace = nullptr; + public: ElasticityIntegrator(Coefficient &l, Coefficient &m) { lambda = &l; mu = &m; } @@ -2938,6 +2960,38 @@ public: ElementTransformation &, DenseMatrix &); + /** \brief Interpolate the coefficient onto a QuadratureFunction. This is + * performed on host for now, since coefficients do not run on device. + */ + virtual void AssemblePA(const FiniteElementSpace &fes); + + virtual void AssemblePA (const FiniteElementSpace &, + const FiniteElementSpace &) {MFEM_ABORT("Use other AssemblePA function.");}; + + /** \brief Only valid for a component version of ElasticityIntegrator. + */ + virtual void AssembleEA(const FiniteElementSpace &fes, Vector &emat, + const bool add = true); + + virtual void AssembleDiagonalPA(Vector &diag); + + virtual void AddMultPA(const Vector &x, Vector &y) const; + + virtual void AddMultTransposePA(const Vector &x, Vector &y) const; + + /** @brief Get a scalar component of a vector integrator. + + For BilinearFormIntegrators which are written for finite element spaces + that are copies of scalar elements, this creates a new integrator for + the \f$(I,J)\f$th component block where \f$0 \leq I,J \leq \text{dim} - 1\f$. The caller + assumes ownership of the returned BilinearFormIntegrator. + + @param[in] I Row component block index. + @param[in] J Column component block index. + @returns Integrator of \f$(I,J)\f$th component block. + */ + BilinearFormIntegrator* ComponentIntegrator(const int I, + const int J); /** 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 @@ -2966,6 +3020,10 @@ public: virtual double ComputeFluxEnergy(const FiniteElement &fluxelem, ElementTransformation &Trans, Vector &flux, Vector *d_energy = NULL); + + //This would be generally useful for these "component integrators". Starting + //to look like this should be a child class. + const FiniteElementSpace* GetFESpace() const; }; /** Integrator for the DG form: diff --git a/fem/fespace.cpp b/fem/fespace.cpp index 2a1804eff8..f5ef3daf86 100644 --- a/fem/fespace.cpp +++ b/fem/fespace.cpp @@ -580,7 +580,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); diff --git a/fem/fespace.hpp b/fem/fespace.hpp index e2c495506e..2e18ccc404 100644 --- a/fem/fespace.hpp +++ b/fem/fespace.hpp @@ -1141,7 +1141,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 diff --git a/fem/integ/bilininteg_elasticity_ea.cpp b/fem/integ/bilininteg_elasticity_ea.cpp new file mode 100644 index 0000000000..115a67f2d7 --- /dev/null +++ b/fem/integ/bilininteg_elasticity_ea.cpp @@ -0,0 +1,29 @@ +// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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 ElasticityIntegrator::AssembleEA(const FiniteElementSpace &fes, + Vector &emat, + const bool add) +{ + MFEM_VERIFY(parent, "Element level assembly for component version only"); + MFEM_VERIFY(fespace, "Need initialized FiniteElementSpace."); + MFEM_VERIFY(!add, "AssembleEA not implemented for add yet."); + AssemblePA(*fespace); + internal::ElasticityAssembleEA(dim, IBlock, JBlock, ndofs,*fespace, + *lambda_quad, *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..4bc392413b --- /dev/null +++ b/fem/integ/bilininteg_elasticity_kernels.cpp @@ -0,0 +1,121 @@ +// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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 ElasticityAddMultPA(const int dim, const int nDofs, + const FiniteElementSpace &fespace, const QuadratureFunction &lambda, + const QuadratureFunction &mu, const GeometricFactors &geom, + const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y, + const int IBlock, const int JBlock) +{ + //make this dispatch cleaner. Convert -1 to F? + if (IBlock == -1 && JBlock == -1) + { + 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."); + break; + } + } + else if (IBlock >= 0 && JBlock >= 0) + { + const int id = (dim<<8)| (IBlock << 4) | JBlock; + 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("Block not compiled. Add to switch if valid."); + break; + } + } + else + { + MFEM_ABORT("Invalid block selection."); + } + +} + +void ElasticityAssembleDiagonalPA(const int dim, const int nDofs, + const FiniteElementSpace &fespace, const QuadratureFunction &lambda, + const QuadratureFunction &mu, const GeometricFactors &geom, + const DofToQuad &maps, QuadratureFunction &QVec, Vector &diag) +{ + switch (dim) + { + case 2:ElasticityAssembleDiagonalPA<2>(nDofs, fespace, lambda, mu, geom, maps, + QVec, diag); break; + case 3:ElasticityAssembleDiagonalPA<3>(nDofs, fespace, lambda, mu, geom, maps, + QVec, diag); break; + default: + MFEM_ABORT("Only dimensions 2 and 3 supported."); + break; + } +} + +void ElasticityAssembleEA(const int dim, const int IBlock, const int JBlock, + const int nDofs, + const FiniteElementSpace &fespace, const QuadratureFunction &lambda, + const QuadratureFunction &mu, const GeometricFactors &geom, + const DofToQuad &maps, Vector &emat) +{ + switch (dim) + { + case 2:ElasticityAssembleEA<2>(IBlock, JBlock, nDofs, fespace, lambda, mu, geom, + maps, + emat); break; + case 3:ElasticityAssembleEA<3>(IBlock, JBlock, nDofs, fespace, lambda, mu, geom, + maps, + emat); break; + default: + MFEM_ABORT("Only dimensions 2 and 3 supported."); + break; + } +} + +} // 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..edd522796c --- /dev/null +++ b/fem/integ/bilininteg_elasticity_kernels.hpp @@ -0,0 +1,400 @@ +// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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. + +/** + * @file + * @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" + +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. IBlock and JBlock +/// are the dimensional component that is integrated. They must both be +/// either non-negative or both be negative. Negative values imply that the +/// whole dimensional system is evaluated. Otherwise, only one block of the +/// system is evaluated. +/// +/// Example: In 2D, A = [A_00 A_01], x = [x_0], y = [y_0] +/// [A_10 A_11] [x_1] [y_1]. +/// So IBlock = 0, JBlock = 1 implies only y_0 += A_01*x_1 is evaluated. +/// +/// The sizes of x, y, and Q depend on whether or not a single component is +/// evaluated. Also, fespace is either a vector or scalar space depending on if +/// a single component is used. +/// @param[in] dim 2 or 3 +/// @param[in] nDofs Number of scalar dofs per element. +/// @param[in] fespace Vector (IBlock, JBlock<0) or scalar FE space. +/// @param[in] lambda Quadrature function for first Lame param. +/// @param[in] mu Quadrature function for first 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 or nDofs x numEls. +/// @param Q Scratch Q-Vector. nQuad x dim x dim x numEls or nQuad x dim x numEls. +/// @param[in,out] y Ax gets added to this. nDofs x dim x numEls or nDofs x numEls. +/// @param[in] IBlock The row dimensional component. <= dim - 1 +/// @param[in] JBlock The column dimensional component. <= dim -1 +void ElasticityAddMultPA(const int dim, const int nDofs, + const FiniteElementSpace &fespace, const QuadratureFunction &lambda, + const QuadratureFunction &mu, const GeometricFactors &geom, + const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y, + const int IBlock = -1, const int JBlock = -1); + +/// @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 IBlock = 0, JBlock = 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 and crash. +/// @param[in] dim 2 or 3 +/// @param[in] IBlock The row dimensional component. 0 <= IBlock <= dim - 1 +/// @param[in] JBlock The column dimensional component. 0 <= JBlock<= dim -1 +/// @param[in] nDofs Number of scalar dofs per element. +/// @param[in] fespace Scalar FE space. +/// @param[in] lambda Quadrature function for first Lame param. +/// @param[in] mu Quadrature function for first 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 IBlock, const int JBlock, + const int nDofs, + const FiniteElementSpace &fespace, const QuadratureFunction &lambda, + const QuadratureFunction &mu, const GeometricFactors &geom, + const DofToQuad &maps, Vector &emat); + +/// @brief Elasticity kernel for AssembleDiagonalPA. Whole system only. +/// +/// @param[in] dim 2 or 3 +/// @param[in] nDofs Number of scalar dofs per element. +/// @param[in] fespace Vector (IBlock, JBlock<0) or scalar FE space. +/// @param[in] lambda Quadrature function for first Lame param. +/// @param[in] mu Quadrature function for first 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 FiniteElementSpace &fespace, const QuadratureFunction &lambda, + const QuadratureFunction &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 QuadratureFunction &lambda, const QuadratureFunction &mu, + const GeometricFactors &geom, const DofToQuad &maps, const Vector &x, + QuadratureFunction &QVec, Vector &y) +{ + //make sure either IBlock and JBlock are either both non-negative or both strictly negative. + static_assert(IBlock < 0 == JBlock < 0); + static constexpr int d = dim; + static constexpr int qLower = IBlock < 0 ? 0 : IBlock; + static constexpr int qUpper = IBlock < 0 ? d : IBlock+1; + static constexpr int qSize = qUpper-qLower; + static constexpr int aLower = JBlock < 0 ? 0 : JBlock; + static constexpr int aUpper = JBlock < 0 ? d : JBlock+1; + static constexpr int aSize = aUpper-aLower; + static constexpr bool isComponent = IBlock >= 0; + + //Assuming all elements are the same + const auto &ir = lambda.GetIntRule(0); + const QuadratureInterpolator *E_To_Q_Map = fespace.GetQuadratureInterpolator( + ir); + const FiniteElement *fe = fespace.GetFE(0); + E_To_Q_Map->DisableTensorProducts(); + E_To_Q_Map->SetOutputLayout(QVectorLayout::byNODES); + //interpolate physical derivatives to quadrature points. + Vector junk; + E_To_Q_Map->Mult(x,QuadratureInterpolator::PHYSICAL_DERIVATIVES, junk, + QVec, junk); + + int numPoints = ir.GetNPoints(); + 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, qSize, numEls); + const double *ipWeights = ir.GetWeights().Read(); + MFEM_FORALL_2D(e, numEls, numPoints,1,1, + { + // 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,JBlock) + (JBlock==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, numEls); + auto yDev = Reshape(y.ReadWrite(), nDofs, qSize, numEls); + MFEM_FORALL_2D(e, numEls, qSize, nDofs,1, + { + 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 FiniteElementSpace &fespace, const QuadratureFunction &lambda, + const QuadratureFunction &mu, const GeometricFactors &geom, + const DofToQuad &maps, QuadratureFunction &QVec, Vector &diag) +{ + //Assuming all elements are the same + const auto &ir = lambda.GetIntRule(0); + static constexpr int d = dim; + int numPoints = ir.GetNPoints(); + 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(e, numEls, numPoints,1,1, + { + 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, numEls); + MFEM_FORALL_2D(e, numEls, d, nDofs,1, + { + 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 IBlock, const int JBlock, const int nDofs, + const FiniteElementSpace &fespace, const QuadratureFunction &lambda, + const QuadratureFunction &mu, const GeometricFactors &geom, + const DofToQuad &maps, Vector &emat) +{ + //Assuming all elements are the same + const auto &ir = lambda.GetIntRule(0); + static constexpr int d = dim; + int numPoints = ir.GetNPoints(); + 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(e, numEls, nDofs,nDofs,1, + { + 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 == IBlock)*invJ(m,b) + (b==IBlock)*invJ(m, + a))*((a == JBlock)*invJ(n, + b) + (b==JBlock)*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,IBlock)*invJ(n,JBlock) + + 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..af5d139766 --- /dev/null +++ b/fem/integ/bilininteg_elasticity_pa.cpp @@ -0,0 +1,98 @@ +// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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::AssemblePA(const FiniteElementSpace &fes) +{ + MFEM_VERIFY(fes.GetOrdering() == Ordering::byNODES, + "Elasticity PA only implemented for byNODES ordering."); + if (!parent) + { + fespace = &fes; + } + else + { + MFEM_VERIFY(parent->PACalled, + "Parent integrator needs to have been partially assembled."); + } + + if (!parent) + { + const auto el = fes.GetFE(0); + ndofs = el->GetDof(); + const auto mesh = fes.GetMesh(); + dim = fes.GetVDim(); + const IntegrationRule *ir = IntRule; + if (ir == NULL) + { + //This is where it's assumed that all elements are the same. + const auto Trans = fes.GetElementTransformation(0); + int order = 2 * Trans->OrderGrad(el); + IntRule = &IntRules.Get(el->GetGeomType(), order); + } + geom = mesh->GetGeometricFactors(*IntRule, GeometricFactors::JACOBIANS); + quad_space = std::make_shared(*mesh, *IntRule); + lambda_quad = std::make_shared(*quad_space); + mu_quad = std::make_shared(*quad_space); + q_vec = std::make_shared(*quad_space, dim*dim); + lambda->Project(*lambda_quad); + mu->Project(*mu_quad); + maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, DofToQuad::FULL); + } + PACalled = true; +} + +void ElasticityIntegrator::AssembleDiagonalPA(Vector &diag) +{ + q_vec->SetVDim(dim*dim*dim*dim); + internal::ElasticityAssembleDiagonalPA(dim, ndofs, *fespace, *lambda_quad, + *mu_quad, *geom, *maps, *q_vec, diag); +} + +void ElasticityIntegrator::AddMultPA(const Vector &x, Vector &y) const +{ + if (!parent) + { + q_vec->SetVDim(dim*dim); + } + else + { + //If it has a parent, it is a component integrator. + q_vec->SetVDim(dim); + } + + internal::ElasticityAddMultPA(dim, ndofs, *fespace, *lambda_quad, *mu_quad, + *geom, *maps, x, *q_vec, y, IBlock, JBlock); +} + +void ElasticityIntegrator::AddMultTransposePA(const Vector &x, Vector &y) const +{ + if (!parent) + { + AddMultPA(x, y); + } + else + { + //This block operator is symmetric, so simply switch IBlock and JBlock. + internal::ElasticityAddMultPA(dim, ndofs, *fespace, *lambda_quad, *mu_quad, + *geom, *maps, x, *q_vec, y, JBlock, IBlock); + } +} + +} // namespace mfem diff --git a/fem/pfespace.cpp b/fem/pfespace.cpp index 51f0df2f60..f1c1377226 100644 --- a/fem/pfespace.cpp +++ b/fem/pfespace.cpp @@ -1032,7 +1032,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 8f574670b9..aeb9fc0d79 100644 --- a/fem/pfespace.hpp +++ b/fem/pfespace.hpp @@ -359,7 +359,7 @@ public: boundary attributes marked in the array bdr_attr_is_ess. */ virtual void GetEssentialTrueDofs(const Array &bdr_attr_is_ess, Array &ess_tdof_list, - int component = -1); + int component = -1) const; /** If the given ldof is owned by the current processor, return its local tdof number, otherwise return -1 */ diff --git a/fem/restriction.cpp b/fem/restriction.cpp index da4eab5fac..f03829b2d2 100644 --- a/fem/restriction.cpp +++ b/fem/restriction.cpp @@ -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/linalg/blockoperator.cpp b/linalg/blockoperator.cpp index 62c9935f0a..b77f3659fa 100644 --- a/linalg/blockoperator.cpp +++ b/linalg/blockoperator.cpp @@ -18,7 +18,8 @@ namespace mfem { -BlockOperator::BlockOperator(const Array & offsets) +BlockOperator::BlockOperator(const Array & offsets, + const bool owns_offsets) : Operator(offsets.Last()), owns_blocks(0), nRowBlocks(offsets.Size() - 1), @@ -29,12 +30,21 @@ BlockOperator::BlockOperator(const Array & offsets) coef(nRowBlocks, nColBlocks) { op = static_cast(NULL); - row_offsets.MakeRef(offsets); - col_offsets.MakeRef(offsets); + if (owns_offsets) + { + row_offsets = offsets; + col_offsets = offsets; + } + else + { + row_offsets.MakeRef(offsets); + col_offsets.MakeRef(offsets); + } } BlockOperator::BlockOperator(const Array & row_offsets_, - const Array & col_offsets_) + const Array & col_offsets_, + const bool owns_offsets) : Operator(row_offsets_.Last(), col_offsets_.Last()), owns_blocks(0), nRowBlocks(row_offsets_.Size()-1), @@ -45,8 +55,16 @@ BlockOperator::BlockOperator(const Array & row_offsets_, coef(nRowBlocks, nColBlocks) { op = static_cast(NULL); - row_offsets.MakeRef(row_offsets_); - col_offsets.MakeRef(col_offsets_); + if (owns_offsets) + { + row_offsets = row_offsets_; + col_offsets = col_offsets_; + } + else + { + row_offsets.MakeRef(row_offsets_); + col_offsets.MakeRef(col_offsets_); + } } void BlockOperator::SetDiagonalBlock(int iblock, Operator *opt, double c) @@ -282,10 +300,11 @@ void BlockLowerTriangularPreconditioner::Mult (const Vector & x, MFEM_ASSERT(x.Size() == width, "incorrect input Vector size"); MFEM_ASSERT(y.Size() == height, "incorrect output Vector size"); - yblock.Update(y.GetData(),offsets); - xblock.Update(x.GetData(),offsets); + x.Read(); + y.ReadWrite(); y = 0.0; + xblock.Update(const_cast(x),offsets); + yblock.Update(y,offsets); - y = 0.0; for (int iRow=0; iRow < nBlocks; ++iRow) { tmp.SetSize(offsets[iRow+1] - offsets[iRow]); @@ -309,6 +328,11 @@ void BlockLowerTriangularPreconditioner::Mult (const Vector & x, yblock.GetBlock(iRow) = tmp2; } } + + for (int i=0; i < nBlocks; ++i) + { + yblock.GetBlock(i).SyncAliasMemory(y); + } } // Action of the transpose operator @@ -318,10 +342,11 @@ void BlockLowerTriangularPreconditioner::MultTranspose (const Vector & x, MFEM_ASSERT(x.Size() == height, "incorrect input Vector size"); MFEM_ASSERT(y.Size() == width, "incorrect output Vector size"); - yblock.Update(y.GetData(),offsets); - xblock.Update(x.GetData(),offsets); + x.Read(); + y.ReadWrite(); y = 0.0; + xblock.Update(const_cast(x),offsets); + yblock.Update(y,offsets); - y = 0.0; for (int iRow=nBlocks-1; iRow >=0; --iRow) { tmp.SetSize(offsets[iRow+1] - offsets[iRow]); @@ -345,6 +370,12 @@ void BlockLowerTriangularPreconditioner::MultTranspose (const Vector & x, yblock.GetBlock(iRow) = tmp2; } } + + for (int i=0; i < nBlocks; ++i) + { + yblock.GetBlock(i).SyncAliasMemory(y); + } + } BlockLowerTriangularPreconditioner::~BlockLowerTriangularPreconditioner() diff --git a/linalg/blockoperator.hpp b/linalg/blockoperator.hpp index ca03b493a5..053cf283bb 100644 --- a/linalg/blockoperator.hpp +++ b/linalg/blockoperator.hpp @@ -41,7 +41,7 @@ public: * nRowBlocks+1). Note: BlockOperator will not own/copy the data contained * in offsets. */ - BlockOperator(const Array & offsets); + BlockOperator(const Array & offsets, const bool owns_offsets = false); //! Constructor for general BlockOperators. /** * row_offsets: offsets that mark the start of each row block (size @@ -49,7 +49,8 @@ public: * block (size nColBlocks+1). Note: BlockOperator will not own/copy the * data contained in offsets. */ - BlockOperator(const Array & row_offsets, const Array & col_offsets); + BlockOperator(const Array & row_offsets, const Array & col_offsets, + const bool owns_offsets = false); /// Copy assignment is not supported BlockOperator &operator=(const BlockOperator &) = delete; diff --git a/linalg/operator.cpp b/linalg/operator.cpp index 1f214ece7a..f50a838326 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -544,12 +544,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,8 +568,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 auto d_y = y.ReadWrite(); @@ -591,6 +605,18 @@ 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); +} + RectangularConstrainedOperator::RectangularConstrainedOperator( Operator *A, const Array &trial_list, diff --git a/linalg/operator.hpp b/linalg/operator.hpp index baa9bf7672..6f17e772a7 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -924,6 +924,13 @@ public: the vectors, and "_i" -- the rest of the entries. */ virtual void Mult(const Vector &x, Vector &y) const; + virtual void MultTranspose(const Vector &x, Vector &y) const; + + /** @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; } } }; diff --git a/miniapps/solvers/CMakeLists.txt b/miniapps/solvers/CMakeLists.txt index 3320bf9d98..6632f23b34 100644 --- a/miniapps/solvers/CMakeLists.txt +++ b/miniapps/solvers/CMakeLists.txt @@ -21,6 +21,12 @@ if (MFEM_USE_MPI) EXTRA_HEADERS lor_mms.hpp LIBRARIES mfem) + add_mfem_miniapp(lor_elast + MAIN lor_elast.cpp + EXTRA_SOURCES block_fespace_operator.cpp + EXTRA_HEADERS block_fespace_operator.hpp + LIBRARIES mfem) + # Add the corresponding tests to the "test" target if (MFEM_ENABLE_TESTING) add_test(NAME block-solvers-constant_np${MFEM_MPI_NP} diff --git a/miniapps/solvers/README b/miniapps/solvers/README index c438a65b9e..fae289121b 100644 --- a/miniapps/solvers/README +++ b/miniapps/solvers/README @@ -76,3 +76,36 @@ using the low-order system). In parallel, hypre's scalable AMG solvers are used for the low-order systems: `HypreBoomerAMG` is used for H1 and L2 spaces, `HypreAMS` is used for H(curl) (and H(div) in 2D), and `HypreADS` is used for H(div) in 3D. + +# Elasticity LOR Block Preconditioning + +The miniapp `lor_elast` demonstrates how to precondition a vector-valued PDE +on GPUs. The miniapp supports partial assembly, and the low-order refined +preconditioner can be assembled entirely on the GPU. + +In 3D, the elasticity operator can be broken into vector components of the form + + A = [A_00 A_01 A_02] + [A_10 A_11 A_12] + [A_20 A_21 A_22] + +Traditional AMG requires having the entire matrix in memory which can be +prohibitive on GPUs. An effective preconditioning strategy for materials +which are not nearly incompressible is to use +P^{-1} = diag(AMG(A_00), AMG(A_11), AMG(A_22)) where AMG(A) is the AMG +approximation inv(A) [3]. This requires storing 3 blocks instead of 9, +but this is still prohibitive for high order discretizations on GPUs. This +is alleviated here by performing AMG on the low-order refined +operators instead. + +There is also an option which replaces P^{-1} with +diag(inv(A_00), inv(A_11), inv(A_22)) where the action of inv(A_ii) is performed +with a CG inner solve that is preconditioned with AMG(A_ii). This seems to give +order independent conditioning of the outer CG solve, but is much slower than +performing a single AMG iteration per block. + +This miniapp allows timing comparisons with the LEGACY assembly approach. + +[3] Mihajlović, M.D. and Mijalković, S., "A component decomposition + preconditioning for 3D stress analysis problems", Numerical Linear + Algebra with Applications, 2002. \ No newline at end of file diff --git a/miniapps/solvers/block_fespace_operator.cpp b/miniapps/solvers/block_fespace_operator.cpp new file mode 100644 index 0000000000..e6ff867c8b --- /dev/null +++ b/miniapps/solvers/block_fespace_operator.cpp @@ -0,0 +1,97 @@ +#include "block_fespace_operator.hpp" + +namespace mfem +{ + +BlockFESpaceOperator::BlockFESpaceOperator(const + std::vector &fespaces): + BlockOperator(GetBlockOffsets(fespaces),true), + offsets(GetBlockOffsets(fespaces)), + prolongColOffsets(GetProColBlockOffsets(fespaces)), + restrictRowOffsets(GetResRowBlockOffsets(fespaces)), + prolongation(offsets,prolongColOffsets), + restriction(restrictRowOffsets, offsets) +{ + for (size_t i = 0; i (fespaces[i]->GetProlongationMatrix())); + restriction.SetDiagonalBlock(i, + const_cast(fespaces[i]->GetRestrictionOperator())); + } +} + +Array BlockFESpaceOperator::GetBlockOffsets(const + std::vector &fespaces) +{ + Array offsets(fespaces.size()+1); + offsets[0] = 0; + for (size_t i = 1; i <=fespaces.size(); i++) + { + offsets[i] = fespaces[i-1]->GetVSize(); + } + offsets.PartialSum(); + offsets.Print(); + return offsets; +} + +Array BlockFESpaceOperator::GetProColBlockOffsets(const + std::vector &fespaces) +{ + Array offsets(fespaces.size()+1); + offsets[0] = 0; + for (size_t i = 1; i <=fespaces.size(); i++) + { + const auto *prolong = fespaces[i-1]->GetProlongationMatrix(); + if (prolong) + { + offsets[i] = prolong->Width(); + } + else + { + offsets[i] = fespaces[i-1]->GetVSize(); + } + offsets[i] = fespaces[i-1]->GetTrueVSize(); + } + offsets.PartialSum(); + offsets.Print(); + return offsets; +} + +Array BlockFESpaceOperator::GetResRowBlockOffsets(const + std::vector &fespaces) +{ + Array offsets(fespaces.size()+1); + std::cout << "fespaces.size() = " << fespaces.size() << std::endl; + offsets[0] = 0; + for (size_t i = 1; i <=fespaces.size(); i++) + { + const auto *restriction = fespaces[i-1]->GetRestrictionOperator(); + if (restriction) + { + offsets[i] = restriction->Height(); + } + else + { + offsets[i] = fespaces[i-1]->GetVSize(); + } + offsets[i] = fespaces[i-1]->GetTrueVSize(); + } + offsets.PartialSum(); + offsets.Print(); + return offsets; +} + +const Operator* BlockFESpaceOperator::GetProlongation() const +{ + return &prolongation; +} + +const Operator* BlockFESpaceOperator::GetRestriction() const +{ + return &restriction; +} + +}//namespace mfem \ No newline at end of file diff --git a/miniapps/solvers/block_fespace_operator.hpp b/miniapps/solvers/block_fespace_operator.hpp new file mode 100644 index 0000000000..1b245d5d39 --- /dev/null +++ b/miniapps/solvers/block_fespace_operator.hpp @@ -0,0 +1,44 @@ +#ifndef MFEM_BLOCK_FESPACE_OPERATOR +#define MFEM_BLOCK_FESPACE_OPERATOR + +#include "mfem.hpp" + +namespace mfem +{ + +/// @brief Operator for block systems arising from different arbitrarily many finite element spaces. +/// +/// This operator can be used with FormLinearSystem to impose boundary +/// conditions for block systems arise from mixing many types of +/// finite element spaces. Each block is intended to operate on +/// L-Vectors. For example, a block may be a BilinearForm. +class BlockFESpaceOperator : public BlockOperator +{ +private: + Array offsets; + Array prolongColOffsets; + Array restrictRowOffsets; + /// @brief Maps local dofs of each block to true dofs. + BlockOperator prolongation; + /// @brief Maps true dofs of each block to local dofs. + BlockOperator restriction; + /// @brief Computes offsets for parent BlockOperator. + static Array GetBlockOffsets(const std::vector + &fespaces); + /// @brief Computes col_offsets for prolongation operator. + static Array GetProColBlockOffsets(const + std::vector &fespaces); + /// @brief Computes row_offsets for restriction operator. + static Array GetResRowBlockOffsets(const + std::vector &fespaces); +public: + /// @brief Constructor for BlockFESpaceOperator. + /// @param[in] fespaces Finite element spaces for diagonal blocks. Spaces are not owned. + BlockFESpaceOperator(const std::vector &fespaces); + virtual const Operator* GetProlongation () const; + virtual const Operator* GetRestriction () const; +}; + +}//namespace mfem + +#endif \ No newline at end of file diff --git a/miniapps/solvers/lor_elast.cpp b/miniapps/solvers/lor_elast.cpp new file mode 100644 index 0000000000..46ed253618 --- /dev/null +++ b/miniapps/solvers/lor_elast.cpp @@ -0,0 +1,525 @@ +// -------------------------------------------- +// Elasticity LOR Block Preconditioning Miniapp +// -------------------------------------------- +// +// Description: +// The purpose of this miniapp is to demonstrate how to effectively +// precondition vector valued PDEs, such as elasticity, on GPUs. +// +// Using 3D elasticity as an example, the linear operator can be broken into +// vector components and has the form: +// +// A = [A_00 A_01 A_02] +// [A_10 A_11 A_12] +// [A_20 A_21 A_22] +// +// Traditional AMG requires having the entire matrix in memory which can be +// prohibitive on GPUs. An effective preconditioning strategy for materials +// which are not nearly incompressible is to use +// P^{-1} = diag(AMG(A_00), AMG(A_11), AMG(A_22)) where AMG(A) is the AMG +// approximation inv(A) [1]. This requires storing 3 blocks instead of 9, +// but this is still prohibitive for high order discretizations on GPUs. This +// is alleviated here by performing AMG on the low-order refined +// operators instead. +// +// This miniapp solves the same beam problem described in Example 2. Run +// times of the new solver (partial assembly with block diagonal LOR-AMG) +// can be compared with the LEGACY approach of assembling the full matrix +// and preconditioning with AMG. +// +// For the partial assembly approach, the operator actions and component +// matrix assembly are supported on GPUs. +// +// The LEGACY approach should be performed with "-vdim" ordering while PARTIAL +// requires "-nodes". +// +// There is also an option "-ss" or "--sub-solve" for the partial assembly +// version which replaces P^{-1} with diag(inv(A_00), inv(A_11), inv(A_22)) +// where the action of inv(A_ii) is performed with a CG inner solve that +// is preconditioned with AMG(A_ii). This seems to give order independent +// conditioning of the outer CG solve, but is much slower than performing +// a single AMG iteration per block. +// +// This miniapp supports beam-tri.mesh, beam-quad.mesh, and beam-hex.mesh. +// beam-tet.mesh can be run if MFEM is build with +// ElementRestriction::MaxNbNbr set to 32 instead of 16. +// +// This miniapp shows how to test if the derived component integrators are +// correct using BlockFESpaceOperator. If "-ca" (for componentwise action) +// is used, a block operator where each block is a component of the +// elasticity operator is used for A rather than the vector version. +// This yields the same answer, but is less efficient. "-ca" can be called +// with "-pa" for a version where each component is partially assembled, or +// without where each component is called with full assembly, although the +// latter may only work for order 1 on GPUs. +// +// Sample runs: +// +// ./lor_elast -m ../../data/beam-tri.mesh +// ./lor_elast -m ../../data/beam-quad.mesh +// ./lor_elast -m ../../data/beam-hex.mesh +// mpirun -np 4 ./lor_elast -m ../../data/beam-hex.mesh -l 5 -vdim +// mpirun -np 4 ./lor_elast -m ../../data/beam-hex.mesh -l 5 -vdim -elast +// ./lor_elast --device cuda -m ../../data/beam-hex.mesh -l 4 -o 2 -pa +// ./lor_elast --device cuda -m ../../data/beam-hex.mesh -l 4 -o 2 -pa -pv +// ./lor_elast --device cuda -m ../../data/beam-hex.mesh -l 4 -o 2 -pa -ss +// ./lor_elast --device cuda -m ../../data/beam-hex.mesh -l 4 -o 2 -pa -ca +// ./lor_elast --device cuda -m ../../data/beam-hex.mesh -l 5 -ca +// +// References: +// [1] Mihajlović, M.D. and Mijalković, S., "A component decomposition +// preconditioning for 3D stress analysis problems", Numerical Linear +// Algebra with Applications, 2002. +// + +#include "mfem.hpp" +#include +#include +#include "block_fespace_operator.hpp" + +using namespace std; +using namespace mfem; + +int main(int argc, char *argv[]) +{ + // 1. Initialize MPI and HYPRE. + Mpi::Init(argc, argv); + int num_procs = Mpi::WorldSize(); + int myid = Mpi::WorldRank(); + Hypre::Init(); + + // 2. Parse command-line options. + const char *mesh_file = "../../data/beam-tri.mesh"; + int order = 1; + bool pa = false; + bool paraview = false; + bool amg_elast = 0; + bool reorder_space = true; + const char *device_config = "cpu"; + int ref_levels = 0; + bool sub_solve = false; + bool componentwise_action = false; + + OptionsParser args(argc, argv); + args.AddOption(&mesh_file, "-m", "--mesh", + "Mesh file to use."); + args.AddOption(&order, "-o", "--order", + "Finite element order (polynomial degree)."); + args.AddOption(&amg_elast, "-elast", "--amg-for-elasticity", "-sys", + "--amg-for-systems", + "Use the special AMG elasticity solver (GM/LN approaches), " + "or standard AMG for systems (unknown approach)."); + args.AddOption(&sub_solve, "-ss", "--sub-solve", "-no-ss", + "--no-sub-solve", + "Blocks are solved with a few CG iterations instead of a single AMG application."); + args.AddOption(&pa, "-pa", "--partial-assembly", "-no-pa", + "--no-partial-assembly", "Enable Partial Assembly."); + args.AddOption(&reorder_space, "-nodes", "--by-nodes", "-vdim", "--by-vdim", + "Use byNODES ordering of vector space instead of byVDIM"); + args.AddOption(&device_config, "-d", "--device", + "Device configuration string, see Device::Configure()."); + args.AddOption(&ref_levels, "-l","--reflevels", + "How many mesh refinements to perform."); + args.AddOption(&componentwise_action, "-ca", "--component-action", "-no-ca", + "--no-component-action", + "Uses partial assembly with a block operator of components instead of the monolithic vector integrator."); + args.AddOption(¶view, "-pv", "--paraview", "-no-pv", + "--no-paraview", + "Enable or disable ParaView DataCollection output."); + args.Parse(); + if (!args.Good()) + { + if (myid == 0) + { + args.PrintUsage(cout); + } + return 1; + } + if (myid == 0) + { + args.PrintOptions(cout); + } + + // 3. Enable hardware devices such as GPUs, and programming models such as + // CUDA, OCCA, RAJA and OpenMP based on command line options. + Device device(device_config); + if (myid == 0) { device.Print(); } + // 4. Read the (serial) mesh from the given mesh file on all processors. We + // can handle triangular, quadrilateral, tetrahedral, hexahedral, surface + // and volume meshes with the same code. + Mesh mesh(mesh_file, 1, 1); + int dim = mesh.Dimension(); + + if (mesh.attributes.Max() < 2 || mesh.bdr_attributes.Max() < 2) + { + if (myid == 0) + cerr << "\nInput mesh should have at least two materials and " + << "two boundary attributes! (See schematic in ex2.cpp)\n" + << endl; + return 3; + } + + // 5. Refine the serial mesh on all processors to increase the resolution. + { + for (int l = 0; l < ref_levels; l++) + { + mesh.UniformRefinement(); + } + } + + // 6. Define a parallel mesh by a partitioning of the serial mesh. + ParMesh pmesh(MPI_COMM_WORLD, mesh); + + // 7. Define a parallel finite element spaces on the parallel mesh. Here we + // use vector finite elements, i.e. dim copies of a scalar finite element + // space. If using partial assembly, also assemble the low order refined + // (LOR) fespace. + H1_FECollection fec(order, dim); + ParFiniteElementSpace fespace(&pmesh, &fec, dim, + reorder_space ? Ordering::byNODES : Ordering::byVDIM); + unique_ptr LOR_disc; + if (pa || componentwise_action) + { + LOR_disc.reset(new ParLORDiscretization(fespace)); + LOR_disc->GetParFESpace(); + } + HYPRE_BigInt size = fespace.GlobalTrueVSize(); + if (myid == 0) + { + cout << "Number of finite element unknowns: " << size << endl + << "Assembling: " << flush; + } + + // 8. Determine the list of true (i.e. parallel conforming) essential + // boundary dofs. In this example, the boundary conditions are defined by + // marking only boundary attribute 1 from the mesh as essential and + // converting it to a list of true dofs. + Array ess_tdof_list, ess_bdr(pmesh.bdr_attributes.Max()); + ess_bdr = 0; + ess_bdr[0] = 1; + fespace.GetEssentialTrueDofs(ess_bdr, ess_tdof_list); + + // 9. Set up the parallel linear form b(.) which corresponds to the + // right-hand side of the FEM linear system. In this case, b_i equals the + // boundary integral of f*phi_i where f represents a "pull down" force on + // the Neumann part of the boundary and phi_i are the basis functions in + // the finite element fespace. The force is defined by the object f, which + // is a vector of Coefficient objects. The fact that f is non-zero on + // boundary attribute 2 is indicated by the use of piece-wise constants + // coefficient for its last component. + VectorArrayCoefficient f(dim); + for (int i = 0; i < dim-1; i++) + { + f.Set(i, new ConstantCoefficient(0.0)); + } + { + Vector pull_force(pmesh.bdr_attributes.Max()); + pull_force = 0.0; + pull_force(1) = -1.0e-2; + f.Set(dim-1, new PWConstCoefficient(pull_force)); + } + + ParLinearForm b(&fespace); + b.AddBoundaryIntegrator(new VectorBoundaryLFIntegrator(f)); + if (myid == 0) + { + cout << "r.h.s. ... " << flush; + } + b.Assemble(); + + // 10. Define the solution vector x as a parallel finite element grid + // function corresponding to fespace. Initialize x with initial guess of + // zero, which satisfies the boundary conditions. + ParGridFunction x(&fespace); + x = 0.0; + + // 11. Set up the parallel bilinear form a(.,.) on the finite element space + // corresponding to the linear elasticity integrator with piece-wise + // constants coefficient lambda and mu. + Vector lambda(pmesh.attributes.Max()); + lambda = 1.0; + lambda(0) = lambda(1)*50; + PWConstCoefficient lambda_func(lambda); + Vector mu(pmesh.attributes.Max()); + mu = 1.0; + mu(0) = mu(1)*50; + PWConstCoefficient mu_func(mu); + ElasticityIntegrator integrator(lambda_func, mu_func); + + ParBilinearForm a(&fespace); + if (pa || componentwise_action) + { + a.SetAssemblyLevel( + AssemblyLevel::PARTIAL); + a.ExtUseTensorBasis(false); + a.ExtUseTensorBasis(false); + } + a.AddDomainIntegrator(&integrator); + a.UseExternalIntegrators(); + + // 12. Assemble the parallel bilinear form and the corresponding linear + // system, applying any necessary transformations such as: parallel + // assembly, eliminating boundary conditions, applying conforming + // constraints for non-conforming AMR, static condensation, etc. + if (myid == 0) { cout << "matrix ... " << flush; } + StopWatch total_timer{}; + StopWatch assembly_timer{}; + assembly_timer.Start(); + total_timer.Start(); + a.Assemble(); + OperatorPtr A; + Vector B, X; + Operator *a_lhs = componentwise_action ? nullptr : &a; + if (!componentwise_action) + { + a.FormLinearSystem(ess_tdof_list, x, b, A, X, B); + } + if (myid == 0) + { + cout << "done." << endl; + cout << "Size of linear system: " << fespace.GlobalTrueVSize() << endl; + } + + Array block_offsets(dim + 1); + block_offsets[0] = 0; + BlockDiagonalPreconditioner *blockDiag; + unique_ptr prec = nullptr; + + // 13. For partial assembly, assemble forms on LOR space. Construct the block + // diagonal preconditioner by fully assembling the component bilinear + // on the LOR space. If additionally "-ss" is enabled, create the + // block CG solvers and the high order, partially assembled components. + vector> bilinear_forms; + bilinear_forms.reserve(dim); + vector> lor_block; + lor_block.reserve(dim); + //amg_blocks stores preconditioners of lor_block. + vector amg_blocks; + amg_blocks.reserve(dim); + //cg_blocks only gets used if -ss is enabled. + vector> cg_blocks; + cg_blocks.reserve(dim); + //diag_ho only used if -hoa enabled. The high order partial assembled operators + //with the essential dofs eliminated and constrained to one. + vector> ho_bilinear_form_blocks; + ho_bilinear_form_blocks.reserve(dim); + vector> diag_ho; + diag_ho.reserve(dim); + //If -ca is used, component bilinear forms are stored in pa_components, and + //pointers to fespaces. + vector> pa_components; + pa_components.reserve(dim*dim); + vector fespaces; + fespaces.reserve(dim); + //get block essential boundary info. + //need to allocate here since constrained operator will not own essential dofs. + Array ess_tdof_list_block_ho, ess_bdr_block_ho(pmesh.bdr_attributes.Max()); + ess_bdr_block_ho = 0; + ess_bdr_block_ho[0] = 1; + ElasticityIntegrator lor_integrator(lambda_func, mu_func); + if (pa || componentwise_action) + { + // 13(a) Create the diagonal LOR matrices and corresponding AMG preconditioners. + lor_integrator.AssemblePA(LOR_disc->GetParFESpace()); + for (int j = 0; j < dim; j++) + { + //create the LOR matrix and corresponding AMG preconditioners. + auto *block = static_cast + (lor_integrator.ComponentIntegrator(j,j)); + auto *fes_block = dynamic_cast + (const_cast + (block->GetFESpace()));//If get fespace was part of bilinear form, wouldn't need static_cast above. + bilinear_forms.emplace_back(new ParBilinearForm(fes_block)); + bilinear_forms[j]->SetAssemblyLevel(AssemblyLevel::FULL); + bilinear_forms[j]->ExtUseTensorBasis(false); + bilinear_forms[j]->EnableSparseMatrixSorting(Device::IsEnabled()); + bilinear_forms[j]->AddDomainIntegrator(block); + bilinear_forms[j]->Assemble(); + + //get block essential boundary info + Array ess_tdof_list_block, ess_bdr_block(pmesh.bdr_attributes.Max()); + ess_bdr_block = 0; + ess_bdr_block[0] = 1; + fes_block->GetEssentialTrueDofs(ess_bdr_block, ess_tdof_list_block); + lor_block.emplace_back(bilinear_forms[j]->ParallelAssemble()); + lor_block[j]->EliminateBC(ess_tdof_list_block, + Operator::DiagonalPolicy::DIAG_ONE);//not sure which diagonal policy to use + amg_blocks.emplace_back(); + amg_blocks[j].SetStrengthThresh(0.25); + amg_blocks[j].SetRelaxType(16); //Chebyshev + amg_blocks[j].SetOperator(*lor_block[j]); + block_offsets[j+1] = amg_blocks[j].Height(); + // 13(b) If needed, create the block components for operator action. + if (componentwise_action) + { + for (int i = 0; i < dim; i++) + { + auto *block = static_cast(integrator.ComponentIntegrator( + i,j)); + auto *fes_block = dynamic_cast + (const_cast(block->GetFESpace())); + if (i == j) + { + fespaces.emplace_back(fes_block); + } + pa_components.emplace_back(new ParBilinearForm(fes_block)); + pa_components[i + dim*j]->SetAssemblyLevel(pa ? AssemblyLevel::PARTIAL : + AssemblyLevel::FULL); + pa_components[i + dim*j]->ExtUseTensorBasis(false); + pa_components[i + dim*j]->EnableSparseMatrixSorting(Device::IsEnabled()); + pa_components[i + dim*j]->AddDomainIntegrator(block); + pa_components[i + dim*j]->Assemble(); + } + } + } + block_offsets.PartialSum(); + // 13(c) If needed, create CG solvers for diagonal sub-systems. + if (sub_solve) + { + //Create diagonal high order partial assembly operators. + for (int i = 0; i < dim; i++) + { + auto *block = static_cast(integrator.ComponentIntegrator( + i,i)); + auto *fes_block = dynamic_cast + (const_cast(block->GetFESpace())); + fes_block->GetEssentialTrueDofs(ess_bdr_block_ho, ess_tdof_list_block_ho); + ho_bilinear_form_blocks.emplace_back(new ParBilinearForm(fes_block)); + ho_bilinear_form_blocks[i]->SetAssemblyLevel(AssemblyLevel::PARTIAL); + ho_bilinear_form_blocks[i]->ExtUseTensorBasis(false); + ho_bilinear_form_blocks[i]->AddDomainIntegrator(block); + ho_bilinear_form_blocks[i]->Assemble(); + const auto *prolong = fes_block->GetProlongationMatrix(); + auto *rap = new RAPOperator(*prolong, *ho_bilinear_form_blocks[i], *prolong); + diag_ho.emplace_back(new ConstrainedOperator(rap, ess_tdof_list_block_ho, true, + Operator::DiagonalPolicy::DIAG_ONE)); + } + //create CG solvers + for (int i = 0; i < dim; i++) + { + cg_blocks.emplace_back(new CGSolver(MPI_COMM_WORLD)); + cg_blocks[i]->iterative_mode = false; + cg_blocks[i]->SetOperator(*diag_ho[i]); + cg_blocks[i]->SetPreconditioner(amg_blocks[i]); + cg_blocks[i]->SetMaxIter(30); + cg_blocks[i]->SetRelTol(1e-8); + } + } + blockDiag = new BlockDiagonalPreconditioner(block_offsets); + for (int i = 0; i < dim; i++) + { + if (sub_solve) + { + blockDiag->SetDiagonalBlock(i, cg_blocks[i].get()); + } + else + { + blockDiag->SetDiagonalBlock(i, &amg_blocks[i]); + } + } + prec.reset(blockDiag); + } + else + { + // 13(d) If not using PA, configure preconditioner on global matrix. + auto *amg = new HypreBoomerAMG(*A.As()); + if (amg_elast && !a.StaticCondensationIsEnabled()) + { + amg->SetElasticityOptions(&fespace); + } + else + { + amg->SetSystemsOptions(dim, reorder_space); + } + prec.reset(amg); + } + // 13(e) For componentwise action, create block operator and form linear system. + unique_ptr A_components = nullptr; + unique_ptr pa_blocks; + if (componentwise_action) + { + pa_blocks.reset(new BlockFESpaceOperator(fespaces)); + for (int j = 0; j < dim; j++) + { + for (int i = 0; i < dim; i++) + { + pa_blocks->SetBlock(i,j,pa_components[i + dim*j].get()); + } + } + Operator *A_temp; + pa_blocks->FormLinearSystem(ess_tdof_list, x, b, A_temp, X, B); + A_components.reset(A_temp); + a_lhs = pa_blocks.get(); + } + assembly_timer.Stop(); + + // 14. Create the global CG solver, solve, and recover solution. + CGSolver solver(MPI_COMM_WORLD); + solver.SetRelTol(1e-8); + solver.SetMaxIter(2500); + solver.SetPrintLevel(1); + if (prec) { solver.SetPreconditioner(*prec); } + solver.SetOperator(A_components ? *A_components : *A); + StopWatch linear_solve_timer{}; + linear_solve_timer.Start(); + solver.Mult(B, X); + linear_solve_timer.Stop(); + + a_lhs->RecoverFEMSolution(X, b, x); + total_timer.Stop(); + + // 15. For non-NURBS meshes, make the mesh curved based on the finite element + // space. This means that we define the mesh elements through a fespace + // based transformation of the reference element. This allows us to save + // the displaced mesh as a curved mesh when using high-order finite + // element displacement field. We assume that the initial mesh (read from + // the file) is not higher order curved mesh compared to the chosen FE + // space. + pmesh.SetNodalFESpace(&fespace); + + // 16. Save in parallel the displaced mesh and the inverted solution (which + // gives the backward displacements to the original grid). This output + // can be viewed later using GLVis: "glvis -np -m mesh -g sol". + { + GridFunction *nodes = pmesh.GetNodes(); + *nodes += x; + x *= -1; + + ostringstream mesh_name, sol_name; + mesh_name << "mesh." << setfill('0') << setw(6) << myid; + sol_name << "sol." << setfill('0') << setw(6) << myid; + + ofstream mesh_ofs(mesh_name.str().c_str()); + mesh_ofs.precision(8); + pmesh.Print(mesh_ofs); + + ofstream sol_ofs(sol_name.str().c_str()); + sol_ofs.precision(8); + x.Save(sol_ofs); + } + + // 17. Save the displacement, with dispaced mesh, to VTK. + + if (paraview) + { + ParaViewDataCollection pd("lor_elast_vtk", &pmesh); + pd.RegisterField("displacement", &x); + pd.SetLevelsOfDetail(order); + pd.SetDataFormat(VTKFormat::BINARY); + pd.SetHighOrderOutput(true); + pd.SetCycle(0); + pd.SetTime(0.0); + pd.Save(); + } + + //Print times + if (myid == 0) + { + cout << "Elapsed Times\n"; + cout << "Assembly (s) = " << assembly_timer.RealTime()<< endl; + cout << "Linear Solve (s) = " << linear_solve_timer.RealTime() << endl; + cout << "Total Solve (s) " << total_timer.RealTime() << endl; + } + + return 0; +} diff --git a/miniapps/solvers/makefile b/miniapps/solvers/makefile index b36aa1bc3d..522707959c 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/makefile @@ -24,8 +24,11 @@ MFEM_LIB_FILE = mfem_is_not_built BLOCK_SOLVERS_SRC = div_free_solver.cpp block-solvers.cpp BLOCK_SOLVERS_OBJ = $(BLOCK_SOLVERS_SRC:.cpp=.o) +LOR_ELAST_SRC = block_fespace_operator.cpp lor_elast.cpp +LOR_ELAST_OBJ = $(LOR_ELAST_SRC:.cpp=.o) + SEQ_MINIAPPS = lor_solvers -PAR_MINIAPPS = block-solvers plor_solvers +PAR_MINIAPPS = block-solvers plor_solvers lor_elast ifeq ($(MFEM_USE_MPI),NO) MINIAPPS = $(SEQ_MINIAPPS) @@ -53,6 +56,9 @@ plor_solvers.o: $(SRC)lor_mms.hpp block-solvers: $(BLOCK_SOLVERS_OBJ) $(MFEM_CXX) $(MFEM_LINK_FLAGS) -o $@ $(BLOCK_SOLVERS_OBJ) $(MFEM_LIBS) +lor_elast: $(LOR_ELAST_OBJ) + $(MFEM_CXX) $(MFEM_LINK_FLAGS) -o $@ $(LOR_ELAST_OBJ) $(MFEM_LIBS) + %.o: $(SRC)%.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) $(MFEM_CXX) $(MFEM_FLAGS) -c $< -o $@ From 3056cddd22fecc8e493096e13295b21e28848841 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 31 Jul 2023 14:23:22 -0700 Subject: [PATCH 002/200] Add Bramble-Pasciak solver. - Modify DarcyProblem class. - Add Bramble-Pasciak class. - Define Bramble-Pasciak constructors. - Define Bramble-Pasciak Mult. - Update header accordingly. --- CHANGELOG | 4 + miniapps/solvers/block-solvers.cpp | 47 +++++--- miniapps/solvers/div_free_solver.cpp | 153 +++++++++++++++++++++++++++ miniapps/solvers/div_free_solver.hpp | 28 +++++ 4 files changed, 217 insertions(+), 15 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b761d72718..5656983320 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,10 @@ Version 4.5.3 (development) New and updated examples and miniapps ------------------------------------- +- Added a new block solver to the 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 a new miniapp, Mesh Quality, for evaluating mesh quality using size, skewness, and aspect-ratio computed from the Jacobian of the transformation. diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index baedf95119..433d465e43 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -28,6 +28,7 @@ // The solvers being compared include: // 1. The divergence free solver (couple and decoupled modes) // 2. MINRES preconditioned by a block diagonal preconditioner +// 3. CG with a Bramble-Pasciak transformation // // We recommend viewing example 5 before viewing this miniapp. // @@ -88,9 +89,12 @@ class DarcyProblem ParGridFunction u_; ParGridFunction p_; ParMesh mesh_; + shared_ptr mVarf_; + shared_ptr bVarf_; VectorFunctionCoefficient ucoeff_; FunctionCoefficient pcoeff_; DFSSpaces dfs_spaces_; + PWConstCoefficient mass_coeff; const IntegrationRule *irs_[Geometry::NumGeom]; public: DarcyProblem(Mesh &mesh, int num_refines, int order, const char *coef_file, @@ -103,13 +107,16 @@ public: const DFSData& GetDFSData() const { return dfs_spaces_.GetDFSData(); } void ShowError(const Vector &sol, bool verbose); void VisualizeSolution(const Vector &sol, string tag); + shared_ptr GetMform() const { return mVarf_; } + shared_ptr GetBform() const { return bVarf_; } }; DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, const char *coef_file, Array &ess_bdr, DFSParameters dfs_param) : mesh_(MPI_COMM_WORLD, mesh), ucoeff_(mesh.Dimension(), u_exact), - pcoeff_(p_exact), dfs_spaces_(order, num_refs, &mesh_, ess_bdr, dfs_param) + pcoeff_(p_exact), dfs_spaces_(order, num_refs, &mesh_, ess_bdr, dfs_param), + mass_coeff() { for (int l = 0; l < num_refs; l++) { @@ -124,7 +131,8 @@ DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, ifstream coef_str(coef_file); coef_vector.Load(coef_str, mesh.GetNE()); } - PWConstCoefficient mass_coeff(coef_vector); + + mass_coeff.UpdateConstants(coef_vector); VectorFunctionCoefficient fcoeff(mesh_.Dimension(), f_exact); FunctionCoefficient natcoeff(natural_bc); FunctionCoefficient gcoeff(g_exact); @@ -144,21 +152,25 @@ DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, gform.AddDomainIntegrator(new DomainLFIntegrator(gcoeff)); gform.Assemble(); - ParBilinearForm mVarf(dfs_spaces_.GetHdivFES()); - ParMixedBilinearForm bVarf(dfs_spaces_.GetHdivFES(), dfs_spaces_.GetL2FES()); + // ParBilinearForm mVarf_(dfs_spaces_.GetHdivFES()); + // ParMixedBilinearForm bVarf_(dfs_spaces_.GetHdivFES(), dfs_spaces_.GetL2FES()); - mVarf.AddDomainIntegrator(new VectorFEMassIntegrator(mass_coeff)); - mVarf.Assemble(); - mVarf.EliminateEssentialBC(ess_bdr, u_, fform); - mVarf.Finalize(); - M_.Reset(mVarf.ParallelAssemble()); + mVarf_ = make_shared(dfs_spaces_.GetHdivFES()); + bVarf_ = make_shared(dfs_spaces_.GetHdivFES(), + dfs_spaces_.GetL2FES()); - bVarf.AddDomainIntegrator(new VectorFEDivergenceIntegrator); - bVarf.Assemble(); - bVarf.SpMat() *= -1.0; - bVarf.EliminateTrialDofs(ess_bdr, u_, gform); - bVarf.Finalize(); - B_.Reset(bVarf.ParallelAssemble()); + mVarf_->AddDomainIntegrator(new VectorFEMassIntegrator(mass_coeff)); + mVarf_->Assemble(); + mVarf_->EliminateEssentialBC(ess_bdr, u_, fform); + mVarf_->Finalize(); + M_.Reset(mVarf_->ParallelAssemble()); + + bVarf_->AddDomainIntegrator(new VectorFEDivergenceIntegrator); + bVarf_->Assemble(); + bVarf_->SpMat() *= -1.0; + bVarf_->EliminateTrialDofs(ess_bdr, u_, gform); + bVarf_->Finalize(); + B_.Reset(bVarf_->ParallelAssemble()); rhs_.SetSize(M_->NumRows() + B_->NumRows()); Vector rhs_block0(rhs_.GetData(), M_->NumRows()); @@ -345,10 +357,15 @@ int main(int argc, char *argv[]) DivFreeSolver dfs_cm(M, B, DFS_data); setup_time[&dfs_cm] = chrono.RealTime(); + ResetTimer(); + BramblePasciakSolver bp(darcy.GetMform(), darcy.GetBform(), param); + // bp.SetEliminatedSystems(M_e, B_e, ess_tdof_list); + setup_time[&bp] = chrono.RealTime(); std::map solver_to_name; solver_to_name[&bdp] = "Block-diagonal-preconditioned MINRES"; solver_to_name[&dfs_dm] = "Divergence free (decoupled mode)"; solver_to_name[&dfs_cm] = "Divergence free (coupled mode)"; + solver_to_name[&bp] = "Bramble Pasciak CG"; // Solve the problem using all solvers for (const auto& solver_pair : solver_to_name) diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 978abbcc40..07aab830d1 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -606,3 +606,156 @@ int DivFreeSolver::GetNumIterations() const } return solver_.As()->GetNumIterations(); } + +BramblePasciakSolver::BramblePasciakSolver( + const std::shared_ptr &a, + const std::shared_ptr &b, + const IterSolveParameters ¶m) + : DarcySolver(a->ParFESpace()->GetTrueVSize(), + b->TestFESpace()->GetTrueVSize()), + op_(offsets_), map_(offsets_), pc_(offsets_), + solver_(a->ParFESpace()->GetComm()) +{ + // Recover mass matrices + /* Original system has structure + * D = [ A B^T ] + * [ B 0 ] + */ + HypreParMatrix *A = a->ParallelAssemble(); + HypreParMatrix *B = b->ParallelAssemble(); + // Assemble preconditioner + /* Mass preconditioner corresponds to a local re-scaling + * based on the smallest eigenvalue of the generalized + * eigenvalue problem + * A_T x_T = \lambda_T diag(A_T) x_T + * and we set Q_T = diag(min(\lambda_T)). + */ + HypreParMatrix *Q = ConstructMassPreconditioner(a); + // Initialize system + Init(A, B, Q, param); +} + +BramblePasciakSolver::BramblePasciakSolver( + HypreParMatrix &A, HypreParMatrix &B, HypreParMatrix &Q, + const IterSolveParameters ¶m) + : DarcySolver(A.NumRows(), B.NumRows()), + op_(offsets_), map_(offsets_), pc_(offsets_), + solver_(A.GetComm()) +{ + // System and mass-preconditioner is user-provided + /* Original system has structure + * D = [ A B^T ] + * [ B 0 ] + */ + // Initialize system + Init(&A, &B, &Q, param); +} + +void BramblePasciakSolver::Init( + HypreParMatrix *A, HypreParMatrix *B, HypreParMatrix *Q, + const IterSolveParameters ¶m) +{ + HypreParMatrix *Bt = B->Transpose(); + // invQ + HypreParMatrix *invQ = new HypreParMatrix(*Q); + Vector diagQ; + invQ->GetDiag(diagQ); + invQ->InvScaleRows(diagQ); + invQ->InvScaleRows(diagQ); + // AinvQ + auto AinvQ = ParMult(A,invQ); + // A*inv(Q) - Id + int NumRows = AinvQ->GetNumRows(); + SparseMatrix diag; + AinvQ->GetDiag(diag); + int *I = diag.GetI(); + double *Data = diag.GetData(); + for (int ii = 0; ii < NumRows; ++ii) + { + Data[I[ii]] -= 1; + } + + // Main blocks + auto block00 = ParMult(AinvQ, A); + auto block01 = ParMult(AinvQ, Bt); + auto BinvQ = ParMult(B, invQ); + auto block11 = ParMult(BinvQ,Bt); + auto block10 = new TransposeOperator(block01); + // -Id + auto row_starts = B->GetRowStarts(); + auto col_starts = Bt->GetColStarts(); + MFEM_ASSERT((row_starts[0] == col_starts[0]) && + (row_starts[1] == col_starts[1]), + "Check the construction of the divergence block matrix."); + auto minus_id = new IdentityOperator(row_starts[1] - row_starts[0]); + + { + op_.owns_blocks = true; + op_.SetBlock(0, 0, block00); + op_.SetBlock(0, 1, block01); + op_.SetBlock(1, 0, block10); + op_.SetBlock(1, 1, block11); + + map_.owns_blocks = true; + map_.SetBlock(0, 0, AinvQ); + map_.SetBlock(1, 0, BinvQ); + map_.SetBlock(1, 1, minus_id, -1.0); + } + + Solver *solver_M0, *solver_M1; + solver_M0 = new HypreDiagScale(*Q); + solver_M1 = new HypreBoomerAMG(*block11); + dynamic_cast(solver_M1)->SetPrintLevel(0); + { + solver_M0->iterative_mode = false; + solver_M1->iterative_mode = false; + + pc_.owns_blocks = true; + pc_.SetDiagonalBlock(0, solver_M0); + pc_.SetDiagonalBlock(1, solver_M1); + } + + // Set solver + SetOptions(solver_, param); + { + solver_.SetOperator(op_); + solver_.SetPreconditioner(pc_); + } +} + +HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( + const shared_ptr &a) const +{ + a->ComputeElementMatrices(); + int const numElement = a->ParFESpace()->GetNE(); + ParBilinearForm *qVarf(new ParBilinearForm(a->ParFESpace())); + for (int i = 0; iComputeElementMatrix(i, A_i); + A_i.GetDiag(diag_i); + // A_i <- D^{-1/2} A_i D^{-1/2}, where D = diag(A) + A_i.InvSymmetricScaling(diag_i); + // A_i x = ev diag(A_i) x + A_i.Eigenvalues(eval, evec); + + scaling = 0.5*eval.Min(); + diag_i.Set(scaling, diag_i); + Q_i.Diag(diag_i.GetData(), diag_i.Size()); + qVarf->AssembleElementMatrix(i, Q_i, 1); + } + qVarf->Assemble(); + qVarf->Finalize(); + return qVarf->ParallelAssemble(); +} + +void BramblePasciakSolver::Mult(const Vector & x, Vector & z) const +{ + Vector y(x); + map_.Mult(x,y); + solver_.Mult(y, z); + for (int dof : ess_zero_dofs_) { z[dof] = 0.0; } +} diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index ad16c2c45a..294ca947b2 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -235,6 +235,34 @@ public: virtual int GetNumIterations() const; }; +/* Bramble-Pasciak Solver for Darcy equation. + */ +class BramblePasciakSolver : public DarcySolver +{ + CGSolver solver_; + BlockOperator op_; + BlockOperator map_; + BlockDiagonalPreconditioner pc_; + SparseMatrix *local_minus_id; + Array ess_zero_dofs_; + HypreParMatrix *ConstructMassPreconditioner(const std::shared_ptr &a) const; + void Init(HypreParMatrix *A, HypreParMatrix *B, HypreParMatrix *Q, + const IterSolveParameters ¶m); + +public: + BramblePasciakSolver( + const std::shared_ptr &a, + const std::shared_ptr &b, + const IterSolveParameters ¶m); + BramblePasciakSolver( + HypreParMatrix &A, HypreParMatrix &B, HypreParMatrix &Q, + const IterSolveParameters ¶m); + virtual void Mult(const Vector &x, Vector &y) const; + virtual void SetOperator(const Operator &op) { } + void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } + virtual int GetNumIterations() const { return solver_.GetNumIterations(); } +}; + } // namespace blocksolvers } // namespace mfem From b765c24d1c22be1a362052d233073742c36d0a77 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 31 Jul 2023 14:28:50 -0700 Subject: [PATCH 003/200] Check style with make style --- miniapps/solvers/div_free_solver.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index 294ca947b2..1ebc8995b7 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -245,9 +245,10 @@ class BramblePasciakSolver : public DarcySolver BlockDiagonalPreconditioner pc_; SparseMatrix *local_minus_id; Array ess_zero_dofs_; - HypreParMatrix *ConstructMassPreconditioner(const std::shared_ptr &a) const; + HypreParMatrix *ConstructMassPreconditioner(const + std::shared_ptr &a) const; void Init(HypreParMatrix *A, HypreParMatrix *B, HypreParMatrix *Q, - const IterSolveParameters ¶m); + const IterSolveParameters ¶m); public: BramblePasciakSolver( From 0e8461c26b2c1df2b52e20119a2d8e62dcb8c23f Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Wed, 2 Aug 2023 13:23:10 -0600 Subject: [PATCH 004/200] Made buildable for sequential variant. --- fem/bilininteg.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fem/bilininteg.cpp b/fem/bilininteg.cpp index 50b21a2742..c1bcd0de86 100644 --- a/fem/bilininteg.cpp +++ b/fem/bilininteg.cpp @@ -3076,14 +3076,20 @@ BilinearFormIntegrator* ElasticityIntegrator::ComponentIntegrator(const int I, //if it exists yet. if (!componentFESpace) { +#ifdef MFEM_USE_MPI const auto *parfespace = dynamic_cast(fespace); auto isParallelFES = static_cast(parfespace); +#else + constexpr bool isParallelFES = false; +#endif const int vdim = 1; if (isParallelFES) { +#ifdef MFEM_USE_MPI componentFESpace = std::make_shared (parfespace->GetParMesh(), parfespace->FEColl(), vdim, parfespace->GetOrdering()); +#endif } else { From fe59ea04a2c9d2252202b93b7f2e131ae3a480ae Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Wed, 2 Aug 2023 14:49:51 -0600 Subject: [PATCH 005/200] remove variable shadowing --- fem/bilininteg.cpp | 6 +++--- fem/bilininteg.hpp | 2 +- fem/integ/bilininteg_elasticity_ea.cpp | 2 +- fem/integ/bilininteg_elasticity_pa.cpp | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fem/bilininteg.cpp b/fem/bilininteg.cpp index c1bcd0de86..4d4842c622 100644 --- a/fem/bilininteg.cpp +++ b/fem/bilininteg.cpp @@ -3082,19 +3082,19 @@ BilinearFormIntegrator* ElasticityIntegrator::ComponentIntegrator(const int I, #else constexpr bool isParallelFES = false; #endif - const int vdim = 1; + const int dim = 1; if (isParallelFES) { #ifdef MFEM_USE_MPI componentFESpace = std::make_shared - (parfespace->GetParMesh(), parfespace->FEColl(), vdim, + (parfespace->GetParMesh(), parfespace->FEColl(), dim, parfespace->GetOrdering()); #endif } else { componentFESpace = std::make_shared - (fespace->GetMesh(), fespace->FEColl(), vdim, fespace->GetOrdering()); + (fespace->GetMesh(), fespace->FEColl(), dim, fespace->GetOrdering()); } } compIntegrator->fespace = componentFESpace.get(); diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index 00efdfe10a..9717bd710d 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -2935,7 +2935,7 @@ private: const DofToQuad *maps; ///< Not owned const GeometricFactors *geom; ///< Not owned - int dim, ndofs; + int vdim, ndofs; const FiniteElementSpace *fespace; ///< Not owned. Not const because it is used in a getter to construct bilinearforms which require non-const fespaces for some reason. Can it be const? bool PACalled = false; diff --git a/fem/integ/bilininteg_elasticity_ea.cpp b/fem/integ/bilininteg_elasticity_ea.cpp index 115a67f2d7..61765ff64e 100644 --- a/fem/integ/bilininteg_elasticity_ea.cpp +++ b/fem/integ/bilininteg_elasticity_ea.cpp @@ -23,7 +23,7 @@ void ElasticityIntegrator::AssembleEA(const FiniteElementSpace &fes, MFEM_VERIFY(fespace, "Need initialized FiniteElementSpace."); MFEM_VERIFY(!add, "AssembleEA not implemented for add yet."); AssemblePA(*fespace); - internal::ElasticityAssembleEA(dim, IBlock, JBlock, ndofs,*fespace, + internal::ElasticityAssembleEA(vdim, IBlock, JBlock, ndofs,*fespace, *lambda_quad, *mu_quad, *geom, *maps, emat); } } diff --git a/fem/integ/bilininteg_elasticity_pa.cpp b/fem/integ/bilininteg_elasticity_pa.cpp index af5d139766..3db2a4d5a5 100644 --- a/fem/integ/bilininteg_elasticity_pa.cpp +++ b/fem/integ/bilininteg_elasticity_pa.cpp @@ -37,7 +37,7 @@ void ElasticityIntegrator::AssemblePA(const FiniteElementSpace &fes) const auto el = fes.GetFE(0); ndofs = el->GetDof(); const auto mesh = fes.GetMesh(); - dim = fes.GetVDim(); + vdim = fes.GetVDim(); const IntegrationRule *ir = IntRule; if (ir == NULL) { @@ -50,7 +50,7 @@ void ElasticityIntegrator::AssemblePA(const FiniteElementSpace &fes) quad_space = std::make_shared(*mesh, *IntRule); lambda_quad = std::make_shared(*quad_space); mu_quad = std::make_shared(*quad_space); - q_vec = std::make_shared(*quad_space, dim*dim); + q_vec = std::make_shared(*quad_space, vdim*vdim); lambda->Project(*lambda_quad); mu->Project(*mu_quad); maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, DofToQuad::FULL); @@ -60,8 +60,8 @@ void ElasticityIntegrator::AssemblePA(const FiniteElementSpace &fes) void ElasticityIntegrator::AssembleDiagonalPA(Vector &diag) { - q_vec->SetVDim(dim*dim*dim*dim); - internal::ElasticityAssembleDiagonalPA(dim, ndofs, *fespace, *lambda_quad, + q_vec->SetVDim(vdim*vdim*vdim*vdim); + internal::ElasticityAssembleDiagonalPA(vdim, ndofs, *fespace, *lambda_quad, *mu_quad, *geom, *maps, *q_vec, diag); } @@ -69,15 +69,15 @@ void ElasticityIntegrator::AddMultPA(const Vector &x, Vector &y) const { if (!parent) { - q_vec->SetVDim(dim*dim); + q_vec->SetVDim(vdim*vdim); } else { //If it has a parent, it is a component integrator. - q_vec->SetVDim(dim); + q_vec->SetVDim(vdim); } - internal::ElasticityAddMultPA(dim, ndofs, *fespace, *lambda_quad, *mu_quad, + internal::ElasticityAddMultPA(vdim, ndofs, *fespace, *lambda_quad, *mu_quad, *geom, *maps, x, *q_vec, y, IBlock, JBlock); } @@ -90,7 +90,7 @@ void ElasticityIntegrator::AddMultTransposePA(const Vector &x, Vector &y) const else { //This block operator is symmetric, so simply switch IBlock and JBlock. - internal::ElasticityAddMultPA(dim, ndofs, *fespace, *lambda_quad, *mu_quad, + internal::ElasticityAddMultPA(vdim, ndofs, *fespace, *lambda_quad, *mu_quad, *geom, *maps, x, *q_vec, y, JBlock, IBlock); } } From 9f83408b2e827da9b19c38af2b7a55cf4589cf3c Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Wed, 2 Aug 2023 15:00:52 -0600 Subject: [PATCH 006/200] fixing static assert and unused variable --- fem/integ/bilininteg_elasticity_kernels.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fem/integ/bilininteg_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp index edd522796c..98b40b3656 100644 --- a/fem/integ/bilininteg_elasticity_kernels.hpp +++ b/fem/integ/bilininteg_elasticity_kernels.hpp @@ -130,8 +130,8 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, const GeometricFactors &geom, const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y) { - //make sure either IBlock and JBlock are either both non-negative or both strictly negative. - static_assert(IBlock < 0 == JBlock < 0); + static_assert(IBlock < 0 == JBlock < 0, + "IBlock and JBlock must both be non-negative or strictly negative."); static constexpr int d = dim; static constexpr int qLower = IBlock < 0 ? 0 : IBlock; static constexpr int qUpper = IBlock < 0 ? d : IBlock+1; @@ -145,7 +145,6 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, const auto &ir = lambda.GetIntRule(0); const QuadratureInterpolator *E_To_Q_Map = fespace.GetQuadratureInterpolator( ir); - const FiniteElement *fe = fespace.GetFE(0); E_To_Q_Map->DisableTensorProducts(); E_To_Q_Map->SetOutputLayout(QVectorLayout::byNODES); //interpolate physical derivatives to quadrature points. From 2b4daad324e57c545c398c0dcf5ee5ab11e7c622 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Wed, 2 Aug 2023 15:13:16 -0600 Subject: [PATCH 007/200] more warning fixes --- fem/integ/bilininteg_elasticity_kernels.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fem/integ/bilininteg_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp index 98b40b3656..bd94612509 100644 --- a/fem/integ/bilininteg_elasticity_kernels.hpp +++ b/fem/integ/bilininteg_elasticity_kernels.hpp @@ -130,16 +130,16 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, const GeometricFactors &geom, const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y) { - static_assert(IBlock < 0 == JBlock < 0, + static_assert((IBlock < 0) == (JBlock < 0), "IBlock and JBlock must both be non-negative or strictly negative."); static constexpr int d = dim; - static constexpr int qLower = IBlock < 0 ? 0 : IBlock; - static constexpr int qUpper = IBlock < 0 ? d : IBlock+1; + static constexpr int qLower = (IBlock < 0) ? 0 : IBlock; + static constexpr int qUpper = (IBlock < 0) ? d : IBlock+1; static constexpr int qSize = qUpper-qLower; - static constexpr int aLower = JBlock < 0 ? 0 : JBlock; - static constexpr int aUpper = JBlock < 0 ? d : JBlock+1; + static constexpr int aLower = (JBlock < 0) ? 0 : JBlock; + static constexpr int aUpper = (JBlock < 0) ? d : JBlock+1; static constexpr int aSize = aUpper-aLower; - static constexpr bool isComponent = IBlock >= 0; + static constexpr bool isComponent = (IBlock >= 0); //Assuming all elements are the same const auto &ir = lambda.GetIntRule(0); From da5222a86045f52647c2e52590f63849c36b6dda Mon Sep 17 00:00:00 2001 From: Chak Shing Lee Date: Wed, 2 Aug 2023 18:42:47 -0700 Subject: [PATCH 008/200] some minor adjustment, and renaming of variables to match with other DarcySolver --- miniapps/solvers/block-solvers.cpp | 3 +- miniapps/solvers/div_free_solver.cpp | 139 +++++++++++---------------- miniapps/solvers/div_free_solver.hpp | 33 +++++-- 3 files changed, 79 insertions(+), 96 deletions(-) diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index 433d465e43..18894d60af 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -160,6 +160,7 @@ DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, dfs_spaces_.GetL2FES()); mVarf_->AddDomainIntegrator(new VectorFEMassIntegrator(mass_coeff)); + mVarf_->ComputeElementMatrices(); mVarf_->Assemble(); mVarf_->EliminateEssentialBC(ess_bdr, u_, fform); mVarf_->Finalize(); @@ -359,8 +360,8 @@ int main(int argc, char *argv[]) ResetTimer(); BramblePasciakSolver bp(darcy.GetMform(), darcy.GetBform(), param); - // bp.SetEliminatedSystems(M_e, B_e, ess_tdof_list); setup_time[&bp] = chrono.RealTime(); + std::map solver_to_name; solver_to_name[&bdp] = "Block-diagonal-preconditioned MINRES"; solver_to_name[&dfs_dm] = "Divergence free (decoupled mode)"; diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 07aab830d1..0891f7df40 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -608,86 +608,59 @@ int DivFreeSolver::GetNumIterations() const } BramblePasciakSolver::BramblePasciakSolver( - const std::shared_ptr &a, - const std::shared_ptr &b, + const std::shared_ptr &mVarf, + const std::shared_ptr &bVarf, const IterSolveParameters ¶m) - : DarcySolver(a->ParFESpace()->GetTrueVSize(), - b->TestFESpace()->GetTrueVSize()), + : DarcySolver(mVarf->ParFESpace()->GetTrueVSize(), + bVarf->TestFESpace()->GetTrueVSize()), op_(offsets_), map_(offsets_), pc_(offsets_), - solver_(a->ParFESpace()->GetComm()) + solver_(mVarf->ParFESpace()->GetComm()) { - // Recover mass matrices - /* Original system has structure - * D = [ A B^T ] - * [ B 0 ] - */ - HypreParMatrix *A = a->ParallelAssemble(); - HypreParMatrix *B = b->ParallelAssemble(); - // Assemble preconditioner - /* Mass preconditioner corresponds to a local re-scaling - * based on the smallest eigenvalue of the generalized - * eigenvalue problem - * A_T x_T = \lambda_T diag(A_T) x_T - * and we set Q_T = diag(min(\lambda_T)). - */ - HypreParMatrix *Q = ConstructMassPreconditioner(a); - // Initialize system - Init(A, B, Q, param); + std::unique_ptr M(mVarf->ParallelAssemble()); + std::unique_ptr B(bVarf->ParallelAssemble()); + Q_.reset(ConstructMassPreconditioner(*mVarf)); + + Init(*M, *B, *Q_, param); } BramblePasciakSolver::BramblePasciakSolver( - HypreParMatrix &A, HypreParMatrix &B, HypreParMatrix &Q, + const HypreParMatrix &M, const HypreParMatrix &B, const HypreParMatrix &Q, const IterSolveParameters ¶m) - : DarcySolver(A.NumRows(), B.NumRows()), + : DarcySolver(M.NumRows(), B.NumRows()), op_(offsets_), map_(offsets_), pc_(offsets_), - solver_(A.GetComm()) + solver_(M.GetComm()) { - // System and mass-preconditioner is user-provided - /* Original system has structure - * D = [ A B^T ] - * [ B 0 ] - */ - // Initialize system - Init(&A, &B, &Q, param); + Init(M, B, Q, param); } void BramblePasciakSolver::Init( - HypreParMatrix *A, HypreParMatrix *B, HypreParMatrix *Q, + const HypreParMatrix &M, const HypreParMatrix &B, const HypreParMatrix &Q, const IterSolveParameters ¶m) { - HypreParMatrix *Bt = B->Transpose(); + HypreParMatrix *Bt = B.Transpose(); // invQ - HypreParMatrix *invQ = new HypreParMatrix(*Q); + HypreParMatrix *invQ = new HypreParMatrix(Q); Vector diagQ; - invQ->GetDiag(diagQ); + Q.GetDiag(diagQ); + *invQ = 1.0; invQ->InvScaleRows(diagQ); - invQ->InvScaleRows(diagQ); - // AinvQ - auto AinvQ = ParMult(A,invQ); - // A*inv(Q) - Id - int NumRows = AinvQ->GetNumRows(); - SparseMatrix diag; - AinvQ->GetDiag(diag); - int *I = diag.GetI(); - double *Data = diag.GetData(); - for (int ii = 0; ii < NumRows; ++ii) + // MinvQ + auto MinvQ = ParMult(&M, invQ); + // M*inv(Q) - Id + SparseMatrix MinvQ_diag; + MinvQ->GetDiag(MinvQ_diag); + for (int i = 0; i < MinvQ->NumRows(); ++i) { - Data[I[ii]] -= 1; + MinvQ_diag(i, i) -= 1.0; } // Main blocks - auto block00 = ParMult(AinvQ, A); - auto block01 = ParMult(AinvQ, Bt); - auto BinvQ = ParMult(B, invQ); - auto block11 = ParMult(BinvQ,Bt); + auto block00 = ParMult(MinvQ, &M); + auto block01 = ParMult(MinvQ, Bt); + auto BinvQ = ParMult(&B, invQ); + auto block11 = ParMult(BinvQ, Bt); auto block10 = new TransposeOperator(block01); - // -Id - auto row_starts = B->GetRowStarts(); - auto col_starts = Bt->GetColStarts(); - MFEM_ASSERT((row_starts[0] == col_starts[0]) && - (row_starts[1] == col_starts[1]), - "Check the construction of the divergence block matrix."); - auto minus_id = new IdentityOperator(row_starts[1] - row_starts[0]); + auto I = new IdentityOperator(B.NumRows()); { op_.owns_blocks = true; @@ -697,15 +670,14 @@ void BramblePasciakSolver::Init( op_.SetBlock(1, 1, block11); map_.owns_blocks = true; - map_.SetBlock(0, 0, AinvQ); + map_.SetBlock(0, 0, MinvQ); map_.SetBlock(1, 0, BinvQ); - map_.SetBlock(1, 1, minus_id, -1.0); + map_.SetBlock(1, 1, I, -1.0); } - Solver *solver_M0, *solver_M1; - solver_M0 = new HypreDiagScale(*Q); - solver_M1 = new HypreBoomerAMG(*block11); - dynamic_cast(solver_M1)->SetPrintLevel(0); + auto solver_M0 = new HypreDiagScale(Q); + auto solver_M1 = new HypreBoomerAMG(*block11); + solver_M1->SetPrintLevel(0); { solver_M0->iterative_mode = false; solver_M1->iterative_mode = false; @@ -724,38 +696,35 @@ void BramblePasciakSolver::Init( } HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( - const shared_ptr &a) const + ParBilinearForm &mVarf) { - a->ComputeElementMatrices(); - int const numElement = a->ParFESpace()->GetNE(); - ParBilinearForm *qVarf(new ParBilinearForm(a->ParFESpace())); - for (int i = 0; iGetNE(); ++i) { - DenseMatrix A_i, Q_i, evec; + DenseMatrix M_i, Q_i, evec; Vector eval, diag_i; double scaling = 0.0; - a->ComputeElementMatrix(i, A_i); - A_i.GetDiag(diag_i); - // A_i <- D^{-1/2} A_i D^{-1/2}, where D = diag(A) - A_i.InvSymmetricScaling(diag_i); - // A_i x = ev diag(A_i) x - A_i.Eigenvalues(eval, evec); + mVarf.ComputeElementMatrix(i, M_i); + M_i.GetDiag(diag_i); + // M_i <- D^{-1/2} M_i D^{-1/2}, where D = diag(M_i) + M_i.InvSymmetricScaling(diag_i); + // M_i x = ev diag(M_i) x + M_i.Eigenvalues(eval, evec); scaling = 0.5*eval.Min(); diag_i.Set(scaling, diag_i); Q_i.Diag(diag_i.GetData(), diag_i.Size()); - qVarf->AssembleElementMatrix(i, Q_i, 1); + qVarf.AssembleElementMatrix(i, Q_i, 1); } - qVarf->Assemble(); - qVarf->Finalize(); - return qVarf->ParallelAssemble(); + qVarf.Finalize(); + return qVarf.ParallelAssemble(); } -void BramblePasciakSolver::Mult(const Vector & x, Vector & z) const +void BramblePasciakSolver::Mult(const Vector & x, Vector & y) const { - Vector y(x); - map_.Mult(x,y); - solver_.Mult(y, z); - for (int dof : ess_zero_dofs_) { z[dof] = 0.0; } + Vector transformed_rhs(x.Size()); + map_.Mult(x, transformed_rhs); + solver_.Mult(transformed_rhs, y); + for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } } diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index 1ebc8995b7..9c7011ff26 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -235,7 +235,8 @@ public: virtual int GetNumIterations() const; }; -/* Bramble-Pasciak Solver for Darcy equation. +/** Bramble-Pasciak Solver for Darcy equation. + * TBD: more documentation */ class BramblePasciakSolver : public DarcySolver { @@ -243,21 +244,33 @@ class BramblePasciakSolver : public DarcySolver BlockOperator op_; BlockOperator map_; BlockDiagonalPreconditioner pc_; - SparseMatrix *local_minus_id; + std::unique_ptr Q_; Array ess_zero_dofs_; - HypreParMatrix *ConstructMassPreconditioner(const - std::shared_ptr &a) const; - void Init(HypreParMatrix *A, HypreParMatrix *B, HypreParMatrix *Q, - const IterSolveParameters ¶m); + void Init(const HypreParMatrix &M, const HypreParMatrix &B, + const HypreParMatrix &Q, const IterSolveParameters ¶m); public: + /// The system and the mass preconditioner are constructed from the + /// bilinear forms BramblePasciakSolver( - const std::shared_ptr &a, - const std::shared_ptr &b, + const std::shared_ptr &mVarf, + const std::shared_ptr &bVarf, const IterSolveParameters ¶m); + + /// The ystem and mass preconditioner are user-provided BramblePasciakSolver( - HypreParMatrix &A, HypreParMatrix &B, HypreParMatrix &Q, - const IterSolveParameters ¶m); + const HypreParMatrix &M, const HypreParMatrix &B, + const HypreParMatrix &Q, const IterSolveParameters ¶m); + + /// Assemble a preconditioner for the mass matrix + /** Mass preconditioner corresponds to a local re-scaling + * based on the smallest eigenvalue of the generalized + * eigenvalue problem locally on each element T: + * M_T x_T = \lambda_T diag(M_T) x_T + * and we set Q_T = 0.5 * min(\lambda_T) * diag(M_T). + */ + static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf); + virtual void Mult(const Vector &x, Vector &y) const; virtual void SetOperator(const Operator &op) { } void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } From 17271c5d2712f1ea4cc26bcdaa23b06de0c016d6 Mon Sep 17 00:00:00 2001 From: Chak Shing Lee Date: Wed, 2 Aug 2023 18:57:15 -0700 Subject: [PATCH 009/200] fix doc --- miniapps/solvers/div_free_solver.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index 9c7011ff26..05502de13e 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -250,14 +250,13 @@ class BramblePasciakSolver : public DarcySolver void Init(const HypreParMatrix &M, const HypreParMatrix &B, const HypreParMatrix &Q, const IterSolveParameters ¶m); public: - /// The system and the mass preconditioner are constructed from the - /// bilinear forms + /// System and mass preconditioner are constructed from bilinear forms BramblePasciakSolver( const std::shared_ptr &mVarf, const std::shared_ptr &bVarf, const IterSolveParameters ¶m); - /// The ystem and mass preconditioner are user-provided + /// System and mass preconditioner are user-provided BramblePasciakSolver( const HypreParMatrix &M, const HypreParMatrix &B, const HypreParMatrix &Q, const IterSolveParameters ¶m); @@ -266,8 +265,8 @@ public: /** Mass preconditioner corresponds to a local re-scaling * based on the smallest eigenvalue of the generalized * eigenvalue problem locally on each element T: - * M_T x_T = \lambda_T diag(M_T) x_T - * and we set Q_T = 0.5 * min(\lambda_T) * diag(M_T). + * M_T x_T = lambda_T diag(M_T) x_T + * and we set Q_T = 0.5 * min(lambda_T) * diag(M_T). */ static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf); From dbb119a4a99cc747114ac062ef285de4d1e0364b Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Thu, 3 Aug 2023 07:42:35 -0600 Subject: [PATCH 010/200] fixing more compiler warnings. Added make test for miniapp --- miniapps/solvers/lor_elast.cpp | 22 +++++++++++----------- miniapps/solvers/makefile | 7 +++++++ 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/miniapps/solvers/lor_elast.cpp b/miniapps/solvers/lor_elast.cpp index 46ed253618..fa9b00c3ad 100644 --- a/miniapps/solvers/lor_elast.cpp +++ b/miniapps/solvers/lor_elast.cpp @@ -84,7 +84,6 @@ int main(int argc, char *argv[]) { // 1. Initialize MPI and HYPRE. Mpi::Init(argc, argv); - int num_procs = Mpi::WorldSize(); int myid = Mpi::WorldRank(); Hypre::Init(); @@ -123,9 +122,9 @@ int main(int argc, char *argv[]) args.AddOption(&componentwise_action, "-ca", "--component-action", "-no-ca", "--no-component-action", "Uses partial assembly with a block operator of components instead of the monolithic vector integrator."); - args.AddOption(¶view, "-pv", "--paraview", "-no-pv", - "--no-paraview", - "Enable or disable ParaView DataCollection output."); + args.AddOption(¶view, "-vis", "--visualization", "-no-vis", + "--no-visualization", + "Enable or disable Paraview output."); args.Parse(); if (!args.Good()) { @@ -354,20 +353,21 @@ int main(int argc, char *argv[]) { for (int i = 0; i < dim; i++) { - auto *block = static_cast(integrator.ComponentIntegrator( - i,j)); - auto *fes_block = dynamic_cast - (const_cast(block->GetFESpace())); + auto *action_block = static_cast + (integrator.ComponentIntegrator( + i,j)); + auto *action_fes_block = dynamic_cast + (const_cast(action_block->GetFESpace())); if (i == j) { - fespaces.emplace_back(fes_block); + fespaces.emplace_back(action_fes_block); } - pa_components.emplace_back(new ParBilinearForm(fes_block)); + pa_components.emplace_back(new ParBilinearForm(action_fes_block)); pa_components[i + dim*j]->SetAssemblyLevel(pa ? AssemblyLevel::PARTIAL : AssemblyLevel::FULL); pa_components[i + dim*j]->ExtUseTensorBasis(false); pa_components[i + dim*j]->EnableSparseMatrixSorting(Device::IsEnabled()); - pa_components[i + dim*j]->AddDomainIntegrator(block); + pa_components[i + dim*j]->AddDomainIntegrator(action_block); pa_components[i + dim*j]->Assemble(); } } diff --git a/miniapps/solvers/makefile b/miniapps/solvers/makefile index 522707959c..4ea85c5bbf 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/makefile @@ -79,6 +79,13 @@ lor_solvers-test-seq: lor_solvers plor_solvers-test-par: plor_solvers @$(call mfem-test,$<, $(RUN_MPI), Parallel LOR solvers miniapp,-fe n\ -m ../../data/fichera.mesh) +lor_elast-test-par: lor_elast-tri lor_elast-hex +lor_elast-tri: lor_elast + @$(call mfem-test,$<, $(RUN_MPI), Elasticity LOR miniapp,-l 2 -ca -pa -ss\ + -m ../../data/beam-tri.mesh -o 2) +lor_elast-hex: lor_elast + @$(call mfem-test,$<, $(RUN_MPI), Elasticity LOR miniapp,-l 1 -pa -o 2\ + -m ../../data/beam-hex.mesh) # Generate an error message if the MFEM library is not built and exit $(MFEM_LIB_FILE): From b4a0df6f5c72802a71e3bc9701e6863d0b9592ba Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 7 Aug 2023 10:29:28 -0700 Subject: [PATCH 011/200] Add parameter control. Add some documentation. - Add parameter control for the default preconditioner. - Add brief explanation of the current class. - Include some relevant citations. --- miniapps/solvers/block-solvers.cpp | 1 + miniapps/solvers/div_free_solver.cpp | 25 ++++++++++++++------- miniapps/solvers/div_free_solver.hpp | 33 +++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 13 deletions(-) diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index 18894d60af..5c3f943f5f 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -358,6 +358,7 @@ int main(int argc, char *argv[]) DivFreeSolver dfs_cm(M, B, DFS_data); setup_time[&dfs_cm] = chrono.RealTime(); + // TODO Add alpha parameter to the param struct ResetTimer(); BramblePasciakSolver bp(darcy.GetMform(), darcy.GetBform(), param); setup_time[&bp] = chrono.RealTime(); diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 0891f7df40..886fae858b 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -610,17 +610,18 @@ int DivFreeSolver::GetNumIterations() const BramblePasciakSolver::BramblePasciakSolver( const std::shared_ptr &mVarf, const std::shared_ptr &bVarf, - const IterSolveParameters ¶m) + const IterSolveParameters ¶m, double alpha) : DarcySolver(mVarf->ParFESpace()->GetTrueVSize(), bVarf->TestFESpace()->GetTrueVSize()), op_(offsets_), map_(offsets_), pc_(offsets_), solver_(mVarf->ParFESpace()->GetComm()) { - std::unique_ptr M(mVarf->ParallelAssemble()); + //std::unique_ptr M(mVarf->ParallelAssemble()); + M_.reset(mVarf->ParallelAssemble()); std::unique_ptr B(bVarf->ParallelAssemble()); - Q_.reset(ConstructMassPreconditioner(*mVarf)); + Q_.reset(ConstructMassPreconditioner(*mVarf, alpha)); - Init(*M, *B, *Q_, param); + Init(*M_, *B, *Q_, param); } BramblePasciakSolver::BramblePasciakSolver( @@ -639,6 +640,7 @@ void BramblePasciakSolver::Init( { HypreParMatrix *Bt = B.Transpose(); // invQ + // TODO This is not general enough. We are assuming Q is diag! HypreParMatrix *invQ = new HypreParMatrix(Q); Vector diagQ; Q.GetDiag(diagQ); @@ -675,14 +677,21 @@ void BramblePasciakSolver::Init( map_.SetBlock(1, 1, I, -1.0); } + Vector diagM; + M.GetDiag(diagM); + auto invDBt = new HypreParMatrix(*Bt); + invDBt->InvScaleRows(diagM); + auto S = ParMult(&B, invDBt); + // auto solver_M0 = new HypreDiagScale(M); + auto solver_M1 = new HypreBoomerAMG(*S); auto solver_M0 = new HypreDiagScale(Q); - auto solver_M1 = new HypreBoomerAMG(*block11); + // auto solver_M1 = new HypreBoomerAMG(*block11); solver_M1->SetPrintLevel(0); { solver_M0->iterative_mode = false; solver_M1->iterative_mode = false; - pc_.owns_blocks = true; + //pc_.owns_blocks = true; pc_.SetDiagonalBlock(0, solver_M0); pc_.SetDiagonalBlock(1, solver_M1); } @@ -696,7 +705,7 @@ void BramblePasciakSolver::Init( } HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( - ParBilinearForm &mVarf) + ParBilinearForm &mVarf, double alpha) { ParBilinearForm qVarf(mVarf.ParFESpace()); for (int i = 0; i < mVarf.ParFESpace()->GetNE(); ++i) @@ -712,7 +721,7 @@ HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( // M_i x = ev diag(M_i) x M_i.Eigenvalues(eval, evec); - scaling = 0.5*eval.Min(); + scaling = alpha*eval.Min(); diag_i.Set(scaling, diag_i); Q_i.Diag(diag_i.GetData(), diag_i.Size()); qVarf.AssembleElementMatrix(i, Q_i, 1); diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index 05502de13e..d0a187818c 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -198,6 +198,7 @@ public: virtual int GetNumIterations() const { return solver_.GetNumIterations(); } }; +/// Divergence free solver. /** Divergence free solver. The basic idea of the solver is to exploit a multilevel decomposition of Raviart-Thomas space to find a particular solution satisfying the divergence @@ -235,8 +236,27 @@ public: virtual int GetNumIterations() const; }; +/// Bramble-Pasciak Solver for Darcy equation. /** Bramble-Pasciak Solver for Darcy equation. - * TBD: more documentation + * The basic idea is to precondition the mass matrix M with a s.p.d. matrix Q + * such that M - Q remains s.p.d. Then we can transform the block operator into a + * s.p.d. operator under a modified inner product. + * In particular, this enable us to implement modified versions of CG iterations, + * that rely on efficient applications of the required transformations. + * + * We offer a mass preconditioner based on a rescalling of the diagonal of the + * element mass matrices M_T. + * We consider Q_T := alpha * lambda_min * D_T, where D_T := diag(M_T), and + * lambda_min is the smallest eigenvalue of the following problem + * M_T x = lambda * D_T x. + * alpha is a parameter that is stricly between 0 and 1. + * + * For more details, see: + * 1. Vassilevski, Multilevel Block Factorization Preconditioners (Appendix F.3), + * Springer, 2008. + * 2. James H. Bramble and Joseph E. Pasciak. + * A Preconditioning Technique for Indefinite Systems Resulting From Mixed + * Approximations of Elliptic Problems. Mathematics of Computation, 50:1–17, 1988. */ class BramblePasciakSolver : public DarcySolver { @@ -244,22 +264,25 @@ class BramblePasciakSolver : public DarcySolver BlockOperator op_; BlockOperator map_; BlockDiagonalPreconditioner pc_; + std::unique_ptr M_; std::unique_ptr Q_; Array ess_zero_dofs_; void Init(const HypreParMatrix &M, const HypreParMatrix &B, - const HypreParMatrix &Q, const IterSolveParameters ¶m); + const HypreParMatrix &Q, + const IterSolveParameters ¶m); public: /// System and mass preconditioner are constructed from bilinear forms BramblePasciakSolver( const std::shared_ptr &mVarf, const std::shared_ptr &bVarf, - const IterSolveParameters ¶m); + const IterSolveParameters ¶m, double alpha = 0.5); /// System and mass preconditioner are user-provided BramblePasciakSolver( const HypreParMatrix &M, const HypreParMatrix &B, - const HypreParMatrix &Q, const IterSolveParameters ¶m); + const HypreParMatrix &Q, + const IterSolveParameters ¶m); /// Assemble a preconditioner for the mass matrix /** Mass preconditioner corresponds to a local re-scaling @@ -268,7 +291,7 @@ public: * M_T x_T = lambda_T diag(M_T) x_T * and we set Q_T = 0.5 * min(lambda_T) * diag(M_T). */ - static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf); + static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf, double alpha = 0.5); virtual void Mult(const Vector &x, Vector &y) const; virtual void SetOperator(const Operator &op) { } From 08deeaacd9e5a57dfece89413ee66a15b8cd7152 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 7 Aug 2023 10:35:26 -0700 Subject: [PATCH 012/200] Add AddOperator operator. --- linalg/operator.cpp | 34 ++++++++++++++++++++++++++++++++++ linalg/operator.hpp | 22 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/linalg/operator.cpp b/linalg/operator.cpp index 1f214ece7a..762ebf3507 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -365,6 +365,40 @@ void SecondOrderTimeDependentOperator::ImplicitSolve(const double dt0, mfem_error("SecondOrderTimeDependentOperator::ImplicitSolve() is not overridden!"); } +AddOperator::AddOperator(const Operator *A, const double alpha, + const Operator *B, const double beta, + bool ownA, bool ownB) + : Operator(A->Height(), A->Width()), + A(A), alpha(alpha), B(B), beta(beta), ownA(ownA), ownB(ownB), + a(A->Width()), b(B->Width()) +{ + 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() ); + /* + * TODO + * I think the operators can be iterative, as there is no composition but addition... + * { + * const Solver* SolverB = dynamic_cast(B); + * if (SolverB) + * { + * MFEM_VERIFY(!(SolverB->iterative_mode), + * "Operator B of a ProductOperator should not be in iterative mode"); + * } + * } + */ +} + +AddOperator::~AddOperator() +{ + if (ownA) { delete A; } + if (ownB) { delete B; } +} ProductOperator::ProductOperator(const Operator *A, const Operator *B, bool ownA, bool ownB) diff --git a/linalg/operator.hpp b/linalg/operator.hpp index baa9bf7672..aea3ca5040 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -769,6 +769,28 @@ public: { A.Mult(x, y); } }; +/// General linear combination operator: x -> a A(x) + b B(x). +class AddOperator : public Operator +{ + const Operator *A, *B; + const double alpha, beta; + bool ownA, ownB; + mutable Vector a, b; + +public: + AddOperator( + 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 + { A->Mult(x, a); B->Mult(x, b); add(alpha, a, beta, b, y); } + + virtual void MultTranspose(const Vector &x, Vector &y) const + { A->MultTranspose(x, a); B->MultTranspose(x, b); add(alpha, a, beta, b, y); } + + virtual ~AddOperator(); +}; /// General product operator: x -> (A*B)(x) = A(B(x)). class ProductOperator : public Operator From 79f2d776125f326ab29ca089fc6974c7ac1bc8ac Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Thu, 10 Aug 2023 15:51:36 -0700 Subject: [PATCH 013/200] Add BPCGSolver. Modify BramblePasciakSolver class. - Add class BPCGSolver as a derived class of CGSolver. - Add bool use_bpcg in BramblePasciakSolver. - Storage main matrices in BramblePasciakSolver. - Remaining operators stored as pointers. - Update linalg/operator.hpp (make style). - TODO Fix bug final_iter. --- linalg/operator.hpp | 6 +- miniapps/solvers/block-solvers.cpp | 2 + miniapps/solvers/div_free_solver.cpp | 383 ++++++++++++++++++++++----- miniapps/solvers/div_free_solver.hpp | 68 ++++- miniapps/solvers/makefile | 1 + 5 files changed, 387 insertions(+), 73 deletions(-) diff --git a/linalg/operator.hpp b/linalg/operator.hpp index aea3ca5040..0695e1ca1b 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -779,9 +779,9 @@ class AddOperator : public Operator public: AddOperator( - const Operator *A, const double alpha, - const Operator *B, const double beta, - bool ownA, bool ownB); + 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 { A->Mult(x, a); B->Mult(x, b); add(alpha, a, beta, b, y); } diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index 5c3f943f5f..6ba0f983ca 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -54,6 +54,8 @@ #include "mfem.hpp" #include "div_free_solver.hpp" +// TODO +// #include "bramble_pasciak.hpp" #include #include #include diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 886fae858b..4173f5495e 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -607,100 +607,161 @@ int DivFreeSolver::GetNumIterations() const return solver_.As()->GetNumIterations(); } +/// Bramble-Pasciak Solver BramblePasciakSolver::BramblePasciakSolver( const std::shared_ptr &mVarf, const std::shared_ptr &bVarf, const IterSolveParameters ¶m, double alpha) : DarcySolver(mVarf->ParFESpace()->GetTrueVSize(), bVarf->TestFESpace()->GetTrueVSize()), - op_(offsets_), map_(offsets_), pc_(offsets_), - solver_(mVarf->ParFESpace()->GetComm()) + solver_(mVarf->ParFESpace()->GetComm()), + bpsolver_(mVarf->ParFESpace()->GetComm()) { - //std::unique_ptr M(mVarf->ParallelAssemble()); M_.reset(mVarf->ParallelAssemble()); - std::unique_ptr B(bVarf->ParallelAssemble()); + B_.reset(bVarf->ParallelAssemble()); Q_.reset(ConstructMassPreconditioner(*mVarf, alpha)); - Init(*M_, *B, *Q_, param); + Init(*M_, *B_, *Q_, param); + SetBPCG(true); } BramblePasciakSolver::BramblePasciakSolver( - const HypreParMatrix &M, const HypreParMatrix &B, const HypreParMatrix &Q, + HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, + Solver &M0, Solver &M1, const IterSolveParameters ¶m) : DarcySolver(M.NumRows(), B.NumRows()), - op_(offsets_), map_(offsets_), pc_(offsets_), - solver_(M.GetComm()) + solver_(M.GetComm()), bpsolver_(M.GetComm()) { - Init(M, B, Q, param); + Init(M, B, Q, M0, M1, param); + SetBPCG(false); } void BramblePasciakSolver::Init( - const HypreParMatrix &M, const HypreParMatrix &B, const HypreParMatrix &Q, + HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, + Solver &M0, Solver &M1, const IterSolveParameters ¶m) { - HypreParMatrix *Bt = B.Transpose(); + oop_ = new BlockOperator(offsets_); + ipc_ = new BlockOperator(offsets_); + cpc_ = new BlockDiagonalPreconditioner(offsets_); + + /// User provides the complete system + /// We assume the preconditioners Q and M0 do not match + auto Bt = new TransposeOperator(&B); + auto id_m = new IdentityOperator(M.NumRows()); + auto id_b = new IdentityOperator(B.NumRows()); + auto id = new IdentityOperator(M.NumRows()+B.NumRows()); // invQ - // TODO This is not general enough. We are assuming Q is diag! + // TODO + //This is not general enough. We are assuming Q is diag HypreParMatrix *invQ = new HypreParMatrix(Q); Vector diagQ; Q.GetDiag(diagQ); *invQ = 1.0; invQ->InvScaleRows(diagQ); - // MinvQ - auto MinvQ = ParMult(&M, invQ); - // M*inv(Q) - Id - SparseMatrix MinvQ_diag; - MinvQ->GetDiag(MinvQ_diag); - for (int i = 0; i < MinvQ->NumRows(); ++i) - { - MinvQ_diag(i, i) -= 1.0; - } - - // Main blocks - auto block00 = ParMult(MinvQ, &M); - auto block01 = ParMult(MinvQ, Bt); - auto BinvQ = ParMult(&B, invQ); - auto block11 = ParMult(BinvQ, Bt); - auto block10 = new TransposeOperator(block01); - auto I = new IdentityOperator(B.NumRows()); { - op_.owns_blocks = true; - op_.SetBlock(0, 0, block00); - op_.SetBlock(0, 1, block01); - op_.SetBlock(1, 0, block10); - op_.SetBlock(1, 1, block11); + oop_->owns_blocks = false; + oop_->SetBlock(0, 0, &M); + oop_->SetBlock(0, 1, Bt); + oop_->SetBlock(1, 0, &B); - map_.owns_blocks = true; - map_.SetBlock(0, 0, MinvQ); - map_.SetBlock(1, 0, BinvQ); - map_.SetBlock(1, 1, I, -1.0); - } + cpc_->owns_blocks = true; + cpc_->SetDiagonalBlock(0, &M0); + cpc_->SetDiagonalBlock(0, &M1); - Vector diagM; - M.GetDiag(diagM); - auto invDBt = new HypreParMatrix(*Bt); - invDBt->InvScaleRows(diagM); - auto S = ParMult(&B, invDBt); - // auto solver_M0 = new HypreDiagScale(M); - auto solver_M1 = new HypreBoomerAMG(*S); - auto solver_M0 = new HypreDiagScale(Q); - // auto solver_M1 = new HypreBoomerAMG(*block11); - solver_M1->SetPrintLevel(0); - { - solver_M0->iterative_mode = false; - solver_M1->iterative_mode = false; + ipc_->owns_blocks = false; + ipc_->SetDiagonalBlock(0, &M0); - //pc_.owns_blocks = true; - pc_.SetDiagonalBlock(0, solver_M0); - pc_.SetDiagonalBlock(1, solver_M1); + auto temp = new ProductOperator(oop_, ipc_, false, false); + map_ = new AddOperator(temp, 1.0, id, -1.0, true, false); + + mop_ = new ProductOperator(map_, oop_, false, false); } // Set solver SetOptions(solver_, param); + SetOptions(bpsolver_, param); { - solver_.SetOperator(op_); - solver_.SetPreconditioner(pc_); + solver_.SetOperator(*oop_); + solver_.SetPreconditioner(*cpc_); + bpsolver_.SetOperator(*oop_); + bpsolver_.SetPreconditioner(*cpc_); + bpsolver_.SetPCs(*ipc_, *map_); + } +} + +void BramblePasciakSolver::Init( + HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, + const IterSolveParameters ¶m) +{ + oop_ = new BlockOperator(offsets_); + ipc_ = new BlockOperator(offsets_); + cpc_ = new BlockDiagonalPreconditioner(offsets_); + + auto Bt = new TransposeOperator(&B); + auto id_m = new IdentityOperator(M.NumRows()); + auto id_b = new IdentityOperator(B.NumRows()); + auto id = new IdentityOperator(M.NumRows()+B.NumRows()); + // invQ + // TODO + //This is not general enough. We are assuming Q is diag + HypreParMatrix *invQ = new HypreParMatrix(Q); + Vector diagQ; + Q.GetDiag(diagQ); + *invQ = 1.0; + invQ->InvScaleRows(diagQ); + + Vector diagM; + M.GetDiag(diagM); + auto BT = B.Transpose(); + auto invDBt = new HypreParMatrix(*BT); + invDBt->InvScaleRows(diagM); + auto S = ParMult(&B, invDBt); + auto M0 = new HypreDiagScale(Q); + auto M1 = new HypreBoomerAMG(*S); + // auto solver_M1 = new HypreBoomerAMG(*block11); + M1->SetPrintLevel(0); + + { + oop_->owns_blocks = false; + oop_->SetBlock(0, 0, &M); + oop_->SetBlock(0, 1, Bt); + oop_->SetBlock(1, 0, &B); + + cpc_->owns_blocks = true; + cpc_->SetDiagonalBlock(0, M0); + cpc_->SetDiagonalBlock(1, M1); + + ipc_->owns_blocks = false; + ipc_->SetDiagonalBlock(0, M0); + + auto temp = new ProductOperator(oop_, ipc_, false, false); + map_ = new AddOperator(temp, 1.0, id, -1.0, true, true); + + mop_ = new ProductOperator(map_, oop_, false, false); + } + + { + auto temp = new BlockOperator(offsets_); + auto BinvM = new ProductOperator(&B, invQ, false, false); + + temp->owns_blocks = true; + temp->SetBlock(0, 0, id_m); + temp->SetBlock(1, 1, id_b, -1.0); + temp->SetBlock(1, 0, BinvM); // , -1.0); + ppc_ = new ProductOperator(cpc_, temp, false, true); + } + + // Set solver + SetOptions(solver_, param); + SetOptions(bpsolver_, param); + { + solver_.SetOperator(*mop_); + solver_.SetPreconditioner(*cpc_); + bpsolver_.SetOperator(*oop_); + bpsolver_.SetPreconditioner(*cpc_); + bpsolver_.SetPCs(*ipc_, *ppc_); } } @@ -732,8 +793,210 @@ HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( void BramblePasciakSolver::Mult(const Vector & x, Vector & y) const { - Vector transformed_rhs(x.Size()); - map_.Mult(x, transformed_rhs); - solver_.Mult(transformed_rhs, y); + if (!use_bpcg) + { + Vector transformed_rhs(x.Size()); + map_->Mult(x, transformed_rhs); + solver_.Mult(transformed_rhs, y); + } + else + { + // MFEM_ABORT("Not implemented yet!"); + bpsolver_.Mult(x, y); + } for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } } + +/// Bramble-Pasciak CG +void BPCGSolver::UpdateVectors() +{ + MemoryType mt = GetMemoryType(oper->GetMemoryClass()); + + r.SetSize(width, mt); r.UseDevice(true); + p.SetSize(width, mt); p.UseDevice(true); + g.SetSize(width, mt); g.UseDevice(true); + t.SetSize(width, mt); t.UseDevice(true); + r_hat.SetSize(width, mt); r_hat.UseDevice(true); + // r_tem.SetSize(width, mt); r_tem.UseDevice(true); + r_bar.SetSize(width, mt); r_bar.UseDevice(true); + r_red.SetSize(width, mt); r_red.UseDevice(true); + g_red.SetSize(width, mt); g_red.UseDevice(true); +} + +void BPCGSolver::Mult(const Vector &b, Vector &x) const +{ + int i; + double delta, delta0, del0; + double alpha, beta, gamma; + + // Initialization + x.UseDevice(true); + if (iterative_mode) + { + oper->Mult(x, r); + subtract(b, r, r); // r = b - A x + // tra_->Mult(r,r_hat); // r_hat = X r + // map_->Mult(r,r_tem); // r_tem = S r + pprec->Mult(r,r_bar); // r_bar = P r + p = r_bar; + oper->Mult(p, g); // g = A p + oper->Mult(r_bar, t); // t = A r_bar + iprec->Mult(r, r_red); // r_red = N r + } + else + { + // TODO + MFEM_ABORT("To implement non-iterative mode: iterative_mode: " << + iterative_mode); + } + + // Initial norms + delta = delta0 = Dot(t, r_red) - Dot(r_bar, r); // Dot(r_bar, r_hat) + if (delta0 >= 0.0) { initial_norm = sqrt(delta0); } + MFEM_ASSERT(IsFinite(delta), "nom = " << delta); + if (print_options.iterations || print_options.first_and_last) + { + mfem::out << " Iteration : " << setw(3) << 0 << " (B r, r) = " + << delta << (print_options.first_and_last ? " ...\n" : "\n"); + } + Monitor(0, delta, r, x); + + if (delta < 0.0) + { + if (print_options.warnings) + { + mfem::out << "BPCG: The preconditioner is not positive definite. (Br, r) = " + << delta << '\n'; + } + converged = false; + final_iter = 0; + initial_norm = delta; + final_norm = delta; + return; + } + del0 = std::max(delta*rel_tol*rel_tol, abs_tol*abs_tol); + if (delta <= del0) + { + converged = true; + final_iter = 0; + final_norm = sqrt(delta); + return; + } + + // MFEM checks some system properties before running the loop + // Step 0.1: Compute (p,XAp), p = r_bar + iprec->Mult(g, g_red); + gamma = Dot(g, g_red) - Dot(g,p); + MFEM_ASSERT(IsFinite(gamma), "den = " << gamma); + if (gamma <= 0.0) + { + if (Dot(r_bar, r_bar) > 0.0 && print_options.warnings) + { + mfem::out << "BPCG: The operator is not positive definite. (Ar, r) = " + << gamma << '\n'; + } + if (gamma == 0.0) + { + converged = false; + final_iter = 0; + final_norm = sqrt(delta); + return; + } + } + + // Start iteration + converged = false; + final_iter = max_iter; + for (i = 1; true; ) + { + // Step 2: Get new step in the search direction p + alpha = delta0/gamma; + // Step 3: Update solution (and residual) in the search direction + add(x, alpha, p, x); // x = x + alpha p + add(r, -alpha, g, r); // r = r - alpha g + // map_->Mult(r, r_tem); // r_tem = S r + pprec->Mult(r, r_bar); // r_bar = P r + // Step 4: Compute (HXr,Xr) = (r_bar, r_hat) + iprec->Mult(r, r_red); // r_red = N r + oper->Mult(r_bar, t); // t = A r_bar + delta = Dot(t, r_red) - Dot(r_bar,r); + // Check + MFEM_ASSERT(IsFinite(delta), "betanom = " << delta); + if (delta < 0.0) + { + if (print_options.warnings) + { + mfem::out << "BPCG: The preconditioner is not positive definite. (Br, r) = " + << delta << '\n'; + } + converged = false; + final_iter = i; + break; + } + if (print_options.iterations) + { + mfem::out << " Iteration : " << setw(3) << i << " (B r, r) = " + << delta << std::endl; + } + Monitor(i, delta, r, x); + if (delta <= del0) + { + converged = true; + final_iter = i; + break; + } + if (++i > max_iter) + { + break; + } + // End checks + // Step 5: Update search direction + beta = delta/delta0; + add(r_bar, beta, p, p); + // Step 6: Update remaining directions + // oper->Mult(r_bar, t); // t = A r_bar + add(t, beta, g, g); + delta0 = delta; + // Step 1: Compute (p,XAp) + iprec->Mult(g, g_red); + gamma = Dot(g, g_red) - Dot(g,p); + MFEM_ASSERT(IsFinite(gamma), "den = " << gamma); + if (gamma <= 0.0) + { + if (Dot(r_bar, r_bar) > 0.0 && print_options.warnings) + { + mfem::out << "BPCG: The operator is not positive definite. (Ar, r) = " + << gamma << '\n'; + } + if (gamma == 0.0) + { + final_iter = i; + break; + } + } + } + + if (print_options.first_and_last && !print_options.iterations) + { + mfem::out << " Iteration : " << setw(3) << final_iter << " (B r, r) = " + << delta << '\n'; + } + if (print_options.summary || (print_options.warnings && !converged)) + { + mfem::out << "BPCG: Number of iterations: " << final_iter << '\n'; + } + if (print_options.summary || print_options.iterations || + print_options.first_and_last) + { + const auto arf = pow (gamma/delta0, 0.5/final_iter); + mfem::out << "Average reduction factor = " << arf << '\n'; + } + if (print_options.warnings && !converged) + { + mfem::out << "BPCG: No convergence!" << '\n'; + } + + final_norm = sqrt(delta); + MFEM_WARNING("final_iter: " << final_iter); + Monitor(final_iter, final_norm, r, x, true); +} diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index d0a187818c..c1327d4fc6 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -18,6 +18,38 @@ namespace mfem { +/// Bramble-Pasciak Conjugate Gradient +class BPCGSolver : public CGSolver +{ +protected: + mutable Vector p, g, t, r_hat, r_bar, r_red, g_red; + /// Remaining required operators + /* Operator list + * *oper -> A = [M, Bt; B, 0] + * *prec -> P = diag(M0, M1) + * *iprec -> N = diag(M0, 0) + * *pprec -> P' = P * [Id, 0; B*M0, -Id] + */ + const Operator *iprec, *pprec; + void UpdateVectors(); + +public: + BPCGSolver() { } + +#ifdef MFEM_USE_MPI + BPCGSolver(MPI_Comm comm_) : CGSolver(comm_) { } +#endif + + virtual void SetOperator(const Operator &op) + { IterativeSolver::SetOperator(op); UpdateVectors(); } + + /// Set remaining operators + void SetPCs(const Operator &ipc, const Operator &ppc) + { iprec = &ipc; pprec = &ppc; } + + virtual void Mult(const Vector &b, Vector &x) const; +}; + namespace blocksolvers { @@ -260,16 +292,29 @@ public: */ class BramblePasciakSolver : public DarcySolver { + mutable bool use_bpcg; CGSolver solver_; - BlockOperator op_; - BlockOperator map_; - BlockDiagonalPreconditioner pc_; + BPCGSolver bpsolver_; + BlockOperator *oop_; + ProductOperator *mop_; + AddOperator *map_; + ProductOperator *ppc_; + BlockDiagonalPreconditioner *cpc_; + BlockOperator *ipc_; std::unique_ptr M_; + std::unique_ptr B_; std::unique_ptr Q_; Array ess_zero_dofs_; - void Init(const HypreParMatrix &M, const HypreParMatrix &B, - const HypreParMatrix &Q, + /// User provides system. No BPCG available here. + void Init(HypreParMatrix &M, HypreParMatrix &B, + HypreParMatrix &Q, + Solver &M0, Solver &M1, + const IterSolveParameters ¶m); + + /// Construct specific preconditioners, and enables usage of BPCG. + void Init(HypreParMatrix &M, HypreParMatrix &B, + HypreParMatrix &Q, const IterSolveParameters ¶m); public: /// System and mass preconditioner are constructed from bilinear forms @@ -280,8 +325,8 @@ public: /// System and mass preconditioner are user-provided BramblePasciakSolver( - const HypreParMatrix &M, const HypreParMatrix &B, - const HypreParMatrix &Q, + HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, + Solver &M0, Solver &M1, const IterSolveParameters ¶m); /// Assemble a preconditioner for the mass matrix @@ -291,16 +336,19 @@ public: * M_T x_T = lambda_T diag(M_T) x_T * and we set Q_T = 0.5 * min(lambda_T) * diag(M_T). */ - static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf, double alpha = 0.5); + static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf, + double alpha = 0.5); + + // TODO + /// Define if BPCG will be employed in Mult + void SetBPCG(bool use) { use_bpcg = use; } virtual void Mult(const Vector &x, Vector &y) const; virtual void SetOperator(const Operator &op) { } void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } virtual int GetNumIterations() const { return solver_.GetNumIterations(); } }; - } // namespace blocksolvers - } // namespace mfem #endif // MFEM_DIVFREE_SOLVER_HPP diff --git a/miniapps/solvers/makefile b/miniapps/solvers/makefile index b36aa1bc3d..e3cca0189b 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/makefile @@ -21,6 +21,7 @@ CONFIG_MK = $(MFEM_BUILD_DIR)/config/config.mk MFEM_LIB_FILE = mfem_is_not_built -include $(CONFIG_MK) +# TODO add bramble_pasciak.cpp BLOCK_SOLVERS_SRC = div_free_solver.cpp block-solvers.cpp BLOCK_SOLVERS_OBJ = $(BLOCK_SOLVERS_SRC:.cpp=.o) From 0631cea4581c5cfaf8a5b423dc689c974e2ed089 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Thu, 10 Aug 2023 16:15:35 -0700 Subject: [PATCH 014/200] Update BramblePasciakSolver::GetNumIterations. --- miniapps/solvers/div_free_solver.cpp | 7 ++++++- miniapps/solvers/div_free_solver.hpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 4173f5495e..d7e2debf1b 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -807,6 +807,12 @@ void BramblePasciakSolver::Mult(const Vector & x, Vector & y) const for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } } +int BramblePasciakSolver::GetNumIterations() const +{ + if(!use_bpcg){ return solver_.GetNumIterations(); } + else { return bpsolver_.GetNumIterations(); } +} + /// Bramble-Pasciak CG void BPCGSolver::UpdateVectors() { @@ -997,6 +1003,5 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const } final_norm = sqrt(delta); - MFEM_WARNING("final_iter: " << final_iter); Monitor(final_iter, final_norm, r, x, true); } diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index c1327d4fc6..ca45780707 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -346,7 +346,7 @@ public: virtual void Mult(const Vector &x, Vector &y) const; virtual void SetOperator(const Operator &op) { } void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } - virtual int GetNumIterations() const { return solver_.GetNumIterations(); } + virtual int GetNumIterations() const; }; } // namespace blocksolvers } // namespace mfem From 6f3cf11d58eaf5141ee68acd11a463b1bf3c8dac Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Thu, 10 Aug 2023 16:25:23 -0700 Subject: [PATCH 015/200] Indentation fix (make style). --- miniapps/solvers/div_free_solver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index d7e2debf1b..78462f67cc 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -809,8 +809,8 @@ void BramblePasciakSolver::Mult(const Vector & x, Vector & y) const int BramblePasciakSolver::GetNumIterations() const { - if(!use_bpcg){ return solver_.GetNumIterations(); } - else { return bpsolver_.GetNumIterations(); } + if (!use_bpcg) { return solver_.GetNumIterations(); } + else { return bpsolver_.GetNumIterations(); } } /// Bramble-Pasciak CG From 31b17b2913905480b7a4a7dca7bd7c5e892b5440 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 14 Aug 2023 14:44:26 -0700 Subject: [PATCH 016/200] Condense Init functions. - Define operator pointers when required. - Use OperatorPtr for solver_ in BPSClass. - Add MFEM Warnings. - Add H preconditioner. --- miniapps/solvers/block-solvers.cpp | 20 +- miniapps/solvers/div_free_solver.cpp | 292 +++++++++++++++++---------- miniapps/solvers/div_free_solver.hpp | 55 +++-- 3 files changed, 244 insertions(+), 123 deletions(-) diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index 6ba0f983ca..6fd6150083 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -261,7 +261,12 @@ int main(int argc, char *argv[]) int par_ref_levels = 2; bool show_error = false; bool visualization = false; + bool enable_bpcg = true; + bool enable_hpc = false; + DFSParameters param; + BPCGParameters bpcg_param; + OptionsParser args(argc, argv); args.AddOption(&mesh_file, "-m", "--mesh", "Mesh file to use."); @@ -279,6 +284,12 @@ int main(int argc, char *argv[]) args.AddOption(&visualization, "-vis", "--visualization", "-no-vis", "--no-visualization", "Enable or disable GLVis visualization."); + args.AddOption(&enable_bpcg, "-bp", "--bpcg", "-no-bp", + "--no-bpcg", + "Enable or disable Bramble-Pasciak CG method (BPCG-only)."); + args.AddOption(&enable_hpc, "-hp", "--h-pc", "-no-hp", + "--no-h-pc", + "Enable or disable H preconditioner (BPCG-only)."); args.Parse(); if (!args.Good()) { @@ -293,6 +304,9 @@ int main(int argc, char *argv[]) << "when par_ref_levels == 0.\n"; } + bpcg_param.use_bpcg = enable_bpcg; + bpcg_param.use_hpc = enable_hpc; + // Initialize the mesh, boundary attributes, and solver parameters Mesh *mesh = new Mesh(mesh_file, 1, 1); int dim = mesh->Dimension(); @@ -360,16 +374,16 @@ int main(int argc, char *argv[]) DivFreeSolver dfs_cm(M, B, DFS_data); setup_time[&dfs_cm] = chrono.RealTime(); - // TODO Add alpha parameter to the param struct ResetTimer(); - BramblePasciakSolver bp(darcy.GetMform(), darcy.GetBform(), param); + BramblePasciakSolver bp(darcy.GetMform(), darcy.GetBform(), bpcg_param); setup_time[&bp] = chrono.RealTime(); std::map solver_to_name; solver_to_name[&bdp] = "Block-diagonal-preconditioned MINRES"; solver_to_name[&dfs_dm] = "Divergence free (decoupled mode)"; solver_to_name[&dfs_cm] = "Divergence free (coupled mode)"; - solver_to_name[&bp] = "Bramble Pasciak CG"; + solver_to_name[&bp] = bpcg_param.use_bpcg ? "Bramble Pasciak CG (BPCG)" : + "Bramble Pasciak CG (BP Transformation + PCG)"; // Solve the problem using all solvers for (const auto& solver_pair : solver_to_name) diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 78462f67cc..f642ce90e6 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -611,101 +611,37 @@ int DivFreeSolver::GetNumIterations() const BramblePasciakSolver::BramblePasciakSolver( const std::shared_ptr &mVarf, const std::shared_ptr &bVarf, - const IterSolveParameters ¶m, double alpha) + const BPCGParameters ¶m) : DarcySolver(mVarf->ParFESpace()->GetTrueVSize(), - bVarf->TestFESpace()->GetTrueVSize()), - solver_(mVarf->ParFESpace()->GetComm()), - bpsolver_(mVarf->ParFESpace()->GetComm()) + bVarf->TestFESpace()->GetTrueVSize()) { + MFEM_ASSERT((param.q_scaling>=0.0) && (param.q_scaling<=1.0), + "Invalid Q-scaling factor: param.q_scaling " << param.q_scaling ); M_.reset(mVarf->ParallelAssemble()); B_.reset(bVarf->ParallelAssemble()); - Q_.reset(ConstructMassPreconditioner(*mVarf, alpha)); + Q_.reset(ConstructMassPreconditioner(*mVarf, param.q_scaling)); Init(*M_, *B_, *Q_, param); - SetBPCG(true); } BramblePasciakSolver::BramblePasciakSolver( HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, Solver &M0, Solver &M1, - const IterSolveParameters ¶m) - : DarcySolver(M.NumRows(), B.NumRows()), - solver_(M.GetComm()), bpsolver_(M.GetComm()) + const BPCGParameters ¶m) + : DarcySolver(M.NumRows(), B.NumRows()) { Init(M, B, Q, M0, M1, param); - SetBPCG(false); } void BramblePasciakSolver::Init( HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, - Solver &M0, Solver &M1, - const IterSolveParameters ¶m) + const BPCGParameters ¶m) { - oop_ = new BlockOperator(offsets_); - ipc_ = new BlockOperator(offsets_); - cpc_ = new BlockDiagonalPreconditioner(offsets_); - - /// User provides the complete system - /// We assume the preconditioners Q and M0 do not match auto Bt = new TransposeOperator(&B); - auto id_m = new IdentityOperator(M.NumRows()); - auto id_b = new IdentityOperator(B.NumRows()); - auto id = new IdentityOperator(M.NumRows()+B.NumRows()); // invQ // TODO - //This is not general enough. We are assuming Q is diag - HypreParMatrix *invQ = new HypreParMatrix(Q); - Vector diagQ; - Q.GetDiag(diagQ); - *invQ = 1.0; - invQ->InvScaleRows(diagQ); - - { - oop_->owns_blocks = false; - oop_->SetBlock(0, 0, &M); - oop_->SetBlock(0, 1, Bt); - oop_->SetBlock(1, 0, &B); - - cpc_->owns_blocks = true; - cpc_->SetDiagonalBlock(0, &M0); - cpc_->SetDiagonalBlock(0, &M1); - - ipc_->owns_blocks = false; - ipc_->SetDiagonalBlock(0, &M0); - - auto temp = new ProductOperator(oop_, ipc_, false, false); - map_ = new AddOperator(temp, 1.0, id, -1.0, true, false); - - mop_ = new ProductOperator(map_, oop_, false, false); - } - - // Set solver - SetOptions(solver_, param); - SetOptions(bpsolver_, param); - { - solver_.SetOperator(*oop_); - solver_.SetPreconditioner(*cpc_); - bpsolver_.SetOperator(*oop_); - bpsolver_.SetPreconditioner(*cpc_); - bpsolver_.SetPCs(*ipc_, *map_); - } -} - -void BramblePasciakSolver::Init( - HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, - const IterSolveParameters ¶m) -{ - oop_ = new BlockOperator(offsets_); - ipc_ = new BlockOperator(offsets_); - cpc_ = new BlockDiagonalPreconditioner(offsets_); - - auto Bt = new TransposeOperator(&B); - auto id_m = new IdentityOperator(M.NumRows()); - auto id_b = new IdentityOperator(B.NumRows()); - auto id = new IdentityOperator(M.NumRows()+B.NumRows()); - // invQ - // TODO - //This is not general enough. We are assuming Q is diag + // This is not general enough. We are assuming Q is diag + // Not using invQ ... HypreParMatrix *invQ = new HypreParMatrix(Q); Vector diagQ; Q.GetDiag(diagQ); @@ -723,45 +659,197 @@ void BramblePasciakSolver::Init( // auto solver_M1 = new HypreBoomerAMG(*block11); M1->SetPrintLevel(0); + use_bpcg = param.use_bpcg; + + if (use_bpcg) { + oop_ = new BlockOperator(offsets_); oop_->owns_blocks = false; oop_->SetBlock(0, 0, &M); oop_->SetBlock(0, 1, Bt); oop_->SetBlock(1, 0, &B); + // cpc_ unused in bpcg + auto temp_cpc = new BlockDiagonalPreconditioner(offsets_); + temp_cpc->owns_blocks = true; + temp_cpc->SetDiagonalBlock(0, M0); + temp_cpc->SetDiagonalBlock(1, M1); + // tri(1,0) = B M0 = B invQ + auto id_m = new IdentityOperator(M.NumRows()); + auto id_b = new IdentityOperator(B.NumRows()); + auto BinvM0 = new ProductOperator(&B, M0, false, false); + // tri + auto temp_tri = new BlockOperator(offsets_); + temp_tri->owns_blocks = true; + temp_tri->SetBlock(0, 0, id_m); + temp_tri->SetBlock(1, 1, id_b, -1.0); + temp_tri->SetBlock(1, 0, BinvM0); + + ppc_ = new ProductOperator(temp_cpc, temp_tri, true, true); + + ipc_ = new BlockOperator(offsets_); + ipc_->owns_blocks = false; + ipc_->SetDiagonalBlock(0, M0); + + // bpcg + solver_.Reset(new BPCGSolver(M.GetComm())); + SetOptions(*solver_.As(), param); + { + solver_.As()->SetOperator(*oop_); + solver_.As()->SetIncompletePreconditioner(*ipc_); + solver_.As()->SetParticularPreconditioner(*ppc_); + } + + // TODO + // Set remaining pointers to nullptr? + if (Mpi::Root()) { MFEM_WARNING("mop_, map_, cpc_ unset!"); } + if (param.use_hpc && Mpi::Root()) { MFEM_WARNING("H preconditioner is implicit when using BGCG. hpc_ unset!"); } + } + else + { + // oop_ unused in cg + auto temp_oop = new BlockOperator(offsets_); + temp_oop->owns_blocks = false; + temp_oop->SetBlock(0, 0, &M); + temp_oop->SetBlock(0, 1, Bt); + temp_oop->SetBlock(1, 0, &B); + + // ipc_ unused in cg + auto temp_ipc = new BlockOperator(offsets_); + temp_ipc->owns_blocks = false; + temp_ipc->SetDiagonalBlock(0, M0); + + // temp_AN = temp_oop * temp_ipc + auto temp_AN = new ProductOperator(temp_oop, temp_ipc, true, true); + + // Required for updating the RHS + auto id = new IdentityOperator(M.NumRows()+B.NumRows()); + map_ = new AddOperator(temp_AN, 1.0, id, -1.0, true, true); + + mop_ = new ProductOperator(map_, temp_oop, false, true); + + cpc_ = new BlockDiagonalPreconditioner(offsets_); cpc_->owns_blocks = true; cpc_->SetDiagonalBlock(0, M0); cpc_->SetDiagonalBlock(1, M1); + if (param.use_hpc) + { + auto Diff = new HypreParMatrix(M); + Diff->Add(-1.0,Q); + auto MM0 = new HypreDiagScale(*Diff); + auto MM1 = new HypreDiagScale(*S); + + hpc_ = new BlockDiagonalPreconditioner(offsets_); + hpc_->owns_blocks = true; + hpc_->SetDiagonalBlock(0, MM0); + hpc_->SetDiagonalBlock(1, MM1); + } + + solver_.Reset(new CGSolver(M.GetComm())); + SetOptions(*solver_.As(), param); + { + solver_.As()->SetOperator(*mop_); + solver_.As()->SetPreconditioner(*cpc_); + } + + // TODO + // Set remaining pointers to nullptr? + if (Mpi::Root()) { MFEM_WARNING("oop_, ipc_, ppc_ unset!"); } + } +} + +void BramblePasciakSolver::Init( + HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, + Solver &M0, Solver &M1, + const BPCGParameters ¶m) +{ + auto Bt = new TransposeOperator(&B); + auto invQ = new HypreDiagScale(Q); + + use_bpcg = param.use_bpcg; + + if (use_bpcg) + { + oop_ = new BlockOperator(offsets_); + oop_->owns_blocks = false; + oop_->SetBlock(0, 0, &M); + oop_->SetBlock(0, 1, Bt); + oop_->SetBlock(1, 0, &B); + + // cpc_ unused in bpcg + auto temp_cpc = new BlockDiagonalPreconditioner(offsets_); + temp_cpc->owns_blocks = true; + temp_cpc->SetDiagonalBlock(0, invQ); + temp_cpc->SetDiagonalBlock(1, &M1); + // tri(1,0) = B M0 = B invQ + auto id_m = new IdentityOperator(M.NumRows()); + auto id_b = new IdentityOperator(B.NumRows()); + auto BinvQ = new ProductOperator(&B, invQ, false, false); + // tri + auto temp_tri = new BlockOperator(offsets_); + temp_tri->owns_blocks = true; + temp_tri->SetBlock(0, 0, id_m); + temp_tri->SetBlock(1, 1, id_b, -1.0); + temp_tri->SetBlock(1, 0, BinvQ); + + ppc_ = new ProductOperator(temp_cpc, temp_tri, true, true); + + ipc_ = new BlockOperator(offsets_); ipc_->owns_blocks = false; - ipc_->SetDiagonalBlock(0, M0); + ipc_->SetDiagonalBlock(0, invQ); - auto temp = new ProductOperator(oop_, ipc_, false, false); - map_ = new AddOperator(temp, 1.0, id, -1.0, true, true); + // bpcg + solver_.Reset(new BPCGSolver(M.GetComm())); + SetOptions(*solver_.As(), param); + { + solver_.As()->SetOperator(*oop_); + solver_.As()->SetIncompletePreconditioner(*ipc_); + solver_.As()->SetParticularPreconditioner(*ppc_); + } - mop_ = new ProductOperator(map_, oop_, false, false); + // TODO + // Set remaining pointers to nullptr? + if (Mpi::Root()) { MFEM_WARNING("mop_, map_, cpc_ unset!"); } } - + else { - auto temp = new BlockOperator(offsets_); - auto BinvM = new ProductOperator(&B, invQ, false, false); + // oop_ unused in cg + auto temp_oop = new BlockOperator(offsets_); + temp_oop->owns_blocks = false; + temp_oop->SetBlock(0, 0, &M); + temp_oop->SetBlock(0, 1, Bt); + temp_oop->SetBlock(1, 0, &B); - temp->owns_blocks = true; - temp->SetBlock(0, 0, id_m); - temp->SetBlock(1, 1, id_b, -1.0); - temp->SetBlock(1, 0, BinvM); // , -1.0); - ppc_ = new ProductOperator(cpc_, temp, false, true); - } + // ipc_ unused in cg + auto temp_ipc = new BlockOperator(offsets_); + temp_ipc->owns_blocks = false; + temp_ipc->SetDiagonalBlock(0, invQ); - // Set solver - SetOptions(solver_, param); - SetOptions(bpsolver_, param); - { - solver_.SetOperator(*mop_); - solver_.SetPreconditioner(*cpc_); - bpsolver_.SetOperator(*oop_); - bpsolver_.SetPreconditioner(*cpc_); - bpsolver_.SetPCs(*ipc_, *ppc_); + // temp_AN = temp_oop * temp_ipc + auto temp_AN = new ProductOperator(temp_oop, temp_ipc, true, true); + + // Required for updating the RHS + auto id = new IdentityOperator(M.NumRows()+B.NumRows()); + map_ = new AddOperator(temp_AN, 1.0, id, -1.0, true, true); + + mop_ = new ProductOperator(map_, temp_oop, false, true); + + cpc_ = new BlockDiagonalPreconditioner(offsets_); + cpc_->owns_blocks = true; + cpc_->SetDiagonalBlock(0, &M0); + cpc_->SetDiagonalBlock(1, &M1); + + solver_.Reset(new CGSolver(M.GetComm())); + SetOptions(*solver_.As(), param); + { + solver_.As()->SetOperator(*mop_); + solver_.As()->SetPreconditioner(*cpc_); + } + + // TODO + // Set remaining pointers to nullptr? + if (Mpi::Root()) { MFEM_WARNING("oop_, ipc_, ppc_ unset!"); } } } @@ -797,20 +885,19 @@ void BramblePasciakSolver::Mult(const Vector & x, Vector & y) const { Vector transformed_rhs(x.Size()); map_->Mult(x, transformed_rhs); - solver_.Mult(transformed_rhs, y); + solver_.As()->Mult(transformed_rhs, y); } else { - // MFEM_ABORT("Not implemented yet!"); - bpsolver_.Mult(x, y); + solver_.As()->Mult(x, y); } for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } } int BramblePasciakSolver::GetNumIterations() const { - if (!use_bpcg) { return solver_.GetNumIterations(); } - else { return bpsolver_.GetNumIterations(); } + if (!use_bpcg) { return solver_.As()->GetNumIterations(); } + else { return solver_.As()->GetNumIterations(); } } /// Bramble-Pasciak CG @@ -822,8 +909,7 @@ void BPCGSolver::UpdateVectors() p.SetSize(width, mt); p.UseDevice(true); g.SetSize(width, mt); g.UseDevice(true); t.SetSize(width, mt); t.UseDevice(true); - r_hat.SetSize(width, mt); r_hat.UseDevice(true); - // r_tem.SetSize(width, mt); r_tem.UseDevice(true); + // r_hat.SetSize(width, mt); r_hat.UseDevice(true); r_bar.SetSize(width, mt); r_bar.UseDevice(true); r_red.SetSize(width, mt); r_red.UseDevice(true); g_red.SetSize(width, mt); g_red.UseDevice(true); diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index ca45780707..c1d283de2b 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -19,14 +19,16 @@ namespace mfem { /// Bramble-Pasciak Conjugate Gradient -class BPCGSolver : public CGSolver +class BPCGSolver : public IterativeSolver { protected: - mutable Vector p, g, t, r_hat, r_bar, r_red, g_red; + mutable Vector r, p, g, t, r_bar, r_red, g_red; /// Remaining required operators /* Operator list + * From IterativeSolver: * *oper -> A = [M, Bt; B, 0] * *prec -> P = diag(M0, M1) + * From this class: * *iprec -> N = diag(M0, 0) * *pprec -> P' = P * [Id, 0; B*M0, -Id] */ @@ -37,15 +39,23 @@ public: BPCGSolver() { } #ifdef MFEM_USE_MPI - BPCGSolver(MPI_Comm comm_) : CGSolver(comm_) { } + BPCGSolver(MPI_Comm comm_) : IterativeSolver(comm_) { } #endif virtual void SetOperator(const Operator &op) { IterativeSolver::SetOperator(op); UpdateVectors(); } - /// Set remaining operators - void SetPCs(const Operator &ipc, const Operator &ppc) - { iprec = &ipc; pprec = &ppc; } + virtual void SetPreconditioner(const Operator &pc) + { if (Mpi::Root()) { MFEM_WARNING("No explicit preconditioner required for BPCG"); } } + + virtual void SetPreconditioner() + { if (Mpi::Root()) { MFEM_WARNING("No explicit preconditioner required for BPCG"); } } + + virtual void SetIncompletePreconditioner(const Operator &ipc) + { iprec = &ipc; } + + virtual void SetParticularPreconditioner(const Operator &ppc) + { pprec = &ppc; } virtual void Mult(const Vector &b, Vector &x) const; }; @@ -76,6 +86,16 @@ struct DFSParameters : IterSolveParameters IterSolveParameters BBT_solve_param; }; +/// Parameters for the BPCG method +struct BPCGParameters : IterSolveParameters +{ + /* These are parameters for the scaling of the Q preconditioner + * the usage of BPCG method, and the definition of the H preconditioner */ + bool use_bpcg = true; + double q_scaling = 0.5; + bool use_hpc = false; +}; + /// Data for the divergence free solver struct DFSData { @@ -292,42 +312,43 @@ public: */ class BramblePasciakSolver : public DarcySolver { + // TODO TO be removed and included in param mutable bool use_bpcg; - CGSolver solver_; - BPCGSolver bpsolver_; - BlockOperator *oop_; + OperatorPtr solver_; + // CGSolver solver_; + // BPCGSolver bpsolver_; + BlockOperator *oop_, *ipc_; ProductOperator *mop_; AddOperator *map_; ProductOperator *ppc_; - BlockDiagonalPreconditioner *cpc_; - BlockOperator *ipc_; + BlockDiagonalPreconditioner *cpc_, *hpc_; std::unique_ptr M_; std::unique_ptr B_; std::unique_ptr Q_; Array ess_zero_dofs_; - /// User provides system. No BPCG available here. + /// User provides system. void Init(HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, Solver &M0, Solver &M1, - const IterSolveParameters ¶m); + const BPCGParameters ¶m); - /// Construct specific preconditioners, and enables usage of BPCG. + /// Construct specific preconditioners. void Init(HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, - const IterSolveParameters ¶m); + const BPCGParameters ¶m); public: /// System and mass preconditioner are constructed from bilinear forms BramblePasciakSolver( const std::shared_ptr &mVarf, const std::shared_ptr &bVarf, - const IterSolveParameters ¶m, double alpha = 0.5); + const BPCGParameters ¶m); /// System and mass preconditioner are user-provided BramblePasciakSolver( HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, Solver &M0, Solver &M1, - const IterSolveParameters ¶m); + const BPCGParameters ¶m); /// Assemble a preconditioner for the mass matrix /** Mass preconditioner corresponds to a local re-scaling From aae0f2b7f24d9e885bb3ccdd9b1202bfa5ebd5e3 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Thu, 17 Aug 2023 16:27:11 -0700 Subject: [PATCH 017/200] Compartmentalization of block-solvers. - Add bramble_pasciack.xpp, darcy_solver.xpp - Move solvers to their respective files and headders - Update makefile and CMakeList.txt - (WIP) Add draft elasticity solver (similar to darcy_solver) - (WIP) Add specific classes to handle the elasticity FES - (WIP) Define basic block structure --- miniapps/solvers/CMakeLists.txt | 10 +- miniapps/solvers/block-solvers.cpp | 215 +-------- miniapps/solvers/bramble_pasciak.cpp | 501 +++++++++++++++++++++ miniapps/solvers/bramble_pasciak.hpp | 157 +++++++ miniapps/solvers/darcy_solver.cpp | 287 ++++++++++++ miniapps/solvers/darcy_solver.hpp | 192 ++++++++ miniapps/solvers/div_free_solver.cpp | 579 ------------------------- miniapps/solvers/div_free_solver.hpp | 244 +---------- miniapps/solvers/elasticity_solver.cpp | 444 +++++++++++++++++++ miniapps/solvers/makefile | 17 +- 10 files changed, 1605 insertions(+), 1041 deletions(-) create mode 100644 miniapps/solvers/bramble_pasciak.cpp create mode 100644 miniapps/solvers/bramble_pasciak.hpp create mode 100644 miniapps/solvers/darcy_solver.cpp create mode 100644 miniapps/solvers/darcy_solver.hpp create mode 100644 miniapps/solvers/elasticity_solver.cpp diff --git a/miniapps/solvers/CMakeLists.txt b/miniapps/solvers/CMakeLists.txt index 3320bf9d98..9b996cbf5d 100644 --- a/miniapps/solvers/CMakeLists.txt +++ b/miniapps/solvers/CMakeLists.txt @@ -12,8 +12,14 @@ if (MFEM_USE_MPI) add_mfem_miniapp(block-solvers MAIN block-solvers.cpp - EXTRA_SOURCES div_free_solver.cpp - EXTRA_HEADERS div_free_solver.hpp + EXTRA_SOURCES darcy_solver.cpp div_free_solver.cpp bramble_pasciak.cpp + EXTRA_HEADERS darcy_solver.hpp div_free_solver.hpp bramble_pasciak.hpp + LIBRARIES mfem) + + add_mfem_miniapp(elast-block-solvers + MAIN elasticity_solver.cpp + EXTRA_SOURCES + EXTRA_HEADERS LIBRARIES mfem) add_mfem_miniapp(plor_solvers diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index 6fd6150083..4c9227bc0c 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -53,9 +53,8 @@ // will be imposed on boundary with the i-th attribute. #include "mfem.hpp" +#include "bramble_pasciak.hpp" #include "div_free_solver.hpp" -// TODO -// #include "bramble_pasciak.hpp" #include #include #include @@ -64,180 +63,6 @@ using namespace std; using namespace mfem; using namespace blocksolvers; -// Exact solution, u and p, and r.h.s., f and g. -void u_exact(const Vector & x, Vector & u); -double p_exact(const Vector & x); -void f_exact(const Vector & x, Vector & f); -double g_exact(const Vector & x); -double natural_bc(const Vector & x); - -/** Wrapper for assembling the discrete Darcy problem (ex5p) - [ M B^T ] [u] = [f] - [ B 0 ] [p] = [g] - where: - M = \int_\Omega (k u_h) \cdot v_h dx, - B = -\int_\Omega (div_h u_h) q_h dx, - f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, - g = \int_\Omega g_exact q_h dx, - u_h, v_h \in R_h (Raviart-Thomas finite element space), - q_h \in W_h (piecewise discontinuous polynomials), - D: subset of the boundary where natural boundary condition is imposed. */ -class DarcyProblem -{ - OperatorPtr M_; - OperatorPtr B_; - Vector rhs_; - Vector ess_data_; - ParGridFunction u_; - ParGridFunction p_; - ParMesh mesh_; - shared_ptr mVarf_; - shared_ptr bVarf_; - VectorFunctionCoefficient ucoeff_; - FunctionCoefficient pcoeff_; - DFSSpaces dfs_spaces_; - PWConstCoefficient mass_coeff; - const IntegrationRule *irs_[Geometry::NumGeom]; -public: - DarcyProblem(Mesh &mesh, int num_refines, int order, const char *coef_file, - Array &ess_bdr, DFSParameters param); - - HypreParMatrix& GetM() { return *M_.As(); } - HypreParMatrix& GetB() { return *B_.As(); } - const Vector& GetRHS() { return rhs_; } - const Vector& GetEssentialBC() { return ess_data_; } - const DFSData& GetDFSData() const { return dfs_spaces_.GetDFSData(); } - void ShowError(const Vector &sol, bool verbose); - void VisualizeSolution(const Vector &sol, string tag); - shared_ptr GetMform() const { return mVarf_; } - shared_ptr GetBform() const { return bVarf_; } -}; - -DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, - const char *coef_file, Array &ess_bdr, - DFSParameters dfs_param) - : mesh_(MPI_COMM_WORLD, mesh), ucoeff_(mesh.Dimension(), u_exact), - pcoeff_(p_exact), dfs_spaces_(order, num_refs, &mesh_, ess_bdr, dfs_param), - mass_coeff() -{ - for (int l = 0; l < num_refs; l++) - { - mesh_.UniformRefinement(); - dfs_spaces_.CollectDFSData(); - } - - Vector coef_vector(mesh.GetNE()); - coef_vector = 1.0; - if (std::strcmp(coef_file, "")) - { - ifstream coef_str(coef_file); - coef_vector.Load(coef_str, mesh.GetNE()); - } - - mass_coeff.UpdateConstants(coef_vector); - VectorFunctionCoefficient fcoeff(mesh_.Dimension(), f_exact); - FunctionCoefficient natcoeff(natural_bc); - FunctionCoefficient gcoeff(g_exact); - - u_.SetSpace(dfs_spaces_.GetHdivFES()); - p_.SetSpace(dfs_spaces_.GetL2FES()); - p_ = 0.0; - u_ = 0.0; - u_.ProjectBdrCoefficientNormal(ucoeff_, ess_bdr); - - ParLinearForm fform(dfs_spaces_.GetHdivFES()); - fform.AddDomainIntegrator(new VectorFEDomainLFIntegrator(fcoeff)); - fform.AddBoundaryIntegrator(new VectorFEBoundaryFluxLFIntegrator(natcoeff)); - fform.Assemble(); - - ParLinearForm gform(dfs_spaces_.GetL2FES()); - gform.AddDomainIntegrator(new DomainLFIntegrator(gcoeff)); - gform.Assemble(); - - // ParBilinearForm mVarf_(dfs_spaces_.GetHdivFES()); - // ParMixedBilinearForm bVarf_(dfs_spaces_.GetHdivFES(), dfs_spaces_.GetL2FES()); - - mVarf_ = make_shared(dfs_spaces_.GetHdivFES()); - bVarf_ = make_shared(dfs_spaces_.GetHdivFES(), - dfs_spaces_.GetL2FES()); - - mVarf_->AddDomainIntegrator(new VectorFEMassIntegrator(mass_coeff)); - mVarf_->ComputeElementMatrices(); - mVarf_->Assemble(); - mVarf_->EliminateEssentialBC(ess_bdr, u_, fform); - mVarf_->Finalize(); - M_.Reset(mVarf_->ParallelAssemble()); - - bVarf_->AddDomainIntegrator(new VectorFEDivergenceIntegrator); - bVarf_->Assemble(); - bVarf_->SpMat() *= -1.0; - bVarf_->EliminateTrialDofs(ess_bdr, u_, gform); - bVarf_->Finalize(); - B_.Reset(bVarf_->ParallelAssemble()); - - rhs_.SetSize(M_->NumRows() + B_->NumRows()); - Vector rhs_block0(rhs_.GetData(), M_->NumRows()); - Vector rhs_block1(rhs_.GetData()+M_->NumRows(), B_->NumRows()); - fform.ParallelAssemble(rhs_block0); - gform.ParallelAssemble(rhs_block1); - - ess_data_.SetSize(M_->NumRows() + B_->NumRows()); - ess_data_ = 0.0; - Vector ess_data_block0(ess_data_.GetData(), M_->NumRows()); - u_.ParallelProject(ess_data_block0); - - int order_quad = max(2, 2*order+1); - for (int i=0; i < Geometry::NumGeom; ++i) - { - irs_[i] = &(IntRules.Get(i, order_quad)); - } -} - -void DarcyProblem::ShowError(const Vector& sol, bool verbose) -{ - u_.Distribute(Vector(sol.GetData(), M_->NumRows())); - p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); - - double err_u = u_.ComputeL2Error(ucoeff_, irs_); - double norm_u = ComputeGlobalLpNorm(2, ucoeff_, mesh_, irs_); - double err_p = p_.ComputeL2Error(pcoeff_, irs_); - double norm_p = ComputeGlobalLpNorm(2, pcoeff_, mesh_, irs_); - - if (!verbose) { return; } - cout << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n"; - cout << "|| p_h - p_ex || / || p_ex || = " << err_p / norm_p << "\n"; -} - -void DarcyProblem::VisualizeSolution(const Vector& sol, string tag) -{ - int num_procs, myid; - MPI_Comm_size(mesh_.GetComm(), &num_procs); - MPI_Comm_rank(mesh_.GetComm(), &myid); - - u_.Distribute(Vector(sol.GetData(), M_->NumRows())); - p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); - - const char vishost[] = "localhost"; - const int visport = 19916; - socketstream u_sock(vishost, visport); - u_sock << "parallel " << num_procs << " " << myid << "\n"; - u_sock.precision(8); - u_sock << "solution\n" << mesh_ << u_ << "window_title 'Velocity (" - << tag << " solver)'" << endl; - MPI_Barrier(mesh_.GetComm()); - socketstream p_sock(vishost, visport); - p_sock << "parallel " << num_procs << " " << myid << "\n"; - p_sock.precision(8); - p_sock << "solution\n" << mesh_ << p_ << "window_title 'Pressure (" - << tag << " solver)'" << endl; -} - -bool IsAllNeumannBoundary(const Array& ess_bdr_attr) -{ - for (int attr : ess_bdr_attr) { if (attr == 0) { return false; } } - return true; -} - int main(int argc, char *argv[]) { #ifdef HYPRE_USING_GPU @@ -421,41 +246,3 @@ int main(int argc, char *argv[]) return 0; } - -void u_exact(const Vector & x, Vector & u) -{ - double xi(x(0)); - double yi(x(1)); - double zi(x.Size() == 3 ? x(2) : 0.0); - - u(0) = - exp(xi)*sin(yi)*cos(zi); - u(1) = - exp(xi)*cos(yi)*cos(zi); - if (x.Size() == 3) - { - u(2) = exp(xi)*sin(yi)*sin(zi); - } -} - -double p_exact(const Vector & x) -{ - double xi(x(0)); - double yi(x(1)); - double zi(x.Size() == 3 ? x(2) : 0.0); - return exp(xi)*sin(yi)*cos(zi); -} - -void f_exact(const Vector & x, Vector & f) -{ - f = 0.0; -} - -double g_exact(const Vector & x) -{ - if (x.Size() == 3) { return -p_exact(x); } - return 0; -} - -double natural_bc(const Vector & x) -{ - return (-p_exact(x)); -} diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp new file mode 100644 index 0000000000..4b71f6c8a3 --- /dev/null +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -0,0 +1,501 @@ +// Copyright (c) 2023-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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 "bramble_pasciak.hpp" + +using namespace std; +using namespace mfem; +using namespace blocksolvers; + +/// Bramble-Pasciak Solver +BramblePasciakSolver::BramblePasciakSolver( + const std::shared_ptr &mVarf, + const std::shared_ptr &bVarf, + const BPCGParameters ¶m) + : DarcySolver(mVarf->ParFESpace()->GetTrueVSize(), + bVarf->TestFESpace()->GetTrueVSize()) +{ + MFEM_ASSERT((param.q_scaling>=0.0) && (param.q_scaling<=1.0), + "Invalid Q-scaling factor: param.q_scaling " << param.q_scaling ); + M_.reset(mVarf->ParallelAssemble()); + B_.reset(bVarf->ParallelAssemble()); + Q_.reset(ConstructMassPreconditioner(*mVarf, param.q_scaling)); + + Init(*M_, *B_, *Q_, param); +} + +BramblePasciakSolver::BramblePasciakSolver( + HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, + Solver &M0, Solver &M1, + const BPCGParameters ¶m) + : DarcySolver(M.NumRows(), B.NumRows()) +{ + Init(M, B, Q, M0, M1, param); +} + +void BramblePasciakSolver::Init( + HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, + const BPCGParameters ¶m) +{ + auto Bt = new TransposeOperator(&B); + // invQ + // TODO + // This is not general enough. We are assuming Q is diag + // Not using invQ ... + HypreParMatrix *invQ = new HypreParMatrix(Q); + Vector diagQ; + Q.GetDiag(diagQ); + *invQ = 1.0; + invQ->InvScaleRows(diagQ); + + Vector diagM; + M.GetDiag(diagM); + auto BT = B.Transpose(); + auto invDBt = new HypreParMatrix(*BT); + invDBt->InvScaleRows(diagM); + auto S = ParMult(&B, invDBt); + auto M0 = new HypreDiagScale(Q); + auto M1 = new HypreBoomerAMG(*S); + // auto solver_M1 = new HypreBoomerAMG(*block11); + M1->SetPrintLevel(0); + + use_bpcg = param.use_bpcg; + + if (use_bpcg) + { + oop_ = new BlockOperator(offsets_); + oop_->owns_blocks = false; + oop_->SetBlock(0, 0, &M); + oop_->SetBlock(0, 1, Bt); + oop_->SetBlock(1, 0, &B); + + // cpc_ unused in bpcg + auto temp_cpc = new BlockDiagonalPreconditioner(offsets_); + temp_cpc->owns_blocks = true; + temp_cpc->SetDiagonalBlock(0, M0); + temp_cpc->SetDiagonalBlock(1, M1); + // tri(1,0) = B M0 = B invQ + auto id_m = new IdentityOperator(M.NumRows()); + auto id_b = new IdentityOperator(B.NumRows()); + auto BinvM0 = new ProductOperator(&B, M0, false, false); + // tri + auto temp_tri = new BlockOperator(offsets_); + temp_tri->owns_blocks = true; + temp_tri->SetBlock(0, 0, id_m); + temp_tri->SetBlock(1, 1, id_b, -1.0); + temp_tri->SetBlock(1, 0, BinvM0); + + ppc_ = new ProductOperator(temp_cpc, temp_tri, true, true); + + ipc_ = new BlockOperator(offsets_); + ipc_->owns_blocks = false; + ipc_->SetDiagonalBlock(0, M0); + + // bpcg + solver_.Reset(new BPCGSolver(M.GetComm())); + SetOptions(*solver_.As(), param); + { + solver_.As()->SetOperator(*oop_); + solver_.As()->SetIncompletePreconditioner(*ipc_); + solver_.As()->SetParticularPreconditioner(*ppc_); + } + + // TODO + // Set remaining pointers to nullptr? + if (Mpi::Root()) { MFEM_WARNING("mop_, map_, cpc_ unset!"); } + if (param.use_hpc && Mpi::Root()) { MFEM_WARNING("H preconditioner is implicit when using BGCG. hpc_ unset!"); } + } + else + { + // oop_ unused in cg + auto temp_oop = new BlockOperator(offsets_); + temp_oop->owns_blocks = false; + temp_oop->SetBlock(0, 0, &M); + temp_oop->SetBlock(0, 1, Bt); + temp_oop->SetBlock(1, 0, &B); + + // ipc_ unused in cg + auto temp_ipc = new BlockOperator(offsets_); + temp_ipc->owns_blocks = false; + temp_ipc->SetDiagonalBlock(0, M0); + + // temp_AN = temp_oop * temp_ipc + auto temp_AN = new ProductOperator(temp_oop, temp_ipc, true, true); + + // Required for updating the RHS + auto id = new IdentityOperator(M.NumRows()+B.NumRows()); + map_ = new AddOperator(temp_AN, 1.0, id, -1.0, true, true); + + mop_ = new ProductOperator(map_, temp_oop, false, true); + + cpc_ = new BlockDiagonalPreconditioner(offsets_); + cpc_->owns_blocks = true; + cpc_->SetDiagonalBlock(0, M0); + cpc_->SetDiagonalBlock(1, M1); + + if (param.use_hpc) + { + auto Diff = new HypreParMatrix(M); + Diff->Add(-1.0,Q); + auto MM0 = new HypreDiagScale(*Diff); + auto MM1 = new HypreDiagScale(*S); + + hpc_ = new BlockDiagonalPreconditioner(offsets_); + hpc_->owns_blocks = true; + hpc_->SetDiagonalBlock(0, MM0); + hpc_->SetDiagonalBlock(1, MM1); + } + + solver_.Reset(new CGSolver(M.GetComm())); + SetOptions(*solver_.As(), param); + { + solver_.As()->SetOperator(*mop_); + solver_.As()->SetPreconditioner(*cpc_); + } + + // TODO + // Set remaining pointers to nullptr? + if (Mpi::Root()) { MFEM_WARNING("oop_, ipc_, ppc_ unset!"); } + } +} + +void BramblePasciakSolver::Init( + HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, + Solver &M0, Solver &M1, + const BPCGParameters ¶m) +{ + auto Bt = new TransposeOperator(&B); + auto invQ = new HypreDiagScale(Q); + + use_bpcg = param.use_bpcg; + + if (use_bpcg) + { + oop_ = new BlockOperator(offsets_); + oop_->owns_blocks = false; + oop_->SetBlock(0, 0, &M); + oop_->SetBlock(0, 1, Bt); + oop_->SetBlock(1, 0, &B); + + // cpc_ unused in bpcg + auto temp_cpc = new BlockDiagonalPreconditioner(offsets_); + temp_cpc->owns_blocks = true; + temp_cpc->SetDiagonalBlock(0, invQ); + temp_cpc->SetDiagonalBlock(1, &M1); + // tri(1,0) = B M0 = B invQ + auto id_m = new IdentityOperator(M.NumRows()); + auto id_b = new IdentityOperator(B.NumRows()); + auto BinvQ = new ProductOperator(&B, invQ, false, false); + // tri + auto temp_tri = new BlockOperator(offsets_); + temp_tri->owns_blocks = true; + temp_tri->SetBlock(0, 0, id_m); + temp_tri->SetBlock(1, 1, id_b, -1.0); + temp_tri->SetBlock(1, 0, BinvQ); + + ppc_ = new ProductOperator(temp_cpc, temp_tri, true, true); + + ipc_ = new BlockOperator(offsets_); + ipc_->owns_blocks = false; + ipc_->SetDiagonalBlock(0, invQ); + + // bpcg + solver_.Reset(new BPCGSolver(M.GetComm())); + SetOptions(*solver_.As(), param); + { + solver_.As()->SetOperator(*oop_); + solver_.As()->SetIncompletePreconditioner(*ipc_); + solver_.As()->SetParticularPreconditioner(*ppc_); + } + + // TODO + // Set remaining pointers to nullptr? + if (Mpi::Root()) { MFEM_WARNING("mop_, map_, cpc_ unset!"); } + } + else + { + // oop_ unused in cg + auto temp_oop = new BlockOperator(offsets_); + temp_oop->owns_blocks = false; + temp_oop->SetBlock(0, 0, &M); + temp_oop->SetBlock(0, 1, Bt); + temp_oop->SetBlock(1, 0, &B); + + // ipc_ unused in cg + auto temp_ipc = new BlockOperator(offsets_); + temp_ipc->owns_blocks = false; + temp_ipc->SetDiagonalBlock(0, invQ); + + // temp_AN = temp_oop * temp_ipc + auto temp_AN = new ProductOperator(temp_oop, temp_ipc, true, true); + + // Required for updating the RHS + auto id = new IdentityOperator(M.NumRows()+B.NumRows()); + map_ = new AddOperator(temp_AN, 1.0, id, -1.0, true, true); + + mop_ = new ProductOperator(map_, temp_oop, false, true); + + cpc_ = new BlockDiagonalPreconditioner(offsets_); + cpc_->owns_blocks = true; + cpc_->SetDiagonalBlock(0, &M0); + cpc_->SetDiagonalBlock(1, &M1); + + solver_.Reset(new CGSolver(M.GetComm())); + SetOptions(*solver_.As(), param); + { + solver_.As()->SetOperator(*mop_); + solver_.As()->SetPreconditioner(*cpc_); + } + + // TODO + // Set remaining pointers to nullptr? + if (Mpi::Root()) { MFEM_WARNING("oop_, ipc_, ppc_ unset!"); } + } +} + +HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( + ParBilinearForm &mVarf, double alpha) +{ + ParBilinearForm qVarf(mVarf.ParFESpace()); + for (int i = 0; i < mVarf.ParFESpace()->GetNE(); ++i) + { + DenseMatrix M_i, Q_i, evec; + Vector eval, diag_i; + double scaling = 0.0; + + mVarf.ComputeElementMatrix(i, M_i); + M_i.GetDiag(diag_i); + // M_i <- D^{-1/2} M_i D^{-1/2}, where D = diag(M_i) + M_i.InvSymmetricScaling(diag_i); + // M_i x = ev diag(M_i) x + M_i.Eigenvalues(eval, evec); + + scaling = alpha*eval.Min(); + diag_i.Set(scaling, diag_i); + Q_i.Diag(diag_i.GetData(), diag_i.Size()); + qVarf.AssembleElementMatrix(i, Q_i, 1); + } + qVarf.Finalize(); + return qVarf.ParallelAssemble(); +} + +void BramblePasciakSolver::Mult(const Vector & x, Vector & y) const +{ + if (!use_bpcg) + { + Vector transformed_rhs(x.Size()); + map_->Mult(x, transformed_rhs); + solver_.As()->Mult(transformed_rhs, y); + } + else + { + solver_.As()->Mult(x, y); + } + for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } +} + +int BramblePasciakSolver::GetNumIterations() const +{ + if (!use_bpcg) { return solver_.As()->GetNumIterations(); } + else { return solver_.As()->GetNumIterations(); } +} + +/// Bramble-Pasciak CG +void BPCGSolver::UpdateVectors() +{ + MemoryType mt = GetMemoryType(oper->GetMemoryClass()); + + r.SetSize(width, mt); r.UseDevice(true); + p.SetSize(width, mt); p.UseDevice(true); + g.SetSize(width, mt); g.UseDevice(true); + t.SetSize(width, mt); t.UseDevice(true); + // r_hat.SetSize(width, mt); r_hat.UseDevice(true); + r_bar.SetSize(width, mt); r_bar.UseDevice(true); + r_red.SetSize(width, mt); r_red.UseDevice(true); + g_red.SetSize(width, mt); g_red.UseDevice(true); +} + +void BPCGSolver::Mult(const Vector &b, Vector &x) const +{ + int i; + double delta, delta0, del0; + double alpha, beta, gamma; + + // Initialization + x.UseDevice(true); + if (iterative_mode) + { + oper->Mult(x, r); + subtract(b, r, r); // r = b - A x + // tra_->Mult(r,r_hat); // r_hat = X r + // map_->Mult(r,r_tem); // r_tem = S r + pprec->Mult(r,r_bar); // r_bar = P r + p = r_bar; + oper->Mult(p, g); // g = A p + oper->Mult(r_bar, t); // t = A r_bar + iprec->Mult(r, r_red); // r_red = N r + } + else + { + // TODO + MFEM_ABORT("To implement non-iterative mode: iterative_mode: " << + iterative_mode); + } + + // Initial norms + delta = delta0 = Dot(t, r_red) - Dot(r_bar, r); // Dot(r_bar, r_hat) + if (delta0 >= 0.0) { initial_norm = sqrt(delta0); } + MFEM_ASSERT(IsFinite(delta), "nom = " << delta); + if (print_options.iterations || print_options.first_and_last) + { + mfem::out << " Iteration : " << setw(3) << 0 << " (B r, r) = " + << delta << (print_options.first_and_last ? " ...\n" : "\n"); + } + Monitor(0, delta, r, x); + + if (delta < 0.0) + { + if (print_options.warnings) + { + mfem::out << "BPCG: The preconditioner is not positive definite. (Br, r) = " + << delta << '\n'; + } + converged = false; + final_iter = 0; + initial_norm = delta; + final_norm = delta; + return; + } + del0 = std::max(delta*rel_tol*rel_tol, abs_tol*abs_tol); + if (delta <= del0) + { + converged = true; + final_iter = 0; + final_norm = sqrt(delta); + return; + } + + // MFEM checks some system properties before running the loop + // Step 0.1: Compute (p,XAp), p = r_bar + iprec->Mult(g, g_red); + gamma = Dot(g, g_red) - Dot(g,p); + MFEM_ASSERT(IsFinite(gamma), "den = " << gamma); + if (gamma <= 0.0) + { + if (Dot(r_bar, r_bar) > 0.0 && print_options.warnings) + { + mfem::out << "BPCG: The operator is not positive definite. (Ar, r) = " + << gamma << '\n'; + } + if (gamma == 0.0) + { + converged = false; + final_iter = 0; + final_norm = sqrt(delta); + return; + } + } + + // Start iteration + converged = false; + final_iter = max_iter; + for (i = 1; true; ) + { + // Step 2: Get new step in the search direction p + alpha = delta0/gamma; + // Step 3: Update solution (and residual) in the search direction + add(x, alpha, p, x); // x = x + alpha p + add(r, -alpha, g, r); // r = r - alpha g + // map_->Mult(r, r_tem); // r_tem = S r + pprec->Mult(r, r_bar); // r_bar = P r + // Step 4: Compute (HXr,Xr) = (r_bar, r_hat) + iprec->Mult(r, r_red); // r_red = N r + oper->Mult(r_bar, t); // t = A r_bar + delta = Dot(t, r_red) - Dot(r_bar,r); + // Check + MFEM_ASSERT(IsFinite(delta), "betanom = " << delta); + if (delta < 0.0) + { + if (print_options.warnings) + { + mfem::out << "BPCG: The preconditioner is not positive definite. (Br, r) = " + << delta << '\n'; + } + converged = false; + final_iter = i; + break; + } + if (print_options.iterations) + { + mfem::out << " Iteration : " << setw(3) << i << " (B r, r) = " + << delta << std::endl; + } + Monitor(i, delta, r, x); + if (delta <= del0) + { + converged = true; + final_iter = i; + break; + } + if (++i > max_iter) + { + break; + } + // End checks + // Step 5: Update search direction + beta = delta/delta0; + add(r_bar, beta, p, p); + // Step 6: Update remaining directions + // oper->Mult(r_bar, t); // t = A r_bar + add(t, beta, g, g); + delta0 = delta; + // Step 1: Compute (p,XAp) + iprec->Mult(g, g_red); + gamma = Dot(g, g_red) - Dot(g,p); + MFEM_ASSERT(IsFinite(gamma), "den = " << gamma); + if (gamma <= 0.0) + { + if (Dot(r_bar, r_bar) > 0.0 && print_options.warnings) + { + mfem::out << "BPCG: The operator is not positive definite. (Ar, r) = " + << gamma << '\n'; + } + if (gamma == 0.0) + { + final_iter = i; + break; + } + } + } + + if (print_options.first_and_last && !print_options.iterations) + { + mfem::out << " Iteration : " << setw(3) << final_iter << " (B r, r) = " + << delta << '\n'; + } + if (print_options.summary || (print_options.warnings && !converged)) + { + mfem::out << "BPCG: Number of iterations: " << final_iter << '\n'; + } + if (print_options.summary || print_options.iterations || + print_options.first_and_last) + { + const auto arf = pow (gamma/delta0, 0.5/final_iter); + mfem::out << "Average reduction factor = " << arf << '\n'; + } + if (print_options.warnings && !converged) + { + mfem::out << "BPCG: No convergence!" << '\n'; + } + + final_norm = sqrt(delta); + Monitor(final_iter, final_norm, r, x, true); +} diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp new file mode 100644 index 0000000000..e7cee483dc --- /dev/null +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -0,0 +1,157 @@ +// Copyright (c) 2023-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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. + +#ifndef MFEM_BP_SOLVER_HPP +#define MFEM_BP_SOLVER_HPP + +#include "darcy_solver.hpp" + +namespace mfem +{ +namespace blocksolvers +{ + +/// Parameters for the BPCG method +struct BPCGParameters : IterSolveParameters +{ + /* These are parameters for the scaling of the Q preconditioner + * the usage of BPCG method, and the definition of the H preconditioner */ + bool use_bpcg = true; + double q_scaling = 0.5; + bool use_hpc = false; +}; + +/// Bramble-Pasciak Conjugate Gradient +class BPCGSolver : public IterativeSolver +{ +protected: + mutable Vector r, p, g, t, r_bar, r_red, g_red; + /// Remaining required operators + /* Operator list + * From IterativeSolver: + * *oper -> A = [M, Bt; B, 0] + * *prec -> P = diag(M0, M1) + * From this class: + * *iprec -> N = diag(M0, 0) + * *pprec -> P' = P * [Id, 0; B*M0, -Id] + */ + const Operator *iprec, *pprec; + void UpdateVectors(); + +public: + BPCGSolver() { } + +#ifdef MFEM_USE_MPI + BPCGSolver(MPI_Comm comm_) : IterativeSolver(comm_) { } +#endif + + virtual void SetOperator(const Operator &op) + { IterativeSolver::SetOperator(op); UpdateVectors(); } + + virtual void SetPreconditioner(const Operator &pc) + { if (Mpi::Root()) { MFEM_WARNING("No explicit preconditioner required for BPCG"); } } + + virtual void SetPreconditioner() + { if (Mpi::Root()) { MFEM_WARNING("No explicit preconditioner required for BPCG"); } } + + virtual void SetIncompletePreconditioner(const Operator &ipc) + { iprec = &ipc; } + + virtual void SetParticularPreconditioner(const Operator &ppc) + { pprec = &ppc; } + + virtual void Mult(const Vector &b, Vector &x) const; +}; + +/// Bramble-Pasciak Solver for Darcy equation. +/** Bramble-Pasciak Solver for Darcy equation. + * The basic idea is to precondition the mass matrix M with a s.p.d. matrix Q + * such that M - Q remains s.p.d. Then we can transform the block operator into a + * s.p.d. operator under a modified inner product. + * In particular, this enable us to implement modified versions of CG iterations, + * that rely on efficient applications of the required transformations. + * + * We offer a mass preconditioner based on a rescalling of the diagonal of the + * element mass matrices M_T. + * We consider Q_T := alpha * lambda_min * D_T, where D_T := diag(M_T), and + * lambda_min is the smallest eigenvalue of the following problem + * M_T x = lambda * D_T x. + * alpha is a parameter that is stricly between 0 and 1. + * + * For more details, see: + * 1. Vassilevski, Multilevel Block Factorization Preconditioners (Appendix F.3), + * Springer, 2008. + * 2. James H. Bramble and Joseph E. Pasciak. + * A Preconditioning Technique for Indefinite Systems Resulting From Mixed + * Approximations of Elliptic Problems. Mathematics of Computation, 50:1–17, 1988. + */ +class BramblePasciakSolver : public DarcySolver +{ + mutable bool use_bpcg; + OperatorPtr solver_; + // CGSolver solver_; + // BPCGSolver bpsolver_; + BlockOperator *oop_, *ipc_; + ProductOperator *mop_; + AddOperator *map_; + ProductOperator *ppc_; + BlockDiagonalPreconditioner *cpc_, *hpc_; + std::unique_ptr M_; + std::unique_ptr B_; + std::unique_ptr Q_; + Array ess_zero_dofs_; + + /// User provides system. + void Init(HypreParMatrix &M, HypreParMatrix &B, + HypreParMatrix &Q, + Solver &M0, Solver &M1, + const BPCGParameters ¶m); + + /// Construct specific preconditioners. + void Init(HypreParMatrix &M, HypreParMatrix &B, + HypreParMatrix &Q, + const BPCGParameters ¶m); +public: + /// System and mass preconditioner are constructed from bilinear forms + BramblePasciakSolver( + const std::shared_ptr &mVarf, + const std::shared_ptr &bVarf, + const BPCGParameters ¶m); + + /// System and mass preconditioner are user-provided + BramblePasciakSolver( + HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, + Solver &M0, Solver &M1, + const BPCGParameters ¶m); + + /// Assemble a preconditioner for the mass matrix + /** Mass preconditioner corresponds to a local re-scaling + * based on the smallest eigenvalue of the generalized + * eigenvalue problem locally on each element T: + * M_T x_T = lambda_T diag(M_T) x_T + * and we set Q_T = 0.5 * min(lambda_T) * diag(M_T). + */ + static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf, + double alpha = 0.5); + + /// Define if BPCG will be employed in Mult + void SetBPCG(bool use) { use_bpcg = use; } + + virtual void Mult(const Vector &x, Vector &y) const; + virtual void SetOperator(const Operator &op) { } + void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } + virtual int GetNumIterations() const; +}; + +} // namespace blocksolvers +} // namespace mfem + +#endif // MFEM_BP_SOLVER_HPP diff --git a/miniapps/solvers/darcy_solver.cpp b/miniapps/solvers/darcy_solver.cpp new file mode 100644 index 0000000000..46e6d04e71 --- /dev/null +++ b/miniapps/solvers/darcy_solver.cpp @@ -0,0 +1,287 @@ +// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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 "darcy_solver.hpp" + +using namespace std; +// using namespace mfem; +// using namespace blocksolvers; + +namespace mfem +{ +namespace blocksolvers +{ + +/// Exact solutions +void u_exact(const Vector & x, Vector & u) +{ + double xi(x(0)); + double yi(x(1)); + double zi(x.Size() == 3 ? x(2) : 0.0); + + u(0) = - exp(xi)*sin(yi)*cos(zi); + u(1) = - exp(xi)*cos(yi)*cos(zi); + if (x.Size() == 3) + { + u(2) = exp(xi)*sin(yi)*sin(zi); + } +} + +double p_exact(const Vector & x) +{ + double xi(x(0)); + double yi(x(1)); + double zi(x.Size() == 3 ? x(2) : 0.0); + return exp(xi)*sin(yi)*cos(zi); +} + +void f_exact(const Vector & x, Vector & f) +{ + f = 0.0; +} + +double g_exact(const Vector & x) +{ + if (x.Size() == 3) { return -p_exact(x); } + return 0; +} + +double natural_bc(const Vector & x) +{ + return (-p_exact(x)); +} + +/// Check if using Neumann BC +bool IsAllNeumannBoundary(const Array& ess_bdr_attr) +{ + for (int attr : ess_bdr_attr) { if (attr == 0) { return false; } } + return true; +} + +/// Set standard options for IterativeSolvers +void SetOptions(IterativeSolver& solver, const IterSolveParameters& param) +{ + solver.SetPrintLevel(param.print_level); + solver.SetMaxIter(param.max_iter); + solver.SetAbsTol(param.abs_tol); + solver.SetRelTol(param.rel_tol); +} + +SparseMatrix ElemToDof(const ParFiniteElementSpace& fes) +{ + int* I = new int[fes.GetNE()+1]; + copy_n(fes.GetElementToDofTable().GetI(), fes.GetNE()+1, I); + Array J(new int[I[fes.GetNE()]], I[fes.GetNE()]); + copy_n(fes.GetElementToDofTable().GetJ(), J.Size(), J.begin()); + fes.AdjustVDofs(J); + double* D = new double[J.Size()]; + fill_n(D, J.Size(), 1.0); + return SparseMatrix(I, J, D, fes.GetNE(), fes.GetVSize()); +} + +DFSSpaces::DFSSpaces(int order, int num_refine, ParMesh *mesh, + const Array& ess_attr, const DFSParameters& param) + : hdiv_fec_(order, mesh->Dimension()), l2_fec_(order, mesh->Dimension()), + l2_0_fec_(0, mesh->Dimension()), ess_bdr_attr_(ess_attr), level_(0) +{ + if (mesh->GetElement(0)->GetType() == Element::TETRAHEDRON && order) + { + mfem_error("DFSDataCollector: High order spaces on tetrahedra are not supported"); + } + + data_.param = param; + + if (mesh->Dimension() == 3) + { + hcurl_fec_.reset(new ND_FECollection(order+1, mesh->Dimension())); + } + else + { + hcurl_fec_.reset(new H1_FECollection(order+1, mesh->Dimension())); + } + + all_bdr_attr_.SetSize(ess_attr.Size(), 1); + hdiv_fes_.reset(new ParFiniteElementSpace(mesh, &hdiv_fec_)); + l2_fes_.reset(new ParFiniteElementSpace(mesh, &l2_fec_)); + coarse_hdiv_fes_.reset(new ParFiniteElementSpace(*hdiv_fes_)); + coarse_l2_fes_.reset(new ParFiniteElementSpace(*l2_fes_)); + l2_0_fes_.reset(new ParFiniteElementSpace(mesh, &l2_0_fec_)); + l2_0_fes_->SetUpdateOperatorType(Operator::MFEM_SPARSEMAT); + el_l2dof_.reserve(num_refine+1); + el_l2dof_.push_back(ElemToDof(*coarse_l2_fes_)); + + data_.agg_hdivdof.resize(num_refine); + data_.agg_l2dof.resize(num_refine); + data_.P_hdiv.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); + data_.P_l2.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); + data_.Q_l2.resize(num_refine); + hdiv_fes_->GetEssentialTrueDofs(ess_attr, data_.coarsest_ess_hdivdofs); + data_.C.resize(num_refine+1); + + hcurl_fes_.reset(new ParFiniteElementSpace(mesh, hcurl_fec_.get())); + coarse_hcurl_fes_.reset(new ParFiniteElementSpace(*hcurl_fes_)); + data_.P_hcurl.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); +} + +// Darcy problem function +DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, + const char *coef_file, Array &ess_bdr, + DFSParameters dfs_param) + : mesh_(MPI_COMM_WORLD, mesh), ucoeff_(mesh.Dimension(), u_exact), + pcoeff_(p_exact), dfs_spaces_(order, num_refs, &mesh_, ess_bdr, dfs_param), + mass_coeff() +{ + for (int l = 0; l < num_refs; l++) + { + mesh_.UniformRefinement(); + dfs_spaces_.CollectDFSData(); + } + + Vector coef_vector(mesh.GetNE()); + coef_vector = 1.0; + if (std::strcmp(coef_file, "")) + { + ifstream coef_str(coef_file); + coef_vector.Load(coef_str, mesh.GetNE()); + } + + mass_coeff.UpdateConstants(coef_vector); + VectorFunctionCoefficient fcoeff(mesh_.Dimension(), f_exact); + FunctionCoefficient natcoeff(natural_bc); + FunctionCoefficient gcoeff(g_exact); + + u_.SetSpace(dfs_spaces_.GetHdivFES()); + p_.SetSpace(dfs_spaces_.GetL2FES()); + p_ = 0.0; + u_ = 0.0; + u_.ProjectBdrCoefficientNormal(ucoeff_, ess_bdr); + + ParLinearForm fform(dfs_spaces_.GetHdivFES()); + fform.AddDomainIntegrator(new VectorFEDomainLFIntegrator(fcoeff)); + fform.AddBoundaryIntegrator(new VectorFEBoundaryFluxLFIntegrator(natcoeff)); + fform.Assemble(); + + ParLinearForm gform(dfs_spaces_.GetL2FES()); + gform.AddDomainIntegrator(new DomainLFIntegrator(gcoeff)); + gform.Assemble(); + + // ParBilinearForm mVarf_(dfs_spaces_.GetHdivFES()); + // ParMixedBilinearForm bVarf_(dfs_spaces_.GetHdivFES(), dfs_spaces_.GetL2FES()); + + mVarf_ = make_shared(dfs_spaces_.GetHdivFES()); + bVarf_ = make_shared(dfs_spaces_.GetHdivFES(), + dfs_spaces_.GetL2FES()); + + mVarf_->AddDomainIntegrator(new VectorFEMassIntegrator(mass_coeff)); + mVarf_->ComputeElementMatrices(); + mVarf_->Assemble(); + mVarf_->EliminateEssentialBC(ess_bdr, u_, fform); + mVarf_->Finalize(); + M_.Reset(mVarf_->ParallelAssemble()); + + bVarf_->AddDomainIntegrator(new VectorFEDivergenceIntegrator); + bVarf_->Assemble(); + bVarf_->SpMat() *= -1.0; + bVarf_->EliminateTrialDofs(ess_bdr, u_, gform); + bVarf_->Finalize(); + B_.Reset(bVarf_->ParallelAssemble()); + + rhs_.SetSize(M_->NumRows() + B_->NumRows()); + Vector rhs_block0(rhs_.GetData(), M_->NumRows()); + Vector rhs_block1(rhs_.GetData()+M_->NumRows(), B_->NumRows()); + fform.ParallelAssemble(rhs_block0); + gform.ParallelAssemble(rhs_block1); + + ess_data_.SetSize(M_->NumRows() + B_->NumRows()); + ess_data_ = 0.0; + Vector ess_data_block0(ess_data_.GetData(), M_->NumRows()); + u_.ParallelProject(ess_data_block0); + + int order_quad = max(2, 2*order+1); + for (int i=0; i < Geometry::NumGeom; ++i) + { + irs_[i] = &(IntRules.Get(i, order_quad)); + } +} + +void DarcyProblem::ShowError(const Vector& sol, bool verbose) +{ + u_.Distribute(Vector(sol.GetData(), M_->NumRows())); + p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); + + double err_u = u_.ComputeL2Error(ucoeff_, irs_); + double norm_u = ComputeGlobalLpNorm(2, ucoeff_, mesh_, irs_); + double err_p = p_.ComputeL2Error(pcoeff_, irs_); + double norm_p = ComputeGlobalLpNorm(2, pcoeff_, mesh_, irs_); + + if (!verbose) { return; } + cout << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n"; + cout << "|| p_h - p_ex || / || p_ex || = " << err_p / norm_p << "\n"; +} + +void DarcyProblem::VisualizeSolution(const Vector& sol, string tag) +{ + int num_procs, myid; + MPI_Comm_size(mesh_.GetComm(), &num_procs); + MPI_Comm_rank(mesh_.GetComm(), &myid); + + u_.Distribute(Vector(sol.GetData(), M_->NumRows())); + p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); + + const char vishost[] = "localhost"; + const int visport = 19916; + socketstream u_sock(vishost, visport); + u_sock << "parallel " << num_procs << " " << myid << "\n"; + u_sock.precision(8); + u_sock << "solution\n" << mesh_ << u_ << "window_title 'Velocity (" + << tag << " solver)'" << endl; + MPI_Barrier(mesh_.GetComm()); + socketstream p_sock(vishost, visport); + p_sock << "parallel " << num_procs << " " << myid << "\n"; + p_sock.precision(8); + p_sock << "solution\n" << mesh_ << p_ << "window_title 'Pressure (" + << tag << " solver)'" << endl; +} + +/// Wrapper Block Diagonal Preconditioned MINRES (ex5p) +BDPMinresSolver::BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, + IterSolveParameters param) + : DarcySolver(M.NumRows(), B.NumRows()), op_(offsets_), prec_(offsets_), + BT_(B.Transpose()), solver_(M.GetComm()) +{ + op_.SetBlock(0,0, &M); + op_.SetBlock(0,1, BT_.As()); + op_.SetBlock(1,0, &B); + + Vector Md; + M.GetDiag(Md); + BT_.As()->InvScaleRows(Md); + S_.Reset(ParMult(&B, BT_.As())); + BT_.As()->ScaleRows(Md); + + prec_.SetDiagonalBlock(0, new HypreDiagScale(M)); + prec_.SetDiagonalBlock(1, new HypreBoomerAMG(*S_.As())); + static_cast(prec_.GetDiagonalBlock(1)).SetPrintLevel(0); + prec_.owns_blocks = true; + + SetOptions(solver_, param); + solver_.SetOperator(op_); + solver_.SetPreconditioner(prec_); +} + +void BDPMinresSolver::Mult(const Vector & x, Vector & y) const +{ + solver_.Mult(x, y); + for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } +} + +} // namespace blocksolvers +} // namespace mfem diff --git a/miniapps/solvers/darcy_solver.hpp b/miniapps/solvers/darcy_solver.hpp new file mode 100644 index 0000000000..22768574da --- /dev/null +++ b/miniapps/solvers/darcy_solver.hpp @@ -0,0 +1,192 @@ +// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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. + +#ifndef MFEM_DARCY_SOLVER_HPP +#define MFEM_DARCY_SOLVER_HPP + +#include "mfem.hpp" +#include +#include + +namespace mfem +{ +namespace blocksolvers +{ + +// Exact solution, u and p, and r.h.s., f and g. +void u_exact(const Vector & x, Vector & u); +double p_exact(const Vector & x); +void f_exact(const Vector & x, Vector & f); +double g_exact(const Vector & x); +double natural_bc(const Vector & x); + +/// Check if using Neumann BC +bool IsAllNeumannBoundary(const Array& ess_bdr_attr); + +/// Parameters for iterative solver +struct IterSolveParameters +{ + int print_level = 0; + int max_iter = 500; + double abs_tol = 1e-12; + double rel_tol = 1e-9; +}; + +/// Set standard options for general solvers +void SetOptions(IterativeSolver& solver, const IterSolveParameters& param); + +SparseMatrix ElemToDof(const ParFiniteElementSpace& fes); + +/// DFS classes and structs +/// Parameters for the divergence free solver +struct DFSParameters : IterSolveParameters +{ + /** There are three components in the solver: a particular solution + satisfying the divergence constraint, the remaining div-free component of + the flux, and the pressure. When coupled_solve == false, the three + components will be solved one by one in the aforementioned order. + Otherwise, they will be solved at the same time. */ + bool coupled_solve = false; + bool verbose = false; + IterSolveParameters coarse_solve_param; + IterSolveParameters BBT_solve_param; +}; + +/// Data for the divergence free solver +struct DFSData +{ + std::vector agg_hdivdof; // agglomerates to H(div) dofs table + std::vector agg_l2dof; // agglomerates to L2 dofs table + std::vector P_hdiv; // Interpolation matrix for H(div) space + std::vector P_l2; // Interpolation matrix for L2 space + std::vector P_hcurl; // Interpolation for kernel space of div + std::vector Q_l2; // Q_l2[l] = (W_{l+1})^{-1} P_l2[l]^T W_l + Array coarsest_ess_hdivdofs; // coarsest level essential H(div) dofs + std::vector C; // discrete curl: ND -> RT, map to Null(B) + DFSParameters param; +}; + +/// Finite element spaces concerning divergence free solver. +/// The main usage of this class is to collect data needed for the solver. +class DFSSpaces +{ + RT_FECollection hdiv_fec_; + L2_FECollection l2_fec_; + std::unique_ptr hcurl_fec_; + L2_FECollection l2_0_fec_; + + std::unique_ptr coarse_hdiv_fes_; + std::unique_ptr coarse_l2_fes_; + std::unique_ptr coarse_hcurl_fes_; + std::unique_ptr l2_0_fes_; + + std::unique_ptr hdiv_fes_; + std::unique_ptr l2_fes_; + std::unique_ptr hcurl_fes_; + + std::vector el_l2dof_; + const Array& ess_bdr_attr_; + Array all_bdr_attr_; + + int level_; + DFSData data_; + + void MakeDofRelationTables(int level); + void DataFinalize(); +public: + DFSSpaces(int order, int num_refine, ParMesh *mesh, + const Array& ess_attr, const DFSParameters& param); + + /** This should be called each time when the mesh (where the FE spaces are + defined) is refined. The spaces will be updated, and the prolongation for + the spaces and other data needed for the div-free solver are stored. */ + void CollectDFSData(); + + const DFSData& GetDFSData() const { return data_; } + ParFiniteElementSpace* GetHdivFES() const { return hdiv_fes_.get(); } + ParFiniteElementSpace* GetL2FES() const { return l2_fes_.get(); } +}; + +/** Wrapper for assembling the discrete Darcy problem (ex5p) + [ M B^T ] [u] = [f] + [ B 0 ] [p] = [g] + where: + M = \int_\Omega (k u_h) \cdot v_h dx, + B = -\int_\Omega (div_h u_h) q_h dx, + f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, + g = \int_\Omega g_exact q_h dx, + u_h, v_h \in R_h (Raviart-Thomas finite element space), + q_h \in W_h (piecewise discontinuous polynomials), + D: subset of the boundary where natural boundary condition is imposed. */ +class DarcyProblem +{ + OperatorPtr M_; + OperatorPtr B_; + Vector rhs_; + Vector ess_data_; + ParGridFunction u_; + ParGridFunction p_; + ParMesh mesh_; + std::shared_ptr mVarf_; + std::shared_ptr bVarf_; + VectorFunctionCoefficient ucoeff_; + FunctionCoefficient pcoeff_; + DFSSpaces dfs_spaces_; + PWConstCoefficient mass_coeff; + const IntegrationRule *irs_[Geometry::NumGeom]; +public: + DarcyProblem(Mesh &mesh, int num_refines, int order, const char *coef_file, + Array &ess_bdr, DFSParameters param); + + HypreParMatrix& GetM() { return *M_.As(); } + HypreParMatrix& GetB() { return *B_.As(); } + const Vector& GetRHS() { return rhs_; } + const Vector& GetEssentialBC() { return ess_data_; } + const DFSData& GetDFSData() const { return dfs_spaces_.GetDFSData(); } + void ShowError(const Vector &sol, bool verbose); + void VisualizeSolution(const Vector &sol, std::string tag); + std::shared_ptr GetMform() const { return mVarf_; } + std::shared_ptr GetBform() const { return bVarf_; } +}; + +/// Abstract solver class for Darcy's flow +class DarcySolver : public Solver +{ +protected: + Array offsets_; +public: + DarcySolver(int size0, int size1) : Solver(size0 + size1), offsets_(3) + { offsets_[0] = 0; offsets_[1] = size0; offsets_[2] = height; } + virtual int GetNumIterations() const = 0; +}; + +/// Wrapper for the block-diagonal-preconditioned MINRES defined in ex5p.cpp +class BDPMinresSolver : public DarcySolver +{ + BlockOperator op_; + BlockDiagonalPreconditioner prec_; + OperatorPtr BT_; + OperatorPtr S_; // S_ = B diag(M)^{-1} B^T + MINRESSolver solver_; + Array ess_zero_dofs_; +public: + BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, + IterSolveParameters param); + virtual void Mult(const Vector & x, Vector & y) const; + virtual void SetOperator(const Operator &op) { } + void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } + virtual int GetNumIterations() const { return solver_.GetNumIterations(); } +}; + +} // namespace blocksolvers +} // namespace mfem + +#endif // MFEM_DARCY_SOLVER_HPP diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index f642ce90e6..cda797127e 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -15,14 +15,6 @@ using namespace std; using namespace mfem; using namespace blocksolvers; -void SetOptions(IterativeSolver& solver, const IterSolveParameters& param) -{ - solver.SetPrintLevel(param.print_level); - solver.SetMaxIter(param.max_iter); - solver.SetAbsTol(param.abs_tol); - solver.SetRelTol(param.rel_tol); -} - HypreParMatrix* TwoStepsRAP(const HypreParMatrix& Rt, const HypreParMatrix& A, const HypreParMatrix& P) { @@ -36,61 +28,6 @@ void GetRowColumnsRef(const SparseMatrix& A, int row, Array& cols) cols.MakeRef(const_cast(A.GetRowColumns(row)), A.RowSize(row)); } -SparseMatrix ElemToDof(const ParFiniteElementSpace& fes) -{ - int* I = new int[fes.GetNE()+1]; - copy_n(fes.GetElementToDofTable().GetI(), fes.GetNE()+1, I); - Array J(new int[I[fes.GetNE()]], I[fes.GetNE()]); - copy_n(fes.GetElementToDofTable().GetJ(), J.Size(), J.begin()); - fes.AdjustVDofs(J); - double* D = new double[J.Size()]; - fill_n(D, J.Size(), 1.0); - return SparseMatrix(I, J, D, fes.GetNE(), fes.GetVSize()); -} - -DFSSpaces::DFSSpaces(int order, int num_refine, ParMesh *mesh, - const Array& ess_attr, const DFSParameters& param) - : hdiv_fec_(order, mesh->Dimension()), l2_fec_(order, mesh->Dimension()), - l2_0_fec_(0, mesh->Dimension()), ess_bdr_attr_(ess_attr), level_(0) -{ - if (mesh->GetElement(0)->GetType() == Element::TETRAHEDRON && order) - { - mfem_error("DFSDataCollector: High order spaces on tetrahedra are not supported"); - } - - data_.param = param; - - if (mesh->Dimension() == 3) - { - hcurl_fec_.reset(new ND_FECollection(order+1, mesh->Dimension())); - } - else - { - hcurl_fec_.reset(new H1_FECollection(order+1, mesh->Dimension())); - } - - all_bdr_attr_.SetSize(ess_attr.Size(), 1); - hdiv_fes_.reset(new ParFiniteElementSpace(mesh, &hdiv_fec_)); - l2_fes_.reset(new ParFiniteElementSpace(mesh, &l2_fec_)); - coarse_hdiv_fes_.reset(new ParFiniteElementSpace(*hdiv_fes_)); - coarse_l2_fes_.reset(new ParFiniteElementSpace(*l2_fes_)); - l2_0_fes_.reset(new ParFiniteElementSpace(mesh, &l2_0_fec_)); - l2_0_fes_->SetUpdateOperatorType(Operator::MFEM_SPARSEMAT); - el_l2dof_.reserve(num_refine+1); - el_l2dof_.push_back(ElemToDof(*coarse_l2_fes_)); - - data_.agg_hdivdof.resize(num_refine); - data_.agg_l2dof.resize(num_refine); - data_.P_hdiv.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); - data_.P_l2.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); - data_.Q_l2.resize(num_refine); - hdiv_fes_->GetEssentialTrueDofs(ess_attr, data_.coarsest_ess_hdivdofs); - data_.C.resize(num_refine+1); - - hcurl_fes_.reset(new ParFiniteElementSpace(mesh, hcurl_fec_.get())); - coarse_hcurl_fes_.reset(new ParFiniteElementSpace(*hcurl_fes_)); - data_.P_hcurl.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); -} SparseMatrix* AggToInteriorDof(const Array& bdr_truedofs, const SparseMatrix& agg_elem, @@ -314,37 +251,6 @@ void SaddleSchwarzSmoother::Mult(const Vector & x, Vector & y) const blk_y.GetBlock(1) -= coarse_l2_projection; } -BDPMinresSolver::BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, - IterSolveParameters param) - : DarcySolver(M.NumRows(), B.NumRows()), op_(offsets_), prec_(offsets_), - BT_(B.Transpose()), solver_(M.GetComm()) -{ - op_.SetBlock(0,0, &M); - op_.SetBlock(0,1, BT_.As()); - op_.SetBlock(1,0, &B); - - Vector Md; - M.GetDiag(Md); - BT_.As()->InvScaleRows(Md); - S_.Reset(ParMult(&B, BT_.As())); - BT_.As()->ScaleRows(Md); - - prec_.SetDiagonalBlock(0, new HypreDiagScale(M)); - prec_.SetDiagonalBlock(1, new HypreBoomerAMG(*S_.As())); - static_cast(prec_.GetDiagonalBlock(1)).SetPrintLevel(0); - prec_.owns_blocks = true; - - SetOptions(solver_, param); - solver_.SetOperator(op_); - solver_.SetPreconditioner(prec_); -} - -void BDPMinresSolver::Mult(const Vector & x, Vector & y) const -{ - solver_.Mult(x, y); - for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } -} - DivFreeSolver::DivFreeSolver(const HypreParMatrix &M, const HypreParMatrix& B, const DFSData& data) : DarcySolver(M.NumRows(), B.NumRows()), data_(data), param_(data.param), @@ -606,488 +512,3 @@ int DivFreeSolver::GetNumIterations() const } return solver_.As()->GetNumIterations(); } - -/// Bramble-Pasciak Solver -BramblePasciakSolver::BramblePasciakSolver( - const std::shared_ptr &mVarf, - const std::shared_ptr &bVarf, - const BPCGParameters ¶m) - : DarcySolver(mVarf->ParFESpace()->GetTrueVSize(), - bVarf->TestFESpace()->GetTrueVSize()) -{ - MFEM_ASSERT((param.q_scaling>=0.0) && (param.q_scaling<=1.0), - "Invalid Q-scaling factor: param.q_scaling " << param.q_scaling ); - M_.reset(mVarf->ParallelAssemble()); - B_.reset(bVarf->ParallelAssemble()); - Q_.reset(ConstructMassPreconditioner(*mVarf, param.q_scaling)); - - Init(*M_, *B_, *Q_, param); -} - -BramblePasciakSolver::BramblePasciakSolver( - HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, - Solver &M0, Solver &M1, - const BPCGParameters ¶m) - : DarcySolver(M.NumRows(), B.NumRows()) -{ - Init(M, B, Q, M0, M1, param); -} - -void BramblePasciakSolver::Init( - HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, - const BPCGParameters ¶m) -{ - auto Bt = new TransposeOperator(&B); - // invQ - // TODO - // This is not general enough. We are assuming Q is diag - // Not using invQ ... - HypreParMatrix *invQ = new HypreParMatrix(Q); - Vector diagQ; - Q.GetDiag(diagQ); - *invQ = 1.0; - invQ->InvScaleRows(diagQ); - - Vector diagM; - M.GetDiag(diagM); - auto BT = B.Transpose(); - auto invDBt = new HypreParMatrix(*BT); - invDBt->InvScaleRows(diagM); - auto S = ParMult(&B, invDBt); - auto M0 = new HypreDiagScale(Q); - auto M1 = new HypreBoomerAMG(*S); - // auto solver_M1 = new HypreBoomerAMG(*block11); - M1->SetPrintLevel(0); - - use_bpcg = param.use_bpcg; - - if (use_bpcg) - { - oop_ = new BlockOperator(offsets_); - oop_->owns_blocks = false; - oop_->SetBlock(0, 0, &M); - oop_->SetBlock(0, 1, Bt); - oop_->SetBlock(1, 0, &B); - - // cpc_ unused in bpcg - auto temp_cpc = new BlockDiagonalPreconditioner(offsets_); - temp_cpc->owns_blocks = true; - temp_cpc->SetDiagonalBlock(0, M0); - temp_cpc->SetDiagonalBlock(1, M1); - // tri(1,0) = B M0 = B invQ - auto id_m = new IdentityOperator(M.NumRows()); - auto id_b = new IdentityOperator(B.NumRows()); - auto BinvM0 = new ProductOperator(&B, M0, false, false); - // tri - auto temp_tri = new BlockOperator(offsets_); - temp_tri->owns_blocks = true; - temp_tri->SetBlock(0, 0, id_m); - temp_tri->SetBlock(1, 1, id_b, -1.0); - temp_tri->SetBlock(1, 0, BinvM0); - - ppc_ = new ProductOperator(temp_cpc, temp_tri, true, true); - - ipc_ = new BlockOperator(offsets_); - ipc_->owns_blocks = false; - ipc_->SetDiagonalBlock(0, M0); - - // bpcg - solver_.Reset(new BPCGSolver(M.GetComm())); - SetOptions(*solver_.As(), param); - { - solver_.As()->SetOperator(*oop_); - solver_.As()->SetIncompletePreconditioner(*ipc_); - solver_.As()->SetParticularPreconditioner(*ppc_); - } - - // TODO - // Set remaining pointers to nullptr? - if (Mpi::Root()) { MFEM_WARNING("mop_, map_, cpc_ unset!"); } - if (param.use_hpc && Mpi::Root()) { MFEM_WARNING("H preconditioner is implicit when using BGCG. hpc_ unset!"); } - } - else - { - // oop_ unused in cg - auto temp_oop = new BlockOperator(offsets_); - temp_oop->owns_blocks = false; - temp_oop->SetBlock(0, 0, &M); - temp_oop->SetBlock(0, 1, Bt); - temp_oop->SetBlock(1, 0, &B); - - // ipc_ unused in cg - auto temp_ipc = new BlockOperator(offsets_); - temp_ipc->owns_blocks = false; - temp_ipc->SetDiagonalBlock(0, M0); - - // temp_AN = temp_oop * temp_ipc - auto temp_AN = new ProductOperator(temp_oop, temp_ipc, true, true); - - // Required for updating the RHS - auto id = new IdentityOperator(M.NumRows()+B.NumRows()); - map_ = new AddOperator(temp_AN, 1.0, id, -1.0, true, true); - - mop_ = new ProductOperator(map_, temp_oop, false, true); - - cpc_ = new BlockDiagonalPreconditioner(offsets_); - cpc_->owns_blocks = true; - cpc_->SetDiagonalBlock(0, M0); - cpc_->SetDiagonalBlock(1, M1); - - if (param.use_hpc) - { - auto Diff = new HypreParMatrix(M); - Diff->Add(-1.0,Q); - auto MM0 = new HypreDiagScale(*Diff); - auto MM1 = new HypreDiagScale(*S); - - hpc_ = new BlockDiagonalPreconditioner(offsets_); - hpc_->owns_blocks = true; - hpc_->SetDiagonalBlock(0, MM0); - hpc_->SetDiagonalBlock(1, MM1); - } - - solver_.Reset(new CGSolver(M.GetComm())); - SetOptions(*solver_.As(), param); - { - solver_.As()->SetOperator(*mop_); - solver_.As()->SetPreconditioner(*cpc_); - } - - // TODO - // Set remaining pointers to nullptr? - if (Mpi::Root()) { MFEM_WARNING("oop_, ipc_, ppc_ unset!"); } - } -} - -void BramblePasciakSolver::Init( - HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, - Solver &M0, Solver &M1, - const BPCGParameters ¶m) -{ - auto Bt = new TransposeOperator(&B); - auto invQ = new HypreDiagScale(Q); - - use_bpcg = param.use_bpcg; - - if (use_bpcg) - { - oop_ = new BlockOperator(offsets_); - oop_->owns_blocks = false; - oop_->SetBlock(0, 0, &M); - oop_->SetBlock(0, 1, Bt); - oop_->SetBlock(1, 0, &B); - - // cpc_ unused in bpcg - auto temp_cpc = new BlockDiagonalPreconditioner(offsets_); - temp_cpc->owns_blocks = true; - temp_cpc->SetDiagonalBlock(0, invQ); - temp_cpc->SetDiagonalBlock(1, &M1); - // tri(1,0) = B M0 = B invQ - auto id_m = new IdentityOperator(M.NumRows()); - auto id_b = new IdentityOperator(B.NumRows()); - auto BinvQ = new ProductOperator(&B, invQ, false, false); - // tri - auto temp_tri = new BlockOperator(offsets_); - temp_tri->owns_blocks = true; - temp_tri->SetBlock(0, 0, id_m); - temp_tri->SetBlock(1, 1, id_b, -1.0); - temp_tri->SetBlock(1, 0, BinvQ); - - ppc_ = new ProductOperator(temp_cpc, temp_tri, true, true); - - ipc_ = new BlockOperator(offsets_); - ipc_->owns_blocks = false; - ipc_->SetDiagonalBlock(0, invQ); - - // bpcg - solver_.Reset(new BPCGSolver(M.GetComm())); - SetOptions(*solver_.As(), param); - { - solver_.As()->SetOperator(*oop_); - solver_.As()->SetIncompletePreconditioner(*ipc_); - solver_.As()->SetParticularPreconditioner(*ppc_); - } - - // TODO - // Set remaining pointers to nullptr? - if (Mpi::Root()) { MFEM_WARNING("mop_, map_, cpc_ unset!"); } - } - else - { - // oop_ unused in cg - auto temp_oop = new BlockOperator(offsets_); - temp_oop->owns_blocks = false; - temp_oop->SetBlock(0, 0, &M); - temp_oop->SetBlock(0, 1, Bt); - temp_oop->SetBlock(1, 0, &B); - - // ipc_ unused in cg - auto temp_ipc = new BlockOperator(offsets_); - temp_ipc->owns_blocks = false; - temp_ipc->SetDiagonalBlock(0, invQ); - - // temp_AN = temp_oop * temp_ipc - auto temp_AN = new ProductOperator(temp_oop, temp_ipc, true, true); - - // Required for updating the RHS - auto id = new IdentityOperator(M.NumRows()+B.NumRows()); - map_ = new AddOperator(temp_AN, 1.0, id, -1.0, true, true); - - mop_ = new ProductOperator(map_, temp_oop, false, true); - - cpc_ = new BlockDiagonalPreconditioner(offsets_); - cpc_->owns_blocks = true; - cpc_->SetDiagonalBlock(0, &M0); - cpc_->SetDiagonalBlock(1, &M1); - - solver_.Reset(new CGSolver(M.GetComm())); - SetOptions(*solver_.As(), param); - { - solver_.As()->SetOperator(*mop_); - solver_.As()->SetPreconditioner(*cpc_); - } - - // TODO - // Set remaining pointers to nullptr? - if (Mpi::Root()) { MFEM_WARNING("oop_, ipc_, ppc_ unset!"); } - } -} - -HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( - ParBilinearForm &mVarf, double alpha) -{ - ParBilinearForm qVarf(mVarf.ParFESpace()); - for (int i = 0; i < mVarf.ParFESpace()->GetNE(); ++i) - { - DenseMatrix M_i, Q_i, evec; - Vector eval, diag_i; - double scaling = 0.0; - - mVarf.ComputeElementMatrix(i, M_i); - M_i.GetDiag(diag_i); - // M_i <- D^{-1/2} M_i D^{-1/2}, where D = diag(M_i) - M_i.InvSymmetricScaling(diag_i); - // M_i x = ev diag(M_i) x - M_i.Eigenvalues(eval, evec); - - scaling = alpha*eval.Min(); - diag_i.Set(scaling, diag_i); - Q_i.Diag(diag_i.GetData(), diag_i.Size()); - qVarf.AssembleElementMatrix(i, Q_i, 1); - } - qVarf.Finalize(); - return qVarf.ParallelAssemble(); -} - -void BramblePasciakSolver::Mult(const Vector & x, Vector & y) const -{ - if (!use_bpcg) - { - Vector transformed_rhs(x.Size()); - map_->Mult(x, transformed_rhs); - solver_.As()->Mult(transformed_rhs, y); - } - else - { - solver_.As()->Mult(x, y); - } - for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } -} - -int BramblePasciakSolver::GetNumIterations() const -{ - if (!use_bpcg) { return solver_.As()->GetNumIterations(); } - else { return solver_.As()->GetNumIterations(); } -} - -/// Bramble-Pasciak CG -void BPCGSolver::UpdateVectors() -{ - MemoryType mt = GetMemoryType(oper->GetMemoryClass()); - - r.SetSize(width, mt); r.UseDevice(true); - p.SetSize(width, mt); p.UseDevice(true); - g.SetSize(width, mt); g.UseDevice(true); - t.SetSize(width, mt); t.UseDevice(true); - // r_hat.SetSize(width, mt); r_hat.UseDevice(true); - r_bar.SetSize(width, mt); r_bar.UseDevice(true); - r_red.SetSize(width, mt); r_red.UseDevice(true); - g_red.SetSize(width, mt); g_red.UseDevice(true); -} - -void BPCGSolver::Mult(const Vector &b, Vector &x) const -{ - int i; - double delta, delta0, del0; - double alpha, beta, gamma; - - // Initialization - x.UseDevice(true); - if (iterative_mode) - { - oper->Mult(x, r); - subtract(b, r, r); // r = b - A x - // tra_->Mult(r,r_hat); // r_hat = X r - // map_->Mult(r,r_tem); // r_tem = S r - pprec->Mult(r,r_bar); // r_bar = P r - p = r_bar; - oper->Mult(p, g); // g = A p - oper->Mult(r_bar, t); // t = A r_bar - iprec->Mult(r, r_red); // r_red = N r - } - else - { - // TODO - MFEM_ABORT("To implement non-iterative mode: iterative_mode: " << - iterative_mode); - } - - // Initial norms - delta = delta0 = Dot(t, r_red) - Dot(r_bar, r); // Dot(r_bar, r_hat) - if (delta0 >= 0.0) { initial_norm = sqrt(delta0); } - MFEM_ASSERT(IsFinite(delta), "nom = " << delta); - if (print_options.iterations || print_options.first_and_last) - { - mfem::out << " Iteration : " << setw(3) << 0 << " (B r, r) = " - << delta << (print_options.first_and_last ? " ...\n" : "\n"); - } - Monitor(0, delta, r, x); - - if (delta < 0.0) - { - if (print_options.warnings) - { - mfem::out << "BPCG: The preconditioner is not positive definite. (Br, r) = " - << delta << '\n'; - } - converged = false; - final_iter = 0; - initial_norm = delta; - final_norm = delta; - return; - } - del0 = std::max(delta*rel_tol*rel_tol, abs_tol*abs_tol); - if (delta <= del0) - { - converged = true; - final_iter = 0; - final_norm = sqrt(delta); - return; - } - - // MFEM checks some system properties before running the loop - // Step 0.1: Compute (p,XAp), p = r_bar - iprec->Mult(g, g_red); - gamma = Dot(g, g_red) - Dot(g,p); - MFEM_ASSERT(IsFinite(gamma), "den = " << gamma); - if (gamma <= 0.0) - { - if (Dot(r_bar, r_bar) > 0.0 && print_options.warnings) - { - mfem::out << "BPCG: The operator is not positive definite. (Ar, r) = " - << gamma << '\n'; - } - if (gamma == 0.0) - { - converged = false; - final_iter = 0; - final_norm = sqrt(delta); - return; - } - } - - // Start iteration - converged = false; - final_iter = max_iter; - for (i = 1; true; ) - { - // Step 2: Get new step in the search direction p - alpha = delta0/gamma; - // Step 3: Update solution (and residual) in the search direction - add(x, alpha, p, x); // x = x + alpha p - add(r, -alpha, g, r); // r = r - alpha g - // map_->Mult(r, r_tem); // r_tem = S r - pprec->Mult(r, r_bar); // r_bar = P r - // Step 4: Compute (HXr,Xr) = (r_bar, r_hat) - iprec->Mult(r, r_red); // r_red = N r - oper->Mult(r_bar, t); // t = A r_bar - delta = Dot(t, r_red) - Dot(r_bar,r); - // Check - MFEM_ASSERT(IsFinite(delta), "betanom = " << delta); - if (delta < 0.0) - { - if (print_options.warnings) - { - mfem::out << "BPCG: The preconditioner is not positive definite. (Br, r) = " - << delta << '\n'; - } - converged = false; - final_iter = i; - break; - } - if (print_options.iterations) - { - mfem::out << " Iteration : " << setw(3) << i << " (B r, r) = " - << delta << std::endl; - } - Monitor(i, delta, r, x); - if (delta <= del0) - { - converged = true; - final_iter = i; - break; - } - if (++i > max_iter) - { - break; - } - // End checks - // Step 5: Update search direction - beta = delta/delta0; - add(r_bar, beta, p, p); - // Step 6: Update remaining directions - // oper->Mult(r_bar, t); // t = A r_bar - add(t, beta, g, g); - delta0 = delta; - // Step 1: Compute (p,XAp) - iprec->Mult(g, g_red); - gamma = Dot(g, g_red) - Dot(g,p); - MFEM_ASSERT(IsFinite(gamma), "den = " << gamma); - if (gamma <= 0.0) - { - if (Dot(r_bar, r_bar) > 0.0 && print_options.warnings) - { - mfem::out << "BPCG: The operator is not positive definite. (Ar, r) = " - << gamma << '\n'; - } - if (gamma == 0.0) - { - final_iter = i; - break; - } - } - } - - if (print_options.first_and_last && !print_options.iterations) - { - mfem::out << " Iteration : " << setw(3) << final_iter << " (B r, r) = " - << delta << '\n'; - } - if (print_options.summary || (print_options.warnings && !converged)) - { - mfem::out << "BPCG: Number of iterations: " << final_iter << '\n'; - } - if (print_options.summary || print_options.iterations || - print_options.first_and_last) - { - const auto arf = pow (gamma/delta0, 0.5/final_iter); - mfem::out << "Average reduction factor = " << arf << '\n'; - } - if (print_options.warnings && !converged) - { - mfem::out << "BPCG: No convergence!" << '\n'; - } - - final_norm = sqrt(delta); - Monitor(final_iter, final_norm, r, x, true); -} diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index c1d283de2b..0b3eeb19eb 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -12,156 +12,13 @@ #ifndef MFEM_DIVFREE_SOLVER_HPP #define MFEM_DIVFREE_SOLVER_HPP -#include "mfem.hpp" -#include -#include +#include "darcy_solver.hpp" namespace mfem { -/// Bramble-Pasciak Conjugate Gradient -class BPCGSolver : public IterativeSolver -{ -protected: - mutable Vector r, p, g, t, r_bar, r_red, g_red; - /// Remaining required operators - /* Operator list - * From IterativeSolver: - * *oper -> A = [M, Bt; B, 0] - * *prec -> P = diag(M0, M1) - * From this class: - * *iprec -> N = diag(M0, 0) - * *pprec -> P' = P * [Id, 0; B*M0, -Id] - */ - const Operator *iprec, *pprec; - void UpdateVectors(); - -public: - BPCGSolver() { } - -#ifdef MFEM_USE_MPI - BPCGSolver(MPI_Comm comm_) : IterativeSolver(comm_) { } -#endif - - virtual void SetOperator(const Operator &op) - { IterativeSolver::SetOperator(op); UpdateVectors(); } - - virtual void SetPreconditioner(const Operator &pc) - { if (Mpi::Root()) { MFEM_WARNING("No explicit preconditioner required for BPCG"); } } - - virtual void SetPreconditioner() - { if (Mpi::Root()) { MFEM_WARNING("No explicit preconditioner required for BPCG"); } } - - virtual void SetIncompletePreconditioner(const Operator &ipc) - { iprec = &ipc; } - - virtual void SetParticularPreconditioner(const Operator &ppc) - { pprec = &ppc; } - - virtual void Mult(const Vector &b, Vector &x) const; -}; - namespace blocksolvers { -/// Parameters for iterative solver -struct IterSolveParameters -{ - int print_level = 0; - int max_iter = 500; - double abs_tol = 1e-12; - double rel_tol = 1e-9; -}; - -/// Parameters for the divergence free solver -struct DFSParameters : IterSolveParameters -{ - /** There are three components in the solver: a particular solution - satisfying the divergence constraint, the remaining div-free component of - the flux, and the pressure. When coupled_solve == false, the three - components will be solved one by one in the aforementioned order. - Otherwise, they will be solved at the same time. */ - bool coupled_solve = false; - bool verbose = false; - IterSolveParameters coarse_solve_param; - IterSolveParameters BBT_solve_param; -}; - -/// Parameters for the BPCG method -struct BPCGParameters : IterSolveParameters -{ - /* These are parameters for the scaling of the Q preconditioner - * the usage of BPCG method, and the definition of the H preconditioner */ - bool use_bpcg = true; - double q_scaling = 0.5; - bool use_hpc = false; -}; - -/// Data for the divergence free solver -struct DFSData -{ - std::vector agg_hdivdof; // agglomerates to H(div) dofs table - std::vector agg_l2dof; // agglomerates to L2 dofs table - std::vector P_hdiv; // Interpolation matrix for H(div) space - std::vector P_l2; // Interpolation matrix for L2 space - std::vector P_hcurl; // Interpolation for kernel space of div - std::vector Q_l2; // Q_l2[l] = (W_{l+1})^{-1} P_l2[l]^T W_l - Array coarsest_ess_hdivdofs; // coarsest level essential H(div) dofs - std::vector C; // discrete curl: ND -> RT, map to Null(B) - DFSParameters param; -}; - -/// Finite element spaces concerning divergence free solver. -/// The main usage of this class is to collect data needed for the solver. -class DFSSpaces -{ - RT_FECollection hdiv_fec_; - L2_FECollection l2_fec_; - std::unique_ptr hcurl_fec_; - L2_FECollection l2_0_fec_; - - std::unique_ptr coarse_hdiv_fes_; - std::unique_ptr coarse_l2_fes_; - std::unique_ptr coarse_hcurl_fes_; - std::unique_ptr l2_0_fes_; - - std::unique_ptr hdiv_fes_; - std::unique_ptr l2_fes_; - std::unique_ptr hcurl_fes_; - - std::vector el_l2dof_; - const Array& ess_bdr_attr_; - Array all_bdr_attr_; - - int level_; - DFSData data_; - - void MakeDofRelationTables(int level); - void DataFinalize(); -public: - DFSSpaces(int order, int num_refine, ParMesh *mesh, - const Array& ess_attr, const DFSParameters& param); - - /** This should be called each time when the mesh (where the FE spaces are - defined) is refined. The spaces will be updated, and the prolongation for - the spaces and other data needed for the div-free solver are stored. */ - void CollectDFSData(); - - const DFSData& GetDFSData() const { return data_; } - ParFiniteElementSpace* GetHdivFES() const { return hdiv_fes_.get(); } - ParFiniteElementSpace* GetL2FES() const { return l2_fes_.get(); } -}; - -/// Abstract solver class for Darcy's flow -class DarcySolver : public Solver -{ -protected: - Array offsets_; -public: - DarcySolver(int size0, int size1) : Solver(size0 + size1), offsets_(3) - { offsets_[0] = 0; offsets_[1] = size0; offsets_[2] = height; } - virtual int GetNumIterations() const = 0; -}; - /// Solver for B * B^T /// Compute the product B * B^T and solve it with CG preconditioned by BoomerAMG class BBTSolver : public Solver @@ -232,24 +89,6 @@ public: virtual void SetOperator(const Operator &op) { } }; -/// Wrapper for the block-diagonal-preconditioned MINRES defined in ex5p.cpp -class BDPMinresSolver : public DarcySolver -{ - BlockOperator op_; - BlockDiagonalPreconditioner prec_; - OperatorPtr BT_; - OperatorPtr S_; // S_ = B diag(M)^{-1} B^T - MINRESSolver solver_; - Array ess_zero_dofs_; -public: - BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, - IterSolveParameters param); - virtual void Mult(const Vector & x, Vector & y) const; - virtual void SetOperator(const Operator &op) { } - void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } - virtual int GetNumIterations() const { return solver_.GetNumIterations(); } -}; - /// Divergence free solver. /** Divergence free solver. The basic idea of the solver is to exploit a multilevel decomposition of @@ -288,87 +127,6 @@ public: virtual int GetNumIterations() const; }; -/// Bramble-Pasciak Solver for Darcy equation. -/** Bramble-Pasciak Solver for Darcy equation. - * The basic idea is to precondition the mass matrix M with a s.p.d. matrix Q - * such that M - Q remains s.p.d. Then we can transform the block operator into a - * s.p.d. operator under a modified inner product. - * In particular, this enable us to implement modified versions of CG iterations, - * that rely on efficient applications of the required transformations. - * - * We offer a mass preconditioner based on a rescalling of the diagonal of the - * element mass matrices M_T. - * We consider Q_T := alpha * lambda_min * D_T, where D_T := diag(M_T), and - * lambda_min is the smallest eigenvalue of the following problem - * M_T x = lambda * D_T x. - * alpha is a parameter that is stricly between 0 and 1. - * - * For more details, see: - * 1. Vassilevski, Multilevel Block Factorization Preconditioners (Appendix F.3), - * Springer, 2008. - * 2. James H. Bramble and Joseph E. Pasciak. - * A Preconditioning Technique for Indefinite Systems Resulting From Mixed - * Approximations of Elliptic Problems. Mathematics of Computation, 50:1–17, 1988. - */ -class BramblePasciakSolver : public DarcySolver -{ - // TODO TO be removed and included in param - mutable bool use_bpcg; - OperatorPtr solver_; - // CGSolver solver_; - // BPCGSolver bpsolver_; - BlockOperator *oop_, *ipc_; - ProductOperator *mop_; - AddOperator *map_; - ProductOperator *ppc_; - BlockDiagonalPreconditioner *cpc_, *hpc_; - std::unique_ptr M_; - std::unique_ptr B_; - std::unique_ptr Q_; - Array ess_zero_dofs_; - - /// User provides system. - void Init(HypreParMatrix &M, HypreParMatrix &B, - HypreParMatrix &Q, - Solver &M0, Solver &M1, - const BPCGParameters ¶m); - - /// Construct specific preconditioners. - void Init(HypreParMatrix &M, HypreParMatrix &B, - HypreParMatrix &Q, - const BPCGParameters ¶m); -public: - /// System and mass preconditioner are constructed from bilinear forms - BramblePasciakSolver( - const std::shared_ptr &mVarf, - const std::shared_ptr &bVarf, - const BPCGParameters ¶m); - - /// System and mass preconditioner are user-provided - BramblePasciakSolver( - HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, - Solver &M0, Solver &M1, - const BPCGParameters ¶m); - - /// Assemble a preconditioner for the mass matrix - /** Mass preconditioner corresponds to a local re-scaling - * based on the smallest eigenvalue of the generalized - * eigenvalue problem locally on each element T: - * M_T x_T = lambda_T diag(M_T) x_T - * and we set Q_T = 0.5 * min(lambda_T) * diag(M_T). - */ - static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf, - double alpha = 0.5); - - // TODO - /// Define if BPCG will be employed in Mult - void SetBPCG(bool use) { use_bpcg = use; } - - virtual void Mult(const Vector &x, Vector &y) const; - virtual void SetOperator(const Operator &op) { } - void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } - virtual int GetNumIterations() const; -}; } // namespace blocksolvers } // namespace mfem diff --git a/miniapps/solvers/elasticity_solver.cpp b/miniapps/solvers/elasticity_solver.cpp new file mode 100644 index 0000000000..916eb13745 --- /dev/null +++ b/miniapps/solvers/elasticity_solver.cpp @@ -0,0 +1,444 @@ +// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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. + +/// Finite element spaces concerning Elasticity solvers. +/// The main usage of this class is to collect data needed for the solver. + +#include "mfem.hpp" +#include +#include +#include +#include + +using namespace std; +using namespace mfem; + +/// Exact solution, u and p, and r.h.s., f and g. +void u_exact(const Vector & x, Vector & u); +double p_exact(const Vector & x); +void f_exact(const Vector & x, Vector & f); +double g_exact(const Vector & x); +double natural_bc(const Vector & x); + +/// Check Neumann BC +bool IsAllNeumannBoundary(const Array& ess_bdr_attr); + +/// Parameters for any general solver +struct IterSolveParameters +{ + int print_level = 0; + int max_iter = 500; + double abs_tol = 1e-12; + double rel_tol = 1e-9; +}; + +/// Parameters for the Elasticity problem +struct ElastParameters : IterSolveParameters +{ + bool use_nodal_space = true; + bool reorder_space = true; +}; + +// FESpaces for the elasticity problem +class ElasticitySpaces +{ + std::unique_ptr fec_; + L2_FECollection l2_fec_; + std::unique_ptr fes_; + std::unique_ptr l2_fes_; + + const Array& ess_bdr_attr_; + Array all_bdr_attr_; + + // TODO Maybe + std::unique_ptr coarse_fes_; + std::unique_ptr coarse_l2_fes_; + + // TODO + // std::vector el_l2dof_; + + // int level_; + // ElasticityData data_; + + // void MakeDofRelationTables(int level); + // void DataFinalize(); +public: + ElasticitySpaces(int order, int num_refine, ParMesh *mesh, + const Array& ess_attr, + const ElastParameters& param); + + /** This should be called each time when the mesh (where the FE spaces are + defined) is refined. The spaces will be updated, and the prolongation for + the spaces and other data needed for the div-free solver are stored. */ + // void CollectDFSData(); + + // const DFSData& GetDFSData() const { return data_; } + ParFiniteElementSpace* GetVh() const { return fes_.get(); } + ParFiniteElementSpace* GetWh() const { return l2_fes_.get(); } +}; + +ElasticitySpaces::ElasticitySpaces( + int order, int num_refine, ParMesh *mesh, + const Array& ess_attr, + const ElastParameters& param) + : l2_fec_(order, mesh->Dimension()), ess_bdr_attr_(ess_attr) +{ + if (mesh->GetElement(0)->GetType() == Element::TETRAHEDRON && order) + { + mfem_error("DFSDataCollector: High order spaces on tetrahedra are not supported"); + } + + int dim = mesh->Dimension(); + if (param.use_nodal_space) + { + fec_.reset(NULL); + fes_.reset((ParFiniteElementSpace *)mesh->GetNodes()->FESpace()); + } + else + { + fec_.reset(new H1_FECollection(order, dim)); + if (param.reorder_space) + { + fes_.reset(new ParFiniteElementSpace(mesh, fec_.get(), dim, Ordering::byNODES)); + } + else + { + fes_.reset(new ParFiniteElementSpace(mesh, fec_.get(), dim, Ordering::byVDIM)); + } + } + + all_bdr_attr_.SetSize(ess_attr.Size(), 1); + l2_fes_.reset(new ParFiniteElementSpace(mesh, &l2_fec_)); + + coarse_fes_.reset(new ParFiniteElementSpace(*fes_)); + coarse_l2_fes_.reset(new ParFiniteElementSpace(*l2_fes_)); +} + +/** Wrapper for assembling the discrete Elasticity problem (ex2p) + [ M B^T ] [u] = [f] + [ B 0 ] [p] = [g] + where: + M = \int_\Omega u_h \cdot v_h dx + \int_\Omega (k e(u_h)) \cdot e(v_h) dx, + B = \int_\Omega (div_h u_h) q_h dx, + // TODO + f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, + g = 0, \int_\Omega g_exact q_h dx, + u_h, v_h \in V_h (Vector Lagrange finite element space), + q_h \in W_h (piecewise discontinuous polynomials), + D: subset of the boundary where natural boundary condition is imposed. */ +class ElasticityProblem +{ + OperatorPtr M_; + OperatorPtr B_; + Vector rhs_; + Vector ess_data_; + ParGridFunction u_; + ParGridFunction p_; + ParMesh mesh_; + shared_ptr mVarf_; + shared_ptr bVarf_; + VectorFunctionCoefficient ucoeff_; + FunctionCoefficient pcoeff_; + ElasticitySpaces elas_spaces_; + PWConstCoefficient mass_coeff; + const IntegrationRule *irs_[Geometry::NumGeom]; +public: + ElasticityProblem(Mesh &mesh, int num_refines, int order, const char *coef_file, + Array &ess_bdr, ElastParameters param); + + HypreParMatrix& GetM() { return *M_.As(); } + HypreParMatrix& GetB() { return *B_.As(); } + const Vector& GetRHS() { return rhs_; } + const Vector& GetEssentialBC() { return ess_data_; } + // const DFSData& GetDFSData() const { return dfs_spaces_.GetDFSData(); } + void ShowError(const Vector &sol, bool verbose); + void VisualizeSolution(const Vector &sol, string tag); + shared_ptr GetMform() const { return mVarf_; } + shared_ptr GetBform() const { return bVarf_; } +}; + +ElasticityProblem::ElasticityProblem(Mesh &mesh, int num_refs, int order, + const char *coef_file, Array &ess_bdr, + ElastParameters param) + : mesh_(MPI_COMM_WORLD, mesh), ucoeff_(mesh.Dimension(), u_exact), + pcoeff_(p_exact), elas_spaces_(order, num_refs, &mesh_, ess_bdr, param), + mass_coeff() +{ + for (int l = 0; l < num_refs; l++) + { + mesh_.UniformRefinement(); + // dfs_spaces_.CollectDFSData(); + } + + Vector coef_vector(mesh.GetNE()); + coef_vector = 1.0; + if (std::strcmp(coef_file, "")) + { + ifstream coef_str(coef_file); + coef_vector.Load(coef_str, mesh.GetNE()); + } + + mass_coeff.UpdateConstants(coef_vector); + VectorFunctionCoefficient fcoeff(mesh_.Dimension(), f_exact); + FunctionCoefficient natcoeff(natural_bc); + FunctionCoefficient gcoeff(g_exact); + + u_.SetSpace(elas_spaces_.GetVh()); + p_.SetSpace(elas_spaces_.GetWh()); + p_ = 0.0; + u_ = 0.0; + u_.ProjectBdrCoefficientNormal(ucoeff_, ess_bdr); + + // RHS + ParLinearForm fform(elas_spaces_.GetVh()); + fform.AddDomainIntegrator(new VectorFEDomainLFIntegrator(fcoeff)); + // TODO + // fform.AddBoundaryIntegrator(new VectorFEBoundaryFluxLFIntegrator(natcoeff)); + fform.Assemble(); + + ParLinearForm gform(elas_spaces_.GetWh()); + gform.AddDomainIntegrator(new DomainLFIntegrator(gcoeff)); + gform.Assemble(); + + // Bilinear forms + mVarf_ = make_shared(elas_spaces_.GetVh()); + bVarf_ = make_shared(elas_spaces_.GetVh(), + elas_spaces_.GetWh()); + // TODO Check ownership + // Coefficients + Vector lambda(mesh.attributes.Max()); + lambda = 1.0; + lambda(0) = lambda(1)*50; + PWConstCoefficient lambda_func(lambda); + + Vector mu(mesh.attributes.Max()); + mu = 1.0; + mu(0) = mu(1)*50; + PWConstCoefficient mu_func(mu); + + // TODO check values + mVarf_->AddDomainIntegrator(new VectorFEMassIntegrator(mass_coeff)); + // elast_int: div + sym_grad + mVarf_->AddDomainIntegrator(new ElasticityIntegrator(lambda_func, mu_func)); + mVarf_->ComputeElementMatrices(); + mVarf_->Assemble(); + mVarf_->EliminateEssentialBC(ess_bdr, u_, fform); + mVarf_->Finalize(); + M_.Reset(mVarf_->ParallelAssemble()); + + bVarf_->AddDomainIntegrator(new VectorFEDivergenceIntegrator); + bVarf_->Assemble(); + bVarf_->EliminateTrialDofs(ess_bdr, u_, gform); + bVarf_->Finalize(); + B_.Reset(bVarf_->ParallelAssemble()); + + rhs_.SetSize(M_->NumRows() + B_->NumRows()); + Vector rhs_block0(rhs_.GetData(), M_->NumRows()); + Vector rhs_block1(rhs_.GetData()+M_->NumRows(), B_->NumRows()); + fform.ParallelAssemble(rhs_block0); + gform.ParallelAssemble(rhs_block1); + + ess_data_.SetSize(M_->NumRows() + B_->NumRows()); + ess_data_ = 0.0; + Vector ess_data_block0(ess_data_.GetData(), M_->NumRows()); + u_.ParallelProject(ess_data_block0); + + int order_quad = max(2, 2*order+1); + for (int i=0; i < Geometry::NumGeom; ++i) + { + irs_[i] = &(IntRules.Get(i, order_quad)); + } +} + +void ElasticityProblem::ShowError(const Vector& sol, bool verbose) +{ + u_.Distribute(Vector(sol.GetData(), M_->NumRows())); + p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); + + double err_u = u_.ComputeL2Error(ucoeff_, irs_); + double norm_u = ComputeGlobalLpNorm(2, ucoeff_, mesh_, irs_); + double err_p = p_.ComputeL2Error(pcoeff_, irs_); + double norm_p = ComputeGlobalLpNorm(2, pcoeff_, mesh_, irs_); + + if (!verbose) { return; } + cout << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n"; + cout << "|| p_h - p_ex || / || p_ex || = " << err_p / norm_p << "\n"; +} + +void ElasticityProblem::VisualizeSolution(const Vector& sol, string tag) +{ + int num_procs, myid; + MPI_Comm_size(mesh_.GetComm(), &num_procs); + MPI_Comm_rank(mesh_.GetComm(), &myid); + + u_.Distribute(Vector(sol.GetData(), M_->NumRows())); + p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); + + const char vishost[] = "localhost"; + const int visport = 19916; + socketstream u_sock(vishost, visport); + u_sock << "parallel " << num_procs << " " << myid << "\n"; + u_sock.precision(8); + u_sock << "solution\n" << mesh_ << u_ << "window_title 'Velocity (" + << tag << " solver)'" << endl; + MPI_Barrier(mesh_.GetComm()); + socketstream p_sock(vishost, visport); + p_sock << "parallel " << num_procs << " " << myid << "\n"; + p_sock.precision(8); + p_sock << "solution\n" << mesh_ << p_ << "window_title 'Pressure (" + << tag << " solver)'" << endl; +} + +int main(int argc, char *argv[]) +{ +#ifdef HYPRE_USING_GPU + cout << "\nAs of mfem-4.3 and hypre-2.22.0 (July 2021) this miniapp\n" + << "is NOT supported with the GPU version of hypre.\n\n"; + return 242; +#endif + + // Initialize MPI and HYPRE. + Mpi::Init(argc, argv); + Hypre::Init(); + + StopWatch chrono; + auto ResetTimer = [&chrono]() { chrono.Clear(); chrono.Start(); }; + + // Parse command-line options. + const char *mesh_file = "../../data/beam-hex.mesh"; + const char *coef_file = ""; + const char *ess_bdr_attr_file = ""; + int order = 0; + int par_ref_levels = 2; + bool show_error = false; + bool visualization = false; + + OptionsParser args(argc, argv); + args.AddOption(&mesh_file, "-m", "--mesh", + "Mesh file to use."); + args.AddOption(&order, "-o", "--order", + "Finite element order (polynomial degree)."); + args.AddOption(&par_ref_levels, "-r", "--ref", + "Number of parallel refinement steps."); + args.AddOption(&coef_file, "-c", "--coef", + "Coefficient file to use."); + args.AddOption(&ess_bdr_attr_file, "-eb", "--ess-bdr", + "Essential boundary attribute file to use."); + args.AddOption(&show_error, "-se", "--show-error", "-no-se", + "--no-show-error", + "Show or not show approximation error."); + args.AddOption(&visualization, "-vis", "--visualization", "-no-vis", + "--no-visualization", + "Enable or disable GLVis visualization."); + + ElastParameters param; + + args.Parse(); + if (!args.Good()) + { + if (Mpi::Root()) { args.PrintUsage(cout); } + return 1; + } + if (Mpi::Root()) { args.PrintOptions(cout); } + + if (Mpi::Root() && par_ref_levels == 0) + { + std::cout << "WARNING: DivFree solver is equivalent to BDPMinresSolver " + << "when par_ref_levels == 0.\n"; + } + + // Initialize the mesh, boundary attributes, and solver parameters + Mesh *mesh = new Mesh(mesh_file, 1, 1); + int dim = mesh->Dimension(); + int ser_ref_lvls = + (int)ceil(log(Mpi::WorldSize()/mesh->GetNE())/log(2.)/dim); + for (int i = 0; i < ser_ref_lvls; ++i) + { + mesh->UniformRefinement(); + } + + Array ess_bdr(mesh->bdr_attributes.Max()); + ess_bdr = 0; + if (std::strcmp(ess_bdr_attr_file, "")) + { + ifstream ess_bdr_attr_str(ess_bdr_attr_file); + ess_bdr.Load(mesh->bdr_attributes.Max(), ess_bdr_attr_str); + } + if (IsAllNeumannBoundary(ess_bdr)) + { + if (Mpi::Root()) + { + cout << "\nSolution is not unique when Neumann boundary condition is " + << "imposed on the entire boundary. \nPlease provide a different " + << "boundary condition.\n"; + } + delete mesh; + return 0; + } + + string line = "**********************************************************\n"; + + ResetTimer(); + + // Generate components of the saddle point problem + ElasticityProblem elast(*mesh, par_ref_levels, order, coef_file, ess_bdr, param); + // HypreParMatrix& M = darcy.GetM(); + // HypreParMatrix& B = darcy.GetB(); + delete mesh; + + return 0; +} + +// TODO +// Exact solutions (for the Darcy problem lol) +void u_exact(const Vector & x, Vector & u) +{ + double xi(x(0)); + double yi(x(1)); + double zi(x.Size() == 3 ? x(2) : 0.0); + + u(0) = - exp(xi)*sin(yi)*cos(zi); + u(1) = - exp(xi)*cos(yi)*cos(zi); + if (x.Size() == 3) + { + u(2) = exp(xi)*sin(yi)*sin(zi); + } +} + +double p_exact(const Vector & x) +{ + double xi(x(0)); + double yi(x(1)); + double zi(x.Size() == 3 ? x(2) : 0.0); + return exp(xi)*sin(yi)*cos(zi); +} + +void f_exact(const Vector & x, Vector & f) +{ + f = 0.0; +} + +double g_exact(const Vector & x) +{ + if (x.Size() == 3) { return -p_exact(x); } + return 0; +} + +double natural_bc(const Vector & x) +{ + return (-p_exact(x)); +} + +bool IsAllNeumannBoundary(const Array& ess_bdr_attr) +{ + for (int attr : ess_bdr_attr) { if (attr == 0) { return false; } } + return true; +} diff --git a/miniapps/solvers/makefile b/miniapps/solvers/makefile index e3cca0189b..eca7751890 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/makefile @@ -21,12 +21,14 @@ CONFIG_MK = $(MFEM_BUILD_DIR)/config/config.mk MFEM_LIB_FILE = mfem_is_not_built -include $(CONFIG_MK) -# TODO add bramble_pasciak.cpp -BLOCK_SOLVERS_SRC = div_free_solver.cpp block-solvers.cpp +DARCY_SOLVERS_SRC = darcy_solver.cpp +DARCY_SOLVERS_OBJ = $(DARCY_SOLVERS_SRC:.cpp=.o) + +BLOCK_SOLVERS_SRC = bramble_pasciak.cpp div_free_solver.cpp block-solvers.cpp BLOCK_SOLVERS_OBJ = $(BLOCK_SOLVERS_SRC:.cpp=.o) SEQ_MINIAPPS = lor_solvers -PAR_MINIAPPS = block-solvers plor_solvers +PAR_MINIAPPS = block-solvers plor_solvers elast-block-solvers ifeq ($(MFEM_USE_MPI),NO) MINIAPPS = $(SEQ_MINIAPPS) @@ -54,6 +56,15 @@ plor_solvers.o: $(SRC)lor_mms.hpp block-solvers: $(BLOCK_SOLVERS_OBJ) $(MFEM_CXX) $(MFEM_LINK_FLAGS) -o $@ $(BLOCK_SOLVERS_OBJ) $(MFEM_LIBS) +$(BLOCK_SOLVERS_OBJ): $(DARCY_SOLVERS_OBJ) + $(MFEM_CXX) $(MFEM_FLAGS) -c $(BLOCK_SOLVERS_SRC) $< -o $@ + +elast-block-solvers: elast-block-solvers.o + $(MFEM_CXX) $(MFEM_LINK_FLAGS) -o $@ $< $(MFEM_LIBS) + +elast-block-solvers.o: elast-block-solvers.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) + $(MFEM_CXX) $(MFEM_LINK_FLAGS) $(MFEM_FLAGS) -c $< -o $@ + %.o: $(SRC)%.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) $(MFEM_CXX) $(MFEM_FLAGS) -c $< -o $@ From cb95ddc4222cab520ceace70321871b33d49309b Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 21 Aug 2023 10:12:52 -0700 Subject: [PATCH 018/200] Remove draft elasticity. Add documentation. - Remove draft. Comment CMake files. - Add some explanation regarding BPCG and BP transform. - Make style. --- miniapps/solvers/CMakeLists.txt | 10 +- miniapps/solvers/bramble_pasciak.cpp | 36 +- miniapps/solvers/bramble_pasciak.hpp | 35 ++ miniapps/solvers/darcy_solver.cpp | 4 +- miniapps/solvers/darcy_solver.hpp | 1 + miniapps/solvers/elasticity_solver.cpp | 444 ------------------------- miniapps/solvers/makefile | 8 +- 7 files changed, 82 insertions(+), 456 deletions(-) delete mode 100644 miniapps/solvers/elasticity_solver.cpp diff --git a/miniapps/solvers/CMakeLists.txt b/miniapps/solvers/CMakeLists.txt index 9b996cbf5d..0de7acc812 100644 --- a/miniapps/solvers/CMakeLists.txt +++ b/miniapps/solvers/CMakeLists.txt @@ -16,11 +16,11 @@ if (MFEM_USE_MPI) EXTRA_HEADERS darcy_solver.hpp div_free_solver.hpp bramble_pasciak.hpp LIBRARIES mfem) - add_mfem_miniapp(elast-block-solvers - MAIN elasticity_solver.cpp - EXTRA_SOURCES - EXTRA_HEADERS - LIBRARIES mfem) +# add_mfem_miniapp(elast-block-solvers +# MAIN elasticity_solver.cpp +# EXTRA_SOURCES +# EXTRA_HEADERS +# LIBRARIES mfem) add_mfem_miniapp(plor_solvers MAIN plor_solvers.cpp diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 4b71f6c8a3..1a4e4b3693 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -8,7 +8,41 @@ // 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. - +// +// ---------------------------------------------------------- +// Bramble-Pasciak preconditioning for Darcy problem +// ---------------------------------------------------------- +// +// Main idea is to precondition the block system +// Ax = [ M B^T ] [u] = [f] +// [ B 0 ] [p] = [g] +// where: +// M = \int_\Omega (k u_h) \cdot v_h dx, +// B = -\int_\Omega (div_h u_h) q_h dx, +// f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, +// g = \int_\Omega g_exact q_h dx, +// u_h, v_h \in R_h (Raviart-Thomas finite element space), +// q_h \in W_h (piecewise discontinuous polynomials), +// D: subset of the boundary where natural boundary condition is imposed. +// with a block transformation of the form X = AN - Id +// X = [ A*invQ - Id 0 ] +// [ B*invQ -Id ] +// where N is defined by +// N = [ invQ 0 ] +// [ 0 0 ] +// and Q is constructed such that Q and M-Q are both s.p.d. +// +// The codes allows the user to provide such Q, or to construct it from the +// element matrices A_T. Moreover, the user can provide a block preconditioner +// P = [ M_1 0 ] +// [ 0 M_2 ] +// Using the particular preconditioner H, defined as +// H = [ A - Q 0 ] +// [ 0 M_2 ] +// (where M_1 = Q), enables a simplified version of a CG iteration (BPCG), as it avoids +// the direct application of invH and X. +// +// The code allows to use (P)CG with P or H, and BPCG. #include "bramble_pasciak.hpp" using namespace std; diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index e7cee483dc..34564a38b9 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -8,6 +8,41 @@ // 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. +// +// ---------------------------------------------------------- +// Bramble-Pasciak preconditioning for Darcy problem +// ---------------------------------------------------------- +// +// Main idea is to precondition the block system +// Ax = [ M B^T ] [u] = [f] +// [ B 0 ] [p] = [g] +// where: +// M = \int_\Omega (k u_h) \cdot v_h dx, +// B = -\int_\Omega (div_h u_h) q_h dx, +// f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, +// g = \int_\Omega g_exact q_h dx, +// u_h, v_h \in R_h (Raviart-Thomas finite element space), +// q_h \in W_h (piecewise discontinuous polynomials), +// D: subset of the boundary where natural boundary condition is imposed. +// with a block transformation of the form X = AN - Id +// X = [ A*invQ - Id 0 ] +// [ B*invQ -Id ] +// where N is defined by +// N = [ invQ 0 ] +// [ 0 0 ] +// and Q is constructed such that Q and M-Q are both s.p.d. +// +// The codes allows the user to provide such Q, or to construct it from the +// element matrices A_T. Moreover, the user can provide a block preconditioner +// P = [ M_1 0 ] +// [ 0 M_2 ] +// Using the particular preconditioner H, defined as +// H = [ A - Q 0 ] +// [ 0 M_2 ] +// (where M_1 = Q), enables a simplified version of a CG iteration (BPCG), as it avoids +// the direct application of invH and X. +// +// The code allows to use (P)CG with P or H, and BPCG. #ifndef MFEM_BP_SOLVER_HPP #define MFEM_BP_SOLVER_HPP diff --git a/miniapps/solvers/darcy_solver.cpp b/miniapps/solvers/darcy_solver.cpp index 46e6d04e71..f8a3ea400c 100644 --- a/miniapps/solvers/darcy_solver.cpp +++ b/miniapps/solvers/darcy_solver.cpp @@ -20,7 +20,7 @@ namespace mfem namespace blocksolvers { -/// Exact solutions +/// Exact solutions void u_exact(const Vector & x, Vector & u) { double xi(x(0)); @@ -131,7 +131,7 @@ DFSSpaces::DFSSpaces(int order, int num_refine, ParMesh *mesh, data_.P_hcurl.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); } -// Darcy problem function +/// Darcy problem function DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, const char *coef_file, Array &ess_bdr, DFSParameters dfs_param) diff --git a/miniapps/solvers/darcy_solver.hpp b/miniapps/solvers/darcy_solver.hpp index 22768574da..96e7fa25dd 100644 --- a/miniapps/solvers/darcy_solver.hpp +++ b/miniapps/solvers/darcy_solver.hpp @@ -115,6 +115,7 @@ public: ParFiniteElementSpace* GetL2FES() const { return l2_fes_.get(); } }; +/// Wrapper for assembling the discrete Darcy problem (ex5p) /** Wrapper for assembling the discrete Darcy problem (ex5p) [ M B^T ] [u] = [f] [ B 0 ] [p] = [g] diff --git a/miniapps/solvers/elasticity_solver.cpp b/miniapps/solvers/elasticity_solver.cpp deleted file mode 100644 index 916eb13745..0000000000 --- a/miniapps/solvers/elasticity_solver.cpp +++ /dev/null @@ -1,444 +0,0 @@ -// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced -// at the Lawrence Livermore National Laboratory. All Rights reserved. See files -// LICENSE and NOTICE for details. LLNL-CODE-806117. -// -// 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. - -/// Finite element spaces concerning Elasticity solvers. -/// The main usage of this class is to collect data needed for the solver. - -#include "mfem.hpp" -#include -#include -#include -#include - -using namespace std; -using namespace mfem; - -/// Exact solution, u and p, and r.h.s., f and g. -void u_exact(const Vector & x, Vector & u); -double p_exact(const Vector & x); -void f_exact(const Vector & x, Vector & f); -double g_exact(const Vector & x); -double natural_bc(const Vector & x); - -/// Check Neumann BC -bool IsAllNeumannBoundary(const Array& ess_bdr_attr); - -/// Parameters for any general solver -struct IterSolveParameters -{ - int print_level = 0; - int max_iter = 500; - double abs_tol = 1e-12; - double rel_tol = 1e-9; -}; - -/// Parameters for the Elasticity problem -struct ElastParameters : IterSolveParameters -{ - bool use_nodal_space = true; - bool reorder_space = true; -}; - -// FESpaces for the elasticity problem -class ElasticitySpaces -{ - std::unique_ptr fec_; - L2_FECollection l2_fec_; - std::unique_ptr fes_; - std::unique_ptr l2_fes_; - - const Array& ess_bdr_attr_; - Array all_bdr_attr_; - - // TODO Maybe - std::unique_ptr coarse_fes_; - std::unique_ptr coarse_l2_fes_; - - // TODO - // std::vector el_l2dof_; - - // int level_; - // ElasticityData data_; - - // void MakeDofRelationTables(int level); - // void DataFinalize(); -public: - ElasticitySpaces(int order, int num_refine, ParMesh *mesh, - const Array& ess_attr, - const ElastParameters& param); - - /** This should be called each time when the mesh (where the FE spaces are - defined) is refined. The spaces will be updated, and the prolongation for - the spaces and other data needed for the div-free solver are stored. */ - // void CollectDFSData(); - - // const DFSData& GetDFSData() const { return data_; } - ParFiniteElementSpace* GetVh() const { return fes_.get(); } - ParFiniteElementSpace* GetWh() const { return l2_fes_.get(); } -}; - -ElasticitySpaces::ElasticitySpaces( - int order, int num_refine, ParMesh *mesh, - const Array& ess_attr, - const ElastParameters& param) - : l2_fec_(order, mesh->Dimension()), ess_bdr_attr_(ess_attr) -{ - if (mesh->GetElement(0)->GetType() == Element::TETRAHEDRON && order) - { - mfem_error("DFSDataCollector: High order spaces on tetrahedra are not supported"); - } - - int dim = mesh->Dimension(); - if (param.use_nodal_space) - { - fec_.reset(NULL); - fes_.reset((ParFiniteElementSpace *)mesh->GetNodes()->FESpace()); - } - else - { - fec_.reset(new H1_FECollection(order, dim)); - if (param.reorder_space) - { - fes_.reset(new ParFiniteElementSpace(mesh, fec_.get(), dim, Ordering::byNODES)); - } - else - { - fes_.reset(new ParFiniteElementSpace(mesh, fec_.get(), dim, Ordering::byVDIM)); - } - } - - all_bdr_attr_.SetSize(ess_attr.Size(), 1); - l2_fes_.reset(new ParFiniteElementSpace(mesh, &l2_fec_)); - - coarse_fes_.reset(new ParFiniteElementSpace(*fes_)); - coarse_l2_fes_.reset(new ParFiniteElementSpace(*l2_fes_)); -} - -/** Wrapper for assembling the discrete Elasticity problem (ex2p) - [ M B^T ] [u] = [f] - [ B 0 ] [p] = [g] - where: - M = \int_\Omega u_h \cdot v_h dx + \int_\Omega (k e(u_h)) \cdot e(v_h) dx, - B = \int_\Omega (div_h u_h) q_h dx, - // TODO - f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, - g = 0, \int_\Omega g_exact q_h dx, - u_h, v_h \in V_h (Vector Lagrange finite element space), - q_h \in W_h (piecewise discontinuous polynomials), - D: subset of the boundary where natural boundary condition is imposed. */ -class ElasticityProblem -{ - OperatorPtr M_; - OperatorPtr B_; - Vector rhs_; - Vector ess_data_; - ParGridFunction u_; - ParGridFunction p_; - ParMesh mesh_; - shared_ptr mVarf_; - shared_ptr bVarf_; - VectorFunctionCoefficient ucoeff_; - FunctionCoefficient pcoeff_; - ElasticitySpaces elas_spaces_; - PWConstCoefficient mass_coeff; - const IntegrationRule *irs_[Geometry::NumGeom]; -public: - ElasticityProblem(Mesh &mesh, int num_refines, int order, const char *coef_file, - Array &ess_bdr, ElastParameters param); - - HypreParMatrix& GetM() { return *M_.As(); } - HypreParMatrix& GetB() { return *B_.As(); } - const Vector& GetRHS() { return rhs_; } - const Vector& GetEssentialBC() { return ess_data_; } - // const DFSData& GetDFSData() const { return dfs_spaces_.GetDFSData(); } - void ShowError(const Vector &sol, bool verbose); - void VisualizeSolution(const Vector &sol, string tag); - shared_ptr GetMform() const { return mVarf_; } - shared_ptr GetBform() const { return bVarf_; } -}; - -ElasticityProblem::ElasticityProblem(Mesh &mesh, int num_refs, int order, - const char *coef_file, Array &ess_bdr, - ElastParameters param) - : mesh_(MPI_COMM_WORLD, mesh), ucoeff_(mesh.Dimension(), u_exact), - pcoeff_(p_exact), elas_spaces_(order, num_refs, &mesh_, ess_bdr, param), - mass_coeff() -{ - for (int l = 0; l < num_refs; l++) - { - mesh_.UniformRefinement(); - // dfs_spaces_.CollectDFSData(); - } - - Vector coef_vector(mesh.GetNE()); - coef_vector = 1.0; - if (std::strcmp(coef_file, "")) - { - ifstream coef_str(coef_file); - coef_vector.Load(coef_str, mesh.GetNE()); - } - - mass_coeff.UpdateConstants(coef_vector); - VectorFunctionCoefficient fcoeff(mesh_.Dimension(), f_exact); - FunctionCoefficient natcoeff(natural_bc); - FunctionCoefficient gcoeff(g_exact); - - u_.SetSpace(elas_spaces_.GetVh()); - p_.SetSpace(elas_spaces_.GetWh()); - p_ = 0.0; - u_ = 0.0; - u_.ProjectBdrCoefficientNormal(ucoeff_, ess_bdr); - - // RHS - ParLinearForm fform(elas_spaces_.GetVh()); - fform.AddDomainIntegrator(new VectorFEDomainLFIntegrator(fcoeff)); - // TODO - // fform.AddBoundaryIntegrator(new VectorFEBoundaryFluxLFIntegrator(natcoeff)); - fform.Assemble(); - - ParLinearForm gform(elas_spaces_.GetWh()); - gform.AddDomainIntegrator(new DomainLFIntegrator(gcoeff)); - gform.Assemble(); - - // Bilinear forms - mVarf_ = make_shared(elas_spaces_.GetVh()); - bVarf_ = make_shared(elas_spaces_.GetVh(), - elas_spaces_.GetWh()); - // TODO Check ownership - // Coefficients - Vector lambda(mesh.attributes.Max()); - lambda = 1.0; - lambda(0) = lambda(1)*50; - PWConstCoefficient lambda_func(lambda); - - Vector mu(mesh.attributes.Max()); - mu = 1.0; - mu(0) = mu(1)*50; - PWConstCoefficient mu_func(mu); - - // TODO check values - mVarf_->AddDomainIntegrator(new VectorFEMassIntegrator(mass_coeff)); - // elast_int: div + sym_grad - mVarf_->AddDomainIntegrator(new ElasticityIntegrator(lambda_func, mu_func)); - mVarf_->ComputeElementMatrices(); - mVarf_->Assemble(); - mVarf_->EliminateEssentialBC(ess_bdr, u_, fform); - mVarf_->Finalize(); - M_.Reset(mVarf_->ParallelAssemble()); - - bVarf_->AddDomainIntegrator(new VectorFEDivergenceIntegrator); - bVarf_->Assemble(); - bVarf_->EliminateTrialDofs(ess_bdr, u_, gform); - bVarf_->Finalize(); - B_.Reset(bVarf_->ParallelAssemble()); - - rhs_.SetSize(M_->NumRows() + B_->NumRows()); - Vector rhs_block0(rhs_.GetData(), M_->NumRows()); - Vector rhs_block1(rhs_.GetData()+M_->NumRows(), B_->NumRows()); - fform.ParallelAssemble(rhs_block0); - gform.ParallelAssemble(rhs_block1); - - ess_data_.SetSize(M_->NumRows() + B_->NumRows()); - ess_data_ = 0.0; - Vector ess_data_block0(ess_data_.GetData(), M_->NumRows()); - u_.ParallelProject(ess_data_block0); - - int order_quad = max(2, 2*order+1); - for (int i=0; i < Geometry::NumGeom; ++i) - { - irs_[i] = &(IntRules.Get(i, order_quad)); - } -} - -void ElasticityProblem::ShowError(const Vector& sol, bool verbose) -{ - u_.Distribute(Vector(sol.GetData(), M_->NumRows())); - p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); - - double err_u = u_.ComputeL2Error(ucoeff_, irs_); - double norm_u = ComputeGlobalLpNorm(2, ucoeff_, mesh_, irs_); - double err_p = p_.ComputeL2Error(pcoeff_, irs_); - double norm_p = ComputeGlobalLpNorm(2, pcoeff_, mesh_, irs_); - - if (!verbose) { return; } - cout << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n"; - cout << "|| p_h - p_ex || / || p_ex || = " << err_p / norm_p << "\n"; -} - -void ElasticityProblem::VisualizeSolution(const Vector& sol, string tag) -{ - int num_procs, myid; - MPI_Comm_size(mesh_.GetComm(), &num_procs); - MPI_Comm_rank(mesh_.GetComm(), &myid); - - u_.Distribute(Vector(sol.GetData(), M_->NumRows())); - p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); - - const char vishost[] = "localhost"; - const int visport = 19916; - socketstream u_sock(vishost, visport); - u_sock << "parallel " << num_procs << " " << myid << "\n"; - u_sock.precision(8); - u_sock << "solution\n" << mesh_ << u_ << "window_title 'Velocity (" - << tag << " solver)'" << endl; - MPI_Barrier(mesh_.GetComm()); - socketstream p_sock(vishost, visport); - p_sock << "parallel " << num_procs << " " << myid << "\n"; - p_sock.precision(8); - p_sock << "solution\n" << mesh_ << p_ << "window_title 'Pressure (" - << tag << " solver)'" << endl; -} - -int main(int argc, char *argv[]) -{ -#ifdef HYPRE_USING_GPU - cout << "\nAs of mfem-4.3 and hypre-2.22.0 (July 2021) this miniapp\n" - << "is NOT supported with the GPU version of hypre.\n\n"; - return 242; -#endif - - // Initialize MPI and HYPRE. - Mpi::Init(argc, argv); - Hypre::Init(); - - StopWatch chrono; - auto ResetTimer = [&chrono]() { chrono.Clear(); chrono.Start(); }; - - // Parse command-line options. - const char *mesh_file = "../../data/beam-hex.mesh"; - const char *coef_file = ""; - const char *ess_bdr_attr_file = ""; - int order = 0; - int par_ref_levels = 2; - bool show_error = false; - bool visualization = false; - - OptionsParser args(argc, argv); - args.AddOption(&mesh_file, "-m", "--mesh", - "Mesh file to use."); - args.AddOption(&order, "-o", "--order", - "Finite element order (polynomial degree)."); - args.AddOption(&par_ref_levels, "-r", "--ref", - "Number of parallel refinement steps."); - args.AddOption(&coef_file, "-c", "--coef", - "Coefficient file to use."); - args.AddOption(&ess_bdr_attr_file, "-eb", "--ess-bdr", - "Essential boundary attribute file to use."); - args.AddOption(&show_error, "-se", "--show-error", "-no-se", - "--no-show-error", - "Show or not show approximation error."); - args.AddOption(&visualization, "-vis", "--visualization", "-no-vis", - "--no-visualization", - "Enable or disable GLVis visualization."); - - ElastParameters param; - - args.Parse(); - if (!args.Good()) - { - if (Mpi::Root()) { args.PrintUsage(cout); } - return 1; - } - if (Mpi::Root()) { args.PrintOptions(cout); } - - if (Mpi::Root() && par_ref_levels == 0) - { - std::cout << "WARNING: DivFree solver is equivalent to BDPMinresSolver " - << "when par_ref_levels == 0.\n"; - } - - // Initialize the mesh, boundary attributes, and solver parameters - Mesh *mesh = new Mesh(mesh_file, 1, 1); - int dim = mesh->Dimension(); - int ser_ref_lvls = - (int)ceil(log(Mpi::WorldSize()/mesh->GetNE())/log(2.)/dim); - for (int i = 0; i < ser_ref_lvls; ++i) - { - mesh->UniformRefinement(); - } - - Array ess_bdr(mesh->bdr_attributes.Max()); - ess_bdr = 0; - if (std::strcmp(ess_bdr_attr_file, "")) - { - ifstream ess_bdr_attr_str(ess_bdr_attr_file); - ess_bdr.Load(mesh->bdr_attributes.Max(), ess_bdr_attr_str); - } - if (IsAllNeumannBoundary(ess_bdr)) - { - if (Mpi::Root()) - { - cout << "\nSolution is not unique when Neumann boundary condition is " - << "imposed on the entire boundary. \nPlease provide a different " - << "boundary condition.\n"; - } - delete mesh; - return 0; - } - - string line = "**********************************************************\n"; - - ResetTimer(); - - // Generate components of the saddle point problem - ElasticityProblem elast(*mesh, par_ref_levels, order, coef_file, ess_bdr, param); - // HypreParMatrix& M = darcy.GetM(); - // HypreParMatrix& B = darcy.GetB(); - delete mesh; - - return 0; -} - -// TODO -// Exact solutions (for the Darcy problem lol) -void u_exact(const Vector & x, Vector & u) -{ - double xi(x(0)); - double yi(x(1)); - double zi(x.Size() == 3 ? x(2) : 0.0); - - u(0) = - exp(xi)*sin(yi)*cos(zi); - u(1) = - exp(xi)*cos(yi)*cos(zi); - if (x.Size() == 3) - { - u(2) = exp(xi)*sin(yi)*sin(zi); - } -} - -double p_exact(const Vector & x) -{ - double xi(x(0)); - double yi(x(1)); - double zi(x.Size() == 3 ? x(2) : 0.0); - return exp(xi)*sin(yi)*cos(zi); -} - -void f_exact(const Vector & x, Vector & f) -{ - f = 0.0; -} - -double g_exact(const Vector & x) -{ - if (x.Size() == 3) { return -p_exact(x); } - return 0; -} - -double natural_bc(const Vector & x) -{ - return (-p_exact(x)); -} - -bool IsAllNeumannBoundary(const Array& ess_bdr_attr) -{ - for (int attr : ess_bdr_attr) { if (attr == 0) { return false; } } - return true; -} diff --git a/miniapps/solvers/makefile b/miniapps/solvers/makefile index eca7751890..2b6617506d 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/makefile @@ -59,11 +59,11 @@ block-solvers: $(BLOCK_SOLVERS_OBJ) $(BLOCK_SOLVERS_OBJ): $(DARCY_SOLVERS_OBJ) $(MFEM_CXX) $(MFEM_FLAGS) -c $(BLOCK_SOLVERS_SRC) $< -o $@ -elast-block-solvers: elast-block-solvers.o - $(MFEM_CXX) $(MFEM_LINK_FLAGS) -o $@ $< $(MFEM_LIBS) +# elast-block-solvers: elast-block-solvers.o +# $(MFEM_CXX) $(MFEM_LINK_FLAGS) -o $@ $< $(MFEM_LIBS) -elast-block-solvers.o: elast-block-solvers.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) - $(MFEM_CXX) $(MFEM_LINK_FLAGS) $(MFEM_FLAGS) -c $< -o $@ +# elast-block-solvers.o: elast-block-solvers.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) +# $(MFEM_CXX) $(MFEM_LINK_FLAGS) $(MFEM_FLAGS) -c $< -o $@ %.o: $(SRC)%.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) $(MFEM_CXX) $(MFEM_FLAGS) -c $< -o $@ From 46a8bca7f534adb5a161ebe2ff048520377fbefa Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 21 Aug 2023 10:30:56 -0700 Subject: [PATCH 019/200] Add documentation --- miniapps/solvers/darcy_solver.cpp | 11 +++++++++++ miniapps/solvers/darcy_solver.hpp | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/miniapps/solvers/darcy_solver.cpp b/miniapps/solvers/darcy_solver.cpp index f8a3ea400c..15d84ff0bf 100644 --- a/miniapps/solvers/darcy_solver.cpp +++ b/miniapps/solvers/darcy_solver.cpp @@ -252,6 +252,17 @@ void DarcyProblem::VisualizeSolution(const Vector& sol, string tag) } /// Wrapper Block Diagonal Preconditioned MINRES (ex5p) +/** Wrapper for assembling the discrete Darcy problem (ex5p) + [ M B^T ] [u] = [f] + [ B 0 ] [p] = [g] + where: + M = \int_\Omega (k u_h) \cdot v_h dx, + B = -\int_\Omega (div_h u_h) q_h dx, + f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, + g = \int_\Omega g_exact q_h dx, + u_h, v_h \in R_h (Raviart-Thomas finite element space), + q_h \in W_h (piecewise discontinuous polynomials), + D: subset of the boundary where natural boundary condition is imposed. */ BDPMinresSolver::BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, IterSolveParameters param) : DarcySolver(M.NumRows(), B.NumRows()), op_(offsets_), prec_(offsets_), diff --git a/miniapps/solvers/darcy_solver.hpp b/miniapps/solvers/darcy_solver.hpp index 96e7fa25dd..7f057854b8 100644 --- a/miniapps/solvers/darcy_solver.hpp +++ b/miniapps/solvers/darcy_solver.hpp @@ -116,17 +116,6 @@ public: }; /// Wrapper for assembling the discrete Darcy problem (ex5p) -/** Wrapper for assembling the discrete Darcy problem (ex5p) - [ M B^T ] [u] = [f] - [ B 0 ] [p] = [g] - where: - M = \int_\Omega (k u_h) \cdot v_h dx, - B = -\int_\Omega (div_h u_h) q_h dx, - f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, - g = \int_\Omega g_exact q_h dx, - u_h, v_h \in R_h (Raviart-Thomas finite element space), - q_h \in W_h (piecewise discontinuous polynomials), - D: subset of the boundary where natural boundary condition is imposed. */ class DarcyProblem { OperatorPtr M_; From 98e2af65da3ee6161672f0472e73a7c644324d94 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 21 Aug 2023 10:34:54 -0700 Subject: [PATCH 020/200] Modify documentation. - Remove characters. --- miniapps/solvers/darcy_solver.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/miniapps/solvers/darcy_solver.cpp b/miniapps/solvers/darcy_solver.cpp index 15d84ff0bf..abffe5d434 100644 --- a/miniapps/solvers/darcy_solver.cpp +++ b/miniapps/solvers/darcy_solver.cpp @@ -256,12 +256,12 @@ void DarcyProblem::VisualizeSolution(const Vector& sol, string tag) [ M B^T ] [u] = [f] [ B 0 ] [p] = [g] where: - M = \int_\Omega (k u_h) \cdot v_h dx, - B = -\int_\Omega (div_h u_h) q_h dx, - f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, - g = \int_\Omega g_exact q_h dx, - u_h, v_h \in R_h (Raviart-Thomas finite element space), - q_h \in W_h (piecewise discontinuous polynomials), + M = int_Omega (k u_h) cdot v_h dx, + B = -int_Omega (div_h u_h) q_h dx, + f = int_Omega f_exact v_h dx + int_D natural_bc v_h dS, + g = int_Omega g_exact q_h dx, + u_h, v_h in R_h (Raviart-Thomas finite element space), + q_h in W_h (piecewise discontinuous polynomials), D: subset of the boundary where natural boundary condition is imposed. */ BDPMinresSolver::BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, IterSolveParameters param) From 2ca61c74b07447fd91f175a6317edb2de3110b7a Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Tue, 22 Aug 2023 17:29:46 -0700 Subject: [PATCH 021/200] Remove warnings. - Remove warnings concerning unset/unused operators. --- miniapps/solvers/bramble_pasciak.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 1a4e4b3693..3403790140 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -141,11 +141,6 @@ void BramblePasciakSolver::Init( solver_.As()->SetIncompletePreconditioner(*ipc_); solver_.As()->SetParticularPreconditioner(*ppc_); } - - // TODO - // Set remaining pointers to nullptr? - if (Mpi::Root()) { MFEM_WARNING("mop_, map_, cpc_ unset!"); } - if (param.use_hpc && Mpi::Root()) { MFEM_WARNING("H preconditioner is implicit when using BGCG. hpc_ unset!"); } } else { @@ -194,10 +189,6 @@ void BramblePasciakSolver::Init( solver_.As()->SetOperator(*mop_); solver_.As()->SetPreconditioner(*cpc_); } - - // TODO - // Set remaining pointers to nullptr? - if (Mpi::Root()) { MFEM_WARNING("oop_, ipc_, ppc_ unset!"); } } } @@ -249,10 +240,6 @@ void BramblePasciakSolver::Init( solver_.As()->SetIncompletePreconditioner(*ipc_); solver_.As()->SetParticularPreconditioner(*ppc_); } - - // TODO - // Set remaining pointers to nullptr? - if (Mpi::Root()) { MFEM_WARNING("mop_, map_, cpc_ unset!"); } } else { @@ -288,10 +275,6 @@ void BramblePasciakSolver::Init( solver_.As()->SetOperator(*mop_); solver_.As()->SetPreconditioner(*cpc_); } - - // TODO - // Set remaining pointers to nullptr? - if (Mpi::Root()) { MFEM_WARNING("oop_, ipc_, ppc_ unset!"); } } } From 5fc779e128bd7d03dbb1b6bedc0f88318a39502c Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 28 Aug 2023 14:01:19 -0700 Subject: [PATCH 022/200] Reorganize functions - Move general-purpose functions to block-solvers.cpp - Reorganize code - TODO Serial and parallel refinement flags --- miniapps/solvers/block-solvers.cpp | 212 +++++++++++++++++++++++ miniapps/solvers/bramble_pasciak.cpp | 10 +- miniapps/solvers/darcy_solver.cpp | 242 +-------------------------- miniapps/solvers/darcy_solver.hpp | 118 ------------- miniapps/solvers/div_free_solver.cpp | 55 ++++++ miniapps/solvers/div_free_solver.hpp | 70 +++++++- 6 files changed, 346 insertions(+), 361 deletions(-) diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index 4c9227bc0c..2d6bcf5808 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -63,6 +63,180 @@ using namespace std; using namespace mfem; using namespace blocksolvers; +// Exact solution, u and p, and r.h.s., f and g. +void u_exact(const Vector & x, Vector & u); +double p_exact(const Vector & x); +void f_exact(const Vector & x, Vector & f); +double g_exact(const Vector & x); +double natural_bc(const Vector & x); + +/** Wrapper for assembling the discrete Darcy problem (ex5p) + [ M B^T ] [u] = [f] + [ B 0 ] [p] = [g] + where: + M = \int_\Omega (k u_h) \cdot v_h dx, + B = -\int_\Omega (div_h u_h) q_h dx, + f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, + g = \int_\Omega g_exact q_h dx, + u_h, v_h \in R_h (Raviart-Thomas finite element space), + q_h \in W_h (piecewise discontinuous polynomials), + D: subset of the boundary where natural boundary condition is imposed. */ +class DarcyProblem +{ + OperatorPtr M_; + OperatorPtr B_; + Vector rhs_; + Vector ess_data_; + ParGridFunction u_; + ParGridFunction p_; + ParMesh mesh_; + std::shared_ptr mVarf_; + std::shared_ptr bVarf_; + VectorFunctionCoefficient ucoeff_; + FunctionCoefficient pcoeff_; + DFSSpaces dfs_spaces_; + PWConstCoefficient mass_coeff; + const IntegrationRule *irs_[Geometry::NumGeom]; +public: + DarcyProblem(Mesh &mesh, int num_refines, int order, const char *coef_file, + Array &ess_bdr, DFSParameters param); + + HypreParMatrix& GetM() { return *M_.As(); } + HypreParMatrix& GetB() { return *B_.As(); } + const Vector& GetRHS() { return rhs_; } + const Vector& GetEssentialBC() { return ess_data_; } + const DFSData& GetDFSData() const { return dfs_spaces_.GetDFSData(); } + void ShowError(const Vector &sol, bool verbose); + void VisualizeSolution(const Vector &sol, std::string tag); + std::shared_ptr GetMform() const { return mVarf_; } + std::shared_ptr GetBform() const { return bVarf_; } +}; + +DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, + const char *coef_file, Array &ess_bdr, + DFSParameters dfs_param) + : mesh_(MPI_COMM_WORLD, mesh), ucoeff_(mesh.Dimension(), u_exact), + pcoeff_(p_exact), dfs_spaces_(order, num_refs, &mesh_, ess_bdr, dfs_param), + mass_coeff() +{ + for (int l = 0; l < num_refs; l++) + { + mesh_.UniformRefinement(); + dfs_spaces_.CollectDFSData(); + } + + Vector coef_vector(mesh.GetNE()); + coef_vector = 1.0; + if (std::strcmp(coef_file, "")) + { + ifstream coef_str(coef_file); + coef_vector.Load(coef_str, mesh.GetNE()); + } + + mass_coeff.UpdateConstants(coef_vector); + VectorFunctionCoefficient fcoeff(mesh_.Dimension(), f_exact); + FunctionCoefficient natcoeff(natural_bc); + FunctionCoefficient gcoeff(g_exact); + + u_.SetSpace(dfs_spaces_.GetHdivFES()); + p_.SetSpace(dfs_spaces_.GetL2FES()); + p_ = 0.0; + u_ = 0.0; + u_.ProjectBdrCoefficientNormal(ucoeff_, ess_bdr); + + ParLinearForm fform(dfs_spaces_.GetHdivFES()); + fform.AddDomainIntegrator(new VectorFEDomainLFIntegrator(fcoeff)); + fform.AddBoundaryIntegrator(new VectorFEBoundaryFluxLFIntegrator(natcoeff)); + fform.Assemble(); + + ParLinearForm gform(dfs_spaces_.GetL2FES()); + gform.AddDomainIntegrator(new DomainLFIntegrator(gcoeff)); + gform.Assemble(); + + // ParBilinearForm mVarf_(dfs_spaces_.GetHdivFES()); + // ParMixedBilinearForm bVarf_(dfs_spaces_.GetHdivFES(), dfs_spaces_.GetL2FES()); + + mVarf_ = make_shared(dfs_spaces_.GetHdivFES()); + bVarf_ = make_shared(dfs_spaces_.GetHdivFES(), + dfs_spaces_.GetL2FES()); + + mVarf_->AddDomainIntegrator(new VectorFEMassIntegrator(mass_coeff)); + mVarf_->ComputeElementMatrices(); + mVarf_->Assemble(); + mVarf_->EliminateEssentialBC(ess_bdr, u_, fform); + mVarf_->Finalize(); + M_.Reset(mVarf_->ParallelAssemble()); + + bVarf_->AddDomainIntegrator(new VectorFEDivergenceIntegrator); + bVarf_->Assemble(); + bVarf_->SpMat() *= -1.0; + bVarf_->EliminateTrialDofs(ess_bdr, u_, gform); + bVarf_->Finalize(); + B_.Reset(bVarf_->ParallelAssemble()); + + rhs_.SetSize(M_->NumRows() + B_->NumRows()); + Vector rhs_block0(rhs_.GetData(), M_->NumRows()); + Vector rhs_block1(rhs_.GetData()+M_->NumRows(), B_->NumRows()); + fform.ParallelAssemble(rhs_block0); + gform.ParallelAssemble(rhs_block1); + + ess_data_.SetSize(M_->NumRows() + B_->NumRows()); + ess_data_ = 0.0; + Vector ess_data_block0(ess_data_.GetData(), M_->NumRows()); + u_.ParallelProject(ess_data_block0); + + int order_quad = max(2, 2*order+1); + for (int i=0; i < Geometry::NumGeom; ++i) + { + irs_[i] = &(IntRules.Get(i, order_quad)); + } +} + +void DarcyProblem::ShowError(const Vector& sol, bool verbose) +{ + u_.Distribute(Vector(sol.GetData(), M_->NumRows())); + p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); + + double err_u = u_.ComputeL2Error(ucoeff_, irs_); + double norm_u = ComputeGlobalLpNorm(2, ucoeff_, mesh_, irs_); + double err_p = p_.ComputeL2Error(pcoeff_, irs_); + double norm_p = ComputeGlobalLpNorm(2, pcoeff_, mesh_, irs_); + + if (!verbose) { return; } + cout << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n"; + cout << "|| p_h - p_ex || / || p_ex || = " << err_p / norm_p << "\n"; +} + +void DarcyProblem::VisualizeSolution(const Vector& sol, string tag) +{ + int num_procs, myid; + MPI_Comm_size(mesh_.GetComm(), &num_procs); + MPI_Comm_rank(mesh_.GetComm(), &myid); + + u_.Distribute(Vector(sol.GetData(), M_->NumRows())); + p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); + + const char vishost[] = "localhost"; + const int visport = 19916; + socketstream u_sock(vishost, visport); + u_sock << "parallel " << num_procs << " " << myid << "\n"; + u_sock.precision(8); + u_sock << "solution\n" << mesh_ << u_ << "window_title 'Velocity (" + << tag << " solver)'" << endl; + MPI_Barrier(mesh_.GetComm()); + socketstream p_sock(vishost, visport); + p_sock << "parallel " << num_procs << " " << myid << "\n"; + p_sock.precision(8); + p_sock << "solution\n" << mesh_ << p_ << "window_title 'Pressure (" + << tag << " solver)'" << endl; +} + +bool IsAllNeumannBoundary(const Array& ess_bdr_attr) +{ + for (int attr : ess_bdr_attr) { if (attr == 0) { return false; } } + return true; +} + int main(int argc, char *argv[]) { #ifdef HYPRE_USING_GPU @@ -246,3 +420,41 @@ int main(int argc, char *argv[]) return 0; } + +void u_exact(const Vector & x, Vector & u) +{ + double xi(x(0)); + double yi(x(1)); + double zi(x.Size() == 3 ? x(2) : 0.0); + + u(0) = - exp(xi)*sin(yi)*cos(zi); + u(1) = - exp(xi)*cos(yi)*cos(zi); + if (x.Size() == 3) + { + u(2) = exp(xi)*sin(yi)*sin(zi); + } +} + +double p_exact(const Vector & x) +{ + double xi(x(0)); + double yi(x(1)); + double zi(x.Size() == 3 ? x(2) : 0.0); + return exp(xi)*sin(yi)*cos(zi); +} + +void f_exact(const Vector & x, Vector & f) +{ + f = 0.0; +} + +double g_exact(const Vector & x) +{ + if (x.Size() == 3) { return -p_exact(x); } + return 0; +} + +double natural_bc(const Vector & x) +{ + return (-p_exact(x)); +} diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 3403790140..e6c3fe3200 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -84,11 +84,11 @@ void BramblePasciakSolver::Init( // TODO // This is not general enough. We are assuming Q is diag // Not using invQ ... - HypreParMatrix *invQ = new HypreParMatrix(Q); - Vector diagQ; - Q.GetDiag(diagQ); - *invQ = 1.0; - invQ->InvScaleRows(diagQ); + // HypreParMatrix *invQ = new HypreParMatrix(Q); + // Vector diagQ; + // Q.GetDiag(diagQ); + // *invQ = 1.0; + // invQ->InvScaleRows(diagQ); Vector diagM; M.GetDiag(diagM); diff --git a/miniapps/solvers/darcy_solver.cpp b/miniapps/solvers/darcy_solver.cpp index abffe5d434..c6baaf8987 100644 --- a/miniapps/solvers/darcy_solver.cpp +++ b/miniapps/solvers/darcy_solver.cpp @@ -12,61 +12,13 @@ #include "darcy_solver.hpp" using namespace std; -// using namespace mfem; -// using namespace blocksolvers; +using namespace mfem; +using namespace blocksolvers; namespace mfem { namespace blocksolvers { - -/// Exact solutions -void u_exact(const Vector & x, Vector & u) -{ - double xi(x(0)); - double yi(x(1)); - double zi(x.Size() == 3 ? x(2) : 0.0); - - u(0) = - exp(xi)*sin(yi)*cos(zi); - u(1) = - exp(xi)*cos(yi)*cos(zi); - if (x.Size() == 3) - { - u(2) = exp(xi)*sin(yi)*sin(zi); - } -} - -double p_exact(const Vector & x) -{ - double xi(x(0)); - double yi(x(1)); - double zi(x.Size() == 3 ? x(2) : 0.0); - return exp(xi)*sin(yi)*cos(zi); -} - -void f_exact(const Vector & x, Vector & f) -{ - f = 0.0; -} - -double g_exact(const Vector & x) -{ - if (x.Size() == 3) { return -p_exact(x); } - return 0; -} - -double natural_bc(const Vector & x) -{ - return (-p_exact(x)); -} - -/// Check if using Neumann BC -bool IsAllNeumannBoundary(const Array& ess_bdr_attr) -{ - for (int attr : ess_bdr_attr) { if (attr == 0) { return false; } } - return true; -} - -/// Set standard options for IterativeSolvers void SetOptions(IterativeSolver& solver, const IterSolveParameters& param) { solver.SetPrintLevel(param.print_level); @@ -74,195 +26,14 @@ void SetOptions(IterativeSolver& solver, const IterSolveParameters& param) solver.SetAbsTol(param.abs_tol); solver.SetRelTol(param.rel_tol); } - -SparseMatrix ElemToDof(const ParFiniteElementSpace& fes) -{ - int* I = new int[fes.GetNE()+1]; - copy_n(fes.GetElementToDofTable().GetI(), fes.GetNE()+1, I); - Array J(new int[I[fes.GetNE()]], I[fes.GetNE()]); - copy_n(fes.GetElementToDofTable().GetJ(), J.Size(), J.begin()); - fes.AdjustVDofs(J); - double* D = new double[J.Size()]; - fill_n(D, J.Size(), 1.0); - return SparseMatrix(I, J, D, fes.GetNE(), fes.GetVSize()); -} - -DFSSpaces::DFSSpaces(int order, int num_refine, ParMesh *mesh, - const Array& ess_attr, const DFSParameters& param) - : hdiv_fec_(order, mesh->Dimension()), l2_fec_(order, mesh->Dimension()), - l2_0_fec_(0, mesh->Dimension()), ess_bdr_attr_(ess_attr), level_(0) -{ - if (mesh->GetElement(0)->GetType() == Element::TETRAHEDRON && order) - { - mfem_error("DFSDataCollector: High order spaces on tetrahedra are not supported"); - } - - data_.param = param; - - if (mesh->Dimension() == 3) - { - hcurl_fec_.reset(new ND_FECollection(order+1, mesh->Dimension())); - } - else - { - hcurl_fec_.reset(new H1_FECollection(order+1, mesh->Dimension())); - } - - all_bdr_attr_.SetSize(ess_attr.Size(), 1); - hdiv_fes_.reset(new ParFiniteElementSpace(mesh, &hdiv_fec_)); - l2_fes_.reset(new ParFiniteElementSpace(mesh, &l2_fec_)); - coarse_hdiv_fes_.reset(new ParFiniteElementSpace(*hdiv_fes_)); - coarse_l2_fes_.reset(new ParFiniteElementSpace(*l2_fes_)); - l2_0_fes_.reset(new ParFiniteElementSpace(mesh, &l2_0_fec_)); - l2_0_fes_->SetUpdateOperatorType(Operator::MFEM_SPARSEMAT); - el_l2dof_.reserve(num_refine+1); - el_l2dof_.push_back(ElemToDof(*coarse_l2_fes_)); - - data_.agg_hdivdof.resize(num_refine); - data_.agg_l2dof.resize(num_refine); - data_.P_hdiv.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); - data_.P_l2.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); - data_.Q_l2.resize(num_refine); - hdiv_fes_->GetEssentialTrueDofs(ess_attr, data_.coarsest_ess_hdivdofs); - data_.C.resize(num_refine+1); - - hcurl_fes_.reset(new ParFiniteElementSpace(mesh, hcurl_fec_.get())); - coarse_hcurl_fes_.reset(new ParFiniteElementSpace(*hcurl_fes_)); - data_.P_hcurl.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); -} - -/// Darcy problem function -DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, - const char *coef_file, Array &ess_bdr, - DFSParameters dfs_param) - : mesh_(MPI_COMM_WORLD, mesh), ucoeff_(mesh.Dimension(), u_exact), - pcoeff_(p_exact), dfs_spaces_(order, num_refs, &mesh_, ess_bdr, dfs_param), - mass_coeff() -{ - for (int l = 0; l < num_refs; l++) - { - mesh_.UniformRefinement(); - dfs_spaces_.CollectDFSData(); - } - - Vector coef_vector(mesh.GetNE()); - coef_vector = 1.0; - if (std::strcmp(coef_file, "")) - { - ifstream coef_str(coef_file); - coef_vector.Load(coef_str, mesh.GetNE()); - } - - mass_coeff.UpdateConstants(coef_vector); - VectorFunctionCoefficient fcoeff(mesh_.Dimension(), f_exact); - FunctionCoefficient natcoeff(natural_bc); - FunctionCoefficient gcoeff(g_exact); - - u_.SetSpace(dfs_spaces_.GetHdivFES()); - p_.SetSpace(dfs_spaces_.GetL2FES()); - p_ = 0.0; - u_ = 0.0; - u_.ProjectBdrCoefficientNormal(ucoeff_, ess_bdr); - - ParLinearForm fform(dfs_spaces_.GetHdivFES()); - fform.AddDomainIntegrator(new VectorFEDomainLFIntegrator(fcoeff)); - fform.AddBoundaryIntegrator(new VectorFEBoundaryFluxLFIntegrator(natcoeff)); - fform.Assemble(); - - ParLinearForm gform(dfs_spaces_.GetL2FES()); - gform.AddDomainIntegrator(new DomainLFIntegrator(gcoeff)); - gform.Assemble(); - - // ParBilinearForm mVarf_(dfs_spaces_.GetHdivFES()); - // ParMixedBilinearForm bVarf_(dfs_spaces_.GetHdivFES(), dfs_spaces_.GetL2FES()); - - mVarf_ = make_shared(dfs_spaces_.GetHdivFES()); - bVarf_ = make_shared(dfs_spaces_.GetHdivFES(), - dfs_spaces_.GetL2FES()); - - mVarf_->AddDomainIntegrator(new VectorFEMassIntegrator(mass_coeff)); - mVarf_->ComputeElementMatrices(); - mVarf_->Assemble(); - mVarf_->EliminateEssentialBC(ess_bdr, u_, fform); - mVarf_->Finalize(); - M_.Reset(mVarf_->ParallelAssemble()); - - bVarf_->AddDomainIntegrator(new VectorFEDivergenceIntegrator); - bVarf_->Assemble(); - bVarf_->SpMat() *= -1.0; - bVarf_->EliminateTrialDofs(ess_bdr, u_, gform); - bVarf_->Finalize(); - B_.Reset(bVarf_->ParallelAssemble()); - - rhs_.SetSize(M_->NumRows() + B_->NumRows()); - Vector rhs_block0(rhs_.GetData(), M_->NumRows()); - Vector rhs_block1(rhs_.GetData()+M_->NumRows(), B_->NumRows()); - fform.ParallelAssemble(rhs_block0); - gform.ParallelAssemble(rhs_block1); - - ess_data_.SetSize(M_->NumRows() + B_->NumRows()); - ess_data_ = 0.0; - Vector ess_data_block0(ess_data_.GetData(), M_->NumRows()); - u_.ParallelProject(ess_data_block0); - - int order_quad = max(2, 2*order+1); - for (int i=0; i < Geometry::NumGeom; ++i) - { - irs_[i] = &(IntRules.Get(i, order_quad)); - } -} - -void DarcyProblem::ShowError(const Vector& sol, bool verbose) -{ - u_.Distribute(Vector(sol.GetData(), M_->NumRows())); - p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); - - double err_u = u_.ComputeL2Error(ucoeff_, irs_); - double norm_u = ComputeGlobalLpNorm(2, ucoeff_, mesh_, irs_); - double err_p = p_.ComputeL2Error(pcoeff_, irs_); - double norm_p = ComputeGlobalLpNorm(2, pcoeff_, mesh_, irs_); - - if (!verbose) { return; } - cout << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n"; - cout << "|| p_h - p_ex || / || p_ex || = " << err_p / norm_p << "\n"; -} - -void DarcyProblem::VisualizeSolution(const Vector& sol, string tag) -{ - int num_procs, myid; - MPI_Comm_size(mesh_.GetComm(), &num_procs); - MPI_Comm_rank(mesh_.GetComm(), &myid); - - u_.Distribute(Vector(sol.GetData(), M_->NumRows())); - p_.Distribute(Vector(sol.GetData()+M_->NumRows(), B_->NumRows())); - - const char vishost[] = "localhost"; - const int visport = 19916; - socketstream u_sock(vishost, visport); - u_sock << "parallel " << num_procs << " " << myid << "\n"; - u_sock.precision(8); - u_sock << "solution\n" << mesh_ << u_ << "window_title 'Velocity (" - << tag << " solver)'" << endl; - MPI_Barrier(mesh_.GetComm()); - socketstream p_sock(vishost, visport); - p_sock << "parallel " << num_procs << " " << myid << "\n"; - p_sock.precision(8); - p_sock << "solution\n" << mesh_ << p_ << "window_title 'Pressure (" - << tag << " solver)'" << endl; -} +} // namespace blocksolvers +} // namespace mfem /// Wrapper Block Diagonal Preconditioned MINRES (ex5p) /** Wrapper for assembling the discrete Darcy problem (ex5p) [ M B^T ] [u] = [f] [ B 0 ] [p] = [g] - where: - M = int_Omega (k u_h) cdot v_h dx, - B = -int_Omega (div_h u_h) q_h dx, - f = int_Omega f_exact v_h dx + int_D natural_bc v_h dS, - g = int_Omega g_exact q_h dx, - u_h, v_h in R_h (Raviart-Thomas finite element space), - q_h in W_h (piecewise discontinuous polynomials), - D: subset of the boundary where natural boundary condition is imposed. */ +**/ BDPMinresSolver::BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, IterSolveParameters param) : DarcySolver(M.NumRows(), B.NumRows()), op_(offsets_), prec_(offsets_), @@ -293,6 +64,3 @@ void BDPMinresSolver::Mult(const Vector & x, Vector & y) const solver_.Mult(x, y); for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } } - -} // namespace blocksolvers -} // namespace mfem diff --git a/miniapps/solvers/darcy_solver.hpp b/miniapps/solvers/darcy_solver.hpp index 7f057854b8..2e0357db6d 100644 --- a/miniapps/solvers/darcy_solver.hpp +++ b/miniapps/solvers/darcy_solver.hpp @@ -20,18 +20,6 @@ namespace mfem { namespace blocksolvers { - -// Exact solution, u and p, and r.h.s., f and g. -void u_exact(const Vector & x, Vector & u); -double p_exact(const Vector & x); -void f_exact(const Vector & x, Vector & f); -double g_exact(const Vector & x); -double natural_bc(const Vector & x); - -/// Check if using Neumann BC -bool IsAllNeumannBoundary(const Array& ess_bdr_attr); - -/// Parameters for iterative solver struct IterSolveParameters { int print_level = 0; @@ -40,113 +28,8 @@ struct IterSolveParameters double rel_tol = 1e-9; }; -/// Set standard options for general solvers void SetOptions(IterativeSolver& solver, const IterSolveParameters& param); -SparseMatrix ElemToDof(const ParFiniteElementSpace& fes); - -/// DFS classes and structs -/// Parameters for the divergence free solver -struct DFSParameters : IterSolveParameters -{ - /** There are three components in the solver: a particular solution - satisfying the divergence constraint, the remaining div-free component of - the flux, and the pressure. When coupled_solve == false, the three - components will be solved one by one in the aforementioned order. - Otherwise, they will be solved at the same time. */ - bool coupled_solve = false; - bool verbose = false; - IterSolveParameters coarse_solve_param; - IterSolveParameters BBT_solve_param; -}; - -/// Data for the divergence free solver -struct DFSData -{ - std::vector agg_hdivdof; // agglomerates to H(div) dofs table - std::vector agg_l2dof; // agglomerates to L2 dofs table - std::vector P_hdiv; // Interpolation matrix for H(div) space - std::vector P_l2; // Interpolation matrix for L2 space - std::vector P_hcurl; // Interpolation for kernel space of div - std::vector Q_l2; // Q_l2[l] = (W_{l+1})^{-1} P_l2[l]^T W_l - Array coarsest_ess_hdivdofs; // coarsest level essential H(div) dofs - std::vector C; // discrete curl: ND -> RT, map to Null(B) - DFSParameters param; -}; - -/// Finite element spaces concerning divergence free solver. -/// The main usage of this class is to collect data needed for the solver. -class DFSSpaces -{ - RT_FECollection hdiv_fec_; - L2_FECollection l2_fec_; - std::unique_ptr hcurl_fec_; - L2_FECollection l2_0_fec_; - - std::unique_ptr coarse_hdiv_fes_; - std::unique_ptr coarse_l2_fes_; - std::unique_ptr coarse_hcurl_fes_; - std::unique_ptr l2_0_fes_; - - std::unique_ptr hdiv_fes_; - std::unique_ptr l2_fes_; - std::unique_ptr hcurl_fes_; - - std::vector el_l2dof_; - const Array& ess_bdr_attr_; - Array all_bdr_attr_; - - int level_; - DFSData data_; - - void MakeDofRelationTables(int level); - void DataFinalize(); -public: - DFSSpaces(int order, int num_refine, ParMesh *mesh, - const Array& ess_attr, const DFSParameters& param); - - /** This should be called each time when the mesh (where the FE spaces are - defined) is refined. The spaces will be updated, and the prolongation for - the spaces and other data needed for the div-free solver are stored. */ - void CollectDFSData(); - - const DFSData& GetDFSData() const { return data_; } - ParFiniteElementSpace* GetHdivFES() const { return hdiv_fes_.get(); } - ParFiniteElementSpace* GetL2FES() const { return l2_fes_.get(); } -}; - -/// Wrapper for assembling the discrete Darcy problem (ex5p) -class DarcyProblem -{ - OperatorPtr M_; - OperatorPtr B_; - Vector rhs_; - Vector ess_data_; - ParGridFunction u_; - ParGridFunction p_; - ParMesh mesh_; - std::shared_ptr mVarf_; - std::shared_ptr bVarf_; - VectorFunctionCoefficient ucoeff_; - FunctionCoefficient pcoeff_; - DFSSpaces dfs_spaces_; - PWConstCoefficient mass_coeff; - const IntegrationRule *irs_[Geometry::NumGeom]; -public: - DarcyProblem(Mesh &mesh, int num_refines, int order, const char *coef_file, - Array &ess_bdr, DFSParameters param); - - HypreParMatrix& GetM() { return *M_.As(); } - HypreParMatrix& GetB() { return *B_.As(); } - const Vector& GetRHS() { return rhs_; } - const Vector& GetEssentialBC() { return ess_data_; } - const DFSData& GetDFSData() const { return dfs_spaces_.GetDFSData(); } - void ShowError(const Vector &sol, bool verbose); - void VisualizeSolution(const Vector &sol, std::string tag); - std::shared_ptr GetMform() const { return mVarf_; } - std::shared_ptr GetBform() const { return bVarf_; } -}; - /// Abstract solver class for Darcy's flow class DarcySolver : public Solver { @@ -175,7 +58,6 @@ public: void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } virtual int GetNumIterations() const { return solver_.GetNumIterations(); } }; - } // namespace blocksolvers } // namespace mfem diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index cda797127e..1ebba87990 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -28,6 +28,61 @@ void GetRowColumnsRef(const SparseMatrix& A, int row, Array& cols) cols.MakeRef(const_cast(A.GetRowColumns(row)), A.RowSize(row)); } +SparseMatrix ElemToDof(const ParFiniteElementSpace& fes) +{ + int* I = new int[fes.GetNE()+1]; + copy_n(fes.GetElementToDofTable().GetI(), fes.GetNE()+1, I); + Array J(new int[I[fes.GetNE()]], I[fes.GetNE()]); + copy_n(fes.GetElementToDofTable().GetJ(), J.Size(), J.begin()); + fes.AdjustVDofs(J); + double* D = new double[J.Size()]; + fill_n(D, J.Size(), 1.0); + return SparseMatrix(I, J, D, fes.GetNE(), fes.GetVSize()); +} + +DFSSpaces::DFSSpaces(int order, int num_refine, ParMesh *mesh, + const Array& ess_attr, const DFSParameters& param) + : hdiv_fec_(order, mesh->Dimension()), l2_fec_(order, mesh->Dimension()), + l2_0_fec_(0, mesh->Dimension()), ess_bdr_attr_(ess_attr), level_(0) +{ + if (mesh->GetElement(0)->GetType() == Element::TETRAHEDRON && order) + { + mfem_error("DFSDataCollector: High order spaces on tetrahedra are not supported"); + } + + data_.param = param; + + if (mesh->Dimension() == 3) + { + hcurl_fec_.reset(new ND_FECollection(order+1, mesh->Dimension())); + } + else + { + hcurl_fec_.reset(new H1_FECollection(order+1, mesh->Dimension())); + } + + all_bdr_attr_.SetSize(ess_attr.Size(), 1); + hdiv_fes_.reset(new ParFiniteElementSpace(mesh, &hdiv_fec_)); + l2_fes_.reset(new ParFiniteElementSpace(mesh, &l2_fec_)); + coarse_hdiv_fes_.reset(new ParFiniteElementSpace(*hdiv_fes_)); + coarse_l2_fes_.reset(new ParFiniteElementSpace(*l2_fes_)); + l2_0_fes_.reset(new ParFiniteElementSpace(mesh, &l2_0_fec_)); + l2_0_fes_->SetUpdateOperatorType(Operator::MFEM_SPARSEMAT); + el_l2dof_.reserve(num_refine+1); + el_l2dof_.push_back(ElemToDof(*coarse_l2_fes_)); + + data_.agg_hdivdof.resize(num_refine); + data_.agg_l2dof.resize(num_refine); + data_.P_hdiv.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); + data_.P_l2.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); + data_.Q_l2.resize(num_refine); + hdiv_fes_->GetEssentialTrueDofs(ess_attr, data_.coarsest_ess_hdivdofs); + data_.C.resize(num_refine+1); + + hcurl_fes_.reset(new ParFiniteElementSpace(mesh, hcurl_fec_.get())); + coarse_hcurl_fes_.reset(new ParFiniteElementSpace(*hcurl_fes_)); + data_.P_hcurl.resize(num_refine, OperatorPtr(Operator::Hypre_ParCSR)); +} SparseMatrix* AggToInteriorDof(const Array& bdr_truedofs, const SparseMatrix& agg_elem, diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index 0b3eeb19eb..5753dc690e 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -18,7 +18,76 @@ namespace mfem { namespace blocksolvers { +/// Parameters for the divergence free solver +struct DFSParameters : IterSolveParameters +{ + /** There are three components in the solver: a particular solution + satisfying the divergence constraint, the remaining div-free component of + the flux, and the pressure. When coupled_solve == false, the three + components will be solved one by one in the aforementioned order. + Otherwise, they will be solved at the same time. */ + bool coupled_solve = false; + bool verbose = false; + IterSolveParameters coarse_solve_param; + IterSolveParameters BBT_solve_param; +}; +/// Data for the divergenve free solver +struct DFSData +{ + std::vector agg_hdivdof; // agglomerates to H(div) dofs table + std::vector agg_l2dof; // agglomerates to L2 dofs table + std::vector P_hdiv; // Interpolation matrix for H(div) space + std::vector P_l2; // Interpolation matrix for L2 space + std::vector P_hcurl; // Interpolation for kernel space of div + std::vector Q_l2; // Q_l2[l] = (W_{l+1})^{-1} P_l2[l]^T W_l + Array coarsest_ess_hdivdofs; // coarsest level essential H(div) dofs + std::vector C; // discrete curl: ND -> RT, map to Null(B) + DFSParameters param; +}; + +/// Finite element spaces concerning divergence free solvers +/// The main usage of this class is to collect data needed for the solver. +class DFSSpaces +{ + RT_FECollection hdiv_fec_; + L2_FECollection l2_fec_; + std::unique_ptr hcurl_fec_; + L2_FECollection l2_0_fec_; + + std::unique_ptr coarse_hdiv_fes_; + std::unique_ptr coarse_l2_fes_; + std::unique_ptr coarse_hcurl_fes_; + std::unique_ptr l2_0_fes_; + + std::unique_ptr hdiv_fes_; + std::unique_ptr l2_fes_; + std::unique_ptr hcurl_fes_; + + std::vector el_l2dof_; + const Array& ess_bdr_attr_; + Array all_bdr_attr_; + + int level_; + DFSData data_; + + void MakeDofRelationTables(int level); + void DataFinalize(); +public: + DFSSpaces(int order, int num_refine, ParMesh *mesh, + const Array& ess_attr, const DFSParameters& param); + + /** This should be called each time when the mesh (where the FE spaces are + defined) is refined. The spaces will be updated, and the prolongation for + the spaces and other data needed for the div-free solver are stored. */ + void CollectDFSData(); + + const DFSData& GetDFSData() const { return data_; } + ParFiniteElementSpace* GetHdivFES() const { return hdiv_fes_.get(); } + ParFiniteElementSpace* GetL2FES() const { return l2_fes_.get(); } +}; + +/// Solvers for DFS /// Solver for B * B^T /// Compute the product B * B^T and solve it with CG preconditioned by BoomerAMG class BBTSolver : public Solver @@ -126,7 +195,6 @@ public: virtual void SetOperator(const Operator &op) { } virtual int GetNumIterations() const; }; - } // namespace blocksolvers } // namespace mfem From 2b88ef81aed0fef4e6eb6221e55f0b9f7de9d855 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 28 Aug 2023 16:50:53 -0700 Subject: [PATCH 023/200] Add serial and parallel refinement flag. --- miniapps/solvers/block-solvers.cpp | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index 2d6bcf5808..f904e3b834 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -257,6 +257,7 @@ int main(int argc, char *argv[]) const char *coef_file = ""; const char *ess_bdr_attr_file = ""; int order = 0; + int ser_ref_levels = 2; int par_ref_levels = 2; bool show_error = false; bool visualization = false; @@ -271,7 +272,9 @@ int main(int argc, char *argv[]) "Mesh file to use."); args.AddOption(&order, "-o", "--order", "Finite element order (polynomial degree)."); - args.AddOption(&par_ref_levels, "-r", "--ref", + args.AddOption(&ser_ref_levels, "-sr", "--serial-ref", + "Number of serial refinement steps."); + args.AddOption(&par_ref_levels, "-pr", "--parallel-ref", "Number of parallel refinement steps."); args.AddOption(&coef_file, "-c", "--coef", "Coefficient file to use."); @@ -308,14 +311,30 @@ int main(int argc, char *argv[]) // Initialize the mesh, boundary attributes, and solver parameters Mesh *mesh = new Mesh(mesh_file, 1, 1); + int dim = mesh->Dimension(); - int ser_ref_lvls = - (int)ceil(log(Mpi::WorldSize()/mesh->GetNE())/log(2.)/dim); - for (int i = 0; i < ser_ref_lvls; ++i) + // int ser_ref_levels_min = + // (int)ceil(log(Mpi::WorldSize()/mesh->GetNE())/log(2.)/dim); + + if (Mpi::Root()) + { + cout << "Attemping " << ser_ref_levels << " serial refinements and " + << par_ref_levels << " parallel refinements.\n"; + } + + for (int i = 0; i < ser_ref_levels; ++i) { mesh->UniformRefinement(); } + if (Mpi::Root()) + { + MFEM_ASSERT(Mpi::WorldSize() < mesh->GetNE(), + "Not enough elements in the mesh to be distributed:\n" + << "No. of processors: " << Mpi::WorldSize() << "\n" + << "No. of elements: " << mesh->GetNE()); + } + Array ess_bdr(mesh->bdr_attributes.Max()); ess_bdr = 0; if (std::strcmp(ess_bdr_attr_file, "")) From bf9bdddfdc87e923d714505d62082c8bb897ae3f Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Fri, 1 Sep 2023 14:15:47 -0700 Subject: [PATCH 024/200] Restructure of the code. - Remove overloaded BramblePasciakSolver::Init function - Move MFEM pre-defined BPSolver setting to the constructor - Add pointers to solvers in BramblePasciakSolver class - Simplify options - Remove redundant option in Parameter structs - Rename AddOperator to SumOperator - Wrap *.cpp files into namespace scopes - Add some documentation - Make style --- linalg/operator.cpp | 4 +- linalg/operator.hpp | 6 +- miniapps/solvers/block-solvers.cpp | 39 +++--- miniapps/solvers/bramble_pasciak.cpp | 198 ++++++--------------------- miniapps/solvers/bramble_pasciak.hpp | 41 +++--- miniapps/solvers/darcy_solver.cpp | 4 +- miniapps/solvers/div_free_solver.cpp | 6 + 7 files changed, 93 insertions(+), 205 deletions(-) diff --git a/linalg/operator.cpp b/linalg/operator.cpp index 762ebf3507..8cd9085d2f 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -365,7 +365,7 @@ void SecondOrderTimeDependentOperator::ImplicitSolve(const double dt0, mfem_error("SecondOrderTimeDependentOperator::ImplicitSolve() is not overridden!"); } -AddOperator::AddOperator(const Operator *A, const double alpha, +SumOperator::SumOperator(const Operator *A, const double alpha, const Operator *B, const double beta, bool ownA, bool ownB) : Operator(A->Height(), A->Width()), @@ -394,7 +394,7 @@ AddOperator::AddOperator(const Operator *A, const double alpha, */ } -AddOperator::~AddOperator() +SumOperator::~SumOperator() { if (ownA) { delete A; } if (ownB) { delete B; } diff --git a/linalg/operator.hpp b/linalg/operator.hpp index 0695e1ca1b..1ba218c5ff 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -770,7 +770,7 @@ public: }; /// General linear combination operator: x -> a A(x) + b B(x). -class AddOperator : public Operator +class SumOperator : public Operator { const Operator *A, *B; const double alpha, beta; @@ -778,7 +778,7 @@ class AddOperator : public Operator mutable Vector a, b; public: - AddOperator( + SumOperator( const Operator *A, const double alpha, const Operator *B, const double beta, bool ownA, bool ownB); @@ -789,7 +789,7 @@ public: virtual void MultTranspose(const Vector &x, Vector &y) const { A->MultTranspose(x, a); B->MultTranspose(x, b); add(alpha, a, beta, b, y); } - virtual ~AddOperator(); + virtual ~SumOperator(); }; /// General product operator: x -> (A*B)(x) = A(B(x)). diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index f904e3b834..b86d14d4bf 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -28,7 +28,9 @@ // The solvers being compared include: // 1. The divergence free solver (couple and decoupled modes) // 2. MINRES preconditioned by a block diagonal preconditioner -// 3. CG with a Bramble-Pasciak transformation +// 3. PCG with a Bramble-Pasciak transformation +// 4. Modified CG with a Bramble-Pasciak transformation (and a particular +// preconditioner). I.e., Bramble-Pasciak CG // // We recommend viewing example 5 before viewing this miniapp. // @@ -257,15 +259,13 @@ int main(int argc, char *argv[]) const char *coef_file = ""; const char *ess_bdr_attr_file = ""; int order = 0; - int ser_ref_levels = 2; - int par_ref_levels = 2; + int ser_ref_levels = 1; + int par_ref_levels = 1; bool show_error = false; bool visualization = false; - bool enable_bpcg = true; - bool enable_hpc = false; DFSParameters param; - BPCGParameters bpcg_param; + BPSParameters bps_param; OptionsParser args(argc, argv); args.AddOption(&mesh_file, "-m", "--mesh", @@ -286,12 +286,6 @@ int main(int argc, char *argv[]) args.AddOption(&visualization, "-vis", "--visualization", "-no-vis", "--no-visualization", "Enable or disable GLVis visualization."); - args.AddOption(&enable_bpcg, "-bp", "--bpcg", "-no-bp", - "--no-bpcg", - "Enable or disable Bramble-Pasciak CG method (BPCG-only)."); - args.AddOption(&enable_hpc, "-hp", "--h-pc", "-no-hp", - "--no-h-pc", - "Enable or disable H preconditioner (BPCG-only)."); args.Parse(); if (!args.Good()) { @@ -306,9 +300,6 @@ int main(int argc, char *argv[]) << "when par_ref_levels == 0.\n"; } - bpcg_param.use_bpcg = enable_bpcg; - bpcg_param.use_hpc = enable_hpc; - // Initialize the mesh, boundary attributes, and solver parameters Mesh *mesh = new Mesh(mesh_file, 1, 1); @@ -325,6 +316,11 @@ int main(int argc, char *argv[]) for (int i = 0; i < ser_ref_levels; ++i) { mesh->UniformRefinement(); + if (Mpi::Root()) + { + cout << "Current NE: " << mesh->GetNE() << "\nCurrent serial refinement stage: " + << i << "\n\n"; + } } if (Mpi::Root()) @@ -393,15 +389,20 @@ int main(int argc, char *argv[]) setup_time[&dfs_cm] = chrono.RealTime(); ResetTimer(); - BramblePasciakSolver bp(darcy.GetMform(), darcy.GetBform(), bpcg_param); - setup_time[&bp] = chrono.RealTime(); + BramblePasciakSolver bp_bpcg(darcy.GetMform(), darcy.GetBform(), bps_param); + setup_time[&bp_bpcg] = chrono.RealTime(); + + ResetTimer(); + bps_param.use_bpcg = false; + BramblePasciakSolver bp_pcg(darcy.GetMform(), darcy.GetBform(), bps_param); + setup_time[&bp_pcg] = chrono.RealTime(); std::map solver_to_name; solver_to_name[&bdp] = "Block-diagonal-preconditioned MINRES"; solver_to_name[&dfs_dm] = "Divergence free (decoupled mode)"; solver_to_name[&dfs_cm] = "Divergence free (coupled mode)"; - solver_to_name[&bp] = bpcg_param.use_bpcg ? "Bramble Pasciak CG (BPCG)" : - "Bramble Pasciak CG (BP Transformation + PCG)"; + solver_to_name[&bp_bpcg] = "Bramble Pasciak CG (using BPCG)"; + solver_to_name[&bp_pcg] = "Bramble Pasciak CG (using BP transform + PCG)"; // Solve the problem using all solvers for (const auto& solver_pair : solver_to_name) diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index e6c3fe3200..d5f18b4466 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -25,7 +25,7 @@ // q_h \in W_h (piecewise discontinuous polynomials), // D: subset of the boundary where natural boundary condition is imposed. // with a block transformation of the form X = AN - Id -// X = [ A*invQ - Id 0 ] +// X = [ M*invQ - Id 0 ] // [ B*invQ -Id ] // where N is defined by // N = [ invQ 0 ] @@ -37,23 +37,27 @@ // P = [ M_1 0 ] // [ 0 M_2 ] // Using the particular preconditioner H, defined as -// H = [ A - Q 0 ] +// H = [ M - Q 0 ] // [ 0 M_2 ] // (where M_1 = Q), enables a simplified version of a CG iteration (BPCG), as it avoids // the direct application of invH and X. // -// The code allows to use (P)CG with P or H, and BPCG. +// The code allows to use (P)CG with P (this includes H), and BPCG. #include "bramble_pasciak.hpp" using namespace std; using namespace mfem; using namespace blocksolvers; +namespace mfem +{ +namespace blocksolvers +{ /// Bramble-Pasciak Solver BramblePasciakSolver::BramblePasciakSolver( const std::shared_ptr &mVarf, const std::shared_ptr &bVarf, - const BPCGParameters ¶m) + const BPSParameters ¶m) : DarcySolver(mVarf->ParFESpace()->GetTrueVSize(), bVarf->TestFESpace()->GetTrueVSize()) { @@ -63,139 +67,35 @@ BramblePasciakSolver::BramblePasciakSolver( B_.reset(bVarf->ParallelAssemble()); Q_.reset(ConstructMassPreconditioner(*mVarf, param.q_scaling)); - Init(*M_, *B_, *Q_, param); + Vector diagM; + M_->GetDiag(diagM); + auto BT = B_->Transpose(); + auto invDBt = new HypreParMatrix(*BT); + invDBt->InvScaleRows(diagM); + auto S = ParMult(B_.get(), invDBt); + M0_.Reset(new HypreDiagScale(*Q_)); + M1_.Reset(new HypreBoomerAMG(*S)); + + // auto solver_M1 = new HypreBoomerAMG(*block11); + M1_.As()->SetPrintLevel(0); + + Init(*M_, *B_, *Q_, *M0_.As(), *M1_.As(), param); } +// TODO To test it! BramblePasciakSolver::BramblePasciakSolver( HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, Solver &M0, Solver &M1, - const BPCGParameters ¶m) + const BPSParameters ¶m) : DarcySolver(M.NumRows(), B.NumRows()) { Init(M, B, Q, M0, M1, param); } -void BramblePasciakSolver::Init( - HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, - const BPCGParameters ¶m) -{ - auto Bt = new TransposeOperator(&B); - // invQ - // TODO - // This is not general enough. We are assuming Q is diag - // Not using invQ ... - // HypreParMatrix *invQ = new HypreParMatrix(Q); - // Vector diagQ; - // Q.GetDiag(diagQ); - // *invQ = 1.0; - // invQ->InvScaleRows(diagQ); - - Vector diagM; - M.GetDiag(diagM); - auto BT = B.Transpose(); - auto invDBt = new HypreParMatrix(*BT); - invDBt->InvScaleRows(diagM); - auto S = ParMult(&B, invDBt); - auto M0 = new HypreDiagScale(Q); - auto M1 = new HypreBoomerAMG(*S); - // auto solver_M1 = new HypreBoomerAMG(*block11); - M1->SetPrintLevel(0); - - use_bpcg = param.use_bpcg; - - if (use_bpcg) - { - oop_ = new BlockOperator(offsets_); - oop_->owns_blocks = false; - oop_->SetBlock(0, 0, &M); - oop_->SetBlock(0, 1, Bt); - oop_->SetBlock(1, 0, &B); - - // cpc_ unused in bpcg - auto temp_cpc = new BlockDiagonalPreconditioner(offsets_); - temp_cpc->owns_blocks = true; - temp_cpc->SetDiagonalBlock(0, M0); - temp_cpc->SetDiagonalBlock(1, M1); - // tri(1,0) = B M0 = B invQ - auto id_m = new IdentityOperator(M.NumRows()); - auto id_b = new IdentityOperator(B.NumRows()); - auto BinvM0 = new ProductOperator(&B, M0, false, false); - // tri - auto temp_tri = new BlockOperator(offsets_); - temp_tri->owns_blocks = true; - temp_tri->SetBlock(0, 0, id_m); - temp_tri->SetBlock(1, 1, id_b, -1.0); - temp_tri->SetBlock(1, 0, BinvM0); - - ppc_ = new ProductOperator(temp_cpc, temp_tri, true, true); - - ipc_ = new BlockOperator(offsets_); - ipc_->owns_blocks = false; - ipc_->SetDiagonalBlock(0, M0); - - // bpcg - solver_.Reset(new BPCGSolver(M.GetComm())); - SetOptions(*solver_.As(), param); - { - solver_.As()->SetOperator(*oop_); - solver_.As()->SetIncompletePreconditioner(*ipc_); - solver_.As()->SetParticularPreconditioner(*ppc_); - } - } - else - { - // oop_ unused in cg - auto temp_oop = new BlockOperator(offsets_); - temp_oop->owns_blocks = false; - temp_oop->SetBlock(0, 0, &M); - temp_oop->SetBlock(0, 1, Bt); - temp_oop->SetBlock(1, 0, &B); - - // ipc_ unused in cg - auto temp_ipc = new BlockOperator(offsets_); - temp_ipc->owns_blocks = false; - temp_ipc->SetDiagonalBlock(0, M0); - - // temp_AN = temp_oop * temp_ipc - auto temp_AN = new ProductOperator(temp_oop, temp_ipc, true, true); - - // Required for updating the RHS - auto id = new IdentityOperator(M.NumRows()+B.NumRows()); - map_ = new AddOperator(temp_AN, 1.0, id, -1.0, true, true); - - mop_ = new ProductOperator(map_, temp_oop, false, true); - - cpc_ = new BlockDiagonalPreconditioner(offsets_); - cpc_->owns_blocks = true; - cpc_->SetDiagonalBlock(0, M0); - cpc_->SetDiagonalBlock(1, M1); - - if (param.use_hpc) - { - auto Diff = new HypreParMatrix(M); - Diff->Add(-1.0,Q); - auto MM0 = new HypreDiagScale(*Diff); - auto MM1 = new HypreDiagScale(*S); - - hpc_ = new BlockDiagonalPreconditioner(offsets_); - hpc_->owns_blocks = true; - hpc_->SetDiagonalBlock(0, MM0); - hpc_->SetDiagonalBlock(1, MM1); - } - - solver_.Reset(new CGSolver(M.GetComm())); - SetOptions(*solver_.As(), param); - { - solver_.As()->SetOperator(*mop_); - solver_.As()->SetPreconditioner(*cpc_); - } - } -} - void BramblePasciakSolver::Init( HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, Solver &M0, Solver &M1, - const BPCGParameters ¶m) + const BPSParameters ¶m) { auto Bt = new TransposeOperator(&B); auto invQ = new HypreDiagScale(Q); @@ -233,13 +133,8 @@ void BramblePasciakSolver::Init( ipc_->SetDiagonalBlock(0, invQ); // bpcg - solver_.Reset(new BPCGSolver(M.GetComm())); - SetOptions(*solver_.As(), param); - { - solver_.As()->SetOperator(*oop_); - solver_.As()->SetIncompletePreconditioner(*ipc_); - solver_.As()->SetParticularPreconditioner(*ppc_); - } + solver_.reset(new BPCGSolver(M.GetComm(), *ipc_, *ppc_)); + solver_->SetOperator(*oop_); } else { @@ -260,7 +155,7 @@ void BramblePasciakSolver::Init( // Required for updating the RHS auto id = new IdentityOperator(M.NumRows()+B.NumRows()); - map_ = new AddOperator(temp_AN, 1.0, id, -1.0, true, true); + map_ = new SumOperator(temp_AN, 1.0, id, -1.0, true, true); mop_ = new ProductOperator(map_, temp_oop, false, true); @@ -269,13 +164,12 @@ void BramblePasciakSolver::Init( cpc_->SetDiagonalBlock(0, &M0); cpc_->SetDiagonalBlock(1, &M1); - solver_.Reset(new CGSolver(M.GetComm())); - SetOptions(*solver_.As(), param); - { - solver_.As()->SetOperator(*mop_); - solver_.As()->SetPreconditioner(*cpc_); - } + // (P)CG + solver_.reset(new CGSolver(M.GetComm())); + solver_->SetOperator(*mop_); + solver_->SetPreconditioner(*cpc_); } + SetOptions(*solver_, param); } HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( @@ -310,21 +204,15 @@ void BramblePasciakSolver::Mult(const Vector & x, Vector & y) const { Vector transformed_rhs(x.Size()); map_->Mult(x, transformed_rhs); - solver_.As()->Mult(transformed_rhs, y); + solver_->Mult(transformed_rhs, y); } else { - solver_.As()->Mult(x, y); + solver_->Mult(x, y); } for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } } -int BramblePasciakSolver::GetNumIterations() const -{ - if (!use_bpcg) { return solver_.As()->GetNumIterations(); } - else { return solver_.As()->GetNumIterations(); } -} - /// Bramble-Pasciak CG void BPCGSolver::UpdateVectors() { @@ -354,19 +242,19 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const subtract(b, r, r); // r = b - A x // tra_->Mult(r,r_hat); // r_hat = X r // map_->Mult(r,r_tem); // r_tem = S r - pprec->Mult(r,r_bar); // r_bar = P r - p = r_bar; - oper->Mult(p, g); // g = A p - oper->Mult(r_bar, t); // t = A r_bar - iprec->Mult(r, r_red); // r_red = N r } else { - // TODO - MFEM_ABORT("To implement non-iterative mode: iterative_mode: " << - iterative_mode); + r = b; + x = 0.0; } + pprec->Mult(r,r_bar); // r_bar = P r + p = r_bar; + oper->Mult(p, g); // g = A p + oper->Mult(r_bar, t); // t = A r_bar + iprec->Mult(r, r_red); // r_red = N r + // Initial norms delta = delta0 = Dot(t, r_red) - Dot(r_bar, r); // Dot(r_bar, r_hat) if (delta0 >= 0.0) { initial_norm = sqrt(delta0); } @@ -516,3 +404,5 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const final_norm = sqrt(delta); Monitor(final_iter, final_norm, r, x, true); } +} // namespace blocksolvers +} // namespace mfem diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index 34564a38b9..9fa48b8ed6 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -48,20 +48,20 @@ #define MFEM_BP_SOLVER_HPP #include "darcy_solver.hpp" +#include namespace mfem { namespace blocksolvers { -/// Parameters for the BPCG method -struct BPCGParameters : IterSolveParameters +/// Parameters for the BramblePasciakSolver method +struct BPSParameters : IterSolveParameters { /* These are parameters for the scaling of the Q preconditioner * the usage of BPCG method, and the definition of the H preconditioner */ bool use_bpcg = true; double q_scaling = 0.5; - bool use_hpc = false; }; /// Bramble-Pasciak Conjugate Gradient @@ -73,7 +73,7 @@ protected: /* Operator list * From IterativeSolver: * *oper -> A = [M, Bt; B, 0] - * *prec -> P = diag(M0, M1) + * *prec -> P = diag(M0, M1) // Not used * From this class: * *iprec -> N = diag(M0, 0) * *pprec -> P' = P * [Id, 0; B*M0, -Id] @@ -83,19 +83,19 @@ protected: public: BPCGSolver() { } + BPCGSolver(const Operator &ipc, const Operator &ppc) { pprec = &ppc; iprec = &ipc; } #ifdef MFEM_USE_MPI BPCGSolver(MPI_Comm comm_) : IterativeSolver(comm_) { } + BPCGSolver(MPI_Comm comm_, const Operator &ipc, + const Operator &ppc) : IterativeSolver(comm_) { pprec = &ppc; iprec = &ipc; } #endif virtual void SetOperator(const Operator &op) { IterativeSolver::SetOperator(op); UpdateVectors(); } virtual void SetPreconditioner(const Operator &pc) - { if (Mpi::Root()) { MFEM_WARNING("No explicit preconditioner required for BPCG"); } } - - virtual void SetPreconditioner() - { if (Mpi::Root()) { MFEM_WARNING("No explicit preconditioner required for BPCG"); } } + { if (Mpi::Root()) { MFEM_WARNING("No explicit preconditioner required for BPCG.\n"); } } virtual void SetIncompletePreconditioner(const Operator &ipc) { iprec = &ipc; } @@ -131,41 +131,35 @@ public: class BramblePasciakSolver : public DarcySolver { mutable bool use_bpcg; - OperatorPtr solver_; - // CGSolver solver_; - // BPCGSolver bpsolver_; + std::unique_ptr solver_; BlockOperator *oop_, *ipc_; ProductOperator *mop_; - AddOperator *map_; + SumOperator *map_; ProductOperator *ppc_; BlockDiagonalPreconditioner *cpc_, *hpc_; std::unique_ptr M_; std::unique_ptr B_; std::unique_ptr Q_; + OperatorPtr M0_; + OperatorPtr M1_; Array ess_zero_dofs_; - /// User provides system. void Init(HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, Solver &M0, Solver &M1, - const BPCGParameters ¶m); - - /// Construct specific preconditioners. - void Init(HypreParMatrix &M, HypreParMatrix &B, - HypreParMatrix &Q, - const BPCGParameters ¶m); + const BPSParameters ¶m); public: /// System and mass preconditioner are constructed from bilinear forms BramblePasciakSolver( const std::shared_ptr &mVarf, const std::shared_ptr &bVarf, - const BPCGParameters ¶m); + const BPSParameters ¶m); /// System and mass preconditioner are user-provided BramblePasciakSolver( HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, Solver &M0, Solver &M1, - const BPCGParameters ¶m); + const BPSParameters ¶m); /// Assemble a preconditioner for the mass matrix /** Mass preconditioner corresponds to a local re-scaling @@ -177,13 +171,10 @@ public: static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf, double alpha = 0.5); - /// Define if BPCG will be employed in Mult - void SetBPCG(bool use) { use_bpcg = use; } - virtual void Mult(const Vector &x, Vector &y) const; virtual void SetOperator(const Operator &op) { } void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } - virtual int GetNumIterations() const; + virtual int GetNumIterations() const { return solver_->GetNumIterations(); } }; } // namespace blocksolvers diff --git a/miniapps/solvers/darcy_solver.cpp b/miniapps/solvers/darcy_solver.cpp index c6baaf8987..0009982bde 100644 --- a/miniapps/solvers/darcy_solver.cpp +++ b/miniapps/solvers/darcy_solver.cpp @@ -26,8 +26,6 @@ void SetOptions(IterativeSolver& solver, const IterSolveParameters& param) solver.SetAbsTol(param.abs_tol); solver.SetRelTol(param.rel_tol); } -} // namespace blocksolvers -} // namespace mfem /// Wrapper Block Diagonal Preconditioned MINRES (ex5p) /** Wrapper for assembling the discrete Darcy problem (ex5p) @@ -64,3 +62,5 @@ void BDPMinresSolver::Mult(const Vector & x, Vector & y) const solver_.Mult(x, y); for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } } +} // namespace blocksolvers +} // namespace mfem diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 1ebba87990..1efa3784f6 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -15,6 +15,10 @@ using namespace std; using namespace mfem; using namespace blocksolvers; +namespace mfem +{ +namespace blocksolvers +{ HypreParMatrix* TwoStepsRAP(const HypreParMatrix& Rt, const HypreParMatrix& A, const HypreParMatrix& P) { @@ -567,3 +571,5 @@ int DivFreeSolver::GetNumIterations() const } return solver_.As()->GetNumIterations(); } +} // namespace blocksolvers +} // namespace mfem From 2d8d46a20883e7f7a238687d38c307761392295e Mon Sep 17 00:00:00 2001 From: Chak Shing Lee Date: Tue, 5 Sep 2023 11:22:24 -0700 Subject: [PATCH 025/200] use M instead of Q to construct the (1,1)-block preconditioner in BramblePasciakSolver. adjust documentation and print --- miniapps/solvers/block-solvers.cpp | 26 +++++---------- miniapps/solvers/bramble_pasciak.cpp | 43 +++--------------------- miniapps/solvers/bramble_pasciak.hpp | 49 +++++++++++++--------------- 3 files changed, 36 insertions(+), 82 deletions(-) diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index b86d14d4bf..96fe58b97e 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -26,11 +26,9 @@ // polynomials (pressure p). // // The solvers being compared include: -// 1. The divergence free solver (couple and decoupled modes) -// 2. MINRES preconditioned by a block diagonal preconditioner -// 3. PCG with a Bramble-Pasciak transformation -// 4. Modified CG with a Bramble-Pasciak transformation (and a particular -// preconditioner). I.e., Bramble-Pasciak CG +// 1. MINRES preconditioned by a block diagonal preconditioner +// 2. The divergence free solver (couple and decoupled modes) +// 3. The Bramble-Pasciak solver (using BPCG or regular PCG) // // We recommend viewing example 5 before viewing this miniapp. // @@ -166,6 +164,7 @@ DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, mVarf_->ComputeElementMatrices(); mVarf_->Assemble(); mVarf_->EliminateEssentialBC(ess_bdr, u_, fform); + mVarf_->Finalize(); M_.Reset(mVarf_->ParallelAssemble()); @@ -304,31 +303,24 @@ int main(int argc, char *argv[]) Mesh *mesh = new Mesh(mesh_file, 1, 1); int dim = mesh->Dimension(); - // int ser_ref_levels_min = - // (int)ceil(log(Mpi::WorldSize()/mesh->GetNE())/log(2.)/dim); if (Mpi::Root()) { - cout << "Attemping " << ser_ref_levels << " serial refinements and " - << par_ref_levels << " parallel refinements.\n"; + cout << "Number of serial refinements: " << ser_ref_levels << "\n" + << "Number of serial refinements: " << par_ref_levels << "\n"; } for (int i = 0; i < ser_ref_levels; ++i) { mesh->UniformRefinement(); - if (Mpi::Root()) - { - cout << "Current NE: " << mesh->GetNE() << "\nCurrent serial refinement stage: " - << i << "\n\n"; - } } if (Mpi::Root()) { MFEM_ASSERT(Mpi::WorldSize() < mesh->GetNE(), "Not enough elements in the mesh to be distributed:\n" - << "No. of processors: " << Mpi::WorldSize() << "\n" - << "No. of elements: " << mesh->GetNE()); + << "Number of processors: " << Mpi::WorldSize() << "\n" + << "Number of elements: " << mesh->GetNE()); } Array ess_bdr(mesh->bdr_attributes.Max()); @@ -402,7 +394,7 @@ int main(int argc, char *argv[]) solver_to_name[&dfs_dm] = "Divergence free (decoupled mode)"; solver_to_name[&dfs_cm] = "Divergence free (coupled mode)"; solver_to_name[&bp_bpcg] = "Bramble Pasciak CG (using BPCG)"; - solver_to_name[&bp_pcg] = "Bramble Pasciak CG (using BP transform + PCG)"; + solver_to_name[&bp_pcg] = "Bramble Pasciak CG (using regular PCG)"; // Solve the problem using all solvers for (const auto& solver_pair : solver_to_name) diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index d5f18b4466..1a3556be6c 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -8,41 +8,8 @@ // 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. -// -// ---------------------------------------------------------- -// Bramble-Pasciak preconditioning for Darcy problem -// ---------------------------------------------------------- -// -// Main idea is to precondition the block system -// Ax = [ M B^T ] [u] = [f] -// [ B 0 ] [p] = [g] -// where: -// M = \int_\Omega (k u_h) \cdot v_h dx, -// B = -\int_\Omega (div_h u_h) q_h dx, -// f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, -// g = \int_\Omega g_exact q_h dx, -// u_h, v_h \in R_h (Raviart-Thomas finite element space), -// q_h \in W_h (piecewise discontinuous polynomials), -// D: subset of the boundary where natural boundary condition is imposed. -// with a block transformation of the form X = AN - Id -// X = [ M*invQ - Id 0 ] -// [ B*invQ -Id ] -// where N is defined by -// N = [ invQ 0 ] -// [ 0 0 ] -// and Q is constructed such that Q and M-Q are both s.p.d. -// -// The codes allows the user to provide such Q, or to construct it from the -// element matrices A_T. Moreover, the user can provide a block preconditioner -// P = [ M_1 0 ] -// [ 0 M_2 ] -// Using the particular preconditioner H, defined as -// H = [ M - Q 0 ] -// [ 0 M_2 ] -// (where M_1 = Q), enables a simplified version of a CG iteration (BPCG), as it avoids -// the direct application of invH and X. -// -// The code allows to use (P)CG with P (this includes H), and BPCG. + + #include "bramble_pasciak.hpp" using namespace std; @@ -61,7 +28,7 @@ BramblePasciakSolver::BramblePasciakSolver( : DarcySolver(mVarf->ParFESpace()->GetTrueVSize(), bVarf->TestFESpace()->GetTrueVSize()) { - MFEM_ASSERT((param.q_scaling>=0.0) && (param.q_scaling<=1.0), + MFEM_ASSERT((param.q_scaling > 0.0) && (param.q_scaling < 1.0), "Invalid Q-scaling factor: param.q_scaling " << param.q_scaling ); M_.reset(mVarf->ParallelAssemble()); B_.reset(bVarf->ParallelAssemble()); @@ -73,10 +40,8 @@ BramblePasciakSolver::BramblePasciakSolver( auto invDBt = new HypreParMatrix(*BT); invDBt->InvScaleRows(diagM); auto S = ParMult(B_.get(), invDBt); - M0_.Reset(new HypreDiagScale(*Q_)); + M0_.Reset(new HypreDiagScale(*M_)); M1_.Reset(new HypreBoomerAMG(*S)); - - // auto solver_M1 = new HypreBoomerAMG(*block11); M1_.As()->SetPrintLevel(0); Init(*M_, *B_, *Q_, *M0_.As(), *M1_.As(), param); diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index 9fa48b8ed6..4966b3ed5d 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -13,36 +13,35 @@ // Bramble-Pasciak preconditioning for Darcy problem // ---------------------------------------------------------- // -// Main idea is to precondition the block system -// Ax = [ M B^T ] [u] = [f] +// Main idea is to transform the block system +// Ax = [ M B^T ] [u] = [f] = b // [ B 0 ] [p] = [g] // where: // M = \int_\Omega (k u_h) \cdot v_h dx, // B = -\int_\Omega (div_h u_h) q_h dx, -// f = \int_\Omega f_exact v_h dx + \int_D natural_bc v_h dS, -// g = \int_\Omega g_exact q_h dx, // u_h, v_h \in R_h (Raviart-Thomas finite element space), // q_h \in W_h (piecewise discontinuous polynomials), -// D: subset of the boundary where natural boundary condition is imposed. // with a block transformation of the form X = AN - Id -// X = [ A*invQ - Id 0 ] +// X = [ M*invQ - Id 0 ] // [ B*invQ -Id ] // where N is defined by // N = [ invQ 0 ] // [ 0 0 ] // and Q is constructed such that Q and M-Q are both s.p.d. // -// The codes allows the user to provide such Q, or to construct it from the -// element matrices A_T. Moreover, the user can provide a block preconditioner -// P = [ M_1 0 ] -// [ 0 M_2 ] -// Using the particular preconditioner H, defined as -// H = [ A - Q 0 ] -// [ 0 M_2 ] -// (where M_1 = Q), enables a simplified version of a CG iteration (BPCG), as it avoids -// the direct application of invH and X. +// The solution x is then obtained by solving XAx = Xb with PCG as XA is s.p.d. // -// The code allows to use (P)CG with P or H, and BPCG. +// The codes allows the user to provide such Q, or to construct it from the +// element matrices M_T. Moreover, the user can provide a block preconditioner +// P = [ M_0 0 ] +// [ 0 M_1 ] +// for the transformed system XA. +// +// The code also allows the user to use BPCG, which is a special implementation +// of the PCG iteration with the particular preconditioner H, defined as +// H = [ M - Q 0 ] +// [ 0 M_1 ] +// BPCG is efficient as it avoids the direct application of invH and X. #ifndef MFEM_BP_SOLVER_HPP #define MFEM_BP_SOLVER_HPP @@ -58,10 +57,8 @@ namespace blocksolvers /// Parameters for the BramblePasciakSolver method struct BPSParameters : IterSolveParameters { - /* These are parameters for the scaling of the Q preconditioner - * the usage of BPCG method, and the definition of the H preconditioner */ - bool use_bpcg = true; - double q_scaling = 0.5; + bool use_bpcg = true; // whether to use BPCG + double q_scaling = 0.5; // scaling (> 0 and < 1) of the Q preconditioner }; /// Bramble-Pasciak Conjugate Gradient @@ -73,10 +70,9 @@ protected: /* Operator list * From IterativeSolver: * *oper -> A = [M, Bt; B, 0] - * *prec -> P = diag(M0, M1) // Not used * From this class: * *iprec -> N = diag(M0, 0) - * *pprec -> P' = P * [Id, 0; B*M0, -Id] + * *pprec -> P' = diag(M0, M1) * [Id, 0; B*M0, -Id] */ const Operator *iprec, *pprec; void UpdateVectors(); @@ -87,15 +83,15 @@ public: #ifdef MFEM_USE_MPI BPCGSolver(MPI_Comm comm_) : IterativeSolver(comm_) { } - BPCGSolver(MPI_Comm comm_, const Operator &ipc, - const Operator &ppc) : IterativeSolver(comm_) { pprec = &ppc; iprec = &ipc; } + BPCGSolver(MPI_Comm comm_, const Operator &ipc, const Operator &ppc) + : IterativeSolver(comm_) { pprec = &ppc; iprec = &ipc; } #endif virtual void SetOperator(const Operator &op) { IterativeSolver::SetOperator(op); UpdateVectors(); } virtual void SetPreconditioner(const Operator &pc) - { if (Mpi::Root()) { MFEM_WARNING("No explicit preconditioner required for BPCG.\n"); } } + { if (Mpi::Root()) { MFEM_WARNING("SetPreconditioner does NO effect to BPCGSolver.\n"); } } virtual void SetIncompletePreconditioner(const Operator &ipc) { iprec = &ipc; } @@ -166,7 +162,8 @@ public: * based on the smallest eigenvalue of the generalized * eigenvalue problem locally on each element T: * M_T x_T = lambda_T diag(M_T) x_T - * and we set Q_T = 0.5 * min(lambda_T) * diag(M_T). + * and we set Q_T = alpha * min(lambda_T) * diag(M_T), + * 0 < alpha < 1. */ static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf, double alpha = 0.5); From e60b446438b7fada7fc334e45e7a0ab081286d67 Mon Sep 17 00:00:00 2001 From: Chak Shing Lee Date: Wed, 6 Sep 2023 14:18:30 -0700 Subject: [PATCH 026/200] remove unused lines --- miniapps/solvers/CMakeLists.txt | 6 ------ miniapps/solvers/makefile | 6 ------ 2 files changed, 12 deletions(-) diff --git a/miniapps/solvers/CMakeLists.txt b/miniapps/solvers/CMakeLists.txt index 0de7acc812..6635f49638 100644 --- a/miniapps/solvers/CMakeLists.txt +++ b/miniapps/solvers/CMakeLists.txt @@ -16,12 +16,6 @@ if (MFEM_USE_MPI) EXTRA_HEADERS darcy_solver.hpp div_free_solver.hpp bramble_pasciak.hpp LIBRARIES mfem) -# add_mfem_miniapp(elast-block-solvers -# MAIN elasticity_solver.cpp -# EXTRA_SOURCES -# EXTRA_HEADERS -# LIBRARIES mfem) - add_mfem_miniapp(plor_solvers MAIN plor_solvers.cpp EXTRA_HEADERS lor_mms.hpp diff --git a/miniapps/solvers/makefile b/miniapps/solvers/makefile index 2b6617506d..8ce6bc5ac6 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/makefile @@ -59,12 +59,6 @@ block-solvers: $(BLOCK_SOLVERS_OBJ) $(BLOCK_SOLVERS_OBJ): $(DARCY_SOLVERS_OBJ) $(MFEM_CXX) $(MFEM_FLAGS) -c $(BLOCK_SOLVERS_SRC) $< -o $@ -# elast-block-solvers: elast-block-solvers.o -# $(MFEM_CXX) $(MFEM_LINK_FLAGS) -o $@ $< $(MFEM_LIBS) - -# elast-block-solvers.o: elast-block-solvers.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) -# $(MFEM_CXX) $(MFEM_LINK_FLAGS) $(MFEM_FLAGS) -c $< -o $@ - %.o: $(SRC)%.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) $(MFEM_CXX) $(MFEM_FLAGS) -c $< -o $@ From fcc35e6c6f8bb8fd3eceeef8e5eb83ab5e33218a Mon Sep 17 00:00:00 2001 From: Chak Shing Lee Date: Wed, 6 Sep 2023 14:54:28 -0700 Subject: [PATCH 027/200] remove one target in makefile --- miniapps/solvers/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniapps/solvers/makefile b/miniapps/solvers/makefile index 8ce6bc5ac6..cd42df48a2 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/makefile @@ -28,7 +28,7 @@ BLOCK_SOLVERS_SRC = bramble_pasciak.cpp div_free_solver.cpp block-solvers.cpp BLOCK_SOLVERS_OBJ = $(BLOCK_SOLVERS_SRC:.cpp=.o) SEQ_MINIAPPS = lor_solvers -PAR_MINIAPPS = block-solvers plor_solvers elast-block-solvers +PAR_MINIAPPS = block-solvers plor_solvers ifeq ($(MFEM_USE_MPI),NO) MINIAPPS = $(SEQ_MINIAPPS) From 05ace32f426547eab670aca1334cf53b59ead621 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 11 Sep 2023 11:21:27 -0700 Subject: [PATCH 028/200] Cleaner code. - Add description to README - Remove commentaries in BPCG - Move assert into ConstructMassPreconditioner --- miniapps/solvers/README | 22 ++++++++- miniapps/solvers/bramble_pasciak.cpp | 67 ++++++++++++---------------- miniapps/solvers/bramble_pasciak.hpp | 4 +- 3 files changed, 51 insertions(+), 42 deletions(-) diff --git a/miniapps/solvers/README b/miniapps/solvers/README index c438a65b9e..b6d92b2a75 100644 --- a/miniapps/solvers/README +++ b/miniapps/solvers/README @@ -21,7 +21,7 @@ coefficient K, and the essential/natural boundary assignment. The discrete saddle point problem has a block structure of the form - [ M B^T ] [u] = [g] + Ax = [ M B^T ] [u] = [g] = b [ B 0 ] [p] = [f] The solvers for the above block system include: @@ -62,6 +62,26 @@ The solvers for the above block system include: P^{-1} = [ diag(M)^{-1} 0 ] [ 0 AMG(S) ] +3. CG with Bramble-Pasciak transformation + + The solver explores two approaches. Firstly, we consider a preconditioner Q + such that M - Q is still s.p.d.. The transformed system XA x = X b, where + X = [ M*Q^{-1} - I 0 ] + [ B*Q^{-1} -I ], + can be solver with a standard PGC solver, where we use the above block + diagonal preconditioner. + Secondly, we consider the particular preconditioner + H^{-1} = [ (M - Q)^{-1} 0 ] + [ 0 P_2^{-1} ]. + This preconditioner enables a more efficient implementation of PCG what we + refer to as Bramble-Pasciak CG (BPCG). + + For more details see + + [1] Bramble, James H., and Joseph E. Pasciak. A preconditioning technique + for indefinite systems resulting from mixed approximations of elliptic + problems. Mathematics of Computation 50.181 (1988): 1-17. + # Low-Order Refined Solvers The miniapp `lor` (and its parallel counterpart `plor`) demonstrate the use of diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 1a3556be6c..86ac1f7d74 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -28,8 +28,6 @@ BramblePasciakSolver::BramblePasciakSolver( : DarcySolver(mVarf->ParFESpace()->GetTrueVSize(), bVarf->TestFESpace()->GetTrueVSize()) { - MFEM_ASSERT((param.q_scaling > 0.0) && (param.q_scaling < 1.0), - "Invalid Q-scaling factor: param.q_scaling " << param.q_scaling ); M_.reset(mVarf->ParallelAssemble()); B_.reset(bVarf->ParallelAssemble()); Q_.reset(ConstructMassPreconditioner(*mVarf, param.q_scaling)); @@ -47,7 +45,6 @@ BramblePasciakSolver::BramblePasciakSolver( Init(*M_, *B_, *Q_, *M0_.As(), *M1_.As(), param); } -// TODO To test it! BramblePasciakSolver::BramblePasciakSolver( HypreParMatrix &M, HypreParMatrix &B, HypreParMatrix &Q, Solver &M0, Solver &M1, @@ -140,6 +137,8 @@ void BramblePasciakSolver::Init( HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( ParBilinearForm &mVarf, double alpha) { + MFEM_ASSERT((param.q_scaling > 0.0) && (param.q_scaling < 1.0), + "Invalid Q-scaling factor: param.q_scaling " << param.q_scaling ); ParBilinearForm qVarf(mVarf.ParFESpace()); for (int i = 0; i < mVarf.ParFESpace()->GetNE(); ++i) { @@ -187,7 +186,6 @@ void BPCGSolver::UpdateVectors() p.SetSize(width, mt); p.UseDevice(true); g.SetSize(width, mt); g.UseDevice(true); t.SetSize(width, mt); t.UseDevice(true); - // r_hat.SetSize(width, mt); r_hat.UseDevice(true); r_bar.SetSize(width, mt); r_bar.UseDevice(true); r_red.SetSize(width, mt); r_red.UseDevice(true); g_red.SetSize(width, mt); g_red.UseDevice(true); @@ -205,8 +203,6 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const { oper->Mult(x, r); subtract(b, r, r); // r = b - A x - // tra_->Mult(r,r_hat); // r_hat = X r - // map_->Mult(r,r_tem); // r_tem = S r } else { @@ -214,19 +210,18 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const x = 0.0; } - pprec->Mult(r,r_bar); // r_bar = P r + pprec->Mult(r,r_bar); // r_bar = P r p = r_bar; - oper->Mult(p, g); // g = A p - oper->Mult(r_bar, t); // t = A r_bar + oper->Mult(p, g); // g = A p + oper->Mult(r_bar, t); // t = A r_bar iprec->Mult(r, r_red); // r_red = N r - // Initial norms - delta = delta0 = Dot(t, r_red) - Dot(r_bar, r); // Dot(r_bar, r_hat) + delta = delta0 = Dot(t, r_red) - Dot(r_bar, r); // Dot(Pr, r) if (delta0 >= 0.0) { initial_norm = sqrt(delta0); } - MFEM_ASSERT(IsFinite(delta), "nom = " << delta); + MFEM_ASSERT(IsFinite(delta), "norm = " << delta); if (print_options.iterations || print_options.first_and_last) { - mfem::out << " Iteration : " << setw(3) << 0 << " (B r, r) = " + mfem::out << " Iteration : " << setw(3) << 0 << " (P r, r) = " << delta << (print_options.first_and_last ? " ...\n" : "\n"); } Monitor(0, delta, r, x); @@ -235,7 +230,7 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const { if (print_options.warnings) { - mfem::out << "BPCG: The preconditioner is not positive definite. (Br, r) = " + mfem::out << "BPCG: The preconditioner is not positive definite. (Pr, r) = " << delta << '\n'; } converged = false; @@ -253,11 +248,9 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const return; } - // MFEM checks some system properties before running the loop - // Step 0.1: Compute (p,XAp), p = r_bar iprec->Mult(g, g_red); - gamma = Dot(g, g_red) - Dot(g,p); - MFEM_ASSERT(IsFinite(gamma), "den = " << gamma); + gamma = Dot(g, g_red) - Dot(g,p); // Dot(Ap, p) + MFEM_ASSERT(IsFinite(gamma), "den (gamma) = " << gamma); if (gamma <= 0.0) { if (Dot(r_bar, r_bar) > 0.0 && print_options.warnings) @@ -279,24 +272,22 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const final_iter = max_iter; for (i = 1; true; ) { - // Step 2: Get new step in the search direction p alpha = delta0/gamma; - // Step 3: Update solution (and residual) in the search direction - add(x, alpha, p, x); // x = x + alpha p - add(r, -alpha, g, r); // r = r - alpha g - // map_->Mult(r, r_tem); // r_tem = S r + add(x, alpha, p, x); // x = x + alpha p + add(r, -alpha, g, r); // r = r - alpha g + pprec->Mult(r, r_bar); // r_bar = P r - // Step 4: Compute (HXr,Xr) = (r_bar, r_hat) - iprec->Mult(r, r_red); // r_red = N r - oper->Mult(r_bar, t); // t = A r_bar + iprec->Mult(r, r_red); // r_red = N r + oper->Mult(r_bar, t); // t = A r_bar delta = Dot(t, r_red) - Dot(r_bar,r); + // Check - MFEM_ASSERT(IsFinite(delta), "betanom = " << delta); + MFEM_ASSERT(IsFinite(delta), "norm = " << delta); if (delta < 0.0) { if (print_options.warnings) { - mfem::out << "BPCG: The preconditioner is not positive definite. (Br, r) = " + mfem::out << "BPCG: The preconditioner is not positive definite. (Pr, r) = " << delta << '\n'; } converged = false; @@ -305,7 +296,7 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const } if (print_options.iterations) { - mfem::out << " Iteration : " << setw(3) << i << " (B r, r) = " + mfem::out << " Iteration : " << setw(3) << i << " (Pr, r) = " << delta << std::endl; } Monitor(i, delta, r, x); @@ -319,18 +310,16 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const { break; } - // End checks - // Step 5: Update search direction + // End check + beta = delta/delta0; - add(r_bar, beta, p, p); - // Step 6: Update remaining directions - // oper->Mult(r_bar, t); // t = A r_bar - add(t, beta, g, g); + add(r_bar, beta, p, p); // p = r_bar + beta p + add(t, beta, g, g); // g = t + beta g + delta0 = delta; - // Step 1: Compute (p,XAp) iprec->Mult(g, g_red); - gamma = Dot(g, g_red) - Dot(g,p); - MFEM_ASSERT(IsFinite(gamma), "den = " << gamma); + gamma = Dot(g, g_red) - Dot(g,p); // Dot(Ap, p) + MFEM_ASSERT(IsFinite(gamma), "den (gamma) = " << gamma); if (gamma <= 0.0) { if (Dot(r_bar, r_bar) > 0.0 && print_options.warnings) @@ -348,7 +337,7 @@ void BPCGSolver::Mult(const Vector &b, Vector &x) const if (print_options.first_and_last && !print_options.iterations) { - mfem::out << " Iteration : " << setw(3) << final_iter << " (B r, r) = " + mfem::out << " Iteration : " << setw(3) << final_iter << " (Pr, r) = " << delta << '\n'; } if (print_options.summary || (print_options.warnings && !converged)) diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index 4966b3ed5d..d133ff7ed8 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -21,13 +21,13 @@ // B = -\int_\Omega (div_h u_h) q_h dx, // u_h, v_h \in R_h (Raviart-Thomas finite element space), // q_h \in W_h (piecewise discontinuous polynomials), -// with a block transformation of the form X = AN - Id +// with a block transformation of the form X = A*N - Id // X = [ M*invQ - Id 0 ] // [ B*invQ -Id ] // where N is defined by // N = [ invQ 0 ] // [ 0 0 ] -// and Q is constructed such that Q and M-Q are both s.p.d. +// and Q is constructed such that Q and M-Q are both s.p.d.. // // The solution x is then obtained by solving XAx = Xb with PCG as XA is s.p.d. // From c90d52d32bc168c915837ab3a7bd4102755dadf7 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Mon, 11 Sep 2023 17:58:16 -0700 Subject: [PATCH 029/200] Modify makefile. Minor fixes. - Move assert into ConstructMassPreconditioner - Update makefile --- miniapps/solvers/bramble_pasciak.cpp | 8 ++++---- miniapps/solvers/makefile | 8 +------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 86ac1f7d74..2f2c234d41 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -135,10 +135,10 @@ void BramblePasciakSolver::Init( } HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( - ParBilinearForm &mVarf, double alpha) + ParBilinearForm &mVarf, double q_scaling) { - MFEM_ASSERT((param.q_scaling > 0.0) && (param.q_scaling < 1.0), - "Invalid Q-scaling factor: param.q_scaling " << param.q_scaling ); + MFEM_ASSERT((q_scaling > 0.0) && (q_scaling < 1.0), + "Invalid Q-scaling factor: q_scaling = " << q_scaling ); ParBilinearForm qVarf(mVarf.ParFESpace()); for (int i = 0; i < mVarf.ParFESpace()->GetNE(); ++i) { @@ -153,7 +153,7 @@ HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( // M_i x = ev diag(M_i) x M_i.Eigenvalues(eval, evec); - scaling = alpha*eval.Min(); + scaling = q_scaling*eval.Min(); diag_i.Set(scaling, diag_i); Q_i.Diag(diag_i.GetData(), diag_i.Size()); qVarf.AssembleElementMatrix(i, Q_i, 1); diff --git a/miniapps/solvers/makefile b/miniapps/solvers/makefile index cd42df48a2..8cce95b081 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/makefile @@ -21,10 +21,7 @@ CONFIG_MK = $(MFEM_BUILD_DIR)/config/config.mk MFEM_LIB_FILE = mfem_is_not_built -include $(CONFIG_MK) -DARCY_SOLVERS_SRC = darcy_solver.cpp -DARCY_SOLVERS_OBJ = $(DARCY_SOLVERS_SRC:.cpp=.o) - -BLOCK_SOLVERS_SRC = bramble_pasciak.cpp div_free_solver.cpp block-solvers.cpp +BLOCK_SOLVERS_SRC = block-solvers.cpp darcy_solver.cpp bramble_pasciak.cpp div_free_solver.cpp BLOCK_SOLVERS_OBJ = $(BLOCK_SOLVERS_SRC:.cpp=.o) SEQ_MINIAPPS = lor_solvers @@ -56,9 +53,6 @@ plor_solvers.o: $(SRC)lor_mms.hpp block-solvers: $(BLOCK_SOLVERS_OBJ) $(MFEM_CXX) $(MFEM_LINK_FLAGS) -o $@ $(BLOCK_SOLVERS_OBJ) $(MFEM_LIBS) -$(BLOCK_SOLVERS_OBJ): $(DARCY_SOLVERS_OBJ) - $(MFEM_CXX) $(MFEM_FLAGS) -c $(BLOCK_SOLVERS_SRC) $< -o $@ - %.o: $(SRC)%.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) $(MFEM_CXX) $(MFEM_FLAGS) -c $< -o $@ From ffb58713b1b315f29e6da3dc5cfb2eb9e5883bdf Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Tue, 12 Sep 2023 10:32:13 -0700 Subject: [PATCH 030/200] Small change to SumOperator constructor. - To decide if we can add two iterative solvers. --- linalg/operator.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/linalg/operator.cpp b/linalg/operator.cpp index 8cd9085d2f..8ef121ec04 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -369,7 +369,7 @@ 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), alpha(alpha), B(B), beta(beta), ownA(ownA), ownB(ownB), + A(A), B(B), alpha(alpha), beta(beta), ownA(ownA), ownB(ownB), a(A->Width()), b(B->Width()) { MFEM_VERIFY(A->Width() == B->Width(), @@ -380,18 +380,22 @@ SumOperator::SumOperator(const Operator *A, const double alpha, "incompatible Operators: different heights\n" << "A->Height() = " << A->Height() << ", B->Height() = " << B->Height() ); - /* - * TODO - * I think the operators can be iterative, as there is no composition but addition... + /* * { + * 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 ProductOperator should not be in iterative mode"); + * "Operator B of a SumOperator should not be in iterative mode"); * } * } - */ + */ } SumOperator::~SumOperator() From 0ec2ea20dee884aed458df7238d0e596c49b9a99 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Tue, 12 Sep 2023 10:52:09 -0700 Subject: [PATCH 031/200] Make style. --- linalg/operator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linalg/operator.cpp b/linalg/operator.cpp index 8ef121ec04..2ec7c755b9 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -380,7 +380,7 @@ SumOperator::SumOperator(const Operator *A, const double alpha, "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); From 26a6c3c7355a425149c293beec840ef6fb540263 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Tue, 12 Sep 2023 12:05:08 -0700 Subject: [PATCH 032/200] Update tests options in makefiles. --- miniapps/solvers/CMakeLists.txt | 4 ++-- miniapps/solvers/makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/miniapps/solvers/CMakeLists.txt b/miniapps/solvers/CMakeLists.txt index 6635f49638..da8418e5af 100644 --- a/miniapps/solvers/CMakeLists.txt +++ b/miniapps/solvers/CMakeLists.txt @@ -26,13 +26,13 @@ if (MFEM_USE_MPI) add_test(NAME block-solvers-constant_np${MFEM_MPI_NP} COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} ${MPIEXEC_PREFLAGS} - $ -r 2 -no-vis + $ -sr 1 -pr 1 -no-vis ${MPIEXEC_POSTFLAGS}) add_test(NAME block-solvers-anisotropic_np${MFEM_MPI_NP} COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} ${MPIEXEC_PREFLAGS} - $ -r 2 + $ -sr 1 -pr 1 -m ${CMAKE_CURRENT_SOURCE_DIR}/anisotropic.mesh -c ${CMAKE_CURRENT_SOURCE_DIR}/anisotropic.coeff -eb ${CMAKE_CURRENT_SOURCE_DIR}/anisotropic.brd diff --git a/miniapps/solvers/makefile b/miniapps/solvers/makefile index 8cce95b081..ce9cb09c1d 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/makefile @@ -63,9 +63,9 @@ include $(MFEM_TEST_MK) RUN_MPI = $(MFEM_MPIEXEC) $(MFEM_MPIEXEC_NP) $(MFEM_MPI_NP) block-solvers-test-par: block-solvers-constant block-solvers-anisotropic block-solvers-constant: block-solvers - @$(call mfem-test,$<, $(RUN_MPI), BlockSolver miniapp,-r 2) + @$(call mfem-test,$<, $(RUN_MPI), BlockSolver miniapp,-sr 1 -pr 1) block-solvers-anisotropic: block-solvers - @$(call mfem-test,$<, $(RUN_MPI), BlockSolver miniapp,-r 2\ + @$(call mfem-test,$<, $(RUN_MPI), BlockSolver miniapp,-sr 1 -pr 1\ -m $(SRC)anisotropic.mesh -c $(SRC)anisotropic.coeff\ -eb $(SRC)anisotropic.bdr) lor_solvers-test-seq: lor_solvers From bfcb60ccec4292d7d8207518ca5d0b32a35aced5 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Tue, 12 Sep 2023 12:59:44 -0700 Subject: [PATCH 033/200] Override SetPreconditioner. --- miniapps/solvers/bramble_pasciak.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index d133ff7ed8..26adce41fd 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -90,7 +90,7 @@ public: virtual void SetOperator(const Operator &op) { IterativeSolver::SetOperator(op); UpdateVectors(); } - virtual void SetPreconditioner(const Operator &pc) + virtual void SetPreconditioner(Solver &pc) { if (Mpi::Root()) { MFEM_WARNING("SetPreconditioner does NO effect to BPCGSolver.\n"); } } virtual void SetIncompletePreconditioner(const Operator &ipc) From 41131c3e0c9b9ceabe2dc25136f4c721d5786dad Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Tue, 12 Sep 2023 13:42:36 -0700 Subject: [PATCH 034/200] Remove unused varaible in BramblePasciakSolver --- miniapps/solvers/bramble_pasciak.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index 26adce41fd..b73434ff6e 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -132,7 +132,7 @@ class BramblePasciakSolver : public DarcySolver ProductOperator *mop_; SumOperator *map_; ProductOperator *ppc_; - BlockDiagonalPreconditioner *cpc_, *hpc_; + BlockDiagonalPreconditioner *cpc_; std::unique_ptr M_; std::unique_ptr B_; std::unique_ptr Q_; From 08b87fd9fe5bb3daa9d1836033d5b4618252493e Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Tue, 12 Sep 2023 14:15:12 -0700 Subject: [PATCH 035/200] Disable iterative mode in SumOperator --- linalg/operator.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/linalg/operator.cpp b/linalg/operator.cpp index 2ec7c755b9..c7ebd3ed58 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -380,22 +380,22 @@ SumOperator::SumOperator(const Operator *A, const double alpha, "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"); - * } - * } - */ + + { + 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() From 9d2c4c899ca6cb3c5c83e5ac71c3b8f4a00775bb Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Wed, 13 Sep 2023 10:30:04 -0700 Subject: [PATCH 036/200] Use MFEM_USE_LAPACK macro. --- miniapps/solvers/block-solvers.cpp | 6 ++++++ miniapps/solvers/bramble_pasciak.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index 96fe58b97e..a84d7526e7 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -380,6 +380,7 @@ int main(int argc, char *argv[]) DivFreeSolver dfs_cm(M, B, DFS_data); setup_time[&dfs_cm] = chrono.RealTime(); +#ifdef MFEM_USE_LAPACK ResetTimer(); BramblePasciakSolver bp_bpcg(darcy.GetMform(), darcy.GetBform(), bps_param); setup_time[&bp_bpcg] = chrono.RealTime(); @@ -388,13 +389,18 @@ int main(int argc, char *argv[]) bps_param.use_bpcg = false; BramblePasciakSolver bp_pcg(darcy.GetMform(), darcy.GetBform(), bps_param); setup_time[&bp_pcg] = chrono.RealTime(); +#else + MFEM_WARNING("BramblePasciakSolver class unavailable: Compiled without LAPACK"); +#endif std::map solver_to_name; solver_to_name[&bdp] = "Block-diagonal-preconditioned MINRES"; solver_to_name[&dfs_dm] = "Divergence free (decoupled mode)"; solver_to_name[&dfs_cm] = "Divergence free (coupled mode)"; +#ifdef MFEM_USE_LAPACK solver_to_name[&bp_bpcg] = "Bramble Pasciak CG (using BPCG)"; solver_to_name[&bp_pcg] = "Bramble Pasciak CG (using regular PCG)"; +#endif // Solve the problem using all solvers for (const auto& solver_pair : solver_to_name) diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 2f2c234d41..f5245187f3 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -137,6 +137,7 @@ void BramblePasciakSolver::Init( HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( ParBilinearForm &mVarf, double q_scaling) { +#ifdef MFEM_USE_LAPACK MFEM_ASSERT((q_scaling > 0.0) && (q_scaling < 1.0), "Invalid Q-scaling factor: q_scaling = " << q_scaling ); ParBilinearForm qVarf(mVarf.ParFESpace()); @@ -160,6 +161,11 @@ HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( } qVarf.Finalize(); return qVarf.ParallelAssemble(); +#else + MFEM_CONTRACT_VAR(mVarf); + MFEM_CONTRACT_VAR(q_scaling); + mfem_error("BramblePasciakSolver::ConstructMassPreconditioner: Compiled without LAPACK"); +#endif } void BramblePasciakSolver::Mult(const Vector & x, Vector & y) const From 84a248e42c3187aa69be763eab41ee5e56e1e17b Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Wed, 13 Sep 2023 11:55:33 -0700 Subject: [PATCH 037/200] Add return nullptr --- miniapps/solvers/bramble_pasciak.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index f5245187f3..1f043982b9 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -165,6 +165,7 @@ HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( MFEM_CONTRACT_VAR(mVarf); MFEM_CONTRACT_VAR(q_scaling); mfem_error("BramblePasciakSolver::ConstructMassPreconditioner: Compiled without LAPACK"); + return nullptr; #endif } From 1364914e7da4b62c122077a5142f2cd6bda77dc3 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Wed, 13 Sep 2023 12:22:42 -0700 Subject: [PATCH 038/200] Small fix. Use MFEM_LAPACK macro. --- miniapps/solvers/block-solvers.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index a84d7526e7..70848a2cff 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -264,7 +264,9 @@ int main(int argc, char *argv[]) bool visualization = false; DFSParameters param; +#ifdef MFEM_USE_LAPACK BPSParameters bps_param; +#endif OptionsParser args(argc, argv); args.AddOption(&mesh_file, "-m", "--mesh", From 082dbe45d4ad35d33104849b41ec1ac45958297e Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 20 Sep 2023 11:48:53 -0700 Subject: [PATCH 039/200] Add QuadratureSpaceBase::GetWeights --- fem/qspace.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ fem/qspace.hpp | 12 ++++++++++++ 2 files changed, 60 insertions(+) diff --git a/fem/qspace.cpp b/fem/qspace.cpp index 75df187d8c..af9cd22acd 100644 --- a/fem/qspace.cpp +++ b/fem/qspace.cpp @@ -10,6 +10,7 @@ // CONTRIBUTING.md for details. #include "qspace.hpp" +#include "../general/forall.hpp" namespace mfem { @@ -35,6 +36,31 @@ void QuadratureSpaceBase::ConstructIntRules(int dim) } } +void QuadratureSpaceBase::ConstructWeights() const +{ + // First get the Jacobian determinants (without the quadrature weight + // contributions). + weights = GetGeometricFactorWeights(); + + // Then scale by the quadrature weights. + const IntegrationRule &ir = GetIntRule(0); + const int N = 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]; + }); +} + +const Vector &QuadratureSpaceBase::GetWeights() const +{ + if (weights.Size() == 0) { ConstructWeights(); } + return weights; +} + void QuadratureSpace::ConstructOffsets() { const int num_elem = mesh.GetNE(); @@ -94,6 +120,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_), @@ -168,4 +205,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 0647aababc..fd3ec9338a 100644 --- a/fem/qspace.hpp +++ b/fem/qspace.hpp @@ -29,6 +29,7 @@ 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. /// @brief Entity quadrature point offset array, of size num_entities + 1. /// @@ -49,6 +50,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; } @@ -84,6 +91,9 @@ 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; + virtual ~QuadratureSpaceBase() { } }; @@ -92,6 +102,7 @@ public: class QuadratureSpace : public QuadratureSpaceBase { protected: + const Vector &GetGeometricFactorWeights() const override; void ConstructOffsets(); void Construct(); public: @@ -143,6 +154,7 @@ class FaceQuadratureSpace : public QuadratureSpaceBase /// Map from boundary or interior face indices to mesh face indices. Array face_indices; + const Vector &GetGeometricFactorWeights() const override; void ConstructOffsets(); void Construct(); From dda1002ff10febdd3faeeec6c922e036f90c02b7 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 20 Sep 2023 11:48:58 -0700 Subject: [PATCH 040/200] Add QuadratureFunction::Integrate --- fem/qfunction.cpp | 6 ++++++ fem/qfunction.hpp | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/fem/qfunction.cpp b/fem/qfunction.cpp index f22954cc1a..b022511545 100644 --- a/fem/qfunction.cpp +++ b/fem/qfunction.cpp @@ -240,4 +240,10 @@ void QuadratureFunction::SaveVTU(const std::string &filename, VTKFormat format, SaveVTU(f, format, compression_level, field_name); } +double QuadratureFunction::Integrate() const +{ + MFEM_VERIFY(vdim == 1, "Only scalar functions are supported.") + return (*this)*qspace->GetWeights(); +} + } diff --git a/fem/qfunction.hpp b/fem/qfunction.hpp index 1b4f19f637..a48dcc3578 100644 --- a/fem/qfunction.hpp +++ b/fem/qfunction.hpp @@ -195,6 +195,10 @@ 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; + virtual ~QuadratureFunction() { if (own_qspace) { delete qspace; } From 87116854946be1b4a83e7b6de31b36576ebd1f5b Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 20 Sep 2023 11:49:07 -0700 Subject: [PATCH 041/200] Add QuadratureFunction::Integrate unit tests --- tests/unit/fem/test_quadf_coef.cpp | 57 ++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/tests/unit/fem/test_quadf_coef.cpp b/tests/unit/fem/test_quadf_coef.cpp index a32f0b86de..5e71e11372 100644 --- a/tests/unit/fem/test_quadf_coef.cpp +++ b/tests/unit/fem/test_quadf_coef.cpp @@ -17,8 +17,7 @@ using namespace mfem; namespace qf_coeff { -TEST_CASE("Quadrature Function Coefficients", - "[Quadrature Function Coefficients]") +TEST_CASE("Quadrature Function Coefficients", "[QuadratureFunctionCoefficient]") { int order_h1 = 2, n = 4, dim = 3; double tol = 1e-14; @@ -35,7 +34,7 @@ TEST_CASE("Quadrature Function Coefficients", REQUIRE(quadf_coeff.UseDevice()); - const IntegrationRule ir = qspace.GetElementIntRule(0); + const IntegrationRule &ir = qspace.GetElementIntRule(0); const GeometricFactors *geom_facts = mesh.GetGeometricFactors(ir, GeometricFactors::COORDINATES); @@ -154,7 +153,59 @@ TEST_CASE("Quadrature Function Coefficients", REQUIRE(output.Norml2() < tol); } +} +TEST_CASE("Quadrature Function Integration", "[QuadratureFunctionCoefficient]") +{ + auto fname = GENERATE( + "../../data/star.mesh", + "../../data/star-q3.mesh", + "../../data/fichera.mesh", + "../../data/fichera-q3.mesh" + ); + const int order = GENERATE(1, 2, 3); + + Mesh mesh = Mesh::LoadFromFile(fname); + L2_FECollection fec(0, mesh.Dimension()); + FiniteElementSpace fes(&mesh, &fec); + + int int_order = 2*order + 1; + + SECTION("QuadratureSpace") + { + QuadratureSpace qs(&mesh, int_order); + const IntegrationRule &ir = qs.GetIntRule(0); + + QuadratureFunction qf(qs); + qf.Randomize(1); + QuadratureFunctionCoefficient qf_coeff(qf); + + LinearForm lf(&fes); + lf.AddDomainIntegrator(new DomainLFIntegrator(qf_coeff, &ir)); + lf.Assemble(); + const double integ_1 = lf.Sum(); + const double integ_2 = qf.Integrate(); + REQUIRE(integ_1 == MFEM_Approx(integ_2)); + } + + SECTION("FaceQuadratureSpace") + { + FaceQuadratureSpace qs(mesh, int_order, FaceType::Boundary); + const IntegrationRule &ir = qs.GetIntRule(0); + + QuadratureFunction qf(qs); + qf.Randomize(1); + QuadratureFunctionCoefficient qf_coeff(qf); + + LinearForm lf(&fes); + auto *integ = new BoundaryLFIntegrator(qf_coeff); + integ->SetIntRule(&ir); + lf.AddDomainIntegrator(integ); + lf.Assemble(); + const double integ_1 = lf.Sum(); + const double integ_2 = qf.Integrate(); + REQUIRE(integ_1 == MFEM_Approx(integ_2)); + } } } // namespace qf_coeff From 6cb689d6bdd3dec5b1e0f9d18c6a061f0f62f709 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Mon, 9 Oct 2023 13:50:47 -0600 Subject: [PATCH 042/200] make ordering part of the doftoquad map --- fem/fe/fe_base.cpp | 49 ++++++++++++++++++++- fem/fe/fe_base.hpp | 28 +++++++++++- fem/fespace.hpp | 14 ------ fem/integ/bilininteg_elasticity_kernels.hpp | 1 - fem/integ/bilininteg_elasticity_pa.cpp | 4 +- 5 files changed, 78 insertions(+), 18 deletions(-) diff --git a/fem/fe/fe_base.cpp b/fem/fe/fe_base.cpp index ded2ffc9c1..29717a80d5 100644 --- a/fem/fe/fe_base.cpp +++ b/fem/fe/fe_base.cpp @@ -367,10 +367,11 @@ const DofToQuad &FiniteElement::GetDofToQuad(const IntegrationRule &ir, { MFEM_VERIFY(mode == DofToQuad::FULL, "invalid mode requested"); + ElementDofOrdering ordering = ElementDofOrdering::NATIVE; 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 (d2q.IntRule == &ir && d2q.mode == mode && d2q.ordering == ordering) { return d2q; } } #ifdef MFEM_THREAD_SAFE @@ -491,6 +492,14 @@ const DofToQuad &FiniteElement::GetDofToQuad(const IntegrationRule &ir, return *d2q; } +const DofToQuad &FiniteElement::GetDofToQuad(const IntegrationRule &ir, + DofToQuad::Mode mode, + const ElementDofOrdering ordering) const +{ + MFEM_ABORT("method is not implemented for this element"); + return GetDofToQuad(ir, mode); +} + void FiniteElement::GetFaceMap(const int face_id, Array &face_map) const { @@ -2521,6 +2530,44 @@ void NodalTensorFiniteElement::SetMapType(const int map_type) } } +const DofToQuad &NodalTensorFiniteElement::GetDofToQuad( + const IntegrationRule &ir, + DofToQuad::Mode mode, + const ElementDofOrdering ordering) const +{ + for (int i = 0; i < dof2quad_array.Size(); i++) + { + const DofToQuad &d2q = *dof2quad_array[i]; + if (d2q.IntRule == &ir && d2q.mode == mode && d2q.ordering == ordering) { return d2q; } + } + auto &d2q = GetDofToQuad(ir, mode); + if (mode == DofToQuad::Mode::FULL && + ordering == ElementDofOrdering::LEXICOGRAPHIC) + { + //Undo the native ordering which is the default in GetDofToQuad for FULL mode. + auto *d2q_new = new DofToQuad(d2q); + d2q_new->ordering = ElementDofOrdering::LEXICOGRAPHIC; + const int nqpt = ir.GetNPoints(); + for (int i = 0; i < nqpt; i++) + { + for (int d = 0; d < dim; d++) + { + for (int j = 0; j < dof; j++) + { + d2q_new->G[i+nqpt*(d+dim*j)] = d2q_new->Gt[j+dof*(i+nqpt*d)] = d2q.G[i+nqpt* + (d+dim*dof_map[j])]; + } + } + } + dof2quad_array.Append(d2q_new); + return *d2q_new; + } + else + { + return d2q; + } +} + 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 73b948ce9a..f0c5f0d1a3 100644 --- a/fem/fe/fe_base.hpp +++ b/fem/fe/fe_base.hpp @@ -20,7 +20,6 @@ namespace mfem { - /// Possible basis types. Note that not all elements can use all BasisType(s). class BasisType { @@ -128,6 +127,19 @@ public: } }; +/// Constants describing the possible orderings of the DOFs in one element. +enum class ElementDofOrdering +{ + /// Native ordering as defined by the FiniteElement. + /** This ordering can be used by tensor-product elements when the + interpolation from the DOFs to quadrature points does not use the + tensor-product structure. */ + NATIVE, + /// Lexicographic ordering for tensor-product FiniteElements. + /** This ordering can be used only with tensor-product elements. */ + LEXICOGRAPHIC +}; + /** @brief Structure representing the matrices/tensors needed to evaluate (in reference space) the values, gradients, divergences, or curls of a FiniteElement at a the quadrature points of a given IntegrationRule. */ @@ -164,6 +176,9 @@ public: /// Describes the contents of the #B, #Bt, #G, and #Gt arrays, see #Mode. Mode mode; + /// Describes the contents of the #B, #Bt, #G, and #Gt arrays. + ElementDofOrdering ordering; + /** @brief Number of degrees of freedom = number of basis functions. When #mode is TENSOR, this is the 1D number. */ int ndof; @@ -577,6 +592,13 @@ public: virtual const DofToQuad &GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode) const; + /** @brief Return a DofToQuad structure corresponding to the given + IntegrationRule using the given DofToQuad::Mode and ElementDofOrdering. */ + /** See the documentation for DofToQuad and ElementDofOrdering for more details. + TODO - make this a reference again.*/ + virtual const DofToQuad &GetDofToQuad(const IntegrationRule &ir, + DofToQuad::Mode mode, + const ElementDofOrdering ordering) const; /** @brief Return the mapping from lexicographic face DOFs to lexicographic element DOFs for the given local face @a face_id. */ @@ -1255,6 +1277,10 @@ public: GetTensorDofToQuad(*this, ir, mode, basis1d, true, dof2quad_array); } + const DofToQuad &GetDofToQuad(const IntegrationRule &ir, + DofToQuad::Mode mode, + const ElementDofOrdering ordering) const override; + void SetMapType(const int map_type_) override; void GetTransferMatrix(const FiniteElement &fe, diff --git a/fem/fespace.hpp b/fem/fespace.hpp index 453519fda2..193cd2e508 100644 --- a/fem/fespace.hpp +++ b/fem/fespace.hpp @@ -69,20 +69,6 @@ Ordering::Map(int ndofs, int vdim, int dof, int vd) return (dof >= 0) ? vd+vdim*dof : -1-(vd+vdim*(-1-dof)); } - -/// Constants describing the possible orderings of the DOFs in one element. -enum class ElementDofOrdering -{ - /// Native ordering as defined by the FiniteElement. - /** This ordering can be used by tensor-product elements when the - interpolation from the DOFs to quadrature points does not use the - tensor-product structure. */ - NATIVE, - /// Lexicographic ordering for tensor-product FiniteElements. - /** This ordering can be used only with tensor-product elements. */ - LEXICOGRAPHIC -}; - // Forward declarations class NURBSExtension; class BilinearFormIntegrator; diff --git a/fem/integ/bilininteg_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp index bd94612509..58c9daf7ae 100644 --- a/fem/integ/bilininteg_elasticity_kernels.hpp +++ b/fem/integ/bilininteg_elasticity_kernels.hpp @@ -145,7 +145,6 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, const auto &ir = lambda.GetIntRule(0); const QuadratureInterpolator *E_To_Q_Map = fespace.GetQuadratureInterpolator( ir); - E_To_Q_Map->DisableTensorProducts(); E_To_Q_Map->SetOutputLayout(QVectorLayout::byNODES); //interpolate physical derivatives to quadrature points. Vector junk; diff --git a/fem/integ/bilininteg_elasticity_pa.cpp b/fem/integ/bilininteg_elasticity_pa.cpp index 3db2a4d5a5..6a1247dc22 100644 --- a/fem/integ/bilininteg_elasticity_pa.cpp +++ b/fem/integ/bilininteg_elasticity_pa.cpp @@ -53,7 +53,9 @@ void ElasticityIntegrator::AssemblePA(const FiniteElementSpace &fes) q_vec = std::make_shared(*quad_space, vdim*vdim); lambda->Project(*lambda_quad); mu->Project(*mu_quad); - maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, DofToQuad::FULL); + auto ordering = UsesTensorBasis(*fespace) ? ElementDofOrdering::LEXICOGRAPHIC : + ElementDofOrdering::NATIVE; + maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, DofToQuad::FULL, ordering); } PACalled = true; } From 9d65c08c776f8fd86c9be04e813ae00556cd0bdb Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Mon, 9 Oct 2023 14:21:59 -0600 Subject: [PATCH 043/200] reverting some changes to bilinear form infrastructure --- fem/bilinearform.cpp | 7 ------- fem/bilinearform.hpp | 10 ---------- fem/bilinearform_ext.cpp | 14 +------------- fem/bilinearform_ext.hpp | 3 --- fem/fe/fe_base.cpp | 2 +- miniapps/solvers/lor_elast.cpp | 5 ----- 6 files changed, 2 insertions(+), 39 deletions(-) diff --git a/fem/bilinearform.cpp b/fem/bilinearform.cpp index 17298a6875..6eae233bcd 100644 --- a/fem/bilinearform.cpp +++ b/fem/bilinearform.cpp @@ -113,13 +113,6 @@ BilinearForm::BilinearForm (FiniteElementSpace * f, BilinearForm * bf, int ps) AllocMat(); } -void BilinearForm::ExtUseTensorBasis(const bool use_tensor_basis) -{ - MFEM_VERIFY(ext, - "Extension is NULL. Set AssemblyLevel to something besides LEGACY first."); - ext->UseTensorBasis(use_tensor_basis); -} - void BilinearForm::SetAssemblyLevel(AssemblyLevel assembly_level) { if (ext) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 1483ff9595..58e9890ec0 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -199,16 +199,6 @@ public: sort_sparse_matrix = enable_it; } - /** @brief Whether or not to allow tensor basis, if available, in the - * extension. - * - * By default, the element restriction operators in PABilinearFormExtension - * will use the tensor basis ordering if the elements are tensor elements. - * This option disables that. assembly must have been set to something - * besides AssemblyLevel::LEGACY before calling this. - */ - void ExtUseTensorBasis(const bool use_tensor_basis); - /// Returns the assembly level AssemblyLevel GetAssemblyLevel() const { return assembly; } diff --git a/fem/bilinearform_ext.cpp b/fem/bilinearform_ext.cpp index d4c8908178..04bb6a404d 100644 --- a/fem/bilinearform_ext.cpp +++ b/fem/bilinearform_ext.cpp @@ -255,8 +255,7 @@ PABilinearFormExtension::PABilinearFormExtension(BilinearForm *form) void PABilinearFormExtension::SetupRestrictionOperators(const L2FaceValues m) { if ( Device::Allows(Backend::CEED_MASK) ) { return; } - ElementDofOrdering ordering = UsesTensorBasis(*a->FESpace()) && - use_tensor_basis ? + ElementDofOrdering ordering = UsesTensorBasis(*a->FESpace())? ElementDofOrdering::LEXICOGRAPHIC: ElementDofOrdering::NATIVE; elem_restrict = trial_fes->GetElementRestriction(ordering); @@ -444,11 +443,6 @@ void PABilinearFormExtension::Update() bdr_face_restrict_lex = nullptr; } -void BilinearFormExtension::UseTensorBasis(const bool use_tensor_basis_) -{ - use_tensor_basis = use_tensor_basis_; -} - void PABilinearFormExtension::FormSystemMatrix(const Array &ess_tdof_list, OperatorHandle &A) { @@ -1046,12 +1040,6 @@ FABilinearFormExtension::FABilinearFormExtension(BilinearForm *form) void FABilinearFormExtension::Assemble() { - //Not having any domain integrators currently causes a seg fault in mfem::ElementRestriction::FillJAndData, - //so verify at least on domain integrator is present. - Array &integrators = *a->GetDBFI(); - const int integratorCount = integrators.Size(); - MFEM_VERIFY(integratorCount > 0, - "Full Assembly requires at least one domain integrator."); EABilinearFormExtension::Assemble(); FiniteElementSpace &fes = *a->FESpace(); int width = fes.GetVSize(); diff --git a/fem/bilinearform_ext.hpp b/fem/bilinearform_ext.hpp index 8de859fbdb..97334aa46b 100644 --- a/fem/bilinearform_ext.hpp +++ b/fem/bilinearform_ext.hpp @@ -33,7 +33,6 @@ class BilinearFormExtension : public Operator { protected: BilinearForm *a; ///< Not owned - bool use_tensor_basis = true; public: BilinearFormExtension(BilinearForm *form); @@ -62,8 +61,6 @@ public: OperatorHandle &A, Vector &X, Vector &B, int copy_interior = 0) = 0; virtual void Update() = 0; - /** @brief Whether or not ext will use tensor basis, if available.*/ - void UseTensorBasis(const bool use_tensor_basis_); }; /// Data and methods for partially-assembled bilinear forms diff --git a/fem/fe/fe_base.cpp b/fem/fe/fe_base.cpp index 29717a80d5..63da7e4428 100644 --- a/fem/fe/fe_base.cpp +++ b/fem/fe/fe_base.cpp @@ -496,7 +496,7 @@ const DofToQuad &FiniteElement::GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode, const ElementDofOrdering ordering) const { - MFEM_ABORT("method is not implemented for this element"); + MFEM_VERIFY(ordering == ElementDofOrdering::NATIVE, "invalid mode requested"); return GetDofToQuad(ir, mode); } diff --git a/miniapps/solvers/lor_elast.cpp b/miniapps/solvers/lor_elast.cpp index fa9b00c3ad..09e1cdca9b 100644 --- a/miniapps/solvers/lor_elast.cpp +++ b/miniapps/solvers/lor_elast.cpp @@ -250,8 +250,6 @@ int main(int argc, char *argv[]) { a.SetAssemblyLevel( AssemblyLevel::PARTIAL); - a.ExtUseTensorBasis(false); - a.ExtUseTensorBasis(false); } a.AddDomainIntegrator(&integrator); a.UseExternalIntegrators(); @@ -330,7 +328,6 @@ int main(int argc, char *argv[]) (block->GetFESpace()));//If get fespace was part of bilinear form, wouldn't need static_cast above. bilinear_forms.emplace_back(new ParBilinearForm(fes_block)); bilinear_forms[j]->SetAssemblyLevel(AssemblyLevel::FULL); - bilinear_forms[j]->ExtUseTensorBasis(false); bilinear_forms[j]->EnableSparseMatrixSorting(Device::IsEnabled()); bilinear_forms[j]->AddDomainIntegrator(block); bilinear_forms[j]->Assemble(); @@ -365,7 +362,6 @@ int main(int argc, char *argv[]) pa_components.emplace_back(new ParBilinearForm(action_fes_block)); pa_components[i + dim*j]->SetAssemblyLevel(pa ? AssemblyLevel::PARTIAL : AssemblyLevel::FULL); - pa_components[i + dim*j]->ExtUseTensorBasis(false); pa_components[i + dim*j]->EnableSparseMatrixSorting(Device::IsEnabled()); pa_components[i + dim*j]->AddDomainIntegrator(action_block); pa_components[i + dim*j]->Assemble(); @@ -386,7 +382,6 @@ int main(int argc, char *argv[]) fes_block->GetEssentialTrueDofs(ess_bdr_block_ho, ess_tdof_list_block_ho); ho_bilinear_form_blocks.emplace_back(new ParBilinearForm(fes_block)); ho_bilinear_form_blocks[i]->SetAssemblyLevel(AssemblyLevel::PARTIAL); - ho_bilinear_form_blocks[i]->ExtUseTensorBasis(false); ho_bilinear_form_blocks[i]->AddDomainIntegrator(block); ho_bilinear_form_blocks[i]->Assemble(); const auto *prolong = fes_block->GetProlongationMatrix(); From 44b34f5e64fd4f7cb1e31b6ebb535617e953dc0d Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Mon, 9 Oct 2023 16:14:48 -0600 Subject: [PATCH 044/200] reverted changes to operator and blockoperator to simplify pr --- linalg/blockoperator.cpp | 55 +++++---------------- linalg/blockoperator.hpp | 5 +- linalg/operator.cpp | 34 ++----------- linalg/operator.hpp | 7 --- miniapps/solvers/block_fespace_operator.cpp | 14 +++++- miniapps/solvers/block_fespace_operator.hpp | 21 ++++++-- 6 files changed, 48 insertions(+), 88 deletions(-) diff --git a/linalg/blockoperator.cpp b/linalg/blockoperator.cpp index b77f3659fa..62c9935f0a 100644 --- a/linalg/blockoperator.cpp +++ b/linalg/blockoperator.cpp @@ -18,8 +18,7 @@ namespace mfem { -BlockOperator::BlockOperator(const Array & offsets, - const bool owns_offsets) +BlockOperator::BlockOperator(const Array & offsets) : Operator(offsets.Last()), owns_blocks(0), nRowBlocks(offsets.Size() - 1), @@ -30,21 +29,12 @@ BlockOperator::BlockOperator(const Array & offsets, coef(nRowBlocks, nColBlocks) { op = static_cast(NULL); - if (owns_offsets) - { - row_offsets = offsets; - col_offsets = offsets; - } - else - { - row_offsets.MakeRef(offsets); - col_offsets.MakeRef(offsets); - } + row_offsets.MakeRef(offsets); + col_offsets.MakeRef(offsets); } BlockOperator::BlockOperator(const Array & row_offsets_, - const Array & col_offsets_, - const bool owns_offsets) + const Array & col_offsets_) : Operator(row_offsets_.Last(), col_offsets_.Last()), owns_blocks(0), nRowBlocks(row_offsets_.Size()-1), @@ -55,16 +45,8 @@ BlockOperator::BlockOperator(const Array & row_offsets_, coef(nRowBlocks, nColBlocks) { op = static_cast(NULL); - if (owns_offsets) - { - row_offsets = row_offsets_; - col_offsets = col_offsets_; - } - else - { - row_offsets.MakeRef(row_offsets_); - col_offsets.MakeRef(col_offsets_); - } + row_offsets.MakeRef(row_offsets_); + col_offsets.MakeRef(col_offsets_); } void BlockOperator::SetDiagonalBlock(int iblock, Operator *opt, double c) @@ -300,11 +282,10 @@ void BlockLowerTriangularPreconditioner::Mult (const Vector & x, MFEM_ASSERT(x.Size() == width, "incorrect input Vector size"); MFEM_ASSERT(y.Size() == height, "incorrect output Vector size"); - x.Read(); - y.ReadWrite(); y = 0.0; - xblock.Update(const_cast(x),offsets); - yblock.Update(y,offsets); + yblock.Update(y.GetData(),offsets); + xblock.Update(x.GetData(),offsets); + y = 0.0; for (int iRow=0; iRow < nBlocks; ++iRow) { tmp.SetSize(offsets[iRow+1] - offsets[iRow]); @@ -328,11 +309,6 @@ void BlockLowerTriangularPreconditioner::Mult (const Vector & x, yblock.GetBlock(iRow) = tmp2; } } - - for (int i=0; i < nBlocks; ++i) - { - yblock.GetBlock(i).SyncAliasMemory(y); - } } // Action of the transpose operator @@ -342,11 +318,10 @@ void BlockLowerTriangularPreconditioner::MultTranspose (const Vector & x, MFEM_ASSERT(x.Size() == height, "incorrect input Vector size"); MFEM_ASSERT(y.Size() == width, "incorrect output Vector size"); - x.Read(); - y.ReadWrite(); y = 0.0; - xblock.Update(const_cast(x),offsets); - yblock.Update(y,offsets); + yblock.Update(y.GetData(),offsets); + xblock.Update(x.GetData(),offsets); + y = 0.0; for (int iRow=nBlocks-1; iRow >=0; --iRow) { tmp.SetSize(offsets[iRow+1] - offsets[iRow]); @@ -370,12 +345,6 @@ void BlockLowerTriangularPreconditioner::MultTranspose (const Vector & x, yblock.GetBlock(iRow) = tmp2; } } - - for (int i=0; i < nBlocks; ++i) - { - yblock.GetBlock(i).SyncAliasMemory(y); - } - } BlockLowerTriangularPreconditioner::~BlockLowerTriangularPreconditioner() diff --git a/linalg/blockoperator.hpp b/linalg/blockoperator.hpp index 053cf283bb..ca03b493a5 100644 --- a/linalg/blockoperator.hpp +++ b/linalg/blockoperator.hpp @@ -41,7 +41,7 @@ public: * nRowBlocks+1). Note: BlockOperator will not own/copy the data contained * in offsets. */ - BlockOperator(const Array & offsets, const bool owns_offsets = false); + BlockOperator(const Array & offsets); //! Constructor for general BlockOperators. /** * row_offsets: offsets that mark the start of each row block (size @@ -49,8 +49,7 @@ public: * block (size nColBlocks+1). Note: BlockOperator will not own/copy the * data contained in offsets. */ - BlockOperator(const Array & row_offsets, const Array & col_offsets, - const bool owns_offsets = false); + BlockOperator(const Array & row_offsets, const Array & col_offsets); /// Copy assignment is not supported BlockOperator &operator=(const BlockOperator &) = delete; diff --git a/linalg/operator.cpp b/linalg/operator.cpp index f50a838326..1f214ece7a 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -544,20 +544,12 @@ void ConstrainedOperator::EliminateRHS(const Vector &x, Vector &b) const }); } -void ConstrainedOperator::ConstrainedMult(const Vector &x, Vector &y, - const bool transpose) const +void ConstrainedOperator::Mult(const Vector &x, Vector &y) const { const int csz = constraint_list.Size(); if (csz == 0) { - if (transpose) - { - A->MultTranspose(x, y); - } - else - { - A->Mult(x, y); - } + A->Mult(x, y); return; } @@ -568,14 +560,8 @@ void ConstrainedOperator::ConstrainedMult(const Vector &x, Vector &y, auto d_z = z.ReadWrite(); mfem::forall(csz, [=] MFEM_HOST_DEVICE (int i) { d_z[idx[i]] = 0.0; }); - if (transpose) - { - A->MultTranspose(z, y); - } - else - { - A->Mult(z, y); - } + A->Mult(z, y); + auto d_x = x.Read(); // Use read+write access - we are modifying sub-vector of y auto d_y = y.ReadWrite(); @@ -605,18 +591,6 @@ void ConstrainedOperator::ConstrainedMult(const Vector &x, Vector &y, } } -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); -} - RectangularConstrainedOperator::RectangularConstrainedOperator( Operator *A, const Array &trial_list, diff --git a/linalg/operator.hpp b/linalg/operator.hpp index 6f17e772a7..baa9bf7672 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -924,13 +924,6 @@ public: the vectors, and "_i" -- the rest of the entries. */ virtual void Mult(const Vector &x, Vector &y) const; - virtual void MultTranspose(const Vector &x, Vector &y) const; - - /** @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; } } }; diff --git a/miniapps/solvers/block_fespace_operator.cpp b/miniapps/solvers/block_fespace_operator.cpp index e6ff867c8b..e528516646 100644 --- a/miniapps/solvers/block_fespace_operator.cpp +++ b/miniapps/solvers/block_fespace_operator.cpp @@ -5,10 +5,11 @@ namespace mfem BlockFESpaceOperator::BlockFESpaceOperator(const std::vector &fespaces): - BlockOperator(GetBlockOffsets(fespaces),true), + Operator(GetHeight(fespaces)), offsets(GetBlockOffsets(fespaces)), prolongColOffsets(GetProColBlockOffsets(fespaces)), restrictRowOffsets(GetResRowBlockOffsets(fespaces)), + A(offsets), prolongation(offsets,prolongColOffsets), restriction(restrictRowOffsets, offsets) { @@ -23,6 +24,17 @@ BlockFESpaceOperator::BlockFESpaceOperator(const } } +int BlockFESpaceOperator::GetHeight(const std::vector + &fespaces) +{ + int height = 0; + for (size_t i = 0; i < fespaces.size(); i++) + { + height += fespaces[i]->GetVSize(); + } + return height; +} + Array BlockFESpaceOperator::GetBlockOffsets(const std::vector &fespaces) { diff --git a/miniapps/solvers/block_fespace_operator.hpp b/miniapps/solvers/block_fespace_operator.hpp index 1b245d5d39..87b05126fd 100644 --- a/miniapps/solvers/block_fespace_operator.hpp +++ b/miniapps/solvers/block_fespace_operator.hpp @@ -12,17 +12,25 @@ namespace mfem /// conditions for block systems arise from mixing many types of /// finite element spaces. Each block is intended to operate on /// L-Vectors. For example, a block may be a BilinearForm. -class BlockFESpaceOperator : public BlockOperator +class BlockFESpaceOperator : public Operator { private: + /// @brief Offsets for the square "A" operator. Array offsets; + /// @brief Column offsets for the prolongation operator. Array prolongColOffsets; + /// @brief Row offsets for the prolongation operator. Array restrictRowOffsets; + /// @brief The "A" part of "RAP". + BlockOperator A; /// @brief Maps local dofs of each block to true dofs. BlockOperator prolongation; /// @brief Maps true dofs of each block to local dofs. BlockOperator restriction; - /// @brief Computes offsets for parent BlockOperator. + /// @brief Computes height for parent operator. + static int GetHeight(const std::vector + &fespaces); + /// @brief Computes offsets for A BlockOperator. static Array GetBlockOffsets(const std::vector &fespaces); /// @brief Computes col_offsets for prolongation operator. @@ -35,8 +43,13 @@ public: /// @brief Constructor for BlockFESpaceOperator. /// @param[in] fespaces Finite element spaces for diagonal blocks. Spaces are not owned. BlockFESpaceOperator(const std::vector &fespaces); - virtual const Operator* GetProlongation () const; - virtual const Operator* GetRestriction () const; + const Operator* GetProlongation () const override; + const Operator* GetRestriction () const override; + void Mult(const Vector &x, Vector &y) const override {A.Mult(x,y);}; + void SetBlock( int iRow, + int iCol, + Operator * op, + double c = 1.0) {A.SetBlock(iRow, iCol, op, c);}; }; }//namespace mfem From 21b0b8bcf69884a62ec6cfb9161df007dec830bb Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Tue, 10 Oct 2023 06:06:04 -0600 Subject: [PATCH 045/200] added lexicographic full for the rest of the possible element and derivative configurations --- fem/fe/fe_base.cpp | 80 +++++++++++++++++++-- miniapps/solvers/block_fespace_operator.hpp | 3 + 2 files changed, 79 insertions(+), 4 deletions(-) diff --git a/fem/fe/fe_base.cpp b/fem/fe/fe_base.cpp index 63da7e4428..67d13aad87 100644 --- a/fem/fe/fe_base.cpp +++ b/fem/fe/fe_base.cpp @@ -2535,11 +2535,16 @@ const DofToQuad &NodalTensorFiniteElement::GetDofToQuad( DofToQuad::Mode mode, const ElementDofOrdering ordering) const { + MFEM_VERIFY(!(mode == DofToQuad::Mode::TENSOR && + ordering == ElementDofOrdering::NATIVE), + "Invalide combination of DofToQuad::Mode and ElementDofOrdering."); for (int i = 0; i < dof2quad_array.Size(); i++) { const DofToQuad &d2q = *dof2quad_array[i]; if (d2q.IntRule == &ir && d2q.mode == mode && d2q.ordering == ordering) { return d2q; } } + //First create the DofToQuad map for ElementDofOrdering::NATIVE. + //Either return d2q, or create the FULL and LEXICOGRAPHIC map and return. auto &d2q = GetDofToQuad(ir, mode); if (mode == DofToQuad::Mode::FULL && ordering == ElementDofOrdering::LEXICOGRAPHIC) @@ -2548,17 +2553,84 @@ const DofToQuad &NodalTensorFiniteElement::GetDofToQuad( auto *d2q_new = new DofToQuad(d2q); d2q_new->ordering = ElementDofOrdering::LEXICOGRAPHIC; const int nqpt = ir.GetNPoints(); - for (int i = 0; i < nqpt; i++) + + + if (range_type == SCALAR) { - for (int d = 0; d < dim; d++) + for (int i = 0; i < nqpt; i++) { for (int j = 0; j < dof; j++) { - d2q_new->G[i+nqpt*(d+dim*j)] = d2q_new->Gt[j+dof*(i+nqpt*d)] = d2q.G[i+nqpt* - (d+dim*dof_map[j])]; + d2q_new->B[i+nqpt*j] = d2q_new->Bt[j+dof*i] = d2q.B[i+nqpt*dof_map[j]]; } } } + else if (range_type == VECTOR) + { + for (int i = 0; i < nqpt; i++) + { + for (int d = 0; d < dim; d++) + { + for (int j = 0; j < dof; j++) + { + d2q_new->B[i+nqpt*(d+dim*j)] = d2q_new->Bt[j+dof*(i+nqpt*d)] = d2q.B[i+nqpt* + (d+dim*dof_map[j])]; + } + } + } + } + else + { + // Skip B and Bt for unknown range type + } + switch (deriv_type) + { + case GRAD: + { + for (int i = 0; i < nqpt; i++) + { + for (int d = 0; d < dim; d++) + { + for (int j = 0; j < dof; j++) + { + d2q_new->G[i+nqpt*(d+dim*j)] = d2q_new->Gt[j+dof*(i+nqpt*d)] = d2q.G[i+nqpt* + (d+dim*dof_map[j])]; + } + } + } + break; + } + case DIV: + { + for (int i = 0; i < nqpt; i++) + { + for (int j = 0; j < dof; j++) + { + d2q_new->G[i+nqpt*j] = d2q_new->Gt[j+dof*i] = d2q.G[i+nqpt*dof_map[j]]; + } + } + break; + } + case CURL: + { + for (int i = 0; i < nqpt; i++) + { + for (int d = 0; d < cdim; d++) + { + for (int j = 0; j < dof; j++) + { + d2q_new->G[i+nqpt*(d+cdim*j)] = d2q_new->Gt[j+dof*(i+nqpt*d)] = d2q.G[i+nqpt* + (d+cdim*dof_map[j])]; + } + } + } + break; + } + case NONE: + default: + // Skip G and Gt for unknown derivative type + break; + } dof2quad_array.Append(d2q_new); return *d2q_new; } diff --git a/miniapps/solvers/block_fespace_operator.hpp b/miniapps/solvers/block_fespace_operator.hpp index 87b05126fd..260f319c2b 100644 --- a/miniapps/solvers/block_fespace_operator.hpp +++ b/miniapps/solvers/block_fespace_operator.hpp @@ -46,6 +46,9 @@ public: const Operator* GetProlongation () const override; const Operator* GetRestriction () const override; void Mult(const Vector &x, Vector &y) const override {A.Mult(x,y);}; + /// @brief Wraps BlockOperator::SetBlock. Eventually would like this class to inherit + /// from BlockOperator instead, but can't easily due to ownership of offset data + /// in BlockOperator being by reference. void SetBlock( int iRow, int iCol, Operator * op, From 50666e7ed17b61a744f6f91ff02b78ef1b0705b9 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Tue, 17 Oct 2023 20:17:57 -0700 Subject: [PATCH 046/200] Minor corrections. - Change refinement flags. Modify makefiles. - Use ParseCheck() - Some formatting - Remove using namespace statements - Replace ResetTimer with Restart - Remove and clarify some commentaries - Change initialization of offsets_ in DarcySolver - Remove default constructors - Grammar - Modify SumOperator. Rename and remove one vector. --- linalg/operator.cpp | 2 +- linalg/operator.hpp | 6 +++--- miniapps/solvers/CMakeLists.txt | 4 ++-- miniapps/solvers/block-solvers.cpp | 30 +++++++++++----------------- miniapps/solvers/bramble_pasciak.cpp | 2 -- miniapps/solvers/bramble_pasciak.hpp | 12 +---------- miniapps/solvers/darcy_solver.cpp | 2 -- miniapps/solvers/darcy_solver.hpp | 6 +++--- miniapps/solvers/div_free_solver.cpp | 2 -- miniapps/solvers/div_free_solver.hpp | 2 ++ miniapps/solvers/makefile | 4 ++-- 11 files changed, 26 insertions(+), 46 deletions(-) diff --git a/linalg/operator.cpp b/linalg/operator.cpp index c7ebd3ed58..77548ba0cb 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -370,7 +370,7 @@ SumOperator::SumOperator(const Operator *A, const double alpha, bool ownA, bool ownB) : Operator(A->Height(), A->Width()), A(A), B(B), alpha(alpha), beta(beta), ownA(ownA), ownB(ownB), - a(A->Width()), b(B->Width()) + z(A->Width()) { MFEM_VERIFY(A->Width() == B->Width(), "incompatible Operators: different widths\n" diff --git a/linalg/operator.hpp b/linalg/operator.hpp index 1ba218c5ff..1a4747ac6e 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -775,7 +775,7 @@ class SumOperator : public Operator const Operator *A, *B; const double alpha, beta; bool ownA, ownB; - mutable Vector a, b; + mutable Vector z; public: SumOperator( @@ -784,10 +784,10 @@ public: bool ownA, bool ownB); virtual void Mult(const Vector &x, Vector &y) const - { A->Mult(x, a); B->Mult(x, b); add(alpha, a, beta, b, y); } + { A->Mult(x, z); B->Mult(x, y); add(alpha, z, beta, y, y); } virtual void MultTranspose(const Vector &x, Vector &y) const - { A->MultTranspose(x, a); B->MultTranspose(x, b); add(alpha, a, beta, b, y); } + { A->MultTranspose(x, z); B->MultTranspose(x, y); add(alpha, z, beta, y, y); } virtual ~SumOperator(); }; diff --git a/miniapps/solvers/CMakeLists.txt b/miniapps/solvers/CMakeLists.txt index da8418e5af..965975eaee 100644 --- a/miniapps/solvers/CMakeLists.txt +++ b/miniapps/solvers/CMakeLists.txt @@ -26,13 +26,13 @@ if (MFEM_USE_MPI) add_test(NAME block-solvers-constant_np${MFEM_MPI_NP} COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} ${MPIEXEC_PREFLAGS} - $ -sr 1 -pr 1 -no-vis + $ -rs 1 -rp 1 -no-vis ${MPIEXEC_POSTFLAGS}) add_test(NAME block-solvers-anisotropic_np${MFEM_MPI_NP} COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} ${MPIEXEC_PREFLAGS} - $ -sr 1 -pr 1 + $ -rs 1 -rp 1 -m ${CMAKE_CURRENT_SOURCE_DIR}/anisotropic.mesh -c ${CMAKE_CURRENT_SOURCE_DIR}/anisotropic.coeff -eb ${CMAKE_CURRENT_SOURCE_DIR}/anisotropic.brd diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index 70848a2cff..5cfea0d34d 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -251,7 +251,6 @@ int main(int argc, char *argv[]) Hypre::Init(); StopWatch chrono; - auto ResetTimer = [&chrono]() { chrono.Clear(); chrono.Start(); }; // Parse command-line options. const char *mesh_file = "../../data/beam-hex.mesh"; @@ -273,9 +272,9 @@ int main(int argc, char *argv[]) "Mesh file to use."); args.AddOption(&order, "-o", "--order", "Finite element order (polynomial degree)."); - args.AddOption(&ser_ref_levels, "-sr", "--serial-ref", + args.AddOption(&ser_ref_levels, "-rs", "--refine-serial", "Number of serial refinement steps."); - args.AddOption(&par_ref_levels, "-pr", "--parallel-ref", + args.AddOption(&par_ref_levels, "-rp", "--refine-parallel", "Number of parallel refinement steps."); args.AddOption(&coef_file, "-c", "--coef", "Coefficient file to use."); @@ -288,12 +287,7 @@ int main(int argc, char *argv[]) "--no-visualization", "Enable or disable GLVis visualization."); args.Parse(); - if (!args.Good()) - { - if (Mpi::Root()) { args.PrintUsage(cout); } - return 1; - } - if (Mpi::Root()) { args.PrintOptions(cout); } + if (Mpi::Root()) { args.ParseCheck(); } if (Mpi::Root() && par_ref_levels == 0) { @@ -308,8 +302,8 @@ int main(int argc, char *argv[]) if (Mpi::Root()) { - cout << "Number of serial refinements: " << ser_ref_levels << "\n" - << "Number of serial refinements: " << par_ref_levels << "\n"; + cout << "Number of serial refinements: " << ser_ref_levels << "\n" + << "Number of parallel refinements: " << par_ref_levels << "\n"; } for (int i = 0; i < ser_ref_levels; ++i) @@ -346,7 +340,7 @@ int main(int argc, char *argv[]) string line = "**********************************************************\n"; - ResetTimer(); + chrono.Restart(); // Generate components of the saddle point problem DarcyProblem darcy(*mesh, par_ref_levels, order, coef_file, ess_bdr, param); @@ -369,25 +363,25 @@ int main(int argc, char *argv[]) // Setup various solvers for the discrete problem std::map setup_time; - ResetTimer(); + chrono.Restart(); BDPMinresSolver bdp(M, B, param); setup_time[&bdp] = chrono.RealTime(); - ResetTimer(); + chrono.Restart(); DivFreeSolver dfs_dm(M, B, DFS_data); setup_time[&dfs_dm] = chrono.RealTime(); - ResetTimer(); + chrono.Restart(); const_cast(DFS_data.param.coupled_solve) = true; DivFreeSolver dfs_cm(M, B, DFS_data); setup_time[&dfs_cm] = chrono.RealTime(); #ifdef MFEM_USE_LAPACK - ResetTimer(); + chrono.Restart(); BramblePasciakSolver bp_bpcg(darcy.GetMform(), darcy.GetBform(), bps_param); setup_time[&bp_bpcg] = chrono.RealTime(); - ResetTimer(); + chrono.Restart(); bps_param.use_bpcg = false; BramblePasciakSolver bp_pcg(darcy.GetMform(), darcy.GetBform(), bps_param); setup_time[&bp_pcg] = chrono.RealTime(); @@ -412,7 +406,7 @@ int main(int argc, char *argv[]) Vector sol = darcy.GetEssentialBC(); - ResetTimer(); + chrono.Restart(); solver->Mult(darcy.GetRHS(), sol); chrono.Stop(); diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 1f043982b9..694c37bbe7 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -13,8 +13,6 @@ #include "bramble_pasciak.hpp" using namespace std; -using namespace mfem; -using namespace blocksolvers; namespace mfem { diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index b73434ff6e..71993617a3 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -66,23 +66,13 @@ class BPCGSolver : public IterativeSolver { protected: mutable Vector r, p, g, t, r_bar, r_red, g_red; - /// Remaining required operators - /* Operator list - * From IterativeSolver: - * *oper -> A = [M, Bt; B, 0] - * From this class: - * *iprec -> N = diag(M0, 0) - * *pprec -> P' = diag(M0, M1) * [Id, 0; B*M0, -Id] - */ const Operator *iprec, *pprec; void UpdateVectors(); public: - BPCGSolver() { } BPCGSolver(const Operator &ipc, const Operator &ppc) { pprec = &ppc; iprec = &ipc; } #ifdef MFEM_USE_MPI - BPCGSolver(MPI_Comm comm_) : IterativeSolver(comm_) { } BPCGSolver(MPI_Comm comm_, const Operator &ipc, const Operator &ppc) : IterativeSolver(comm_) { pprec = &ppc; iprec = &ipc; } #endif @@ -91,7 +81,7 @@ public: { IterativeSolver::SetOperator(op); UpdateVectors(); } virtual void SetPreconditioner(Solver &pc) - { if (Mpi::Root()) { MFEM_WARNING("SetPreconditioner does NO effect to BPCGSolver.\n"); } } + { if (Mpi::Root()) { MFEM_WARNING("SetPreconditioner has no effect on BPCGSolver.\n"); } } virtual void SetIncompletePreconditioner(const Operator &ipc) { iprec = &ipc; } diff --git a/miniapps/solvers/darcy_solver.cpp b/miniapps/solvers/darcy_solver.cpp index 0009982bde..cdaa702052 100644 --- a/miniapps/solvers/darcy_solver.cpp +++ b/miniapps/solvers/darcy_solver.cpp @@ -12,8 +12,6 @@ #include "darcy_solver.hpp" using namespace std; -using namespace mfem; -using namespace blocksolvers; namespace mfem { diff --git a/miniapps/solvers/darcy_solver.hpp b/miniapps/solvers/darcy_solver.hpp index 2e0357db6d..aafb6f3dc7 100644 --- a/miniapps/solvers/darcy_solver.hpp +++ b/miniapps/solvers/darcy_solver.hpp @@ -36,12 +36,12 @@ class DarcySolver : public Solver protected: Array offsets_; public: - DarcySolver(int size0, int size1) : Solver(size0 + size1), offsets_(3) - { offsets_[0] = 0; offsets_[1] = size0; offsets_[2] = height; } + DarcySolver(int size0, int size1) : Solver(size0 + size1), + offsets_({0, size0, height}) { } virtual int GetNumIterations() const = 0; }; -/// Wrapper for the block-diagonal-preconditioned MINRES defined in ex5p.cpp +/// Wrapper for the block-diagonal-preconditioned MINRES employed in ex5p.cpp class BDPMinresSolver : public DarcySolver { BlockOperator op_; diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 1efa3784f6..d0db7946bc 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -12,8 +12,6 @@ #include "div_free_solver.hpp" using namespace std; -using namespace mfem; -using namespace blocksolvers; namespace mfem { diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index 5753dc690e..f53df250a3 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -195,7 +195,9 @@ public: virtual void SetOperator(const Operator &op) { } virtual int GetNumIterations() const; }; + } // namespace blocksolvers + } // namespace mfem #endif // MFEM_DIVFREE_SOLVER_HPP diff --git a/miniapps/solvers/makefile b/miniapps/solvers/makefile index ce9cb09c1d..267ed73f0c 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/makefile @@ -63,9 +63,9 @@ include $(MFEM_TEST_MK) RUN_MPI = $(MFEM_MPIEXEC) $(MFEM_MPIEXEC_NP) $(MFEM_MPI_NP) block-solvers-test-par: block-solvers-constant block-solvers-anisotropic block-solvers-constant: block-solvers - @$(call mfem-test,$<, $(RUN_MPI), BlockSolver miniapp,-sr 1 -pr 1) + @$(call mfem-test,$<, $(RUN_MPI), BlockSolver miniapp,-rs 1 -rp 1) block-solvers-anisotropic: block-solvers - @$(call mfem-test,$<, $(RUN_MPI), BlockSolver miniapp,-sr 1 -pr 1\ + @$(call mfem-test,$<, $(RUN_MPI), BlockSolver miniapp,-rs 1 -rp 1\ -m $(SRC)anisotropic.mesh -c $(SRC)anisotropic.coeff\ -eb $(SRC)anisotropic.bdr) lor_solvers-test-seq: lor_solvers From 9c7cc2efb7520178e7024bfe3f8a27a5a9c1a798 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Wed, 18 Oct 2023 10:26:47 -0700 Subject: [PATCH 047/200] Modify SumOperator - Correct issues with size of auxiliar vector - Resize auxiliar vector for Mult and MultTranspose --- linalg/operator.cpp | 2 +- linalg/operator.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linalg/operator.cpp b/linalg/operator.cpp index 77548ba0cb..e63c73442e 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -370,7 +370,7 @@ SumOperator::SumOperator(const Operator *A, const double alpha, bool ownA, bool ownB) : Operator(A->Height(), A->Width()), A(A), B(B), alpha(alpha), beta(beta), ownA(ownA), ownB(ownB), - z(A->Width()) + z(A->Height()) { MFEM_VERIFY(A->Width() == B->Width(), "incompatible Operators: different widths\n" diff --git a/linalg/operator.hpp b/linalg/operator.hpp index 1a4747ac6e..cd075cf9b7 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -784,10 +784,10 @@ public: bool ownA, bool ownB); virtual void Mult(const Vector &x, Vector &y) const - { A->Mult(x, z); B->Mult(x, y); add(alpha, z, beta, y, y); } + { 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 - { A->MultTranspose(x, z); B->MultTranspose(x, y); add(alpha, z, beta, y, y); } + { z.SetSize(A->Width()); A->MultTranspose(x, z); B->MultTranspose(x, y); add(alpha, z, beta, y, y); } virtual ~SumOperator(); }; From 1d711039b05ca25ebed47b37d10a5c6be3e37d19 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 8 Nov 2023 14:42:54 -0800 Subject: [PATCH 048/200] Improved and expanded the doxygen comments in BilinearForm --- fem/bilinearform.hpp | 67 ++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 58e9890ec0..8b1abb132b 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -73,7 +73,7 @@ protected: /// FE space on which the form lives. Not owned. FiniteElementSpace *fes; - /// The assembly level of the form (full, partial, etc.) + /// The ::AssemblyLevel of the form (LEGACY, FULL, ELEMENT, PARTIAL) AssemblyLevel assembly; /// Element batch size used in the form action (1, 8, num_elems, etc.) int batch; @@ -121,18 +121,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 A := P^t A P where A is the internal + sparse matrix and P is the conforming prolongation matrice 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; @@ -245,8 +251,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 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 +260,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,6 +277,7 @@ 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. */ @@ -324,14 +330,15 @@ public: 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$ + /// Returns a pointer to (approximation) of the matrix inverse: \f$ M^{-1} \f$ (currently returns NULL) virtual MatrixInverse *Inverse() const; - /// Finalizes the matrix initialization. + /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is 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$ - This will fail if HasSpMat() is false. */ const SparseMatrix &SpMat() const { @@ -340,7 +347,6 @@ public: } /** @brief Returns a reference to the sparse matrix: \f$ M \f$ - This will fail if HasSpMat() is false. */ SparseMatrix &SpMat() { @@ -349,7 +355,6 @@ public: } /** @brief Returns true if the sparse matrix is not null, false otherwise. - @sa SpMat(). */ bool HasSpMat() { @@ -363,7 +368,6 @@ public: /** @brief Returns a const reference to the sparse matrix of eliminated b.c.: \f$ M_e \f$ - This will fail if HasSpMatElim() is false. */ const SparseMatrix &SpMatElim() const { @@ -373,7 +377,6 @@ public: /** @brief Returns a reference to the sparse matrix of eliminated b.c.: \f$ M_e \f$ - This will fail if HasSpMatElim() is false. */ SparseMatrix &SpMatElim() { @@ -383,7 +386,6 @@ public: /** @brief Returns true if the sparse matrix of eliminated b.c.s is not null, false otherwise. - @sa SpMatElim(). */ bool HasSpMatElim() { @@ -402,7 +404,6 @@ public: /** @brief Adds new Boundary Integrator, restricted to specific boundary attributes. - Assumes ownership of @a bfi. The array @a bdr_marker is stored internally as a pointer to the given Array object. */ void AddBoundaryIntegrator(BilinearFormIntegrator *bfi, @@ -416,7 +417,6 @@ public: /** @brief Adds new boundary Face Integrator, restricted to specific boundary attributes. - Assumes ownership of @a bfi. The array @a bdr_marker is stored internally as a pointer to the given Array object. */ void AddBdrFaceIntegrator(BilinearFormIntegrator *bfi, @@ -434,7 +434,6 @@ public: /** @brief Assemble the diagonal of the bilinear form into @a diag. Note that @a diag is a tdof Vector. - When the AssemblyLevel is not LEGACY, and the mesh has hanging nodes, this method returns |P^T| d_l, where d_l is the diagonal of the form before applying conforming assembly, P^T is the transpose of the @@ -453,7 +452,6 @@ public: 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 practice it is convenient to have it in transposed form for construction of RAP operators in matrix-free methods. */ @@ -667,7 +665,7 @@ public: /// Read-only access to the associated FiniteElementSpace. const FiniteElementSpace *FESpace() const { return fes; } - /// Sets diagonal policy used upon construction of the linear system. + /// Sets ::DiagonalPolicy used upon construction of the linear system. /** Policies include: - DIAG_ZERO (Set the diagonal values to zero) @@ -775,24 +773,33 @@ public: /// Matrix multiplication: \f$ y = M x \f$ virtual void Mult(const Vector & x, Vector & y) const; + /// Add the matrix vector multiple to a vector: \f$ y += a M x \f$ virtual void AddMult(const Vector & x, Vector & y, const double a = 1.0) const; + /// Matrix transpose vector multiplication: \f$ y = M^T x \f$ virtual void MultTranspose(const Vector & x, Vector & y) const; + + /// Add the matrix transpose vector multiplication: \f$ y += a M^T x \f$ virtual void AddMultTranspose(const Vector & x, Vector & y, const double a = 1.0) const; + /** @brief Returns a pointer to (approximation) of the matrix inverse: \f$ M^{-1} \f$ + (currently returns NULL)*/ virtual MatrixInverse *Inverse() const; - /// Finalizes the matrix initialization. + /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is LEGACY.*/ virtual void Finalize(int skip_zeros = 1); - /** Extract the associated matrix as SparseMatrix blocks. The number of + /** @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$ + /** 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$ @@ -813,7 +820,6 @@ public: Array &bdr_marker); /** @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. */ @@ -842,6 +848,7 @@ public: /// Access all integrators added with AddBdrTraceFaceIntegrator(). Array *GetBTFBFI() { return &boundary_trace_face_integs; } + /** @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. */ @@ -852,7 +859,7 @@ public: 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); @@ -877,7 +884,7 @@ public: virtual const Operator *GetOutputRestriction() const { return test_fes->GetRestrictionMatrix(); } - /** For partially conforming trial and/or test FE spaces, complete the + /** @brief 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 @@ -948,7 +955,6 @@ public: /** @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 @@ -979,7 +985,6 @@ 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 @@ -1002,11 +1007,13 @@ public: /// 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; } From 90fcbacb97f16624668ab2e522009c968b0753e2 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Thu, 9 Nov 2023 11:51:15 -0800 Subject: [PATCH 049/200] Fixed a reference to the DiagonalPolicy enum. --- fem/bilinearform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 8b1abb132b..ab19f4fb38 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -665,7 +665,7 @@ public: /// Read-only access to the associated FiniteElementSpace. const FiniteElementSpace *FESpace() const { return fes; } - /// Sets ::DiagonalPolicy used upon construction of the linear system. + /// Sets Operator::DiagonalPolicy used upon construction of the linear system. /** Policies include: - DIAG_ZERO (Set the diagonal values to zero) From 134d71d66f64df5dc8fb49a967592be86b7c5a21 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 15 Nov 2023 16:40:30 -0800 Subject: [PATCH 050/200] Fixed some spacing issues I broke and added doxygen to the remaining methods that didn't have it. --- fem/bilinearform.hpp | 46 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index ab19f4fb38..ff949e451c 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -75,11 +75,14 @@ protected: /// The ::AssemblyLevel of the form (LEGACY, FULL, ELEMENT, 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). */ BilinearFormExtension *ext; + /** Indicates if the sparse matrix is sorted after assembly when using Full Assembly (FA). */ bool sort_sparse_matrix = false; @@ -95,6 +98,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. @@ -334,11 +338,13 @@ public: virtual MatrixInverse *Inverse() const; /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is 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$ + * This will fail if HasSpMat() is false. */ const SparseMatrix &SpMat() const { @@ -347,6 +353,7 @@ public: } /** @brief Returns a reference to the sparse matrix: \f$ M \f$ + * This will fail if HasSpMat() is false. */ SparseMatrix &SpMat() { @@ -355,6 +362,7 @@ public: } /** @brief Returns true if the sparse matrix is not null, false otherwise. + * @sa SpMat(). */ bool HasSpMat() { @@ -368,6 +376,7 @@ public: /** @brief Returns a const reference to the sparse matrix of eliminated b.c.: \f$ M_e \f$ + This will fail if HasSpMatElim() is false. */ const SparseMatrix &SpMatElim() const { @@ -377,6 +386,7 @@ public: /** @brief Returns a reference to the sparse matrix of eliminated b.c.: \f$ M_e \f$ + This will fail if HasSpMatElim() is false. */ SparseMatrix &SpMatElim() { @@ -386,6 +396,7 @@ public: /** @brief Returns true if the sparse matrix of eliminated b.c.s is not null, false otherwise. + @sa SpMatElim(). */ bool HasSpMatElim() { @@ -394,6 +405,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, @@ -404,6 +416,7 @@ public: /** @brief Adds new Boundary Integrator, restricted to specific boundary attributes. + Assumes ownership of @a bfi. The array @a bdr_marker is stored internally as a pointer to the given Array object. */ void AddBoundaryIntegrator(BilinearFormIntegrator *bfi, @@ -417,6 +430,7 @@ public: /** @brief Adds new boundary Face Integrator, restricted to specific boundary attributes. + Assumes ownership of @a bfi. The array @a bdr_marker is stored internally as a pointer to the given Array object. */ void AddBdrFaceIntegrator(BilinearFormIntegrator *bfi, @@ -434,6 +448,7 @@ public: /** @brief Assemble the diagonal of the bilinear form into @a diag. Note that @a diag is a tdof Vector. + When the AssemblyLevel is not LEGACY, and the mesh has hanging nodes, this method returns |P^T| d_l, where d_l is the diagonal of the form before applying conforming assembly, P^T is the transpose of the @@ -445,18 +460,23 @@ 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 practice it is convenient to have it in transposed form for 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(); } @@ -662,6 +682,7 @@ 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; } @@ -677,7 +698,7 @@ public: /// Indicate that integrators are not owned by the BilinearForm void UseExternalIntegrators() { extern_bfs = 1; } - /// Destroys bilinear form. + /// Deletes internal matrices, bilinear integrators, and the BilinearFormExtension virtual ~BilinearForm(); }; @@ -820,6 +841,7 @@ public: Array &bdr_marker); /** @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. */ @@ -837,7 +859,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; } @@ -850,6 +874,7 @@ public: { return &boundary_trace_face_integs; } /** @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() @@ -931,18 +956,28 @@ 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, 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. @@ -954,7 +989,7 @@ 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 @@ -985,6 +1020,7 @@ 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 @@ -1003,6 +1039,7 @@ public: 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. @@ -1017,6 +1054,7 @@ public: /// Read-only access to the associated test FiniteElementSpace. const FiniteElementSpace *TestFESpace() const { return test_fes; } + /// Deletes internal matrices, bilinear integrators, and the BilinearFormExtension virtual ~MixedBilinearForm(); }; From 4e485b82b2cae12446204074c16c1ea7f3175aec Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 15 Nov 2023 16:44:31 -0800 Subject: [PATCH 051/200] make style --- fem/bilinearform.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index ff949e451c..27149a2dca 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -338,13 +338,13 @@ public: virtual MatrixInverse *Inverse() const; /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is 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$ - * + * This will fail if HasSpMat() is false. */ const SparseMatrix &SpMat() const { @@ -353,7 +353,7 @@ public: } /** @brief Returns a reference to the sparse matrix: \f$ M \f$ - * + * This will fail if HasSpMat() is false. */ SparseMatrix &SpMat() { @@ -362,7 +362,7 @@ public: } /** @brief Returns true if the sparse matrix is not null, false otherwise. - * + * @sa SpMat(). */ bool HasSpMat() { @@ -470,7 +470,7 @@ public: { return GetProlongation(); } /** @brief Returns the output fe space restriction matrix, transposed - + Logically, this is the transpose of GetOutputRestriction, but in practice it is convenient to have it in transposed form for construction of RAP operators in matrix-free methods. */ From da687466921d358cb85755f073e6768bf929387d Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Thu, 30 Nov 2023 19:47:07 -0800 Subject: [PATCH 052/200] Make FiniteElementSpace::GetEssentialTrueDofs const --- fem/fespace.cpp | 2 +- fem/fespace.hpp | 2 +- fem/pfespace.cpp | 2 +- fem/pfespace.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fem/fespace.cpp b/fem/fespace.cpp index 660fec17a2..cbbdaeada7 100644 --- a/fem/fespace.cpp +++ b/fem/fespace.cpp @@ -584,7 +584,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); diff --git a/fem/fespace.hpp b/fem/fespace.hpp index 0fd44b6132..c9d09f0b7f 100644 --- a/fem/fespace.hpp +++ b/fem/fespace.hpp @@ -1195,7 +1195,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 diff --git a/fem/pfespace.cpp b/fem/pfespace.cpp index ed6fb53874..cc5cc63311 100644 --- a/fem/pfespace.cpp +++ b/fem/pfespace.cpp @@ -1032,7 +1032,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 4ea29f60cd..6b5bdfd655 100644 --- a/fem/pfespace.hpp +++ b/fem/pfespace.hpp @@ -361,7 +361,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 */ From 9c01a3eca77c74cfcf755af02d73c4ad3b07d89d Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Thu, 30 Nov 2023 19:47:51 -0800 Subject: [PATCH 053/200] Use RectangularConstrainedOperator for prolongations in GeometricMultigrid This fixes a bug in the multigrid solver. If the prolongation operators are not constrained, then their transpose will have nontrivial action on the essential DOFs, resulting in degraded convergence. --- fem/multigrid.cpp | 50 +++++++++++++++++++++++++++++++++++++++-------- fem/multigrid.hpp | 21 ++++++++++---------- 2 files changed, 52 insertions(+), 19 deletions(-) diff --git a/fem/multigrid.cpp b/fem/multigrid.cpp index ff1be5b2a4..d6a99baa9f 100644 --- a/fem/multigrid.cpp +++ b/fem/multigrid.cpp @@ -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,48 @@ 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_) +{ + const int nlevels = fespaces.GetNumLevels(); + ownedProlongations.SetSize(nlevels - 1); + ownedProlongations = true; + + essentialTrueDofs.SetSize(nlevels); + prolongations.SetSize(nlevels - 1); + for (int level = 0; level < nlevels; ++level) + { + essentialTrueDofs[level] = new Array; + fespaces.GetFESpaceAtLevel(level).GetEssentialTrueDofs( + ess_bdr, *essentialTrueDofs[level]); + } + + for (int level = 0; level < nlevels - 1; ++level) + { + prolongations[level] = new RectangularConstrainedOperator( + fespaces.GetProlongationAtLevel(level), + *essentialTrueDofs[level], + *essentialTrueDofs[level + 1] + ); + } +} GeometricMultigrid::~GeometricMultigrid() { diff --git a/fem/multigrid.hpp b/fem/multigrid.hpp index b97acb8bfb..5c9f388e72 100644 --- a/fem/multigrid.hpp +++ b/fem/multigrid.hpp @@ -140,7 +140,7 @@ protected: public: /// Constructs an empty multigrid hierarchy - Multigrid(); + Multigrid() { } /// 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,16 @@ protected: Array bfs; public: - /** Construct an empty multigrid object for the given finite element space - hierarchy @a fespaces_ */ + /// @brief Construct an empty geometric multigrid object for the given finite + /// element space hierarchy @a fespaces_. 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. + GeometricMultigrid(const FiniteElementSpaceHierarchy& fespaces_, + const Array &ess_bdr); + /// Destructor virtual ~GeometricMultigrid(); @@ -184,13 +190,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 From 68873fa4d403c7c94a653c7bc781815ff5b2734d Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Thu, 30 Nov 2023 19:48:48 -0800 Subject: [PATCH 054/200] Update ex26 and ex26p to use constrained prolongation operators Resolves issue #4002 --- examples/ex26.cpp | 36 +++++++++++++++--------------------- examples/ex26p.cpp | 34 +++++++++++++++------------------- 2 files changed, 30 insertions(+), 40 deletions(-) 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); } From 61c23059c6e5c8e2024820d3a131cea06af99f80 Mon Sep 17 00:00:00 2001 From: Will Pazner <11493037+pazner@users.noreply.github.com> Date: Fri, 1 Dec 2023 11:44:08 -0800 Subject: [PATCH 055/200] Use '= default' for default Multigrid constructor Co-authored-by: Sebastian Grimberg --- fem/multigrid.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/multigrid.hpp b/fem/multigrid.hpp index 5c9f388e72..da41dff2d6 100644 --- a/fem/multigrid.hpp +++ b/fem/multigrid.hpp @@ -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 From 71c456694491da066ed7b2e7448d1274ea3787e8 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Fri, 1 Dec 2023 13:01:16 -0700 Subject: [PATCH 056/200] applying some suggestions --- fem/bilininteg.hpp | 6 +----- fem/fe/fe_base.hpp | 4 ++-- miniapps/solvers/README | 2 +- miniapps/solvers/block_fespace_operator.cpp | 2 +- miniapps/solvers/block_fespace_operator.hpp | 22 ++++++++++----------- 5 files changed, 16 insertions(+), 20 deletions(-) diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index d511fa479b..8af2f82640 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -3005,8 +3005,7 @@ private: const DofToQuad *maps; ///< Not owned const GeometricFactors *geom; ///< Not owned int vdim, ndofs; - const FiniteElementSpace - *fespace; ///< Not owned. Not const because it is used in a getter to construct bilinearforms which require non-const fespaces for some reason. Can it be const? + const FiniteElementSpace *fespace; ///< Not owned. bool PACalled = false; //Component integrator @@ -3034,9 +3033,6 @@ public: */ virtual void AssemblePA(const FiniteElementSpace &fes); - virtual void AssemblePA (const FiniteElementSpace &, - const FiniteElementSpace &) {MFEM_ABORT("Use other AssemblePA function.");}; - /** \brief Only valid for a component version of ElasticityIntegrator. */ virtual void AssembleEA(const FiniteElementSpace &fes, Vector &emat, diff --git a/fem/fe/fe_base.hpp b/fem/fe/fe_base.hpp index 8e74d65e70..c842fd32d5 100644 --- a/fem/fe/fe_base.hpp +++ b/fem/fe/fe_base.hpp @@ -20,6 +20,7 @@ namespace mfem { + /// Possible basis types. Note that not all elements can use all BasisType(s). class BasisType { @@ -595,8 +596,7 @@ public: /** @brief Return a DofToQuad structure corresponding to the given IntegrationRule using the given DofToQuad::Mode and ElementDofOrdering. */ - /** See the documentation for DofToQuad and ElementDofOrdering for more details. - TODO - make this a reference again.*/ + /** See the documentation for DofToQuad and ElementDofOrdering for more details.*/ virtual const DofToQuad &GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode, const ElementDofOrdering ordering) const; diff --git a/miniapps/solvers/README b/miniapps/solvers/README index fae289121b..b6765a670a 100644 --- a/miniapps/solvers/README +++ b/miniapps/solvers/README @@ -108,4 +108,4 @@ This miniapp allows timing comparisons with the LEGACY assembly approach. [3] Mihajlović, M.D. and Mijalković, S., "A component decomposition preconditioning for 3D stress analysis problems", Numerical Linear - Algebra with Applications, 2002. \ No newline at end of file + Algebra with Applications, 2002. diff --git a/miniapps/solvers/block_fespace_operator.cpp b/miniapps/solvers/block_fespace_operator.cpp index e528516646..220037fafb 100644 --- a/miniapps/solvers/block_fespace_operator.cpp +++ b/miniapps/solvers/block_fespace_operator.cpp @@ -106,4 +106,4 @@ const Operator* BlockFESpaceOperator::GetRestriction() const return &restriction; } -}//namespace mfem \ No newline at end of file +}//namespace mfem diff --git a/miniapps/solvers/block_fespace_operator.hpp b/miniapps/solvers/block_fespace_operator.hpp index 260f319c2b..46248d4e34 100644 --- a/miniapps/solvers/block_fespace_operator.hpp +++ b/miniapps/solvers/block_fespace_operator.hpp @@ -15,28 +15,28 @@ namespace mfem class BlockFESpaceOperator : public Operator { private: - /// @brief Offsets for the square "A" operator. + /// Offsets for the square "A" operator. Array offsets; - /// @brief Column offsets for the prolongation operator. + /// Column offsets for the prolongation operator. Array prolongColOffsets; - /// @brief Row offsets for the prolongation operator. + /// Row offsets for the prolongation operator. Array restrictRowOffsets; - /// @brief The "A" part of "RAP". + /// The "A" part of "RAP". BlockOperator A; - /// @brief Maps local dofs of each block to true dofs. + /// Maps local dofs of each block to true dofs. BlockOperator prolongation; - /// @brief Maps true dofs of each block to local dofs. + /// Maps true dofs of each block to local dofs. BlockOperator restriction; - /// @brief Computes height for parent operator. + /// Computes height for parent operator. static int GetHeight(const std::vector &fespaces); - /// @brief Computes offsets for A BlockOperator. + /// Computes offsets for A BlockOperator. static Array GetBlockOffsets(const std::vector &fespaces); - /// @brief Computes col_offsets for prolongation operator. + /// Computes col_offsets for prolongation operator. static Array GetProColBlockOffsets(const std::vector &fespaces); - /// @brief Computes row_offsets for restriction operator. + /// Computes row_offsets for restriction operator. static Array GetResRowBlockOffsets(const std::vector &fespaces); public: @@ -57,4 +57,4 @@ public: }//namespace mfem -#endif \ No newline at end of file +#endif From d9c60f710e18f6b5722dbcd40411776178059988 Mon Sep 17 00:00:00 2001 From: victor-decaria-nnl <97457991+victor-decaria-nnl@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:23:32 -0500 Subject: [PATCH 057/200] Update fem/integ/bilininteg_elasticity_kernels.hpp applying suggestion to delete @file doxygen line Co-authored-by: Will Pazner <11493037+pazner@users.noreply.github.com> --- fem/integ/bilininteg_elasticity_kernels.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/fem/integ/bilininteg_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp index 58c9daf7ae..ddfc7e1acb 100644 --- a/fem/integ/bilininteg_elasticity_kernels.hpp +++ b/fem/integ/bilininteg_elasticity_kernels.hpp @@ -10,7 +10,6 @@ // CONTRIBUTING.md for details. /** - * @file * @brief Header for small strain, isotropic, linear elasticity kernels. * * Strong form: -div(sigma(u)) From c7aa393ba0a810f0a11422f321461f8356432399 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Fri, 1 Dec 2023 15:03:44 -0700 Subject: [PATCH 058/200] got rid of forall macros in kernels --- fem/integ/bilininteg_elasticity_kernels.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fem/integ/bilininteg_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp index ddfc7e1acb..db76e54a73 100644 --- a/fem/integ/bilininteg_elasticity_kernels.hpp +++ b/fem/integ/bilininteg_elasticity_kernels.hpp @@ -157,7 +157,7 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, 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(e, numEls, numPoints,1,1, + mfem::forall_2D(numEls, numPoints, 1, [=] MFEM_HOST_DEVICE (int e) { // for(int p = 0; p < numPoints, ) MFEM_FOREACH_THREAD(p, x,numPoints) @@ -232,7 +232,7 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, const auto QRead = Reshape(QVec.Read(), numPoints, d, qSize, numEls); const auto G = Reshape(maps.G.Read(), numPoints, d, numEls); auto yDev = Reshape(y.ReadWrite(), nDofs, qSize, numEls); - MFEM_FORALL_2D(e, numEls, qSize, nDofs,1, + mfem::forall_2D(numEls, qSize, nDofs, [=] MFEM_HOST_DEVICE (int e) { MFEM_FOREACH_THREAD(i, y, nDofs) { @@ -270,7 +270,7 @@ void ElasticityAssembleDiagonalPA(const int nDofs, 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(e, numEls, numPoints,1,1, + mfem::forall_2D(numEls, numPoints,1, [=] MFEM_HOST_DEVICE (int e) { MFEM_FOREACH_THREAD(p, x,numPoints) { @@ -309,7 +309,7 @@ void ElasticityAssembleDiagonalPA(const int nDofs, 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, numEls); - MFEM_FORALL_2D(e, numEls, d, nDofs,1, + mfem::forall_2D(numEls, d, nDofs, [=] MFEM_HOST_DEVICE (int e) { MFEM_FOREACH_THREAD(i, y, nDofs) { @@ -350,7 +350,7 @@ void ElasticityAssembleEA(const int IBlock, const int JBlock, const int nDofs, 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(e, numEls, nDofs,nDofs,1, + mfem::forall_2D(numEls, nDofs, nDofs, [=] MFEM_HOST_DEVICE (int e) { MFEM_FOREACH_THREAD(JDof, y, nDofs) { From 0ca7ff45337605c924de4e8c1f8f811d2c66f9c6 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Mon, 4 Dec 2023 12:33:46 -0700 Subject: [PATCH 059/200] added GetEVectorOrdering function --- fem/bilinearform_ext.cpp | 4 +--- fem/fespace.cpp | 7 +++++++ fem/fespace.hpp | 4 ++++ fem/integ/bilininteg_elasticity_pa.cpp | 3 +-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/fem/bilinearform_ext.cpp b/fem/bilinearform_ext.cpp index 7f523e24f6..d76fd1b293 100644 --- a/fem/bilinearform_ext.cpp +++ b/fem/bilinearform_ext.cpp @@ -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/fespace.cpp b/fem/fespace.cpp index cbbdaeada7..230f251925 100644 --- a/fem/fespace.cpp +++ b/fem/fespace.cpp @@ -3678,4 +3678,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 0550bf6ccc..3364a10f17 100644 --- a/fem/fespace.hpp +++ b/fem/fespace.hpp @@ -1333,6 +1333,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/integ/bilininteg_elasticity_pa.cpp b/fem/integ/bilininteg_elasticity_pa.cpp index 6a1247dc22..73dc21d46c 100644 --- a/fem/integ/bilininteg_elasticity_pa.cpp +++ b/fem/integ/bilininteg_elasticity_pa.cpp @@ -53,8 +53,7 @@ void ElasticityIntegrator::AssemblePA(const FiniteElementSpace &fes) q_vec = std::make_shared(*quad_space, vdim*vdim); lambda->Project(*lambda_quad); mu->Project(*mu_quad); - auto ordering = UsesTensorBasis(*fespace) ? ElementDofOrdering::LEXICOGRAPHIC : - ElementDofOrdering::NATIVE; + auto ordering = GetEVectorOrdering(*fespace); maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, DofToQuad::FULL, ordering); } PACalled = true; From 4a38577e3f80d9252c1d81462a614a2206c4c3a6 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Mon, 4 Dec 2023 12:42:31 -0700 Subject: [PATCH 060/200] added same tests from makefile to CmakeLists.txt --- miniapps/solvers/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/miniapps/solvers/CMakeLists.txt b/miniapps/solvers/CMakeLists.txt index 6632f23b34..259f0605ee 100644 --- a/miniapps/solvers/CMakeLists.txt +++ b/miniapps/solvers/CMakeLists.txt @@ -50,6 +50,20 @@ if (MFEM_USE_MPI) ${MPIEXEC_PREFLAGS} $ -fe n -m ../../data/fichera.mesh -no-vis ${MPIEXEC_POSTFLAGS}) + + add_test(NAME lor_elast-tri_np${MFEM_MPI_NP} + COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} + ${MPIEXEC_PREFLAGS} + $ -l 2 -ca -pa -ss + -m ../../data/beam-tri.mesh -o 2 + ${MPIEXEC_POSTFLAGS}) + + add_test(NAME lor_elast-hex_np${MFEM_MPI_NP} + COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} + ${MPIEXEC_PREFLAGS} + $ -l 1 -pa -o 2 + -m ../../data/beam-hex.mesh + ${MPIEXEC_POSTFLAGS}) endif() endif() From 336236eae84498f6adf7424482e379ceaeda5668 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Mon, 4 Dec 2023 16:55:50 -0700 Subject: [PATCH 061/200] implemented the LEXICOGRAPHIC_FULL idea --- fem/fe/fe_base.cpp | 155 +++++++++++++++++++++++-- fem/fe/fe_base.hpp | 23 ++-- fem/integ/bilininteg_elasticity_pa.cpp | 7 +- 3 files changed, 162 insertions(+), 23 deletions(-) diff --git a/fem/fe/fe_base.cpp b/fem/fe/fe_base.cpp index e6a0dd704b..b3f30d01e0 100644 --- a/fem/fe/fe_base.cpp +++ b/fem/fe/fe_base.cpp @@ -367,11 +367,10 @@ const DofToQuad &FiniteElement::GetDofToQuad(const IntegrationRule &ir, { MFEM_VERIFY(mode == DofToQuad::FULL, "invalid mode requested"); - ElementDofOrdering ordering = ElementDofOrdering::NATIVE; for (int i = 0; i < dof2quad_array.Size(); i++) { const DofToQuad &d2q = *dof2quad_array[i]; - if (d2q.IntRule == &ir && d2q.mode == mode && d2q.ordering == ordering) { return d2q; } + if (d2q.IntRule == &ir && d2q.mode == mode) { return d2q; } } #ifdef MFEM_THREAD_SAFE @@ -644,6 +643,118 @@ 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 the default in GetDofToQuad for FULL mode. + auto *d2q_new = new DofToQuad(d2q); + d2q_new->mode = DofToQuad::LEXICOGRAPHIC_FULL; + const int nqpt = ir.GetNPoints(); + if (range_type == SCALAR) + { + for (int i = 0; i < nqpt; i++) + { + for (int j = 0; j < dof; j++) + { + d2q_new->B[i+nqpt*j] = d2q_new->Bt[j+dof*i] = d2q.B[i+nqpt*lex_ordering[j]]; + } + } + } + else if (range_type == VECTOR) + { + for (int i = 0; i < nqpt; i++) + { + for (int d = 0; d < dim; d++) + { + for (int j = 0; j < dof; j++) + { + d2q_new->B[i+nqpt*(d+dim*j)] = d2q_new->Bt[j+dof*(i+nqpt*d)] = d2q.B[i+nqpt* + (d+dim*lex_ordering[j])]; + } + } + } + } + else + { + // Skip B and Bt for unknown range type + } + switch (deriv_type) + { + case GRAD: + { + for (int i = 0; i < nqpt; i++) + { + for (int d = 0; d < dim; d++) + { + for (int j = 0; j < dof; j++) + { + d2q_new->G[i+nqpt*(d+dim*j)] = d2q_new->Gt[j+dof*(i+nqpt*d)] = d2q.G[i+nqpt* + (d+dim*lex_ordering[j])]; + } + } + } + break; + } + case DIV: + { + for (int i = 0; i < nqpt; i++) + { + for (int j = 0; j < dof; j++) + { + d2q_new->G[i+nqpt*j] = d2q_new->Gt[j+dof*i] = d2q.G[i+nqpt*lex_ordering[j]]; + } + } + break; + } + case CURL: + { + for (int i = 0; i < nqpt; i++) + { + for (int d = 0; d < cdim; d++) + { + for (int j = 0; j < dof; j++) + { + d2q_new->G[i+nqpt*(d+cdim*j)] = d2q_new->Gt[j+dof*(i+nqpt*d)] = d2q.G[i+nqpt* + (d+cdim*lex_ordering[j])]; + } + } + } + break; + } + case NONE: + default: + // Skip G and Gt for unknown derivative type + break; + } + dof2quad_array.Append(d2q_new); +} + +const DofToQuad &NodalFiniteElement::GetDofToQuad(const IntegrationRule &ir, + DofToQuad::Mode mode) const +{ + MFEM_VERIFY(mode == DofToQuad::FULL || + mode == DofToQuad::LEXICOGRAPHIC_FULL, "invalid mode requested"); + + //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::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 @@ -2532,29 +2643,49 @@ void NodalTensorFiniteElement::SetMapType(const int map_type) const DofToQuad &NodalTensorFiniteElement::GetDofToQuad( const IntegrationRule &ir, - DofToQuad::Mode mode, - const ElementDofOrdering ordering) const + DofToQuad::Mode mode) const { - MFEM_VERIFY(!(mode == DofToQuad::Mode::TENSOR && - ordering == ElementDofOrdering::NATIVE), - "Invalide combination of DofToQuad::Mode and ElementDofOrdering."); + MFEM_VERIFY(mode == DofToQuad::FULL || + mode == DofToQuad::TENSOR || + mode == DofToQuad::LEXICOGRAPHIC_FULL, "invalid mode requested"); + + //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 && d2q.ordering == ordering) { return d2q; } + if (d2q.IntRule == &ir && d2q.mode == mode) { return d2q; } + } + + if (mode != DofToQuad::TENSOR) + { + return NodalFiniteElement::GetDofToQuad(ir, mode); + } + else + { + return GetTensorDofToQuad(*this, ir, mode, basis1d, true, dof2quad_array); + } +} + +const DofToQuad &NodalTensorFiniteElement::GetDofToQuad( + const IntegrationRule &ir, + DofToQuad::Mode mode, + const ElementDofOrdering ordering) const +{ + for (int i = 0; i < dof2quad_array.Size(); i++) + { + const DofToQuad &d2q = *dof2quad_array[i]; + if (d2q.IntRule == &ir && d2q.mode == mode) { return d2q; } } //First create the DofToQuad map for ElementDofOrdering::NATIVE. //Either return d2q, or create the FULL and LEXICOGRAPHIC map and return. auto &d2q = GetDofToQuad(ir, mode); - if (mode == DofToQuad::Mode::FULL && - ordering == ElementDofOrdering::LEXICOGRAPHIC) + if (mode == DofToQuad::LEXICOGRAPHIC_FULL) { //Undo the native ordering which is the default in GetDofToQuad for FULL mode. auto *d2q_new = new DofToQuad(d2q); - d2q_new->ordering = ElementDofOrdering::LEXICOGRAPHIC; + d2q_new->mode = DofToQuad::LEXICOGRAPHIC_FULL; const int nqpt = ir.GetNPoints(); - if (range_type == SCALAR) { for (int i = 0; i < nqpt; i++) diff --git a/fem/fe/fe_base.hpp b/fem/fe/fe_base.hpp index c842fd32d5..4c58529fc6 100644 --- a/fem/fe/fe_base.hpp +++ b/fem/fe/fe_base.hpp @@ -171,15 +171,17 @@ 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. Mode mode; - /// Describes the contents of the #B, #Bt, #G, and #Gt arrays. - ElementDofOrdering ordering; - /** @brief Number of degrees of freedom = number of basis functions. When #mode is TENSOR, this is the 1D number. */ int ndof; @@ -730,6 +732,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, @@ -748,6 +753,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); } @@ -1271,12 +1279,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; const DofToQuad &GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode, diff --git a/fem/integ/bilininteg_elasticity_pa.cpp b/fem/integ/bilininteg_elasticity_pa.cpp index 73dc21d46c..6d0ba43f86 100644 --- a/fem/integ/bilininteg_elasticity_pa.cpp +++ b/fem/integ/bilininteg_elasticity_pa.cpp @@ -54,7 +54,12 @@ void ElasticityIntegrator::AssemblePA(const FiniteElementSpace &fes) lambda->Project(*lambda_quad); mu->Project(*mu_quad); auto ordering = GetEVectorOrdering(*fespace); - maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, DofToQuad::FULL, ordering); + auto mode = ordering == ElementDofOrdering::NATIVE ? DofToQuad::FULL : + DofToQuad::LEXICOGRAPHIC_FULL; + // Should be FULL if native and LEXICOGRAPHIC_FULL ow? should there be another function? + // maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, DofToQuad::FULL, ordering); + // maybe make a function of fespace as well, something that returns FULL, LEXICO, or TENSOR + maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, mode); } PACalled = true; } From 61fc44f5ff9c470f3ec134cce7c2ef55175e17dc Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Tue, 5 Dec 2023 06:28:09 -0700 Subject: [PATCH 062/200] removed the overloads for GetDofToQuad. Changed MFEM_VERIFY conditions to reflect adding the new enum value --- fem/fe/fe_base.cpp | 131 +-------------------------------------------- fem/fe/fe_base.hpp | 19 ++----- 2 files changed, 6 insertions(+), 144 deletions(-) diff --git a/fem/fe/fe_base.cpp b/fem/fe/fe_base.cpp index b3f30d01e0..acf59a8290 100644 --- a/fem/fe/fe_base.cpp +++ b/fem/fe/fe_base.cpp @@ -491,14 +491,6 @@ const DofToQuad &FiniteElement::GetDofToQuad(const IntegrationRule &ir, return *d2q; } -const DofToQuad &FiniteElement::GetDofToQuad(const IntegrationRule &ir, - DofToQuad::Mode mode, - const ElementDofOrdering ordering) const -{ - MFEM_VERIFY(ordering == ElementDofOrdering::NATIVE, "invalid mode requested"); - return GetDofToQuad(ir, mode); -} - void FiniteElement::GetFaceMap(const int face_id, Array &face_map) const { @@ -648,7 +640,7 @@ const { // Get the FULL version of the map. auto &d2q = GetDofToQuad(ir, DofToQuad::FULL); - //Undo the native ordering which is the default in GetDofToQuad for FULL mode. + //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(); @@ -734,9 +726,6 @@ const const DofToQuad &NodalFiniteElement::GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode) const { - MFEM_VERIFY(mode == DofToQuad::FULL || - mode == DofToQuad::LEXICOGRAPHIC_FULL, "invalid mode requested"); - //Should make this loop a function of FiniteElement for (int i = 0; i < dof2quad_array.Size(); i++) { @@ -744,7 +733,7 @@ const DofToQuad &NodalFiniteElement::GetDofToQuad(const IntegrationRule &ir, if (d2q.IntRule == &ir && d2q.mode == mode) { return d2q; } } - if (mode == DofToQuad::FULL) + if (mode != DofToQuad::LEXICOGRAPHIC_FULL) { return FiniteElement::GetDofToQuad(ir, mode); } @@ -2645,17 +2634,6 @@ const DofToQuad &NodalTensorFiniteElement::GetDofToQuad( const IntegrationRule &ir, DofToQuad::Mode mode) const { - MFEM_VERIFY(mode == DofToQuad::FULL || - mode == DofToQuad::TENSOR || - mode == DofToQuad::LEXICOGRAPHIC_FULL, "invalid mode requested"); - - //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::TENSOR) { return NodalFiniteElement::GetDofToQuad(ir, mode); @@ -2666,111 +2644,6 @@ const DofToQuad &NodalTensorFiniteElement::GetDofToQuad( } } -const DofToQuad &NodalTensorFiniteElement::GetDofToQuad( - const IntegrationRule &ir, - DofToQuad::Mode mode, - const ElementDofOrdering ordering) const -{ - for (int i = 0; i < dof2quad_array.Size(); i++) - { - const DofToQuad &d2q = *dof2quad_array[i]; - if (d2q.IntRule == &ir && d2q.mode == mode) { return d2q; } - } - //First create the DofToQuad map for ElementDofOrdering::NATIVE. - //Either return d2q, or create the FULL and LEXICOGRAPHIC map and return. - auto &d2q = GetDofToQuad(ir, mode); - if (mode == DofToQuad::LEXICOGRAPHIC_FULL) - { - //Undo the native ordering which is the default in GetDofToQuad for FULL mode. - auto *d2q_new = new DofToQuad(d2q); - d2q_new->mode = DofToQuad::LEXICOGRAPHIC_FULL; - const int nqpt = ir.GetNPoints(); - - if (range_type == SCALAR) - { - for (int i = 0; i < nqpt; i++) - { - for (int j = 0; j < dof; j++) - { - d2q_new->B[i+nqpt*j] = d2q_new->Bt[j+dof*i] = d2q.B[i+nqpt*dof_map[j]]; - } - } - } - else if (range_type == VECTOR) - { - for (int i = 0; i < nqpt; i++) - { - for (int d = 0; d < dim; d++) - { - for (int j = 0; j < dof; j++) - { - d2q_new->B[i+nqpt*(d+dim*j)] = d2q_new->Bt[j+dof*(i+nqpt*d)] = d2q.B[i+nqpt* - (d+dim*dof_map[j])]; - } - } - } - } - else - { - // Skip B and Bt for unknown range type - } - switch (deriv_type) - { - case GRAD: - { - for (int i = 0; i < nqpt; i++) - { - for (int d = 0; d < dim; d++) - { - for (int j = 0; j < dof; j++) - { - d2q_new->G[i+nqpt*(d+dim*j)] = d2q_new->Gt[j+dof*(i+nqpt*d)] = d2q.G[i+nqpt* - (d+dim*dof_map[j])]; - } - } - } - break; - } - case DIV: - { - for (int i = 0; i < nqpt; i++) - { - for (int j = 0; j < dof; j++) - { - d2q_new->G[i+nqpt*j] = d2q_new->Gt[j+dof*i] = d2q.G[i+nqpt*dof_map[j]]; - } - } - break; - } - case CURL: - { - for (int i = 0; i < nqpt; i++) - { - for (int d = 0; d < cdim; d++) - { - for (int j = 0; j < dof; j++) - { - d2q_new->G[i+nqpt*(d+cdim*j)] = d2q_new->Gt[j+dof*(i+nqpt*d)] = d2q.G[i+nqpt* - (d+cdim*dof_map[j])]; - } - } - } - break; - } - case NONE: - default: - // Skip G and Gt for unknown derivative type - break; - } - dof2quad_array.Append(d2q_new); - return *d2q_new; - } - else - { - return d2q; - } -} - 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 4c58529fc6..88f300e0cf 100644 --- a/fem/fe/fe_base.hpp +++ b/fem/fe/fe_base.hpp @@ -596,13 +596,6 @@ public: virtual const DofToQuad &GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode) const; - /** @brief Return a DofToQuad structure corresponding to the given - IntegrationRule using the given DofToQuad::Mode and ElementDofOrdering. */ - /** See the documentation for DofToQuad and ElementDofOrdering for more details.*/ - virtual const DofToQuad &GetDofToQuad(const IntegrationRule &ir, - DofToQuad::Mode mode, - const ElementDofOrdering ordering) const; - /** @brief Return the mapping from lexicographic face DOFs to lexicographic element DOFs for the given local face @a face_id. */ /** Given the @a ith DOF (lexicographically ordered) on the face referenced @@ -1281,10 +1274,6 @@ public: const DofToQuad &GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode) const override; - const DofToQuad &GetDofToQuad(const IntegrationRule &ir, - DofToQuad::Mode mode, - const ElementDofOrdering ordering) const override; - void SetMapType(const int map_type_) override; void GetTransferMatrix(const FiniteElement &fe, @@ -1326,15 +1315,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); } From 48935c4a8a08f057f2bde815b421225f75a38a01 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Tue, 5 Dec 2023 06:39:59 -0700 Subject: [PATCH 063/200] reverted the move of ElementDofOrdering --- fem/fe/fe_base.hpp | 13 ------------- fem/fespace.hpp | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/fem/fe/fe_base.hpp b/fem/fe/fe_base.hpp index 88f300e0cf..7335478261 100644 --- a/fem/fe/fe_base.hpp +++ b/fem/fe/fe_base.hpp @@ -128,19 +128,6 @@ public: } }; -/// Constants describing the possible orderings of the DOFs in one element. -enum class ElementDofOrdering -{ - /// Native ordering as defined by the FiniteElement. - /** This ordering can be used by tensor-product elements when the - interpolation from the DOFs to quadrature points does not use the - tensor-product structure. */ - NATIVE, - /// Lexicographic ordering for tensor-product FiniteElements. - /** This ordering can be used only with tensor-product elements. */ - LEXICOGRAPHIC -}; - /** @brief Structure representing the matrices/tensors needed to evaluate (in reference space) the values, gradients, divergences, or curls of a FiniteElement at a the quadrature points of a given IntegrationRule. */ diff --git a/fem/fespace.hpp b/fem/fespace.hpp index 3364a10f17..1d53491b07 100644 --- a/fem/fespace.hpp +++ b/fem/fespace.hpp @@ -69,6 +69,20 @@ Ordering::Map(int ndofs, int vdim, int dof, int vd) return (dof >= 0) ? vd+vdim*dof : -1-(vd+vdim*(-1-dof)); } + +/// Constants describing the possible orderings of the DOFs in one element. +enum class ElementDofOrdering +{ + /// Native ordering as defined by the FiniteElement. + /** This ordering can be used by tensor-product elements when the + interpolation from the DOFs to quadrature points does not use the + tensor-product structure. */ + NATIVE, + /// Lexicographic ordering for tensor-product FiniteElements. + /** This ordering can be used only with tensor-product elements. */ + LEXICOGRAPHIC +}; + // Forward declarations class NURBSExtension; class BilinearFormIntegrator; From a4f7c68ac7d683b6fe0d814f84135a56e4bdf6dd Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Tue, 5 Dec 2023 07:03:28 -0700 Subject: [PATCH 064/200] reverting a random newline that was deleted --- fem/fe/fe_base.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fem/fe/fe_base.hpp b/fem/fe/fe_base.hpp index 7335478261..6955d21b20 100644 --- a/fem/fe/fe_base.hpp +++ b/fem/fe/fe_base.hpp @@ -583,6 +583,7 @@ public: virtual const DofToQuad &GetDofToQuad(const IntegrationRule &ir, DofToQuad::Mode mode) const; + /** @brief Return the mapping from lexicographic face DOFs to lexicographic element DOFs for the given local face @a face_id. */ /** Given the @a ith DOF (lexicographically ordered) on the face referenced From 8bdc3b67bb208beb8754cc7c8267a7ec455ed80a Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Tue, 5 Dec 2023 09:19:51 -0700 Subject: [PATCH 065/200] using CoefficientVector --- fem/bilininteg.hpp | 5 +++- fem/integ/bilininteg_elasticity_ea.cpp | 3 +- fem/integ/bilininteg_elasticity_kernels.cpp | 20 +++++++------ fem/integ/bilininteg_elasticity_kernels.hpp | 31 +++++++++++---------- fem/integ/bilininteg_elasticity_pa.cpp | 11 +++----- 5 files changed, 37 insertions(+), 33 deletions(-) diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index 8af2f82640..67ea987322 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -2979,6 +2979,9 @@ public: bool SupportsCeed() const { return DeviceCanUseCeed(); } }; +// Forward declarations +class CoefficientVector; + /** Integrator for the linear elasticity form: a(u,v) = (lambda div(u), div(v)) + (2 mu e(u), e(v)), where e(v) = (1/2) (grad(v) + grad(v)^T). @@ -2998,7 +3001,7 @@ private: #endif // PA extension - std::shared_ptr lambda_quad, mu_quad; + std::shared_ptr lambda_quad, mu_quad; std::shared_ptr q_vec; std::shared_ptr quad_space; diff --git a/fem/integ/bilininteg_elasticity_ea.cpp b/fem/integ/bilininteg_elasticity_ea.cpp index 61765ff64e..5729d107da 100644 --- a/fem/integ/bilininteg_elasticity_ea.cpp +++ b/fem/integ/bilininteg_elasticity_ea.cpp @@ -23,7 +23,8 @@ void ElasticityIntegrator::AssembleEA(const FiniteElementSpace &fes, MFEM_VERIFY(fespace, "Need initialized FiniteElementSpace."); MFEM_VERIFY(!add, "AssembleEA not implemented for add yet."); AssemblePA(*fespace); - internal::ElasticityAssembleEA(vdim, IBlock, JBlock, ndofs,*fespace, + const auto &ir = q_vec->GetIntRule(0); + internal::ElasticityAssembleEA(vdim, IBlock, JBlock, ndofs, ir, *fespace, *lambda_quad, *mu_quad, *geom, *maps, emat); } } diff --git a/fem/integ/bilininteg_elasticity_kernels.cpp b/fem/integ/bilininteg_elasticity_kernels.cpp index 4bc392413b..fbcb283481 100644 --- a/fem/integ/bilininteg_elasticity_kernels.cpp +++ b/fem/integ/bilininteg_elasticity_kernels.cpp @@ -17,8 +17,8 @@ namespace mfem namespace internal { void ElasticityAddMultPA(const int dim, const int nDofs, - const FiniteElementSpace &fespace, const QuadratureFunction &lambda, - const QuadratureFunction &mu, const GeometricFactors &geom, + const FiniteElementSpace &fespace, const CoefficientVector &lambda, + const CoefficientVector &mu, const GeometricFactors &geom, const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y, const int IBlock, const int JBlock) { @@ -80,8 +80,8 @@ void ElasticityAddMultPA(const int dim, const int nDofs, } void ElasticityAssembleDiagonalPA(const int dim, const int nDofs, - const FiniteElementSpace &fespace, const QuadratureFunction &lambda, - const QuadratureFunction &mu, const GeometricFactors &geom, + const FiniteElementSpace &fespace, const CoefficientVector &lambda, + const CoefficientVector &mu, const GeometricFactors &geom, const DofToQuad &maps, QuadratureFunction &QVec, Vector &diag) { switch (dim) @@ -97,17 +97,19 @@ void ElasticityAssembleDiagonalPA(const int dim, const int nDofs, } void ElasticityAssembleEA(const int dim, const int IBlock, const int JBlock, - const int nDofs, - const FiniteElementSpace &fespace, const QuadratureFunction &lambda, - const QuadratureFunction &mu, const GeometricFactors &geom, + const int nDofs, const IntegrationRule &ir, + const FiniteElementSpace &fespace, const CoefficientVector &lambda, + const CoefficientVector &mu, const GeometricFactors &geom, const DofToQuad &maps, Vector &emat) { switch (dim) { - case 2:ElasticityAssembleEA<2>(IBlock, JBlock, nDofs, fespace, lambda, mu, geom, + case 2:ElasticityAssembleEA<2>(IBlock, JBlock, nDofs, ir, fespace, lambda, mu, + geom, maps, emat); break; - case 3:ElasticityAssembleEA<3>(IBlock, JBlock, nDofs, fespace, lambda, mu, geom, + case 3:ElasticityAssembleEA<3>(IBlock, JBlock, nDofs, ir, fespace, lambda, mu, + geom, maps, emat); break; default: diff --git a/fem/integ/bilininteg_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp index db76e54a73..be330e0471 100644 --- a/fem/integ/bilininteg_elasticity_kernels.hpp +++ b/fem/integ/bilininteg_elasticity_kernels.hpp @@ -38,6 +38,7 @@ #include "../../linalg/tensor.hpp" #include "../quadinterpolator.hpp" #include "../bilininteg.hpp" +#include "../coefficient.hpp" namespace mfem { @@ -73,8 +74,8 @@ namespace internal /// @param[in] IBlock The row dimensional component. <= dim - 1 /// @param[in] JBlock The column dimensional component. <= dim -1 void ElasticityAddMultPA(const int dim, const int nDofs, - const FiniteElementSpace &fespace, const QuadratureFunction &lambda, - const QuadratureFunction &mu, const GeometricFactors &geom, + const FiniteElementSpace &fespace, const CoefficientVector &lambda, + const CoefficientVector &mu, const GeometricFactors &geom, const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y, const int IBlock = -1, const int JBlock = -1); @@ -101,9 +102,9 @@ void ElasticityAddMultPA(const int dim, const int nDofs, /// @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 IBlock, const int JBlock, - const int nDofs, - const FiniteElementSpace &fespace, const QuadratureFunction &lambda, - const QuadratureFunction &mu, const GeometricFactors &geom, + const int nDofs, const IntegrationRule &ir, + const FiniteElementSpace &fespace, const CoefficientVector &lambda, + const CoefficientVector &mu, const GeometricFactors &geom, const DofToQuad &maps, Vector &emat); /// @brief Elasticity kernel for AssembleDiagonalPA. Whole system only. @@ -118,14 +119,14 @@ void ElasticityAssembleEA(const int dim, const int IBlock, const int JBlock, /// @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 FiniteElementSpace &fespace, const QuadratureFunction &lambda, - const QuadratureFunction &mu, const GeometricFactors &geom, + const FiniteElementSpace &fespace, 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 QuadratureFunction &lambda, const QuadratureFunction &mu, + const CoefficientVector &lambda, const CoefficientVector &mu, const GeometricFactors &geom, const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y) { @@ -141,7 +142,7 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, static constexpr bool isComponent = (IBlock >= 0); //Assuming all elements are the same - const auto &ir = lambda.GetIntRule(0); + const auto &ir = QVec.GetIntRule(0); const QuadratureInterpolator *E_To_Q_Map = fespace.GetQuadratureInterpolator( ir); E_To_Q_Map->SetOutputLayout(QVectorLayout::byNODES); @@ -256,12 +257,12 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, /// Templated implementation of ElasticityAssembleDiagonalPA. template void ElasticityAssembleDiagonalPA(const int nDofs, - const FiniteElementSpace &fespace, const QuadratureFunction &lambda, - const QuadratureFunction &mu, const GeometricFactors &geom, + const FiniteElementSpace &fespace, 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 = lambda.GetIntRule(0); + const auto &ir = QVec.GetIntRule(0); static constexpr int d = dim; int numPoints = ir.GetNPoints(); int numEls = lambda.Size()/numPoints; @@ -335,12 +336,12 @@ void ElasticityAssembleDiagonalPA(const int nDofs, //Templated implementation of ElasticityAssembleEA. template void ElasticityAssembleEA(const int IBlock, const int JBlock, const int nDofs, - const FiniteElementSpace &fespace, const QuadratureFunction &lambda, - const QuadratureFunction &mu, const GeometricFactors &geom, + const IntegrationRule &ir, + const FiniteElementSpace &fespace, const CoefficientVector &lambda, + const CoefficientVector &mu, const GeometricFactors &geom, const DofToQuad &maps, Vector &emat) { //Assuming all elements are the same - const auto &ir = lambda.GetIntRule(0); static constexpr int d = dim; int numPoints = ir.GetNPoints(); int numEls = lambda.Size()/numPoints; diff --git a/fem/integ/bilininteg_elasticity_pa.cpp b/fem/integ/bilininteg_elasticity_pa.cpp index 6d0ba43f86..eda23d3bb0 100644 --- a/fem/integ/bilininteg_elasticity_pa.cpp +++ b/fem/integ/bilininteg_elasticity_pa.cpp @@ -48,17 +48,14 @@ void ElasticityIntegrator::AssemblePA(const FiniteElementSpace &fes) } geom = mesh->GetGeometricFactors(*IntRule, GeometricFactors::JACOBIANS); quad_space = std::make_shared(*mesh, *IntRule); - lambda_quad = std::make_shared(*quad_space); - mu_quad = std::make_shared(*quad_space); + lambda_quad = std::make_shared(lambda, *quad_space, + CoefficientStorage::FULL); + mu_quad = std::make_shared(mu, *quad_space, + CoefficientStorage::FULL); q_vec = std::make_shared(*quad_space, vdim*vdim); - lambda->Project(*lambda_quad); - mu->Project(*mu_quad); auto ordering = GetEVectorOrdering(*fespace); auto mode = ordering == ElementDofOrdering::NATIVE ? DofToQuad::FULL : DofToQuad::LEXICOGRAPHIC_FULL; - // Should be FULL if native and LEXICOGRAPHIC_FULL ow? should there be another function? - // maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, DofToQuad::FULL, ordering); - // maybe make a function of fespace as well, something that returns FULL, LEXICO, or TENSOR maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, mode); } PACalled = true; From 01bd1a11422b7348852b320da9584c65dd7a50c1 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Tue, 5 Dec 2023 10:40:12 -0700 Subject: [PATCH 066/200] Added checks to make sure compression types of CoefficientVector were supported. Refactored to remove need for PACalled. Made QuadratureFunction a forward declaration in bilininteg instead of an include. --- fem/bilininteg.hpp | 5 +- fem/integ/bilininteg_elasticity_kernels.cpp | 11 ++++ fem/integ/bilininteg_elasticity_kernels.hpp | 25 ++++++-- fem/integ/bilininteg_elasticity_pa.cpp | 67 ++++++++++----------- 4 files changed, 65 insertions(+), 43 deletions(-) diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index 67ea987322..23ee26f573 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -16,7 +16,6 @@ #include "nonlininteg.hpp" #include "fespace.hpp" #include "ceed/interface/util.hpp" -#include "qfunction.hpp" #include namespace mfem @@ -2981,6 +2980,7 @@ public: // Forward declarations class CoefficientVector; +class QuadratureFunction; /** Integrator for the linear elasticity form: a(u,v) = (lambda div(u), div(v)) + (2 mu e(u), e(v)), @@ -3009,14 +3009,13 @@ private: const GeometricFactors *geom; ///< Not owned int vdim, ndofs; const FiniteElementSpace *fespace; ///< Not owned. - bool PACalled = false; //Component integrator int IBlock = -1; int JBlock = -1; /// @brief Pointer to an integrator from which a component integrator is /// derived. Should be nullptr for the original integrator. Not owned. - const ElasticityIntegrator *parent = nullptr; + ElasticityIntegrator *parent = nullptr; std::shared_ptr componentFESpace = nullptr; public: diff --git a/fem/integ/bilininteg_elasticity_kernels.cpp b/fem/integ/bilininteg_elasticity_kernels.cpp index fbcb283481..26c36b0dd3 100644 --- a/fem/integ/bilininteg_elasticity_kernels.cpp +++ b/fem/integ/bilininteg_elasticity_kernels.cpp @@ -16,6 +16,17 @@ namespace mfem namespace internal { +void ElastAssertCompressionSupported(const CoefficientVector &cv, + const IntegrationRule &ir, const FiniteElementSpace &fespace) +{ + const int numPoints = ir.GetNPoints(); + const int vDim = cv.GetVDim(); + const int size = cv.Size(); + const int numEls = fespace.GetNE(); + MFEM_VERIFY(vDim == 1, "Invalid paramter dimension."); + MFEM_VERIFY(size/vDim/numPoints == numEls, "Compression type not supported."); +} + void ElasticityAddMultPA(const int dim, const int nDofs, const FiniteElementSpace &fespace, const CoefficientVector &lambda, const CoefficientVector &mu, const GeometricFactors &geom, diff --git a/fem/integ/bilininteg_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp index be330e0471..1fcf26a135 100644 --- a/fem/integ/bilininteg_elasticity_kernels.hpp +++ b/fem/integ/bilininteg_elasticity_kernels.hpp @@ -39,12 +39,19 @@ #include "../quadinterpolator.hpp" #include "../bilininteg.hpp" #include "../coefficient.hpp" +#include "../qfunction.hpp" namespace mfem { namespace internal { +/// @brief Assert that the CoefficientStorage type is supported by the kernel. +/// For now, CoefficientStorage is inferred from the size of the cv, ir, and fespace. +/// The kernels currently only support CoefficientVectors created with CoefficientStorage::FULL. +void ElastAssertCompressionSupported(const CoefficientVector &cv, + const IntegrationRule &ir, const FiniteElementSpace &fespace); + /// @brief Elasticity kernel for AddMultPA. /// /// Performs y += Ax. Implemented for byNODES ordering only, and does not @@ -143,6 +150,8 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, //Assuming all elements are the same const auto &ir = QVec.GetIntRule(0); + ElastAssertCompressionSupported(lambda, ir,fespace); + ElastAssertCompressionSupported(mu, ir,fespace); const QuadratureInterpolator *E_To_Q_Map = fespace.GetQuadratureInterpolator( ir); E_To_Q_Map->SetOutputLayout(QVectorLayout::byNODES); @@ -151,8 +160,8 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, E_To_Q_Map->Mult(x,QuadratureInterpolator::PHYSICAL_DERIVATIVES, junk, QVec, junk); - int numPoints = ir.GetNPoints(); - int numEls = lambda.Size()/numPoints; + 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); @@ -263,9 +272,11 @@ void ElasticityAssembleDiagonalPA(const int nDofs, { //Assuming all elements are the same const auto &ir = QVec.GetIntRule(0); + ElastAssertCompressionSupported(lambda, ir,fespace); + ElastAssertCompressionSupported(mu, ir,fespace); static constexpr int d = dim; - int numPoints = ir.GetNPoints(); - int numEls = lambda.Size()/numPoints; + 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); @@ -343,8 +354,10 @@ void ElasticityAssembleEA(const int IBlock, const int JBlock, const int nDofs, { //Assuming all elements are the same static constexpr int d = dim; - int numPoints = ir.GetNPoints(); - int numEls = lambda.Size()/numPoints; + const int numPoints = ir.GetNPoints(); + ElastAssertCompressionSupported(lambda, ir,fespace); + ElastAssertCompressionSupported(mu, ir,fespace); + 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); diff --git a/fem/integ/bilininteg_elasticity_pa.cpp b/fem/integ/bilininteg_elasticity_pa.cpp index eda23d3bb0..4ba479381f 100644 --- a/fem/integ/bilininteg_elasticity_pa.cpp +++ b/fem/integ/bilininteg_elasticity_pa.cpp @@ -20,45 +20,44 @@ namespace mfem void ElasticityIntegrator::AssemblePA(const FiniteElementSpace &fes) { + if(parent){ + // This is a component integrator, so just make sure monolithic operator + // is assembled. + parent->AssemblePA(fes); + return; + } + const bool alreadyAssembled = bool(lambda_quad); + if(alreadyAssembled){ + // Don't reassemble vectors. + return; + } MFEM_VERIFY(fes.GetOrdering() == Ordering::byNODES, "Elasticity PA only implemented for byNODES ordering."); - if (!parent) - { - fespace = &fes; - } - else - { - MFEM_VERIFY(parent->PACalled, - "Parent integrator needs to have been partially assembled."); - } - if (!parent) + fespace = &fes; + const auto el = fespace->GetFE(0); + ndofs = el->GetDof(); + const auto mesh = fespace->GetMesh(); + vdim = fespace->GetVDim(); + const IntegrationRule *ir = IntRule; + if (ir == nullptr) { - const auto el = fes.GetFE(0); - ndofs = el->GetDof(); - const auto mesh = fes.GetMesh(); - vdim = fes.GetVDim(); - const IntegrationRule *ir = IntRule; - if (ir == NULL) - { - //This is where it's assumed that all elements are the same. - const auto Trans = fes.GetElementTransformation(0); - int order = 2 * Trans->OrderGrad(el); - IntRule = &IntRules.Get(el->GetGeomType(), order); - } - geom = mesh->GetGeometricFactors(*IntRule, GeometricFactors::JACOBIANS); - quad_space = std::make_shared(*mesh, *IntRule); - lambda_quad = std::make_shared(lambda, *quad_space, - CoefficientStorage::FULL); - mu_quad = std::make_shared(mu, *quad_space, - CoefficientStorage::FULL); - q_vec = std::make_shared(*quad_space, vdim*vdim); - auto ordering = GetEVectorOrdering(*fespace); - auto mode = ordering == ElementDofOrdering::NATIVE ? DofToQuad::FULL : - DofToQuad::LEXICOGRAPHIC_FULL; - maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, mode); + //This is where it's assumed that all elements are the same. + const auto Trans = fespace->GetElementTransformation(0); + int order = 2 * Trans->OrderGrad(el); + IntRule = &IntRules.Get(el->GetGeomType(), order); } - PACalled = true; + geom = mesh->GetGeometricFactors(*IntRule, GeometricFactors::JACOBIANS); + quad_space = std::make_shared(*mesh, *IntRule); + lambda_quad = std::make_shared(lambda, *quad_space, + CoefficientStorage::FULL); + mu_quad = std::make_shared(mu, *quad_space, + CoefficientStorage::FULL); + q_vec = std::make_shared(*quad_space, vdim*vdim); + auto ordering = GetEVectorOrdering(*fespace); + auto mode = ordering == ElementDofOrdering::NATIVE ? DofToQuad::FULL : + DofToQuad::LEXICOGRAPHIC_FULL; + maps = &fespace->GetFE(0)->GetDofToQuad(*IntRule, mode); } void ElasticityIntegrator::AssembleDiagonalPA(Vector &diag) From 92a11125c87698395928891de570fcb979cdbc81 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Tue, 5 Dec 2023 10:40:52 -0700 Subject: [PATCH 067/200] astyle --- fem/integ/bilininteg_elasticity_pa.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fem/integ/bilininteg_elasticity_pa.cpp b/fem/integ/bilininteg_elasticity_pa.cpp index 4ba479381f..4238db6ca2 100644 --- a/fem/integ/bilininteg_elasticity_pa.cpp +++ b/fem/integ/bilininteg_elasticity_pa.cpp @@ -20,14 +20,16 @@ namespace mfem void ElasticityIntegrator::AssemblePA(const FiniteElementSpace &fes) { - if(parent){ + if (parent) + { // This is a component integrator, so just make sure monolithic operator // is assembled. parent->AssemblePA(fes); return; } const bool alreadyAssembled = bool(lambda_quad); - if(alreadyAssembled){ + if (alreadyAssembled) + { // Don't reassemble vectors. return; } From 49cfe29ce9e026a31c9143d470ce12300bc60af0 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 12 Dec 2023 11:26:33 -0800 Subject: [PATCH 068/200] Update fem/bilinearform.hpp Co-authored-by: Dennis Ogiermann --- fem/bilinearform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 27149a2dca..157c5ad132 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -809,7 +809,7 @@ public: (currently returns NULL)*/ virtual MatrixInverse *Inverse() const; - /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is LEGACY.*/ + /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is AssemblyLevel::LEGACY.*/ virtual void Finalize(int skip_zeros = 1); /** @brief Extract the associated matrix as SparseMatrix blocks. The number of From 9c69032e49051d8362137af64deb01fa3306d089 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 12 Dec 2023 11:26:46 -0800 Subject: [PATCH 069/200] Update fem/bilinearform.hpp Co-authored-by: Dennis Ogiermann --- fem/bilinearform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 157c5ad132..023b424145 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -73,7 +73,7 @@ protected: /// FE space on which the form lives. Not owned. FiniteElementSpace *fes; - /// The ::AssemblyLevel of the form (LEGACY, FULL, ELEMENT, PARTIAL) + /// 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.) From 6df0133c11219b97a348cf477a8b168455da9d89 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 12 Dec 2023 11:27:03 -0800 Subject: [PATCH 070/200] Update fem/bilinearform.hpp Co-authored-by: Dennis Ogiermann --- fem/bilinearform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 023b424145..c3419f5c9c 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -132,7 +132,7 @@ protected: 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 From 35c8f43d371961cccbb20426a088968410861ad4 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 12 Dec 2023 11:27:13 -0800 Subject: [PATCH 071/200] Update fem/bilinearform.hpp Co-authored-by: Dennis Ogiermann --- fem/bilinearform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index c3419f5c9c..70acbf5ce4 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -136,7 +136,7 @@ protected: void AllocMat(); /** @brief For partially conforming trial and/or test FE spaces, complete the - assembly process by performing A := P^t A P where A is the internal + assembly process by performing \f$ A := P^t A P\f$ where A is the internal sparse matrix and P is the conforming prolongation matrice of the trial/test FE space. After this call the BilinearForm becomes an operator on the conforming FE space. */ From 0905c430e662b82569ebb97ca74750ed71b0c485 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 12 Dec 2023 11:27:27 -0800 Subject: [PATCH 072/200] Update fem/bilinearform.hpp Co-authored-by: Dennis Ogiermann --- fem/bilinearform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 70acbf5ce4..a16a327461 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -256,7 +256,7 @@ public: void UseSparsity(SparseMatrix &A); /** @brief Pre-allocate the internal SparseMatrix before assembly. - If the flag 'precompute sparsity' + 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(); } } From 1cda92a06c097ae97d47e05a3b3716623240d8fc Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 12 Dec 2023 11:27:38 -0800 Subject: [PATCH 073/200] Update fem/bilinearform.hpp Co-authored-by: Dennis Ogiermann --- fem/bilinearform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index a16a327461..8cb87dc10e 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -1039,7 +1039,7 @@ public: A.MakeRef(*A_ptr); } - /// Must be called after making changes to trial_fes or test_fes. + /// Must be called after making changes to #trial_fes or #test_fes. void Update(); /// Return the trial FE space associated with the BilinearForm. From 311be95810547202f3ce50f6b3b438ad586f2944 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Fri, 15 Dec 2023 09:17:10 -0800 Subject: [PATCH 074/200] Rename GetBdrElementAdjacentElement2 to GetBdrElementAdjacentElementWithInverseOrientation --- mesh/mesh.cpp | 10 ++++++++-- mesh/mesh.hpp | 5 +++++ mesh/submesh/submesh_utils.cpp | 5 ++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/mesh/mesh.cpp b/mesh/mesh.cpp index 7e57ae2e2f..c92bcb7079 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp @@ -471,7 +471,7 @@ void Mesh::GetBdrElementTransformation(int i, IsoparametricTransformation* ElTr) else // L2 Nodes (e.g., periodic mesh) { int elem_id, face_info; - GetBdrElementAdjacentElement2(i, elem_id, face_info); + GetBdrElementAdjacentElementWithInverseOrientation(i, elem_id, face_info); GetLocalFaceTransformation(GetBdrElementType(i), GetElementType(elem_id), @@ -7145,7 +7145,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::GetBdrElementAdjacentElementWithInverseOrientation( + int bdr_el, int &el, int &info) const { int fid = GetBdrElementFaceIndex(bdr_el); @@ -7167,6 +7168,11 @@ void Mesh::GetBdrElementAdjacentElement2(int bdr_el, int &el, int &info) const info = fi.Elem1Inf + ori; } +void Mesh::GetBdrElementAdjacentElement2(int bdr_el, int &el, int &info) const +{ + GetBdrElementAdjacentElementWithInverseOrientation(bdr_el, el, info); +} + Element::Type Mesh::GetElementType(int i) const { return elements[i]->GetType(); diff --git a/mesh/mesh.hpp b/mesh/mesh.hpp index f396ff91d5..2ab9f92361 100644 --- a/mesh/mesh.hpp +++ b/mesh/mesh.hpp @@ -1473,6 +1473,11 @@ public: boundary element. @sa GetBdrElementAdjacentElement() */ + void GetBdrElementAdjacentElementWithInverseOrientation( + int bdr_el, int &el, int &info) const; + + /// Deprecated in favor of GetBdrElementAdjacentElementWithInverseOrientation + MFEM_DEPRECATED void GetBdrElementAdjacentElement2(int bdr_el, int &el, int &info) const; /// @brief Return the local face (codimension-1) index for the given boundary diff --git a/mesh/submesh/submesh_utils.cpp b/mesh/submesh/submesh_utils.cpp index c9a021dfe2..8d1b0e42f2 100644 --- a/mesh/submesh/submesh_utils.cpp +++ b/mesh/submesh/submesh_utils.cpp @@ -118,9 +118,8 @@ void BuildVdofToVdofMap(const FiniteElementSpace& subfes, auto pm = parentfes.GetMesh(); int face_info, parent_volel_id; - pm->GetBdrElementAdjacentElement2(parent_element_ids[i], - parent_volel_id, - face_info); + pm->GetBdrElementAdjacentElementWithInverseOrientation( + parent_element_ids[i], parent_volel_id, face_info); pm->GetLocalFaceTransformation( pm->GetBdrElementType(parent_element_ids[i]), pm->GetElementType(parent_volel_id), From 5f5a0e5fe62c1ff4399eddcb59880bf9bb7d489c Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Tue, 19 Dec 2023 06:19:05 -0700 Subject: [PATCH 075/200] Implement transpose of constrained operator. --- linalg/operator.cpp | 33 ++++++++++++++-- linalg/operator.hpp | 7 ++++ tests/unit/linalg/test_operator.cpp | 60 ++++++++++++++++++++++++++++- 3 files changed, 95 insertions(+), 5 deletions(-) diff --git a/linalg/operator.cpp b/linalg/operator.cpp index 1f214ece7a..bc762eee32 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -544,12 +544,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 +568,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 +606,18 @@ 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); +} + RectangularConstrainedOperator::RectangularConstrainedOperator( Operator *A, const Array &trial_list, diff --git a/linalg/operator.hpp b/linalg/operator.hpp index baa9bf7672..6f17e772a7 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -924,6 +924,13 @@ public: the vectors, and "_i" -- the rest of the entries. */ virtual void Mult(const Vector &x, Vector &y) const; + virtual void MultTranspose(const Vector &x, Vector &y) const; + + /** @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; } } }; diff --git a/tests/unit/linalg/test_operator.cpp b/tests/unit/linalg/test_operator.cpp index 8e6fe0fd01..7d4107a1b9 100644 --- a/tests/unit/linalg/test_operator.cpp +++ b/tests/unit/linalg/test_operator.cpp @@ -12,10 +12,10 @@ #include "mfem.hpp" #include "unit_tests.hpp" -#ifdef MFEM_USE_EXCEPTIONS - using namespace mfem; +#ifdef MFEM_USE_EXCEPTIONS + TEST_CASE("Operator", "[Operator]") { // Define diagonal sparse matrix @@ -48,3 +48,59 @@ TEST_CASE("Operator", "[Operator]") } #endif // MFEM_USE_EXCEPTIONS + +double constrained_mult_application(Operator &op, Array &list, + const Vector &input, const Vector &truth, const bool transpose = false, + const Operator::DiagonalPolicy diag_policy = Operator::DiagonalPolicy::DIAG_ONE) +{ + const ConstrainedOperator constrained_op(&op, list, false, diag_policy); + // Make sure test is well formed. + CHECK(op.Width() == input.Size()); + CHECK(op.Height() == truth.Size()); + Vector y(op.Height()); + if (transpose) + { + constrained_op.MultTranspose(input,y); + } + else + { + constrained_op.Mult(input,y); + } + auto error = truth; + error -= y; + auto error_norm = error.Norml2() / truth.Norml2(); + return error_norm; +} + +TEST_CASE("ConstrainedOperator", "[ConstrainedOperator][Operator]") +{ + INFO("Constrained Operator"); + // Compare against manual calculation with random 5x5 matrix and input vector. + // Should leave first and fourth entries the same for DIAG_ONE, and zero them + // out for DIAG_ZERO. + DenseMatrix A( + { + {27.531558467881045, 89.30012682807859, 10.363408976942745, 78.97400291889993, 18.703638414621903 }, + {79.33627624921924, 73.99743336818197, 85.27832370283267, 11.13213120570734, 27.59542336254316}, + {26.474414966916925, 17.38636366801234, 41.423691595967114, 94.06135498225382, 18.379018138899884}, + {45.83203742468528, 90.10126513894627, 3.8488872448446343, 41.03858238887901, 14.429143614063412}, + {26.2225932381016, 3.8232081630501513, 17.820832452264256, 3.919068726019015, 92.66801110040682} + }); + Array list(2); + list[0] = 0; + list[1] = 3; + Vector x({62.06906909143156, 63.31143800813616, 59.6546764326512, 48.10287136113324, 0.4275152133050852}); + // DIAG_ONE checks + Vector y_true({62.06906909143156, 9783.932185967293, 3579.7299142176153, 48.10287136113324, 1344.7657848396123}); + Vector y_true_transpose({62.06906909143156, 5723.696294059853, 7877.828900340113, 48.10287136113324, 2883.1173002839714}); + REQUIRE(constrained_mult_application(A, list, x, y_true) == MFEM_Approx(0.0)); + REQUIRE(constrained_mult_application(A, list, x, y_true_transpose, + true) == MFEM_Approx(0.0)); + // DIAG_ZERO checks + Vector y_true_zero({0., 9783.932185967293, 3579.7299142176153, 0., 1344.7657848396123}); + Vector y_true_zero_transpose({0, 5723.696294059853, 7877.828900340113, 0., 2883.1173002839714}); + REQUIRE(constrained_mult_application(A, list, x, y_true_zero, false, + Operator::DiagonalPolicy::DIAG_ZERO) == MFEM_Approx(0.0)); + REQUIRE(constrained_mult_application(A, list, x, y_true_zero_transpose, true, + Operator::DiagonalPolicy::DIAG_ZERO) == MFEM_Approx(0.0)); +} From 6b8dd71da7d88870040e2a58857d2a677721f8bc Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Tue, 19 Dec 2023 10:54:50 -0800 Subject: [PATCH 076/200] Remove shared pointed for BilForms. --- miniapps/solvers/block-solvers.cpp | 27 ++++++++++++--------------- miniapps/solvers/bramble_pasciak.cpp | 4 ++-- miniapps/solvers/bramble_pasciak.hpp | 4 ++-- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index 2b6f2550f0..f328df2360 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -90,8 +90,8 @@ class DarcyProblem ParGridFunction u_; ParGridFunction p_; ParMesh mesh_; - std::shared_ptr mVarf_; - std::shared_ptr bVarf_; + ParBilinearForm *mVarf_; + ParMixedBilinearForm *bVarf_; VectorFunctionCoefficient ucoeff_; FunctionCoefficient pcoeff_; DFSSpaces dfs_spaces_; @@ -108,8 +108,8 @@ public: const DFSData& GetDFSData() const { return dfs_spaces_.GetDFSData(); } void ShowError(const Vector &sol, bool verbose); void VisualizeSolution(const Vector &sol, std::string tag); - std::shared_ptr GetMform() const { return mVarf_; } - std::shared_ptr GetBform() const { return bVarf_; } + ParBilinearForm* GetMform() const { return mVarf_; } + ParMixedBilinearForm* GetBform() const { return bVarf_; } }; DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, @@ -153,12 +153,9 @@ DarcyProblem::DarcyProblem(Mesh &mesh, int num_refs, int order, gform.AddDomainIntegrator(new DomainLFIntegrator(gcoeff)); gform.Assemble(); - // ParBilinearForm mVarf_(dfs_spaces_.GetHdivFES()); - // ParMixedBilinearForm bVarf_(dfs_spaces_.GetHdivFES(), dfs_spaces_.GetL2FES()); - - mVarf_ = make_shared(dfs_spaces_.GetHdivFES()); - bVarf_ = make_shared(dfs_spaces_.GetHdivFES(), - dfs_spaces_.GetL2FES()); + mVarf_ = new ParBilinearForm(dfs_spaces_.GetHdivFES()); + bVarf_ = new ParMixedBilinearForm(dfs_spaces_.GetHdivFES(), + dfs_spaces_.GetL2FES()); mVarf_->AddDomainIntegrator(new VectorFEMassIntegrator(mass_coeff)); mVarf_->ComputeElementMatrices(); @@ -311,12 +308,12 @@ int main(int argc, char *argv[]) mesh->UniformRefinement(); } - if (Mpi::Root()) + if (Mpi::Root() && Mpi::WorldSize() > mesh->GetNE()) { - MFEM_ASSERT(Mpi::WorldSize() < mesh->GetNE(), - "Not enough elements in the mesh to be distributed:\n" - << "Number of processors: " << Mpi::WorldSize() << "\n" - << "Number of elements: " << mesh->GetNE()); + cout << "\nWARNING: Number of processors is greater than the number of " + << "elements in the mesh.\n" + << "Number of processors: " << Mpi::WorldSize() << "\n" + << "Number of elements: " << mesh->GetNE() << "\n\n"; } Array ess_bdr(mesh->bdr_attributes.Max()); diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 694c37bbe7..63af41015e 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -20,8 +20,8 @@ namespace blocksolvers { /// Bramble-Pasciak Solver BramblePasciakSolver::BramblePasciakSolver( - const std::shared_ptr &mVarf, - const std::shared_ptr &bVarf, + ParBilinearForm *mVarf, + ParMixedBilinearForm *bVarf, const BPSParameters ¶m) : DarcySolver(mVarf->ParFESpace()->GetTrueVSize(), bVarf->TestFESpace()->GetTrueVSize()) diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index 71993617a3..c2f2a815e6 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -137,8 +137,8 @@ class BramblePasciakSolver : public DarcySolver public: /// System and mass preconditioner are constructed from bilinear forms BramblePasciakSolver( - const std::shared_ptr &mVarf, - const std::shared_ptr &bVarf, + ParBilinearForm *mVarf, + ParMixedBilinearForm *bVarf, const BPSParameters ¶m); /// System and mass preconditioner are user-provided From 6f32219308d6140db3d9254ec7a4c4510a0d003b Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Tue, 19 Dec 2023 12:43:48 -0800 Subject: [PATCH 077/200] Add inverse power iteration --- miniapps/solvers/block-solvers.cpp | 60 ++++++++++++---------------- miniapps/solvers/bramble_pasciak.cpp | 48 ++++++++++++++++------ 2 files changed, 61 insertions(+), 47 deletions(-) diff --git a/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index f328df2360..2716f39db5 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-solvers.cpp @@ -201,8 +201,8 @@ void DarcyProblem::ShowError(const Vector& sol, bool verbose) double norm_p = ComputeGlobalLpNorm(2, pcoeff_, mesh_, irs_); if (!verbose) { return; } - cout << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n"; - cout << "|| p_h - p_ex || / || p_ex || = " << err_p / norm_p << "\n"; + mfem::out << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n"; + mfem::out << "|| p_h - p_ex || / || p_ex || = " << err_p / norm_p << "\n"; } void DarcyProblem::VisualizeSolution(const Vector& sol, string tag) @@ -238,8 +238,8 @@ bool IsAllNeumannBoundary(const Array& ess_bdr_attr) int main(int argc, char *argv[]) { #ifdef HYPRE_USING_GPU - cout << "\nAs of mfem-4.3 and hypre-2.22.0 (July 2021) this miniapp\n" - << "is NOT supported with the GPU version of hypre.\n\n"; + mfem::out << "\nAs of mfem-4.3 and hypre-2.22.0 (July 2021) this miniapp\n" + << "is NOT supported with the GPU version of hypre.\n\n"; return 242; #endif @@ -260,9 +260,7 @@ int main(int argc, char *argv[]) bool visualization = false; DFSParameters param; -#ifdef MFEM_USE_LAPACK BPSParameters bps_param; -#endif OptionsParser args(argc, argv); args.AddOption(&mesh_file, "-m", "--mesh", @@ -288,7 +286,7 @@ int main(int argc, char *argv[]) if (Mpi::Root() && par_ref_levels == 0) { - std::cout << "WARNING: DivFree solver is equivalent to BDPMinresSolver " + mfem::out << "WARNING: DivFree solver is equivalent to BDPMinresSolver " << "when par_ref_levels == 0.\n"; } @@ -299,8 +297,8 @@ int main(int argc, char *argv[]) if (Mpi::Root()) { - cout << "Number of serial refinements: " << ser_ref_levels << "\n" - << "Number of parallel refinements: " << par_ref_levels << "\n"; + mfem::out << "Number of serial refinements: " << ser_ref_levels << "\n" + << "Number of parallel refinements: " << par_ref_levels << "\n"; } for (int i = 0; i < ser_ref_levels; ++i) @@ -310,10 +308,10 @@ int main(int argc, char *argv[]) if (Mpi::Root() && Mpi::WorldSize() > mesh->GetNE()) { - cout << "\nWARNING: Number of processors is greater than the number of " - << "elements in the mesh.\n" - << "Number of processors: " << Mpi::WorldSize() << "\n" - << "Number of elements: " << mesh->GetNE() << "\n\n"; + mfem::out << "\nWARNING: Number of processors is greater than the number of " + << "elements in the mesh.\n" + << "Number of processors: " << Mpi::WorldSize() << "\n" + << "Number of elements: " << mesh->GetNE() << "\n\n"; } Array ess_bdr(mesh->bdr_attributes.Max()); @@ -327,9 +325,9 @@ int main(int argc, char *argv[]) { if (Mpi::Root()) { - cout << "\nSolution is not unique when Neumann boundary condition is " - << "imposed on the entire boundary. \nPlease provide a different " - << "boundary condition.\n"; + mfem::out << "\nSolution is not unique when Neumann boundary condition is " + << "imposed on the entire boundary. \nPlease provide a different " + << "boundary condition.\n"; } delete mesh; return 0; @@ -348,13 +346,13 @@ int main(int argc, char *argv[]) if (Mpi::Root()) { - cout << line << "System assembled in " << chrono.RealTime() << "s.\n"; - cout << "Dimension of the physical space: " << dim << "\n"; - cout << "Size of the discrete Darcy system: " << M.M() + B.M() << "\n"; + mfem::out << line << "System assembled in " << chrono.RealTime() << "s.\n"; + mfem::out << "Dimension of the physical space: " << dim << "\n"; + mfem::out << "Size of the discrete Darcy system: " << M.M() + B.M() << "\n"; if (par_ref_levels > 0) { - cout << "Dimension of the divergence free subspace: " - << DFS_data.C.back().Ptr()->NumCols() << "\n\n"; + mfem::out << "Dimension of the divergence free subspace: " + << DFS_data.C.back().Ptr()->NumCols() << "\n\n"; } } @@ -373,7 +371,6 @@ int main(int argc, char *argv[]) DivFreeSolver dfs_cm(M, B, DFS_data); setup_time[&dfs_cm] = chrono.RealTime(); -#ifdef MFEM_USE_LAPACK chrono.Restart(); BramblePasciakSolver bp_bpcg(darcy.GetMform(), darcy.GetBform(), bps_param); setup_time[&bp_bpcg] = chrono.RealTime(); @@ -382,18 +379,13 @@ int main(int argc, char *argv[]) bps_param.use_bpcg = false; BramblePasciakSolver bp_pcg(darcy.GetMform(), darcy.GetBform(), bps_param); setup_time[&bp_pcg] = chrono.RealTime(); -#else - MFEM_WARNING("BramblePasciakSolver class unavailable: Compiled without LAPACK"); -#endif std::map solver_to_name; solver_to_name[&bdp] = "Block-diagonal-preconditioned MINRES"; solver_to_name[&dfs_dm] = "Divergence free (decoupled mode)"; solver_to_name[&dfs_cm] = "Divergence free (coupled mode)"; -#ifdef MFEM_USE_LAPACK solver_to_name[&bp_bpcg] = "Bramble Pasciak CG (using BPCG)"; solver_to_name[&bp_pcg] = "Bramble Pasciak CG (using regular PCG)"; -#endif // Solve the problem using all solvers for (const auto& solver_pair : solver_to_name) @@ -409,11 +401,11 @@ int main(int argc, char *argv[]) if (Mpi::Root()) { - cout << line << name << " solver:\n Setup time: " - << setup_time[solver] << "s.\n Solve time: " - << chrono.RealTime() << "s.\n Total time: " - << setup_time[solver] + chrono.RealTime() << "s.\n" - << " Iteration count: " << solver->GetNumIterations() <<"\n\n"; + mfem::out << line << name << " solver:\n Setup time: " + << setup_time[solver] << "s.\n Solve time: " + << chrono.RealTime() << "s.\n Total time: " + << setup_time[solver] + chrono.RealTime() << "s.\n" + << " Iteration count: " << solver->GetNumIterations() <<"\n\n"; } if (show_error && std::strcmp(coef_file, "") == 0) { @@ -421,8 +413,8 @@ int main(int argc, char *argv[]) } else if (show_error && Mpi::Root()) { - cout << "Exact solution is unknown for coefficient '" << coef_file - << "'.\nApproximation error is computed in this case!\n\n"; + mfem::out << "Exact solution is unknown for coefficient '" << coef_file + << "'.\nApproximation error is computed in this case!\n\n"; } if (visualization) { darcy.VisualizeSolution(sol, name); } diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 63af41015e..1f605aef1c 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -135,36 +135,58 @@ void BramblePasciakSolver::Init( HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( ParBilinearForm &mVarf, double q_scaling) { -#ifdef MFEM_USE_LAPACK MFEM_ASSERT((q_scaling > 0.0) && (q_scaling < 1.0), "Invalid Q-scaling factor: q_scaling = " << q_scaling ); ParBilinearForm qVarf(mVarf.ParFESpace()); +#ifndef MFEM_USE_LAPACK + if (Mpi::Root()) + { + mfem::out << "Warning: Using inverse power method to compute the minimum " + << "eigenvalue of the small eigenvalue problem.\n"; + mfem::out << " Consider compiling MFEM with LAPACK support.\n"; + } +#endif for (int i = 0; i < mVarf.ParFESpace()->GetNE(); ++i) { - DenseMatrix M_i, Q_i, evec; - Vector eval, diag_i; - double scaling = 0.0; - + DenseMatrix M_i, Q_i; + Vector diag_i; + double scaling = 0.0, eval_i = 0.0; mVarf.ComputeElementMatrix(i, M_i); M_i.GetDiag(diag_i); // M_i <- D^{-1/2} M_i D^{-1/2}, where D = diag(M_i) M_i.InvSymmetricScaling(diag_i); // M_i x = ev diag(M_i) x +#ifdef MFEM_USE_LAPACK + DenseMatrix evec; + Vector eval; M_i.Eigenvalues(eval, evec); - - scaling = q_scaling*eval.Min(); + eval_i = eval.Min(); +#else + // Inverse power method + Vector x(M_i.Height()), Mx(M_i.Height()), diff(M_i.Height()); + double eval_prev = 0.0; + int iter = 0; + x.Randomize(); + do + { + eval_prev = eval_i; + M_i.Inverse()->Mult(x, Mx); + eval_i = Mx.Norml2(); + x.Set(1.0/eval_i, Mx); + ++iter; + } + while ((iter < 1000) && (fabs(eval_i - eval_prev)/fabs(eval_i) > 1e-12)); + MFEM_VERIFY((iter <= 1000) && (fabs(eval_i - eval_prev)/fabs(eval_i) <= 1e-12), + "Inverse power method did not converge."); + eval_i = 1.0/eval_i; +#endif + scaling = q_scaling*eval_i; diag_i.Set(scaling, diag_i); Q_i.Diag(diag_i.GetData(), diag_i.Size()); qVarf.AssembleElementMatrix(i, Q_i, 1); } qVarf.Finalize(); return qVarf.ParallelAssemble(); -#else - MFEM_CONTRACT_VAR(mVarf); - MFEM_CONTRACT_VAR(q_scaling); - mfem_error("BramblePasciakSolver::ConstructMassPreconditioner: Compiled without LAPACK"); - return nullptr; -#endif } void BramblePasciakSolver::Mult(const Vector & x, Vector & y) const From cd2233936c180a2de02211cf197b10226e3e9f8b Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Tue, 19 Dec 2023 13:15:16 -0800 Subject: [PATCH 078/200] Fix bugs in Bramble-Pasciak solver with empty mesh partitions --- miniapps/solvers/bramble_pasciak.cpp | 1 + miniapps/solvers/div_free_solver.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 1f605aef1c..53d95f9ecd 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -138,6 +138,7 @@ HypreParMatrix *BramblePasciakSolver::ConstructMassPreconditioner( MFEM_ASSERT((q_scaling > 0.0) && (q_scaling < 1.0), "Invalid Q-scaling factor: q_scaling = " << q_scaling ); ParBilinearForm qVarf(mVarf.ParFESpace()); + qVarf.AllocateMatrix(); #ifndef MFEM_USE_LAPACK if (Mpi::Root()) { diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index d0db7946bc..404345283e 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -47,9 +47,12 @@ DFSSpaces::DFSSpaces(int order, int num_refine, ParMesh *mesh, : hdiv_fec_(order, mesh->Dimension()), l2_fec_(order, mesh->Dimension()), l2_0_fec_(0, mesh->Dimension()), ess_bdr_attr_(ess_attr), level_(0) { - if (mesh->GetElement(0)->GetType() == Element::TETRAHEDRON && order) + if (mesh->GetNE() > 0) { - mfem_error("DFSDataCollector: High order spaces on tetrahedra are not supported"); + if (mesh->GetElement(0)->GetType() == Element::TETRAHEDRON && order) + { + MFEM_ABORT("DFSDataCollector: High order spaces on tetrahedra are not supported"); + } } data_.param = param; From 8fdc0c81cb424999885af0d3e94c1b8b7b3ff718 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Tue, 19 Dec 2023 15:19:47 -0800 Subject: [PATCH 079/200] Fix CHANGELOG --- CHANGELOG | 9 --------- 1 file changed, 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index aec6e82937..13243a404d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -107,15 +107,6 @@ New and updated examples and miniapps The new solver is based on a Bramble-Pasciak preconditioning. User can use and implement their own preconditioner for the mass matrix. -- Added a new miniapp, Mesh Quality, for evaluating mesh quality using size, - skewness, and aspect-ratio computed from the Jacobian of the transformation. - -- Added a new miniapp for interface and boundary fitting to implicit domains - defined using level-set functions. See miniapps/meshing/pmesh-fitting.cpp. - -- Added a new miniapp for fitting of selected mesh nodes to specified positions, - while maintaining mesh quality. See miniapps/meshing/fit-node-position.cpp. - - Added a new H(div) solver miniapp demonstrating the use of a matrix-free saddle-point solver methodology, suitable for high-order discretizations and for GPU acceleration. Examples illustrating the solution of Darcy and grad-div From 5cdfd846357952f33e761ce9056ac154e618d7a0 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 20 Dec 2023 10:58:45 -0800 Subject: [PATCH 080/200] Simplify NodalFiniteElement::CreateLexicographicFullMap --- fem/fe/fe_base.cpp | 92 ++++++++++++++-------------------------------- 1 file changed, 28 insertions(+), 64 deletions(-) diff --git a/fem/fe/fe_base.cpp b/fem/fe/fe_base.cpp index acf59a8290..20b722c68f 100644 --- a/fem/fe/fe_base.cpp +++ b/fem/fe/fe_base.cpp @@ -644,82 +644,46 @@ const auto *d2q_new = new DofToQuad(d2q); d2q_new->mode = DofToQuad::LEXICOGRAPHIC_FULL; const int nqpt = ir.GetNPoints(); - if (range_type == SCALAR) + + const int b_dim = (range_type == VECTOR) ? dim : 1; + + for (int i = 0; i < nqpt; i++) { - for (int i = 0; i < nqpt; i++) + for (int d = 0; d < b_dim; d++) { for (int j = 0; j < dof; j++) { - d2q_new->B[i+nqpt*j] = d2q_new->Bt[j+dof*i] = d2q.B[i+nqpt*lex_ordering[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; } } } - else if (range_type == VECTOR) + + const int g_dim = [this]() { - for (int i = 0; i < nqpt; i++) + switch (deriv_type) { - for (int d = 0; d < dim; d++) - { - for (int j = 0; j < dof; j++) - { - d2q_new->B[i+nqpt*(d+dim*j)] = d2q_new->Bt[j+dof*(i+nqpt*d)] = d2q.B[i+nqpt* - (d+dim*lex_ordering[j])]; - } - } + case GRAD: return dim; + case DIV: return 1; + case CURL: return cdim; + default: return 0; } - } - else + }(); + + for (int i = 0; i < nqpt; i++) { - // Skip B and Bt for unknown range type - } - switch (deriv_type) - { - case GRAD: - { - for (int i = 0; i < nqpt; i++) - { - for (int d = 0; d < dim; d++) - { - for (int j = 0; j < dof; j++) - { - d2q_new->G[i+nqpt*(d+dim*j)] = d2q_new->Gt[j+dof*(i+nqpt*d)] = d2q.G[i+nqpt* - (d+dim*lex_ordering[j])]; - } - } - } - break; - } - case DIV: - { - for (int i = 0; i < nqpt; i++) - { - for (int j = 0; j < dof; j++) - { - d2q_new->G[i+nqpt*j] = d2q_new->Gt[j+dof*i] = d2q.G[i+nqpt*lex_ordering[j]]; - } - } - break; - } - case CURL: - { - for (int i = 0; i < nqpt; i++) - { - for (int d = 0; d < cdim; d++) - { - for (int j = 0; j < dof; j++) - { - d2q_new->G[i+nqpt*(d+cdim*j)] = d2q_new->Gt[j+dof*(i+nqpt*d)] = d2q.G[i+nqpt* - (d+cdim*lex_ordering[j])]; - } - } - } - break; - } - case NONE: - default: - // Skip G and Gt for unknown derivative type - break; + 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); } From 912c7d24b68bb499b22032baa52e8d228f1778db Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 20 Dec 2023 10:59:19 -0800 Subject: [PATCH 081/200] Small changes to lor_elast.cpp --- miniapps/solvers/lor_elast.cpp | 112 ++++++++++++++------------------- 1 file changed, 46 insertions(+), 66 deletions(-) diff --git a/miniapps/solvers/lor_elast.cpp b/miniapps/solvers/lor_elast.cpp index 09e1cdca9b..519740cac2 100644 --- a/miniapps/solvers/lor_elast.cpp +++ b/miniapps/solvers/lor_elast.cpp @@ -84,14 +84,13 @@ int main(int argc, char *argv[]) { // 1. Initialize MPI and HYPRE. Mpi::Init(argc, argv); - int myid = Mpi::WorldRank(); Hypre::Init(); // 2. Parse command-line options. const char *mesh_file = "../../data/beam-tri.mesh"; int order = 1; bool pa = false; - bool paraview = false; + bool visualization = false; bool amg_elast = 0; bool reorder_space = true; const char *device_config = "cpu"; @@ -122,27 +121,15 @@ int main(int argc, char *argv[]) args.AddOption(&componentwise_action, "-ca", "--component-action", "-no-ca", "--no-component-action", "Uses partial assembly with a block operator of components instead of the monolithic vector integrator."); - args.AddOption(¶view, "-vis", "--visualization", "-no-vis", + args.AddOption(&visualization, "-vis", "--visualization", "-no-vis", "--no-visualization", - "Enable or disable Paraview output."); - args.Parse(); - if (!args.Good()) - { - if (myid == 0) - { - args.PrintUsage(cout); - } - return 1; - } - if (myid == 0) - { - args.PrintOptions(cout); - } + "Enable or disable ParaView and GLVis output."); + args.ParseCheck(); // 3. Enable hardware devices such as GPUs, and programming models such as // CUDA, OCCA, RAJA and OpenMP based on command line options. Device device(device_config); - if (myid == 0) { device.Print(); } + if (Mpi::Root()) { device.Print(); } // 4. Read the (serial) mesh from the given mesh file on all processors. We // can handle triangular, quadrilateral, tetrahedral, hexahedral, surface // and volume meshes with the same code. @@ -151,19 +138,19 @@ int main(int argc, char *argv[]) if (mesh.attributes.Max() < 2 || mesh.bdr_attributes.Max() < 2) { - if (myid == 0) + if (Mpi::Root()) + { cerr << "\nInput mesh should have at least two materials and " << "two boundary attributes! (See schematic in ex2.cpp)\n" << endl; + } return 3; } // 5. Refine the serial mesh on all processors to increase the resolution. + for (int l = 0; l < ref_levels; l++) { - for (int l = 0; l < ref_levels; l++) - { - mesh.UniformRefinement(); - } + mesh.UniformRefinement(); } // 6. Define a parallel mesh by a partitioning of the serial mesh. @@ -183,7 +170,7 @@ int main(int argc, char *argv[]) LOR_disc->GetParFESpace(); } HYPRE_BigInt size = fespace.GlobalTrueVSize(); - if (myid == 0) + if (Mpi::Root()) { cout << "Number of finite element unknowns: " << size << endl << "Assembling: " << flush; @@ -220,7 +207,7 @@ int main(int argc, char *argv[]) ParLinearForm b(&fespace); b.AddBoundaryIntegrator(new VectorBoundaryLFIntegrator(f)); - if (myid == 0) + if (Mpi::Root()) { cout << "r.h.s. ... " << flush; } @@ -258,9 +245,9 @@ int main(int argc, char *argv[]) // system, applying any necessary transformations such as: parallel // assembly, eliminating boundary conditions, applying conforming // constraints for non-conforming AMR, static condensation, etc. - if (myid == 0) { cout << "matrix ... " << flush; } - StopWatch total_timer{}; - StopWatch assembly_timer{}; + if (Mpi::Root()) { cout << "matrix ... " << flush; } + StopWatch total_timer; + StopWatch assembly_timer; assembly_timer.Start(); total_timer.Start(); a.Assemble(); @@ -271,7 +258,7 @@ int main(int argc, char *argv[]) { a.FormLinearSystem(ess_tdof_list, x, b, A, X, B); } - if (myid == 0) + if (Mpi::Root()) { cout << "done." << endl; cout << "Size of linear system: " << fespace.GlobalTrueVSize() << endl; @@ -287,27 +274,19 @@ int main(int argc, char *argv[]) // on the LOR space. If additionally "-ss" is enabled, create the // block CG solvers and the high order, partially assembled components. vector> bilinear_forms; - bilinear_forms.reserve(dim); vector> lor_block; - lor_block.reserve(dim); //amg_blocks stores preconditioners of lor_block. - vector amg_blocks; - amg_blocks.reserve(dim); + vector> amg_blocks; //cg_blocks only gets used if -ss is enabled. vector> cg_blocks; - cg_blocks.reserve(dim); //diag_ho only used if -hoa enabled. The high order partial assembled operators //with the essential dofs eliminated and constrained to one. vector> ho_bilinear_form_blocks; - ho_bilinear_form_blocks.reserve(dim); vector> diag_ho; - diag_ho.reserve(dim); //If -ca is used, component bilinear forms are stored in pa_components, and //pointers to fespaces. vector> pa_components; - pa_components.reserve(dim*dim); vector fespaces; - fespaces.reserve(dim); //get block essential boundary info. //need to allocate here since constrained operator will not own essential dofs. Array ess_tdof_list_block_ho, ess_bdr_block_ho(pmesh.bdr_attributes.Max()); @@ -340,11 +319,11 @@ int main(int argc, char *argv[]) lor_block.emplace_back(bilinear_forms[j]->ParallelAssemble()); lor_block[j]->EliminateBC(ess_tdof_list_block, Operator::DiagonalPolicy::DIAG_ONE);//not sure which diagonal policy to use - amg_blocks.emplace_back(); - amg_blocks[j].SetStrengthThresh(0.25); - amg_blocks[j].SetRelaxType(16); //Chebyshev - amg_blocks[j].SetOperator(*lor_block[j]); - block_offsets[j+1] = amg_blocks[j].Height(); + amg_blocks.emplace_back(new HypreBoomerAMG); + amg_blocks[j]->SetStrengthThresh(0.25); + amg_blocks[j]->SetRelaxType(16); //Chebyshev + amg_blocks[j]->SetOperator(*lor_block[j]); + block_offsets[j+1] = amg_blocks[j]->Height(); // 13(b) If needed, create the block components for operator action. if (componentwise_action) { @@ -395,7 +374,7 @@ int main(int argc, char *argv[]) cg_blocks.emplace_back(new CGSolver(MPI_COMM_WORLD)); cg_blocks[i]->iterative_mode = false; cg_blocks[i]->SetOperator(*diag_ho[i]); - cg_blocks[i]->SetPreconditioner(amg_blocks[i]); + cg_blocks[i]->SetPreconditioner(*amg_blocks[i]); cg_blocks[i]->SetMaxIter(30); cg_blocks[i]->SetRelTol(1e-8); } @@ -409,7 +388,7 @@ int main(int argc, char *argv[]) } else { - blockDiag->SetDiagonalBlock(i, &amg_blocks[i]); + blockDiag->SetDiagonalBlock(i, amg_blocks[i].get()); } } prec.reset(blockDiag); @@ -455,7 +434,8 @@ int main(int argc, char *argv[]) solver.SetPrintLevel(1); if (prec) { solver.SetPreconditioner(*prec); } solver.SetOperator(A_components ? *A_components : *A); - StopWatch linear_solve_timer{}; + + StopWatch linear_solve_timer; linear_solve_timer.Start(); solver.Mult(B, X); linear_solve_timer.Stop(); @@ -463,6 +443,15 @@ int main(int argc, char *argv[]) a_lhs->RecoverFEMSolution(X, b, x); total_timer.Stop(); + // Print run times + if (Mpi::Root()) + { + cout << "Elapsed Times\n"; + cout << "Assembly (s) = " << assembly_timer.RealTime() << endl; + cout << "Linear Solve (s) = " << linear_solve_timer.RealTime() << endl; + cout << "Total Solve (s) " << total_timer.RealTime() << endl; + } + // 15. For non-NURBS meshes, make the mesh curved based on the finite element // space. This means that we define the mesh elements through a fespace // based transformation of the reference element. This allows us to save @@ -472,17 +461,21 @@ int main(int argc, char *argv[]) // space. pmesh.SetNodalFESpace(&fespace); - // 16. Save in parallel the displaced mesh and the inverted solution (which - // gives the backward displacements to the original grid). This output - // can be viewed later using GLVis: "glvis -np -m mesh -g sol". + // 16. If visualization is enabled, Save in parallel the displaced mesh and + // the inverted solution (which gives the backward displacements to the + // original grid). This output can be viewed later using GLVis: "glvis + // -np -m mesh -g sol". + // + // Also, save the displacement, with dispaced mesh, to VTK. + if (visualization) { GridFunction *nodes = pmesh.GetNodes(); *nodes += x; x *= -1; ostringstream mesh_name, sol_name; - mesh_name << "mesh." << setfill('0') << setw(6) << myid; - sol_name << "sol." << setfill('0') << setw(6) << myid; + mesh_name << "mesh." << setfill('0') << setw(6) << Mpi::WorldRank(); + sol_name << "sol." << setfill('0') << setw(6) << Mpi::WorldRank(); ofstream mesh_ofs(mesh_name.str().c_str()); mesh_ofs.precision(8); @@ -491,13 +484,9 @@ int main(int argc, char *argv[]) ofstream sol_ofs(sol_name.str().c_str()); sol_ofs.precision(8); x.Save(sol_ofs); - } - // 17. Save the displacement, with dispaced mesh, to VTK. - - if (paraview) - { - ParaViewDataCollection pd("lor_elast_vtk", &pmesh); + ParaViewDataCollection pd("LOR_Elasticity", &pmesh); + pd.SetPrefixPath("ParaView"); pd.RegisterField("displacement", &x); pd.SetLevelsOfDetail(order); pd.SetDataFormat(VTKFormat::BINARY); @@ -507,14 +496,5 @@ int main(int argc, char *argv[]) pd.Save(); } - //Print times - if (myid == 0) - { - cout << "Elapsed Times\n"; - cout << "Assembly (s) = " << assembly_timer.RealTime()<< endl; - cout << "Linear Solve (s) = " << linear_solve_timer.RealTime() << endl; - cout << "Total Solve (s) " << total_timer.RealTime() << endl; - } - return 0; } From 7bbab61e2b5e86f811550a9a5525190f74d33f74 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 20 Dec 2023 12:08:10 -0800 Subject: [PATCH 082/200] Significant improvements to the amgx solver doxygen. Fixed a couple doxygen errors in ex37. --- examples/ex37.cpp | 2 +- examples/ex37p.cpp | 2 +- linalg/amgxsolver.hpp | 126 ++++++++++++++++++++++++++++-------------- 3 files changed, 86 insertions(+), 44 deletions(-) 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/linalg/amgxsolver.hpp b/linalg/amgxsolver.hpp index b88c333b11..c686344509 100644 --- a/linalg/amgxsolver.hpp +++ b/linalg/amgxsolver.hpp @@ -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,119 @@ 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 with 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. */ 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 + /** @brief Initilize the AmgX library for serial execution once + the solver configuration has been established through either the + 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); - /** - 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 number the 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 Initilize the AmgX library in parallel mode with exactly one + GPU per rank once the solver configuration has been established, + either through the constructor or the AmgXSolver::ReadParameters + method. If configuring with 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 Initilize the AmgX library and create MPI teams based on the number + of devices on each node @a nDevs. If configuring with constructor, the + constructor will make this call, otherwise this will need to be called + after solver configuration 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 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 Untilize 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; + /// 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 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. @@ -168,8 +202,10 @@ public: /// 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 +217,42 @@ 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 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 the consolidated data and sets + 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 +341,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 From 3f994038fafc69e814c2facef5c3517e01cec751 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 20 Dec 2023 12:58:37 -0800 Subject: [PATCH 083/200] Add improvements to the MUMPS doxygen. --- linalg/mumps.hpp | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/linalg/mumps.hpp b/linalg/mumps.hpp index 9fef9a2928..e263a1bf97 100644 --- a/linalg/mumps.hpp +++ b/linalg/mumps.hpp @@ -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 no necissisarilty 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 automatic 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 }; @@ -93,8 +106,15 @@ public: /** * @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 +123,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 +136,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 +206,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 From cbce58c6851535c02b2e9033cd2d5e0620bd270f Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 20 Dec 2023 12:18:32 -0800 Subject: [PATCH 084/200] Reorganize elasticity and component integrators for PA --- fem/bilininteg.cpp | 51 +------ fem/bilininteg.hpp | 82 +++++----- fem/integ/bilininteg_elasticity_ea.cpp | 18 +-- fem/integ/bilininteg_elasticity_kernels.cpp | 158 ++++++++++---------- fem/integ/bilininteg_elasticity_kernels.hpp | 158 ++++++++++---------- fem/integ/bilininteg_elasticity_pa.cpp | 114 ++++++++------ miniapps/solvers/lor_elast.cpp | 44 +++--- 7 files changed, 300 insertions(+), 325 deletions(-) diff --git a/fem/bilininteg.cpp b/fem/bilininteg.cpp index 21765e8fbd..3890d92c43 100644 --- a/fem/bilininteg.cpp +++ b/fem/bilininteg.cpp @@ -3016,6 +3016,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) @@ -3099,46 +3105,6 @@ void ElasticityIntegrator::AssembleElementMatrix( } } -BilinearFormIntegrator* ElasticityIntegrator::ComponentIntegrator(const int I, - const int J) -{ - //Make sure this isn't already a component integrator. - MFEM_VERIFY(!parent, - "Cannot get component. This integrator is already a component."); - auto compIntegrator = new ElasticityIntegrator(*this); - compIntegrator->IBlock = I; - compIntegrator->JBlock = J; - compIntegrator->parent = this; - //There only needs to be one instance of componentFESpace, but need to check - //if it exists yet. - if (!componentFESpace) - { -#ifdef MFEM_USE_MPI - const auto *parfespace = dynamic_cast(fespace); - auto isParallelFES = static_cast(parfespace); -#else - constexpr bool isParallelFES = false; -#endif - const int dim = 1; - if (isParallelFES) - { -#ifdef MFEM_USE_MPI - componentFESpace = std::make_shared - (parfespace->GetParMesh(), parfespace->FEColl(), dim, - parfespace->GetOrdering()); -#endif - } - else - { - componentFESpace = std::make_shared - (fespace->GetMesh(), fespace->FEColl(), dim, fespace->GetOrdering()); - } - } - compIntegrator->fespace = componentFESpace.get(); - compIntegrator->componentFESpace = nullptr; - return compIntegrator; -} - void ElasticityIntegrator::ComputeElementFlux( const mfem::FiniteElement &el, ElementTransformation &Trans, Vector &u, const mfem::FiniteElement &fluxelem, Vector &flux, @@ -3311,11 +3277,6 @@ double ElasticityIntegrator::ComputeFluxEnergy(const FiniteElement &fluxelem, return energy; } -const FiniteElementSpace* ElasticityIntegrator::GetFESpace() const -{ - return fespace; -} - void DGTraceIntegrator::AssembleFaceMatrix(const FiniteElement &el1, const FiniteElement &el2, FaceElementTransformations &Trans, diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index 23ee26f573..770f89e439 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -16,6 +16,7 @@ #include "nonlininteg.hpp" #include "fespace.hpp" #include "ceed/interface/util.hpp" +#include "qfunction.hpp" #include namespace mfem @@ -2978,10 +2979,6 @@ public: bool SupportsCeed() const { return DeviceCanUseCeed(); } }; -// Forward declarations -class CoefficientVector; -class QuadratureFunction; - /** Integrator for the linear elasticity form: a(u,v) = (lambda div(u), div(v)) + (2 mu e(u), e(v)), where e(v) = (1/2) (grad(v) + grad(v)^T). @@ -2989,6 +2986,8 @@ class QuadratureFunction; using multiple copies of a scalar FE space. */ class ElasticityIntegrator : public BilinearFormIntegrator { + friend class ElasticityComponentIntegrator; + protected: double q_lambda, q_mu; Coefficient *lambda, *mu; @@ -3001,22 +3000,20 @@ private: #endif // PA extension - std::shared_ptr lambda_quad, mu_quad; - std::shared_ptr q_vec; - std::shared_ptr quad_space; const DofToQuad *maps; ///< Not owned const GeometricFactors *geom; ///< Not owned int vdim, ndofs; const FiniteElementSpace *fespace; ///< Not owned. - //Component integrator - int IBlock = -1; - int JBlock = -1; - /// @brief Pointer to an integrator from which a component integrator is - /// derived. Should be nullptr for the original integrator. Not owned. - ElasticityIntegrator *parent = nullptr; - std::shared_ptr componentFESpace = nullptr; + 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) @@ -3026,39 +3023,18 @@ public: 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); - /** \brief Interpolate the coefficient onto a QuadratureFunction. This is - * performed on host for now, since coefficients do not run on device. - */ virtual void AssemblePA(const FiniteElementSpace &fes); - /** \brief Only valid for a component version of ElasticityIntegrator. - */ - virtual void AssembleEA(const FiniteElementSpace &fes, Vector &emat, - const bool add = true); - virtual void AssembleDiagonalPA(Vector &diag); virtual void AddMultPA(const Vector &x, Vector &y) const; virtual void AddMultTransposePA(const Vector &x, Vector &y) const; - /** @brief Get a scalar component of a vector integrator. - - For BilinearFormIntegrators which are written for finite element spaces - that are copies of scalar elements, this creates a new integrator for - the \f$(I,J)\f$th component block where \f$0 \leq I,J \leq \text{dim} - 1\f$. The caller - assumes ownership of the returned BilinearFormIntegrator. - - @param[in] I Row component block index. - @param[in] J Column component block index. - @returns Integrator of \f$(I,J)\f$th component block. - */ - BilinearFormIntegrator* ComponentIntegrator(const int I, - const int J); /** 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 @@ -3087,10 +3063,34 @@ public: virtual double ComputeFluxEnergy(const FiniteElement &fluxelem, ElementTransformation &Trans, Vector &flux, Vector *d_energy = NULL); +}; - //This would be generally useful for these "component integrators". Starting - //to look like this should be a child class. - const FiniteElementSpace* GetFESpace() const; +class ElasticityComponentIntegrator : public BilinearFormIntegrator +{ + ElasticityIntegrator &parent; + const int i_block; + const int j_block; + + 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 \f$(i,j)\f$th component block. + /// + /// @note The parent ElasticityIntegrator must remain valid throughout the + /// lifetime of this integrator. + ElasticityComponentIntegrator(ElasticityIntegrator &parent_, int i_, int j_); + + 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: diff --git a/fem/integ/bilininteg_elasticity_ea.cpp b/fem/integ/bilininteg_elasticity_ea.cpp index 5729d107da..76f0397109 100644 --- a/fem/integ/bilininteg_elasticity_ea.cpp +++ b/fem/integ/bilininteg_elasticity_ea.cpp @@ -15,16 +15,14 @@ namespace mfem { -void ElasticityIntegrator::AssembleEA(const FiniteElementSpace &fes, - Vector &emat, - const bool add) +void ElasticityComponentIntegrator::AssembleEA(const FiniteElementSpace &fes, + Vector &emat, + const bool add) { - MFEM_VERIFY(parent, "Element level assembly for component version only"); - MFEM_VERIFY(fespace, "Need initialized FiniteElementSpace."); - MFEM_VERIFY(!add, "AssembleEA not implemented for add yet."); - AssemblePA(*fespace); - const auto &ir = q_vec->GetIntRule(0); - internal::ElasticityAssembleEA(vdim, IBlock, JBlock, ndofs, ir, *fespace, - *lambda_quad, *mu_quad, *geom, *maps, emat); + 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 index 26c36b0dd3..59d278654d 100644 --- a/fem/integ/bilininteg_elasticity_kernels.cpp +++ b/fem/integ/bilininteg_elasticity_kernels.cpp @@ -16,116 +16,114 @@ namespace mfem namespace internal { -void ElastAssertCompressionSupported(const CoefficientVector &cv, - const IntegrationRule &ir, const FiniteElementSpace &fespace) + +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 numPoints = ir.GetNPoints(); - const int vDim = cv.GetVDim(); - const int size = cv.Size(); - const int numEls = fespace.GetNE(); - MFEM_VERIFY(vDim == 1, "Invalid paramter dimension."); - MFEM_VERIFY(size/vDim/numPoints == numEls, "Compression type not supported."); + 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, - const int IBlock, const int JBlock) + const DofToQuad &maps, const Vector &x, QuadratureFunction &QVec, Vector &y) { - //make this dispatch cleaner. Convert -1 to F? - if (IBlock == -1 && JBlock == -1) + switch (dim) { - 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."); - break; - } + 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."); } - else if (IBlock >= 0 && JBlock >= 0) - { - const int id = (dim<<8)| (IBlock << 4) | JBlock; - 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("Block not compiled. Add to switch if valid."); - break; - } - } - else - { - MFEM_ABORT("Invalid block selection."); - } - } void ElasticityAssembleDiagonalPA(const int dim, const int nDofs, - const FiniteElementSpace &fespace, const CoefficientVector &lambda, + const CoefficientVector &lambda, const CoefficientVector &mu, const GeometricFactors &geom, const DofToQuad &maps, QuadratureFunction &QVec, Vector &diag) { switch (dim) { - case 2:ElasticityAssembleDiagonalPA<2>(nDofs, fespace, lambda, mu, geom, maps, - QVec, diag); break; - case 3:ElasticityAssembleDiagonalPA<3>(nDofs, fespace, lambda, mu, geom, maps, - QVec, diag); break; + 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."); - break; } } -void ElasticityAssembleEA(const int dim, const int IBlock, const int JBlock, +void ElasticityAssembleEA(const int dim, const int i_block, const int j_block, const int nDofs, const IntegrationRule &ir, - const FiniteElementSpace &fespace, const CoefficientVector &lambda, + const CoefficientVector &lambda, const CoefficientVector &mu, const GeometricFactors &geom, const DofToQuad &maps, Vector &emat) { switch (dim) { - case 2:ElasticityAssembleEA<2>(IBlock, JBlock, nDofs, ir, fespace, lambda, mu, - geom, - maps, - emat); break; - case 3:ElasticityAssembleEA<3>(IBlock, JBlock, nDofs, ir, fespace, lambda, mu, - geom, - maps, - emat); break; + 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."); - break; } } diff --git a/fem/integ/bilininteg_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp index 1fcf26a135..d7912a7ab7 100644 --- a/fem/integ/bilininteg_elasticity_kernels.hpp +++ b/fem/integ/bilininteg_elasticity_kernels.hpp @@ -46,45 +46,55 @@ namespace mfem namespace internal { -/// @brief Assert that the CoefficientStorage type is supported by the kernel. -/// For now, CoefficientStorage is inferred from the size of the cv, ir, and fespace. -/// The kernels currently only support CoefficientVectors created with CoefficientStorage::FULL. -void ElastAssertCompressionSupported(const CoefficientVector &cv, - const IntegrationRule &ir, const FiniteElementSpace &fespace); /// @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. IBlock and JBlock -/// are the dimensional component that is integrated. They must both be -/// either non-negative or both be negative. Negative values imply that the -/// whole dimensional system is evaluated. Otherwise, only one block of the -/// system is evaluated. +/// Performs y += Ax. Implemented for byNODES ordering only, and does not use +/// tensor basis, so it should work for any H1 element. /// -/// Example: In 2D, A = [A_00 A_01], x = [x_0], y = [y_0] -/// [A_10 A_11] [x_1] [y_1]. -/// So IBlock = 0, JBlock = 1 implies only y_0 += A_01*x_1 is evaluated. -/// -/// The sizes of x, y, and Q depend on whether or not a single component is -/// evaluated. Also, fespace is either a vector or scalar space depending on if -/// a single component is used. /// @param[in] dim 2 or 3 /// @param[in] nDofs Number of scalar dofs per element. -/// @param[in] fespace Vector (IBlock, JBlock<0) or scalar FE space. +/// @param[in] fespace Vector-valued finite element space. /// @param[in] lambda Quadrature function for first Lame param. -/// @param[in] mu 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 or nDofs x numEls. -/// @param Q Scratch Q-Vector. nQuad x dim x dim x numEls or nQuad x dim x numEls. -/// @param[in,out] y Ax gets added to this. nDofs x dim x numEls or nDofs x numEls. -/// @param[in] IBlock The row dimensional component. <= dim - 1 -/// @param[in] JBlock The column dimensional component. <= dim -1 +/// @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, - const int IBlock = -1, const int JBlock = -1); + 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. /// @@ -93,72 +103,67 @@ void ElasticityAddMultPA(const int dim, const int nDofs, /// /// Example: In 2D, A = [A_00 A_01] /// [A_10 A_11]. -/// So IBlock = 0, JBlock = 1 implies only A_01 is assembled. +/// 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 and crash. +/// orders may request too many resources. +/// /// @param[in] dim 2 or 3 -/// @param[in] IBlock The row dimensional component. 0 <= IBlock <= dim - 1 -/// @param[in] JBlock The column dimensional component. 0 <= JBlock<= dim -1 +/// @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] fespace Scalar FE space. /// @param[in] lambda Quadrature function for first Lame param. -/// @param[in] mu 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 IBlock, const int JBlock, +void ElasticityAssembleEA(const int dim, const int i_block, const int j_block, const int nDofs, const IntegrationRule &ir, - const FiniteElementSpace &fespace, const CoefficientVector &lambda, + const CoefficientVector &lambda, const CoefficientVector &mu, const GeometricFactors &geom, const DofToQuad &maps, Vector &emat); -/// @brief Elasticity kernel for AssembleDiagonalPA. Whole system only. +/// @brief Elasticity kernel for AssembleDiagonalPA. /// /// @param[in] dim 2 or 3 /// @param[in] nDofs Number of scalar dofs per element. -/// @param[in] fespace Vector (IBlock, JBlock<0) or scalar FE space. /// @param[in] lambda Quadrature function for first Lame param. -/// @param[in] mu 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 FiniteElementSpace &fespace, const CoefficientVector &lambda, + 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) +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((IBlock < 0) == (JBlock < 0), - "IBlock and JBlock must both be non-negative or strictly negative."); + 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 = (IBlock < 0) ? 0 : IBlock; - static constexpr int qUpper = (IBlock < 0) ? d : IBlock+1; + 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 = (JBlock < 0) ? 0 : JBlock; - static constexpr int aUpper = (JBlock < 0) ? d : JBlock+1; + 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 = (IBlock >= 0); + static constexpr bool isComponent = (i_block >= 0); //Assuming all elements are the same const auto &ir = QVec.GetIntRule(0); - ElastAssertCompressionSupported(lambda, ir,fespace); - ElastAssertCompressionSupported(mu, ir,fespace); const QuadratureInterpolator *E_To_Q_Map = fespace.GetQuadratureInterpolator( ir); E_To_Q_Map->SetOutputLayout(QVectorLayout::byNODES); - //interpolate physical derivatives to quadrature points. - Vector junk; - E_To_Q_Map->Mult(x,QuadratureInterpolator::PHYSICAL_DERIVATIVES, junk, - QVec, junk); + // interpolate physical derivatives to quadrature points. + E_To_Q_Map->PhysDerivatives(x, QVec); const int numPoints = ir.GetNPoints(); const int numEls = lambda.Size()/numPoints; @@ -215,7 +220,8 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, { for (int a = 0; a < d; a++) { - contraction += 2*((a == q)*invJ(m,JBlock) + (JBlock==q)*invJ(m,a))*(gradx(0,a)); + contraction += 2*((a == q)*invJ(m,j_block) + (j_block==q)*invJ(m,a))*(gradx(0, + a)); } } else @@ -238,7 +244,7 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, } }); - //Reduce quadrature function to an E-Vector + // 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, numEls); auto yDev = Reshape(y.ReadWrite(), nDofs, qSize, numEls); @@ -265,15 +271,13 @@ void ElasticityAddMultPA(const int nDofs, const FiniteElementSpace &fespace, /// Templated implementation of ElasticityAssembleDiagonalPA. template -void ElasticityAssembleDiagonalPA(const int nDofs, - const FiniteElementSpace &fespace, const CoefficientVector &lambda, - const CoefficientVector &mu, const GeometricFactors &geom, - const DofToQuad &maps, QuadratureFunction &QVec, Vector &diag) +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); - ElastAssertCompressionSupported(lambda, ir,fespace); - ElastAssertCompressionSupported(mu, ir,fespace); static constexpr int d = dim; const int numPoints = ir.GetNPoints(); const int numEls = lambda.Size()/numPoints; @@ -346,17 +350,19 @@ void ElasticityAssembleDiagonalPA(const int nDofs, //Templated implementation of ElasticityAssembleEA. template -void ElasticityAssembleEA(const int IBlock, const int JBlock, const int nDofs, - const IntegrationRule &ir, - const FiniteElementSpace &fespace, const CoefficientVector &lambda, - const CoefficientVector &mu, const GeometricFactors &geom, - const DofToQuad &maps, Vector &emat) +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(); - ElastAssertCompressionSupported(lambda, ir,fespace); - ElastAssertCompressionSupported(mu, ir,fespace); const int numEls = lambda.Size()/numPoints; const auto lamDev = Reshape(lambda.Read(), numPoints, numEls); const auto muDev = Reshape(mu.Read(), numPoints, numEls); @@ -386,14 +392,14 @@ void ElasticityAssembleEA(const int IBlock, const int JBlock, const int nDofs, { for (int b = 0; b < d; b++) { - contraction += ((a == IBlock)*invJ(m,b) + (b==IBlock)*invJ(m, - a))*((a == JBlock)*invJ(n, - b) + (b==JBlock)*invJ(n,a)); + 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,IBlock)*invJ(n,JBlock) + 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); } } diff --git a/fem/integ/bilininteg_elasticity_pa.cpp b/fem/integ/bilininteg_elasticity_pa.cpp index 4238db6ca2..fdb377ec1d 100644 --- a/fem/integ/bilininteg_elasticity_pa.cpp +++ b/fem/integ/bilininteg_elasticity_pa.cpp @@ -17,86 +17,102 @@ 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) { - if (parent) - { - // This is a component integrator, so just make sure monolithic operator - // is assembled. - parent->AssemblePA(fes); - return; - } - const bool alreadyAssembled = bool(lambda_quad); - if (alreadyAssembled) - { - // Don't reassemble vectors. - return; - } MFEM_VERIFY(fes.GetOrdering() == Ordering::byNODES, "Elasticity PA only implemented for byNODES ordering."); fespace = &fes; - const auto el = fespace->GetFE(0); - ndofs = el->GetDof(); - const auto mesh = fespace->GetMesh(); + Mesh &mesh = *fespace->GetMesh(); + MFEM_VERIFY(fespace->GetVDim() == mesh.Dimension(), ""); vdim = fespace->GetVDim(); - const IntegrationRule *ir = IntRule; - if (ir == nullptr) - { - //This is where it's assumed that all elements are the same. - const auto Trans = fespace->GetElementTransformation(0); - int order = 2 * Trans->OrderGrad(el); - IntRule = &IntRules.Get(el->GetGeomType(), order); - } - geom = mesh->GetGeometricFactors(*IntRule, GeometricFactors::JACOBIANS); - quad_space = std::make_shared(*mesh, *IntRule); - lambda_quad = std::make_shared(lambda, *quad_space, - CoefficientStorage::FULL); - mu_quad = std::make_shared(mu, *quad_space, - CoefficientStorage::FULL); - q_vec = std::make_shared(*quad_space, vdim*vdim); + 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, *fespace, *lambda_quad, - *mu_quad, *geom, *maps, *q_vec, diag); + internal::ElasticityAssembleDiagonalPA(vdim, ndofs, *lambda_quad, *mu_quad, + *geom, *maps, *q_vec, diag); } void ElasticityIntegrator::AddMultPA(const Vector &x, Vector &y) const { - if (!parent) - { - q_vec->SetVDim(vdim*vdim); - } - else - { - //If it has a parent, it is a component integrator. - q_vec->SetVDim(vdim); - } - internal::ElasticityAddMultPA(vdim, ndofs, *fespace, *lambda_quad, *mu_quad, - *geom, *maps, x, *q_vec, y, IBlock, JBlock); + *geom, *maps, x, *q_vec, y); } void ElasticityIntegrator::AddMultTransposePA(const Vector &x, Vector &y) const { - if (!parent) + 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) { - AddMultPA(x, y); + parent.SetUpQuadratureSpaceAndCoefficients(fes); } else { - //This block operator is symmetric, so simply switch IBlock and JBlock. - internal::ElasticityAddMultPA(vdim, ndofs, *fespace, *lambda_quad, *mu_quad, - *geom, *maps, x, *q_vec, y, JBlock, IBlock); + 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/miniapps/solvers/lor_elast.cpp b/miniapps/solvers/lor_elast.cpp index 519740cac2..78c5b23d70 100644 --- a/miniapps/solvers/lor_elast.cpp +++ b/miniapps/solvers/lor_elast.cpp @@ -161,13 +161,17 @@ int main(int argc, char *argv[]) // space. If using partial assembly, also assemble the low order refined // (LOR) fespace. H1_FECollection fec(order, dim); - ParFiniteElementSpace fespace(&pmesh, &fec, dim, - reorder_space ? Ordering::byNODES : Ordering::byVDIM); + const Ordering::Type fes_ordering = + reorder_space ? Ordering::byNODES : Ordering::byVDIM; + ParFiniteElementSpace fespace(&pmesh, &fec, dim, fes_ordering); + ParFiniteElementSpace scalar_fespace(&pmesh, &fec, 1, fes_ordering); unique_ptr LOR_disc; + unique_ptr scalar_lor_fespace; if (pa || componentwise_action) { LOR_disc.reset(new ParLORDiscretization(fespace)); - LOR_disc->GetParFESpace(); + scalar_lor_fespace.reset(new ParFiniteElementSpace( + LOR_disc->GetParFESpace().GetParMesh(), &fec, 1, fes_ordering)); } HYPRE_BigInt size = fespace.GlobalTrueVSize(); if (Mpi::Root()) @@ -299,13 +303,10 @@ int main(int argc, char *argv[]) lor_integrator.AssemblePA(LOR_disc->GetParFESpace()); for (int j = 0; j < dim; j++) { + ElasticityComponentIntegrator *block = new ElasticityComponentIntegrator( + lor_integrator, j, j); //create the LOR matrix and corresponding AMG preconditioners. - auto *block = static_cast - (lor_integrator.ComponentIntegrator(j,j)); - auto *fes_block = dynamic_cast - (const_cast - (block->GetFESpace()));//If get fespace was part of bilinear form, wouldn't need static_cast above. - bilinear_forms.emplace_back(new ParBilinearForm(fes_block)); + bilinear_forms.emplace_back(new ParBilinearForm(scalar_lor_fespace.get())); bilinear_forms[j]->SetAssemblyLevel(AssemblyLevel::FULL); bilinear_forms[j]->EnableSparseMatrixSorting(Device::IsEnabled()); bilinear_forms[j]->AddDomainIntegrator(block); @@ -315,7 +316,7 @@ int main(int argc, char *argv[]) Array ess_tdof_list_block, ess_bdr_block(pmesh.bdr_attributes.Max()); ess_bdr_block = 0; ess_bdr_block[0] = 1; - fes_block->GetEssentialTrueDofs(ess_bdr_block, ess_tdof_list_block); + scalar_lor_fespace->GetEssentialTrueDofs(ess_bdr_block, ess_tdof_list_block); lor_block.emplace_back(bilinear_forms[j]->ParallelAssemble()); lor_block[j]->EliminateBC(ess_tdof_list_block, Operator::DiagonalPolicy::DIAG_ONE);//not sure which diagonal policy to use @@ -329,16 +330,13 @@ int main(int argc, char *argv[]) { for (int i = 0; i < dim; i++) { - auto *action_block = static_cast - (integrator.ComponentIntegrator( - i,j)); - auto *action_fes_block = dynamic_cast - (const_cast(action_block->GetFESpace())); + ElasticityComponentIntegrator *action_block = new ElasticityComponentIntegrator( + integrator, i, j); if (i == j) { - fespaces.emplace_back(action_fes_block); + fespaces.emplace_back(&scalar_fespace); } - pa_components.emplace_back(new ParBilinearForm(action_fes_block)); + pa_components.emplace_back(new ParBilinearForm(&scalar_fespace)); pa_components[i + dim*j]->SetAssemblyLevel(pa ? AssemblyLevel::PARTIAL : AssemblyLevel::FULL); pa_components[i + dim*j]->EnableSparseMatrixSorting(Device::IsEnabled()); @@ -354,16 +352,14 @@ int main(int argc, char *argv[]) //Create diagonal high order partial assembly operators. for (int i = 0; i < dim; i++) { - auto *block = static_cast(integrator.ComponentIntegrator( - i,i)); - auto *fes_block = dynamic_cast - (const_cast(block->GetFESpace())); - fes_block->GetEssentialTrueDofs(ess_bdr_block_ho, ess_tdof_list_block_ho); - ho_bilinear_form_blocks.emplace_back(new ParBilinearForm(fes_block)); + ElasticityComponentIntegrator *block = new ElasticityComponentIntegrator( + integrator, i, i); + scalar_fespace.GetEssentialTrueDofs(ess_bdr_block_ho, ess_tdof_list_block_ho); + ho_bilinear_form_blocks.emplace_back(new ParBilinearForm(&scalar_fespace)); ho_bilinear_form_blocks[i]->SetAssemblyLevel(AssemblyLevel::PARTIAL); ho_bilinear_form_blocks[i]->AddDomainIntegrator(block); ho_bilinear_form_blocks[i]->Assemble(); - const auto *prolong = fes_block->GetProlongationMatrix(); + const auto *prolong = scalar_fespace.GetProlongationMatrix(); auto *rap = new RAPOperator(*prolong, *ho_bilinear_form_blocks[i], *prolong); diag_ho.emplace_back(new ConstrainedOperator(rap, ess_tdof_list_block_ho, true, Operator::DiagonalPolicy::DIAG_ONE)); From b5ca50d9676ac6181845aa608024280d37fba8d9 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 20 Dec 2023 13:19:33 -0800 Subject: [PATCH 085/200] Remove unneeded include --- fem/integ/bilininteg_diffusion_patch.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/fem/integ/bilininteg_diffusion_patch.cpp b/fem/integ/bilininteg_diffusion_patch.cpp index 148ccc5c42..fb5fa5555a 100644 --- a/fem/integ/bilininteg_diffusion_patch.cpp +++ b/fem/integ/bilininteg_diffusion_patch.cpp @@ -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" From a35b5e76b0df8f976eec837ae11d2dca239e8a0e Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 20 Dec 2023 13:21:57 -0800 Subject: [PATCH 086/200] Doxygen comment for ElasticityComponentIntegrator --- fem/bilininteg.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index 770f89e439..2660fa27d5 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -3065,6 +3065,9 @@ public: Vector &flux, Vector *d_energy = NULL); }; +/// @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; From dd628ae0036936a9dc8bb9bc0ff037779e7d37c9 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 20 Dec 2023 15:57:34 -0800 Subject: [PATCH 087/200] Improvements to Doxygen in Solvers.h --- linalg/solvers.hpp | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/linalg/solvers.hpp b/linalg/solvers.hpp index d951476bf3..b88ed6df6d 100644 --- a/linalg/solvers.hpp +++ b/linalg/solvers.hpp @@ -168,8 +168,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; @@ -338,7 +343,10 @@ 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; + + /// Approach the solition 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 +440,10 @@ public: ~OperatorChebyshevSmoother() {} + /// Approach the solution of the linear system by applying Chebyshev smoothing void Mult(const Vector &x, Vector &y) const; + /// 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 +485,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 +518,7 @@ public: virtual void SetOperator(const Operator &op) { IterativeSolver::SetOperator(op); UpdateVectors(); } + /// Iterative solution of the linear system using the Conjugate Gradient method virtual void Mult(const Vector &b, Vector &x) const; }; @@ -537,6 +549,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 +568,7 @@ public: void SetKDim(int dim) { m = dim; } + /// Iterative solution of the linear system using the FGMRESt method virtual void Mult(const Vector &b, Vector &x) const; }; @@ -586,6 +600,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 +636,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 +1117,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 +1147,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 +1172,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 +1189,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) { } }; @@ -1259,9 +1287,10 @@ public: /// The operator must be a DenseMatrix. void SetOperator(const Operator &op) override; + /// Compute the non-negative least squares solution to the underdetermined system void Mult(const Vector &w, Vector &sol) const override; - /** + /** @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. @@ -1298,7 +1327,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 +1337,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 +1358,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. From 0ecfcb363359a33df8ac4eb869c1cd4dd246d8c9 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 20 Dec 2023 21:49:17 -0800 Subject: [PATCH 088/200] Fix LOR bug in lor_elast.cpp --- miniapps/solvers/lor_elast.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/miniapps/solvers/lor_elast.cpp b/miniapps/solvers/lor_elast.cpp index 78c5b23d70..cdcba7092c 100644 --- a/miniapps/solvers/lor_elast.cpp +++ b/miniapps/solvers/lor_elast.cpp @@ -165,13 +165,16 @@ int main(int argc, char *argv[]) reorder_space ? Ordering::byNODES : Ordering::byVDIM; ParFiniteElementSpace fespace(&pmesh, &fec, dim, fes_ordering); ParFiniteElementSpace scalar_fespace(&pmesh, &fec, 1, fes_ordering); - unique_ptr LOR_disc; + unique_ptr lor_disc; unique_ptr scalar_lor_fespace; if (pa || componentwise_action) { - LOR_disc.reset(new ParLORDiscretization(fespace)); - scalar_lor_fespace.reset(new ParFiniteElementSpace( - LOR_disc->GetParFESpace().GetParMesh(), &fec, 1, fes_ordering)); + lor_disc.reset(new ParLORDiscretization(fespace)); + ParFiniteElementSpace &lor_space = lor_disc->GetParFESpace(); + const FiniteElementCollection &lor_fec = *lor_space.FEColl(); + ParMesh &lor_mesh = *lor_space.GetParMesh(); + scalar_lor_fespace.reset( + new ParFiniteElementSpace(&lor_mesh, &lor_fec, 1, fes_ordering)); } HYPRE_BigInt size = fespace.GlobalTrueVSize(); if (Mpi::Root()) @@ -300,7 +303,7 @@ int main(int argc, char *argv[]) if (pa || componentwise_action) { // 13(a) Create the diagonal LOR matrices and corresponding AMG preconditioners. - lor_integrator.AssemblePA(LOR_disc->GetParFESpace()); + lor_integrator.AssemblePA(lor_disc->GetParFESpace()); for (int j = 0; j < dim; j++) { ElasticityComponentIntegrator *block = new ElasticityComponentIntegrator( From 8a4e8ba30863f3dfc255d36e73b31f48917dc231 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Thu, 21 Dec 2023 13:53:40 -0800 Subject: [PATCH 089/200] Improved the doxygen for the slepc interface. --- linalg/slepc.hpp | 77 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 68 insertions(+), 9 deletions(-) diff --git a/linalg/slepc.hpp b/linalg/slepc.hpp index 63b9e748d0..44b9c414c8 100644 --- a/linalg/slepc.hpp +++ b/linalg/slepc.hpp @@ -51,16 +51,22 @@ 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 + /// 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 eignemodes 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 +75,92 @@ public: /// Solve the eigenvalue problem for the specified number of eigenvalues void Solve(); - /// Get the number of converged eigenvalues + /// 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 eignevalues 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. From 4add47bb175b9e140870ac3197c5be8fb3f64a14 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Thu, 21 Dec 2023 17:20:56 -0800 Subject: [PATCH 090/200] Improved doxygen for the strumpack integration. --- linalg/strumpack.hpp | 213 +++++++++++++++++++++++++++++-------------- 1 file changed, 145 insertions(+), 68 deletions(-) diff --git a/linalg/strumpack.hpp b/linalg/strumpack.hpp index 42ae555c79..b785ed4673 100644 --- a/linalg/strumpack.hpp +++ b/linalg/strumpack.hpp @@ -31,8 +31,10 @@ 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 + /** @brief Creates a general parallel matrix from a local CSR matrix on each + processor. + + The CSR matrix 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, @@ -41,20 +43,26 @@ public: 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 on for this try 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(); } + /// Gain access to the internal CSR matrix strumpack::CSRMatrixMPI *GetA() const { return A_; } private: @@ -72,46 +80,74 @@ 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. + + 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. + + 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; + + /// 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. + /// Set the operator. 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(); + + /// Setup 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 +155,116 @@ public: * used without preconditioner. * * Supported values are: - * AUTO: Use iterative refinement if no HSS compression is + * - AUTO: Use iterative refinement if no HSS compression is * used, otherwise use GMRes - * DIRECT: No outer iterative solver, just a single application + * - 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 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 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 SetCompression to set the proper compression type. + */ void SetCompressionLossyPrecision(int precision); + + /** @brief Set the number of butterflylevels for the HODLR compression option + * + * Use 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,29 @@ 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 MSTRUMPACK 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 +316,28 @@ 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 MSTRUMPACK 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 From 81d1a2fc1ff8b41ca980b36c5d0c0731b91eda80 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Thu, 28 Dec 2023 14:29:41 -0800 Subject: [PATCH 091/200] Refactor Mesh::GetBdrElementAdjacentElement2 --- fem/geom.cpp | 27 +++++++++++++++++++++++++++ fem/geom.hpp | 3 +++ mesh/mesh.cpp | 16 +++++++--------- mesh/mesh.hpp | 27 +++++++++++++++++++++------ mesh/submesh/submesh_utils.cpp | 10 +++++++--- 5 files changed, 65 insertions(+), 18 deletions(-) diff --git a/fem/geom.cpp b/fem/geom.cpp index 2d9f4e9074..56d3db750d 100644 --- a/fem/geom.cpp +++ b/fem/geom.cpp @@ -252,6 +252,33 @@ Geometry::Geometry() } } +template +int GetInverseOrientation_(int orientation) +{ + using geom_t = Geometry::Constants; + MFEM_ASSERT(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..a7d95de9bc 100644 --- a/fem/geom.hpp +++ b/fem/geom.hpp @@ -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/mesh/mesh.cpp b/mesh/mesh.cpp index c92bcb7079..3ec4c16a1c 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp @@ -471,14 +471,17 @@ void Mesh::GetBdrElementTransformation(int i, IsoparametricTransformation* ElTr) else // L2 Nodes (e.g., periodic mesh) { int elem_id, face_info; - GetBdrElementAdjacentElementWithInverseOrientation(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, DecodeFaceInfoOrientaiton(face_info)) + ); GetLocalFaceTransformation(GetBdrElementType(i), GetElementType(elem_id), FaceElemTr.Loc1.Transf, face_info); // NOTE: FaceElemTr.Loc1 is overwritten here -- used as a temporary - - Geometry::Type face_geom = GetBdrElementBaseGeometry(i); const FiniteElement *face_el = Nodes->FESpace()->GetTraceElement(elem_id, face_geom); MFEM_VERIFY(dynamic_cast(face_el), @@ -7145,7 +7148,7 @@ void Mesh::GetBdrElementAdjacentElement(int bdr_el, int &el, int &info) const info = fi.Elem1Inf + ori; } -void Mesh::GetBdrElementAdjacentElementWithInverseOrientation( +void Mesh::GetBdrElementAdjacentElement2( int bdr_el, int &el, int &info) const { int fid = GetBdrElementFaceIndex(bdr_el); @@ -7168,11 +7171,6 @@ void Mesh::GetBdrElementAdjacentElementWithInverseOrientation( info = fi.Elem1Inf + ori; } -void Mesh::GetBdrElementAdjacentElement2(int bdr_el, int &el, int &info) const -{ - GetBdrElementAdjacentElementWithInverseOrientation(bdr_el, el, info); -} - Element::Type Mesh::GetElementType(int i) const { return elements[i]->GetType(); diff --git a/mesh/mesh.hpp b/mesh/mesh.hpp index 2ab9f92361..c8d4beb658 100644 --- a/mesh/mesh.hpp +++ b/mesh/mesh.hpp @@ -1464,19 +1464,24 @@ public: @sa GetBdrElementAdjacentElement2() */ void GetBdrElementAdjacentElement(int bdr_el, int &el, int &info) const; - /** @brief For the given boundary element, bdr_el, return its adjacent - element and its info, i.e. 64*local_bdr_index+inverse_bdr_orientation. + /** @brief Deprecated. + + For the given boundary element, bdr_el, return its adjacent element and + its info, i.e. 64*local_bdr_index+inverse_bdr_orientation. The returned inverse_bdr_orientation is the inverse of the orientation of the boundary element relative to the respective face element. In other words this is the orientation of the face element relative to the boundary element. - @sa GetBdrElementAdjacentElement() */ - void GetBdrElementAdjacentElementWithInverseOrientation( - int bdr_el, int &el, int &info) const; + @warning This only differs from GetBdrElementAdjacentElement by returning + the face info with inverted orientation. It does @b not return + information corresponding to a second adjacent face. This function is + deprecated, use Geometry::GetInverseOrientation, Mesh::EncodeFaceInfo, + Mesh::DecodeFaceInfoOrientaiton, and Mesh::DecodeFaceInfoLocalIndex + instead. - /// Deprecated in favor of GetBdrElementAdjacentElementWithInverseOrientation + @sa GetBdrElementAdjacentElement() */ MFEM_DEPRECATED void GetBdrElementAdjacentElement2(int bdr_el, int &el, int &info) const; @@ -1891,6 +1896,16 @@ public: operator Mesh::FaceInfo() const; }; + /// Given a "face info int", return the face orientation. @sa FaceInfo. + static int DecodeFaceInfoOrientaiton(int info) { return info%64; } + + /// Given a "face info int", return the local face index. @sa FaceInfo. + static int DecodeFaceInfoLocalIndex(int info) { return info/64; } + + /// @brief Given @a local_face_index and @a orientation, return the + /// corresponding encoded "face info int". @sa FaceInfo. + static int EncodeFaceInfo(int local_face_index, int orientation) { return orientation + local_face_index*64; } + /// @name More advanced entity information access methods /// @{ diff --git a/mesh/submesh/submesh_utils.cpp b/mesh/submesh/submesh_utils.cpp index 8d1b0e42f2..9e6bf441f3 100644 --- a/mesh/submesh/submesh_utils.cpp +++ b/mesh/submesh/submesh_utils.cpp @@ -117,17 +117,21 @@ void BuildVdofToVdofMap(const FiniteElementSpace& subfes, auto pm = parentfes.GetMesh(); + const Geometry::Type face_geom = + pm->GetBdrElementBaseGeometry(parent_element_ids[i]); int face_info, parent_volel_id; - pm->GetBdrElementAdjacentElementWithInverseOrientation( + pm->GetBdrElementAdjacentElement( parent_element_ids[i], parent_volel_id, face_info); + face_info = Mesh::EncodeFaceInfo( + Mesh::DecodeFaceInfoLocalIndex(face_info), + Geometry::GetInverseOrientation(face_geom, + Mesh::DecodeFaceInfoOrientaiton(face_info))); pm->GetLocalFaceTransformation( pm->GetBdrElementType(parent_element_ids[i]), pm->GetElementType(parent_volel_id), Tr.Transf, face_info); - Geometry::Type face_geom = - pm->GetBdrElementBaseGeometry(parent_element_ids[i]); const FiniteElement *face_el = parentfes.GetTraceElement(parent_element_ids[i], face_geom); MFEM_VERIFY(dynamic_cast(face_el), From 4499e1ff36d29f3dc85834df58afa7d8f18a923c Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 2 Jan 2024 12:03:42 -0800 Subject: [PATCH 092/200] Update fem/bilinearform.hpp Co-authored-by: Dennis Ogiermann --- fem/bilinearform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 392acd231a..72d64b7a7d 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -337,7 +337,7 @@ public: /// Returns a pointer to (approximation) of the matrix inverse: \f$ M^{-1} \f$ (currently returns NULL) virtual MatrixInverse *Inverse() const; - /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is LEGACY. + /** @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.*/ From d46c264e5beace1fc1ca56213e8147498a0f5031 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 2 Jan 2024 12:08:45 -0800 Subject: [PATCH 093/200] Update fem/bilinearform.hpp Co-authored-by: Dennis Ogiermann --- fem/bilinearform.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 72d64b7a7d..22377d2fb0 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -136,8 +136,8 @@ protected: void AllocMat(); /** @brief For partially conforming trial and/or test FE spaces, complete the - assembly process by performing \f$ A := P^t A P\f$ where A is the internal - sparse matrix and P is the conforming prolongation matrice of the + assembly process by performing \f$ A := P^t A P\f$ where \f$ A \f$ is the internal + sparse matrix and \f$ P \f$ 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(); From 810b05fbe70e4fba8f3a9e217e49f9806feb625d Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 2 Jan 2024 12:08:56 -0800 Subject: [PATCH 094/200] Update fem/bilinearform.hpp Co-authored-by: Dennis Ogiermann --- fem/bilinearform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 22377d2fb0..b03f4587d9 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -921,7 +921,7 @@ public: { return test_fes->GetRestrictionMatrix(); } /** @brief 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 + assembly process by performing \f$ A := P2^t A P1 \f$ 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. */ From d49bb363e13df30c4e2d481415f2928a66393efb Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 2 Jan 2024 12:17:36 -0800 Subject: [PATCH 095/200] Clarified a couple of dox messages. --- fem/bilinearform.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index b03f4587d9..fc0e70426f 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -136,7 +136,7 @@ protected: void AllocMat(); /** @brief For partially conforming trial and/or test FE spaces, complete the - assembly process by performing \f$ A := P^t A P\f$ where \f$ A \f$ is the internal + assembly process by performing \f$ P^t A P\f$ where \f$ A \f$ is the internal sparse matrix and \f$ P \f$ is the conforming prolongation matrix of the trial/test FE space. After this call the BilinearForm becomes an operator on the conforming FE space. */ @@ -809,10 +809,11 @@ public: const double a = 1.0) const; /** @brief Returns a pointer to (approximation) of the matrix inverse: \f$ M^{-1} \f$ - (currently returns NULL)*/ + (currently unimplemented and returns NULL)*/ virtual MatrixInverse *Inverse() const; - /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is AssemblyLevel::LEGACY.*/ + /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is + AssemblyLevel::LEGACY.*/ virtual void Finalize(int skip_zeros = 1); /** @brief Extract the associated matrix as SparseMatrix blocks. The number of @@ -921,9 +922,9 @@ public: { return test_fes->GetRestrictionMatrix(); } /** @brief For partially conforming trial and/or test FE spaces, complete the - assembly process by performing \f$ A := P2^t A P1 \f$ 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 + assembly process by performing \f$ P2^t A P1 \f$ where \f$ A \f$ is the internal + sparse matrix; \f$ P1 \f$ and \f$ P2 \f$ 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(); From 40326625a621c5a7c5a77356fe4361703f4deee7 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 2 Jan 2024 12:24:45 -0800 Subject: [PATCH 096/200] Fixed a dox bug in VectorBoundaryLFIntegrator. --- fem/lininteg.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/lininteg.hpp b/fem/lininteg.hpp index 0cc5a80d44..5eec7e0817 100644 --- a/fem/lininteg.hpp +++ b/fem/lininteg.hpp @@ -317,7 +317,7 @@ public: }; /** 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$. */ + \f$g=(g_1,\dots,g_n)\f$ and \f$v=(v_1,\dots,v_n)\f$. */ class VectorBoundaryLFIntegrator : public LinearFormIntegrator { private: From 3472238513d4f9b387211b3588c51fb8e57002c3 Mon Sep 17 00:00:00 2001 From: Joseph Signorelli Date: Wed, 3 Jan 2024 15:03:48 -0600 Subject: [PATCH 097/200] Addition of bdr integrator vars, and get + add methods --- fem/nonlinearform.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/fem/nonlinearform.hpp b/fem/nonlinearform.hpp index 77da539f7e..07e4707d6b 100644 --- a/fem/nonlinearform.hpp +++ b/fem/nonlinearform.hpp @@ -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 @@ -119,6 +123,19 @@ public: /// Access all integrators added with AddDomainIntegrator(). 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) @@ -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); } From 5ee2001860413d697f40da06b667190996cc9dc3 Mon Sep 17 00:00:00 2001 From: Joseph Signorelli Date: Wed, 3 Jan 2024 15:09:08 -0600 Subject: [PATCH 098/200] Addition of bnfi to Mult and GetGradient --- fem/nonlinearform.cpp | 90 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/fem/nonlinearform.cpp b/fem/nonlinearform.cpp index 88271e234a..ea7847cdb4 100644 --- a/fem/nonlinearform.cpp +++ b/fem/nonlinearform.cpp @@ -246,6 +246,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 +466,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; From 8a1f7aacbf280f12d8a7ee5c0d800f934440a979 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 3 Jan 2024 13:15:00 -0800 Subject: [PATCH 099/200] Improved doxygen for superlu integration. --- linalg/superlu.hpp | 168 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 148 insertions(+), 20 deletions(-) diff --git a/linalg/superlu.hpp b/linalg/superlu.hpp index e220207518..4d722ec6dd 100644 --- a/linalg/superlu.hpp +++ b/linalg/superlu.hpp @@ -27,24 +27,88 @@ namespace mfem namespace superlu { +/** @file */ // 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 \f$ A^T*A \f$ + MMD_ATA, + /// Minimum degree ordering on structure of \f$ A^T+A \f$ + MMD_AT_PLUS_A, + /// Approximate minimum degree column ordering + COLAMD, + /// Sequential ordering on structure of \f$ A^T+A \f$ using the METIS package + METIS_AT_PLUS_A, + /// Sequential ordering on structure of \f$ A^T+A \f$ 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; + +/// 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, + /// 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 +117,13 @@ 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 + /** @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 +132,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 +147,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 +157,101 @@ 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 \f$ y = Op^{-1} x \f$ + \note Factorization modifies the operator matrix. */ void Mult(const Vector &x, Vector &y) const; + + /** @brief Factor and solve the linear systems \f$ y_i = Op^{-1} x_i \f$ + 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 \f$ y = Op^{-T} x \f$ + \note Factorization modifies the operator matrix. */ void MultTranspose(const Vector &x, Vector &y) const; + + /** @brief Factor and solve the transposed linear systems \f$ y_i = Op^{-T} x_i \f$ + 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 \f$ \sqrt{\epsilon} \lVert A \rVert \f$ (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); + + /// 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. From 018da9aee1ac975b6626ed140cece381620345f8 Mon Sep 17 00:00:00 2001 From: Joseph Signorelli Date: Wed, 3 Jan 2024 15:46:09 -0600 Subject: [PATCH 100/200] Addition of bnfi to MultBlocked + ComputeGradientBlocked --- fem/nonlinearform.cpp | 116 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/fem/nonlinearform.cpp b/fem/nonlinearform.cpp index ea7847cdb4..7e081d32a0 100644 --- a/fem/nonlinearform.cpp +++ b/fem/nonlinearform.cpp @@ -919,6 +919,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; @@ -1170,6 +1225,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; From 1f65d8903134a049cd88ffe516dbc152f4af1ceb Mon Sep 17 00:00:00 2001 From: Joseph Signorelli Date: Wed, 3 Jan 2024 15:47:17 -0600 Subject: [PATCH 101/200] Delete bnfi added to destructors --- fem/nonlinearform.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fem/nonlinearform.cpp b/fem/nonlinearform.cpp index 7e081d32a0..a9d20f0863 100644 --- a/fem/nonlinearform.cpp +++ b/fem/nonlinearform.cpp @@ -644,6 +644,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; @@ -1478,6 +1479,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]; From 18301c0dbcc781c502e7372cc4b1a8f0904ba7fd Mon Sep 17 00:00:00 2001 From: Joseph Signorelli Date: Wed, 3 Jan 2024 16:05:55 -0600 Subject: [PATCH 102/200] BNFI for GetGridFunctionEnergy and GetEnergyBlocked --- fem/nonlinearform.cpp | 91 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/fem/nonlinearform.cpp b/fem/nonlinearform.cpp index a9d20f0863..2ceda2b42b 100644 --- a/fem/nonlinearform.cpp +++ b/fem/nonlinearform.cpp @@ -142,7 +142,51 @@ 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"); @@ -814,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) { From 3ac5bf85a6888c57f34fc6c60d7bb745488b77f4 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 3 Jan 2024 14:11:15 -0800 Subject: [PATCH 103/200] Did an editing pass on the solver documentation I just added. --- linalg/amgxsolver.hpp | 25 +++++++++++++------------ linalg/mumps.hpp | 18 ++++++++++++++++-- linalg/strumpack.hpp | 33 +++++++++++++++++---------------- linalg/superlu.hpp | 1 - 4 files changed, 46 insertions(+), 31 deletions(-) diff --git a/linalg/amgxsolver.hpp b/linalg/amgxsolver.hpp index c686344509..82e89ce3d2 100644 --- a/linalg/amgxsolver.hpp +++ b/linalg/amgxsolver.hpp @@ -102,14 +102,14 @@ public: /** @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); /** @brief Initilize the AmgX library for serial execution once the solver configuration has been established through either the - ReadParameters method or the constructor. The constructor will make this - call. + AmgXSolver::ReadParameters method or the constructor. The constructor + will make this call. */ void InitSerial(); @@ -127,31 +127,31 @@ public: (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 the of devices in each compute node as + 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); /** @brief Initilize the AmgX library in parallel mode with exactly one - GPU per rank once the solver configuration has been established, + GPU per rank after the solver configuration has been established, either through the constructor or the AmgXSolver::ReadParameters - method. If configuring with constructor, the constructor will make + method. If configuring with a constructor, the constructor will make this call. */ void InitExclusiveGPU(const MPI_Comm &comm); - /** @brief Initilize the AmgX library and create MPI teams based on the number - of devices on each node @a nDevs. If configuring with constructor, the + /** @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 solver configuration been established through the + after the solver configuration has been established through the AmgXSolver::ReadParameters call. */ void InitMPITeams(const MPI_Comm &comm, const int nDevs); #endif - /** @brief Sets Operator that is going to be solved via AmgX. + /** @brief Sets the Operator that is going to be solved via AmgX. Supports operators based on either an MFEM SparseMatrix or HypreParMatrix. */ @@ -194,8 +194,9 @@ 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 with a block Jacobi smoother is used as a + preconditioner. */ void DefaultParameters(const AMGX_MODE amgxMode_, const bool verbose); diff --git a/linalg/mumps.hpp b/linalg/mumps.hpp index e263a1bf97..d83f068344 100644 --- a/linalg/mumps.hpp +++ b/linalg/mumps.hpp @@ -86,21 +86,35 @@ public: void SetOperator(const Operator &op); /** - * @brief Solve y = Op^{-1} x. + * @brief Solve \f$ y = Op^{-1} x \f$ * * @param x RHS vector * @param y Solution vector */ void Mult(const Vector &x, Vector &y) const; + + /** + * @brief Solve \f$ Y_i = Op^{-T} X_i \f$ + * + * @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 \f$ y = Op^{-T} x \f$ * * @param x RHS vector * @param y Solution vector */ void MultTranspose(const Vector &x, Vector &y) const; + + /** + * @brief Transpose Solve \f$ Y_i = Op^{-T} X_i \f$ + * + * @param X Array of RHS vectors + * @param Y Array of Solution vectors + */ void ArrayMultTranspose(const Array &X, Array &Y) const; diff --git a/linalg/strumpack.hpp b/linalg/strumpack.hpp index b785ed4673..d1b34de822 100644 --- a/linalg/strumpack.hpp +++ b/linalg/strumpack.hpp @@ -34,7 +34,7 @@ public: /** @brief Creates a general parallel matrix from a local CSR matrix on each processor. - The CSR matrix described by the I, J and data arrays. The local matrix should + 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, @@ -52,7 +52,7 @@ public: ~STRUMPACKRowLocMatrix(); - /// Matrix vector products are not supported on for this try of matrix. + /// Matrix vector products are not supported on for this type of matrix. void Mult(const Vector &x, Vector &y) const { MFEM_ABORT("STRUMPACKRowLocMatrix::Mult: Matrix vector products are not " @@ -82,15 +82,15 @@ class STRUMPACKSolverBase : public Solver protected: /** @brief Constructor with MPI_Comm parameter and command line arguments. - SetFromCommandLine must be called for the command line arguments - to be used. + STRUMPACKSolverBase::SetFromCommandLine must be called for the command + line arguments to be used. */ STRUMPACKSolverBase(MPI_Comm comm, int argc, char *argv[]); /** @brief Constructor with STRUMPACK matrix object and command line arguments. - SetFromCommandLine must be called for the command line arguments - to be used. + STRUMPACKSolverBase::SetFromCommandLine must be called for the command + line arguments to be used. */ STRUMPACKSolverBase(STRUMPACKRowLocMatrix &A, int argc, char *argv[]); @@ -98,13 +98,14 @@ public: /// Default destructor. virtual ~STRUMPACKSolverBase(); - /// Factor and solve the linear system y = Op^{-1} x. + /// Factor and solve the linear system \f$y = Op^{-1} x \f$. void Mult(const Vector &x, Vector &y) const; - /// Factor and solve the linear systems Y[i] = Op^{-1} X[i] across the array of vectors. + /// Factor and solve the linear systems \f$ Y_i = Op^{-1} X_i \f$ 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); /** @brief Set options that were captured from the command line. @@ -114,7 +115,7 @@ public: */ void SetFromCommandLine(); - /// Setup verbose printing during the factor step + /// Set up verbose printing during the factor step void SetPrintFactorStatistics(bool print_stat); /// Set up verbose printing during the solve step @@ -237,28 +238,28 @@ public: /** @brief Set the relative tolerance for low rank compression methods * - * This currently affects BLR, HSS, and HODLR. Use SetCompression to set the - * proper compression type. + * 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 SetCompression to set the - * proper compression type. + * 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 SetCompression to set the proper compression type. + * Use STRUMPACKSolverBase::SetCompression to set the proper compression type. */ void SetCompressionLossyPrecision(int precision); /** @brief Set the number of butterflylevels for the HODLR compression option * - * Use SetCompression to set the proper compression type. + * Use STRUMPACKSolverBase::SetCompression to set the proper compression type. */ void SetCompressionButterflyLevels(int levels); #endif diff --git a/linalg/superlu.hpp b/linalg/superlu.hpp index 4d722ec6dd..d3f0f46e56 100644 --- a/linalg/superlu.hpp +++ b/linalg/superlu.hpp @@ -27,7 +27,6 @@ namespace mfem namespace superlu { -/** @file */ // Copy selected enumerations from SuperLU (from superlu_enum_consts.h) #ifdef MFEM_USE_SUPERLU5 typedef enum From 46d15e9b7ceb2b015ac64f3eb476a0c00b5fc2fd Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Thu, 4 Jan 2024 11:57:40 -0800 Subject: [PATCH 104/200] make style --- linalg/amgxsolver.hpp | 67 ++++++++++++++++++----------------- linalg/mumps.hpp | 18 +++++----- linalg/slepc.hpp | 16 ++++----- linalg/solvers.hpp | 2 +- linalg/strumpack.hpp | 74 +++++++++++++++++++------------------- linalg/superlu.hpp | 82 +++++++++++++++++++++---------------------- 6 files changed, 130 insertions(+), 129 deletions(-) diff --git a/linalg/amgxsolver.hpp b/linalg/amgxsolver.hpp index 82e89ce3d2..b22ecc499d 100644 --- a/linalg/amgxsolver.hpp +++ b/linalg/amgxsolver.hpp @@ -28,7 +28,7 @@ namespace mfem { -/** @brief +/** @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,14 +71,14 @@ class AmgXSolver : public Solver public: /// Flags to configure AmgXSolver as a solver or preconditioner - enum AMGX_MODE + enum AMGX_MODE { /// Use the preconditioned conjugate gradient method with the AMG - /// V-cycle used as a proconditioner. With the default configuration + /// 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 + /// 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 }; @@ -90,13 +90,14 @@ public: 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 + enum CONFIG_SRC { - /// Configuration with be read directly from a string + /// Configuration with be read directly from a string INTERNAL, /// Configure will be read from a specified file - EXTERNAL, - UNDEFINED}; + EXTERNAL, + UNDEFINED + }; AmgXSolver(); @@ -108,7 +109,7 @@ public: /** @brief Initilize the AmgX library for serial execution once the solver configuration has been established through either the - AmgXSolver::ReadParameters method or the constructor. The constructor + AmgXSolver::ReadParameters method or the constructor. The constructor will make this call. */ void InitSerial(); @@ -117,15 +118,15 @@ public: /** @brief Configures AmgX with a default configuration based on the AMGX_MODE - (AmgXSolver::SOLVER, AmgXSolver::PRECONDITIONER) + (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); /** @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 + (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 the number of devices in each compute node as @a nDevs. @@ -134,40 +135,40 @@ public: const AMGX_MODE amgx_Mode_, const bool verbose); /** @brief Initilize 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 + 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); /** @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. + 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 - /** @brief Sets the Operator that is going to be solved via AmgX. - Supports operators based on either an MFEM SparseMatrix or + /** @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); /** @brief Change the input operator that is being solved via AmgX. - Supports operators based on either an MFEM SparseMatrix or + Supports operators based on either an MFEM SparseMatrix or HypreParMatrix. */ void UpdateOperator(const Operator &op); /** @brief Untilize 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 + 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; @@ -175,10 +176,10 @@ public: /// 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 If @a source is set - to AmgXSolver::INTERNAL the parameters are set directly by the string + /** @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 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); @@ -194,8 +195,8 @@ public: two iterations of an AMG V cycle with AmgX's default smoother (block Jacobi). - When configured as a solver the preconditioned conjugate gradient method - is used with the AMG V-cycle with a block Jacobi smoother is used as a + When configured as a solver the preconditioned conjugate gradient method + is used with the AMG V-cycle with a block Jacobi smoother is used as a preconditioner. */ void DefaultParameters(const AMGX_MODE amgxMode_, const bool verbose); @@ -218,7 +219,7 @@ private: CONFIG_SRC configSrc = UNDEFINED; #ifdef MFEM_USE_MPI - /** @brief Consolidates matrix diagonal and off diagonal data and uploads + /** @brief Consolidates matrix diagonal and off diagonal data and uploads matrix to AmgX. */ void SetMatrixMPIGPUExclusive(const HypreParMatrix &A, diff --git a/linalg/mumps.hpp b/linalg/mumps.hpp index d83f068344..589b860a30 100644 --- a/linalg/mumps.hpp +++ b/linalg/mumps.hpp @@ -54,7 +54,7 @@ public: AMD, /// Approximate Minimum Fill method will be used AMF, - /// The PORD library will be used + /// The PORD library will be used PORD, /// The METIS library will be used METIS, @@ -98,7 +98,7 @@ public: * * @param X Array of RHS vectors * @param Y Array of Solution vectors - */ + */ void ArrayMult(const Array &X, Array &Y) const; /** @@ -114,20 +114,20 @@ public: * * @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 - * + * * 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 @@ -137,8 +137,8 @@ public: /** * @brief Set the matrix type * - * Supported matrix types: MUMPSSolver::UNSYMMETRIC, - * MUMPSSolver::SYMMETRIC_POSITIVE_DEFINITE, + * Supported matrix types: MUMPSSolver::UNSYMMETRIC, + * MUMPSSolver::SYMMETRIC_POSITIVE_DEFINITE, * and MUMPSSolver::SYMMETRIC_INDEFINITE * * @param mtype Matrix type @@ -150,8 +150,8 @@ public: /** * @brief Set the reordering strategy * - * Supported reorderings are: MUMPSSolver::AUTOMATIC, - * MUMPSSolver::AMD, MUMPSSolver::AMF, MUMPSSolver::PORD, + * Supported reorderings are: MUMPSSolver::AUTOMATIC, + * MUMPSSolver::AMD, MUMPSSolver::AMF, MUMPSSolver::PORD, * MUMPSSolver::METIS, MUMPSSolver::PARMETIS, * MUMPSSolver::SCOTCH, and MUMPSSolver::PTSCOTCH * diff --git a/linalg/slepc.hpp b/linalg/slepc.hpp index 44b9c414c8..3e3e941435 100644 --- a/linalg/slepc.hpp +++ b/linalg/slepc.hpp @@ -82,7 +82,7 @@ public: @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 @@ -90,14 +90,14 @@ public: @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; /** @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 @@ -105,14 +105,14 @@ public: @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; /** @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, + @note Target imaginary is not supported without complex support in SLEPc, and intervals are not implemented. */ enum Which @@ -147,8 +147,8 @@ public: }; /** @brief Set the which eignevalues 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 + + For SlepcEigenSolver::TARGET_MAGNITUDE or SlepcEigenSolver::TARGET_REAL you will also need to set the target value with SlepcEigenSolver::SetTarget. */ void SetWhichEigenpairs(Which which); diff --git a/linalg/solvers.hpp b/linalg/solvers.hpp index b88ed6df6d..b9e755dacc 100644 --- a/linalg/solvers.hpp +++ b/linalg/solvers.hpp @@ -549,7 +549,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 + /// Iterative solution of the linear system using the GMRES method virtual void Mult(const Vector &b, Vector &x) const; }; diff --git a/linalg/strumpack.hpp b/linalg/strumpack.hpp index d1b34de822..a8c542a5f8 100644 --- a/linalg/strumpack.hpp +++ b/linalg/strumpack.hpp @@ -46,7 +46,7 @@ public: /** @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. + All data is copied so the original matrix may be deleted. */ STRUMPACKRowLocMatrix(const Operator &op, bool sym_sparse = false); @@ -81,16 +81,16 @@ class STRUMPACKSolverBase : public Solver { protected: /** @brief Constructor with MPI_Comm parameter and command line arguments. - - STRUMPACKSolverBase::SetFromCommandLine must be called for the command - line arguments to be used. + + STRUMPACKSolverBase::SetFromCommandLine must be called for the command + line arguments to be used. */ STRUMPACKSolverBase(MPI_Comm comm, int argc, char *argv[]); /** @brief Constructor with STRUMPACK matrix object and command line arguments. - - STRUMPACKSolverBase::SetFromCommandLine must be called for the command - line arguments to be used. + + STRUMPACKSolverBase::SetFromCommandLine must be called for the command + line arguments to be used. */ STRUMPACKSolverBase(STRUMPACKRowLocMatrix &A, int argc, char *argv[]); @@ -104,7 +104,7 @@ public: /// Factor and solve the linear systems \f$ Y_i = Op^{-1} X_i \f$ across the array of vectors. void ArrayMult(const Array &X, Array &Y) const; - /** @brief Set the operator/matrix. + /** @brief Set the operator/matrix. \note @a A must be a STRUMPACKRowLocMatrix. */ void SetOperator(const Operator &op); @@ -131,24 +131,24 @@ public: void SetMaxIter(int max_it); /** @brief Set the flag controlling reuse of the symbolic factorization for multiple - operators. - + operators. + This method must be called before repeated calls to SetOperator. */ void SetReorderingReuse(bool reuse); - /** @brief Enable GPU off-loading available if STRUMPACK was compiled with CUDA. + /** @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. + /** @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 @@ -171,7 +171,7 @@ public: 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) @@ -189,8 +189,8 @@ public: */ void SetReorderingStrategy(strumpack::ReorderingStrategy method); - /** @brief Configure static pivoting for stability. - * + /** @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 @@ -211,7 +211,7 @@ public: 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. * @@ -237,30 +237,30 @@ public: void SetCompression(strumpack::CompressionType type); /** @brief Set the relative tolerance for low rank compression methods - * - * This currently affects BLR, HSS, and HODLR. Use + * + * 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 + * + * 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 butterflylevels for the HODLR compression option - * + * * Use STRUMPACKSolverBase::SetCompression to set the proper compression type. - */ + */ void SetCompressionButterflyLevels(int levels); #endif @@ -292,18 +292,18 @@ public: STRUMPACKSolver(STRUMPACKRowLocMatrix &A); /** @brief Constructor with MPI_Comm parameter and command line arguments. - + SetFromCommandLine must be called for the command line arguments - to be used. + 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) {} - /** @brief Constructor with MSTRUMPACK matrix object and command line arguments. - - SetFromCommandLine must be called for the command line arguments - to be used. + /** @brief Constructor with MSTRUMPACK 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[]); @@ -324,16 +324,16 @@ public: STRUMPACKMixedPrecisionSolver(STRUMPACKRowLocMatrix &A); /** @brief Constructor with MPI_Comm parameter and command line arguments. - + SetFromCommandLine must be called for the command line arguments - to be used. + to be used. */ STRUMPACKMixedPrecisionSolver(MPI_Comm comm, int argc, char *argv[]); /** @brief Constructor with MSTRUMPACK matrix object and command line arguments. - + SetFromCommandLine must be called for the command line arguments - to be used. + to be used. */ STRUMPACKMixedPrecisionSolver(STRUMPACKRowLocMatrix &A, int argc, char *argv[]); diff --git a/linalg/superlu.hpp b/linalg/superlu.hpp index d3f0f46e56..09947646f6 100644 --- a/linalg/superlu.hpp +++ b/linalg/superlu.hpp @@ -29,73 +29,73 @@ namespace superlu // Copy selected enumerations from SuperLU (from superlu_enum_consts.h) #ifdef MFEM_USE_SUPERLU5 -typedef enum +typedef enum { - NOROWPERM, + NOROWPERM, LargeDiag, MY_PERMR } RowPerm; #else /// Define the type of row permutation -typedef enum +typedef enum { /// No row permutation - NOROWPERM, + 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 + 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, + LargeDiag_HWPM, /// User defined row permutation MY_PERMR } RowPerm; #endif /// Define the type of column permutation -typedef enum +typedef enum { /// Natural ordering - NATURAL, + NATURAL, /// Minimum degree ordering on structure of \f$ A^T*A \f$ - MMD_ATA, + MMD_ATA, /// Minimum degree ordering on structure of \f$ A^T+A \f$ - MMD_AT_PLUS_A, + MMD_AT_PLUS_A, /// Approximate minimum degree column ordering COLAMD, /// Sequential ordering on structure of \f$ A^T+A \f$ using the METIS package - METIS_AT_PLUS_A, + METIS_AT_PLUS_A, /// Sequential ordering on structure of \f$ A^T+A \f$ using the PARMETIS package - PARMETIS, + PARMETIS, /// Use the Zoltan library from Sandia to define the column ordering - ZOLTAN, + ZOLTAN, /// User defined column permutation MY_PERMC } ColPerm; /// Define how to do iterative refinement -typedef enum +typedef enum { /// No interative refinement - NOREFINE, + NOREFINE, /// Iterative refinement accumulating residuals in a float. - SLU_SINGLE=1, + SLU_SINGLE=1, /// Iterative refinement accumulating residuals in a double. - SLU_DOUBLE, + SLU_DOUBLE, /// Iterative refinement accumulating residuals in a higher precision variable. SLU_EXTRA } IterRefine; /// Define the information that is provided about the matrix factorization ahead of time -typedef enum +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 + 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 + 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, /// The matrix A was provided in fully factored form and no factorization is needed. @@ -156,7 +156,7 @@ private: class SuperLUSolver : public Solver { public: - /** @brief 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 @@ -167,13 +167,13 @@ public: @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. */ + into the number of processors. */ SuperLUSolver(SuperLURowLocMatrix &A, int npdep = 1); /// Default destructor. ~SuperLUSolver(); - /** @brief Set the operator/matrix. + /** @brief Set the operator/matrix. \note @a A must be a SuperLURowLocMatrix. */ void SetOperator(const Operator &op); @@ -183,7 +183,7 @@ public: /** @brief Factor and solve the linear systems \f$ y_i = Op^{-1} x_i \f$ for all i in the @a X and @a Y arrays. - \note Factorization modifies the operator matrix. */ + \note Factorization modifies the operator matrix. */ void ArrayMult(const Array &X, Array &Y) const; /** @brief Factor and solve the transposed linear system \f$ y = Op^{-T} x \f$ @@ -192,7 +192,7 @@ public: /** @brief Factor and solve the transposed linear systems \f$ y_i = Op^{-T} x_i \f$ for all i in the @a X and @a Y arrays. - \note Factorization modifies the operator matrix. */ + \note Factorization modifies the operator matrix. */ void ArrayMultTranspose(const Array &X, Array &Y) const; @@ -203,38 +203,38 @@ public: the rows and columns have unit norms. (default true) */ void SetEquilibriate(bool equil); - /** @brief Specify how to permute the columns of the matrix. - + /** @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::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. - + /** @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::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::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 + /** @brief Specify whether to replace tiny diagonals encountered during pivot with \f$ \sqrt{\epsilon} \lVert A \rVert \f$ (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 + /** @brief Specifies whether to use the elimination tree computed from the serial symbolic factorization to perform static scheduling (default false)*/ void SetLookAheadElimTree(bool etree); @@ -242,7 +242,7 @@ public: void SetSymmetricPattern(bool sym); /** @brief Specify whether to perform parallel symbolic factorization. - \note If true SuperLU will use superlu::PARMETIS for the Column + \note If true SuperLU will use superlu::PARMETIS for the Column Permutation regardless of the setting */ void SetParSymbFact(bool par); From 918622a4308058062bdf6568cb1b66cbab6c879d Mon Sep 17 00:00:00 2001 From: Hugh Carson Date: Thu, 4 Jan 2024 17:38:13 -0500 Subject: [PATCH 105/200] Clear entity_conf_group and entity_elem_local on Update() --- mesh/pncmesh.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesh/pncmesh.cpp b/mesh/pncmesh.cpp index cd6625e9c2..a8a88081f3 100644 --- a/mesh/pncmesh.cpp +++ b/mesh/pncmesh.cpp @@ -107,6 +107,8 @@ void ParNCMesh::Update() entity_owner[i].DeleteAll(); entity_pmat_group[i].DeleteAll(); entity_index_rank[i].DeleteAll(); + entity_conf_group[i].DeleteAll(); + entity_elem_local[i].DeleteAll(); } shared_vertices.Clear(); From c6b1d45b2520979a16eb13354c073f1093fa279e Mon Sep 17 00:00:00 2001 From: Sebastian Grimberg Date: Fri, 5 Jan 2024 15:59:49 -0800 Subject: [PATCH 106/200] Fix GridFunction::GetNodalValues when the vector has use_dev = true --- fem/gridfunc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/gridfunc.cpp b/fem/gridfunc.cpp index 310d8d7043..bd5504d63c 100644 --- a/fem/gridfunc.cpp +++ b/fem/gridfunc.cpp @@ -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); From ee0118f95434f14e91d5572d3cda3aaed82172df Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Mon, 8 Jan 2024 11:35:30 -0800 Subject: [PATCH 107/200] QuadratureFunction::Integrate in parallel --- fem/qfunction.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/fem/qfunction.cpp b/fem/qfunction.cpp index a43145aff5..b8883cc1fa 100644 --- a/fem/qfunction.cpp +++ b/fem/qfunction.cpp @@ -12,6 +12,7 @@ #include "qfunction.hpp" #include "quadinterpolator.hpp" #include "quadinterpolator_face.hpp" +#include "../mesh/pmesh.hpp" namespace mfem { @@ -240,12 +241,23 @@ 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 = (*this)*qspace->GetWeights(); - // return qspace->GetMesh()->ReduceInt(local_integral); - return local_integral; + return ReduceDouble(qspace->GetMesh(), local_integral); } } From 975f03b0f0cf55bfdd60feee095f129900c4f458 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Mon, 8 Jan 2024 11:56:41 -0800 Subject: [PATCH 108/200] Support QuadratureFunction::Integrate with vdim > 1 --- fem/qfunction.cpp | 23 +++++++++++++++++++++ fem/qfunction.hpp | 4 ++++ tests/unit/fem/test_quadf_coef.cpp | 33 ++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/fem/qfunction.cpp b/fem/qfunction.cpp index b8883cc1fa..3c9ee2ed61 100644 --- a/fem/qfunction.cpp +++ b/fem/qfunction.cpp @@ -12,6 +12,7 @@ #include "qfunction.hpp" #include "quadinterpolator.hpp" #include "quadinterpolator_face.hpp" +#include "../general/forall.hpp" #include "../mesh/pmesh.hpp" namespace mfem @@ -260,4 +261,26 @@ double QuadratureFunction::Integrate() const 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(), component*weights); + } +} + } diff --git a/fem/qfunction.hpp b/fem/qfunction.hpp index a48dcc3578..1cee15e9af 100644 --- a/fem/qfunction.hpp +++ b/fem/qfunction.hpp @@ -199,6 +199,10 @@ public: /// 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/tests/unit/fem/test_quadf_coef.cpp b/tests/unit/fem/test_quadf_coef.cpp index ca9eee3373..c15fd3185c 100644 --- a/tests/unit/fem/test_quadf_coef.cpp +++ b/tests/unit/fem/test_quadf_coef.cpp @@ -187,6 +187,39 @@ TEST_CASE("Quadrature Function Integration", "[QuadratureFunction][CUDA]") REQUIRE(integ_1 == MFEM_Approx(integ_2)); } + SECTION("Vector-valued") + { + const int vdim = 3; + const int ordering = Ordering::byNODES; + FiniteElementSpace fes_vec(&mesh, &fec, vdim, ordering); + + QuadratureSpace qs(&mesh, int_order); + const IntegrationRule &ir = qs.GetIntRule(0); + + QuadratureFunction qf(qs, vdim); + qf.Randomize(1); + VectorQuadratureFunctionCoefficient qf_coeff(qf); + + LinearForm lf(&fes_vec); + auto *integrator = new VectorDomainLFIntegrator(qf_coeff); + integrator->SetIntRule(&ir); + lf.AddDomainIntegrator(integrator); + lf.Assemble(); + + Vector integrals(vdim); + qf.Integrate(integrals); + const int ndof = fes.GetNDofs(); + for (int vd = 0; vd < vdim; ++vd) + { + double integ = 0.0; + for (int i = 0; i < ndof; ++i) + { + integ += lf[i + vd*ndof]; + } + REQUIRE(integ == MFEM_Approx(integrals[vd])); + } + } + SECTION("FaceQuadratureSpace") { FaceQuadratureSpace qs(mesh, int_order, FaceType::Boundary); From 2fc95046d4c7eae1623d826f7feda95545c26d05 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Mon, 8 Jan 2024 12:02:20 -0800 Subject: [PATCH 109/200] Add QuadratureSpaceBase::Integrate for vdim > 1 --- fem/qspace.cpp | 9 +++++++++ fem/qspace.hpp | 3 +++ tests/unit/fem/test_quadf_coef.cpp | 14 +++++++++++--- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/fem/qspace.cpp b/fem/qspace.cpp index f7a0d2788b..660bdf3220 100644 --- a/fem/qspace.cpp +++ b/fem/qspace.cpp @@ -69,6 +69,15 @@ double QuadratureSpaceBase::Integrate(Coefficient &coeff) const 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(); diff --git a/fem/qspace.hpp b/fem/qspace.hpp index ff175cf82e..af77c969af 100644 --- a/fem/qspace.hpp +++ b/fem/qspace.hpp @@ -107,6 +107,9 @@ public: /// 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() { } }; diff --git a/tests/unit/fem/test_quadf_coef.cpp b/tests/unit/fem/test_quadf_coef.cpp index c15fd3185c..fdd83b5041 100644 --- a/tests/unit/fem/test_quadf_coef.cpp +++ b/tests/unit/fem/test_quadf_coef.cpp @@ -184,7 +184,10 @@ TEST_CASE("Quadrature Function Integration", "[QuadratureFunction][CUDA]") lf.Assemble(); const double integ_1 = lf.Sum(); const double integ_2 = qf.Integrate(); + const double integ_3 = qs.Integrate(qf_coeff); + REQUIRE(integ_1 == MFEM_Approx(integ_2)); + REQUIRE(integ_1 == MFEM_Approx(integ_3)); } SECTION("Vector-valued") @@ -206,8 +209,12 @@ TEST_CASE("Quadrature Function Integration", "[QuadratureFunction][CUDA]") lf.AddDomainIntegrator(integrator); lf.Assemble(); - Vector integrals(vdim); - qf.Integrate(integrals); + Vector integrals_1(vdim); + Vector integrals_2(vdim); + + qf.Integrate(integrals_1); + qs.Integrate(qf_coeff, integrals_2); + const int ndof = fes.GetNDofs(); for (int vd = 0; vd < vdim; ++vd) { @@ -216,7 +223,8 @@ TEST_CASE("Quadrature Function Integration", "[QuadratureFunction][CUDA]") { integ += lf[i + vd*ndof]; } - REQUIRE(integ == MFEM_Approx(integrals[vd])); + REQUIRE(integ == MFEM_Approx(integrals_1[vd])); + REQUIRE(integ == MFEM_Approx(integrals_2[vd])); } } From a8708fc6cae2c826f3908198f97940edbd9998cb Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 10 Jan 2024 09:43:43 -0800 Subject: [PATCH 110/200] Override AddMult for ConstrainedOperator Use existing workspace vector to avoid extra allocations --- linalg/operator.cpp | 14 ++++++++++---- linalg/operator.hpp | 10 ++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/linalg/operator.cpp b/linalg/operator.cpp index 1f214ece7a..f92f34be6d 100644 --- a/linalg/operator.cpp +++ b/linalg/operator.cpp @@ -481,7 +481,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); } @@ -591,6 +592,13 @@ void ConstrainedOperator::Mult(const Vector &x, Vector &y) const } } +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 +633,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..30b9298f77 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -892,14 +892,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 +922,12 @@ 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; /// Destructor: destroys the unconstrained Operator, if owned. - virtual ~ConstrainedOperator() { if (own_A) { delete A; } } + ~ConstrainedOperator() { if (own_A) { delete A; } } }; /** @brief Rectangular Operator for imposing essential boundary conditions on From 68e513c40eed5bab68bbcc6820eecb7f9de092dd Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Thu, 11 Jan 2024 10:06:28 -0800 Subject: [PATCH 111/200] Use Write instead of ReadWrite in TensorProductPRefinementTransferOperator Can avoid some unnecessary H to D memcpy --- fem/transfer.cpp | 54 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/fem/transfer.cpp b/fem/transfer.cpp index 7c08f5efff..7e3ff4a016 100644 --- a/fem/transfer.cpp +++ b/fem/transfer.cpp @@ -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]; From c54bc0aa55c6b9823a98b9f294ba9bd9323ce763 Mon Sep 17 00:00:00 2001 From: Robert Carson Date: Thu, 11 Jan 2024 10:48:14 -0800 Subject: [PATCH 112/200] Add ability to set tolerance in TransformBack func of the ElementTransformation class --- fem/eltrans.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fem/eltrans.hpp b/fem/eltrans.hpp index 8d3955ab41..57d259cb42 100644 --- a/fem/eltrans.hpp +++ b/fem/eltrans.hpp @@ -175,7 +175,7 @@ public: 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() { } }; @@ -447,9 +447,10 @@ public: 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); } From 6c4f179751ecfa45863a376a805878882d90afb7 Mon Sep 17 00:00:00 2001 From: Robert Carson Date: Thu, 11 Jan 2024 10:56:53 -0800 Subject: [PATCH 113/200] make style --- fem/eltrans.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fem/eltrans.hpp b/fem/eltrans.hpp index 57d259cb42..a81952ad95 100644 --- a/fem/eltrans.hpp +++ b/fem/eltrans.hpp @@ -175,7 +175,8 @@ public: 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, const double phys_tol = 1e-15) = 0; + virtual int TransformBack(const Vector &pt, IntegrationPoint &ip, + const double phys_tol = 1e-15) = 0; virtual ~ElementTransformation() { } }; @@ -447,7 +448,8 @@ public: 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, const double phys_rel_tol = 1e-15) + 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); From 56d59c8e7196363525a7c2a3d65502cc66fe2afe Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 17 Jan 2024 16:15:17 -0800 Subject: [PATCH 114/200] make style --- fem/bilinearform.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index fc0e70426f..0f9f52e879 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -812,7 +812,7 @@ public: (currently unimplemented and returns NULL)*/ virtual MatrixInverse *Inverse() const; - /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is + /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is AssemblyLevel::LEGACY.*/ virtual void Finalize(int skip_zeros = 1); @@ -923,7 +923,7 @@ public: /** @brief For partially conforming trial and/or test FE spaces, complete the assembly process by performing \f$ P2^t A P1 \f$ where \f$ A \f$ is the internal - sparse matrix; \f$ P1 \f$ and \f$ P2 \f$ are the conforming prolongation + sparse matrix; \f$ P1 \f$ and \f$ P2 \f$ 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(); From 4bfe05a9a5fd7788e022346eaf56c1a6354cc50c Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 17 Jan 2024 21:47:00 -0800 Subject: [PATCH 115/200] Use InnerProduct instead of operator* in QuadratureFunction::Integrate --- fem/qfunction.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fem/qfunction.cpp b/fem/qfunction.cpp index 3c9ee2ed61..488c30827a 100644 --- a/fem/qfunction.cpp +++ b/fem/qfunction.cpp @@ -257,7 +257,7 @@ static double ReduceDouble(const Mesh *mesh, double value) double QuadratureFunction::Integrate() const { MFEM_VERIFY(vdim == 1, "Only scalar functions are supported.") - const double local_integral = (*this)*qspace->GetWeights(); + const double local_integral = InnerProduct(*this, qspace->GetWeights()); return ReduceDouble(qspace->GetMesh(), local_integral); } @@ -279,7 +279,8 @@ void QuadratureFunction::Integrate(Vector &integrals) const { d_c[i] = d_v[vd + i*VDIM]; }); - integrals[vd] = ReduceDouble(qspace->GetMesh(), component*weights); + integrals[vd] = ReduceDouble(qspace->GetMesh(), + InnerProduct(component, weights)); } } From 6d35c65f954d11a8c7f66dd9c3baf361c11f0645 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 17 Jan 2024 22:16:35 -0800 Subject: [PATCH 116/200] Add Mesh::nodes_sequence to track geometric factor invalidation --- mesh/mesh.cpp | 4 ++++ mesh/mesh.hpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/mesh/mesh.cpp b/mesh/mesh.cpp index 6a6f0a0b4e..4678b97764 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp @@ -898,6 +898,8 @@ void Mesh::DeleteGeometricFactors() delete face_geom_factors[i]; } face_geom_factors.SetSize(0); + + ++nodes_sequence; } void Mesh::GetLocalFaceTransformation( @@ -1447,6 +1449,7 @@ void Mesh::Init() nbBoundaryFaces = -1; meshgen = mesh_geoms = 0; sequence = 0; + nodes_sequence = 0; Nodes = NULL; own_nodes = 1; NURBSext = NULL; @@ -4050,6 +4053,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 diff --git a/mesh/mesh.hpp b/mesh/mesh.hpp index cb0c6b6da1..8ad865d01f 100644 --- a/mesh/mesh.hpp +++ b/mesh/mesh.hpp @@ -82,6 +82,9 @@ protected: // Mesh, such as FiniteElementSpace, GridFunction, etc. long sequence; + /// Counter for geometric factor invalidation + long nodes_sequence; + Array elements; // Vertices are only at the corners of elements, where you would expect them // in the lowest-order mesh. In some cases, e.g. in a Mesh that defines the @@ -2122,6 +2125,13 @@ public: Update() calls. */ long GetSequence() const { return sequence; } + /// @brief Return the nodes update counter. + /// + /// This counter starts at zero, and is incremented every time the geometric + /// factors must be recomputed (e.g. on calls to Mesh::Transform, + /// Mesh::NodesUpdated, etc.) + long GetNodesSequence() const { return nodes_sequence; } + /// @} ///@{ @name NURBS mesh refinement methods From 8d234b5358e9f2306116deee4866032aad5a233a Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 17 Jan 2024 22:17:14 -0800 Subject: [PATCH 117/200] Make sure cache in QuadratureSpaceBase::GetWeights is invalidated properly Add unit test to test this case --- fem/qspace.cpp | 9 +++++++-- fem/qspace.hpp | 1 + tests/unit/fem/test_quadf_coef.cpp | 11 +++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/fem/qspace.cpp b/fem/qspace.cpp index 660bdf3220..5a2e56c96a 100644 --- a/fem/qspace.cpp +++ b/fem/qspace.cpp @@ -40,7 +40,9 @@ void QuadratureSpaceBase::ConstructIntRules(int dim) void QuadratureSpaceBase::ConstructWeights() const { // First get the Jacobian determinants (without the quadrature weight - // contributions). + // 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. @@ -58,7 +60,10 @@ void QuadratureSpaceBase::ConstructWeights() const const Vector &QuadratureSpaceBase::GetWeights() const { - if (weights.Size() == 0) { ConstructWeights(); } + if (weights.Size() == 0 || nodes_sequence != mesh.GetNodesSequence()) + { + ConstructWeights(); + } return weights; } diff --git a/fem/qspace.hpp b/fem/qspace.hpp index af77c969af..d3e85fb034 100644 --- a/fem/qspace.hpp +++ b/fem/qspace.hpp @@ -31,6 +31,7 @@ protected: 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. /// diff --git a/tests/unit/fem/test_quadf_coef.cpp b/tests/unit/fem/test_quadf_coef.cpp index fdd83b5041..eeaa542840 100644 --- a/tests/unit/fem/test_quadf_coef.cpp +++ b/tests/unit/fem/test_quadf_coef.cpp @@ -164,6 +164,8 @@ TEST_CASE("Quadrature Function Integration", "[QuadratureFunction][CUDA]") ); const int order = GENERATE(1, 2, 3); + CAPTURE(fname, order); + Mesh mesh = Mesh::LoadFromFile(fname); H1_FECollection fec(1, mesh.Dimension()); FiniteElementSpace fes(&mesh, &fec); @@ -173,6 +175,15 @@ TEST_CASE("Quadrature Function Integration", "[QuadratureFunction][CUDA]") SECTION("QuadratureSpace") { QuadratureSpace qs(&mesh, int_order); + + // Make sure invalidating the cached weights works properly + qs.GetWeights(); + mesh.Transform([](const Vector &xold, Vector &xnew) + { + xnew = xold; + xnew *= 1.1; + }); + const IntegrationRule &ir = qs.GetIntRule(0); QuadratureFunction qf(qs); From 238a9da6d9c6e922c94f772c2227abb61c151dd7 Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Fri, 19 Jan 2024 12:11:39 -0700 Subject: [PATCH 118/200] added to changelog --- CHANGELOG | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index b31adac9d5..3baafb22de 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -22,6 +22,19 @@ 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 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. From 77d409b4c6225f4bac88166407f7e4c7bd3570de Mon Sep 17 00:00:00 2001 From: Victor DeCaria Date: Fri, 19 Jan 2024 12:45:55 -0700 Subject: [PATCH 119/200] added documentation link --- doc/CodeDocumentation.dox | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/CodeDocumentation.dox b/doc/CodeDocumentation.dox index 858da07dcc..2f3b8cef35 100644 --- a/doc/CodeDocumentation.dox +++ b/doc/CodeDocumentation.dox @@ -216,6 +216,7 @@ namespace mfem { * - 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. */ From 88fe87f4bc7b87c17a5b1280cad31ae72d7b74e8 Mon Sep 17 00:00:00 2001 From: Joseph Signorelli Date: Sat, 20 Jan 2024 17:48:20 -0600 Subject: [PATCH 120/200] Application of make style --- fem/nonlinearform.cpp | 8 ++++---- fem/nonlinearform.hpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fem/nonlinearform.cpp b/fem/nonlinearform.cpp index 2ceda2b42b..f7125e661b 100644 --- a/fem/nonlinearform.cpp +++ b/fem/nonlinearform.cpp @@ -142,7 +142,7 @@ double NonlinearForm::GetGridFunctionEnergy(const Vector &x) const } } } - + if (bnfi.Size()) { // Which boundary attributes need to be processed? @@ -186,7 +186,7 @@ double NonlinearForm::GetGridFunctionEnergy(const Vector &x) const } } - + if (fnfi.Size()) { MFEM_ABORT("TODO: add energy contribution from interior face terms"); @@ -899,7 +899,7 @@ double BlockNonlinearForm::GetEnergyBlocked(const BlockVector &bx) const { if (bnfi_marker[k] && (*bnfi_marker[k])[bdr_attr-1] == 0) { continue; } - + energy += bnfi[k]->GetElementEnergy(fe, *T, el_x_const); } } @@ -1054,7 +1054,7 @@ void BlockNonlinearForm::MultBlocked(const BlockVector &bx, (*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; } diff --git a/fem/nonlinearform.hpp b/fem/nonlinearform.hpp index 07e4707d6b..f036a7a823 100644 --- a/fem/nonlinearform.hpp +++ b/fem/nonlinearform.hpp @@ -123,11 +123,11 @@ public: /// Access all integrators added with AddDomainIntegrator(). 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) @@ -339,7 +339,7 @@ public: /// Adds new Boundary Integrator, restricted to specific attributes. void AddBoundaryIntegrator(BlockNonlinearFormIntegrator *nlfi, - Array &elem_marker) + Array &elem_marker) { bnfi.Append(nlfi); bnfi_marker.Append(&elem_marker); } /// Adds new Interior Face Integrator. From 4c547f52c247a39618b1be68e58832ac87578ca2 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Mon, 23 Dec 2019 10:28:16 +0100 Subject: [PATCH 121/200] Minor optimization of SparseMatrix::EliminateCol(). --- linalg/sparsemat.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/linalg/sparsemat.cpp b/linalg/sparsemat.cpp index 6f1b0d6828..9ac3b79951 100644 --- a/linalg/sparsemat.cpp +++ b/linalg/sparsemat.cpp @@ -1767,6 +1767,7 @@ void SparseMatrix::EliminateCol(int col, DiagonalPolicy dpolicy) if (aux->Column == col) { aux->Value = 0.0; + break; } } } From 19d1c7226eca6d2f0930acb97132a56d7d68a5fa Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Fri, 10 Feb 2023 10:10:28 +0100 Subject: [PATCH 122/200] Fixed printing methods of sparse matrices on devices. --- linalg/sparsemat.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/linalg/sparsemat.cpp b/linalg/sparsemat.cpp index 6f1b0d6828..93ba2c6abc 100644 --- a/linalg/sparsemat.cpp +++ b/linalg/sparsemat.cpp @@ -3291,13 +3291,20 @@ void SparseMatrix::Print(std::ostream & os, int width_) const void SparseMatrix::PrintMatlab(std::ostream & os) const { + MFEM_VERIFY(Finalized(), "Matrix must be finalized."); + 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); + // HostRead forces synchronization + HostReadI(); + HostReadJ(); + HostReadData(); for (i = 0; i < height; i++) { for (j = I[i]; j < I[i+1]; j++) @@ -3313,6 +3320,8 @@ void SparseMatrix::PrintMatlab(std::ostream & os) const void SparseMatrix::PrintMM(std::ostream & os) const { + MFEM_VERIFY(Finalized(), "Matrix must be finalized."); + int i, j; ios::fmtflags old_fmt = os.flags(); os.setf(ios::scientific); @@ -3322,6 +3331,11 @@ void SparseMatrix::PrintMM(std::ostream & os) const << "% Generated by MFEM" << '\n'; os << height << " " << width << " " << NumNonZeroElems() << '\n'; + + // HostRead forces synchronization + HostReadI(); + HostReadJ(); + HostReadData(); for (i = 0; i < height; i++) { for (j = I[i]; j < I[i+1]; j++) @@ -3341,6 +3355,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 +3384,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'; From 1a9cf065d915a40806d53c306caf0cf2b1a10c79 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Fri, 10 Feb 2023 10:27:19 +0100 Subject: [PATCH 123/200] Adding printing of non-finalized sparse matrices. --- linalg/sparsemat.cpp | 60 +++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/linalg/sparsemat.cpp b/linalg/sparsemat.cpp index 93ba2c6abc..62d4c38e79 100644 --- a/linalg/sparsemat.cpp +++ b/linalg/sparsemat.cpp @@ -3291,8 +3291,6 @@ void SparseMatrix::Print(std::ostream & os, int width_) const void SparseMatrix::PrintMatlab(std::ostream & os) const { - MFEM_VERIFY(Finalized(), "Matrix must be finalized."); - os << "% size " << height << " " << width << "\n"; os << "% Non Zeros " << NumNonZeroElems() << "\n"; @@ -3301,15 +3299,29 @@ void SparseMatrix::PrintMatlab(std::ostream & os) const os.setf(ios::scientific); std::streamsize old_prec = os.precision(14); - // HostRead forces synchronization - HostReadI(); - HostReadJ(); - HostReadData(); - 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 @@ -3320,8 +3332,6 @@ void SparseMatrix::PrintMatlab(std::ostream & os) const void SparseMatrix::PrintMM(std::ostream & os) const { - MFEM_VERIFY(Finalized(), "Matrix must be finalized."); - int i, j; ios::fmtflags old_fmt = os.flags(); os.setf(ios::scientific); @@ -3332,15 +3342,29 @@ void SparseMatrix::PrintMM(std::ostream & os) const os << height << " " << width << " " << NumNonZeroElems() << '\n'; - // HostRead forces synchronization - HostReadI(); - HostReadJ(); - HostReadData(); - 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); From d843cd6e8a65f6266383bbf4a317b08b0dad40d7 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Sun, 29 Dec 2019 21:29:18 +0100 Subject: [PATCH 124/200] Added const qualifiers to Operator arguments of BlockOperator. --- linalg/blockoperator.cpp | 4 ++-- linalg/blockoperator.hpp | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/linalg/blockoperator.cpp b/linalg/blockoperator.cpp index b1c0c3c311..c53d8dc36c 100644 --- a/linalg/blockoperator.cpp +++ b/linalg/blockoperator.cpp @@ -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..8c22cfe7a9 100644 --- a/linalg/blockoperator.hpp +++ b/linalg/blockoperator.hpp @@ -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; From f8040db3ec84ac2017a02294a65087e62520197e Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Fri, 24 Dec 2021 08:36:53 +0100 Subject: [PATCH 125/200] Made available FaceIsTrueInterior in ParMesh as it is supposed to be probably. --- mesh/pmesh.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesh/pmesh.hpp b/mesh/pmesh.hpp index ce5dbfbc28..48a74a763a 100644 --- a/mesh/pmesh.hpp +++ b/mesh/pmesh.hpp @@ -491,6 +491,8 @@ public: void GenerateOffsets(int N, HYPRE_BigInt loc_sizes[], Array *offsets[]) const; + using Mesh::FaceIsTrueInterior; + void ExchangeFaceNbrData(); void ExchangeFaceNbrNodes(); From 755eb9d65f9ec8061453ce82c462aef435698496 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Wed, 8 Jun 2022 09:07:30 +0200 Subject: [PATCH 126/200] Added const qualifier to quadrature function coefficient. --- fem/coefficient.cpp | 4 ++-- fem/coefficient.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fem/coefficient.cpp b/fem/coefficient.cpp index 90eef2c9ce..cebdf348f5 100644 --- a/fem/coefficient.cpp +++ b/fem/coefficient.cpp @@ -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..a80f6e81c6 100644 --- a/fem/coefficient.hpp +++ b/fem/coefficient.hpp @@ -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; } From 34aac72833f81decc783221a4848cbc2de5f3775 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Wed, 8 Jun 2022 09:08:47 +0200 Subject: [PATCH 127/200] Added default NULL value of the integration rule for quadrature integrators as it is not used anyway. --- fem/lininteg.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fem/lininteg.hpp b/fem/lininteg.hpp index 0cc5a80d44..25741e0626 100644 --- a/fem/lininteg.hpp +++ b/fem/lininteg.hpp @@ -728,7 +728,7 @@ private: public: VectorQuadratureLFIntegrator(VectorQuadratureFunctionCoefficient &vqfc, - const IntegrationRule *ir) + const IntegrationRule *ir = NULL) : LinearFormIntegrator(ir), vqfc(vqfc) { if (ir) @@ -760,7 +760,7 @@ private: public: QuadratureLFIntegrator(QuadratureFunctionCoefficient &qfc, - const IntegrationRule *ir) + const IntegrationRule *ir = NULL) : LinearFormIntegrator(ir), qfc(qfc) { if (ir) From e311b0034937cde09de42e4a23bbe746661ce21f Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Wed, 13 Jul 2022 11:58:12 +0200 Subject: [PATCH 128/200] Added closed GL quadrature into the closed ones. --- fem/intrules.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fem/intrules.cpp b/fem/intrules.cpp index cb9544852f..ddce39e0a4 100644 --- a/fem/intrules.cpp +++ b/fem/intrules.cpp @@ -917,6 +917,7 @@ int Quadrature1D::CheckClosed(int type) { case GaussLobatto: case ClosedUniform: + case ClosedGL: return type; default: return Invalid; From 55a35c881814c3708e3a34acdc44b417b79b8043 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Fri, 10 Feb 2023 10:04:10 +0100 Subject: [PATCH 129/200] Fixed boundary trace integration in MixedBilinearForm. --- fem/bilinearform.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fem/bilinearform.cpp b/fem/bilinearform.cpp index 2661ff7f13..5d08386690 100644 --- a/fem/bilinearform.cpp +++ b/fem/bilinearform.cpp @@ -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 From 63c97160564286cab93902b93aebc8c877f14117 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Wed, 15 Feb 2023 16:52:15 +0100 Subject: [PATCH 130/200] Fixed VectorDiffusionOperator::AssembleElementVector(). --- fem/bilininteg.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fem/bilininteg.cpp b/fem/bilininteg.cpp index 59a35f4606..f7f253851d 100644 --- a/fem/bilininteg.cpp +++ b/fem/bilininteg.cpp @@ -2948,16 +2948,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) From 2d582d80c9c7e605c1cc9afe8a50647687bd8f84 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Tue, 7 Mar 2023 09:32:27 +0100 Subject: [PATCH 131/200] Added const qualifier for boundary attributes in GridFunction projection methods. --- fem/gridfunc.cpp | 13 +++++++------ fem/gridfunc.hpp | 16 +++++++++------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/fem/gridfunc.cpp b/fem/gridfunc.cpp index 310d8d7043..6f2a930586 100644 --- a/fem/gridfunc.cpp +++ b/fem/gridfunc.cpp @@ -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); diff --git a/fem/gridfunc.hpp b/fem/gridfunc.hpp index d7cf303be5..e6330c6a1c 100644 --- a/fem/gridfunc.hpp +++ b/fem/gridfunc.hpp @@ -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, From 20dbb8efbae48fe23c78887d46d23d22b1a45cf1 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Thu, 7 Sep 2023 10:33:58 +0200 Subject: [PATCH 132/200] Added support of integral elements to L2 error. --- fem/gridfunc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fem/gridfunc.cpp b/fem/gridfunc.cpp index 6f2a930586..0d719935fb 100644 --- a/fem/gridfunc.cpp +++ b/fem/gridfunc.cpp @@ -2747,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; @@ -2760,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; } From a0ae98f4001204ccf9f4a731c09b95191f8441b7 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Mon, 22 Jan 2024 16:23:43 -0800 Subject: [PATCH 133/200] Added const qualifier to boundary attributes in ParGridFunction projection methods. --- fem/pgridfunc.cpp | 4 ++-- fem/pgridfunc.hpp | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fem/pgridfunc.cpp b/fem/pgridfunc.cpp index e546093599..178d5fc5cc 100644 --- a/fem/pgridfunc.cpp +++ b/fem/pgridfunc.cpp @@ -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..6f2ec89246 100644 --- a/fem/pgridfunc.hpp +++ b/fem/pgridfunc.hpp @@ -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 From 7a2ab45ae02c2bfd7b02edd99ce28055cb743354 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Mon, 22 Jan 2024 16:55:41 -0800 Subject: [PATCH 134/200] Fixed div-free solver miniapp to work with constant operators. --- miniapps/solvers/div_free_solver.cpp | 9 +++++---- miniapps/solvers/div_free_solver.hpp | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 978abbcc40..7c3905e061 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -314,7 +314,8 @@ void SaddleSchwarzSmoother::Mult(const Vector & x, Vector & y) const blk_y.GetBlock(1) -= coarse_l2_projection; } -BDPMinresSolver::BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, +BDPMinresSolver::BDPMinresSolver(const HypreParMatrix& M, + const HypreParMatrix& B, IterSolveParameters param) : DarcySolver(M.NumRows(), B.NumRows()), op_(offsets_), prec_(offsets_), BT_(B.Transpose()), solver_(M.GetComm()) @@ -360,8 +361,8 @@ DivFreeSolver::DivFreeSolver(const HypreParMatrix &M, const HypreParMatrix& B, for (int l = data.P_l2.size(); l >= 0; --l) { - auto& M_f = static_cast(ops_[l]->GetBlock(0, 0)); - auto& B_f = static_cast(ops_[l]->GetBlock(1, 0)); + auto& M_f = static_cast(ops_[l]->GetBlock(0, 0)); + auto& B_f = static_cast(ops_[l]->GetBlock(1, 0)); if (l == 0) { @@ -586,7 +587,7 @@ void DivFreeSolver::Mult(const Vector & x, Vector & y) const ch.Clear(); ch.Start(); - auto M = dynamic_cast(ops_.Last()->GetBlock(0, 0)); + auto M = dynamic_cast(ops_.Last()->GetBlock(0, 0)); M.Mult(-1.0, correction.GetBlock(0), 1.0, resid.GetBlock(0)); SolvePotential(resid.GetBlock(0), correction.GetBlock(1)); blk_y.GetBlock(1) += correction.GetBlock(1); diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index ad16c2c45a..57177231fc 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -190,7 +190,7 @@ class BDPMinresSolver : public DarcySolver MINRESSolver solver_; Array ess_zero_dofs_; public: - BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, + BDPMinresSolver(const HypreParMatrix& M, const HypreParMatrix& B, IterSolveParameters param); virtual void Mult(const Vector & x, Vector & y) const; virtual void SetOperator(const Operator &op) { } From 15e887969a3147750665f137a9a896ff423c67f5 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 23 Jan 2024 11:38:56 -0800 Subject: [PATCH 135/200] Fixed lines that were longer than 80 chars. --- fem/bilinearform.hpp | 138 ++++++++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 61 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 0f9f52e879..3e4ee3ca11 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -73,14 +73,16 @@ protected: /// FE space on which the form lives. Not owned. FiniteElementSpace *fes; - /// The ::AssemblyLevel of the form (AssemblyLevel::LEGACY, AssemblyLevel::FULL, AssemblyLevel::ELEMENT, AssemblyLevel::PARTIAL) + /** @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 @@ -136,9 +138,9 @@ protected: void AllocMat(); /** @brief For partially conforming trial and/or test FE spaces, complete the - assembly process by performing \f$ P^t A P\f$ where \f$ A \f$ is the internal - sparse matrix and \f$ P \f$ is the conforming prolongation matrix of the - trial/test FE space. After this call the + assembly process by performing \f$ P^t A P\f$ where \f$ A \f$ is the + internal sparse matrix and \f$ P \f$ 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(); @@ -215,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 @@ -236,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 @@ -334,13 +336,14 @@ public: 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$ (currently returns NULL) + /** @brief Returns a pointer to (approximation) of the matrix inverse: + f$ M^{-1} \f$ (currently returns NULL) */ virtual MatrixInverse *Inverse() const; - /** @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.*/ + /** @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$ @@ -394,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() @@ -481,7 +484,7 @@ public: 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."); @@ -613,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); @@ -640,19 +643,24 @@ public: 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 \f$ M_e \f$. + + 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 @@ -669,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: + \f$ y^T M x + y^T M_e x \f$ */ 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. @@ -686,8 +696,9 @@ public: /// Read-only access to the associated FiniteElementSpace. const FiniteElementSpace *FESpace() const { return fes; } - /// Sets Operator::DiagonalPolicy 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) @@ -698,7 +709,8 @@ public: /// Indicate that integrators are not owned by the BilinearForm void UseExternalIntegrators() { extern_bfs = 1; } - /// Deletes internal matrices, bilinear integrators, and the BilinearFormExtension + /** @brief Deletes internal matrices, bilinear integrators, and the + BilinearFormExtension */ virtual ~BilinearForm(); }; @@ -808,16 +820,16 @@ public: virtual void AddMultTranspose(const Vector & x, Vector & y, const double a = 1.0) const; - /** @brief Returns a pointer to (approximation) of the matrix inverse: \f$ M^{-1} \f$ - (currently unimplemented and returns NULL)*/ + /** @brief Returns a pointer to (approximation) of the matrix inverse: + \f$ M^{-1} \f$ (currently unimplemented and returns NULL)*/ virtual MatrixInverse *Inverse() const; /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is AssemblyLevel::LEGACY.*/ virtual void Finalize(int skip_zeros = 1); - /** @brief 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; @@ -851,8 +863,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. @@ -885,7 +897,7 @@ public: 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. */ @@ -922,10 +934,11 @@ public: { return test_fes->GetRestrictionMatrix(); } /** @brief For partially conforming trial and/or test FE spaces, complete the - assembly process by performing \f$ P2^t A P1 \f$ where \f$ A \f$ is the internal - sparse matrix; \f$ P1 \f$ and \f$ P2 \f$ 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. */ + assembly process by performing \f$ P2^t A P1 \f$ where \f$ A \f$ is the + internal sparse matrix; \f$ P1 \f$ and \f$ P2 \f$ 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 @@ -970,7 +983,8 @@ public: skips the zero elements of the matrix, unless they are breaking the 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. @@ -1002,11 +1016,11 @@ public: /** @brief Form the column-constrained linear system matrix A. - 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) @@ -1018,12 +1032,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, @@ -1033,11 +1047,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, @@ -1045,7 +1059,8 @@ 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); @@ -1066,7 +1081,8 @@ public: /// Read-only access to the associated test FiniteElementSpace. const FiniteElementSpace *TestFESpace() const { return test_fes; } - /// Deletes internal matrices, bilinear integrators, and the BilinearFormExtension + /** @brief Deletes internal matrices, bilinear integrators, and the + BilinearFormExtension */ virtual ~MixedBilinearForm(); }; From 44c6cf4c13d0fd47906ebfd427d43b35c1dc5b0f Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 23 Jan 2024 11:40:09 -0800 Subject: [PATCH 136/200] make style --- fem/bilinearform.hpp | 60 ++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 3e4ee3ca11..9150ef3005 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -73,15 +73,15 @@ protected: /// FE space on which the form lives. Not owned. FiniteElementSpace *fes; - /** @brief The ::AssemblyLevel of the form (AssemblyLevel::LEGACY, + /** @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), + /** @brief Extension for supporting Full Assembly (FA), + Element Assembly (EA),Partial Assembly (PA), or Matrix Free assembly (MF). */ BilinearFormExtension *ext; @@ -139,7 +139,7 @@ protected: /** @brief For partially conforming trial and/or test FE spaces, complete the assembly process by performing \f$ P^t A P\f$ where \f$ A \f$ is the - internal sparse matrix and \f$ P \f$ is the conforming prolongation + internal sparse matrix and \f$ P \f$ 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(); @@ -238,7 +238,7 @@ public: BilinearFormIntegrator *constr_integ, const Array &ess_tdof_list); - /** @brief For scalar FE spaces, precompute the sparsity pattern of the + /** @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; } @@ -336,11 +336,11 @@ public: double InnerProduct(const Vector &x, const Vector &y) const { return mat->InnerProduct (x, y); } - /** @brief Returns a pointer to (approximation) of the matrix inverse: + /** @brief Returns a pointer to (approximation) of the matrix inverse: f$ M^{-1} \f$ (currently returns NULL) */ virtual MatrixInverse *Inverse() const; - /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is + /** @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.*/ @@ -643,7 +643,7 @@ public: void EliminateVDofs(const Array &vdofs, const Vector &sol, Vector &rhs, DiagonalPolicy dpolicy = DIAG_ONE); - /** @brief Eliminate the given @a vdofs, storing the eliminated part + /** @brief Eliminate the given @a vdofs, storing the eliminated part internally in \f$ M_e \f$. This method works in conjunction with EliminateVDofsInRHS() and allows @@ -653,13 +653,13 @@ public: DiagonalPolicy dpolicy = DIAG_ONE); /** @brief Similar to - EliminateVDofs(const Array &, const Vector &, + 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, + void EliminateEssentialBCFromDofs(const Array &ess_dofs, const Vector &sol, - Vector &rhs, + Vector &rhs, DiagonalPolicy dpolicy = DIAG_ONE); /** @brief Similar to EliminateVDofs(const Array &, DiagonalPolicy) but @@ -677,12 +677,12 @@ public: void EliminateVDofsInRHS(const Array &vdofs, const Vector &x, Vector &b); - /** @brief Compute inner product for full uneliminated matrix: + /** @brief Compute inner product for full uneliminated matrix: \f$ y^T M x + y^T M_e x \f$ */ double FullInnerProduct(const Vector &x, const Vector &y) const { return mat->InnerProduct(x, y) + mat_e->InnerProduct(x, y); } - /** @brief Update the @a FiniteElementSpace and delete all data associated + /** @brief Update the @a FiniteElementSpace and delete all data associated with the old one. */ virtual void Update(FiniteElementSpace *nfes = NULL); @@ -696,7 +696,7 @@ public: /// Read-only access to the associated FiniteElementSpace. const FiniteElementSpace *FESpace() const { return fes; } - /** @brief Sets Operator::DiagonalPolicy used upon construction of the + /** @brief Sets Operator::DiagonalPolicy used upon construction of the linear system. Policies include: @@ -709,7 +709,7 @@ public: /// Indicate that integrators are not owned by the BilinearForm void UseExternalIntegrators() { extern_bfs = 1; } - /** @brief Deletes internal matrices, bilinear integrators, and the + /** @brief Deletes internal matrices, bilinear integrators, and the BilinearFormExtension */ virtual ~BilinearForm(); }; @@ -820,7 +820,7 @@ public: virtual void AddMultTranspose(const Vector & x, Vector & y, const double a = 1.0) const; - /** @brief Returns a pointer to (approximation) of the matrix inverse: + /** @brief Returns a pointer to (approximation) of the matrix inverse: \f$ M^{-1} \f$ (currently unimplemented and returns NULL)*/ virtual MatrixInverse *Inverse() const; @@ -935,8 +935,8 @@ public: /** @brief For partially conforming trial and/or test FE spaces, complete the assembly process by performing \f$ P2^t A P1 \f$ where \f$ A \f$ is the - internal sparse matrix; \f$ P1 \f$ and \f$ P2 \f$ are the conforming - prolongation matrices of the trial and test FE spaces, respectively. + internal sparse matrix; \f$ P1 \f$ and \f$ P2 \f$ 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(); @@ -983,7 +983,7 @@ public: skips the zero elements of the matrix, unless they are breaking the symmetry of the system matrix.*/ void AssembleBdrElementMatrix(int i, const DenseMatrix &elmat, - Array &trial_vdofs, + Array &trial_vdofs, Array &test_vdofs, int skip_zeros = 1); @@ -1017,9 +1017,9 @@ public: /** @brief Form the column-constrained linear system matrix A. 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 + 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, @@ -1032,11 +1032,11 @@ public: A.MakeRef(*A_ptr); } - /** @brief Form the linear system A X = B, corresponding to this mixed + /** @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 + 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, @@ -1048,9 +1048,9 @@ public: 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 + 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, @@ -1059,7 +1059,7 @@ public: OpType &A, Vector &X, Vector &B) { OperatorHandle Ah; - FormRectangularLinearSystem(trial_tdof_list, test_tdof_list, 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"); @@ -1081,7 +1081,7 @@ public: /// Read-only access to the associated test FiniteElementSpace. const FiniteElementSpace *TestFESpace() const { return test_fes; } - /** @brief Deletes internal matrices, bilinear integrators, and the + /** @brief Deletes internal matrices, bilinear integrators, and the BilinearFormExtension */ virtual ~MixedBilinearForm(); }; From c0f969def9d23c344cbe8eb7c1931dac43d9da3b Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 23 Jan 2024 12:28:24 -0800 Subject: [PATCH 137/200] Fixed a doxygen error and some link warnings. --- fem/bilinearform.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 9150ef3005..ad76218b53 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -337,7 +337,7 @@ public: { return mat->InnerProduct (x, y); } /** @brief Returns a pointer to (approximation) of the matrix inverse: - f$ M^{-1} \f$ (currently returns NULL) */ + \f$ M^{-1} \f$ (currently returns NULL) */ virtual MatrixInverse *Inverse() const; /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is @@ -746,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; From ecfe032565a84f550272517bf853b94781f3814b Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 23 Jan 2024 12:29:25 -0800 Subject: [PATCH 138/200] make style --- fem/bilinearform.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index ad76218b53..99266d13cd 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -746,9 +746,9 @@ protected: Partial Assembly (PA), or Matrix Free assembly (MF). */ MixedBilinearFormExtension *ext; - /** @brief Indicates the BilinearFormIntegrator%s stored in - MixedBilinearForm#domain_integs, MixedBilinearForm#boundary_integs, - MixedBilinearForm#trace_face_integs and + /** @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; From 2950d62c4916c9dd27c152ebc4c174b17b2d7336 Mon Sep 17 00:00:00 2001 From: Julian Andrej Date: Tue, 23 Jan 2024 13:10:47 -0800 Subject: [PATCH 139/200] bugfix for lor elasticity miniapp kernel --- fem/integ/bilininteg_elasticity_kernels.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fem/integ/bilininteg_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp index d7912a7ab7..063705a652 100644 --- a/fem/integ/bilininteg_elasticity_kernels.hpp +++ b/fem/integ/bilininteg_elasticity_kernels.hpp @@ -166,7 +166,7 @@ void ElasticityAddMultPA_(const int nDofs, const FiniteElementSpace &fespace, E_To_Q_Map->PhysDerivatives(x, QVec); const int numPoints = ir.GetNPoints(); - const int numEls = lambda.Size()/numPoints; + 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); @@ -246,7 +246,7 @@ void ElasticityAddMultPA_(const int nDofs, const FiniteElementSpace &fespace, // 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, 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) { @@ -324,7 +324,7 @@ void ElasticityAssembleDiagonalPA_(const int nDofs, //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, 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) From 332528b0689c532558c5fa9410eaf39693a3c87d Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Tue, 23 Jan 2024 16:48:26 -0800 Subject: [PATCH 140/200] Addressed typos found in review, broke up comments to keep within the 80 line limit. --- linalg/amgxsolver.hpp | 39 ++++++++-------- linalg/mumps.hpp | 4 +- linalg/slepc.hpp | 61 +++++++++++++++---------- linalg/solvers.hpp | 43 +++++++++++------- linalg/strumpack.hpp | 101 +++++++++++++++++++++--------------------- linalg/superlu.hpp | 76 +++++++++++++++++-------------- 6 files changed, 182 insertions(+), 142 deletions(-) diff --git a/linalg/amgxsolver.hpp b/linalg/amgxsolver.hpp index b22ecc499d..9f07aadb30 100644 --- a/linalg/amgxsolver.hpp +++ b/linalg/amgxsolver.hpp @@ -107,7 +107,7 @@ public: */ AmgXSolver(const AMGX_MODE amgxMode_, const bool verbose); - /** @brief Initilize the AmgX library for serial execution once + /** @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. @@ -121,7 +121,8 @@ public: (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); /** @brief Configures AmgX with a default configuration based on the AMGX_MODE @@ -142,11 +143,11 @@ public: */ void InitExclusiveGPU(const MPI_Comm &comm); - /** @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. + /** @brief Initialize the AmgX library and create MPI teams based on the + numberof devices on each node @a nDevs. If configuring with a + constructor, theconstructor will make this call, otherwise this will need + to be calledafter the solver configuration has been established through + the AmgXSolver::ReadParameters call. */ void InitMPITeams(const MPI_Comm &comm, const int nDevs); @@ -164,7 +165,7 @@ public: */ void UpdateOperator(const Operator &op); - /** @brief Untilize the AmgX library to solve the linear system + /** @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 @@ -173,14 +174,15 @@ public: */ virtual void Mult(const Vector& b, Vector& x) const; - /// Return the number of iterations that were executed during the last solve phase. + /** @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 If @a source is set - to AmgXSolver::INTERNAL the parameters are set directly by the string - defined by @a config. + /** @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); @@ -224,12 +226,13 @@ private: */ 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); - /** @brief 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 MPIteam. Root rank of each MPI team holds the the consolidated + data and setsmatrix. */ void SetMatrixMPITeams(const HypreParMatrix &A, const Array &loc_A, const Array &loc_I, const Array &loc_J, diff --git a/linalg/mumps.hpp b/linalg/mumps.hpp index 589b860a30..06ef04c736 100644 --- a/linalg/mumps.hpp +++ b/linalg/mumps.hpp @@ -41,7 +41,7 @@ public: UNSYMMETRIC = 0, /// A sparse symmetric positive definite matrix SYMMETRIC_POSITIVE_DEFINITE = 1, - /// A sparse symmetric matrix that is no necissisarilty positive definite + /// A sparse symmetric matrix that is not necessarily positive definite SYMMETRIC_INDEFINITE = 2 }; @@ -50,7 +50,7 @@ public: { /// Let MUMPS automatically decide the reording strategy AUTOMATIC = 0, - /// Approximate Minimum Degree with automatic quasi-dense row detection is used + /// Approximate Minimum Degree with auto quasi-dense row detection is used AMD, /// Approximate Minimum Fill method will be used AMF, diff --git a/linalg/slepc.hpp b/linalg/slepc.hpp index 3e3e941435..5db1069510 100644 --- a/linalg/slepc.hpp +++ b/linalg/slepc.hpp @@ -51,16 +51,18 @@ public: virtual ~SlepcEigenSolver(); - /** @brief Set solver convergence tolerance relative to the magnitude of the eigenvalue + /** @brief Set solver convergence tolerance relative to the magnitude of the + eigenvalue. - @note Default value is 1e-8 + @note Default value is 1e-8 */ void SetTol(double tol); - /// Set maximum number of iterations allowed in the call to SlepcEigenSolver::Solve + /** @brief Set maximum number of iterations allowed in the call to + SlepcEigenSolver::Solve */ void SetMaxIter(int max_iter); - /// Set the number of eignemodes to compute + /// Set the number of eigenmodes to compute void SetNumModes(int num_eigs); /// Set operator for standard eigenvalue problem @@ -75,43 +77,52 @@ public: /// Solve the eigenvalue problem for the specified number of eigenvalues void Solve(); - /// Get the number of converged eigenvalues after the call to SlepcEigenSolver::Solve + /** @brief Get the number of converged eigenvalues after the call to + SlepcEigenSolver::Solve */ int GetNumConverged(); /** @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[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 + @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[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 + @note the index @a i must be between 0 and + SlepcEigenSolver::GetNumConverged - 1 */ void GetEigenvalue(unsigned int i, double & lr, double & lc) 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[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 + @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[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 + @note the index @a i must be between 0 and + SlepcEigenSolver::GetNumConverged - 1 */ void GetEigenvector(unsigned int i, Vector & vr, Vector & vc) const; /** @brief Target spectrum for the eigensolver. - This will define the order in which the eigenvalues/eigenvectors are indexed - after the call to SlepcEigenSolver::Solve. + 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. */ @@ -136,7 +147,7 @@ public: }; /** @brief Spectral transformations that can be used by the solver in order - to accelerate the convergence to the target eignevalues + to accelerate the convergence to the target eignevalues */ enum SpectralTransformation { @@ -146,20 +157,24 @@ public: SHIFT_INVERT }; - /** @brief Set the which eignevalues the solver will target and the order they will be indexed in + /** @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. + 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. + /** @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. + /** @brief Set the spectral transformation strategy for acceletating + convergenvce. Both SlepcEigenSolver::SHIFT and + SlepcEigenSolver::SHIFT_INVERT are available. */ void SetSpectralTransformation(SpectralTransformation transformation); diff --git a/linalg/solvers.hpp b/linalg/solvers.hpp index b9e755dacc..f28e55687e 100644 --- a/linalg/solvers.hpp +++ b/linalg/solvers.hpp @@ -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(); } ///@} }; @@ -343,10 +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 + /// Approach the solution of the linear system by applying jacobi smoothing. void Mult(const Vector &x, Vector &y) const; - /// Approach the solition of the transposed linear system by applying jacobi smoothing + /** @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 @@ -440,10 +442,12 @@ public: ~OperatorChebyshevSmoother() {} - /// Approach the solution of the linear system by applying Chebyshev smoothing + /** @brief Approach the solution of the linear system by applying Chebyshev + smoothing. */ void Mult(const Vector &x, Vector &y) const; - /// Approach the solution of the transposed linear system by applying Chebyshev smoothing + /** @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_) @@ -518,7 +522,8 @@ public: virtual void SetOperator(const Operator &op) { IterativeSolver::SetOperator(op); UpdateVectors(); } - /// Iterative solution of the linear system using the Conjugate Gradient method + /** @brief Iterative solution of the linear system using the Conjugate + Gradient method. */ virtual void Mult(const Vector &b, Vector &x) const; }; @@ -568,7 +573,7 @@ public: void SetKDim(int dim) { m = dim; } - /// Iterative solution of the linear system using the FGMRESt method + /// Iterative solution of the linear system using the FGMRES method. virtual void Mult(const Vector &b, Vector &x) const; }; @@ -636,7 +641,7 @@ public: virtual void SetOperator(const Operator &op); - /// Iterative solution of the linear system using the Minres method + /// Iterative solution of the linear system using the MINRES method virtual void Mult(const Vector &b, Vector &x) const; }; @@ -1266,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; @@ -1287,29 +1293,34 @@ public: /// The operator must be a DenseMatrix. void SetOperator(const Operator &op) override; - /// Compute the non-negative least squares solution to the underdetermined system + /** @brief Compute the non-negative least squares solution to the + underdetermined system. */ void Mult(const Vector &w, Vector &sol) const override; /** @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. + 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(). diff --git a/linalg/strumpack.hpp b/linalg/strumpack.hpp index a8c542a5f8..6a788b8d1b 100644 --- a/linalg/strumpack.hpp +++ b/linalg/strumpack.hpp @@ -34,20 +34,19 @@ public: /** @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). */ + 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); - /** @brief Creates a copy of the parallel matrix hypParMat in STRUMPACK's RowLoc - format. + /** @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. - */ + All data is copied so the original matrix may be deleted. */ STRUMPACKRowLocMatrix(const Operator &op, bool sym_sparse = false); ~STRUMPACKRowLocMatrix(); @@ -59,10 +58,10 @@ public: "supported!"); } - /// Get the MPI Comm being used by the parallel matrix + /// Get the MPI Comm being used by the parallel matrix. MPI_Comm GetComm() const { return A_->comm(); } - /// Gain access to the internal CSR matrix + /// Get access to the internal CSR matrix. strumpack::CSRMatrixMPI *GetA() const { return A_; } private: @@ -74,24 +73,22 @@ 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: /** @brief Constructor with MPI_Comm parameter and command line arguments. - STRUMPACKSolverBase::SetFromCommandLine must be called for the command - line arguments to be used. - */ + STRUMPACKSolverBase::SetFromCommandLine must be called for the command + line arguments to be used. */ STRUMPACKSolverBase(MPI_Comm comm, int argc, char *argv[]); - /** @brief 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::SetFromCommandLine must be called for the command + line arguments to be used. */ STRUMPACKSolverBase(STRUMPACKRowLocMatrix &A, int argc, char *argv[]); public: @@ -101,7 +98,8 @@ public: /// Factor and solve the linear system \f$y = Op^{-1} x \f$. void Mult(const Vector &x, Vector &y) const; - /// Factor and solve the linear systems \f$ Y_i = Op^{-1} X_i \f$ across the array of vectors. + /** @brief Factor and solve the linear systems \f$ Y_i = Op^{-1} X_i \f$ + across the array of vectors. */ void ArrayMult(const Array &X, Array &Y) const; /** @brief Set the operator/matrix. @@ -110,9 +108,8 @@ public: /** @brief Set options that were captured from the command line. - These were captured in the constructer STRUMPACKSolverBase. Refer - to the STRUMPACK documentation for details. - */ + These were captured in the constructer STRUMPACKSolverBase. Refer + to the STRUMPACK documentation for details. */ void SetFromCommandLine(); /// Set up verbose printing during the factor step @@ -130,21 +127,22 @@ public: /// Set the maximum number of iterations for iterative solvers void SetMaxIter(int max_it); - /** @brief Set the flag controlling reuse of the symbolic factorization for multiple - operators. + /** @brief Set the flag controlling reuse of the symbolic factorization for + multiple operators. - This method must be called before repeated calls to SetOperator. - */ + This method must be called before repeated calls to SetOperator. */ void SetReorderingReuse(bool reuse); - /** @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. - */ + /** @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. - */ + /** @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 @@ -157,13 +155,13 @@ public: * * Supported values are: * - AUTO: Use iterative refinement if no HSS compression is - * used, otherwise use GMRes + * used, otherwise use GMRES * - DIRECT: No outer iterative solver, just a single application * of the multifrontal solver * - REFINE: Iterative refinement - * - PREC_GMRES: Preconditioned GMRes + * - PREC_GMRES: Preconditioned GMRES * The preconditioner is the (approx) multifrontal solver - * - GMRES: UN-preconditioned GMRes (for testing mainly) + * - 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) @@ -253,14 +251,15 @@ public: #if STRUMPACK_VERSION_MAJOR >= 5 /** @brief Set the precision for the lossy compression option * - * Use STRUMPACKSolverBase::SetCompression to set the proper compression type. - */ + * Use STRUMPACKSolverBase::SetCompression to set the proper compression + * type. */ void SetCompressionLossyPrecision(int precision); - /** @brief Set the number of butterflylevels for the HODLR compression option + /** @brief Set the number of butterfly levels for the HODLR compression + * option. * - * Use STRUMPACKSolverBase::SetCompression to set the proper compression type. - */ + * Use STRUMPACKSolverBase::SetCompression to set the proper compression + * type. */ void SetCompressionButterflyLevels(int levels); #endif @@ -293,17 +292,18 @@ public: /** @brief Constructor with MPI_Comm parameter and command line arguments. - SetFromCommandLine must be called for the command line arguments - to be used. + 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) {} - /** @brief Constructor with MSTRUMPACK 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. + SetFromCommandLine must be called for the command line arguments + to be used. */ STRUMPACKSolver(STRUMPACKRowLocMatrix &A, int argc, char *argv[]); @@ -325,15 +325,16 @@ public: /** @brief Constructor with MPI_Comm parameter and command line arguments. - SetFromCommandLine must be called for the command line arguments - to be used. + SetFromCommandLine must be called for the command line arguments + to be used. */ STRUMPACKMixedPrecisionSolver(MPI_Comm comm, int argc, char *argv[]); - /** @brief Constructor with MSTRUMPACK 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. + SetFromCommandLine must be called for the command line arguments + to be used. */ STRUMPACKMixedPrecisionSolver(STRUMPACKRowLocMatrix &A, int argc, char *argv[]); diff --git a/linalg/superlu.hpp b/linalg/superlu.hpp index 09947646f6..277ddbd36a 100644 --- a/linalg/superlu.hpp +++ b/linalg/superlu.hpp @@ -41,11 +41,12 @@ 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.*/ + /** @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.*/ + /** @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 @@ -65,7 +66,8 @@ typedef enum COLAMD, /// Sequential ordering on structure of \f$ A^T+A \f$ using the METIS package METIS_AT_PLUS_A, - /// Sequential ordering on structure of \f$ A^T+A \f$ using the PARMETIS package + /** @brief Sequential ordering on structure of \f$ A^T+A \f$ using the + PARMETIS package */ PARMETIS, /// Use the Zoltan library from Sandia to define the column ordering ZOLTAN, @@ -86,19 +88,21 @@ typedef enum SLU_EXTRA } IterRefine; -/// Define the information that is provided about the matrix factorization ahead of time +/** @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. */ + /** @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. */ + /** @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, - /// The matrix A was provided in fully factored form and no factorization is needed. + /** @brief The matrix A was provided in fully factored form and no + factorization is needed. */ FACTORED } Fact; @@ -116,8 +120,9 @@ public: HYPRE_BigInt glob_nrows, HYPRE_BigInt glob_ncols, int *I, HYPRE_BigInt *J, double *data); - /** @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. */ + /** @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(); @@ -174,25 +179,26 @@ public: ~SuperLUSolver(); /** @brief Set the operator/matrix. - \note @a A must be a SuperLURowLocMatrix. */ + @note @a A must be a SuperLURowLocMatrix. */ void SetOperator(const Operator &op); /** @brief Factor and solve the linear system \f$ y = Op^{-1} x \f$ - \note Factorization modifies the operator matrix. */ + @note Factorization modifies the operator matrix. */ void Mult(const Vector &x, Vector &y) const; /** @brief Factor and solve the linear systems \f$ y_i = Op^{-1} x_i \f$ for all i in the @a X and @a Y arrays. - \note Factorization modifies the operator matrix. */ + @note Factorization modifies the operator matrix. */ void ArrayMult(const Array &X, Array &Y) const; - /** @brief Factor and solve the transposed linear system \f$ y = Op^{-T} x \f$ - \note Factorization modifies the operator matrix. */ + /** @brief Factor and solve the transposed linear system + \f$ y = Op^{-T} x \f$ + @note Factorization modifies the operator matrix. */ void MultTranspose(const Vector &x, Vector &y) const; - /** @brief Factor and solve the transposed linear systems \f$ y_i = Op^{-T} x_i \f$ - for all i in the @a X and @a Y arrays. - \note Factorization modifies the operator matrix. */ + /** @brief Factor and solve the transposed linear systems + \f$ y_i = Op^{-T} x_i \f$ 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; @@ -206,18 +212,18 @@ public: /** @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::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 */ + 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 @@ -228,21 +234,24 @@ public: void SetIterativeRefine(superlu::IterRefine iter_ref); /** @brief Specify whether to replace tiny diagonals encountered - during pivot with \f$ \sqrt{\epsilon} \lVert A \rVert \f$ (default false)*/ + during pivot with \f$ \sqrt{\epsilon} \lVert A \rVert \f$ + (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)*/ + serial symbolic factorization to perform static scheduling + (default false) */ void SetLookAheadElimTree(bool etree); - /// Specify whether the matrix has a symmetric pattern to avoid extra work (default false) + /** @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 + @note If true SuperLU will use superlu::PARMETIS for the Column Permutation regardless of the setting */ void SetParSymbFact(bool par); @@ -250,7 +259,8 @@ public: factorization of A. Supported options are: - superlu::DOFACT, superlu::SamePattern, superlu::SamePattern_SameRowPerm, superlu::FACTORED*/ + superlu::DOFACT, superlu::SamePattern, superlu::SamePattern_SameRowPerm, + superlu::FACTORED*/ void SetFact(superlu::Fact fact); // Processor grid for SuperLU_DIST. From 650387111dd6f8d0eb2bfbd12091166e1d543ae9 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 24 Jan 2024 11:58:16 -0800 Subject: [PATCH 141/200] Addressing some more copy edits. --- linalg/amgxsolver.hpp | 20 +++++++++----------- linalg/solvers.hpp | 2 +- linalg/strumpack.hpp | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/linalg/amgxsolver.hpp b/linalg/amgxsolver.hpp index 9f07aadb30..0fbc03822c 100644 --- a/linalg/amgxsolver.hpp +++ b/linalg/amgxsolver.hpp @@ -92,7 +92,7 @@ public: */ enum CONFIG_SRC { - /// Configuration with be read directly from a string + /// Configuration will be read directly from a string INTERNAL, /// Configure will be read from a specified file EXTERNAL, @@ -144,9 +144,9 @@ public: void InitExclusiveGPU(const MPI_Comm &comm); /** @brief Initialize the AmgX library and create MPI teams based on the - numberof devices on each node @a nDevs. If configuring with a - constructor, theconstructor will make this call, otherwise this will need - to be calledafter the solver configuration has been established through + 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, @@ -178,7 +178,7 @@ public: last solve phase. */ int GetNumIterations(); - /** @brief Read in the Amgx parameters either through a file or directly + /** @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 @@ -198,7 +198,7 @@ public: Jacobi). When configured as a solver the preconditioned conjugate gradient method - is used with the AMG V-cycle with a block Jacobi smoother is used as a + 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); @@ -222,8 +222,7 @@ private: #ifdef MFEM_USE_MPI /** @brief Consolidates matrix diagonal and off diagonal data and uploads - matrix to AmgX. - */ + matrix to AmgX. */ void SetMatrixMPIGPUExclusive(const HypreParMatrix &A, const Array &loc_A, const Array &loc_I, @@ -231,9 +230,8 @@ private: const bool update_mat = false); /** @brief Consolidates matrix diagonal and off diagonal data for all ranks - in an MPIteam. Root rank of each MPI team holds the the consolidated - data and setsmatrix. - */ + 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); diff --git a/linalg/solvers.hpp b/linalg/solvers.hpp index f28e55687e..fc730b081c 100644 --- a/linalg/solvers.hpp +++ b/linalg/solvers.hpp @@ -348,7 +348,7 @@ public: void Mult(const Vector &x, Vector &y) const; /** @brief Approach the solution of the transposed linear system by applying - jacobi smoothing. */ + Jacobi smoothing. */ void MultTranspose(const Vector &x, Vector &y) const { Mult(x, y); } /** @brief Recompute the diagonal using the method AssembleDiagonal of the diff --git a/linalg/strumpack.hpp b/linalg/strumpack.hpp index 6a788b8d1b..316d149eb8 100644 --- a/linalg/strumpack.hpp +++ b/linalg/strumpack.hpp @@ -51,7 +51,7 @@ public: ~STRUMPACKRowLocMatrix(); - /// Matrix vector products are not supported on for this type of matrix. + /// 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 " From c3a455d86f06f2e2cde7a536da6de4c8183a1658 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Wed, 24 Jan 2024 12:23:20 -0800 Subject: [PATCH 142/200] Fixed auto reference in div_free_solver. --- miniapps/solvers/div_free_solver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 7c3905e061..e646b3bc20 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -587,7 +587,7 @@ void DivFreeSolver::Mult(const Vector & x, Vector & y) const ch.Clear(); ch.Start(); - auto M = dynamic_cast(ops_.Last()->GetBlock(0, 0)); + auto& M = dynamic_cast(ops_.Last()->GetBlock(0, 0)); M.Mult(-1.0, correction.GetBlock(0), 1.0, resid.GetBlock(0)); SolvePotential(resid.GetBlock(0), correction.GetBlock(1)); blk_y.GetBlock(1) += correction.GetBlock(1); From ae2443ededccc9163fa07a36bb4a74d9b8073650 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Wed, 24 Jan 2024 15:22:06 -0800 Subject: [PATCH 143/200] Added a unit test for sparse matrix printing. --- tests/unit/linalg/test_matrix_sparse.cpp | 163 +++++++++++++++++++++++ 1 file changed, 163 insertions(+) diff --git a/tests/unit/linalg/test_matrix_sparse.cpp b/tests/unit/linalg/test_matrix_sparse.cpp index 34a1547ee3..e2d20270c8 100644 --- a/tests/unit/linalg/test_matrix_sparse.cpp +++ b/tests/unit/linalg/test_matrix_sparse.cpp @@ -11,6 +11,7 @@ #include "mfem.hpp" #include "unit_tests.hpp" +#include namespace mfem { @@ -77,4 +78,166 @@ TEST_CASE("SparseMatrixAbsMult", "[SparseMatrixAbsMult]") } } +TEST_CASE("SparseMatrix printing", "[SparseMatrix]") +{ + // Create a test sparse matrix and print it using different methods + // and compare the output with the reference one + + DenseMatrix dense( + { + {0.0, 4.0, 0.0}, + {5.0, 0.0, 1.0}, + {2.0, 0.0, 0.0} + }); + + const int width = dense.Width(); + const int height = dense.Height(); + int nonzero = 0; + + // Non-finalized matrix (LIL) + SparseMatrix mat_lil(height, width); + for (int i = 0; i < height; i++) + for (int j = 0; j < width; j++) + { + if (dense(i,j) != 0.0) + { + mat_lil.Add(i, j, dense(i,j)); + nonzero++; + } + } + + // Finalized matrix (CSR) + SparseMatrix mat_csr(mat_lil); + mat_csr.Finalize(); + + std::stringstream ss, ss_ref; + + SECTION("Print") + { + //assume print width >= matrix width + ss_ref.str(""); + for (int i = 0; i < height; i++) + { + ss_ref << "[row " << i << "]\n"; + for (int j = width-1; j >=0 ; j--) + if (dense(i,j) != 0.0) + { + ss_ref << " (" << j << "," << dense(i,j) << ")"; + } + ss_ref << "\n"; + } + + ss.str(""); + mat_lil.Print(ss); + REQUIRE(ss.str() == ss_ref.str()); + + ss.str(""); + mat_csr.Print(ss); + REQUIRE(ss.str() == ss_ref.str()); + } + + SECTION("PrintMatlab") + { + ss_ref.str(""); + ss_ref << "% size " << height << " " << width << "\n"; + ss_ref << "% Non Zeros " << nonzero << "\n"; + + std::ios::fmtflags old_fmt = ss_ref.flags(); + ss_ref.setf(std::ios::scientific); + std::streamsize old_prec = ss_ref.precision(14); + + for (int i = 0; i < height; i++) + for (int j = width-1; j >=0 ; j--) + if (dense(i,j) != 0.0) + { + ss_ref << i+1 << " " << j+1 << " " << dense(i,j) << "\n"; + } + + ss_ref << height << " " << width << " 0.0\n"; + ss_ref.precision(old_prec); + ss_ref.flags(old_fmt); + + ss.str(""); + mat_lil.PrintMatlab(ss); + REQUIRE(ss.str() == ss_ref.str()); + + ss.str(""); + mat_csr.PrintMatlab(ss); + REQUIRE(ss.str() == ss_ref.str()); + } + + SECTION("PrintMM") + { + ss_ref.str(""); + ss_ref << "%%MatrixMarket matrix coordinate real general" << '\n' + << "% Generated by MFEM" << '\n'; + ss_ref << height << " " << width << " " << nonzero << "\n"; + + std::ios::fmtflags old_fmt = ss_ref.flags(); + ss_ref.setf(std::ios::scientific); + std::streamsize old_prec = ss_ref.precision(14); + + for (int i = 0; i < height; i++) + for (int j = width-1; j >=0 ; j--) + if (dense(i,j) != 0.0) + { + ss_ref << i+1 << " " << j+1 << " " << dense(i,j) << "\n"; + } + + ss_ref.precision(old_prec); + ss_ref.flags(old_fmt); + + ss.str(""); + mat_lil.PrintMM(ss); + REQUIRE(ss.str() == ss_ref.str()); + + ss.str(""); + mat_csr.PrintMM(ss); + REQUIRE(ss.str() == ss_ref.str()); + } + + SECTION("PrintCSR") + { + ss_ref.str(""); + ss_ref << height << "\n"; + + Array I(height+1); + Array J(nonzero); + Vector A(nonzero); + + int idx = 0; + for (int i = 0; i < height; i++) + { + I[i] = idx; + for (int j = width-1; j >=0 ; j--) + if (dense(i,j) != 0.0) + { + J[idx] = j; + A[idx] = dense(i,j); + idx++; + } + } + I[height] = idx; + + for (int i = 0; i <= height; i++) + { + ss_ref << I[i]+1 << '\n'; + } + + for (int i = 0; i < I[height]; i++) + { + ss_ref << J[i]+1 << '\n'; + } + + for (int i = 0; i < I[height]; i++) + { + ss_ref << A[i] << '\n'; + } + + ss.str(""); + mat_csr.PrintCSR(ss); + REQUIRE(ss.str() == ss_ref.str()); + } +} + } // namespace mfem From 3ae6ec61e5edfddc8bf72c953c50909415f42812 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Thu, 25 Jan 2024 08:59:41 -0800 Subject: [PATCH 144/200] Changed using to stub for ParMesh::FaceIsTrueInterior(). --- mesh/pmesh.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mesh/pmesh.hpp b/mesh/pmesh.hpp index 48a74a763a..ddcfd0934a 100644 --- a/mesh/pmesh.hpp +++ b/mesh/pmesh.hpp @@ -491,7 +491,9 @@ public: void GenerateOffsets(int N, HYPRE_BigInt loc_sizes[], Array *offsets[]) const; - using Mesh::FaceIsTrueInterior; + /** Return true if the face is interior or shared. In parallel, this + method only works if the face neighbor data is exchanged. */ + inline bool FaceIsTrueInterior(int FaceNo) const { return Mesh::FaceIsTrueInterior(FaceNo); } void ExchangeFaceNbrData(); void ExchangeFaceNbrNodes(); From d959baa18a53ed61769b3c66da65a4c9e9f0f305 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Thu, 25 Jan 2024 09:03:13 -0800 Subject: [PATCH 145/200] Increase time for testing on Quartz from 45 to 60 minutes --- .gitlab/quartz-build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/quartz-build-and-test.yml b/.gitlab/quartz-build-and-test.yml index 3f7ec7be7c..8f2a7ca218 100644 --- a/.gitlab/quartz-build-and-test.yml +++ b/.gitlab/quartz-build-and-test.yml @@ -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 --partition=pdebug --time=60 --no-shell --job-name=${ALLOC_NAME} timeout: 6h # GitLab jobs for the Quartz machine at LLNL From 77c8eeb8ea75424e69969c578c46957ffc3094dd Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Thu, 25 Jan 2024 14:50:23 -0800 Subject: [PATCH 146/200] Use CI reservation on Quartz --- .gitlab/quartz-build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/quartz-build-and-test.yml b/.gitlab/quartz-build-and-test.yml index 8f2a7ca218..f51b76172c 100644 --- a/.gitlab/quartz-build-and-test.yml +++ b/.gitlab/quartz-build-and-test.yml @@ -23,7 +23,7 @@ allocate_resource: stage: allocate_resource script: - echo ${ALLOC_NAME} - - salloc --exclusive --nodes=1 --partition=pdebug --time=60 --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 From 7a8294dd42f4fd5334b12994649bd4b92406ec29 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Thu, 25 Jan 2024 16:32:24 -0800 Subject: [PATCH 147/200] Make GeometricFactors::DETERMINANTS work with surface meshes --- fem/qinterp/det.cpp | 156 +++++++++++++++------ fem/quadinterpolator.cpp | 15 +- tests/unit/CMakeLists.txt | 1 + tests/unit/mesh/test_geometric_factors.cpp | 45 ++++++ 4 files changed, 173 insertions(+), 44 deletions(-) create mode 100644 tests/unit/mesh/test_geometric_factors.cpp diff --git a/fem/qinterp/det.cpp b/fem/qinterp/det.cpp index de1ef235d0..437edb7ead 100644 --- a/fem/qinterp/det.cpp +++ b/fem/qinterp/det.cpp @@ -58,11 +58,10 @@ static void Det2D(const int NE, const double *g, const double *x, double *y, - const int vdim = 1, + const int sdim, const int d1d = 0, const int q1d = 0) { - constexpr int DIM = 2; static constexpr int NBZ = 1; const int D1D = T_D1D ? T_D1D : d1d; @@ -70,37 +69,117 @@ 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) + if (sdim == 2) { - 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; - - 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]; - - kernels::internal::LoadX(e,D1D,X,XY); - kernels::internal::LoadBG(D1D,Q1D,B,G,BG); - - kernels::internal::GradX(D1D,Q1D,BG,XY,DQ); - kernels::internal::GradY(D1D,Q1D,BG,DQ,QQ); - - MFEM_FOREACH_THREAD(qy,y,Q1D) + mfem::forall_2D_batch(NE, Q1D, Q1D, NBZ, [=] MFEM_HOST_DEVICE (int e) { - MFEM_FOREACH_THREAD(qx,x,Q1D) + 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; + + 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]; + + kernels::internal::LoadX(e,D1D,X,XY); + kernels::internal::LoadBG(D1D,Q1D,B,G,BG); + + kernels::internal::GradX(D1D,Q1D,BG,XY,DQ); + kernels::internal::GradY(D1D,Q1D,BG,DQ,QQ); + + MFEM_FOREACH_THREAD(qy,y,Q1D) { - double J[4]; - kernels::internal::PullGrad(Q1D,qx,qy,QQ,J); - Y(qx,qy,e) = kernels::Det<2>(J); + MFEM_FOREACH_THREAD(qx,x,Q1D) + { + double J[4]; + kernels::internal::PullGrad(Q1D,qx,qy,QQ,J); + Y(qx,qy,e) = kernels::Det<2>(J); + } } - } - }); + }); + } + else + { + static constexpr int SDIM = 3; + 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 @@ -109,7 +188,6 @@ static void Det3D(const int NE, 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 @@ -214,15 +292,15 @@ void TensorDeterminants(const int NE, { switch (id) { - case 0x222: return Det2D<2,2>(NE,B,G,X,Y); - case 0x223: return Det2D<2,3>(NE,B,G,X,Y); - case 0x224: return Det2D<2,4>(NE,B,G,X,Y); - case 0x226: return Det2D<2,6>(NE,B,G,X,Y); - case 0x234: return Det2D<3,4>(NE,B,G,X,Y); - case 0x236: return Det2D<3,6>(NE,B,G,X,Y); - case 0x244: return Det2D<4,4>(NE,B,G,X,Y); - case 0x246: return Det2D<4,6>(NE,B,G,X,Y); - case 0x256: return Det2D<5,6>(NE,B,G,X,Y); + case 0x222: return Det2D<2,2>(NE,B,G,X,Y,2); + case 0x223: return Det2D<2,3>(NE,B,G,X,Y,2); + case 0x224: return Det2D<2,4>(NE,B,G,X,Y,2); + case 0x226: return Det2D<2,6>(NE,B,G,X,Y,2); + case 0x234: return Det2D<3,4>(NE,B,G,X,Y,2); + case 0x236: return Det2D<3,6>(NE,B,G,X,Y,2); + case 0x244: return Det2D<4,4>(NE,B,G,X,Y,2); + case 0x246: return Det2D<4,6>(NE,B,G,X,Y,2); + case 0x256: return Det2D<5,6>(NE,B,G,X,Y,2); default: { const int MD = DeviceDofQuadLimits::Get().MAX_D1D; @@ -250,10 +328,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/quadinterpolator.cpp b/fem/quadinterpolator.cpp index 31c03a63a8..30b7497d7b 100644 --- a/fem/quadinterpolator.cpp +++ b/fem/quadinterpolator.cpp @@ -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); + } } } } diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 8bb78c1240..542ce0ee51 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -44,6 +44,7 @@ set(UNIT_TESTS_SRCS linalg/test_operator.cpp linalg/test_vector.cpp mesh/test_face_orientations.cpp + mesh/test_geometric_factors.cpp mesh/mesh_test_utils.cpp mesh/test_fms.cpp mesh/test_mesh.cpp diff --git a/tests/unit/mesh/test_geometric_factors.cpp b/tests/unit/mesh/test_geometric_factors.cpp new file mode 100644 index 0000000000..eb376ef3a5 --- /dev/null +++ b/tests/unit/mesh/test_geometric_factors.cpp @@ -0,0 +1,45 @@ +// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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 "mfem.hpp" +#include "unit_tests.hpp" + +using namespace mfem; + +TEST_CASE("Geometric factor Jacobians", "[Mesh]") +{ + const auto mesh_fname = GENERATE( + "../../data/inline-segment.mesh", + "../../data/star.mesh", + "../../data/star-q3.mesh", + "../../data/fichera.mesh", + "../../data/fichera-q3.mesh", + "../../data/star-surf.mesh", // surface mesh + "../../data/square-disc-surf.mesh" // surface tri mesh + ); + CAPTURE(mesh_fname); + + Mesh mesh = Mesh::LoadFromFile(mesh_fname); + const int order = 3; + const auto &ir = IntRules.Get(mesh.GetElementGeometry(0), order); + auto *geom = mesh.GetGeometricFactors(ir, GeometricFactors::DETERMINANTS); + + const int nq = ir.Size(); + for (int i = 0; i < mesh.GetNE(); ++i) + { + auto &T = *mesh.GetElementTransformation(i); + for (int iq = 0; iq < nq; ++iq) + { + T.SetIntPoint(&ir[iq]); + REQUIRE(geom->detJ(iq + i*nq) == MFEM_Approx(T.Weight())); + } + } +} From b2c17a5c3a840797456ee35de62df0feaf4f38d3 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Fri, 26 Jan 2024 10:13:58 -0800 Subject: [PATCH 148/200] Bump GitHub actions versions Node.js 16 actions are deprecated, this updates to the versions of the actions using Node.js 20. --- .github/workflows/build-container.yml | 2 +- .github/workflows/builds-and-tests.yml | 10 +++++----- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/mfem-analysis.yml | 8 ++++---- .github/workflows/mfem-sanitizer.yml | 4 ++-- .github/workflows/repo-check.yml | 10 +++++----- 6 files changed, 18 insertions(+), 18 deletions(-) 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..d7bf4b81a2 100644 --- a/.github/workflows/builds-and-tests.yml +++ b/.github/workflows/builds-and-tests.yml @@ -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..bf461ccd6c 100644 --- a/.github/workflows/mfem-analysis.yml +++ b/.github/workflows/mfem-analysis.yml @@ -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..b7599ec077 100644 --- a/.github/workflows/mfem-sanitizer.yml +++ b/.github/workflows/mfem-sanitizer.yml @@ -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..063cda8d6b 100644 --- a/.github/workflows/repo-check.yml +++ b/.github/workflows/repo-check.yml @@ -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 @@ -84,7 +84,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 +101,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 +126,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout mfem - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 From 87290fbf5674a0c9ab9164fa7b5d30364a164a54 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Sat, 27 Jan 2024 13:06:49 -0800 Subject: [PATCH 149/200] Update Copyright to 2010-2024 --- .github/workflows/builds-and-tests.yml | 2 +- .github/workflows/mfem-analysis.yml | 2 +- .github/workflows/mfem-sanitizer.yml | 2 +- .github/workflows/repo-check.yml | 2 +- .gitlab-ci.yml | 2 +- .gitlab/configs/common.yml | 2 +- .gitlab/configs/corona-config.yml | 2 +- .gitlab/configs/lassen-config.yml | 2 +- .gitlab/configs/quartz-config.yml | 2 +- .gitlab/configs/report-build-and-test.yml | 2 +- .gitlab/configs/setup-baseline.yml | 2 +- .gitlab/configs/setup-build-and-test.yml | 2 +- .gitlab/corona-build-and-test.yml | 2 +- .gitlab/lassen-build-and-test.yml | 2 +- .gitlab/quartz-baseline.yml | 2 +- .gitlab/quartz-build-and-test.yml | 2 +- .gitlab/scripts/baseline | 2 +- .gitlab/scripts/git_try_to_push | 2 +- .gitlab/scripts/rebaseline | 2 +- .gitlab/scripts/report_build_and_test_failure | 2 +- .gitlab/scripts/report_build_and_test_success | 2 +- .gitlab/scripts/safe_create_rundir | 2 +- CMakeLists.txt | 2 +- LICENSE | 2 +- config/CMakeLists.txt | 2 +- config/cmake/MFEMConfig.cmake.in | 2 +- config/cmake/config.hpp.in | 2 +- config/cmake/modules/FindAMGX.cmake | 2 +- config/cmake/modules/FindAlgoim.cmake | 2 +- config/cmake/modules/FindAxom.cmake | 2 +- config/cmake/modules/FindBenchmark.cmake | 2 +- config/cmake/modules/FindBlitz.cmake | 2 +- config/cmake/modules/FindCODIPACK.cmake | 2 +- config/cmake/modules/FindCXXABIDemangle.cmake | 2 +- config/cmake/modules/FindCaliper.cmake | 2 +- config/cmake/modules/FindConduit.cmake | 2 +- config/cmake/modules/FindENZYME.cmake | 2 +- config/cmake/modules/FindFMS.cmake | 2 +- config/cmake/modules/FindGSLIB.cmake | 2 +- config/cmake/modules/FindHDF5.cmake | 2 +- config/cmake/modules/FindHIOP.cmake | 2 +- config/cmake/modules/FindHYPRE.cmake | 2 +- config/cmake/modules/FindLIBDL.cmake | 2 +- config/cmake/modules/FindLibunwind.cmake | 2 +- config/cmake/modules/FindMETIS.cmake | 2 +- config/cmake/modules/FindMFEMBacktrace.cmake | 2 +- config/cmake/modules/FindMKL_CPARDISO.cmake | 2 +- config/cmake/modules/FindMKL_PARDISO.cmake | 2 +- config/cmake/modules/FindMPFR.cmake | 2 +- config/cmake/modules/FindMUMPS.cmake | 2 +- config/cmake/modules/FindNetCDF.cmake | 2 +- config/cmake/modules/FindOCCA.cmake | 2 +- config/cmake/modules/FindPARELAG.cmake | 2 +- config/cmake/modules/FindPOSIXClocks.cmake | 2 +- config/cmake/modules/FindParMETIS.cmake | 2 +- config/cmake/modules/FindRAJA.cmake | 2 +- config/cmake/modules/FindSLEPc.cmake | 2 +- config/cmake/modules/FindSTRUMPACK.cmake | 2 +- config/cmake/modules/FindSUNDIALS.cmake | 2 +- config/cmake/modules/FindScotch.cmake | 2 +- config/cmake/modules/FindSuiteSparse.cmake | 2 +- config/cmake/modules/FindSuperLUDist.cmake | 2 +- config/cmake/modules/FindUMPIRE.cmake | 2 +- config/cmake/modules/Find_GnuTLS.cmake | 2 +- config/cmake/modules/FindlibCEED.cmake | 2 +- config/cmake/modules/MfemCmakeUtilities.cmake | 2 +- config/config.hpp | 2 +- config/config.hpp.in | 2 +- config/config.mk.in | 2 +- config/defaults.cmake | 2 +- config/defaults.mk | 2 +- config/get_hypre_version.cpp | 2 +- config/get_mumps_version.cpp | 2 +- config/githooks/pre-push | 6 +++--- config/makefile | 2 +- config/sample-runs.sh | 2 +- config/tconfig.hpp | 2 +- config/test.mk | 2 +- doc/CMakeLists.txt | 2 +- doc/makefile | 2 +- examples/CMakeLists.txt | 2 +- examples/amgx/CMakeLists.txt | 2 +- examples/amgx/makefile | 2 +- examples/caliper/CMakeLists.txt | 2 +- examples/caliper/makefile | 2 +- examples/ginkgo/CMakeLists.txt | 2 +- examples/ginkgo/makefile | 2 +- examples/hiop/CMakeLists.txt | 2 +- examples/hiop/makefile | 2 +- examples/makefile | 2 +- examples/moonolith/CMakeLists.txt | 2 +- examples/moonolith/makefile | 2 +- examples/petsc/CMakeLists.txt | 2 +- examples/petsc/makefile | 2 +- examples/pumi/CMakeLists.txt | 2 +- examples/pumi/makefile | 2 +- examples/sundials/CMakeLists.txt | 2 +- examples/sundials/makefile | 2 +- examples/superlu/CMakeLists.txt | 2 +- examples/superlu/makefile | 2 +- fem/CMakeLists.txt | 2 +- fem/adios2datacollection.cpp | 2 +- fem/adios2datacollection.hpp | 2 +- fem/bilinearform.cpp | 2 +- fem/bilinearform.hpp | 2 +- fem/bilinearform_ext.cpp | 2 +- fem/bilinearform_ext.hpp | 2 +- fem/bilininteg.cpp | 2 +- fem/bilininteg.hpp | 2 +- fem/ceed/integrators/convection/convection.cpp | 2 +- fem/ceed/integrators/convection/convection.hpp | 2 +- fem/ceed/integrators/convection/convection_qf.h | 2 +- fem/ceed/integrators/diffusion/diffusion.cpp | 2 +- fem/ceed/integrators/diffusion/diffusion.hpp | 2 +- fem/ceed/integrators/diffusion/diffusion_qf.h | 2 +- fem/ceed/integrators/mass/mass.cpp | 2 +- fem/ceed/integrators/mass/mass.hpp | 2 +- fem/ceed/integrators/mass/mass_qf.h | 2 +- fem/ceed/integrators/nlconvection/nlconvection.cpp | 2 +- fem/ceed/integrators/nlconvection/nlconvection.hpp | 2 +- fem/ceed/integrators/nlconvection/nlconvection_qf.h | 2 +- fem/ceed/interface/basis.cpp | 2 +- fem/ceed/interface/basis.hpp | 2 +- fem/ceed/interface/ceed.hpp | 2 +- fem/ceed/interface/coefficient.hpp | 2 +- fem/ceed/interface/integrator.hpp | 2 +- fem/ceed/interface/interface.hpp | 2 +- fem/ceed/interface/mixed_integrator.hpp | 2 +- fem/ceed/interface/operator.cpp | 2 +- fem/ceed/interface/operator.hpp | 2 +- fem/ceed/interface/restriction.cpp | 2 +- fem/ceed/interface/restriction.hpp | 2 +- fem/ceed/interface/util.cpp | 2 +- fem/ceed/interface/util.hpp | 2 +- fem/ceed/solvers/algebraic.cpp | 2 +- fem/ceed/solvers/algebraic.hpp | 2 +- fem/ceed/solvers/full-assembly.cpp | 2 +- fem/ceed/solvers/full-assembly.hpp | 2 +- fem/ceed/solvers/solvers-atpmg.cpp | 2 +- fem/ceed/solvers/solvers-atpmg.hpp | 2 +- fem/coefficient.cpp | 2 +- fem/coefficient.hpp | 2 +- fem/complex_fem.cpp | 2 +- fem/complex_fem.hpp | 2 +- fem/conduitdatacollection.cpp | 2 +- fem/conduitdatacollection.hpp | 2 +- fem/convergence.hpp | 2 +- fem/datacollection.cpp | 2 +- fem/datacollection.hpp | 2 +- fem/dgmassinv.cpp | 2 +- fem/dgmassinv.hpp | 2 +- fem/dgmassinv_kernels.hpp | 2 +- fem/doftrans.cpp | 2 +- fem/doftrans.hpp | 2 +- fem/eltrans.cpp | 2 +- fem/eltrans.hpp | 2 +- fem/estimators.cpp | 2 +- fem/estimators.hpp | 2 +- fem/fe.cpp | 2 +- fem/fe.hpp | 2 +- fem/fe/face_map_utils.cpp | 2 +- fem/fe/face_map_utils.hpp | 2 +- fem/fe/fe_base.cpp | 2 +- fem/fe/fe_base.hpp | 2 +- fem/fe/fe_fixed_order.cpp | 2 +- fem/fe/fe_fixed_order.hpp | 2 +- fem/fe/fe_h1.cpp | 2 +- fem/fe/fe_h1.hpp | 2 +- fem/fe/fe_l2.cpp | 2 +- fem/fe/fe_l2.hpp | 2 +- fem/fe/fe_nd.cpp | 2 +- fem/fe/fe_nd.hpp | 2 +- fem/fe/fe_nurbs.cpp | 2 +- fem/fe/fe_nurbs.hpp | 2 +- fem/fe/fe_pos.cpp | 2 +- fem/fe/fe_pos.hpp | 2 +- fem/fe/fe_rt.cpp | 2 +- fem/fe/fe_rt.hpp | 2 +- fem/fe/fe_ser.cpp | 2 +- fem/fe/fe_ser.hpp | 2 +- fem/fe_coll.cpp | 2 +- fem/fe_coll.hpp | 2 +- fem/fem.hpp | 2 +- fem/fespace.cpp | 2 +- fem/fespace.hpp | 2 +- fem/fespacehierarchy.cpp | 2 +- fem/fespacehierarchy.hpp | 2 +- fem/fmsconvert.cpp | 2 +- fem/fmsconvert.hpp | 2 +- fem/fmsdatacollection.cpp | 2 +- fem/fmsdatacollection.hpp | 2 +- fem/geom.cpp | 2 +- fem/geom.hpp | 2 +- fem/gridfunc.cpp | 2 +- fem/gridfunc.hpp | 2 +- fem/gslib.cpp | 2 +- fem/gslib.hpp | 2 +- fem/hybridization.cpp | 2 +- fem/hybridization.hpp | 2 +- fem/integ/bilininteg_br2.cpp | 2 +- fem/integ/bilininteg_convection_ea.cpp | 2 +- fem/integ/bilininteg_convection_mf.cpp | 2 +- fem/integ/bilininteg_convection_pa.cpp | 2 +- fem/integ/bilininteg_curlcurl_pa.cpp | 2 +- fem/integ/bilininteg_dgtrace_ea.cpp | 2 +- fem/integ/bilininteg_dgtrace_pa.cpp | 2 +- fem/integ/bilininteg_diffusion_ea.cpp | 2 +- fem/integ/bilininteg_diffusion_kernels.cpp | 2 +- fem/integ/bilininteg_diffusion_kernels.hpp | 2 +- fem/integ/bilininteg_diffusion_mf.cpp | 2 +- fem/integ/bilininteg_diffusion_pa.cpp | 2 +- fem/integ/bilininteg_diffusion_patch.cpp | 2 +- fem/integ/bilininteg_divdiv_pa.cpp | 2 +- fem/integ/bilininteg_elasticity_ea.cpp | 2 +- fem/integ/bilininteg_elasticity_kernels.cpp | 2 +- fem/integ/bilininteg_elasticity_kernels.hpp | 2 +- fem/integ/bilininteg_elasticity_pa.cpp | 2 +- fem/integ/bilininteg_gradient_pa.cpp | 2 +- fem/integ/bilininteg_hcurl_kernels.cpp | 2 +- fem/integ/bilininteg_hcurl_kernels.hpp | 2 +- fem/integ/bilininteg_hcurlhdiv_kernels.cpp | 2 +- fem/integ/bilininteg_hcurlhdiv_kernels.hpp | 2 +- fem/integ/bilininteg_hdiv_kernels.cpp | 2 +- fem/integ/bilininteg_hdiv_kernels.hpp | 2 +- fem/integ/bilininteg_interp_pa.cpp | 2 +- fem/integ/bilininteg_mass_ea.cpp | 2 +- fem/integ/bilininteg_mass_kernels.cpp | 2 +- fem/integ/bilininteg_mass_kernels.hpp | 2 +- fem/integ/bilininteg_mass_mf.cpp | 2 +- fem/integ/bilininteg_mass_pa.cpp | 2 +- fem/integ/bilininteg_mixedcurl_pa.cpp | 2 +- fem/integ/bilininteg_mixedvecgrad_pa.cpp | 2 +- fem/integ/bilininteg_transpose_ea.cpp | 2 +- fem/integ/bilininteg_vecdiffusion_mf.cpp | 2 +- fem/integ/bilininteg_vecdiffusion_pa.cpp | 2 +- fem/integ/bilininteg_vecdiv_pa.cpp | 2 +- fem/integ/bilininteg_vecmass_mf.cpp | 2 +- fem/integ/bilininteg_vecmass_pa.cpp | 2 +- fem/integ/bilininteg_vectorfediv_pa.cpp | 2 +- fem/integ/bilininteg_vectorfemass_pa.cpp | 2 +- fem/integ/lininteg_boundary.cpp | 2 +- fem/integ/lininteg_boundary_flux.cpp | 2 +- fem/integ/lininteg_domain.cpp | 2 +- fem/integ/lininteg_domain_grad.cpp | 2 +- fem/integ/lininteg_domain_vectorfe.cpp | 2 +- fem/integ/nonlininteg_vecconvection_mf.cpp | 2 +- fem/integ/nonlininteg_vecconvection_pa.cpp | 2 +- fem/intrules.cpp | 2 +- fem/intrules.hpp | 2 +- fem/intrules_cut.cpp | 2 +- fem/intrules_cut.hpp | 2 +- fem/kdtree.cpp | 2 +- fem/kdtree.hpp | 2 +- fem/kernels.hpp | 2 +- fem/linearform.cpp | 2 +- fem/linearform.hpp | 2 +- fem/linearform_ext.cpp | 2 +- fem/linearform_ext.hpp | 2 +- fem/lininteg.cpp | 2 +- fem/lininteg.hpp | 2 +- fem/lor/lor.cpp | 2 +- fem/lor/lor.hpp | 2 +- fem/lor/lor_ads.cpp | 2 +- fem/lor/lor_ads.hpp | 2 +- fem/lor/lor_ams.cpp | 2 +- fem/lor/lor_ams.hpp | 2 +- fem/lor/lor_batched.cpp | 2 +- fem/lor/lor_batched.hpp | 2 +- fem/lor/lor_h1.hpp | 2 +- fem/lor/lor_h1_impl.hpp | 2 +- fem/lor/lor_nd.hpp | 2 +- fem/lor/lor_nd_impl.hpp | 2 +- fem/lor/lor_rt.hpp | 2 +- fem/lor/lor_rt_impl.hpp | 2 +- fem/lor/lor_util.hpp | 2 +- fem/moonolith/CMakeLists.txt | 2 +- fem/moonolith/cut.cpp | 2 +- fem/moonolith/cut.hpp | 2 +- fem/moonolith/mortarassembler.cpp | 2 +- fem/moonolith/mortarassembler.hpp | 2 +- fem/moonolith/mortarintegrator.cpp | 2 +- fem/moonolith/mortarintegrator.hpp | 2 +- fem/moonolith/pmortarassembler.cpp | 2 +- fem/moonolith/pmortarassembler.hpp | 2 +- fem/moonolith/transfer.cpp | 2 +- fem/moonolith/transfer.hpp | 2 +- fem/moonolith/transferutils.cpp | 2 +- fem/moonolith/transferutils.hpp | 2 +- fem/multigrid.cpp | 2 +- fem/multigrid.hpp | 2 +- fem/nonlinearform.cpp | 2 +- fem/nonlinearform.hpp | 2 +- fem/nonlinearform_ext.cpp | 2 +- fem/nonlinearform_ext.hpp | 2 +- fem/nonlininteg.cpp | 2 +- fem/nonlininteg.hpp | 2 +- fem/occa.okl | 2 +- fem/pbilinearform.cpp | 2 +- fem/pbilinearform.hpp | 2 +- fem/pfespace.cpp | 2 +- fem/pfespace.hpp | 2 +- fem/pgridfunc.cpp | 2 +- fem/pgridfunc.hpp | 2 +- fem/plinearform.cpp | 2 +- fem/plinearform.hpp | 2 +- fem/pnonlinearform.cpp | 2 +- fem/pnonlinearform.hpp | 2 +- fem/prestriction.cpp | 2 +- fem/prestriction.hpp | 2 +- fem/qfunction.cpp | 2 +- fem/qfunction.hpp | 2 +- fem/qinterp/det.cpp | 2 +- fem/qinterp/dispatch.hpp | 2 +- fem/qinterp/eval.hpp | 2 +- fem/qinterp/eval_by_nodes.cpp | 2 +- fem/qinterp/eval_by_vdim.cpp | 2 +- fem/qinterp/grad.hpp | 2 +- fem/qinterp/grad_by_nodes.cpp | 2 +- fem/qinterp/grad_by_vdim.cpp | 2 +- fem/qinterp/grad_phys_by_nodes.cpp | 2 +- fem/qinterp/grad_phys_by_vdim.cpp | 2 +- fem/qspace.cpp | 2 +- fem/qspace.hpp | 2 +- fem/quadinterpolator.cpp | 2 +- fem/quadinterpolator.hpp | 2 +- fem/quadinterpolator_face.cpp | 2 +- fem/quadinterpolator_face.hpp | 2 +- fem/restriction.cpp | 2 +- fem/restriction.hpp | 2 +- fem/sidredatacollection.cpp | 2 +- fem/sidredatacollection.hpp | 2 +- fem/staticcond.cpp | 2 +- fem/staticcond.hpp | 2 +- fem/tbilinearform.hpp | 2 +- fem/tbilininteg.hpp | 2 +- fem/tcoefficient.hpp | 2 +- fem/teltrans.hpp | 2 +- fem/tevaluator.hpp | 2 +- fem/tfe.hpp | 2 +- fem/tfespace.hpp | 2 +- fem/tintrules.hpp | 2 +- fem/tmop.cpp | 2 +- fem/tmop.hpp | 2 +- fem/tmop/tmop_pa.cpp | 2 +- fem/tmop/tmop_pa.hpp | 2 +- fem/tmop/tmop_pa_da3.cpp | 2 +- fem/tmop/tmop_pa_h2d.cpp | 2 +- fem/tmop/tmop_pa_h2d_c0.cpp | 2 +- fem/tmop/tmop_pa_h2m.cpp | 2 +- fem/tmop/tmop_pa_h2m_c0.cpp | 2 +- fem/tmop/tmop_pa_h2s.cpp | 2 +- fem/tmop/tmop_pa_h2s_c0.cpp | 2 +- fem/tmop/tmop_pa_h3d.cpp | 2 +- fem/tmop/tmop_pa_h3d_c0.cpp | 2 +- fem/tmop/tmop_pa_h3m.cpp | 2 +- fem/tmop/tmop_pa_h3m_c0.cpp | 2 +- fem/tmop/tmop_pa_h3s.cpp | 2 +- fem/tmop/tmop_pa_h3s_c0.cpp | 2 +- fem/tmop/tmop_pa_jp2.cpp | 2 +- fem/tmop/tmop_pa_jp3.cpp | 2 +- fem/tmop/tmop_pa_p2.cpp | 2 +- fem/tmop/tmop_pa_p2_c0.cpp | 2 +- fem/tmop/tmop_pa_p3.cpp | 2 +- fem/tmop/tmop_pa_p3_c0.cpp | 2 +- fem/tmop/tmop_pa_tc2.cpp | 2 +- fem/tmop/tmop_pa_tc3.cpp | 2 +- fem/tmop/tmop_pa_w2.cpp | 2 +- fem/tmop/tmop_pa_w2_c0.cpp | 2 +- fem/tmop/tmop_pa_w3.cpp | 2 +- fem/tmop/tmop_pa_w3_c0.cpp | 2 +- fem/tmop_amr.cpp | 2 +- fem/tmop_amr.hpp | 2 +- fem/tmop_tools.cpp | 2 +- fem/tmop_tools.hpp | 2 +- fem/transfer.cpp | 2 +- fem/transfer.hpp | 2 +- general/CMakeLists.txt | 2 +- general/adios2stream.cpp | 2 +- general/adios2stream.hpp | 2 +- general/annotation.hpp | 2 +- general/array.cpp | 2 +- general/array.hpp | 2 +- general/backends.hpp | 2 +- general/binaryio.cpp | 2 +- general/binaryio.hpp | 2 +- general/communication.cpp | 2 +- general/communication.hpp | 2 +- general/cuda.cpp | 2 +- general/cuda.hpp | 2 +- general/device.cpp | 2 +- general/device.hpp | 2 +- general/enzyme.hpp | 2 +- general/error.cpp | 2 +- general/error.hpp | 2 +- general/forall.hpp | 2 +- general/gecko.cpp | 2 +- general/gecko.hpp | 2 +- general/globals.cpp | 2 +- general/globals.hpp | 2 +- general/hash.cpp | 2 +- general/hash.hpp | 2 +- general/hip.cpp | 2 +- general/hip.hpp | 2 +- general/isockstream.cpp | 2 +- general/isockstream.hpp | 2 +- general/kdtree.hpp | 2 +- general/mem_alloc.hpp | 2 +- general/mem_manager.cpp | 2 +- general/mem_manager.hpp | 2 +- general/occa.cpp | 2 +- general/occa.hpp | 2 +- general/optparser.cpp | 2 +- general/optparser.hpp | 2 +- general/osockstream.cpp | 2 +- general/osockstream.hpp | 2 +- general/sets.cpp | 2 +- general/sets.hpp | 2 +- general/socketstream.cpp | 2 +- general/socketstream.hpp | 2 +- general/sort_pairs.hpp | 2 +- general/stable3d.cpp | 2 +- general/stable3d.hpp | 2 +- general/table.cpp | 2 +- general/table.hpp | 2 +- general/tassign.hpp | 2 +- general/text.hpp | 2 +- general/tic_toc.cpp | 2 +- general/tic_toc.hpp | 2 +- general/version.cpp | 2 +- general/version.hpp | 2 +- linalg/CMakeLists.txt | 2 +- linalg/amgxsolver.cpp | 2 +- linalg/amgxsolver.hpp | 2 +- linalg/auxiliary.cpp | 2 +- linalg/auxiliary.hpp | 2 +- linalg/blockmatrix.cpp | 2 +- linalg/blockmatrix.hpp | 2 +- linalg/blockoperator.cpp | 2 +- linalg/blockoperator.hpp | 2 +- linalg/blockvector.cpp | 2 +- linalg/blockvector.hpp | 2 +- linalg/complex_densemat.cpp | 2 +- linalg/complex_densemat.hpp | 2 +- linalg/complex_operator.cpp | 2 +- linalg/complex_operator.hpp | 2 +- linalg/constraints.cpp | 2 +- linalg/constraints.hpp | 2 +- linalg/cpardiso.hpp | 2 +- linalg/densemat.cpp | 2 +- linalg/densemat.hpp | 2 +- linalg/dinvariants.hpp | 2 +- linalg/dtensor.hpp | 2 +- linalg/dual.hpp | 2 +- linalg/ginkgo.cpp | 2 +- linalg/ginkgo.hpp | 2 +- linalg/handle.cpp | 2 +- linalg/handle.hpp | 2 +- linalg/hiop.cpp | 2 +- linalg/hiop.hpp | 2 +- linalg/hypre.cpp | 2 +- linalg/hypre.hpp | 2 +- linalg/hypre_parcsr.cpp | 2 +- linalg/hypre_parcsr.hpp | 2 +- linalg/invariants.hpp | 2 +- linalg/kernels.hpp | 2 +- linalg/linalg.hpp | 2 +- linalg/matrix.cpp | 2 +- linalg/matrix.hpp | 2 +- linalg/mumps.cpp | 2 +- linalg/mumps.hpp | 2 +- linalg/ode.cpp | 2 +- linalg/ode.hpp | 2 +- linalg/operator.cpp | 2 +- linalg/operator.hpp | 2 +- linalg/pardiso.cpp | 2 +- linalg/pardiso.hpp | 2 +- linalg/petsc.cpp | 2 +- linalg/petsc.hpp | 2 +- linalg/petscinternals.hpp | 2 +- linalg/simd.hpp | 2 +- linalg/simd/auto.hpp | 2 +- linalg/simd/m128.hpp | 2 +- linalg/simd/m256.hpp | 2 +- linalg/simd/m512.hpp | 2 +- linalg/simd/qpx.hpp | 2 +- linalg/simd/qpx256.hpp | 2 +- linalg/simd/sve.hpp | 2 +- linalg/simd/vsx.hpp | 2 +- linalg/simd/vsx128.hpp | 2 +- linalg/simd/x86.hpp | 2 +- linalg/slepc.cpp | 2 +- linalg/slepc.hpp | 2 +- linalg/solvers.cpp | 2 +- linalg/solvers.hpp | 2 +- linalg/sparsemat.cpp | 2 +- linalg/sparsemat.hpp | 2 +- linalg/sparsesmoothers.cpp | 2 +- linalg/sparsesmoothers.hpp | 2 +- linalg/strumpack.cpp | 2 +- linalg/strumpack.hpp | 2 +- linalg/sundials.cpp | 2 +- linalg/sundials.hpp | 2 +- linalg/superlu.cpp | 2 +- linalg/superlu.hpp | 2 +- linalg/symmat.cpp | 2 +- linalg/symmat.hpp | 2 +- linalg/tensor.hpp | 2 +- linalg/tlayout.hpp | 2 +- linalg/tmatrix.hpp | 2 +- linalg/ttensor.hpp | 2 +- linalg/vector.cpp | 2 +- linalg/vector.hpp | 2 +- makefile | 2 +- mesh/CMakeLists.txt | 2 +- mesh/element.cpp | 2 +- mesh/element.hpp | 2 +- mesh/gmsh.cpp | 2 +- mesh/gmsh.hpp | 2 +- mesh/hexahedron.cpp | 2 +- mesh/hexahedron.hpp | 2 +- mesh/mesh.cpp | 2 +- mesh/mesh.hpp | 2 +- mesh/mesh_headers.hpp | 2 +- mesh/mesh_operators.cpp | 2 +- mesh/mesh_operators.hpp | 2 +- mesh/mesh_readers.cpp | 2 +- mesh/ncmesh.cpp | 2 +- mesh/ncmesh.hpp | 2 +- mesh/ncmesh_tables.hpp | 2 +- mesh/nurbs.cpp | 2 +- mesh/nurbs.hpp | 2 +- mesh/pmesh.cpp | 2 +- mesh/pmesh.hpp | 2 +- mesh/pncmesh.cpp | 2 +- mesh/pncmesh.hpp | 2 +- mesh/point.cpp | 2 +- mesh/point.hpp | 2 +- mesh/pumi.cpp | 2 +- mesh/pumi.hpp | 2 +- mesh/pyramid.cpp | 2 +- mesh/pyramid.hpp | 2 +- mesh/quadrilateral.cpp | 2 +- mesh/quadrilateral.hpp | 2 +- mesh/segment.cpp | 2 +- mesh/segment.hpp | 2 +- mesh/submesh/psubmesh.cpp | 2 +- mesh/submesh/psubmesh.hpp | 2 +- mesh/submesh/ptransfermap.cpp | 2 +- mesh/submesh/ptransfermap.hpp | 2 +- mesh/submesh/submesh.cpp | 2 +- mesh/submesh/submesh.hpp | 2 +- mesh/submesh/submesh_utils.cpp | 2 +- mesh/submesh/submesh_utils.hpp | 2 +- mesh/submesh/transfer_category.hpp | 2 +- mesh/submesh/transfermap.cpp | 2 +- mesh/submesh/transfermap.hpp | 2 +- mesh/tetrahedron.cpp | 2 +- mesh/tetrahedron.hpp | 2 +- mesh/tmesh.hpp | 2 +- mesh/triangle.cpp | 2 +- mesh/triangle.hpp | 2 +- mesh/vertex.cpp | 2 +- mesh/vertex.hpp | 2 +- mesh/vtk.cpp | 2 +- mesh/vtk.hpp | 2 +- mesh/wedge.cpp | 2 +- mesh/wedge.hpp | 2 +- mfem-performance.hpp | 2 +- mfem.hpp | 2 +- miniapps/CMakeLists.txt | 2 +- miniapps/adjoint/CMakeLists.txt | 2 +- miniapps/adjoint/adjoint_advection_diffusion.cpp | 2 +- miniapps/adjoint/cvsRoberts_ASAi_dns.cpp | 2 +- miniapps/adjoint/makefile | 2 +- miniapps/autodiff/CMakeLists.txt | 2 +- miniapps/autodiff/admfem.hpp | 2 +- miniapps/autodiff/example.hpp | 2 +- miniapps/autodiff/makefile | 2 +- miniapps/autodiff/par_example.cpp | 2 +- miniapps/autodiff/seq_example.cpp | 2 +- miniapps/autodiff/seq_test.cpp | 2 +- miniapps/autodiff/taddensemat.hpp | 2 +- miniapps/autodiff/tadvector.hpp | 2 +- miniapps/common/CMakeLists.txt | 2 +- miniapps/common/dist_solver.cpp | 2 +- miniapps/common/dist_solver.hpp | 2 +- miniapps/common/fem_extras.cpp | 2 +- miniapps/common/fem_extras.hpp | 2 +- miniapps/common/makefile | 2 +- miniapps/common/mesh_extras.cpp | 2 +- miniapps/common/mesh_extras.hpp | 2 +- miniapps/common/mfem-common.hpp | 2 +- miniapps/common/pfem_extras.cpp | 2 +- miniapps/common/pfem_extras.hpp | 2 +- miniapps/dpg/CMakeLists.txt | 2 +- miniapps/dpg/acoustics.cpp | 2 +- miniapps/dpg/convection-diffusion.cpp | 2 +- miniapps/dpg/diffusion.cpp | 2 +- miniapps/dpg/makefile | 2 +- miniapps/dpg/maxwell.cpp | 2 +- miniapps/dpg/pacoustics.cpp | 2 +- miniapps/dpg/pconvection-diffusion.cpp | 2 +- miniapps/dpg/pdiffusion.cpp | 2 +- miniapps/dpg/pmaxwell.cpp | 2 +- miniapps/dpg/util/blockstaticcond.cpp | 2 +- miniapps/dpg/util/blockstaticcond.hpp | 2 +- miniapps/dpg/util/complexstaticcond.cpp | 2 +- miniapps/dpg/util/complexstaticcond.hpp | 2 +- miniapps/dpg/util/complexweakform.cpp | 2 +- miniapps/dpg/util/complexweakform.hpp | 2 +- miniapps/dpg/util/pcomplexweakform.cpp | 2 +- miniapps/dpg/util/pcomplexweakform.hpp | 2 +- miniapps/dpg/util/pml.cpp | 2 +- miniapps/dpg/util/pml.hpp | 2 +- miniapps/dpg/util/pweakform.cpp | 2 +- miniapps/dpg/util/pweakform.hpp | 2 +- miniapps/dpg/util/weakform.cpp | 2 +- miniapps/dpg/util/weakform.hpp | 2 +- miniapps/electromagnetics/CMakeLists.txt | 2 +- miniapps/electromagnetics/electromagnetics.hpp | 2 +- miniapps/electromagnetics/joule.cpp | 2 +- miniapps/electromagnetics/joule_solver.cpp | 2 +- miniapps/electromagnetics/joule_solver.hpp | 2 +- miniapps/electromagnetics/makefile | 2 +- miniapps/electromagnetics/maxwell.cpp | 2 +- miniapps/electromagnetics/maxwell_solver.cpp | 2 +- miniapps/electromagnetics/maxwell_solver.hpp | 2 +- miniapps/electromagnetics/tesla.cpp | 2 +- miniapps/electromagnetics/tesla_solver.cpp | 2 +- miniapps/electromagnetics/tesla_solver.hpp | 2 +- miniapps/electromagnetics/volta.cpp | 2 +- miniapps/electromagnetics/volta_solver.cpp | 2 +- miniapps/electromagnetics/volta_solver.hpp | 2 +- miniapps/gslib/CMakeLists.txt | 2 +- miniapps/gslib/field-diff.cpp | 2 +- miniapps/gslib/field-interp.cpp | 2 +- miniapps/gslib/findpts.cpp | 2 +- miniapps/gslib/makefile | 2 +- miniapps/gslib/pfindpts.cpp | 2 +- miniapps/gslib/schwarz_ex1.cpp | 2 +- miniapps/gslib/schwarz_ex1p.cpp | 2 +- miniapps/hdiv-linear-solver/CMakeLists.txt | 2 +- miniapps/hdiv-linear-solver/change_basis.cpp | 2 +- miniapps/hdiv-linear-solver/change_basis.hpp | 2 +- miniapps/hdiv-linear-solver/darcy.cpp | 2 +- miniapps/hdiv-linear-solver/discrete_divergence.cpp | 2 +- miniapps/hdiv-linear-solver/discrete_divergence.hpp | 2 +- miniapps/hdiv-linear-solver/grad_div.cpp | 2 +- miniapps/hdiv-linear-solver/hdiv_linear_solver.cpp | 2 +- miniapps/hdiv-linear-solver/hdiv_linear_solver.hpp | 2 +- miniapps/hdiv-linear-solver/makefile | 2 +- miniapps/hooke/CMakeLists.txt | 2 +- miniapps/hooke/hooke.cpp | 2 +- miniapps/hooke/kernels/elasticity_kernels.hpp | 2 +- miniapps/hooke/kernels/kernel_helpers.hpp | 2 +- miniapps/hooke/makefile | 2 +- miniapps/hooke/materials/gradient_type.hpp | 2 +- miniapps/hooke/materials/linear_elastic.hpp | 2 +- miniapps/hooke/materials/neohookean.hpp | 2 +- miniapps/hooke/operators/elasticity_gradient_operator.cpp | 2 +- miniapps/hooke/operators/elasticity_gradient_operator.hpp | 2 +- miniapps/hooke/operators/elasticity_operator.cpp | 2 +- miniapps/hooke/operators/elasticity_operator.hpp | 2 +- miniapps/hooke/preconditioners/diagonal_preconditioner.cpp | 2 +- miniapps/hooke/preconditioners/diagonal_preconditioner.hpp | 2 +- miniapps/meshing/CMakeLists.txt | 2 +- miniapps/meshing/extruder.cpp | 2 +- miniapps/meshing/fit-node-position.cpp | 2 +- miniapps/meshing/klein-bottle.cpp | 2 +- miniapps/meshing/makefile | 2 +- miniapps/meshing/mesh-explorer.cpp | 2 +- miniapps/meshing/mesh-fitting.hpp | 2 +- miniapps/meshing/mesh-optimizer.cpp | 2 +- miniapps/meshing/mesh-optimizer.hpp | 2 +- miniapps/meshing/mesh-quality.cpp | 2 +- miniapps/meshing/minimal-surface.cpp | 2 +- miniapps/meshing/mobius-strip.cpp | 2 +- miniapps/meshing/pmesh-fitting.cpp | 2 +- miniapps/meshing/pmesh-optimizer.cpp | 2 +- miniapps/meshing/pminimal-surface.cpp | 2 +- miniapps/meshing/polar-nc.cpp | 2 +- miniapps/meshing/reflector.cpp | 2 +- miniapps/meshing/shaper.cpp | 2 +- miniapps/meshing/toroid.cpp | 2 +- miniapps/meshing/trimmer.cpp | 2 +- miniapps/meshing/twist.cpp | 2 +- miniapps/mtop/CMakeLists.txt | 2 +- miniapps/mtop/makefile | 2 +- miniapps/mtop/mtop_integrators.cpp | 2 +- miniapps/mtop/mtop_integrators.hpp | 2 +- miniapps/mtop/paramnonlinearform.cpp | 2 +- miniapps/mtop/paramnonlinearform.hpp | 2 +- miniapps/mtop/parheat.cpp | 2 +- miniapps/mtop/pparamnonlinearform.cpp | 2 +- miniapps/mtop/pparamnonlinearform.hpp | 2 +- miniapps/mtop/seqheat.cpp | 2 +- miniapps/multidomain/CMakeLists.txt | 2 +- miniapps/multidomain/makefile | 2 +- miniapps/multidomain/multidomain.cpp | 2 +- miniapps/navier/CMakeLists.txt | 2 +- miniapps/navier/makefile | 2 +- miniapps/navier/navier_3dfoc.cpp | 2 +- miniapps/navier/navier_cht.cpp | 2 +- miniapps/navier/navier_kovasznay.cpp | 2 +- miniapps/navier/navier_kovasznay_vs.cpp | 2 +- miniapps/navier/navier_mms.cpp | 2 +- miniapps/navier/navier_shear.cpp | 2 +- miniapps/navier/navier_solver.cpp | 2 +- miniapps/navier/navier_solver.hpp | 2 +- miniapps/navier/navier_tgv.cpp | 2 +- miniapps/navier/navier_turbchan.cpp | 2 +- miniapps/nurbs/CMakeLists.txt | 2 +- miniapps/nurbs/makefile | 2 +- miniapps/nurbs/nurbs_curveint.cpp | 2 +- miniapps/parelag/CMakeLists.txt | 2 +- miniapps/parelag/MultilevelHcurlHdivSolver.cpp | 2 +- miniapps/parelag/makefile | 2 +- miniapps/performance/CMakeLists.txt | 2 +- miniapps/performance/makefile | 2 +- miniapps/shifted/CMakeLists.txt | 2 +- miniapps/shifted/diffusion.cpp | 2 +- miniapps/shifted/distance.cpp | 2 +- miniapps/shifted/extrapolate.cpp | 2 +- miniapps/shifted/extrapolator.cpp | 2 +- miniapps/shifted/extrapolator.hpp | 2 +- miniapps/shifted/lsf_integral.cpp | 2 +- miniapps/shifted/makefile | 2 +- miniapps/shifted/marking.cpp | 2 +- miniapps/shifted/marking.hpp | 2 +- miniapps/shifted/sbm_aux.hpp | 2 +- miniapps/shifted/sbm_solver.cpp | 2 +- miniapps/shifted/sbm_solver.hpp | 2 +- miniapps/solvers/CMakeLists.txt | 2 +- miniapps/solvers/block-solvers.cpp | 2 +- miniapps/solvers/div_free_solver.cpp | 2 +- miniapps/solvers/div_free_solver.hpp | 2 +- miniapps/solvers/lor_mms.hpp | 2 +- miniapps/solvers/lor_solvers.cpp | 2 +- miniapps/solvers/makefile | 2 +- miniapps/solvers/plor_solvers.cpp | 2 +- miniapps/spde/CMakeLists.txt | 2 +- miniapps/spde/generate_random_field.cpp | 2 +- miniapps/spde/makefile | 2 +- miniapps/spde/material_metrics.cpp | 2 +- miniapps/spde/material_metrics.hpp | 2 +- miniapps/spde/spde_solver.cpp | 2 +- miniapps/spde/spde_solver.hpp | 2 +- miniapps/spde/transformation.cpp | 2 +- miniapps/spde/transformation.hpp | 2 +- miniapps/spde/util.cpp | 2 +- miniapps/spde/util.hpp | 2 +- miniapps/spde/visualizer.cpp | 2 +- miniapps/spde/visualizer.hpp | 2 +- miniapps/tools/CMakeLists.txt | 2 +- miniapps/tools/convert-dc.cpp | 2 +- miniapps/tools/display-basis.cpp | 2 +- miniapps/tools/get-values.cpp | 2 +- miniapps/tools/load-dc.cpp | 2 +- miniapps/tools/lor-transfer.cpp | 2 +- miniapps/tools/makefile | 2 +- miniapps/tools/nodal-transfer.cpp | 2 +- miniapps/tools/plor-transfer.cpp | 2 +- miniapps/tools/tmop-check-metric.cpp | 2 +- miniapps/tools/tmop-metric-magnitude.cpp | 2 +- miniapps/toys/CMakeLists.txt | 2 +- miniapps/toys/automata.cpp | 2 +- miniapps/toys/life.cpp | 2 +- miniapps/toys/lissajous.cpp | 2 +- miniapps/toys/makefile | 2 +- miniapps/toys/mandel.cpp | 2 +- miniapps/toys/mondrian.cpp | 2 +- miniapps/toys/rubik.cpp | 2 +- miniapps/toys/snake.cpp | 2 +- tests/CMakeLists.txt | 2 +- tests/benchmarks/CMakeLists.txt | 2 +- tests/benchmarks/bench.hpp | 2 +- tests/benchmarks/bench_assembly_levels.cpp | 2 +- tests/benchmarks/bench_ceed.cpp | 2 +- tests/benchmarks/bench_dg_amr.cpp | 2 +- tests/benchmarks/bench_elasticity.cpp | 2 +- tests/benchmarks/bench_tmop.cpp | 2 +- tests/benchmarks/bench_vector.cpp | 2 +- tests/benchmarks/bench_virtuals.cpp | 2 +- tests/benchmarks/makefile | 2 +- tests/convergence/makefile | 2 +- tests/convergence/prates.cpp | 2 +- tests/convergence/rates.cpp | 2 +- tests/gitlab/build_and_test | 2 +- tests/gitlab/generate_spack_upstream | 2 +- tests/gitlab/get_mfem_uberenv | 2 +- tests/mem_manager/dangling-aliases.cpp | 2 +- tests/mem_manager/makefile | 2 +- tests/par-mesh-format/makefile | 2 +- tests/scripts/branch-history | 2 +- tests/scripts/code-style | 2 +- tests/scripts/documentation | 2 +- tests/scripts/gitignore | 2 +- tests/scripts/runtest | 2 +- tests/unit/CMakeLists.txt | 2 +- tests/unit/ceed/test_ceed.cpp | 2 +- tests/unit/ceed/test_ceed_main.cpp | 2 +- tests/unit/cunit_test_main.cpp | 2 +- tests/unit/fem/test_1d_bilininteg.cpp | 2 +- tests/unit/fem/test_2d_bilininteg.cpp | 2 +- tests/unit/fem/test_3d_bilininteg.cpp | 2 +- tests/unit/fem/test_assemblediagonalpa.cpp | 2 +- tests/unit/fem/test_assembly_levels.cpp | 2 +- tests/unit/fem/test_bilinearform.cpp | 2 +- tests/unit/fem/test_blocknonlinearform.cpp | 2 +- tests/unit/fem/test_build_dof_to_arrays.cpp | 2 +- tests/unit/fem/test_calccurlshape.cpp | 2 +- tests/unit/fem/test_calcdivshape.cpp | 2 +- tests/unit/fem/test_calcdshape.cpp | 2 +- tests/unit/fem/test_calcshape.cpp | 2 +- tests/unit/fem/test_calcvshape.cpp | 2 +- tests/unit/fem/test_coefficient.cpp | 2 +- tests/unit/fem/test_datacollection.cpp | 2 +- tests/unit/fem/test_derefine.cpp | 2 +- tests/unit/fem/test_dgmassinv.cpp | 2 +- tests/unit/fem/test_doftrans.cpp | 2 +- tests/unit/fem/test_domain_int.cpp | 2 +- tests/unit/fem/test_eigs.cpp | 2 +- tests/unit/fem/test_estimator.cpp | 2 +- tests/unit/fem/test_fa_determinism.cpp | 2 +- tests/unit/fem/test_face_elem_trans.cpp | 2 +- tests/unit/fem/test_face_permutation.cpp | 2 +- tests/unit/fem/test_face_restriction.cpp | 2 +- tests/unit/fem/test_fe.cpp | 2 +- tests/unit/fem/test_get_value.cpp | 2 +- tests/unit/fem/test_getderivative.cpp | 2 +- tests/unit/fem/test_getgradient.cpp | 2 +- tests/unit/fem/test_gslib.cpp | 2 +- tests/unit/fem/test_intrules.cpp | 2 +- tests/unit/fem/test_intruletypes.cpp | 2 +- tests/unit/fem/test_inversetransform.cpp | 2 +- tests/unit/fem/test_lexicographic_ordering.cpp | 2 +- tests/unit/fem/test_lin_interp.cpp | 2 +- tests/unit/fem/test_linear_fes.cpp | 2 +- tests/unit/fem/test_linearform_ext.cpp | 2 +- tests/unit/fem/test_lor.cpp | 2 +- tests/unit/fem/test_lor_batched.cpp | 2 +- tests/unit/fem/test_operatorjacobismoother.cpp | 2 +- tests/unit/fem/test_oscillation.cpp | 2 +- tests/unit/fem/test_pa_coeff.cpp | 2 +- tests/unit/fem/test_pa_grad.cpp | 2 +- tests/unit/fem/test_pa_idinterp.cpp | 2 +- tests/unit/fem/test_pa_kernels.cpp | 2 +- tests/unit/fem/test_pgridfunc_save_serial.cpp | 2 +- tests/unit/fem/test_project_bdr.cpp | 2 +- tests/unit/fem/test_quadf_coef.cpp | 2 +- tests/unit/fem/test_quadinterpolator.cpp | 2 +- tests/unit/fem/test_quadraturefunc.cpp | 2 +- tests/unit/fem/test_r1d_bilininteg.cpp | 2 +- tests/unit/fem/test_r2d_bilininteg.cpp | 2 +- tests/unit/fem/test_sparse_matrix.cpp | 2 +- tests/unit/fem/test_sum_bilin.cpp | 2 +- tests/unit/fem/test_surf_blf.cpp | 2 +- tests/unit/fem/test_tet_reorder.cpp | 2 +- tests/unit/fem/test_transfer.cpp | 2 +- tests/unit/fem/test_var_order.cpp | 2 +- tests/unit/fem/test_white_noise.cpp | 2 +- tests/unit/general/test_array.cpp | 2 +- tests/unit/general/test_error.cpp | 2 +- tests/unit/general/test_mem.cpp | 2 +- tests/unit/general/test_text.cpp | 2 +- tests/unit/general/test_umpire_mem.cpp | 2 +- tests/unit/general/test_zlib.cpp | 2 +- tests/unit/linalg/test_cg_indefinite.cpp | 2 +- tests/unit/linalg/test_chebyshev.cpp | 2 +- tests/unit/linalg/test_complex_dense_matrix.cpp | 2 +- tests/unit/linalg/test_complex_operator.cpp | 2 +- tests/unit/linalg/test_constrainedsolver.cpp | 2 +- tests/unit/linalg/test_direct_solvers.cpp | 2 +- tests/unit/linalg/test_hypre_ilu.cpp | 2 +- tests/unit/linalg/test_hypre_prec.cpp | 2 +- tests/unit/linalg/test_hypre_vector.cpp | 2 +- tests/unit/linalg/test_ilu.cpp | 2 +- tests/unit/linalg/test_matrix_block.cpp | 2 +- tests/unit/linalg/test_matrix_dense.cpp | 2 +- tests/unit/linalg/test_matrix_hypre.cpp | 2 +- tests/unit/linalg/test_matrix_rectangular.cpp | 2 +- tests/unit/linalg/test_matrix_sparse.cpp | 2 +- tests/unit/linalg/test_matrix_square.cpp | 2 +- tests/unit/linalg/test_ode.cpp | 2 +- tests/unit/linalg/test_ode2.cpp | 2 +- tests/unit/linalg/test_operator.cpp | 2 +- tests/unit/linalg/test_vector.cpp | 2 +- tests/unit/makefile | 2 +- tests/unit/mesh/mesh_test_utils.cpp | 2 +- tests/unit/mesh/mesh_test_utils.hpp | 2 +- tests/unit/mesh/test_face_orientations.cpp | 2 +- tests/unit/mesh/test_fms.cpp | 2 +- tests/unit/mesh/test_mesh.cpp | 2 +- tests/unit/mesh/test_ncmesh.cpp | 2 +- tests/unit/mesh/test_periodic_mesh.cpp | 2 +- tests/unit/mesh/test_pmesh.cpp | 2 +- tests/unit/mesh/test_psubmesh.cpp | 2 +- tests/unit/mesh/test_submesh.cpp | 2 +- tests/unit/mesh/test_vtu.cpp | 2 +- tests/unit/miniapps/test_debug_device.cpp | 2 +- tests/unit/miniapps/test_sedov.cpp | 2 +- tests/unit/miniapps/test_tmop_pa.cpp | 2 +- tests/unit/pcunit_test_main.cpp | 2 +- tests/unit/punit_test_main.cpp | 2 +- tests/unit/run_unit_tests.hpp | 2 +- tests/unit/unit_test_main.cpp | 2 +- tests/unit/unit_tests.hpp | 2 +- 907 files changed, 909 insertions(+), 909 deletions(-) diff --git a/.github/workflows/builds-and-tests.yml b/.github/workflows/builds-and-tests.yml index a4e3d49690..8e918660c7 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. # diff --git a/.github/workflows/mfem-analysis.yml b/.github/workflows/mfem-analysis.yml index 94a597fcaa..840ebef992 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. # diff --git a/.github/workflows/mfem-sanitizer.yml b/.github/workflows/mfem-sanitizer.yml index 7370843703..3d340713f8 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. # diff --git a/.github/workflows/repo-check.yml b/.github/workflows/repo-check.yml index 994a9faf44..37b05e8e35 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. # 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..9c18075433 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. # 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/CMakeLists.txt b/CMakeLists.txt index e4440ac02b..6bd37563b5 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. # 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..b1a8f59c70 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. # @@ -35,8 +35,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 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/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/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 fe64ba91ae..2633cb0868 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/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 503b85620b..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. # 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..13886bab65 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. // diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index d4ffd4a376..5307847c60 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. // diff --git a/fem/bilinearform_ext.cpp b/fem/bilinearform_ext.cpp index d76fd1b293..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. // 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 cd371bd07e..2eb6e9095a 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. // diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index 18c33b544a..be36f4d9cf 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. // 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..9500094166 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. // 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..c912d3b23c 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. // diff --git a/fem/coefficient.hpp b/fem/coefficient.hpp index 568c9376f0..f38f805205 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. // 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..629b7b0b54 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. // 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 2083d1cd26..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. // diff --git a/fem/fe/fe_base.hpp b/fem/fe/fe_base.hpp index dcd7421f9a..dfe5169d72 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. // 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 e38d88640e..75a0e99074 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. // diff --git a/fem/fespace.hpp b/fem/fespace.hpp index ca4505fa24..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. // 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..f3cb3530fb 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. // diff --git a/fem/geom.hpp b/fem/geom.hpp index 67293e0482..b0bf0b4cbb 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. // diff --git a/fem/gridfunc.cpp b/fem/gridfunc.cpp index 310d8d7043..c5f3f753d7 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. // diff --git a/fem/gridfunc.hpp b/fem/gridfunc.hpp index d7cf303be5..266de113c5 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. // diff --git a/fem/gslib.cpp b/fem/gslib.cpp index 99f12fe355..356b4178a7 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. // 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..cb5adf2e80 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. // 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 fb5fa5555a..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. // 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 index 76f0397109..77b0e2e68c 100644 --- a/fem/integ/bilininteg_elasticity_ea.cpp +++ b/fem/integ/bilininteg_elasticity_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_elasticity_kernels.cpp b/fem/integ/bilininteg_elasticity_kernels.cpp index 59d278654d..314c01dfdd 100644 --- a/fem/integ/bilininteg_elasticity_kernels.cpp +++ b/fem/integ/bilininteg_elasticity_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_elasticity_kernels.hpp b/fem/integ/bilininteg_elasticity_kernels.hpp index 063705a652..4f3693a5fd 100644 --- a/fem/integ/bilininteg_elasticity_kernels.hpp +++ b/fem/integ/bilininteg_elasticity_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_elasticity_pa.cpp b/fem/integ/bilininteg_elasticity_pa.cpp index fdb377ec1d..ddbf283e42 100644 --- a/fem/integ/bilininteg_elasticity_pa.cpp +++ b/fem/integ/bilininteg_elasticity_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_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..398ecf28b7 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. // 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..3b39dcadbf 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. // 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..e6a601ed48 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. // 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..d3b94768bb 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. // 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..64d90e6b88 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. // diff --git a/fem/multigrid.hpp b/fem/multigrid.hpp index b97acb8bfb..13bca743f8 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. // diff --git a/fem/nonlinearform.cpp b/fem/nonlinearform.cpp index 88271e234a..662173847c 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. // diff --git a/fem/nonlinearform.hpp b/fem/nonlinearform.hpp index 77da539f7e..f98116719c 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. // 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..575d3d3a7f 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. // 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 6b1d0b600c..ffb448cabe 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. // diff --git a/fem/pfespace.hpp b/fem/pfespace.hpp index 63727a7bb5..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. // diff --git a/fem/pgridfunc.cpp b/fem/pgridfunc.cpp index e546093599..62c9dfb0d8 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. // diff --git a/fem/pgridfunc.hpp b/fem/pgridfunc.hpp index 58c6c02862..3850c71d93 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. // 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..6d09cb1d5f 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. // diff --git a/fem/qfunction.hpp b/fem/qfunction.hpp index 1b4f19f637..14f7c2208d 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. // diff --git a/fem/qinterp/det.cpp b/fem/qinterp/det.cpp index de1ef235d0..179db22ecb 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. // 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..5cfbb64be4 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. // diff --git a/fem/qspace.hpp b/fem/qspace.hpp index 7e4048ce21..ac5b00c1e0 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. // diff --git a/fem/quadinterpolator.cpp b/fem/quadinterpolator.cpp index 31c03a63a8..f1b9cfae75 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. // 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 f03829b2d2..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. // 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..abcd2168ab 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. // 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..72322caa9d 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. // 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..fab3041f0c 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. // 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..40fbebd846 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. // 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 34e797c064..67c3653c46 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..3fa79d7b1f 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. // 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..75de09aa32 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. // diff --git a/linalg/blockoperator.hpp b/linalg/blockoperator.hpp index c9f9c8e46a..7fce667f6d 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. // 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..07014d4055 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. // 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..6d9fdd4d9b 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. // 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..538e97d2a8 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. // diff --git a/linalg/operator.hpp b/linalg/operator.hpp index baa9bf7672..cb04c9ac26 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. // 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..6e01d29848 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. // 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..18a3fd460c 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. // diff --git a/linalg/sparsemat.cpp b/linalg/sparsemat.cpp index 6f1b0d6828..1f4289bb00 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. // diff --git a/linalg/sparsemat.hpp b/linalg/sparsemat.hpp index bc472739f0..a99dd4aea4 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. // 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..8d7896c25e 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. // 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..f57afa7563 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. // 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..03d76d9c83 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. // 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 9af4e040b7..2d2e3b4d2c 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 984080cff0..ce8dc7cf5a 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. // diff --git a/mesh/mesh.hpp b/mesh/mesh.hpp index 947f515caa..02a02dfc6a 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. // diff --git a/mesh/mesh_headers.hpp b/mesh/mesh_headers.hpp index d4d4f55ff6..00289c0de0 100644 --- a/mesh/mesh_headers.hpp +++ b/mesh/mesh_headers.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_operators.cpp b/mesh/mesh_operators.cpp index 6b70e28b2b..916d18a4b4 100644 --- a/mesh/mesh_operators.cpp +++ b/mesh/mesh_operators.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/mesh_operators.hpp b/mesh/mesh_operators.hpp index eff7af369e..7b448d0faf 100644 --- a/mesh/mesh_operators.hpp +++ b/mesh/mesh_operators.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_readers.cpp b/mesh/mesh_readers.cpp index 75ec3eec27..626e232439 100644 --- a/mesh/mesh_readers.cpp +++ b/mesh/mesh_readers.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/ncmesh.cpp b/mesh/ncmesh.cpp index 660cfdd1dd..885e740453 100644 --- a/mesh/ncmesh.cpp +++ b/mesh/ncmesh.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/ncmesh.hpp b/mesh/ncmesh.hpp index aa1542b3c4..dbf4566e4f 100644 --- a/mesh/ncmesh.hpp +++ b/mesh/ncmesh.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/ncmesh_tables.hpp b/mesh/ncmesh_tables.hpp index dbf67501b3..ae3958a64d 100644 --- a/mesh/ncmesh_tables.hpp +++ b/mesh/ncmesh_tables.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/nurbs.cpp b/mesh/nurbs.cpp index c6dd7f4cc4..2dc741aa80 100644 --- a/mesh/nurbs.cpp +++ b/mesh/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/mesh/nurbs.hpp b/mesh/nurbs.hpp index 905519e9c9..2d1792e24b 100644 --- a/mesh/nurbs.hpp +++ b/mesh/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/mesh/pmesh.cpp b/mesh/pmesh.cpp index b02cdf4c48..e9dd34f74e 100644 --- a/mesh/pmesh.cpp +++ b/mesh/pmesh.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/pmesh.hpp b/mesh/pmesh.hpp index ce5dbfbc28..dc9a19e212 100644 --- a/mesh/pmesh.hpp +++ b/mesh/pmesh.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/pncmesh.cpp b/mesh/pncmesh.cpp index 34d59e567d..13fadec028 100644 --- a/mesh/pncmesh.cpp +++ b/mesh/pncmesh.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/pncmesh.hpp b/mesh/pncmesh.hpp index 936c63de6a..2f4e1eb747 100644 --- a/mesh/pncmesh.hpp +++ b/mesh/pncmesh.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/point.cpp b/mesh/point.cpp index 473655b119..64272071c8 100644 --- a/mesh/point.cpp +++ b/mesh/point.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/point.hpp b/mesh/point.hpp index be00c9c841..5684498644 100644 --- a/mesh/point.hpp +++ b/mesh/point.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/pumi.cpp b/mesh/pumi.cpp index df4bebf197..74fb930cd7 100644 --- a/mesh/pumi.cpp +++ b/mesh/pumi.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/pumi.hpp b/mesh/pumi.hpp index f9a6f6c90f..cd5ce57eed 100644 --- a/mesh/pumi.hpp +++ b/mesh/pumi.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/pyramid.cpp b/mesh/pyramid.cpp index f64f2afe91..26a55029a1 100644 --- a/mesh/pyramid.cpp +++ b/mesh/pyramid.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/pyramid.hpp b/mesh/pyramid.hpp index e96a4d19ae..7cf43b52e8 100644 --- a/mesh/pyramid.hpp +++ b/mesh/pyramid.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/quadrilateral.cpp b/mesh/quadrilateral.cpp index 29fa3bbe19..63fe768d5d 100644 --- a/mesh/quadrilateral.cpp +++ b/mesh/quadrilateral.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/quadrilateral.hpp b/mesh/quadrilateral.hpp index a0dd6bd185..05120f865f 100644 --- a/mesh/quadrilateral.hpp +++ b/mesh/quadrilateral.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/segment.cpp b/mesh/segment.cpp index 910614770c..280644ee2c 100644 --- a/mesh/segment.cpp +++ b/mesh/segment.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/segment.hpp b/mesh/segment.hpp index 90cd65704c..8d22d9ff51 100644 --- a/mesh/segment.hpp +++ b/mesh/segment.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/submesh/psubmesh.cpp b/mesh/submesh/psubmesh.cpp index 201f252e90..3cd56c49f6 100644 --- a/mesh/submesh/psubmesh.cpp +++ b/mesh/submesh/psubmesh.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/submesh/psubmesh.hpp b/mesh/submesh/psubmesh.hpp index 651be62431..f388d80ff9 100644 --- a/mesh/submesh/psubmesh.hpp +++ b/mesh/submesh/psubmesh.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/submesh/ptransfermap.cpp b/mesh/submesh/ptransfermap.cpp index 7e2324668c..c47a349778 100644 --- a/mesh/submesh/ptransfermap.cpp +++ b/mesh/submesh/ptransfermap.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/submesh/ptransfermap.hpp b/mesh/submesh/ptransfermap.hpp index 683cc5bed6..54236ff92d 100644 --- a/mesh/submesh/ptransfermap.hpp +++ b/mesh/submesh/ptransfermap.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/submesh/submesh.cpp b/mesh/submesh/submesh.cpp index 33553f6386..b6383aa49f 100644 --- a/mesh/submesh/submesh.cpp +++ b/mesh/submesh/submesh.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/submesh/submesh.hpp b/mesh/submesh/submesh.hpp index 33ca72ea15..84ec58d0df 100644 --- a/mesh/submesh/submesh.hpp +++ b/mesh/submesh/submesh.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/submesh/submesh_utils.cpp b/mesh/submesh/submesh_utils.cpp index c9a021dfe2..adbe1f0100 100644 --- a/mesh/submesh/submesh_utils.cpp +++ b/mesh/submesh/submesh_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/mesh/submesh/submesh_utils.hpp b/mesh/submesh/submesh_utils.hpp index 2fc748c4df..61f4439120 100644 --- a/mesh/submesh/submesh_utils.hpp +++ b/mesh/submesh/submesh_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/mesh/submesh/transfer_category.hpp b/mesh/submesh/transfer_category.hpp index 870e274d2d..be7861f4c5 100644 --- a/mesh/submesh/transfer_category.hpp +++ b/mesh/submesh/transfer_category.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/submesh/transfermap.cpp b/mesh/submesh/transfermap.cpp index 1ddb8994c1..1a0b787232 100644 --- a/mesh/submesh/transfermap.cpp +++ b/mesh/submesh/transfermap.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/submesh/transfermap.hpp b/mesh/submesh/transfermap.hpp index f26013dd2f..757d2c5cd7 100644 --- a/mesh/submesh/transfermap.hpp +++ b/mesh/submesh/transfermap.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/tetrahedron.cpp b/mesh/tetrahedron.cpp index d094b70cd1..283b35f8a6 100644 --- a/mesh/tetrahedron.cpp +++ b/mesh/tetrahedron.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/tetrahedron.hpp b/mesh/tetrahedron.hpp index 80f1de4e02..2062c42ba0 100644 --- a/mesh/tetrahedron.hpp +++ b/mesh/tetrahedron.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/tmesh.hpp b/mesh/tmesh.hpp index 634f828dc9..2c27d9a1ad 100644 --- a/mesh/tmesh.hpp +++ b/mesh/tmesh.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/triangle.cpp b/mesh/triangle.cpp index eb7493398a..ed05f1d374 100644 --- a/mesh/triangle.cpp +++ b/mesh/triangle.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/triangle.hpp b/mesh/triangle.hpp index fafd8811be..7bfdb23efd 100644 --- a/mesh/triangle.hpp +++ b/mesh/triangle.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/vertex.cpp b/mesh/vertex.cpp index e5c1a57398..10c40f3736 100644 --- a/mesh/vertex.cpp +++ b/mesh/vertex.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/vertex.hpp b/mesh/vertex.hpp index 3267b904fa..f099c2ca78 100644 --- a/mesh/vertex.hpp +++ b/mesh/vertex.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/vtk.cpp b/mesh/vtk.cpp index 27ce9ffe87..7f796f57fc 100644 --- a/mesh/vtk.cpp +++ b/mesh/vtk.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/vtk.hpp b/mesh/vtk.hpp index 50eeea5bc7..d9b61d85b5 100644 --- a/mesh/vtk.hpp +++ b/mesh/vtk.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/wedge.cpp b/mesh/wedge.cpp index b1aea933d0..cc0a1b7932 100644 --- a/mesh/wedge.cpp +++ b/mesh/wedge.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/wedge.hpp b/mesh/wedge.hpp index e564913b4b..bfeb1edfe1 100644 --- a/mesh/wedge.hpp +++ b/mesh/wedge.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/mfem-performance.hpp b/mfem-performance.hpp index b254d74277..a15631bfa6 100644 --- a/mfem-performance.hpp +++ b/mfem-performance.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/mfem.hpp b/mfem.hpp index 56c7afadbf..bb4c8e116a 100644 --- a/mfem.hpp +++ b/mfem.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/miniapps/CMakeLists.txt b/miniapps/CMakeLists.txt index 6d2a538ac7..8caa17a793 100644 --- a/miniapps/CMakeLists.txt +++ b/miniapps/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/miniapps/adjoint/CMakeLists.txt b/miniapps/adjoint/CMakeLists.txt index 3461585bcc..15a2394be8 100644 --- a/miniapps/adjoint/CMakeLists.txt +++ b/miniapps/adjoint/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/miniapps/adjoint/adjoint_advection_diffusion.cpp b/miniapps/adjoint/adjoint_advection_diffusion.cpp index 7a43e90dba..37ace44474 100644 --- a/miniapps/adjoint/adjoint_advection_diffusion.cpp +++ b/miniapps/adjoint/adjoint_advection_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/miniapps/adjoint/cvsRoberts_ASAi_dns.cpp b/miniapps/adjoint/cvsRoberts_ASAi_dns.cpp index b44b3a0013..e0a732c0d1 100644 --- a/miniapps/adjoint/cvsRoberts_ASAi_dns.cpp +++ b/miniapps/adjoint/cvsRoberts_ASAi_dns.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/miniapps/adjoint/makefile b/miniapps/adjoint/makefile index da11e7936a..628744bf17 100644 --- a/miniapps/adjoint/makefile +++ b/miniapps/adjoint/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/miniapps/autodiff/CMakeLists.txt b/miniapps/autodiff/CMakeLists.txt index 1e1dbccf0b..7d30626da1 100644 --- a/miniapps/autodiff/CMakeLists.txt +++ b/miniapps/autodiff/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/miniapps/autodiff/admfem.hpp b/miniapps/autodiff/admfem.hpp index e605896b23..db889338fc 100644 --- a/miniapps/autodiff/admfem.hpp +++ b/miniapps/autodiff/admfem.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/miniapps/autodiff/example.hpp b/miniapps/autodiff/example.hpp index eb09d4d4fb..bcc569d061 100644 --- a/miniapps/autodiff/example.hpp +++ b/miniapps/autodiff/example.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/miniapps/autodiff/makefile b/miniapps/autodiff/makefile index cfd26e946c..0b98ce05d0 100644 --- a/miniapps/autodiff/makefile +++ b/miniapps/autodiff/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/miniapps/autodiff/par_example.cpp b/miniapps/autodiff/par_example.cpp index b66aff7cb4..0f01d8cf22 100644 --- a/miniapps/autodiff/par_example.cpp +++ b/miniapps/autodiff/par_example.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/miniapps/autodiff/seq_example.cpp b/miniapps/autodiff/seq_example.cpp index 23f2016785..bde4abf54f 100644 --- a/miniapps/autodiff/seq_example.cpp +++ b/miniapps/autodiff/seq_example.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/miniapps/autodiff/seq_test.cpp b/miniapps/autodiff/seq_test.cpp index 73dc423dea..5c1672d093 100644 --- a/miniapps/autodiff/seq_test.cpp +++ b/miniapps/autodiff/seq_test.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/miniapps/autodiff/taddensemat.hpp b/miniapps/autodiff/taddensemat.hpp index c2d548ee18..907010c0b5 100644 --- a/miniapps/autodiff/taddensemat.hpp +++ b/miniapps/autodiff/taddensemat.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/miniapps/autodiff/tadvector.hpp b/miniapps/autodiff/tadvector.hpp index 8425abb276..fdc329add9 100644 --- a/miniapps/autodiff/tadvector.hpp +++ b/miniapps/autodiff/tadvector.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/miniapps/common/CMakeLists.txt b/miniapps/common/CMakeLists.txt index d8ed62a5c3..9e13abdc60 100644 --- a/miniapps/common/CMakeLists.txt +++ b/miniapps/common/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/miniapps/common/dist_solver.cpp b/miniapps/common/dist_solver.cpp index b3f905bfed..1807869488 100644 --- a/miniapps/common/dist_solver.cpp +++ b/miniapps/common/dist_solver.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/miniapps/common/dist_solver.hpp b/miniapps/common/dist_solver.hpp index 8d63bd6e67..7bef7c8488 100644 --- a/miniapps/common/dist_solver.hpp +++ b/miniapps/common/dist_solver.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/miniapps/common/fem_extras.cpp b/miniapps/common/fem_extras.cpp index e8bccd5600..07a33d9864 100644 --- a/miniapps/common/fem_extras.cpp +++ b/miniapps/common/fem_extras.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/miniapps/common/fem_extras.hpp b/miniapps/common/fem_extras.hpp index 65d842d585..1202680b62 100644 --- a/miniapps/common/fem_extras.hpp +++ b/miniapps/common/fem_extras.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/miniapps/common/makefile b/miniapps/common/makefile index ccdfd89403..99a51ca023 100644 --- a/miniapps/common/makefile +++ b/miniapps/common/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/miniapps/common/mesh_extras.cpp b/miniapps/common/mesh_extras.cpp index 18ed147742..28aedf0140 100644 --- a/miniapps/common/mesh_extras.cpp +++ b/miniapps/common/mesh_extras.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/miniapps/common/mesh_extras.hpp b/miniapps/common/mesh_extras.hpp index fabb1c4a14..b7925c6bff 100644 --- a/miniapps/common/mesh_extras.hpp +++ b/miniapps/common/mesh_extras.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/miniapps/common/mfem-common.hpp b/miniapps/common/mfem-common.hpp index 4b6d0ec289..328e6f70ce 100644 --- a/miniapps/common/mfem-common.hpp +++ b/miniapps/common/mfem-common.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/miniapps/common/pfem_extras.cpp b/miniapps/common/pfem_extras.cpp index 2e8ef2a536..16dcdd63d6 100644 --- a/miniapps/common/pfem_extras.cpp +++ b/miniapps/common/pfem_extras.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/miniapps/common/pfem_extras.hpp b/miniapps/common/pfem_extras.hpp index 4e5ee87de3..af7a2bd3cf 100644 --- a/miniapps/common/pfem_extras.hpp +++ b/miniapps/common/pfem_extras.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/miniapps/dpg/CMakeLists.txt b/miniapps/dpg/CMakeLists.txt index 0ff42d1bd3..e3c2be13da 100644 --- a/miniapps/dpg/CMakeLists.txt +++ b/miniapps/dpg/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/miniapps/dpg/acoustics.cpp b/miniapps/dpg/acoustics.cpp index 299c2bd68e..823fce774b 100644 --- a/miniapps/dpg/acoustics.cpp +++ b/miniapps/dpg/acoustics.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/miniapps/dpg/convection-diffusion.cpp b/miniapps/dpg/convection-diffusion.cpp index 66f5e139ba..f3741c0f00 100644 --- a/miniapps/dpg/convection-diffusion.cpp +++ b/miniapps/dpg/convection-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/miniapps/dpg/diffusion.cpp b/miniapps/dpg/diffusion.cpp index 1a0115da2f..b5c78a010d 100644 --- a/miniapps/dpg/diffusion.cpp +++ b/miniapps/dpg/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/miniapps/dpg/makefile b/miniapps/dpg/makefile index c0da8a867f..ffa2f77b69 100644 --- a/miniapps/dpg/makefile +++ b/miniapps/dpg/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/miniapps/dpg/maxwell.cpp b/miniapps/dpg/maxwell.cpp index 5ae89e58a6..7d526700c1 100644 --- a/miniapps/dpg/maxwell.cpp +++ b/miniapps/dpg/maxwell.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/miniapps/dpg/pacoustics.cpp b/miniapps/dpg/pacoustics.cpp index bf2f871f7d..fe5949df71 100644 --- a/miniapps/dpg/pacoustics.cpp +++ b/miniapps/dpg/pacoustics.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/miniapps/dpg/pconvection-diffusion.cpp b/miniapps/dpg/pconvection-diffusion.cpp index b6d0d33dde..5835d5cd4e 100644 --- a/miniapps/dpg/pconvection-diffusion.cpp +++ b/miniapps/dpg/pconvection-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/miniapps/dpg/pdiffusion.cpp b/miniapps/dpg/pdiffusion.cpp index c3d5ba5b9f..2582305247 100644 --- a/miniapps/dpg/pdiffusion.cpp +++ b/miniapps/dpg/pdiffusion.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/miniapps/dpg/pmaxwell.cpp b/miniapps/dpg/pmaxwell.cpp index baa7890c78..02c52b99cf 100644 --- a/miniapps/dpg/pmaxwell.cpp +++ b/miniapps/dpg/pmaxwell.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/miniapps/dpg/util/blockstaticcond.cpp b/miniapps/dpg/util/blockstaticcond.cpp index 8bd36f8317..e6278c4cfb 100644 --- a/miniapps/dpg/util/blockstaticcond.cpp +++ b/miniapps/dpg/util/blockstaticcond.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/miniapps/dpg/util/blockstaticcond.hpp b/miniapps/dpg/util/blockstaticcond.hpp index 7fa20a73f7..0d179bd76c 100644 --- a/miniapps/dpg/util/blockstaticcond.hpp +++ b/miniapps/dpg/util/blockstaticcond.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/miniapps/dpg/util/complexstaticcond.cpp b/miniapps/dpg/util/complexstaticcond.cpp index 239e4b601c..6f602d8c49 100644 --- a/miniapps/dpg/util/complexstaticcond.cpp +++ b/miniapps/dpg/util/complexstaticcond.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/miniapps/dpg/util/complexstaticcond.hpp b/miniapps/dpg/util/complexstaticcond.hpp index f4c5df1ba0..1bcf59dd0e 100644 --- a/miniapps/dpg/util/complexstaticcond.hpp +++ b/miniapps/dpg/util/complexstaticcond.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/miniapps/dpg/util/complexweakform.cpp b/miniapps/dpg/util/complexweakform.cpp index f291290b5a..ef1a42cd35 100644 --- a/miniapps/dpg/util/complexweakform.cpp +++ b/miniapps/dpg/util/complexweakform.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/miniapps/dpg/util/complexweakform.hpp b/miniapps/dpg/util/complexweakform.hpp index 1e2473fdd1..208cf37ca1 100644 --- a/miniapps/dpg/util/complexweakform.hpp +++ b/miniapps/dpg/util/complexweakform.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/miniapps/dpg/util/pcomplexweakform.cpp b/miniapps/dpg/util/pcomplexweakform.cpp index cb3d43774e..c76281dfb4 100644 --- a/miniapps/dpg/util/pcomplexweakform.cpp +++ b/miniapps/dpg/util/pcomplexweakform.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/miniapps/dpg/util/pcomplexweakform.hpp b/miniapps/dpg/util/pcomplexweakform.hpp index 3891f5b986..976bb24872 100644 --- a/miniapps/dpg/util/pcomplexweakform.hpp +++ b/miniapps/dpg/util/pcomplexweakform.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/miniapps/dpg/util/pml.cpp b/miniapps/dpg/util/pml.cpp index 0e1edd4f83..ef4d9393d5 100644 --- a/miniapps/dpg/util/pml.cpp +++ b/miniapps/dpg/util/pml.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/miniapps/dpg/util/pml.hpp b/miniapps/dpg/util/pml.hpp index 507a2e99b8..4a3d9bbe36 100644 --- a/miniapps/dpg/util/pml.hpp +++ b/miniapps/dpg/util/pml.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/miniapps/dpg/util/pweakform.cpp b/miniapps/dpg/util/pweakform.cpp index d30e26bff5..91a9ed4ef7 100644 --- a/miniapps/dpg/util/pweakform.cpp +++ b/miniapps/dpg/util/pweakform.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/miniapps/dpg/util/pweakform.hpp b/miniapps/dpg/util/pweakform.hpp index 83602dbed0..992563b788 100644 --- a/miniapps/dpg/util/pweakform.hpp +++ b/miniapps/dpg/util/pweakform.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/miniapps/dpg/util/weakform.cpp b/miniapps/dpg/util/weakform.cpp index 94a3582dc3..dcfb3ad604 100644 --- a/miniapps/dpg/util/weakform.cpp +++ b/miniapps/dpg/util/weakform.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/miniapps/dpg/util/weakform.hpp b/miniapps/dpg/util/weakform.hpp index bbee40ebb6..029555ca2e 100644 --- a/miniapps/dpg/util/weakform.hpp +++ b/miniapps/dpg/util/weakform.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/miniapps/electromagnetics/CMakeLists.txt b/miniapps/electromagnetics/CMakeLists.txt index f72c6f13c7..22af46c1b4 100644 --- a/miniapps/electromagnetics/CMakeLists.txt +++ b/miniapps/electromagnetics/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/miniapps/electromagnetics/electromagnetics.hpp b/miniapps/electromagnetics/electromagnetics.hpp index 10566fec94..e739c3446a 100644 --- a/miniapps/electromagnetics/electromagnetics.hpp +++ b/miniapps/electromagnetics/electromagnetics.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/miniapps/electromagnetics/joule.cpp b/miniapps/electromagnetics/joule.cpp index 8f2e68fc3d..d8f0fe8b42 100644 --- a/miniapps/electromagnetics/joule.cpp +++ b/miniapps/electromagnetics/joule.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/miniapps/electromagnetics/joule_solver.cpp b/miniapps/electromagnetics/joule_solver.cpp index a10e5ed9f3..77a96ba23d 100644 --- a/miniapps/electromagnetics/joule_solver.cpp +++ b/miniapps/electromagnetics/joule_solver.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/miniapps/electromagnetics/joule_solver.hpp b/miniapps/electromagnetics/joule_solver.hpp index a8568da6d3..dc778cb0d2 100644 --- a/miniapps/electromagnetics/joule_solver.hpp +++ b/miniapps/electromagnetics/joule_solver.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/miniapps/electromagnetics/makefile b/miniapps/electromagnetics/makefile index aaf73517a1..51631aa3eb 100644 --- a/miniapps/electromagnetics/makefile +++ b/miniapps/electromagnetics/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/miniapps/electromagnetics/maxwell.cpp b/miniapps/electromagnetics/maxwell.cpp index 2b939263b8..f7af66592f 100644 --- a/miniapps/electromagnetics/maxwell.cpp +++ b/miniapps/electromagnetics/maxwell.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/miniapps/electromagnetics/maxwell_solver.cpp b/miniapps/electromagnetics/maxwell_solver.cpp index 57c28fb1eb..0d9dafcca4 100644 --- a/miniapps/electromagnetics/maxwell_solver.cpp +++ b/miniapps/electromagnetics/maxwell_solver.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/miniapps/electromagnetics/maxwell_solver.hpp b/miniapps/electromagnetics/maxwell_solver.hpp index 772e2eab18..bcb508a496 100644 --- a/miniapps/electromagnetics/maxwell_solver.hpp +++ b/miniapps/electromagnetics/maxwell_solver.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/miniapps/electromagnetics/tesla.cpp b/miniapps/electromagnetics/tesla.cpp index b1ec72f6b6..ddb55efda6 100644 --- a/miniapps/electromagnetics/tesla.cpp +++ b/miniapps/electromagnetics/tesla.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/miniapps/electromagnetics/tesla_solver.cpp b/miniapps/electromagnetics/tesla_solver.cpp index 7c63f702d8..d939fff37a 100644 --- a/miniapps/electromagnetics/tesla_solver.cpp +++ b/miniapps/electromagnetics/tesla_solver.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/miniapps/electromagnetics/tesla_solver.hpp b/miniapps/electromagnetics/tesla_solver.hpp index e5d34447cb..2590a3e0d6 100644 --- a/miniapps/electromagnetics/tesla_solver.hpp +++ b/miniapps/electromagnetics/tesla_solver.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/miniapps/electromagnetics/volta.cpp b/miniapps/electromagnetics/volta.cpp index 8e5ba2f574..cf7feb4bf3 100644 --- a/miniapps/electromagnetics/volta.cpp +++ b/miniapps/electromagnetics/volta.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/miniapps/electromagnetics/volta_solver.cpp b/miniapps/electromagnetics/volta_solver.cpp index a84e181616..03dc6f1870 100644 --- a/miniapps/electromagnetics/volta_solver.cpp +++ b/miniapps/electromagnetics/volta_solver.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/miniapps/electromagnetics/volta_solver.hpp b/miniapps/electromagnetics/volta_solver.hpp index c5d1667e78..cbf687a255 100644 --- a/miniapps/electromagnetics/volta_solver.hpp +++ b/miniapps/electromagnetics/volta_solver.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/miniapps/gslib/CMakeLists.txt b/miniapps/gslib/CMakeLists.txt index bc063eee28..4130f12069 100644 --- a/miniapps/gslib/CMakeLists.txt +++ b/miniapps/gslib/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/miniapps/gslib/field-diff.cpp b/miniapps/gslib/field-diff.cpp index 54de4572ab..4d6374b8c6 100644 --- a/miniapps/gslib/field-diff.cpp +++ b/miniapps/gslib/field-diff.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/miniapps/gslib/field-interp.cpp b/miniapps/gslib/field-interp.cpp index a3432223b7..c142a40287 100644 --- a/miniapps/gslib/field-interp.cpp +++ b/miniapps/gslib/field-interp.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/miniapps/gslib/findpts.cpp b/miniapps/gslib/findpts.cpp index d7fc2d8f3a..aaca4cba05 100644 --- a/miniapps/gslib/findpts.cpp +++ b/miniapps/gslib/findpts.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/miniapps/gslib/makefile b/miniapps/gslib/makefile index 813e675909..b3862dab4f 100644 --- a/miniapps/gslib/makefile +++ b/miniapps/gslib/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/miniapps/gslib/pfindpts.cpp b/miniapps/gslib/pfindpts.cpp index 9fc4642e18..cf6ebaa78f 100644 --- a/miniapps/gslib/pfindpts.cpp +++ b/miniapps/gslib/pfindpts.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/miniapps/gslib/schwarz_ex1.cpp b/miniapps/gslib/schwarz_ex1.cpp index 04a53e5ad0..3fee061f76 100644 --- a/miniapps/gslib/schwarz_ex1.cpp +++ b/miniapps/gslib/schwarz_ex1.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/miniapps/gslib/schwarz_ex1p.cpp b/miniapps/gslib/schwarz_ex1p.cpp index af457cf1a1..fd83d6d066 100644 --- a/miniapps/gslib/schwarz_ex1p.cpp +++ b/miniapps/gslib/schwarz_ex1p.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/miniapps/hdiv-linear-solver/CMakeLists.txt b/miniapps/hdiv-linear-solver/CMakeLists.txt index 337f136f76..93ea8514d6 100644 --- a/miniapps/hdiv-linear-solver/CMakeLists.txt +++ b/miniapps/hdiv-linear-solver/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/miniapps/hdiv-linear-solver/change_basis.cpp b/miniapps/hdiv-linear-solver/change_basis.cpp index f54a0e5048..ee8dacc817 100644 --- a/miniapps/hdiv-linear-solver/change_basis.cpp +++ b/miniapps/hdiv-linear-solver/change_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/miniapps/hdiv-linear-solver/change_basis.hpp b/miniapps/hdiv-linear-solver/change_basis.hpp index 9005117ccd..07f328c3bf 100644 --- a/miniapps/hdiv-linear-solver/change_basis.hpp +++ b/miniapps/hdiv-linear-solver/change_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/miniapps/hdiv-linear-solver/darcy.cpp b/miniapps/hdiv-linear-solver/darcy.cpp index 4548e00b3e..28e78f849b 100644 --- a/miniapps/hdiv-linear-solver/darcy.cpp +++ b/miniapps/hdiv-linear-solver/darcy.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/miniapps/hdiv-linear-solver/discrete_divergence.cpp b/miniapps/hdiv-linear-solver/discrete_divergence.cpp index 93a841e0f5..7b4eb9e4f2 100644 --- a/miniapps/hdiv-linear-solver/discrete_divergence.cpp +++ b/miniapps/hdiv-linear-solver/discrete_divergence.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/miniapps/hdiv-linear-solver/discrete_divergence.hpp b/miniapps/hdiv-linear-solver/discrete_divergence.hpp index a498f66ecd..74b218a351 100644 --- a/miniapps/hdiv-linear-solver/discrete_divergence.hpp +++ b/miniapps/hdiv-linear-solver/discrete_divergence.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/miniapps/hdiv-linear-solver/grad_div.cpp b/miniapps/hdiv-linear-solver/grad_div.cpp index 42895380d7..5b4f310905 100644 --- a/miniapps/hdiv-linear-solver/grad_div.cpp +++ b/miniapps/hdiv-linear-solver/grad_div.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/miniapps/hdiv-linear-solver/hdiv_linear_solver.cpp b/miniapps/hdiv-linear-solver/hdiv_linear_solver.cpp index 70f9c70b8f..8bc9afa53b 100644 --- a/miniapps/hdiv-linear-solver/hdiv_linear_solver.cpp +++ b/miniapps/hdiv-linear-solver/hdiv_linear_solver.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/miniapps/hdiv-linear-solver/hdiv_linear_solver.hpp b/miniapps/hdiv-linear-solver/hdiv_linear_solver.hpp index ae3a9b6352..9406e76fca 100644 --- a/miniapps/hdiv-linear-solver/hdiv_linear_solver.hpp +++ b/miniapps/hdiv-linear-solver/hdiv_linear_solver.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/miniapps/hdiv-linear-solver/makefile b/miniapps/hdiv-linear-solver/makefile index e2cf35399d..0d2aea31ef 100644 --- a/miniapps/hdiv-linear-solver/makefile +++ b/miniapps/hdiv-linear-solver/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/miniapps/hooke/CMakeLists.txt b/miniapps/hooke/CMakeLists.txt index 3da53e7c09..98b17ae1cc 100644 --- a/miniapps/hooke/CMakeLists.txt +++ b/miniapps/hooke/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/miniapps/hooke/hooke.cpp b/miniapps/hooke/hooke.cpp index 490f6a85ce..ca20e3b204 100644 --- a/miniapps/hooke/hooke.cpp +++ b/miniapps/hooke/hooke.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/miniapps/hooke/kernels/elasticity_kernels.hpp b/miniapps/hooke/kernels/elasticity_kernels.hpp index c8726710d4..0e88f9b452 100644 --- a/miniapps/hooke/kernels/elasticity_kernels.hpp +++ b/miniapps/hooke/kernels/elasticity_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/miniapps/hooke/kernels/kernel_helpers.hpp b/miniapps/hooke/kernels/kernel_helpers.hpp index da88a20787..24ca4b3833 100644 --- a/miniapps/hooke/kernels/kernel_helpers.hpp +++ b/miniapps/hooke/kernels/kernel_helpers.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/miniapps/hooke/makefile b/miniapps/hooke/makefile index bed5354a2d..2a9a8096ea 100644 --- a/miniapps/hooke/makefile +++ b/miniapps/hooke/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/miniapps/hooke/materials/gradient_type.hpp b/miniapps/hooke/materials/gradient_type.hpp index 1df9a5385b..a3381a60e0 100644 --- a/miniapps/hooke/materials/gradient_type.hpp +++ b/miniapps/hooke/materials/gradient_type.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/miniapps/hooke/materials/linear_elastic.hpp b/miniapps/hooke/materials/linear_elastic.hpp index c3ab8cb1c7..56548d22ef 100644 --- a/miniapps/hooke/materials/linear_elastic.hpp +++ b/miniapps/hooke/materials/linear_elastic.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/miniapps/hooke/materials/neohookean.hpp b/miniapps/hooke/materials/neohookean.hpp index 35fbfd7336..430f32b604 100644 --- a/miniapps/hooke/materials/neohookean.hpp +++ b/miniapps/hooke/materials/neohookean.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/miniapps/hooke/operators/elasticity_gradient_operator.cpp b/miniapps/hooke/operators/elasticity_gradient_operator.cpp index a24fc99b4d..1a6d2cd9f6 100644 --- a/miniapps/hooke/operators/elasticity_gradient_operator.cpp +++ b/miniapps/hooke/operators/elasticity_gradient_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/miniapps/hooke/operators/elasticity_gradient_operator.hpp b/miniapps/hooke/operators/elasticity_gradient_operator.hpp index 37e936f739..b371ca6fc2 100644 --- a/miniapps/hooke/operators/elasticity_gradient_operator.hpp +++ b/miniapps/hooke/operators/elasticity_gradient_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/miniapps/hooke/operators/elasticity_operator.cpp b/miniapps/hooke/operators/elasticity_operator.cpp index 839b55b9d8..a93a772f84 100644 --- a/miniapps/hooke/operators/elasticity_operator.cpp +++ b/miniapps/hooke/operators/elasticity_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/miniapps/hooke/operators/elasticity_operator.hpp b/miniapps/hooke/operators/elasticity_operator.hpp index fed3bea04d..3b861a855e 100644 --- a/miniapps/hooke/operators/elasticity_operator.hpp +++ b/miniapps/hooke/operators/elasticity_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/miniapps/hooke/preconditioners/diagonal_preconditioner.cpp b/miniapps/hooke/preconditioners/diagonal_preconditioner.cpp index 7a6bba59c1..3f50be99de 100644 --- a/miniapps/hooke/preconditioners/diagonal_preconditioner.cpp +++ b/miniapps/hooke/preconditioners/diagonal_preconditioner.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/miniapps/hooke/preconditioners/diagonal_preconditioner.hpp b/miniapps/hooke/preconditioners/diagonal_preconditioner.hpp index 059e9081d3..3cd47b1207 100644 --- a/miniapps/hooke/preconditioners/diagonal_preconditioner.hpp +++ b/miniapps/hooke/preconditioners/diagonal_preconditioner.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/miniapps/meshing/CMakeLists.txt b/miniapps/meshing/CMakeLists.txt index 1f242b8a4e..f858209592 100644 --- a/miniapps/meshing/CMakeLists.txt +++ b/miniapps/meshing/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/miniapps/meshing/extruder.cpp b/miniapps/meshing/extruder.cpp index 7047d83f34..d9aadf136d 100644 --- a/miniapps/meshing/extruder.cpp +++ b/miniapps/meshing/extruder.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/miniapps/meshing/fit-node-position.cpp b/miniapps/meshing/fit-node-position.cpp index e43cf6d74d..a6b1b76079 100644 --- a/miniapps/meshing/fit-node-position.cpp +++ b/miniapps/meshing/fit-node-position.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/miniapps/meshing/klein-bottle.cpp b/miniapps/meshing/klein-bottle.cpp index f9a09c1e1c..79994d4d7f 100644 --- a/miniapps/meshing/klein-bottle.cpp +++ b/miniapps/meshing/klein-bottle.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/miniapps/meshing/makefile b/miniapps/meshing/makefile index 1ccec0455c..7510d88925 100644 --- a/miniapps/meshing/makefile +++ b/miniapps/meshing/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/miniapps/meshing/mesh-explorer.cpp b/miniapps/meshing/mesh-explorer.cpp index f05e18e831..925371f7f1 100644 --- a/miniapps/meshing/mesh-explorer.cpp +++ b/miniapps/meshing/mesh-explorer.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/miniapps/meshing/mesh-fitting.hpp b/miniapps/meshing/mesh-fitting.hpp index 7c4214c66e..2b0eaed72c 100644 --- a/miniapps/meshing/mesh-fitting.hpp +++ b/miniapps/meshing/mesh-fitting.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/miniapps/meshing/mesh-optimizer.cpp b/miniapps/meshing/mesh-optimizer.cpp index b0fc2db046..557af02303 100644 --- a/miniapps/meshing/mesh-optimizer.cpp +++ b/miniapps/meshing/mesh-optimizer.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/miniapps/meshing/mesh-optimizer.hpp b/miniapps/meshing/mesh-optimizer.hpp index 3fda5b09a2..ba74d384b8 100644 --- a/miniapps/meshing/mesh-optimizer.hpp +++ b/miniapps/meshing/mesh-optimizer.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/miniapps/meshing/mesh-quality.cpp b/miniapps/meshing/mesh-quality.cpp index d9c6d809e5..4387c85859 100644 --- a/miniapps/meshing/mesh-quality.cpp +++ b/miniapps/meshing/mesh-quality.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/miniapps/meshing/minimal-surface.cpp b/miniapps/meshing/minimal-surface.cpp index e3ce40e690..22511d77de 100644 --- a/miniapps/meshing/minimal-surface.cpp +++ b/miniapps/meshing/minimal-surface.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/miniapps/meshing/mobius-strip.cpp b/miniapps/meshing/mobius-strip.cpp index a4b6369679..916ca48a19 100644 --- a/miniapps/meshing/mobius-strip.cpp +++ b/miniapps/meshing/mobius-strip.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/miniapps/meshing/pmesh-fitting.cpp b/miniapps/meshing/pmesh-fitting.cpp index e4c562d552..29df4d1ad2 100644 --- a/miniapps/meshing/pmesh-fitting.cpp +++ b/miniapps/meshing/pmesh-fitting.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/miniapps/meshing/pmesh-optimizer.cpp b/miniapps/meshing/pmesh-optimizer.cpp index affaaec2a4..d371416feb 100644 --- a/miniapps/meshing/pmesh-optimizer.cpp +++ b/miniapps/meshing/pmesh-optimizer.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/miniapps/meshing/pminimal-surface.cpp b/miniapps/meshing/pminimal-surface.cpp index 026622c2aa..80182fc977 100644 --- a/miniapps/meshing/pminimal-surface.cpp +++ b/miniapps/meshing/pminimal-surface.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/miniapps/meshing/polar-nc.cpp b/miniapps/meshing/polar-nc.cpp index ad13370546..1d97313101 100644 --- a/miniapps/meshing/polar-nc.cpp +++ b/miniapps/meshing/polar-nc.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/miniapps/meshing/reflector.cpp b/miniapps/meshing/reflector.cpp index a730fda67a..e941194401 100644 --- a/miniapps/meshing/reflector.cpp +++ b/miniapps/meshing/reflector.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/miniapps/meshing/shaper.cpp b/miniapps/meshing/shaper.cpp index 50a250a1ee..def8e7fa1c 100644 --- a/miniapps/meshing/shaper.cpp +++ b/miniapps/meshing/shaper.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/miniapps/meshing/toroid.cpp b/miniapps/meshing/toroid.cpp index 7c2271ecb8..bc96f49b8e 100644 --- a/miniapps/meshing/toroid.cpp +++ b/miniapps/meshing/toroid.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/miniapps/meshing/trimmer.cpp b/miniapps/meshing/trimmer.cpp index db31acda5a..99896dc1df 100644 --- a/miniapps/meshing/trimmer.cpp +++ b/miniapps/meshing/trimmer.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/miniapps/meshing/twist.cpp b/miniapps/meshing/twist.cpp index 6e7309b2c4..9ce60a2325 100644 --- a/miniapps/meshing/twist.cpp +++ b/miniapps/meshing/twist.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/miniapps/mtop/CMakeLists.txt b/miniapps/mtop/CMakeLists.txt index 3cff515ebd..4462a7d3b5 100644 --- a/miniapps/mtop/CMakeLists.txt +++ b/miniapps/mtop/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/miniapps/mtop/makefile b/miniapps/mtop/makefile index e57dcc0fe9..e3701ece5f 100644 --- a/miniapps/mtop/makefile +++ b/miniapps/mtop/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/miniapps/mtop/mtop_integrators.cpp b/miniapps/mtop/mtop_integrators.cpp index 48fde8bc73..68499be14c 100644 --- a/miniapps/mtop/mtop_integrators.cpp +++ b/miniapps/mtop/mtop_integrators.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/miniapps/mtop/mtop_integrators.hpp b/miniapps/mtop/mtop_integrators.hpp index 3c20f9402f..384156df90 100644 --- a/miniapps/mtop/mtop_integrators.hpp +++ b/miniapps/mtop/mtop_integrators.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/miniapps/mtop/paramnonlinearform.cpp b/miniapps/mtop/paramnonlinearform.cpp index e988e6feee..c8725605fc 100644 --- a/miniapps/mtop/paramnonlinearform.cpp +++ b/miniapps/mtop/paramnonlinearform.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/miniapps/mtop/paramnonlinearform.hpp b/miniapps/mtop/paramnonlinearform.hpp index a40ea6f116..00f2690e0c 100644 --- a/miniapps/mtop/paramnonlinearform.hpp +++ b/miniapps/mtop/paramnonlinearform.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/miniapps/mtop/parheat.cpp b/miniapps/mtop/parheat.cpp index ab7afab260..d501b10ecc 100644 --- a/miniapps/mtop/parheat.cpp +++ b/miniapps/mtop/parheat.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/miniapps/mtop/pparamnonlinearform.cpp b/miniapps/mtop/pparamnonlinearform.cpp index 691a758d52..4fcb851429 100644 --- a/miniapps/mtop/pparamnonlinearform.cpp +++ b/miniapps/mtop/pparamnonlinearform.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/miniapps/mtop/pparamnonlinearform.hpp b/miniapps/mtop/pparamnonlinearform.hpp index c8acd05e41..0cbbc87e99 100644 --- a/miniapps/mtop/pparamnonlinearform.hpp +++ b/miniapps/mtop/pparamnonlinearform.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/miniapps/mtop/seqheat.cpp b/miniapps/mtop/seqheat.cpp index 412c1ca431..ad6e5877c5 100644 --- a/miniapps/mtop/seqheat.cpp +++ b/miniapps/mtop/seqheat.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/miniapps/multidomain/CMakeLists.txt b/miniapps/multidomain/CMakeLists.txt index 38894356ae..b03577d146 100644 --- a/miniapps/multidomain/CMakeLists.txt +++ b/miniapps/multidomain/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/miniapps/multidomain/makefile b/miniapps/multidomain/makefile index cfa7590e89..3aa3731c44 100644 --- a/miniapps/multidomain/makefile +++ b/miniapps/multidomain/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/miniapps/multidomain/multidomain.cpp b/miniapps/multidomain/multidomain.cpp index 83ebb98133..332e535915 100644 --- a/miniapps/multidomain/multidomain.cpp +++ b/miniapps/multidomain/multidomain.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/miniapps/navier/CMakeLists.txt b/miniapps/navier/CMakeLists.txt index 2ee6c6283a..0aa79f8d0d 100644 --- a/miniapps/navier/CMakeLists.txt +++ b/miniapps/navier/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/miniapps/navier/makefile b/miniapps/navier/makefile index b5fd998702..0aca3a09ad 100644 --- a/miniapps/navier/makefile +++ b/miniapps/navier/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/miniapps/navier/navier_3dfoc.cpp b/miniapps/navier/navier_3dfoc.cpp index 3aa0fcfd36..b021358266 100644 --- a/miniapps/navier/navier_3dfoc.cpp +++ b/miniapps/navier/navier_3dfoc.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/miniapps/navier/navier_cht.cpp b/miniapps/navier/navier_cht.cpp index 1a459f21ae..db269b7e25 100644 --- a/miniapps/navier/navier_cht.cpp +++ b/miniapps/navier/navier_cht.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/miniapps/navier/navier_kovasznay.cpp b/miniapps/navier/navier_kovasznay.cpp index 0a7f017f1a..290e475f8f 100644 --- a/miniapps/navier/navier_kovasznay.cpp +++ b/miniapps/navier/navier_kovasznay.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/miniapps/navier/navier_kovasznay_vs.cpp b/miniapps/navier/navier_kovasznay_vs.cpp index fdf529c2ef..f574ff02d8 100644 --- a/miniapps/navier/navier_kovasznay_vs.cpp +++ b/miniapps/navier/navier_kovasznay_vs.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/miniapps/navier/navier_mms.cpp b/miniapps/navier/navier_mms.cpp index ef1de1f4ab..15829348b6 100644 --- a/miniapps/navier/navier_mms.cpp +++ b/miniapps/navier/navier_mms.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/miniapps/navier/navier_shear.cpp b/miniapps/navier/navier_shear.cpp index 3e8e6db05e..4a28b1e211 100644 --- a/miniapps/navier/navier_shear.cpp +++ b/miniapps/navier/navier_shear.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/miniapps/navier/navier_solver.cpp b/miniapps/navier/navier_solver.cpp index 04052a0e26..b9886125b8 100644 --- a/miniapps/navier/navier_solver.cpp +++ b/miniapps/navier/navier_solver.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/miniapps/navier/navier_solver.hpp b/miniapps/navier/navier_solver.hpp index aef1def980..32a6517e74 100644 --- a/miniapps/navier/navier_solver.hpp +++ b/miniapps/navier/navier_solver.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/miniapps/navier/navier_tgv.cpp b/miniapps/navier/navier_tgv.cpp index ceb2a26eb0..f782630a13 100644 --- a/miniapps/navier/navier_tgv.cpp +++ b/miniapps/navier/navier_tgv.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/miniapps/navier/navier_turbchan.cpp b/miniapps/navier/navier_turbchan.cpp index 9a32d7382a..c0f0fc9962 100644 --- a/miniapps/navier/navier_turbchan.cpp +++ b/miniapps/navier/navier_turbchan.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/miniapps/nurbs/CMakeLists.txt b/miniapps/nurbs/CMakeLists.txt index 20d5e38353..9666afd457 100644 --- a/miniapps/nurbs/CMakeLists.txt +++ b/miniapps/nurbs/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/miniapps/nurbs/makefile b/miniapps/nurbs/makefile index b160c8ec8d..b5ae8adc49 100644 --- a/miniapps/nurbs/makefile +++ b/miniapps/nurbs/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/miniapps/nurbs/nurbs_curveint.cpp b/miniapps/nurbs/nurbs_curveint.cpp index 5afa2924f0..76b2fe9419 100644 --- a/miniapps/nurbs/nurbs_curveint.cpp +++ b/miniapps/nurbs/nurbs_curveint.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/miniapps/parelag/CMakeLists.txt b/miniapps/parelag/CMakeLists.txt index c05ed636d7..2a00ec0b38 100644 --- a/miniapps/parelag/CMakeLists.txt +++ b/miniapps/parelag/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/miniapps/parelag/MultilevelHcurlHdivSolver.cpp b/miniapps/parelag/MultilevelHcurlHdivSolver.cpp index c227c1d456..7a8f6f829d 100644 --- a/miniapps/parelag/MultilevelHcurlHdivSolver.cpp +++ b/miniapps/parelag/MultilevelHcurlHdivSolver.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/miniapps/parelag/makefile b/miniapps/parelag/makefile index 6395d4e084..e2fad74c8b 100644 --- a/miniapps/parelag/makefile +++ b/miniapps/parelag/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/miniapps/performance/CMakeLists.txt b/miniapps/performance/CMakeLists.txt index e7bb650c9d..34a10095bb 100644 --- a/miniapps/performance/CMakeLists.txt +++ b/miniapps/performance/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/miniapps/performance/makefile b/miniapps/performance/makefile index f74a7f6b19..e306479cd1 100644 --- a/miniapps/performance/makefile +++ b/miniapps/performance/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/miniapps/shifted/CMakeLists.txt b/miniapps/shifted/CMakeLists.txt index b7f6ba3c8e..ccba6e9854 100644 --- a/miniapps/shifted/CMakeLists.txt +++ b/miniapps/shifted/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/miniapps/shifted/diffusion.cpp b/miniapps/shifted/diffusion.cpp index 2c94e7094e..7efa653a90 100644 --- a/miniapps/shifted/diffusion.cpp +++ b/miniapps/shifted/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/miniapps/shifted/distance.cpp b/miniapps/shifted/distance.cpp index 63350a7391..dc1f1cd003 100644 --- a/miniapps/shifted/distance.cpp +++ b/miniapps/shifted/distance.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/miniapps/shifted/extrapolate.cpp b/miniapps/shifted/extrapolate.cpp index 4f609f1988..9ad581f706 100644 --- a/miniapps/shifted/extrapolate.cpp +++ b/miniapps/shifted/extrapolate.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/miniapps/shifted/extrapolator.cpp b/miniapps/shifted/extrapolator.cpp index e097c5c4db..18b85309dc 100644 --- a/miniapps/shifted/extrapolator.cpp +++ b/miniapps/shifted/extrapolator.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/miniapps/shifted/extrapolator.hpp b/miniapps/shifted/extrapolator.hpp index 93c1bc0f2b..fe22f0059c 100644 --- a/miniapps/shifted/extrapolator.hpp +++ b/miniapps/shifted/extrapolator.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/miniapps/shifted/lsf_integral.cpp b/miniapps/shifted/lsf_integral.cpp index 3e95cb5df0..010ed37771 100644 --- a/miniapps/shifted/lsf_integral.cpp +++ b/miniapps/shifted/lsf_integral.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/miniapps/shifted/makefile b/miniapps/shifted/makefile index 225eba4f68..1a80248657 100644 --- a/miniapps/shifted/makefile +++ b/miniapps/shifted/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/miniapps/shifted/marking.cpp b/miniapps/shifted/marking.cpp index 2eec9bec14..bab469b48c 100644 --- a/miniapps/shifted/marking.cpp +++ b/miniapps/shifted/marking.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/miniapps/shifted/marking.hpp b/miniapps/shifted/marking.hpp index b4990ae636..2778c4f5cc 100644 --- a/miniapps/shifted/marking.hpp +++ b/miniapps/shifted/marking.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/miniapps/shifted/sbm_aux.hpp b/miniapps/shifted/sbm_aux.hpp index c97d3dea2f..c4ba02d9ce 100644 --- a/miniapps/shifted/sbm_aux.hpp +++ b/miniapps/shifted/sbm_aux.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/miniapps/shifted/sbm_solver.cpp b/miniapps/shifted/sbm_solver.cpp index 5fa9d6ccfb..0f70eec5e9 100644 --- a/miniapps/shifted/sbm_solver.cpp +++ b/miniapps/shifted/sbm_solver.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/miniapps/shifted/sbm_solver.hpp b/miniapps/shifted/sbm_solver.hpp index b9a3da28f8..cd2561a194 100644 --- a/miniapps/shifted/sbm_solver.hpp +++ b/miniapps/shifted/sbm_solver.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/miniapps/solvers/CMakeLists.txt b/miniapps/solvers/CMakeLists.txt index 259f0605ee..2d0ebcdf6e 100644 --- a/miniapps/solvers/CMakeLists.txt +++ b/miniapps/solvers/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/miniapps/solvers/block-solvers.cpp b/miniapps/solvers/block-solvers.cpp index a46f87af95..719ecb0d11 100644 --- a/miniapps/solvers/block-solvers.cpp +++ b/miniapps/solvers/block-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/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index 978abbcc40..f93e5f17aa 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.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/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index ad16c2c45a..fd86e3a906 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.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/miniapps/solvers/lor_mms.hpp b/miniapps/solvers/lor_mms.hpp index 1d87bfc7b8..135a6c1d17 100644 --- a/miniapps/solvers/lor_mms.hpp +++ b/miniapps/solvers/lor_mms.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/miniapps/solvers/lor_solvers.cpp b/miniapps/solvers/lor_solvers.cpp index a12816b8aa..0ff96d9aa3 100644 --- a/miniapps/solvers/lor_solvers.cpp +++ b/miniapps/solvers/lor_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/miniapps/solvers/makefile b/miniapps/solvers/makefile index 4ea85c5bbf..eed1305a96 100644 --- a/miniapps/solvers/makefile +++ b/miniapps/solvers/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/miniapps/solvers/plor_solvers.cpp b/miniapps/solvers/plor_solvers.cpp index 54e9a2d898..27908cc08f 100644 --- a/miniapps/solvers/plor_solvers.cpp +++ b/miniapps/solvers/plor_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/miniapps/spde/CMakeLists.txt b/miniapps/spde/CMakeLists.txt index 9982508ff3..a62c4042ba 100644 --- a/miniapps/spde/CMakeLists.txt +++ b/miniapps/spde/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/miniapps/spde/generate_random_field.cpp b/miniapps/spde/generate_random_field.cpp index 3067a13b6a..991455640f 100644 --- a/miniapps/spde/generate_random_field.cpp +++ b/miniapps/spde/generate_random_field.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/miniapps/spde/makefile b/miniapps/spde/makefile index 51f4c9e5e9..731455b6f6 100644 --- a/miniapps/spde/makefile +++ b/miniapps/spde/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/miniapps/spde/material_metrics.cpp b/miniapps/spde/material_metrics.cpp index a3600783d0..ae03d32b42 100644 --- a/miniapps/spde/material_metrics.cpp +++ b/miniapps/spde/material_metrics.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/miniapps/spde/material_metrics.hpp b/miniapps/spde/material_metrics.hpp index fea044a48a..fee69b87df 100644 --- a/miniapps/spde/material_metrics.hpp +++ b/miniapps/spde/material_metrics.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/miniapps/spde/spde_solver.cpp b/miniapps/spde/spde_solver.cpp index ce56b8b032..b105582735 100644 --- a/miniapps/spde/spde_solver.cpp +++ b/miniapps/spde/spde_solver.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/miniapps/spde/spde_solver.hpp b/miniapps/spde/spde_solver.hpp index b424ce0607..2c85ab1f00 100644 --- a/miniapps/spde/spde_solver.hpp +++ b/miniapps/spde/spde_solver.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/miniapps/spde/transformation.cpp b/miniapps/spde/transformation.cpp index dd4b4e1c70..cfeaad1877 100644 --- a/miniapps/spde/transformation.cpp +++ b/miniapps/spde/transformation.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/miniapps/spde/transformation.hpp b/miniapps/spde/transformation.hpp index 32a4b55a6c..5743a5111f 100644 --- a/miniapps/spde/transformation.hpp +++ b/miniapps/spde/transformation.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/miniapps/spde/util.cpp b/miniapps/spde/util.cpp index b0af226912..782b9ace44 100644 --- a/miniapps/spde/util.cpp +++ b/miniapps/spde/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/miniapps/spde/util.hpp b/miniapps/spde/util.hpp index f3ad2c4dac..141e969a2c 100644 --- a/miniapps/spde/util.hpp +++ b/miniapps/spde/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/miniapps/spde/visualizer.cpp b/miniapps/spde/visualizer.cpp index c59fc7b548..03610657d3 100644 --- a/miniapps/spde/visualizer.cpp +++ b/miniapps/spde/visualizer.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/miniapps/spde/visualizer.hpp b/miniapps/spde/visualizer.hpp index c000154970..18820f07f7 100644 --- a/miniapps/spde/visualizer.hpp +++ b/miniapps/spde/visualizer.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/miniapps/tools/CMakeLists.txt b/miniapps/tools/CMakeLists.txt index 5caab47feb..23628b133a 100644 --- a/miniapps/tools/CMakeLists.txt +++ b/miniapps/tools/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/miniapps/tools/convert-dc.cpp b/miniapps/tools/convert-dc.cpp index 447a22645b..bd38ee14d2 100644 --- a/miniapps/tools/convert-dc.cpp +++ b/miniapps/tools/convert-dc.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/miniapps/tools/display-basis.cpp b/miniapps/tools/display-basis.cpp index 4e097402fa..67051d332f 100644 --- a/miniapps/tools/display-basis.cpp +++ b/miniapps/tools/display-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/miniapps/tools/get-values.cpp b/miniapps/tools/get-values.cpp index 6f4a55baf2..5a0145f5b7 100644 --- a/miniapps/tools/get-values.cpp +++ b/miniapps/tools/get-values.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/miniapps/tools/load-dc.cpp b/miniapps/tools/load-dc.cpp index b3d6c101c1..af6a5cc751 100644 --- a/miniapps/tools/load-dc.cpp +++ b/miniapps/tools/load-dc.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/miniapps/tools/lor-transfer.cpp b/miniapps/tools/lor-transfer.cpp index 607768b445..7798709070 100644 --- a/miniapps/tools/lor-transfer.cpp +++ b/miniapps/tools/lor-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/miniapps/tools/makefile b/miniapps/tools/makefile index 83631c123f..fef903a40c 100644 --- a/miniapps/tools/makefile +++ b/miniapps/tools/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/miniapps/tools/nodal-transfer.cpp b/miniapps/tools/nodal-transfer.cpp index 47f64a734b..615044e69a 100644 --- a/miniapps/tools/nodal-transfer.cpp +++ b/miniapps/tools/nodal-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/miniapps/tools/plor-transfer.cpp b/miniapps/tools/plor-transfer.cpp index d8d87b8e86..667fb04d3b 100644 --- a/miniapps/tools/plor-transfer.cpp +++ b/miniapps/tools/plor-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/miniapps/tools/tmop-check-metric.cpp b/miniapps/tools/tmop-check-metric.cpp index 45e250a116..4dd2b3c193 100644 --- a/miniapps/tools/tmop-check-metric.cpp +++ b/miniapps/tools/tmop-check-metric.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/miniapps/tools/tmop-metric-magnitude.cpp b/miniapps/tools/tmop-metric-magnitude.cpp index 183865a9d3..3b0c167f21 100644 --- a/miniapps/tools/tmop-metric-magnitude.cpp +++ b/miniapps/tools/tmop-metric-magnitude.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/miniapps/toys/CMakeLists.txt b/miniapps/toys/CMakeLists.txt index 84f234ecd7..4d1a20a58b 100644 --- a/miniapps/toys/CMakeLists.txt +++ b/miniapps/toys/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/miniapps/toys/automata.cpp b/miniapps/toys/automata.cpp index 60b7f69a69..908ce7d7b3 100644 --- a/miniapps/toys/automata.cpp +++ b/miniapps/toys/automata.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/miniapps/toys/life.cpp b/miniapps/toys/life.cpp index dd2fc9fcf1..e0e6d27d24 100644 --- a/miniapps/toys/life.cpp +++ b/miniapps/toys/life.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/miniapps/toys/lissajous.cpp b/miniapps/toys/lissajous.cpp index 8a168fb642..e145ae490f 100644 --- a/miniapps/toys/lissajous.cpp +++ b/miniapps/toys/lissajous.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/miniapps/toys/makefile b/miniapps/toys/makefile index bdd782d523..f06f179bd1 100644 --- a/miniapps/toys/makefile +++ b/miniapps/toys/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/miniapps/toys/mandel.cpp b/miniapps/toys/mandel.cpp index cb7b56a8a8..c7f51cb262 100644 --- a/miniapps/toys/mandel.cpp +++ b/miniapps/toys/mandel.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/miniapps/toys/mondrian.cpp b/miniapps/toys/mondrian.cpp index 50f06ba9ad..a5606bd578 100644 --- a/miniapps/toys/mondrian.cpp +++ b/miniapps/toys/mondrian.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/miniapps/toys/rubik.cpp b/miniapps/toys/rubik.cpp index 6884cffdbd..f3802c61ac 100644 --- a/miniapps/toys/rubik.cpp +++ b/miniapps/toys/rubik.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/miniapps/toys/snake.cpp b/miniapps/toys/snake.cpp index f82bda41de..abaa449a7e 100644 --- a/miniapps/toys/snake.cpp +++ b/miniapps/toys/snake.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/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5328c5c115..7daa1175c0 100644 --- a/tests/CMakeLists.txt +++ b/tests/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/tests/benchmarks/CMakeLists.txt b/tests/benchmarks/CMakeLists.txt index aa609c389e..cc97bb3348 100644 --- a/tests/benchmarks/CMakeLists.txt +++ b/tests/benchmarks/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/tests/benchmarks/bench.hpp b/tests/benchmarks/bench.hpp index 300f038c91..f62a8c3f64 100644 --- a/tests/benchmarks/bench.hpp +++ b/tests/benchmarks/bench.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/tests/benchmarks/bench_assembly_levels.cpp b/tests/benchmarks/bench_assembly_levels.cpp index ecc491faaa..a46fe692fd 100644 --- a/tests/benchmarks/bench_assembly_levels.cpp +++ b/tests/benchmarks/bench_assembly_levels.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/tests/benchmarks/bench_ceed.cpp b/tests/benchmarks/bench_ceed.cpp index 5274c44dd9..2bf9fbdb38 100644 --- a/tests/benchmarks/bench_ceed.cpp +++ b/tests/benchmarks/bench_ceed.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/tests/benchmarks/bench_dg_amr.cpp b/tests/benchmarks/bench_dg_amr.cpp index 7fee3bfe45..2c7fb19666 100644 --- a/tests/benchmarks/bench_dg_amr.cpp +++ b/tests/benchmarks/bench_dg_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/tests/benchmarks/bench_elasticity.cpp b/tests/benchmarks/bench_elasticity.cpp index 1d09efd996..a4600c71d4 100644 --- a/tests/benchmarks/bench_elasticity.cpp +++ b/tests/benchmarks/bench_elasticity.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/tests/benchmarks/bench_tmop.cpp b/tests/benchmarks/bench_tmop.cpp index 229146c0a0..5a3d437c91 100644 --- a/tests/benchmarks/bench_tmop.cpp +++ b/tests/benchmarks/bench_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/tests/benchmarks/bench_vector.cpp b/tests/benchmarks/bench_vector.cpp index 3893de87c3..9d15d95f5e 100644 --- a/tests/benchmarks/bench_vector.cpp +++ b/tests/benchmarks/bench_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/tests/benchmarks/bench_virtuals.cpp b/tests/benchmarks/bench_virtuals.cpp index 41bd56a594..4a8a30405c 100644 --- a/tests/benchmarks/bench_virtuals.cpp +++ b/tests/benchmarks/bench_virtuals.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/tests/benchmarks/makefile b/tests/benchmarks/makefile index e9000f8f5f..5e5faee7e9 100644 --- a/tests/benchmarks/makefile +++ b/tests/benchmarks/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/tests/convergence/makefile b/tests/convergence/makefile index 0f2b107f7c..7e1b6a7df0 100644 --- a/tests/convergence/makefile +++ b/tests/convergence/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/tests/convergence/prates.cpp b/tests/convergence/prates.cpp index df107be1f0..25972d678f 100644 --- a/tests/convergence/prates.cpp +++ b/tests/convergence/prates.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/tests/convergence/rates.cpp b/tests/convergence/rates.cpp index 58d080a914..889174dbaf 100644 --- a/tests/convergence/rates.cpp +++ b/tests/convergence/rates.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/tests/gitlab/build_and_test b/tests/gitlab/build_and_test index 1f12adcdf5..c3a5efc580 100755 --- a/tests/gitlab/build_and_test +++ b/tests/gitlab/build_and_test @@ -1,6 +1,6 @@ #!/usr/bin/env 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/tests/gitlab/generate_spack_upstream b/tests/gitlab/generate_spack_upstream index dcd4ea2e37..410d05e6a7 100755 --- a/tests/gitlab/generate_spack_upstream +++ b/tests/gitlab/generate_spack_upstream @@ -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/tests/gitlab/get_mfem_uberenv b/tests/gitlab/get_mfem_uberenv index f0041ea654..9432bcb87a 100755 --- a/tests/gitlab/get_mfem_uberenv +++ b/tests/gitlab/get_mfem_uberenv @@ -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/tests/mem_manager/dangling-aliases.cpp b/tests/mem_manager/dangling-aliases.cpp index f65c3d9493..1165c304d5 100644 --- a/tests/mem_manager/dangling-aliases.cpp +++ b/tests/mem_manager/dangling-aliases.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/tests/mem_manager/makefile b/tests/mem_manager/makefile index 6c2776c4fd..2e88b60c93 100644 --- a/tests/mem_manager/makefile +++ b/tests/mem_manager/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/tests/par-mesh-format/makefile b/tests/par-mesh-format/makefile index 8f557f7a68..225531b36e 100644 --- a/tests/par-mesh-format/makefile +++ b/tests/par-mesh-format/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/tests/scripts/branch-history b/tests/scripts/branch-history index 5b95398398..4339895da9 100755 --- a/tests/scripts/branch-history +++ b/tests/scripts/branch-history @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced +# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced # at the Lawrence Livermore National Laboratory. All Rights reserved. See files # LICENSE and NOTICE for details. LLNL-CODE-806117. # diff --git a/tests/scripts/code-style b/tests/scripts/code-style index 78310b8ef1..4b9747163d 100755 --- a/tests/scripts/code-style +++ b/tests/scripts/code-style @@ -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/tests/scripts/documentation b/tests/scripts/documentation index 2ebb80708b..92ddf89dfc 100755 --- a/tests/scripts/documentation +++ b/tests/scripts/documentation @@ -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/tests/scripts/gitignore b/tests/scripts/gitignore index ff6919fb6a..e1e6eb5c18 100755 --- a/tests/scripts/gitignore +++ b/tests/scripts/gitignore @@ -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/tests/scripts/runtest b/tests/scripts/runtest index 04083e4838..f0a30270b3 100755 --- a/tests/scripts/runtest +++ b/tests/scripts/runtest @@ -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/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 8bb78c1240..fcf5d3a9f6 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/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/tests/unit/ceed/test_ceed.cpp b/tests/unit/ceed/test_ceed.cpp index 971b68e245..feabf6f94d 100644 --- a/tests/unit/ceed/test_ceed.cpp +++ b/tests/unit/ceed/test_ceed.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/tests/unit/ceed/test_ceed_main.cpp b/tests/unit/ceed/test_ceed_main.cpp index a8fac22db2..fe053bac18 100644 --- a/tests/unit/ceed/test_ceed_main.cpp +++ b/tests/unit/ceed/test_ceed_main.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/tests/unit/cunit_test_main.cpp b/tests/unit/cunit_test_main.cpp index 142190c436..09adf13ddd 100644 --- a/tests/unit/cunit_test_main.cpp +++ b/tests/unit/cunit_test_main.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/tests/unit/fem/test_1d_bilininteg.cpp b/tests/unit/fem/test_1d_bilininteg.cpp index a3973ebd3c..0770ceab97 100644 --- a/tests/unit/fem/test_1d_bilininteg.cpp +++ b/tests/unit/fem/test_1d_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. // diff --git a/tests/unit/fem/test_2d_bilininteg.cpp b/tests/unit/fem/test_2d_bilininteg.cpp index 312cecde26..865370b259 100644 --- a/tests/unit/fem/test_2d_bilininteg.cpp +++ b/tests/unit/fem/test_2d_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. // diff --git a/tests/unit/fem/test_3d_bilininteg.cpp b/tests/unit/fem/test_3d_bilininteg.cpp index debf925dfe..802174a2e2 100644 --- a/tests/unit/fem/test_3d_bilininteg.cpp +++ b/tests/unit/fem/test_3d_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. // diff --git a/tests/unit/fem/test_assemblediagonalpa.cpp b/tests/unit/fem/test_assemblediagonalpa.cpp index 050561e1db..5e6beb4284 100644 --- a/tests/unit/fem/test_assemblediagonalpa.cpp +++ b/tests/unit/fem/test_assemblediagonalpa.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/tests/unit/fem/test_assembly_levels.cpp b/tests/unit/fem/test_assembly_levels.cpp index c3edda6370..191b0df268 100644 --- a/tests/unit/fem/test_assembly_levels.cpp +++ b/tests/unit/fem/test_assembly_levels.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/tests/unit/fem/test_bilinearform.cpp b/tests/unit/fem/test_bilinearform.cpp index 5fd00b3e18..7f99cf1fd6 100644 --- a/tests/unit/fem/test_bilinearform.cpp +++ b/tests/unit/fem/test_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. // diff --git a/tests/unit/fem/test_blocknonlinearform.cpp b/tests/unit/fem/test_blocknonlinearform.cpp index 51d6b12aba..2baf12a39a 100644 --- a/tests/unit/fem/test_blocknonlinearform.cpp +++ b/tests/unit/fem/test_blocknonlinearform.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/tests/unit/fem/test_build_dof_to_arrays.cpp b/tests/unit/fem/test_build_dof_to_arrays.cpp index a439a13b6d..508bdaab75 100644 --- a/tests/unit/fem/test_build_dof_to_arrays.cpp +++ b/tests/unit/fem/test_build_dof_to_arrays.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/tests/unit/fem/test_calccurlshape.cpp b/tests/unit/fem/test_calccurlshape.cpp index 9a2ebe27ed..3ba4e9e45e 100644 --- a/tests/unit/fem/test_calccurlshape.cpp +++ b/tests/unit/fem/test_calccurlshape.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/tests/unit/fem/test_calcdivshape.cpp b/tests/unit/fem/test_calcdivshape.cpp index afcd494177..cb88651e83 100644 --- a/tests/unit/fem/test_calcdivshape.cpp +++ b/tests/unit/fem/test_calcdivshape.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/tests/unit/fem/test_calcdshape.cpp b/tests/unit/fem/test_calcdshape.cpp index d3c3b064f1..fa67fad941 100644 --- a/tests/unit/fem/test_calcdshape.cpp +++ b/tests/unit/fem/test_calcdshape.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/tests/unit/fem/test_calcshape.cpp b/tests/unit/fem/test_calcshape.cpp index 65db5ab8f1..160a47f5a4 100644 --- a/tests/unit/fem/test_calcshape.cpp +++ b/tests/unit/fem/test_calcshape.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/tests/unit/fem/test_calcvshape.cpp b/tests/unit/fem/test_calcvshape.cpp index 2176d901f5..d2b99ef017 100644 --- a/tests/unit/fem/test_calcvshape.cpp +++ b/tests/unit/fem/test_calcvshape.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/tests/unit/fem/test_coefficient.cpp b/tests/unit/fem/test_coefficient.cpp index 5491925137..041a5d0c9a 100644 --- a/tests/unit/fem/test_coefficient.cpp +++ b/tests/unit/fem/test_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. // diff --git a/tests/unit/fem/test_datacollection.cpp b/tests/unit/fem/test_datacollection.cpp index dbf9b205c3..eeb3f52496 100644 --- a/tests/unit/fem/test_datacollection.cpp +++ b/tests/unit/fem/test_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/tests/unit/fem/test_derefine.cpp b/tests/unit/fem/test_derefine.cpp index 2320cd207a..606f960f22 100644 --- a/tests/unit/fem/test_derefine.cpp +++ b/tests/unit/fem/test_derefine.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/tests/unit/fem/test_dgmassinv.cpp b/tests/unit/fem/test_dgmassinv.cpp index 903aa585cc..b82e250e76 100644 --- a/tests/unit/fem/test_dgmassinv.cpp +++ b/tests/unit/fem/test_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/tests/unit/fem/test_doftrans.cpp b/tests/unit/fem/test_doftrans.cpp index b65b8724df..ef7a024095 100644 --- a/tests/unit/fem/test_doftrans.cpp +++ b/tests/unit/fem/test_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/tests/unit/fem/test_domain_int.cpp b/tests/unit/fem/test_domain_int.cpp index 2ff68ad71e..a48c9b11b2 100644 --- a/tests/unit/fem/test_domain_int.cpp +++ b/tests/unit/fem/test_domain_int.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/tests/unit/fem/test_eigs.cpp b/tests/unit/fem/test_eigs.cpp index 01ec1a5ce1..7a227ca20e 100644 --- a/tests/unit/fem/test_eigs.cpp +++ b/tests/unit/fem/test_eigs.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/tests/unit/fem/test_estimator.cpp b/tests/unit/fem/test_estimator.cpp index 69ae74d1c9..c711192b09 100644 --- a/tests/unit/fem/test_estimator.cpp +++ b/tests/unit/fem/test_estimator.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/tests/unit/fem/test_fa_determinism.cpp b/tests/unit/fem/test_fa_determinism.cpp index 41795954aa..de78869f0d 100644 --- a/tests/unit/fem/test_fa_determinism.cpp +++ b/tests/unit/fem/test_fa_determinism.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/tests/unit/fem/test_face_elem_trans.cpp b/tests/unit/fem/test_face_elem_trans.cpp index 37217b868f..5cac928f14 100644 --- a/tests/unit/fem/test_face_elem_trans.cpp +++ b/tests/unit/fem/test_face_elem_trans.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/tests/unit/fem/test_face_permutation.cpp b/tests/unit/fem/test_face_permutation.cpp index 63cd02a262..dd721d011a 100644 --- a/tests/unit/fem/test_face_permutation.cpp +++ b/tests/unit/fem/test_face_permutation.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/tests/unit/fem/test_face_restriction.cpp b/tests/unit/fem/test_face_restriction.cpp index 6d19a41f67..0e1336ff5d 100644 --- a/tests/unit/fem/test_face_restriction.cpp +++ b/tests/unit/fem/test_face_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/tests/unit/fem/test_fe.cpp b/tests/unit/fem/test_fe.cpp index 336561055f..4a39d026d5 100644 --- a/tests/unit/fem/test_fe.cpp +++ b/tests/unit/fem/test_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/tests/unit/fem/test_get_value.cpp b/tests/unit/fem/test_get_value.cpp index 8fda554e7f..31f5d1768e 100644 --- a/tests/unit/fem/test_get_value.cpp +++ b/tests/unit/fem/test_get_value.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/tests/unit/fem/test_getderivative.cpp b/tests/unit/fem/test_getderivative.cpp index bbfaddf4b7..ee695c24ac 100644 --- a/tests/unit/fem/test_getderivative.cpp +++ b/tests/unit/fem/test_getderivative.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/tests/unit/fem/test_getgradient.cpp b/tests/unit/fem/test_getgradient.cpp index 8fea0788f0..73c9391814 100644 --- a/tests/unit/fem/test_getgradient.cpp +++ b/tests/unit/fem/test_getgradient.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/tests/unit/fem/test_gslib.cpp b/tests/unit/fem/test_gslib.cpp index 7ad24da7cc..10bfe637ba 100644 --- a/tests/unit/fem/test_gslib.cpp +++ b/tests/unit/fem/test_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. // diff --git a/tests/unit/fem/test_intrules.cpp b/tests/unit/fem/test_intrules.cpp index c0d549373a..cc627681ec 100644 --- a/tests/unit/fem/test_intrules.cpp +++ b/tests/unit/fem/test_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. // diff --git a/tests/unit/fem/test_intruletypes.cpp b/tests/unit/fem/test_intruletypes.cpp index 723da23306..74e2a0d157 100644 --- a/tests/unit/fem/test_intruletypes.cpp +++ b/tests/unit/fem/test_intruletypes.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/tests/unit/fem/test_inversetransform.cpp b/tests/unit/fem/test_inversetransform.cpp index e327436b08..a7a76be9df 100644 --- a/tests/unit/fem/test_inversetransform.cpp +++ b/tests/unit/fem/test_inversetransform.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/tests/unit/fem/test_lexicographic_ordering.cpp b/tests/unit/fem/test_lexicographic_ordering.cpp index 6c73cb4e32..272e8fbcdc 100644 --- a/tests/unit/fem/test_lexicographic_ordering.cpp +++ b/tests/unit/fem/test_lexicographic_ordering.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/tests/unit/fem/test_lin_interp.cpp b/tests/unit/fem/test_lin_interp.cpp index 5b2018dd54..6648b86bf3 100644 --- a/tests/unit/fem/test_lin_interp.cpp +++ b/tests/unit/fem/test_lin_interp.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/tests/unit/fem/test_linear_fes.cpp b/tests/unit/fem/test_linear_fes.cpp index 13670340a6..1371359987 100644 --- a/tests/unit/fem/test_linear_fes.cpp +++ b/tests/unit/fem/test_linear_fes.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/tests/unit/fem/test_linearform_ext.cpp b/tests/unit/fem/test_linearform_ext.cpp index 270a681394..5c3443592a 100644 --- a/tests/unit/fem/test_linearform_ext.cpp +++ b/tests/unit/fem/test_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/tests/unit/fem/test_lor.cpp b/tests/unit/fem/test_lor.cpp index df60e9406b..1ea697abc2 100644 --- a/tests/unit/fem/test_lor.cpp +++ b/tests/unit/fem/test_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/tests/unit/fem/test_lor_batched.cpp b/tests/unit/fem/test_lor_batched.cpp index 19a7ee3fa0..1610b825f8 100644 --- a/tests/unit/fem/test_lor_batched.cpp +++ b/tests/unit/fem/test_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/tests/unit/fem/test_operatorjacobismoother.cpp b/tests/unit/fem/test_operatorjacobismoother.cpp index 97576fd876..2b33b8ee16 100644 --- a/tests/unit/fem/test_operatorjacobismoother.cpp +++ b/tests/unit/fem/test_operatorjacobismoother.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/tests/unit/fem/test_oscillation.cpp b/tests/unit/fem/test_oscillation.cpp index acb585e384..8043ce79aa 100644 --- a/tests/unit/fem/test_oscillation.cpp +++ b/tests/unit/fem/test_oscillation.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/tests/unit/fem/test_pa_coeff.cpp b/tests/unit/fem/test_pa_coeff.cpp index ece574f16b..e0e9c83f29 100644 --- a/tests/unit/fem/test_pa_coeff.cpp +++ b/tests/unit/fem/test_pa_coeff.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/tests/unit/fem/test_pa_grad.cpp b/tests/unit/fem/test_pa_grad.cpp index a42d7c83cf..364a80b3a0 100644 --- a/tests/unit/fem/test_pa_grad.cpp +++ b/tests/unit/fem/test_pa_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/tests/unit/fem/test_pa_idinterp.cpp b/tests/unit/fem/test_pa_idinterp.cpp index 492637623b..0d7fd78802 100644 --- a/tests/unit/fem/test_pa_idinterp.cpp +++ b/tests/unit/fem/test_pa_idinterp.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/tests/unit/fem/test_pa_kernels.cpp b/tests/unit/fem/test_pa_kernels.cpp index 32375069d5..49cf4d9582 100644 --- a/tests/unit/fem/test_pa_kernels.cpp +++ b/tests/unit/fem/test_pa_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/tests/unit/fem/test_pgridfunc_save_serial.cpp b/tests/unit/fem/test_pgridfunc_save_serial.cpp index dd9ea3adf5..dff57eb078 100644 --- a/tests/unit/fem/test_pgridfunc_save_serial.cpp +++ b/tests/unit/fem/test_pgridfunc_save_serial.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/tests/unit/fem/test_project_bdr.cpp b/tests/unit/fem/test_project_bdr.cpp index fe46f39df5..7abc69fd92 100644 --- a/tests/unit/fem/test_project_bdr.cpp +++ b/tests/unit/fem/test_project_bdr.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/tests/unit/fem/test_quadf_coef.cpp b/tests/unit/fem/test_quadf_coef.cpp index 344701d9fc..accc1e31cf 100644 --- a/tests/unit/fem/test_quadf_coef.cpp +++ b/tests/unit/fem/test_quadf_coef.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/tests/unit/fem/test_quadinterpolator.cpp b/tests/unit/fem/test_quadinterpolator.cpp index f9862c8a08..e3ada38d3e 100644 --- a/tests/unit/fem/test_quadinterpolator.cpp +++ b/tests/unit/fem/test_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. // diff --git a/tests/unit/fem/test_quadraturefunc.cpp b/tests/unit/fem/test_quadraturefunc.cpp index 5b06a48a78..25067e4ce2 100644 --- a/tests/unit/fem/test_quadraturefunc.cpp +++ b/tests/unit/fem/test_quadraturefunc.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/tests/unit/fem/test_r1d_bilininteg.cpp b/tests/unit/fem/test_r1d_bilininteg.cpp index 1c56d209a2..626254bee3 100644 --- a/tests/unit/fem/test_r1d_bilininteg.cpp +++ b/tests/unit/fem/test_r1d_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. // diff --git a/tests/unit/fem/test_r2d_bilininteg.cpp b/tests/unit/fem/test_r2d_bilininteg.cpp index cfafb49632..342a497730 100644 --- a/tests/unit/fem/test_r2d_bilininteg.cpp +++ b/tests/unit/fem/test_r2d_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. // diff --git a/tests/unit/fem/test_sparse_matrix.cpp b/tests/unit/fem/test_sparse_matrix.cpp index 61871cfc86..11031a5a87 100644 --- a/tests/unit/fem/test_sparse_matrix.cpp +++ b/tests/unit/fem/test_sparse_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/tests/unit/fem/test_sum_bilin.cpp b/tests/unit/fem/test_sum_bilin.cpp index e544c04c88..dc03ff01da 100644 --- a/tests/unit/fem/test_sum_bilin.cpp +++ b/tests/unit/fem/test_sum_bilin.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/tests/unit/fem/test_surf_blf.cpp b/tests/unit/fem/test_surf_blf.cpp index 4d00e879b2..4b89001140 100644 --- a/tests/unit/fem/test_surf_blf.cpp +++ b/tests/unit/fem/test_surf_blf.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/tests/unit/fem/test_tet_reorder.cpp b/tests/unit/fem/test_tet_reorder.cpp index 26698db8db..042de07bde 100644 --- a/tests/unit/fem/test_tet_reorder.cpp +++ b/tests/unit/fem/test_tet_reorder.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/tests/unit/fem/test_transfer.cpp b/tests/unit/fem/test_transfer.cpp index 32243a2497..3b746f48a5 100644 --- a/tests/unit/fem/test_transfer.cpp +++ b/tests/unit/fem/test_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/tests/unit/fem/test_var_order.cpp b/tests/unit/fem/test_var_order.cpp index 7dd197e2d3..f33d630ac0 100644 --- a/tests/unit/fem/test_var_order.cpp +++ b/tests/unit/fem/test_var_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/tests/unit/fem/test_white_noise.cpp b/tests/unit/fem/test_white_noise.cpp index 226a27b29f..0d28199ebc 100644 --- a/tests/unit/fem/test_white_noise.cpp +++ b/tests/unit/fem/test_white_noise.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/tests/unit/general/test_array.cpp b/tests/unit/general/test_array.cpp index 033c8565be..54ef7f69e3 100644 --- a/tests/unit/general/test_array.cpp +++ b/tests/unit/general/test_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/tests/unit/general/test_error.cpp b/tests/unit/general/test_error.cpp index a38170fbdd..1b004d3874 100644 --- a/tests/unit/general/test_error.cpp +++ b/tests/unit/general/test_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/tests/unit/general/test_mem.cpp b/tests/unit/general/test_mem.cpp index 5efbd4ffa0..5c8120a277 100644 --- a/tests/unit/general/test_mem.cpp +++ b/tests/unit/general/test_mem.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/tests/unit/general/test_text.cpp b/tests/unit/general/test_text.cpp index 380178b259..5136187bb7 100644 --- a/tests/unit/general/test_text.cpp +++ b/tests/unit/general/test_text.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/tests/unit/general/test_umpire_mem.cpp b/tests/unit/general/test_umpire_mem.cpp index bbf2a67905..84457669ec 100644 --- a/tests/unit/general/test_umpire_mem.cpp +++ b/tests/unit/general/test_umpire_mem.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/tests/unit/general/test_zlib.cpp b/tests/unit/general/test_zlib.cpp index 529e7ed6c2..511fc059d3 100644 --- a/tests/unit/general/test_zlib.cpp +++ b/tests/unit/general/test_zlib.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/tests/unit/linalg/test_cg_indefinite.cpp b/tests/unit/linalg/test_cg_indefinite.cpp index b33f976358..51e4958fe5 100644 --- a/tests/unit/linalg/test_cg_indefinite.cpp +++ b/tests/unit/linalg/test_cg_indefinite.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/tests/unit/linalg/test_chebyshev.cpp b/tests/unit/linalg/test_chebyshev.cpp index 3e56ff4f8f..a5734a4482 100644 --- a/tests/unit/linalg/test_chebyshev.cpp +++ b/tests/unit/linalg/test_chebyshev.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/tests/unit/linalg/test_complex_dense_matrix.cpp b/tests/unit/linalg/test_complex_dense_matrix.cpp index b864d8ad2a..fe1b78fa43 100644 --- a/tests/unit/linalg/test_complex_dense_matrix.cpp +++ b/tests/unit/linalg/test_complex_dense_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/tests/unit/linalg/test_complex_operator.cpp b/tests/unit/linalg/test_complex_operator.cpp index 2e7daf392c..a9c21e1ce9 100644 --- a/tests/unit/linalg/test_complex_operator.cpp +++ b/tests/unit/linalg/test_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/tests/unit/linalg/test_constrainedsolver.cpp b/tests/unit/linalg/test_constrainedsolver.cpp index 5c76d3ecd4..17b0df82ce 100644 --- a/tests/unit/linalg/test_constrainedsolver.cpp +++ b/tests/unit/linalg/test_constrainedsolver.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/tests/unit/linalg/test_direct_solvers.cpp b/tests/unit/linalg/test_direct_solvers.cpp index 5b74a98fa4..0646302300 100644 --- a/tests/unit/linalg/test_direct_solvers.cpp +++ b/tests/unit/linalg/test_direct_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/tests/unit/linalg/test_hypre_ilu.cpp b/tests/unit/linalg/test_hypre_ilu.cpp index c6901492a7..96417d8821 100644 --- a/tests/unit/linalg/test_hypre_ilu.cpp +++ b/tests/unit/linalg/test_hypre_ilu.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/tests/unit/linalg/test_hypre_prec.cpp b/tests/unit/linalg/test_hypre_prec.cpp index b0a89b9aa6..609891b1bf 100644 --- a/tests/unit/linalg/test_hypre_prec.cpp +++ b/tests/unit/linalg/test_hypre_prec.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/tests/unit/linalg/test_hypre_vector.cpp b/tests/unit/linalg/test_hypre_vector.cpp index 720ec5a67d..3b59787b96 100644 --- a/tests/unit/linalg/test_hypre_vector.cpp +++ b/tests/unit/linalg/test_hypre_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/tests/unit/linalg/test_ilu.cpp b/tests/unit/linalg/test_ilu.cpp index 4a2c8f3a64..2d0e09b321 100644 --- a/tests/unit/linalg/test_ilu.cpp +++ b/tests/unit/linalg/test_ilu.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/tests/unit/linalg/test_matrix_block.cpp b/tests/unit/linalg/test_matrix_block.cpp index e88779887a..d416c7e00c 100644 --- a/tests/unit/linalg/test_matrix_block.cpp +++ b/tests/unit/linalg/test_matrix_block.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/tests/unit/linalg/test_matrix_dense.cpp b/tests/unit/linalg/test_matrix_dense.cpp index 4153e58c1a..6d709a1c24 100644 --- a/tests/unit/linalg/test_matrix_dense.cpp +++ b/tests/unit/linalg/test_matrix_dense.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/tests/unit/linalg/test_matrix_hypre.cpp b/tests/unit/linalg/test_matrix_hypre.cpp index 40fd75323f..dd3b9e349f 100644 --- a/tests/unit/linalg/test_matrix_hypre.cpp +++ b/tests/unit/linalg/test_matrix_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/tests/unit/linalg/test_matrix_rectangular.cpp b/tests/unit/linalg/test_matrix_rectangular.cpp index a404c9246c..2e863c8666 100644 --- a/tests/unit/linalg/test_matrix_rectangular.cpp +++ b/tests/unit/linalg/test_matrix_rectangular.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/tests/unit/linalg/test_matrix_sparse.cpp b/tests/unit/linalg/test_matrix_sparse.cpp index 34a1547ee3..bb56e5045f 100644 --- a/tests/unit/linalg/test_matrix_sparse.cpp +++ b/tests/unit/linalg/test_matrix_sparse.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/tests/unit/linalg/test_matrix_square.cpp b/tests/unit/linalg/test_matrix_square.cpp index 8009f5033d..dc40ef7aa1 100644 --- a/tests/unit/linalg/test_matrix_square.cpp +++ b/tests/unit/linalg/test_matrix_square.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/tests/unit/linalg/test_ode.cpp b/tests/unit/linalg/test_ode.cpp index 5b579ed0f3..b84e8c96bc 100644 --- a/tests/unit/linalg/test_ode.cpp +++ b/tests/unit/linalg/test_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/tests/unit/linalg/test_ode2.cpp b/tests/unit/linalg/test_ode2.cpp index 923d43baf2..3f5b6b2fe4 100644 --- a/tests/unit/linalg/test_ode2.cpp +++ b/tests/unit/linalg/test_ode2.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/tests/unit/linalg/test_operator.cpp b/tests/unit/linalg/test_operator.cpp index 8e6fe0fd01..936d051ead 100644 --- a/tests/unit/linalg/test_operator.cpp +++ b/tests/unit/linalg/test_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/tests/unit/linalg/test_vector.cpp b/tests/unit/linalg/test_vector.cpp index e379b1b2a2..53d3e75156 100644 --- a/tests/unit/linalg/test_vector.cpp +++ b/tests/unit/linalg/test_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/tests/unit/makefile b/tests/unit/makefile index 9c73d67ba7..2ae1b82571 100644 --- a/tests/unit/makefile +++ b/tests/unit/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/tests/unit/mesh/mesh_test_utils.cpp b/tests/unit/mesh/mesh_test_utils.cpp index 2054521055..58f5cb89c7 100644 --- a/tests/unit/mesh/mesh_test_utils.cpp +++ b/tests/unit/mesh/mesh_test_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/tests/unit/mesh/mesh_test_utils.hpp b/tests/unit/mesh/mesh_test_utils.hpp index 249ee51dae..37333f9804 100644 --- a/tests/unit/mesh/mesh_test_utils.hpp +++ b/tests/unit/mesh/mesh_test_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/tests/unit/mesh/test_face_orientations.cpp b/tests/unit/mesh/test_face_orientations.cpp index 6880f18a5a..7ee28b6ef5 100644 --- a/tests/unit/mesh/test_face_orientations.cpp +++ b/tests/unit/mesh/test_face_orientations.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/tests/unit/mesh/test_fms.cpp b/tests/unit/mesh/test_fms.cpp index 18bdc27b2e..211647a37a 100644 --- a/tests/unit/mesh/test_fms.cpp +++ b/tests/unit/mesh/test_fms.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/tests/unit/mesh/test_mesh.cpp b/tests/unit/mesh/test_mesh.cpp index cc6c8c0a27..b465a2c4b0 100644 --- a/tests/unit/mesh/test_mesh.cpp +++ b/tests/unit/mesh/test_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. // diff --git a/tests/unit/mesh/test_ncmesh.cpp b/tests/unit/mesh/test_ncmesh.cpp index b8917efcd1..c4ac18ebfe 100644 --- a/tests/unit/mesh/test_ncmesh.cpp +++ b/tests/unit/mesh/test_ncmesh.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/tests/unit/mesh/test_periodic_mesh.cpp b/tests/unit/mesh/test_periodic_mesh.cpp index a373f95de1..7c0abaeafd 100644 --- a/tests/unit/mesh/test_periodic_mesh.cpp +++ b/tests/unit/mesh/test_periodic_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. // diff --git a/tests/unit/mesh/test_pmesh.cpp b/tests/unit/mesh/test_pmesh.cpp index 88cc0125f7..0deca3742f 100644 --- a/tests/unit/mesh/test_pmesh.cpp +++ b/tests/unit/mesh/test_pmesh.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/tests/unit/mesh/test_psubmesh.cpp b/tests/unit/mesh/test_psubmesh.cpp index 647e03db6e..821c078cad 100644 --- a/tests/unit/mesh/test_psubmesh.cpp +++ b/tests/unit/mesh/test_psubmesh.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/tests/unit/mesh/test_submesh.cpp b/tests/unit/mesh/test_submesh.cpp index 325f519775..23387c66cc 100644 --- a/tests/unit/mesh/test_submesh.cpp +++ b/tests/unit/mesh/test_submesh.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/tests/unit/mesh/test_vtu.cpp b/tests/unit/mesh/test_vtu.cpp index 170e055dcb..6b8792a63d 100644 --- a/tests/unit/mesh/test_vtu.cpp +++ b/tests/unit/mesh/test_vtu.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/tests/unit/miniapps/test_debug_device.cpp b/tests/unit/miniapps/test_debug_device.cpp index b7ef6126fd..3ca632cef5 100644 --- a/tests/unit/miniapps/test_debug_device.cpp +++ b/tests/unit/miniapps/test_debug_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/tests/unit/miniapps/test_sedov.cpp b/tests/unit/miniapps/test_sedov.cpp index 2d1aacd109..2d19f039ee 100644 --- a/tests/unit/miniapps/test_sedov.cpp +++ b/tests/unit/miniapps/test_sedov.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/tests/unit/miniapps/test_tmop_pa.cpp b/tests/unit/miniapps/test_tmop_pa.cpp index 64eadb2e29..6c844d465e 100644 --- a/tests/unit/miniapps/test_tmop_pa.cpp +++ b/tests/unit/miniapps/test_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/tests/unit/pcunit_test_main.cpp b/tests/unit/pcunit_test_main.cpp index 340bc31c7d..44fa39fdbc 100644 --- a/tests/unit/pcunit_test_main.cpp +++ b/tests/unit/pcunit_test_main.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/tests/unit/punit_test_main.cpp b/tests/unit/punit_test_main.cpp index a662f21853..1e48424e3f 100644 --- a/tests/unit/punit_test_main.cpp +++ b/tests/unit/punit_test_main.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/tests/unit/run_unit_tests.hpp b/tests/unit/run_unit_tests.hpp index dcaef0bd98..fb136e4810 100644 --- a/tests/unit/run_unit_tests.hpp +++ b/tests/unit/run_unit_tests.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/tests/unit/unit_test_main.cpp b/tests/unit/unit_test_main.cpp index b32552f7de..399098412b 100644 --- a/tests/unit/unit_test_main.cpp +++ b/tests/unit/unit_test_main.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/tests/unit/unit_tests.hpp b/tests/unit/unit_tests.hpp index f2efbd9d66..064596d1fd 100644 --- a/tests/unit/unit_tests.hpp +++ b/tests/unit/unit_tests.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. // From 1deac8c6bffef86ec4573e1af96a4da9bc77e2b5 Mon Sep 17 00:00:00 2001 From: Robert Carson Date: Tue, 30 Jan 2024 17:30:28 -0800 Subject: [PATCH 150/200] Add documentation for new param in ElementTransformation::TransformBack --- fem/eltrans.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fem/eltrans.hpp b/fem/eltrans.hpp index a81952ad95..ca3892d4c2 100644 --- a/fem/eltrans.hpp +++ b/fem/eltrans.hpp @@ -170,7 +170,7 @@ 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 @@ -443,7 +443,7 @@ public: 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 From 6c07599447d4e1c08421256c08be2d3beafaa428 Mon Sep 17 00:00:00 2001 From: Dylan Copeland Date: Tue, 30 Jan 2024 21:01:34 -0800 Subject: [PATCH 151/200] Replace mesh/geom.hpp with fem/geom.hpp in mesh file comments. --- data/ball-nurbs.mesh | 2 +- data/beam-hex-nurbs.mesh | 2 +- data/beam-hex.mesh | 2 +- data/beam-quad-nurbs.mesh | 2 +- data/beam-quad.mesh | 2 +- data/beam-tet.mesh | 2 +- data/beam-tri.mesh | 2 +- data/beam-wedge.mesh | 2 +- data/cube-nurbs.mesh | 2 +- data/diag-segment-2d.mesh | 2 +- data/diag-segment-3d.mesh | 2 +- data/disc-nurbs.mesh | 2 +- data/escher-p2.mesh | 2 +- data/escher-p3.mesh | 2 +- data/escher.mesh | 2 +- data/fichera-mixed-p2.mesh | 2 +- data/fichera-mixed.mesh | 2 +- data/fichera-q2.mesh | 2 +- data/fichera-q3.mesh | 2 +- data/fichera-quad-mixed.mesh | 2 +- data/fichera-quad.mesh | 2 +- data/fichera.mesh | 2 +- data/hexagon.mesh | 2 +- data/klein-bottle.mesh | 2 +- data/klein-donut.mesh | 2 +- data/l-shape.mesh | 2 +- data/llnl-p3.mesh | 2 +- data/mobius-strip.mesh | 2 +- data/octahedron.mesh | 2 +- data/periodic-cube.mesh | 2 +- data/periodic-hexagon.mesh | 2 +- data/periodic-segment.mesh | 2 +- data/periodic-square.mesh | 2 +- data/pipe-nurbs-2d.mesh | 2 +- data/pipe-nurbs.mesh | 2 +- data/ref-cube.mesh | 2 +- data/ref-prism.mesh | 2 +- data/ref-pyramid.mesh | 2 +- data/ref-segment.mesh | 2 +- data/ref-square.mesh | 2 +- data/ref-tetrahedron.mesh | 2 +- data/ref-triangle.mesh | 2 +- data/rt-2d-p4-tri.mesh | 2 +- data/rt-2d-q3.mesh | 2 +- data/segment-nurbs.mesh | 2 +- data/square-disc-nurbs.mesh | 2 +- data/square-disc-p2.mesh | 2 +- data/square-disc-p3.mesh | 2 +- data/square-disc-surf.mesh | 2 +- data/square-disc.mesh | 2 +- data/square-mixed.mesh | 2 +- data/square-nurbs.mesh | 2 +- data/star-mixed-p2.mesh | 2 +- data/star-mixed.mesh | 2 +- data/star-q2.mesh | 2 +- data/star-q3.mesh | 2 +- data/star-surf.mesh | 2 +- data/star.mesh | 2 +- data/tinyzoo-3d.mesh | 2 +- data/toroid-hex.mesh | 2 +- data/toroid-wedge.mesh | 2 +- mesh/mesh.cpp | 8 ++++---- mesh/pmesh.cpp | 4 ++-- miniapps/dpg/meshes/fichera-waveguide.mesh | 2 +- miniapps/dpg/meshes/scatter.mesh | 2 +- miniapps/electromagnetics/cylinder-hex.mesh | 2 +- miniapps/electromagnetics/cylinder-tet.mesh | 2 +- miniapps/electromagnetics/square-angled-pipe.mesh | 2 +- miniapps/gslib/triple-pt-1.mesh | 2 +- miniapps/gslib/triple-pt-2.mesh | 2 +- miniapps/meshing/blade.mesh | 2 +- miniapps/meshing/cube-tet.mesh | 2 +- miniapps/meshing/cube.mesh | 2 +- miniapps/meshing/icf.mesh | 2 +- miniapps/meshing/jagged.mesh | 2 +- miniapps/meshing/square01-tri.mesh | 2 +- miniapps/meshing/square01.mesh | 2 +- miniapps/meshing/stretched2D.mesh | 2 +- miniapps/multidomain/multidomain-hex.mesh | 2 +- miniapps/navier/box-cylinder.mesh | 2 +- miniapps/nurbs/meshes/cube-nurbs.mesh | 2 +- miniapps/nurbs/meshes/square-nurbs.mesh | 2 +- miniapps/solvers/anisotropic.mesh | 2 +- tests/unit/data/quad-spiral-q20.mesh | 2 +- 84 files changed, 88 insertions(+), 88 deletions(-) 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/mesh/mesh.cpp b/mesh/mesh.cpp index 984080cff0..ecefca0d38 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp @@ -11195,7 +11195,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" @@ -11259,7 +11259,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" @@ -11944,7 +11944,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" @@ -12440,7 +12440,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/pmesh.cpp b/mesh/pmesh.cpp index b02cdf4c48..3fcf59dc47 100644 --- a/mesh/pmesh.cpp +++ b/mesh/pmesh.cpp @@ -4822,7 +4822,7 @@ void ParMesh::Print(std::ostream &os, const std::string &comments) 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" @@ -4933,7 +4933,7 @@ void ParMesh::PrintAsOne(std::ostream &os, const std::string &comments) 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/miniapps/dpg/meshes/fichera-waveguide.mesh b/miniapps/dpg/meshes/fichera-waveguide.mesh index f93aa927e5..4faba20d84 100644 --- a/miniapps/dpg/meshes/fichera-waveguide.mesh +++ b/miniapps/dpg/meshes/fichera-waveguide.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/miniapps/dpg/meshes/scatter.mesh b/miniapps/dpg/meshes/scatter.mesh index c48eea84fc..dcc21d890c 100644 --- a/miniapps/dpg/meshes/scatter.mesh +++ b/miniapps/dpg/meshes/scatter.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/miniapps/electromagnetics/cylinder-hex.mesh b/miniapps/electromagnetics/cylinder-hex.mesh index af7e13fdbe..091c7e2d40 100644 --- a/miniapps/electromagnetics/cylinder-hex.mesh +++ b/miniapps/electromagnetics/cylinder-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/miniapps/electromagnetics/cylinder-tet.mesh b/miniapps/electromagnetics/cylinder-tet.mesh index 66129b614d..0c0d658663 100644 --- a/miniapps/electromagnetics/cylinder-tet.mesh +++ b/miniapps/electromagnetics/cylinder-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/miniapps/electromagnetics/square-angled-pipe.mesh b/miniapps/electromagnetics/square-angled-pipe.mesh index b70c42a555..968d18367b 100644 --- a/miniapps/electromagnetics/square-angled-pipe.mesh +++ b/miniapps/electromagnetics/square-angled-pipe.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/miniapps/gslib/triple-pt-1.mesh b/miniapps/gslib/triple-pt-1.mesh index 182cb859b7..d00ff3762f 100644 --- a/miniapps/gslib/triple-pt-1.mesh +++ b/miniapps/gslib/triple-pt-1.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/miniapps/gslib/triple-pt-2.mesh b/miniapps/gslib/triple-pt-2.mesh index e85bddf87f..57d0b0d31e 100644 --- a/miniapps/gslib/triple-pt-2.mesh +++ b/miniapps/gslib/triple-pt-2.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/miniapps/meshing/blade.mesh b/miniapps/meshing/blade.mesh index 62c2bb015e..21a1d6dda1 100644 --- a/miniapps/meshing/blade.mesh +++ b/miniapps/meshing/blade.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/miniapps/meshing/cube-tet.mesh b/miniapps/meshing/cube-tet.mesh index 90d52e0421..1827200d05 100644 --- a/miniapps/meshing/cube-tet.mesh +++ b/miniapps/meshing/cube-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/miniapps/meshing/cube.mesh b/miniapps/meshing/cube.mesh index 6b3a3e28ca..e1c1837556 100644 --- a/miniapps/meshing/cube.mesh +++ b/miniapps/meshing/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/miniapps/meshing/icf.mesh b/miniapps/meshing/icf.mesh index 60d12da00f..c6b6d4b3e4 100644 --- a/miniapps/meshing/icf.mesh +++ b/miniapps/meshing/icf.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/miniapps/meshing/jagged.mesh b/miniapps/meshing/jagged.mesh index 1d10e0e2f4..604be6d710 100644 --- a/miniapps/meshing/jagged.mesh +++ b/miniapps/meshing/jagged.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/miniapps/meshing/square01-tri.mesh b/miniapps/meshing/square01-tri.mesh index a807803d45..80d563ae23 100644 --- a/miniapps/meshing/square01-tri.mesh +++ b/miniapps/meshing/square01-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/miniapps/meshing/square01.mesh b/miniapps/meshing/square01.mesh index bc75f8555c..2101b32e84 100644 --- a/miniapps/meshing/square01.mesh +++ b/miniapps/meshing/square01.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/miniapps/meshing/stretched2D.mesh b/miniapps/meshing/stretched2D.mesh index 6fab492c72..4f704336d1 100644 --- a/miniapps/meshing/stretched2D.mesh +++ b/miniapps/meshing/stretched2D.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/miniapps/multidomain/multidomain-hex.mesh b/miniapps/multidomain/multidomain-hex.mesh index ce33395188..0b1ec0efd0 100644 --- a/miniapps/multidomain/multidomain-hex.mesh +++ b/miniapps/multidomain/multidomain-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/miniapps/navier/box-cylinder.mesh b/miniapps/navier/box-cylinder.mesh index bd003b5da2..5e534fbc5d 100644 --- a/miniapps/navier/box-cylinder.mesh +++ b/miniapps/navier/box-cylinder.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/miniapps/nurbs/meshes/cube-nurbs.mesh b/miniapps/nurbs/meshes/cube-nurbs.mesh index 822519f23e..d5594b2ff0 100644 --- a/miniapps/nurbs/meshes/cube-nurbs.mesh +++ b/miniapps/nurbs/meshes/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/miniapps/nurbs/meshes/square-nurbs.mesh b/miniapps/nurbs/meshes/square-nurbs.mesh index 169863abf7..38adfbb25b 100644 --- a/miniapps/nurbs/meshes/square-nurbs.mesh +++ b/miniapps/nurbs/meshes/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/miniapps/solvers/anisotropic.mesh b/miniapps/solvers/anisotropic.mesh index 1901104560..fd228b5301 100644 --- a/miniapps/solvers/anisotropic.mesh +++ b/miniapps/solvers/anisotropic.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/tests/unit/data/quad-spiral-q20.mesh b/tests/unit/data/quad-spiral-q20.mesh index 5b030073ac..9ea4bfa01f 100644 --- a/tests/unit/data/quad-spiral-q20.mesh +++ b/tests/unit/data/quad-spiral-q20.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 From 208db48024f2812cf85e5c0dbd6ef71c4785d939 Mon Sep 17 00:00:00 2001 From: Aaron Fisher Date: Wed, 31 Jan 2024 11:07:04 -0800 Subject: [PATCH 152/200] Fixed a capitalization in the dox --- linalg/solvers.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linalg/solvers.hpp b/linalg/solvers.hpp index 018ee7ff40..5b222fc500 100644 --- a/linalg/solvers.hpp +++ b/linalg/solvers.hpp @@ -344,7 +344,7 @@ 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. + /// 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 From eed6842c0061813e1f4e447a15d89ad317c200c6 Mon Sep 17 00:00:00 2001 From: Sebastian Grimberg Date: Wed, 31 Jan 2024 11:25:03 -0800 Subject: [PATCH 153/200] Silence many compiler warnings about partial overrides --- fem/bilininteg.hpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index be36f4d9cf..7a1caf1952 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -303,7 +303,6 @@ public: DenseMatrix &elmat); using BilinearFormIntegrator::AssemblePA; - virtual void AssemblePA(const FiniteElementSpace& fes) { bfi->AssemblePA(fes); @@ -2230,10 +2229,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, @@ -2296,10 +2294,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); @@ -2333,7 +2330,6 @@ public: BoundaryMassIntegrator(Coefficient &q) : MassIntegrator(q) { } using BilinearFormIntegrator::AssembleFaceMatrix; - virtual void AssembleFaceMatrix(const FiniteElement &el1, const FiniteElement &el2, FaceElementTransformations &Trans, @@ -2366,10 +2362,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, @@ -2783,7 +2778,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); @@ -3032,6 +3026,7 @@ public: ElementTransformation &Tr, DenseMatrix &elmat); + using BilinearFormIntegrator::AssemblePA; virtual void AssemblePA(const FiniteElementSpace &fes); virtual void AssembleDiagonalPA(Vector &diag); @@ -3162,8 +3157,6 @@ public: FaceElementTransformations &Trans, DenseMatrix &elmat); - using BilinearFormIntegrator::AssemblePA; - virtual void AssemblePAInteriorFaces(const FiniteElementSpace &fes); virtual void AssemblePABoundaryFaces(const FiniteElementSpace &fes); @@ -3560,13 +3553,12 @@ public: DenseMatrix &elmat) { nd_fe.ProjectGrad(h1_fe, Trans, elmat); } - using BilinearFormIntegrator::AssemblePA; - /** @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 */ + using BilinearFormIntegrator::AssemblePA; virtual void AssemblePA(const FiniteElementSpace &trial_fes, const FiniteElementSpace &test_fes); @@ -3599,7 +3591,6 @@ public: { ran_fe.Project(dom_fe, Trans, elmat); } using BilinearFormIntegrator::AssemblePA; - virtual void AssemblePA(const FiniteElementSpace &trial_fes, const FiniteElementSpace &test_fes); From 71ab3f28567f6967b3fff8005ff1b1b2b74cadb7 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Wed, 31 Jan 2024 14:44:37 -0800 Subject: [PATCH 154/200] Filter to use plain instead of Doxygen-style LaTeX in comments --- doc/CodeDocumentation.conf.in | 10 +- fem/bilinearform.hpp | 70 ++-- fem/bilininteg.hpp | 458 +++++++++++++------------- fem/coefficient.hpp | 28 +- fem/eltrans.hpp | 14 +- fem/fe/fe_base.hpp | 22 +- fem/gridfunc.hpp | 4 +- fem/hybridization.hpp | 40 +-- fem/lininteg.hpp | 94 +++--- fem/moonolith/mortarintegrator.hpp | 8 +- fem/nonlininteg.hpp | 20 +- fem/staticcond.hpp | 24 +- fem/tfe.hpp | 12 +- fem/tmop.hpp | 16 +- linalg/constraints.hpp | 40 +-- linalg/operator.hpp | 28 +- linalg/solvers.hpp | 6 +- linalg/sparsemat.hpp | 8 +- linalg/sundials.hpp | 32 +- miniapps/dpg/util/complexweakform.hpp | 14 +- miniapps/dpg/util/weakform.hpp | 14 +- miniapps/mtop/mtop_integrators.hpp | 2 +- miniapps/navier/navier_solver.hpp | 30 +- miniapps/shifted/sbm_solver.hpp | 44 +-- tests/scripts/documentation | 2 +- 25 files changed, 523 insertions(+), 517 deletions(-) diff --git a/doc/CodeDocumentation.conf.in b/doc/CodeDocumentation.conf.in index 04d44d04a7..2a251f5267 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 refgular expression ((?:.|\n)+?) is a lazy match for one or more +# characters, include newline. If presetn, Doxygen-style LaTeX commands +# such as \f$, \f[, etc., are left unchanged. + +INPUT_FILTER = perl -0777 -pe 's/\$\$((?:.|\n)+?)\$\$/\\f[\1\\f]/g; s/(?*> *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$ + /// Returns a pointer to (approximation) of the matrix inverse: $ M^{-1} $ virtual MatrixInverse *Inverse() const; /// Finalizes the matrix initialization. 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,7 +339,7 @@ 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() @@ -357,12 +357,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 +372,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() @@ -422,7 +422,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; } @@ -617,12 +617,12 @@ 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$. + /// 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. */ @@ -651,7 +651,7 @@ 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$ + /// 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); } @@ -769,13 +769,13 @@ 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; virtual void AddMult(const Vector & x, Vector & y, @@ -795,13 +795,13 @@ public: 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 $ 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; } @@ -859,7 +859,7 @@ public: 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. diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index 18c33b544a..d08f2d8c3f 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -66,7 +66,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. @@ -139,8 +139,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, @@ -708,9 +708,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: @@ -719,9 +719,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: @@ -729,8 +729,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: @@ -764,8 +764,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: @@ -801,8 +801,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 { @@ -823,7 +823,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"; } @@ -838,8 +838,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: @@ -875,9 +875,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: @@ -915,9 +915,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: @@ -969,9 +969,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 @@ -1007,9 +1007,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: @@ -1022,8 +1022,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: @@ -1031,9 +1031,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: @@ -1056,9 +1056,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: @@ -1094,8 +1094,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: @@ -1128,9 +1128,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: @@ -1186,8 +1186,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: @@ -1228,9 +1228,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: @@ -1277,8 +1277,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: @@ -1321,8 +1321,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: @@ -1364,8 +1364,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: @@ -1407,9 +1407,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: @@ -1442,9 +1442,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: @@ -1477,9 +1477,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: @@ -1517,9 +1517,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: @@ -1552,9 +1552,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: @@ -1587,8 +1587,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: @@ -1621,8 +1621,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: @@ -1646,10 +1646,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 { @@ -1679,8 +1679,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: @@ -1712,8 +1712,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: @@ -1751,8 +1751,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: @@ -1791,8 +1791,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: @@ -1824,9 +1824,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. */ @@ -1853,7 +1853,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"; } @@ -1885,9 +1885,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: @@ -1944,9 +1944,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: @@ -2001,9 +2001,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: @@ -2043,11 +2043,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: @@ -2094,7 +2094,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 { @@ -2261,7 +2261,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; @@ -2326,7 +2326,7 @@ 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: @@ -2340,7 +2340,7 @@ public: DenseMatrix &elmat); }; -/// \f$ \alpha (Q \cdot \nabla u, v)\f$ +/// $\alpha (Q \cdot \nabla u, v)$ class ConvectionIntegrator : public BilinearFormIntegrator { protected: @@ -2398,7 +2398,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: @@ -2406,7 +2406,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: @@ -2425,8 +2425,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 { @@ -2487,10 +2487,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 @@ -2534,8 +2534,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: @@ -2561,8 +2561,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: @@ -2587,7 +2587,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: @@ -2610,7 +2610,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: @@ -2675,7 +2675,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 { @@ -2696,19 +2696,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 @@ -2732,10 +2732,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: @@ -2794,8 +2794,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: @@ -2842,7 +2842,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: @@ -2883,10 +2883,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 @@ -2947,7 +2947,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. */ @@ -2959,7 +2959,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. */ @@ -2983,10 +2983,10 @@ 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 @@ -3023,8 +3023,8 @@ private: 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; } @@ -3040,12 +3040,12 @@ public: virtual void AddMultTransposePA(const Vector &x, Vector &y) const; - /** Compute the stress corresponding to the local displacement @a \f$u\f$ and + /** 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. */ @@ -3063,8 +3063,8 @@ 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); @@ -3085,7 +3085,7 @@ class ElasticityComponentIntegrator : public BilinearFormIntegrator public: /// @brief Given an ElasticityIntegrator, create an integrator that - /// represents the \f$(i,j)\f$th component block. + /// represents the $(i,j)$th component block. /// /// @note The parent ElasticityIntegrator must remain valid throughout the /// lifetime of this integrator. @@ -3102,31 +3102,31 @@ public: }; /** 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. + $$ + 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 \f$-u \cdot \nabla v\f$ + 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 { @@ -3144,11 +3144,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; } @@ -3193,9 +3193,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. */ @@ -3214,17 +3214,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 @@ -3253,11 +3253,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. @@ -3319,52 +3319,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. @@ -3422,8 +3422,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 { @@ -3440,9 +3440,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: @@ -3459,10 +3459,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: @@ -3476,9 +3476,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: @@ -3495,10 +3495,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: @@ -3546,8 +3546,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: @@ -3564,8 +3564,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); @@ -3639,7 +3639,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 @@ -3654,8 +3654,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: @@ -3717,7 +3717,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: @@ -3733,8 +3733,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: @@ -3750,8 +3750,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/coefficient.hpp b/fem/coefficient.hpp index 568c9376f0..bbdd2ddad8 100644 --- a/fem/coefficient.hpp +++ b/fem/coefficient.hpp @@ -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. */ @@ -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/eltrans.hpp b/fem/eltrans.hpp index 3d0ccb97f1..7ca3c1bcd0 100644 --- a/fem/eltrans.hpp +++ b/fem/eltrans.hpp @@ -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. @@ -391,11 +391,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,7 +436,7 @@ 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(); } diff --git a/fem/fe/fe_base.hpp b/fem/fe/fe_base.hpp index dcd7421f9a..e083a38460 100644 --- a/fem/fe/fe_base.hpp +++ b/fem/fe/fe_base.hpp @@ -264,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 diff --git a/fem/gridfunc.hpp b/fem/gridfunc.hpp index d7cf303be5..3a07ed2785 100644 --- a/fem/gridfunc.hpp +++ b/fem/gridfunc.hpp @@ -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; diff --git a/fem/hybridization.hpp b/fem/hybridization.hpp index b8ea3a7d8f..87bb28af00 100644 --- a/fem/hybridization.hpp +++ b/fem/hybridization.hpp @@ -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/lininteg.hpp b/fem/lininteg.hpp index 0cc5a80d44..6a759335ad 100644 --- a/fem/lininteg.hpp +++ b/fem/lininteg.hpp @@ -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 + $f=(f_1,\dots,f_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 { @@ -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 { diff --git a/fem/moonolith/mortarintegrator.hpp b/fem/moonolith/mortarintegrator.hpp index eec402229b..f67ce64472 100644 --- a/fem/moonolith/mortarintegrator.hpp +++ b/fem/moonolith/mortarintegrator.hpp @@ -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/nonlininteg.hpp b/fem/nonlininteg.hpp index fa3d2c75cc..a16c4279cc 100644 --- a/fem/nonlininteg.hpp +++ b/fem/nonlininteg.hpp @@ -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/staticcond.hpp b/fem/staticcond.hpp index 99946ab485..7416680b06 100644 --- a/fem/staticcond.hpp +++ b/fem/staticcond.hpp @@ -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/tfe.hpp b/fem/tfe.hpp index 0617d916ef..a7037e04dd 100644 --- a/fem/tfe.hpp +++ b/fem/tfe.hpp @@ -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/tmop.hpp b/fem/tmop.hpp index 8547756aed..e83a67774b 100644 --- a/fem/tmop.hpp +++ b/fem/tmop.hpp @@ -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/linalg/constraints.hpp b/linalg/constraints.hpp index 82101ee7fd..5bb31c2496 100644 --- a/linalg/constraints.hpp +++ b/linalg/constraints.hpp @@ -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/operator.hpp b/linalg/operator.hpp index baa9bf7672..6cc074b81e 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -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. diff --git a/linalg/solvers.hpp b/linalg/solvers.hpp index d951476bf3..1a6c4235a6 100644 --- a/linalg/solvers.hpp +++ b/linalg/solvers.hpp @@ -186,11 +186,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. diff --git a/linalg/sparsemat.hpp b/linalg/sparsemat.hpp index bc472739f0..af75f8d926 100644 --- a/linalg/sparsemat.hpp +++ b/linalg/sparsemat.hpp @@ -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; diff --git a/linalg/sundials.hpp b/linalg/sundials.hpp index 451c12b02e..300027a6dd 100644 --- a/linalg/sundials.hpp +++ b/linalg/sundials.hpp @@ -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/miniapps/dpg/util/complexweakform.hpp b/miniapps/dpg/util/complexweakform.hpp index 1e2473fdd1..44f2fe4038 100644 --- a/miniapps/dpg/util/complexweakform.hpp +++ b/miniapps/dpg/util/complexweakform.hpp @@ -35,7 +35,7 @@ protected: Array dof_offsets; Array tdof_offsets; - /// Block matrix \f$ M \f$ to be associated with the real/imag Block bilinear form. Owned. + /// Block matrix $ M $ to be associated with the real/imag Block bilinear form. Owned. BlockMatrix *mat_r = nullptr; BlockMatrix *mat_i = nullptr; ComplexOperator * mat = nullptr; @@ -45,9 +45,9 @@ protected: BlockVector * y_i = nullptr; Vector * y = nullptr; - /** @brief Block Matrix \f$ M_e \f$ used to store the eliminations + /** @brief Block 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} $ */ BlockMatrix *mat_e_r = nullptr; BlockMatrix *mat_e_i = nullptr; @@ -154,27 +154,27 @@ public: /// Finalizes the matrix initialization. void Finalize(int skip_zeros = 1); - /// Returns a reference to the BlockMatrix: \f$ M_r \f$ + /// Returns a reference to the BlockMatrix: $ M_r $ BlockMatrix &BlockMat_r() { MFEM_VERIFY(mat_r, "mat_r is NULL and can't be dereferenced"); return *mat_r; } - /// Returns a reference to the BlockMatrix: \f$ M_i \f$ + /// Returns a reference to the BlockMatrix: $ M_i $ BlockMatrix &BlockMat_i() { MFEM_VERIFY(mat_i, "mat_i is NULL and can't be dereferenced"); return *mat_i; } - /// Returns a reference to the BlockMatrix of eliminated b.c.: \f$ M_e_r \f$ + /// Returns a reference to the BlockMatrix of eliminated b.c.: $ M_e_r $ BlockMatrix &BlockMatElim_r() { MFEM_VERIFY(mat_e_r, "mat_e is NULL and can't be dereferenced"); return *mat_e_r; } - /// Returns a reference to the BlockMatrix of eliminated b.c.: \f$ M_e_i \f$ + /// Returns a reference to the BlockMatrix of eliminated b.c.: $ M_e_i $ BlockMatrix &BlockMatElim_i() { MFEM_VERIFY(mat_e_i, "mat_e is NULL and can't be dereferenced"); diff --git a/miniapps/dpg/util/weakform.hpp b/miniapps/dpg/util/weakform.hpp index bbee40ebb6..6994235ceb 100644 --- a/miniapps/dpg/util/weakform.hpp +++ b/miniapps/dpg/util/weakform.hpp @@ -45,15 +45,15 @@ protected: Array dof_offsets; Array tdof_offsets; - /// Block matrix \f$ M \f$ to be associated with the Block bilinear form. Owned. + /// Block matrix $ M $ to be associated with the Block bilinear form. Owned. BlockMatrix *mat = nullptr; - /// Block vector \f$ y \f$ to be associated with the Block linear form + /// Block vector $ y $ to be associated with the Block linear form BlockVector * y = nullptr; - /** @brief Block Matrix \f$ M_e \f$ used to store the eliminations + /** @brief Block 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} $ */ BlockMatrix *mat_e = nullptr; /// Trial FE spaces @@ -152,14 +152,14 @@ public: /// Finalizes the matrix initialization. void Finalize(int skip_zeros = 1); - /// Returns a reference to the BlockMatrix: \f$ M \f$ + /// Returns a reference to the BlockMatrix: $ M $ BlockMatrix &BlockMat() { MFEM_VERIFY(mat, "mat is NULL and can't be dereferenced"); return *mat; } - /// Returns a reference to the sparse matrix of eliminated b.c.: \f$ M_e \f$ + /// Returns a reference to the sparse matrix of eliminated b.c.: $ M_e $ BlockMatrix &BlockMatElim() { MFEM_VERIFY(mat_e, "mat_e is NULL and can't be dereferenced"); @@ -236,7 +236,7 @@ public: A.MakeRef(*A_ptr); } - /// Eliminate the given @a vdofs, storing the eliminated part internally in \f$ M_e \f$. + /// 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. */ diff --git a/miniapps/mtop/mtop_integrators.hpp b/miniapps/mtop/mtop_integrators.hpp index 3c20f9402f..ed3fac3977 100644 --- a/miniapps/mtop/mtop_integrators.hpp +++ b/miniapps/mtop/mtop_integrators.hpp @@ -214,7 +214,7 @@ private: /// Computes an example of nonlinear objective -/// \f$\int \rm{field}*\rm{field}*\rm{weight})\rm{d}\Omega_e\f$. +/// $\int \rm{field}*\rm{field}*\rm{weight})\rm{d}\Omega_e$. class DiffusionObjIntegrator:public BlockNonlinearFormIntegrator { public: diff --git a/miniapps/navier/navier_solver.hpp b/miniapps/navier/navier_solver.hpp index aef1def980..cd6c0d2c4b 100644 --- a/miniapps/navier/navier_solver.hpp +++ b/miniapps/navier/navier_solver.hpp @@ -104,23 +104,23 @@ public: * * 1. An extrapolation step for all nonlinear terms which are treated * explicitly. This step avoids a fully coupled nonlinear solve and only - * requires a solve of the mass matrix in velocity space \f$M_v^{-1}\f$. On + * requires a solve of the mass matrix in velocity space $M_v^{-1}$. On * the other hand this introduces a CFL stability condition on the maximum * timestep. * - * 2. A Poisson solve \f$S_p^{-1}\f$. + * 2. A Poisson solve $S_p^{-1}$. * - * 3. A Helmholtz like solve \f$(M_v - \partial t K_v)^{-1}\f$. + * 3. A Helmholtz like solve $(M_v - \partial t K_v)^{-1}$. * * The numerical solver setup for each step are as follows. * - * \f$M_v^{-1}\f$ is solved using CG with Jacobi as preconditioner. + * $M_v^{-1}$ is solved using CG with Jacobi as preconditioner. * - * \f$S_p^{-1}\f$ is solved using CG with AMG applied to the low order refined + * $S_p^{-1}$ is solved using CG with AMG applied to the low order refined * (LOR) assembled pressure Poisson matrix. To avoid assembling a matrix for * preconditioning, one can use p-MG as an alternative (NYI). * - * \f$(M_v - \partial t K_v)^{-1}\f$ due to the CFL condition we expect the time + * $(M_v - \partial t K_v)^{-1}$ due to the CFL condition we expect the time * step to be small. Therefore this is solved using CG with Jacobi as * preconditioner. For large time steps a preconditioner like AMG or p-MG should * be used (NYI). @@ -145,7 +145,7 @@ public: /** * The ParMesh @a mesh can be a linear or curved parallel mesh. The @a order * of the finite element spaces is this algorithm is of equal order - * \f$(P_N)^d P_N\f$ for velocity and pressure respectively. This means the + * $(P_N)^d P_N$ for velocity and pressure respectively. This means the * pressure is in discretized in the same space (just scalar instead of a * vector space) as the velocity. * @@ -239,25 +239,25 @@ public: ~NavierSolver(); - /// Compute \f$\nabla \times \nabla \times u\f$ for \f$u \in (H^1)^2\f$. + /// Compute $\nabla \times \nabla \times u$ for $u \in (H^1)^2$. void ComputeCurl2D(ParGridFunction &u, ParGridFunction &cu, bool assume_scalar = false); - /// Compute \f$\nabla \times \nabla \times u\f$ for \f$u \in (H^1)^3\f$. + /// Compute $\nabla \times \nabla \times u$ for $u \in (H^1)^3$. void ComputeCurl3D(ParGridFunction &u, ParGridFunction &cu); /// Remove mean from a Vector. /** * Modify the Vector @a v by subtracting its mean using - * \f$v = v - \frac{\sum_i^N v_i}{N} \f$ + * $v = v - \frac{\sum_i^N v_i}{N} $ */ void Orthogonalize(Vector &v); /// Remove the mean from a ParGridFunction. /** * Modify the ParGridFunction @a v by subtracting its mean using - * \f$ v = v - \int_\Omega \frac{v}{vol(\Omega)} dx \f$. + * $ v = v - \int_\Omega \frac{v}{vol(\Omega)} dx $. */ void MeanZero(ParGridFunction &v); @@ -330,16 +330,16 @@ protected: IntegrationRules gll_rules; - /// Velocity \f$H^1\f$ finite element collection. + /// Velocity $H^1$ finite element collection. FiniteElementCollection *vfec = nullptr; - /// Pressure \f$H^1\f$ finite element collection. + /// Pressure $H^1$ finite element collection. FiniteElementCollection *pfec = nullptr; - /// Velocity \f$(H^1)^d\f$ finite element space. + /// Velocity $(H^1)^d$ finite element space. ParFiniteElementSpace *vfes = nullptr; - /// Pressure \f$H^1\f$ finite element space. + /// Pressure $H^1$ finite element space. ParFiniteElementSpace *pfes = nullptr; ParNonlinearForm *N = nullptr; diff --git a/miniapps/shifted/sbm_solver.hpp b/miniapps/shifted/sbm_solver.hpp index b9a3da28f8..3a4135d483 100644 --- a/miniapps/shifted/sbm_solver.hpp +++ b/miniapps/shifted/sbm_solver.hpp @@ -76,12 +76,12 @@ public: /// BilinearFormIntegrator for the high-order extension of shifted boundary /// method. -/// \f[ +/// $$ /// A(u, w) = -\langle \nabla u \cdot n, w \rangle /// -\langle u + \nabla u \cdot d + h.o.t, \nabla w.n \rangle /// +\langle \alpha h^{-1} (u + \nabla u \cdot d + h.o.t), w + \nabla w \cdot d + h.o.t \rangle -/// \f] -/// where \f$h.o.t\f$ include higher-order derivatives (\f$\nabla^k u\f$) due to Taylor +/// $$ +/// where $h.o.t$ include higher-order derivatives ($\nabla^k u$) due to Taylor /// expansion. Since this interior face integrator is applied to the surrogate /// boundary (see marking.hpp for notes on how the surrogate faces are /// determined and elements are marked), this integrator adds contribution to @@ -134,20 +134,20 @@ public: /// LinearFormIntegrator for the high-order extension of shifted boundary /// method. -/// \f[ +/// $$ /// (u, w) = -\langle u_D, \nabla w \cdot n \rangle /// +\langle \alpha h^{-1} u_D, w + \nabla w \cdot d + h.o.t \rangle -/// \f] -/// where \f$h.o.t\f$ include higher-order derivatives (\f$\nabla^k u\f$) due to Taylor +/// $$ +/// where $h.o.t$ include higher-order derivatives ($\nabla^k u$) due to Taylor /// expansion. Since this interior face integrator is applied to the surrogate /// boundary (see marking.hpp for notes on how the surrogate faces are /// determined and elements are marked), this integrator adds contribution to /// only the element that is adjacent to that face (Trans.Elem1 or Trans.Elem2) /// and is part of the surrogate domain. -/// Note that \f$u_D\f$ is evaluated at the true boundary using the distance function -/// and ShiftedFunctionCoefficient, i.e. \f$u_D(x_{true}) = u_D(x_{surrogate} + D)\f$, -/// where \f$x_{surrogate}\f$ is the location of the integration point on the surrogate -/// boundary and \f$D\f$ is the distance vector from the surrogate boundary to the +/// Note that $u_D$ is evaluated at the true boundary using the distance function +/// and ShiftedFunctionCoefficient, i.e. $u_D(x_{true}) = u_D(x_{surrogate} + D)$, +/// where $x_{surrogate}$ is the location of the integration point on the surrogate +/// boundary and $D$ is the distance vector from the surrogate boundary to the /// true boundary. class SBM2DirichletLFIntegrator : public LinearFormIntegrator { @@ -201,11 +201,11 @@ public: /// BilinearFormIntegrator for Neumann boundaries using the shifted boundary /// method. -/// \f[ +/// $$ /// A(u,w) = \langle [\nabla u + \nabla(\nabla u) \cdot d + h.o.t.] \cdot \hat{n} \, (n \cdot \hat{n}),w ⟩ - \langle \nabla u \cdot n,w \rangle -/// \f] -/// where h.o.t are the high-order terms due to Taylor expansion for \f$\nabla u\f$, -/// \f$\hat{n}\f$ is the normal vector at the true boundary, \f$n\f$ is the normal vector at +/// $$ +/// where h.o.t are the high-order terms due to Taylor expansion for $\nabla u$, +/// $\hat{n}$ is the normal vector at the true boundary, $n$ is the normal vector at /// the surrogate boundary. Since this interior face integrator is applied to /// the surrogate boundary (see marking.hpp for notes on how the surrogate faces /// are determined and elements are marked), this integrator adds contribution @@ -260,20 +260,20 @@ public: /// LinearFormIntegrator for Neumann boundaries using the shifted boundary /// method. -/// \f[ +/// $$ /// (u, w) = \langle \hat{n} \cdot n \, t_n, w \rangle -/// \f] -/// where \f$\hat{n}\f$ is the normal vector at the true boundary, \f$n\f$ is the normal vector -/// at the surrogate boundary, and \f$t_n\f$ is the traction boundary condition. +/// $$ +/// where $\hat{n}$ is the normal vector at the true boundary, $n$ is the normal vector +/// at the surrogate boundary, and $t_n$ is the traction boundary condition. /// Since this interior face integrator is applied to the surrogate boundary /// (see marking.hpp for notes on how the surrogate faces are determined and /// elements are marked), this integrator adds contribution to only the element /// that is adjacent to that face (Trans.Elem1 or Trans.Elem2) and is part of /// the surrogate domain. -/// Note that \f$t_n\f$ is evaluated at the true boundary using the distance function -/// and ShiftedFunctionCoefficient, i.e. \f$t_n(x_{true}) = t_N(x_{surrogate} + D)\f$, -/// where \f$x_{surrogate}\f$ is the location of the integration point on the surrogate -/// boundary and \f$D\f$ is the distance vector from the surrogate boundary to the +/// Note that $t_n$ is evaluated at the true boundary using the distance function +/// and ShiftedFunctionCoefficient, i.e. $t_n(x_{true}) = t_N(x_{surrogate} + D)$, +/// where $x_{surrogate}$ is the location of the integration point on the surrogate +/// boundary and $D$ is the distance vector from the surrogate boundary to the /// true boundary. class SBM2NeumannLFIntegrator : public LinearFormIntegrator { diff --git a/tests/scripts/documentation b/tests/scripts/documentation index 2ebb80708b..937aebf471 100755 --- a/tests/scripts/documentation +++ b/tests/scripts/documentation @@ -60,7 +60,7 @@ if [ -s "$test_name.err" ]; then To correct this error, make sure that the Doxygen comments in the code use correct syntax. -See the Doxygen documentation for specific syntax (e.g. @a, @brief, \f[, etc.), +See the Doxygen documentation for specific syntax (e.g. @a, @brief, etc.), and the 'makefile' and 'CodeDocumentation.conf.in' files in the 'doc/' directory for additional details. From 04a7dad29658116b5622832c8ab0ab10874eb951 Mon Sep 17 00:00:00 2001 From: Vladimir Tomov Date: Wed, 31 Jan 2024 15:43:50 -0800 Subject: [PATCH 155/200] Update amgxsolver.hpp --- linalg/amgxsolver.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linalg/amgxsolver.hpp b/linalg/amgxsolver.hpp index 7813cce9cb..315f8c4155 100644 --- a/linalg/amgxsolver.hpp +++ b/linalg/amgxsolver.hpp @@ -135,7 +135,7 @@ public: AmgXSolver(const MPI_Comm &comm, const int nDevs, const AMGX_MODE amgx_Mode_, const bool verbose); - /** @brief Initilize the AmgX library in parallel mode with exactly one + /** @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 From c03968e614a6093f1b0a3e7d60fbface03b64817 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Wed, 31 Jan 2024 16:16:40 -0800 Subject: [PATCH 156/200] Update doc/CodeDocumentation.conf.in Co-authored-by: Will Pazner <11493037+pazner@users.noreply.github.com> --- doc/CodeDocumentation.conf.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/CodeDocumentation.conf.in b/doc/CodeDocumentation.conf.in index 2a251f5267..9d3af59941 100644 --- a/doc/CodeDocumentation.conf.in +++ b/doc/CodeDocumentation.conf.in @@ -1128,7 +1128,7 @@ IMAGE_PATH = # Allow the use of standard LaTeX formulas in MFEM comments by replacing # $$...$$ with \f[...\f] and $...$ with \f$...\f$ before running Doxygen. # The refgular expression ((?:.|\n)+?) is a lazy match for one or more -# characters, include newline. If presetn, Doxygen-style LaTeX commands +# 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/(? Date: Thu, 1 Feb 2024 06:48:41 -0800 Subject: [PATCH 157/200] Mark ConstrainedOperator::~ConstrainedOperator as override --- linalg/operator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linalg/operator.hpp b/linalg/operator.hpp index 3e20b46fb3..aeb3564869 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -927,7 +927,7 @@ public: void AddMult(const Vector &x, Vector &y, const double a = 1.0) const override; /// Destructor: destroys the unconstrained Operator, if owned. - ~ConstrainedOperator() { if (own_A) { delete A; } } + ~ConstrainedOperator() override { if (own_A) { delete A; } } }; /** @brief Rectangular Operator for imposing essential boundary conditions on From 4caab0f153e7dda0377ea43d9d7c7c6d2891d349 Mon Sep 17 00:00:00 2001 From: Sebastian Grimberg Date: Thu, 1 Feb 2024 08:55:18 -0800 Subject: [PATCH 158/200] Resolve Doxygen error (docstring is already in the base class) --- fem/bilininteg.hpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index 7a1caf1952..494a4c74bc 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -42,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(). */ @@ -282,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); @@ -3553,11 +3551,6 @@ public: DenseMatrix &elmat) { nd_fe.ProjectGrad(h1_fe, Trans, elmat); } - /** @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 - */ using BilinearFormIntegrator::AssemblePA; virtual void AssemblePA(const FiniteElementSpace &trial_fes, const FiniteElementSpace &test_fes); From 44d33d17f32377ab9fbea204b57e5aa16d0a40d5 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Thu, 1 Feb 2024 11:48:14 -0800 Subject: [PATCH 159/200] Switch to MathJax_3 --- doc/CodeDocumentation.conf.in | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/CodeDocumentation.conf.in b/doc/CodeDocumentation.conf.in index 9d3af59941..efa721b612 100644 --- a/doc/CodeDocumentation.conf.in +++ b/doc/CodeDocumentation.conf.in @@ -1788,7 +1788,7 @@ USE_MATHJAX = YES # The default value is: MathJax_2. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_VERSION = MathJax_2 +MATHJAX_VERSION = MathJax_3 # When MathJax is enabled you can set the default output format to be used for # the MathJax output. For more details about the output format see MathJax @@ -1805,7 +1805,7 @@ MATHJAX_VERSION = MathJax_2 # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_FORMAT = SVG +MATHJAX_FORMAT = chtml # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory @@ -1819,7 +1819,7 @@ MATHJAX_FORMAT = SVG # - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +MATHJAX_RELPATH = # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example @@ -1831,8 +1831,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # MATHJAX_EXTENSIONS = ams # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_EXTENSIONS = TeX/AMSmath \ - TeX/AMSsymbols +MATHJAX_EXTENSIONS = ams # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site From 4a421e6c1f597f34d77f904c15ea8f55eb9a6140 Mon Sep 17 00:00:00 2001 From: Jan Nikl Date: Thu, 1 Feb 2024 14:41:03 -0800 Subject: [PATCH 160/200] Added notes about synchronization to the print methods. --- linalg/sparsemat.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linalg/sparsemat.hpp b/linalg/sparsemat.hpp index a99dd4aea4..f94fe65a67 100644 --- a/linalg/sparsemat.hpp +++ b/linalg/sparsemat.hpp @@ -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. From a1ceea97fb094e94870fd538b21294d79c985f7c Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Thu, 1 Feb 2024 17:35:25 -0800 Subject: [PATCH 161/200] Trying to fix Doxygen GitHub CI --- doc/CodeDocumentation.conf.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/CodeDocumentation.conf.in b/doc/CodeDocumentation.conf.in index efa721b612..c6878c5e26 100644 --- a/doc/CodeDocumentation.conf.in +++ b/doc/CodeDocumentation.conf.in @@ -1805,7 +1805,7 @@ MATHJAX_VERSION = MathJax_3 # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_FORMAT = chtml +MATHJAX_FORMAT = # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory From 7d2b5b8e076ad71bebc8a31842d495e199577763 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Fri, 2 Feb 2024 11:25:09 -0800 Subject: [PATCH 162/200] Update doc/CodeDocumentation.conf.in Co-authored-by: Dennis Ogiermann --- doc/CodeDocumentation.conf.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/CodeDocumentation.conf.in b/doc/CodeDocumentation.conf.in index c6878c5e26..7438d0b981 100644 --- a/doc/CodeDocumentation.conf.in +++ b/doc/CodeDocumentation.conf.in @@ -1127,7 +1127,7 @@ IMAGE_PATH = # Allow the use of standard LaTeX formulas in MFEM comments by replacing # $$...$$ with \f[...\f] and $...$ with \f$...\f$ before running Doxygen. -# The refgular expression ((?:.|\n)+?) is a lazy match for one or more +# 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. From 91b9d9dc92d59459e65caf1397e8e193616148d7 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Fri, 2 Feb 2024 13:16:40 -0800 Subject: [PATCH 163/200] Update copyright --- miniapps/solvers/darcy_solver.cpp | 2 +- miniapps/solvers/darcy_solver.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/miniapps/solvers/darcy_solver.cpp b/miniapps/solvers/darcy_solver.cpp index cdaa702052..e874d95032 100644 --- a/miniapps/solvers/darcy_solver.cpp +++ b/miniapps/solvers/darcy_solver.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/miniapps/solvers/darcy_solver.hpp b/miniapps/solvers/darcy_solver.hpp index aafb6f3dc7..16efdf939c 100644 --- a/miniapps/solvers/darcy_solver.hpp +++ b/miniapps/solvers/darcy_solver.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. // From b87027927f58b4d35d92a52801c22d4f202d5be7 Mon Sep 17 00:00:00 2001 From: "Stowell, Mark L" Date: Fri, 2 Feb 2024 17:13:56 -0800 Subject: [PATCH 164/200] Uncommenting calls to earlier communication code --- mesh/submesh/ptransfermap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesh/submesh/ptransfermap.cpp b/mesh/submesh/ptransfermap.cpp index c47a349778..0c2d535f7f 100644 --- a/mesh/submesh/ptransfermap.cpp +++ b/mesh/submesh/ptransfermap.cpp @@ -192,7 +192,7 @@ void ParTransferMap::Transfer(const ParGridFunction &src, CorrectFaceOrientations(*src.ParFESpace(), src, dst, &sub1_to_parent_map_); - // CommunicateSharedVdofs(dst); + CommunicateSharedVdofs(dst); } else if (category_ == TransferCategory::SubMeshToSubMesh) { @@ -225,7 +225,7 @@ void ParTransferMap::Transfer(const ParGridFunction &src, CorrectFaceOrientations(*src.ParFESpace(), src, z_, &sub1_to_parent_map_); - // CommunicateSharedVdofs(z_); + CommunicateSharedVdofs(z_); for (int i = 0; i < sub2_to_parent_map_.Size(); i++) { From 2a86934778c2962c8059b514a38b6efd04dc8203 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Sat, 3 Feb 2024 14:44:38 -0800 Subject: [PATCH 165/200] Update CHANGELOG. Update Copyright. --- CHANGELOG | 9 ++++----- miniapps/solvers/bramble_pasciak.cpp | 2 +- miniapps/solvers/bramble_pasciak.hpp | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e24ba0da6d..ae121c03cc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -31,6 +31,10 @@ GPU support 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. @@ -117,11 +121,6 @@ Linear and nonlinear solvers 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 a new H(div) solver miniapp demonstrating the use of a matrix-free saddle-point solver methodology, suitable for high-order discretizations and for GPU acceleration. Examples illustrating the solution of Darcy and grad-div diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 53d95f9ecd..0845ee9395 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2023-2023, Lawrence Livermore National Security, LLC. Produced +// Copyright (c) 2023-2024, Lawrence Livermore National Security, LLC. Produced // at the Lawrence Livermore National Laboratory. All Rights reserved. See files // LICENSE and NOTICE for details. LLNL-CODE-806117. // diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index c2f2a815e6..4f56d516aa 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2023-2023, Lawrence Livermore National Security, LLC. Produced +// Copyright (c) 2023-2024, Lawrence Livermore National Security, LLC. Produced // at the Lawrence Livermore National Laboratory. All Rights reserved. See files // LICENSE and NOTICE for details. LLNL-CODE-806117. // From 5637e30f96d28157facb853cc8c94af589382ce7 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Sat, 3 Feb 2024 14:58:25 -0800 Subject: [PATCH 166/200] Remove typos. Update Copyright. --- miniapps/solvers/bramble_pasciak.cpp | 2 +- miniapps/solvers/bramble_pasciak.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/miniapps/solvers/bramble_pasciak.cpp b/miniapps/solvers/bramble_pasciak.cpp index 0845ee9395..e4280c12b9 100644 --- a/miniapps/solvers/bramble_pasciak.cpp +++ b/miniapps/solvers/bramble_pasciak.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2023-2024, Lawrence Livermore National Security, LLC. Produced +// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced // at the Lawrence Livermore National Laboratory. All Rights reserved. See files // LICENSE and NOTICE for details. LLNL-CODE-806117. // diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index 4f56d516aa..2047809275 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2023-2024, Lawrence Livermore National Security, LLC. Produced +// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced // at the Lawrence Livermore National Laboratory. All Rights reserved. See files // LICENSE and NOTICE for details. LLNL-CODE-806117. // @@ -105,14 +105,14 @@ public: * We consider Q_T := alpha * lambda_min * D_T, where D_T := diag(M_T), and * lambda_min is the smallest eigenvalue of the following problem * M_T x = lambda * D_T x. - * alpha is a parameter that is stricly between 0 and 1. + * alpha is a parameter that is strictly between 0 and 1. * * For more details, see: * 1. Vassilevski, Multilevel Block Factorization Preconditioners (Appendix F.3), * Springer, 2008. * 2. James H. Bramble and Joseph E. Pasciak. * A Preconditioning Technique for Indefinite Systems Resulting From Mixed - * Approximations of Elliptic Problems. Mathematics of Computation, 50:1–17, 1988. + * Approximations of Elliptic Problems. Mathematics of Computation, 50:1-17, 1988. */ class BramblePasciakSolver : public DarcySolver { From 3f6f94f7a2de80ba9a7f715dd46be32408487eba Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Sat, 3 Feb 2024 15:54:00 -0800 Subject: [PATCH 167/200] Mention math in comments in CONTRIBUTING, add a check for old style --- .github/workflows/repo-check.yml | 12 +++++++++++- CONTRIBUTING.md | 3 +++ config/githooks/pre-push | 17 +++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/repo-check.yml b/.github/workflows/repo-check.yml index 3886794d1d..21da4507f2 100644 --- a/.github/workflows/repo-check.yml +++ b/.github/workflows/repo-check.yml @@ -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.mathoutcome != '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: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2282995370..200e657379 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/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/config/githooks/pre-push b/config/githooks/pre-push index b1a8f59c70..1c7808a97f 100755 --- a/config/githooks/pre-push +++ b/config/githooks/pre-push @@ -21,6 +21,7 @@ if [[ "${option}" == "--help" ]]; then echo " --copyright" echo " --license" echo " --release" + echo " --math" echo " --style" echo " --history" echo "" @@ -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 From b86173353c258795f34ae9e5f3b8ac2bfc5f03c9 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Sat, 3 Feb 2024 15:56:34 -0800 Subject: [PATCH 168/200] Converted a few Doxygen-style math formulas --- fem/bilinearform.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fem/bilinearform.hpp b/fem/bilinearform.hpp index 1950d7e483..571174339d 100644 --- a/fem/bilinearform.hpp +++ b/fem/bilinearform.hpp @@ -138,8 +138,8 @@ protected: void AllocMat(); /** @brief For partially conforming trial and/or test FE spaces, complete the - assembly process by performing \f$ P^t A P\f$ where \f$ A \f$ is the - internal sparse matrix and \f$ P \f$ is the conforming prolongation + 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(); @@ -811,19 +811,19 @@ public: /// Matrix multiplication: $ y = M x $ virtual void Mult(const Vector & x, Vector & y) const; - /// 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; - /// 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; - /// 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; /** @brief Returns a pointer to (approximation) of the matrix inverse: - \f$ M^{-1} \f$ (currently unimplemented and returns NULL)*/ + $ M^{-1} $ (currently unimplemented and returns NULL)*/ virtual MatrixInverse *Inverse() const; /** @brief Finalizes the matrix initialization if the ::AssemblyLevel is @@ -936,8 +936,8 @@ public: { return test_fes->GetRestrictionMatrix(); } /** @brief For partially conforming trial and/or test FE spaces, complete the - assembly process by performing \f$ P2^t A P1 \f$ where \f$ A \f$ is the - internal sparse matrix; \f$ P1 \f$ and \f$ P2 \f$ are the conforming + 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. */ From 0aa21d66c4540754aff3ddb150eb4af660f303cc Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Sat, 3 Feb 2024 16:01:53 -0800 Subject: [PATCH 169/200] Update CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 200e657379..292e4f7723 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -347,8 +347,8 @@ Before you can start, you need a GitHub account, here are a few suggestions: - 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/readable description is preferable. + 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 From 444815b74bf0af8e3284d779250834cb774c1178 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Sat, 3 Feb 2024 16:05:12 -0800 Subject: [PATCH 170/200] Typo --- .github/workflows/repo-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/repo-check.yml b/.github/workflows/repo-check.yml index 21da4507f2..bb34ac3cf6 100644 --- a/.github/workflows/repo-check.yml +++ b/.github/workflows/repo-check.yml @@ -71,7 +71,7 @@ jobs: steps.copyright.outcome != 'success' || steps.license.outcome != 'success' || steps.release.outcome != 'success' || - steps.mathoutcome != 'success' + steps.math.outcome != 'success' run: | if [[ "${{ steps.copyright.outcome }}" != "success" ]]; then echo "copyright check failed, unroll log for details" From 60aa4a04fc3c27cccf45771e6492e8fce2f22996 Mon Sep 17 00:00:00 2001 From: Gabriel Pinochet Soto <65740635+homeomorfismo@users.noreply.github.com> Date: Sun, 4 Feb 2024 00:06:14 -0800 Subject: [PATCH 171/200] Apply suggestions from code review Co-authored-by: Tzanio Kolev --- miniapps/solvers/bramble_pasciak.hpp | 57 +++++++++++++++------------- miniapps/solvers/darcy_solver.cpp | 2 +- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/miniapps/solvers/bramble_pasciak.hpp b/miniapps/solvers/bramble_pasciak.hpp index 2047809275..c6a2c469f1 100644 --- a/miniapps/solvers/bramble_pasciak.hpp +++ b/miniapps/solvers/bramble_pasciak.hpp @@ -94,26 +94,31 @@ public: /// Bramble-Pasciak Solver for Darcy equation. /** Bramble-Pasciak Solver for Darcy equation. - * The basic idea is to precondition the mass matrix M with a s.p.d. matrix Q - * such that M - Q remains s.p.d. Then we can transform the block operator into a - * s.p.d. operator under a modified inner product. - * In particular, this enable us to implement modified versions of CG iterations, - * that rely on efficient applications of the required transformations. - * - * We offer a mass preconditioner based on a rescalling of the diagonal of the - * element mass matrices M_T. - * We consider Q_T := alpha * lambda_min * D_T, where D_T := diag(M_T), and - * lambda_min is the smallest eigenvalue of the following problem - * M_T x = lambda * D_T x. - * alpha is a parameter that is strictly between 0 and 1. - * - * For more details, see: - * 1. Vassilevski, Multilevel Block Factorization Preconditioners (Appendix F.3), - * Springer, 2008. - * 2. James H. Bramble and Joseph E. Pasciak. - * A Preconditioning Technique for Indefinite Systems Resulting From Mixed - * Approximations of Elliptic Problems. Mathematics of Computation, 50:1-17, 1988. - */ + + The basic idea is to precondition the mass matrix M with a s.p.d. matrix Q + such that M - Q remains s.p.d. Then we can transform the block operator into + a s.p.d. operator under a modified inner product. In particular, this enable + us to implement modified versions of CG iterations, that rely on efficient + applications of the required transformations. + + We offer a mass preconditioner based on a rescalling of the diagonal of the + element mass matrices M_T. + + We consider Q_T := alpha * lambda_min * D_T, where D_T := diag(M_T), and + lambda_min is the smallest eigenvalue of the following problem + + M_T x = lambda * D_T x. + + Alpha is a parameter that is strictly between 0 and 1. + + For more details, see: + + 1. P. Vassilevski, Multilevel Block Factorization Preconditioners (Appendix + F.3), Springer, 2008. + + 2. J. Bramble and J. Pasciak. A Preconditioning Technique for Indefinite + Systems Resulting From Mixed Approximations of Elliptic Problems, + Mathematics of Computation, 50:1–17, 1988. */ class BramblePasciakSolver : public DarcySolver { mutable bool use_bpcg; @@ -148,13 +153,11 @@ public: const BPSParameters ¶m); /// Assemble a preconditioner for the mass matrix - /** Mass preconditioner corresponds to a local re-scaling - * based on the smallest eigenvalue of the generalized - * eigenvalue problem locally on each element T: - * M_T x_T = lambda_T diag(M_T) x_T - * and we set Q_T = alpha * min(lambda_T) * diag(M_T), - * 0 < alpha < 1. - */ + /** Mass preconditioner corresponds to a local re-scaling based on the + smallest eigenvalue of the generalized eigenvalue problem locally on each + element T: + M_T x_T = lambda_T diag(M_T) x_T. + We set Q_T = alpha * min(lambda_T) * diag(M_T), 0 < alpha < 1. */ static HypreParMatrix *ConstructMassPreconditioner(ParBilinearForm &mVarf, double alpha = 0.5); diff --git a/miniapps/solvers/darcy_solver.cpp b/miniapps/solvers/darcy_solver.cpp index e874d95032..3d2b6ac802 100644 --- a/miniapps/solvers/darcy_solver.cpp +++ b/miniapps/solvers/darcy_solver.cpp @@ -29,7 +29,7 @@ void SetOptions(IterativeSolver& solver, const IterSolveParameters& param) /** Wrapper for assembling the discrete Darcy problem (ex5p) [ M B^T ] [u] = [f] [ B 0 ] [p] = [g] -**/ +*/ BDPMinresSolver::BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, IterSolveParameters param) : DarcySolver(M.NumRows(), B.NumRows()), op_(offsets_), prec_(offsets_), From 9857d6a987e7e3f9cb0091725bccd122013ce5b0 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Sun, 4 Feb 2024 00:09:16 -0800 Subject: [PATCH 172/200] Apply correction from d53f982 - Remove repeated constructors from the wrapper ex5 in div_free_solver.xpp - Append "const" in concordance to d53f982 in file darcy_solver.xpp --- miniapps/solvers/darcy_solver.cpp | 3 ++- miniapps/solvers/darcy_solver.hpp | 3 ++- miniapps/solvers/div_free_solver.cpp | 32 ---------------------------- miniapps/solvers/div_free_solver.hpp | 18 ---------------- 4 files changed, 4 insertions(+), 52 deletions(-) diff --git a/miniapps/solvers/darcy_solver.cpp b/miniapps/solvers/darcy_solver.cpp index 3d2b6ac802..a4ae7f89a3 100644 --- a/miniapps/solvers/darcy_solver.cpp +++ b/miniapps/solvers/darcy_solver.cpp @@ -30,7 +30,8 @@ void SetOptions(IterativeSolver& solver, const IterSolveParameters& param) [ M B^T ] [u] = [f] [ B 0 ] [p] = [g] */ -BDPMinresSolver::BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, +BDPMinresSolver::BDPMinresSolver(const HypreParMatrix& M, + const HypreParMatrix& B, IterSolveParameters param) : DarcySolver(M.NumRows(), B.NumRows()), op_(offsets_), prec_(offsets_), BT_(B.Transpose()), solver_(M.GetComm()) diff --git a/miniapps/solvers/darcy_solver.hpp b/miniapps/solvers/darcy_solver.hpp index 16efdf939c..219a5a88d4 100644 --- a/miniapps/solvers/darcy_solver.hpp +++ b/miniapps/solvers/darcy_solver.hpp @@ -51,7 +51,8 @@ class BDPMinresSolver : public DarcySolver MINRESSolver solver_; Array ess_zero_dofs_; public: - BDPMinresSolver(HypreParMatrix& M, HypreParMatrix& B, + BDPMinresSolver(const HypreParMatrix& M, + const HypreParMatrix& B, IterSolveParameters param); virtual void Mult(const Vector & x, Vector & y) const; virtual void SetOperator(const Operator &op) { } diff --git a/miniapps/solvers/div_free_solver.cpp b/miniapps/solvers/div_free_solver.cpp index e3f41791e9..44dd4a4c10 100644 --- a/miniapps/solvers/div_free_solver.cpp +++ b/miniapps/solvers/div_free_solver.cpp @@ -311,38 +311,6 @@ void SaddleSchwarzSmoother::Mult(const Vector & x, Vector & y) const blk_y.GetBlock(1) -= coarse_l2_projection; } -BDPMinresSolver::BDPMinresSolver(const HypreParMatrix& M, - const HypreParMatrix& B, - IterSolveParameters param) - : DarcySolver(M.NumRows(), B.NumRows()), op_(offsets_), prec_(offsets_), - BT_(B.Transpose()), solver_(M.GetComm()) -{ - op_.SetBlock(0,0, &M); - op_.SetBlock(0,1, BT_.As()); - op_.SetBlock(1,0, &B); - - Vector Md; - M.GetDiag(Md); - BT_.As()->InvScaleRows(Md); - S_.Reset(ParMult(&B, BT_.As())); - BT_.As()->ScaleRows(Md); - - prec_.SetDiagonalBlock(0, new HypreDiagScale(M)); - prec_.SetDiagonalBlock(1, new HypreBoomerAMG(*S_.As())); - static_cast(prec_.GetDiagonalBlock(1)).SetPrintLevel(0); - prec_.owns_blocks = true; - - SetOptions(solver_, param); - solver_.SetOperator(op_); - solver_.SetPreconditioner(prec_); -} - -void BDPMinresSolver::Mult(const Vector & x, Vector & y) const -{ - solver_.Mult(x, y); - for (int dof : ess_zero_dofs_) { y[dof] = 0.0; } -} - DivFreeSolver::DivFreeSolver(const HypreParMatrix &M, const HypreParMatrix& B, const DFSData& data) : DarcySolver(M.NumRows(), B.NumRows()), data_(data), param_(data.param), diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index d669a2d1c1..f8713270fb 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -158,24 +158,6 @@ public: virtual void SetOperator(const Operator &op) { } }; -/// Wrapper for the block-diagonal-preconditioned MINRES defined in ex5p.cpp -class BDPMinresSolver : public DarcySolver -{ - BlockOperator op_; - BlockDiagonalPreconditioner prec_; - OperatorPtr BT_; - OperatorPtr S_; // S_ = B diag(M)^{-1} B^T - MINRESSolver solver_; - Array ess_zero_dofs_; -public: - BDPMinresSolver(const HypreParMatrix& M, const HypreParMatrix& B, - IterSolveParameters param); - virtual void Mult(const Vector & x, Vector & y) const; - virtual void SetOperator(const Operator &op) { } - void SetEssZeroDofs(const Array& dofs) { dofs.Copy(ess_zero_dofs_); } - virtual int GetNumIterations() const { return solver_.GetNumIterations(); } -}; - /// Divergence free solver. /** Divergence free solver. The basic idea of the solver is to exploit a multilevel decomposition of From 4e247edd8a29da389e865b2bdb7371a22cdbaaf7 Mon Sep 17 00:00:00 2001 From: Gabriel Esteban Pinochet Soto Date: Sun, 4 Feb 2024 00:25:41 -0800 Subject: [PATCH 173/200] Small typo --- miniapps/solvers/div_free_solver.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniapps/solvers/div_free_solver.hpp b/miniapps/solvers/div_free_solver.hpp index f8713270fb..48eae6ca99 100644 --- a/miniapps/solvers/div_free_solver.hpp +++ b/miniapps/solvers/div_free_solver.hpp @@ -32,7 +32,7 @@ struct DFSParameters : IterSolveParameters IterSolveParameters BBT_solve_param; }; -/// Data for the divergenve free solver +/// Data for the divergence free solver struct DFSData { std::vector agg_hdivdof; // agglomerates to H(div) dofs table From 4107b6605c0d5a75241c2036942fa7dea798de94 Mon Sep 17 00:00:00 2001 From: "Stowell, Mark L" Date: Sun, 4 Feb 2024 13:03:08 -0800 Subject: [PATCH 174/200] ND and RT variants of multidomain miniapp --- miniapps/multidomain/multidomain_nd.cpp | 413 +++++++++++++++++++++++ miniapps/multidomain/multidomain_rt.cpp | 431 ++++++++++++++++++++++++ 2 files changed, 844 insertions(+) create mode 100644 miniapps/multidomain/multidomain_nd.cpp create mode 100644 miniapps/multidomain/multidomain_rt.cpp diff --git a/miniapps/multidomain/multidomain_nd.cpp b/miniapps/multidomain/multidomain_nd.cpp new file mode 100644 index 0000000000..75e43d7761 --- /dev/null +++ b/miniapps/multidomain/multidomain_nd.cpp @@ -0,0 +1,413 @@ +// Copyright (c) 2010-2024, Lawrence 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. + +// This miniapp aims to demonstrate how to solve two PDEs, that represent +// different physics, on the same domain. MFEM's SubMesh interface is used to +// compute on and transfer between the spaces of predefined parts of the domain. +// For the sake of simplicity, the spaces on each domain are using the same +// order H1 finite elements. This does not mean that the approach is limited to +// this configuration. +// +// A 3D domain comprised of an outer box with a cylinder shaped inside is used. +// +// A heat equation is described on the outer box domain +// +// dT/dt = κΔT in outer box +// T = T_wall on outside wall +// ∇T•n = 0 on inside (cylinder) wall +// +// with temperature T and coefficient κ (non-physical in this example). +// +// A convection-diffusion equation is described inside the cylinder domain +// +// dT/dt = κΔT - α∇•(b T) in inner cylinder +// T = T_wall on cylinder wall (obtained from heat equation) +// ∇T•n = 0 else +// +// with temperature T, coefficients κ, α and prescribed velocity profile b. +// +// To couple the solutions of both equations, a segregated solve with one way +// coupling approach is used. The heat equation of the outer box is solved from +// the timestep T_box(t) to T_box(t+dt). Then for the convection-diffusion +// equation T_wall is set to T_box(t+dt) and the equation is solved for T(t+dt) +// which results in a first-order one way coupling. + +#include "mfem.hpp" +#include +#include + +using namespace mfem; + +// Prescribed velocity profile for the convection-diffusion equation inside the +// cylinder. The profile is constructed s.t. it approximates a no-slip (v=0) +// directly at the cylinder wall boundary. +void velocity_profile(const Vector &c, Vector &q) +{ + double A = 1.0; + double x = c(0); + double y = c(1); + double r = sqrt(pow(x, 2.0) + pow(y, 2.0)); + + q(0) = 0.0; + q(1) = 0.0; + + if (std::abs(r) >= 0.25 - 1e-8) + { + q(2) = 0.0; + } + else + { + q(2) = -A * exp(-(pow(x, 2.0) / 2.0 + pow(y, 2.0) / 2.0)); + } +} + +void square_xy(const Vector &p, Vector &v) +{ + v.SetSize(3); + + v[0] = -2.0 * p[1]; + v[1] = 2.0 * p[0]; + v[2] = 0.0; +} + +/** + * @brief Convection-diffusion time dependent operator + * + * dT/dt = κΔT - α∇•(b T) + * + * Can also be used to create a diffusion or convection only operator by setting + * α or κ to zero. + */ +class ConvectionDiffusionTDO : public TimeDependentOperator +{ +public: + /** + * @brief Construct a new convection-diffusion time dependent operator. + * + * @param fes The ParFiniteElementSpace the solution is defined on + * @param ess_tdofs All essential true dofs (relevant if fes is using H1 + * finite elements) + * @param alpha The convection coefficient + * @param kappa The diffusion coefficient + */ + ConvectionDiffusionTDO(ParFiniteElementSpace &fes, + Array ess_tdofs, + double alpha = 1.0, + double kappa = 1.0e-1) + : TimeDependentOperator(fes.GetTrueVSize()), + Mform(&fes), + Kform(&fes), + bform(&fes), + ess_tdofs_(ess_tdofs), + M_solver(fes.GetComm()) + { + d = new ConstantCoefficient(-kappa); + q = new VectorFunctionCoefficient(fes.GetParMesh()->Dimension(), + velocity_profile); + + aq = new ScalarVectorProductCoefficient(alpha, *q); + + Mform.AddDomainIntegrator(new VectorFEMassIntegrator); + Mform.Assemble(0); + Mform.Finalize(); + + if (fes.IsDGSpace()) + { + M.Reset(Mform.ParallelAssemble(), true); + + inflow = new ConstantCoefficient(0.0); + bform.AddBdrFaceIntegrator( + new BoundaryFlowIntegrator(*inflow, *q, alpha)); + } + else + { + Kform.AddDomainIntegrator(new MixedWeakCurlCrossIntegrator(*aq)); + Kform.AddDomainIntegrator(new CurlCurlIntegrator(*d)); + Kform.Assemble(0); + + Array empty; + Kform.FormSystemMatrix(empty, K); + Mform.FormSystemMatrix(ess_tdofs_, M); + + bform.Assemble(); + b = bform.ParallelAssemble(); + } + + M_solver.iterative_mode = false; + M_solver.SetRelTol(1e-8); + M_solver.SetAbsTol(0.0); + M_solver.SetMaxIter(100); + M_solver.SetPrintLevel(0); + M_prec.SetType(HypreSmoother::Jacobi); + M_solver.SetPreconditioner(M_prec); + M_solver.SetOperator(*M); + + t1.SetSize(height); + t2.SetSize(height); + } + + void Mult(const Vector &u, Vector &du_dt) const override + { + K->Mult(u, t1); + t1.Add(1.0, *b); + M_solver.Mult(t1, du_dt); + du_dt.SetSubVector(ess_tdofs_, 0.0); + } + + ~ConvectionDiffusionTDO() + { + delete aq; + delete q; + delete d; + delete b; + } + + /// Mass form + ParBilinearForm Mform; + + /// Stiffness form. Might include diffusion, convection or both. + ParBilinearForm Kform; + + /// Mass opeperator + OperatorHandle M; + + /// Stiffness opeperator. Might include diffusion, convection or both. + OperatorHandle K; + + /// RHS form + ParLinearForm bform; + + /// RHS vector + Vector *b = nullptr; + + /// Velocity coefficient + VectorCoefficient *q = nullptr; + + /// alpha * Velocity coefficient + VectorCoefficient *aq = nullptr; + + /// Diffusion coefficient + Coefficient *d = nullptr; + + /// Inflow coefficient + Coefficient *inflow = nullptr; + + /// Essential true dof array. Relevant for eliminating boundary conditions + /// when using an H1 space. + Array ess_tdofs_; + + double current_dt = -1.0; + + /// Mass matrix solver + CGSolver M_solver; + + /// Mass matrix preconditioner + HypreSmoother M_prec; + + /// Auxiliary vectors + mutable Vector t1, t2; +}; + +int main(int argc, char *argv[]) +{ + Mpi::Init(); + Hypre::Init(); + int num_procs = Mpi::WorldSize(); + int myid = Mpi::WorldRank(); + + int order = 2; + double t_final = 5.0; + double dt = 1.0e-5; + bool visualization = true; + int vis_steps = 10; + + OptionsParser args(argc, argv); + args.AddOption(&order, "-o", "--order", + "Finite element order (polynomial degree)."); + args.AddOption(&t_final, "-tf", "--t-final", + "Final time; start time is 0."); + args.AddOption(&dt, "-dt", "--time-step", + "Time step."); + args.AddOption(&visualization, "-vis", "--visualization", "-no-vis", + "--no-visualization", + "Enable or disable GLVis visualization."); + args.AddOption(&vis_steps, "-vs", "--visualization-steps", + "Visualize every n-th timestep."); + args.ParseCheck(); + + Mesh *serial_mesh = new Mesh("multidomain-hex.mesh"); + ParMesh parent_mesh = ParMesh(MPI_COMM_WORLD, *serial_mesh); + delete serial_mesh; + + parent_mesh.UniformRefinement(); + + ND_FECollection fec(order, parent_mesh.Dimension()); + + // Create the sub-domains and accompanying Finite Element spaces from + // corresponding attributes. This specific mesh has two domain attributes and + // 9 boundary attributes. + Array cylinder_domain_attributes(1); + cylinder_domain_attributes[0] = 1; + + auto cylinder_submesh = + ParSubMesh::CreateFromDomain(parent_mesh, cylinder_domain_attributes); + + ParFiniteElementSpace fes_cylinder(&cylinder_submesh, &fec); + + Array inflow_attributes(cylinder_submesh.bdr_attributes.Max()); + inflow_attributes = 0; + inflow_attributes[7] = 1; + + Array inner_cylinder_wall_attributes( + cylinder_submesh.bdr_attributes.Max()); + inner_cylinder_wall_attributes = 0; + inner_cylinder_wall_attributes[8] = 1; + + // For the convection-diffusion equation inside the cylinder domain, the + // inflow surface and outer wall are treated as Dirichlet boundary + // conditions. + Array inflow_tdofs, interface_tdofs, ess_tdofs; + fes_cylinder.GetEssentialTrueDofs(inflow_attributes, inflow_tdofs); + fes_cylinder.GetEssentialTrueDofs(inner_cylinder_wall_attributes, + interface_tdofs); + ess_tdofs.Append(inflow_tdofs); + ess_tdofs.Append(interface_tdofs); + ess_tdofs.Sort(); + ess_tdofs.Unique(); + ConvectionDiffusionTDO cd_tdo(fes_cylinder, ess_tdofs); + + ParGridFunction temperature_cylinder_gf(&fes_cylinder); + temperature_cylinder_gf = 0.0; + + Vector temperature_cylinder; + temperature_cylinder_gf.GetTrueDofs(temperature_cylinder); + + RK3SSPSolver cd_ode_solver; + cd_ode_solver.Init(cd_tdo); + + Array outer_domain_attributes(1); + outer_domain_attributes[0] = 2; + + auto block_submesh = ParSubMesh::CreateFromDomain(parent_mesh, + outer_domain_attributes); + + ParFiniteElementSpace fes_block(&block_submesh, &fec); + + Array block_wall_attributes(block_submesh.bdr_attributes.Max()); + block_wall_attributes = 0; + block_wall_attributes[0] = 1; + block_wall_attributes[1] = 1; + block_wall_attributes[2] = 1; + block_wall_attributes[3] = 1; + + Array outer_cylinder_wall_attributes( + block_submesh.bdr_attributes.Max()); + outer_cylinder_wall_attributes = 0; + outer_cylinder_wall_attributes[8] = 1; + + fes_block.GetEssentialTrueDofs(block_wall_attributes, ess_tdofs); + + ConvectionDiffusionTDO d_tdo(fes_block, ess_tdofs, 0.0, 1.0); + + ParGridFunction temperature_block_gf(&fes_block); + temperature_block_gf = 0.0; + + VectorFunctionCoefficient one(3, square_xy); + temperature_block_gf.ProjectBdrCoefficientTangent(one, + block_wall_attributes); + + Vector temperature_block; + temperature_block_gf.GetTrueDofs(temperature_block); + + RK3SSPSolver d_ode_solver; + d_ode_solver.Init(d_tdo); + + Array cylinder_surface_attributes(1); + cylinder_surface_attributes[0] = 9; + + auto cylinder_surface_submesh = ParSubMesh::CreateFromBoundary(parent_mesh, + cylinder_surface_attributes); + + char vishost[] = "localhost"; + int visport = 19916; + socketstream cyl_sol_sock; + if (visualization) + { + cyl_sol_sock.open(vishost, visport); + cyl_sol_sock << "parallel " << num_procs << " " << myid << "\n"; + cyl_sol_sock.precision(8); + cyl_sol_sock << "solution\n" << cylinder_submesh << temperature_cylinder_gf << + "pause\n" << std::flush; + } + socketstream block_sol_sock; + if (visualization) + { + block_sol_sock.open(vishost, visport); + block_sol_sock << "parallel " << num_procs << " " << myid << "\n"; + block_sol_sock.precision(8); + block_sol_sock << "solution\n" << block_submesh << temperature_block_gf << + "pause\n" << std::flush; + } + + // Create the transfer map needed in the time integration loop + auto temperature_block_to_cylinder_map = ParSubMesh::CreateTransferMap( + temperature_block_gf, + temperature_cylinder_gf); + + double t = 0.0; + bool last_step = false; + for (int ti = 1; !last_step; ti++) + { + if (t + dt >= t_final - dt/2) + { + last_step = true; + } + + // Advance the diffusion equation on the outer block to the next time step + d_ode_solver.Step(temperature_block, t, dt); + { + // Transfer the solution from the inner surface of the outer block to + // the cylinder outer surface to act as a boundary condition. + temperature_block_gf.SetFromTrueDofs(temperature_block); + + temperature_block_to_cylinder_map.Transfer(temperature_block_gf, + temperature_cylinder_gf); + + temperature_cylinder_gf.GetTrueDofs(temperature_cylinder); + } + // Advance the convection-diffusion equation on the outer block to the + // next time step + cd_ode_solver.Step(temperature_cylinder, t, dt); + + if (last_step || (ti % vis_steps) == 0) + { + if (myid == 0) + { + out << "step " << ti << ", t = " << t << std::endl; + } + + temperature_cylinder_gf.SetFromTrueDofs(temperature_cylinder); + temperature_block_gf.SetFromTrueDofs(temperature_block); + + if (visualization) + { + cyl_sol_sock << "parallel " << num_procs << " " << myid << "\n"; + cyl_sol_sock << "solution\n" << cylinder_submesh << temperature_cylinder_gf << + std::flush; + block_sol_sock << "parallel " << num_procs << " " << myid << "\n"; + block_sol_sock << "solution\n" << block_submesh << temperature_block_gf << + std::flush; + } + } + } + + return 0; +} diff --git a/miniapps/multidomain/multidomain_rt.cpp b/miniapps/multidomain/multidomain_rt.cpp new file mode 100644 index 0000000000..538a03c715 --- /dev/null +++ b/miniapps/multidomain/multidomain_rt.cpp @@ -0,0 +1,431 @@ +// Copyright (c) 2010-2024, Lawrence 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. + +// This miniapp aims to demonstrate how to solve two PDEs, that represent +// different physics, on the same domain. MFEM's SubMesh interface is used to +// compute on and transfer between the spaces of predefined parts of the domain. +// For the sake of simplicity, the spaces on each domain are using the same +// order H1 finite elements. This does not mean that the approach is limited to +// this configuration. +// +// A 3D domain comprised of an outer box with a cylinder shaped inside is used. +// +// A heat equation is described on the outer box domain +// +// dT/dt = κΔT in outer box +// T = T_wall on outside wall +// ∇T•n = 0 on inside (cylinder) wall +// +// with temperature T and coefficient κ (non-physical in this example). +// +// A convection-diffusion equation is described inside the cylinder domain +// +// dT/dt = κΔT - α∇•(b T) in inner cylinder +// T = T_wall on cylinder wall (obtained from heat equation) +// ∇T•n = 0 else +// +// with temperature T, coefficients κ, α and prescribed velocity profile b. +// +// To couple the solutions of both equations, a segregated solve with one way +// coupling approach is used. The heat equation of the outer box is solved from +// the timestep T_box(t) to T_box(t+dt). Then for the convection-diffusion +// equation T_wall is set to T_box(t+dt) and the equation is solved for T(t+dt) +// which results in a first-order one way coupling. + +#include "mfem.hpp" +#include +#include + +using namespace mfem; + +// Prescribed velocity profile for the convection-diffusion equation inside the +// cylinder. The profile is constructed s.t. it approximates a no-slip (v=0) +// directly at the cylinder wall boundary. +void velocity_profile(const Vector &c, Vector &q) +{ + double x = c(0); + double y = c(1); + double z = c(2); + double A = -16.0 * pow(z - 0.5, 2) * M_E; + double r = sqrt(pow(x, 2.0) + pow(y, 2.0)); + + q(0) = 0.0; + q(1) = 0.0; + q(2) = 0.0; + + if (std::abs(r) >= 0.25 - 1e-8) + { + return; + } + else + { + const double qr = -A * r * exp(-16.0 * (pow(x, 2.0) + pow(y, 2.0))); + q(0) = qr * x; + q(1) = qr * y; + } +} + +void square_xy(const Vector &p, Vector &v) +{ + v.SetSize(3); + + v[0] = 2.0 * p[0]; + v[1] = 2.0 * p[1]; + v[2] = 0.0; +} + +/** + * @brief Convection-diffusion time dependent operator + * + * dT/dt = κΔT - α∇•(b T) + * + * Can also be used to create a diffusion or convection only operator by setting + * α or κ to zero. + */ +class ConvectionDiffusionTDO : public TimeDependentOperator +{ +public: + /** + * @brief Construct a new convection-diffusion time dependent operator. + * + * @param fes The ParFiniteElementSpace the solution is defined on + * @param ess_tdofs All essential true dofs (relevant if fes is using H1 + * finite elements) + * @param alpha The convection coefficient + * @param kappa The diffusion coefficient + */ + ConvectionDiffusionTDO(ParFiniteElementSpace &fes, + Array ess_tdofs, + double alpha = 1.0, + double kappa = 1.0e-1) + : TimeDependentOperator(fes.GetTrueVSize()), + Mform(&fes), + Kform(&fes), + bform(&fes), + ess_tdofs_(ess_tdofs), + M_solver(fes.GetComm()) + { + d = new ConstantCoefficient(-kappa); + q = new VectorFunctionCoefficient(fes.GetParMesh()->Dimension(), + velocity_profile); + + aq = new ScalarVectorProductCoefficient(alpha, *q); + + Mform.AddDomainIntegrator(new VectorFEMassIntegrator); + Mform.Assemble(0); + Mform.Finalize(); + + if (fes.IsDGSpace()) + { + M.Reset(Mform.ParallelAssemble(), true); + + inflow = new ConstantCoefficient(0.0); + bform.AddBdrFaceIntegrator( + new BoundaryFlowIntegrator(*inflow, *q, alpha)); + } + else + { + Kform.AddDomainIntegrator(new MixedWeakGradDotIntegrator(*aq)); + Kform.AddDomainIntegrator(new DivDivIntegrator(*d)); + Kform.Assemble(0); + + Array empty; + Kform.FormSystemMatrix(empty, K); + Mform.FormSystemMatrix(ess_tdofs_, M); + + bform.Assemble(); + b = bform.ParallelAssemble(); + } + + M_solver.iterative_mode = false; + M_solver.SetRelTol(1e-8); + M_solver.SetAbsTol(0.0); + M_solver.SetMaxIter(100); + M_solver.SetPrintLevel(0); + M_prec.SetType(HypreSmoother::Jacobi); + M_solver.SetPreconditioner(M_prec); + M_solver.SetOperator(*M); + + t1.SetSize(height); + t2.SetSize(height); + } + + void Mult(const Vector &u, Vector &du_dt) const override + { + K->Mult(u, t1); + t1.Add(1.0, *b); + M_solver.Mult(t1, du_dt); + du_dt.SetSubVector(ess_tdofs_, 0.0); + } + + ~ConvectionDiffusionTDO() + { + delete aq; + delete q; + delete d; + delete b; + } + + /// Mass form + ParBilinearForm Mform; + + /// Stiffness form. Might include diffusion, convection or both. + ParBilinearForm Kform; + + /// Mass opeperator + OperatorHandle M; + + /// Stiffness opeperator. Might include diffusion, convection or both. + OperatorHandle K; + + /// RHS form + ParLinearForm bform; + + /// RHS vector + Vector *b = nullptr; + + /// Velocity coefficient + VectorCoefficient *q = nullptr; + + /// alpha * Velocity coefficient + VectorCoefficient *aq = nullptr; + + /// Diffusion coefficient + Coefficient *d = nullptr; + + /// Inflow coefficient + Coefficient *inflow = nullptr; + + /// Essential true dof array. Relevant for eliminating boundary conditions + /// when using an H1 space. + Array ess_tdofs_; + + double current_dt = -1.0; + + /// Mass matrix solver + CGSolver M_solver; + + /// Mass matrix preconditioner + HypreSmoother M_prec; + + /// Auxiliary vectors + mutable Vector t1, t2; +}; + +int main(int argc, char *argv[]) +{ + Mpi::Init(); + Hypre::Init(); + int num_procs = Mpi::WorldSize(); + int myid = Mpi::WorldRank(); + + int order = 2; + double t_final = 5.0; + double dt = 1.0e-5; + bool visualization = true; + int vis_steps = 10; + + OptionsParser args(argc, argv); + args.AddOption(&order, "-o", "--order", + "Finite element order (polynomial degree)."); + args.AddOption(&t_final, "-tf", "--t-final", + "Final time; start time is 0."); + args.AddOption(&dt, "-dt", "--time-step", + "Time step."); + args.AddOption(&visualization, "-vis", "--visualization", "-no-vis", + "--no-visualization", + "Enable or disable GLVis visualization."); + args.AddOption(&vis_steps, "-vs", "--visualization-steps", + "Visualize every n-th timestep."); + args.ParseCheck(); + + Mesh *serial_mesh = new Mesh("multidomain-hex.mesh"); + ParMesh parent_mesh = ParMesh(MPI_COMM_WORLD, *serial_mesh); + delete serial_mesh; + + parent_mesh.UniformRefinement(); + + RT_FECollection fec(order, parent_mesh.Dimension()); + + // Create the sub-domains and accompanying Finite Element spaces from + // corresponding attributes. This specific mesh has two domain attributes and + // 9 boundary attributes. + Array cylinder_domain_attributes(1); + cylinder_domain_attributes[0] = 1; + + auto cylinder_submesh = + ParSubMesh::CreateFromDomain(parent_mesh, cylinder_domain_attributes); + + ParFiniteElementSpace fes_cylinder(&cylinder_submesh, &fec); + + Array inflow_attributes(cylinder_submesh.bdr_attributes.Max()); + inflow_attributes = 0; + inflow_attributes[5] = 1; + inflow_attributes[7] = 1; + + Array inner_cylinder_wall_attributes( + cylinder_submesh.bdr_attributes.Max()); + inner_cylinder_wall_attributes = 0; + inner_cylinder_wall_attributes[8] = 1; + + // For the convection-diffusion equation inside the cylinder domain, the + // inflow surface and outer wall are treated as Dirichlet boundary + // conditions. + Array inflow_tdofs, interface_tdofs, ess_tdofs; + fes_cylinder.GetEssentialTrueDofs(inflow_attributes, inflow_tdofs); + fes_cylinder.GetEssentialTrueDofs(inner_cylinder_wall_attributes, + interface_tdofs); + ess_tdofs.Append(inflow_tdofs); + ess_tdofs.Append(interface_tdofs); + ess_tdofs.Sort(); + ess_tdofs.Unique(); + ConvectionDiffusionTDO cd_tdo(fes_cylinder, ess_tdofs); + + ParGridFunction temperature_cylinder_gf(&fes_cylinder); + temperature_cylinder_gf = 0.0; + + Vector temperature_cylinder; + temperature_cylinder_gf.GetTrueDofs(temperature_cylinder); + + RK3SSPSolver cd_ode_solver; + cd_ode_solver.Init(cd_tdo); + + Array outer_domain_attributes(1); + outer_domain_attributes[0] = 2; + + auto block_submesh = ParSubMesh::CreateFromDomain(parent_mesh, + outer_domain_attributes); + { + std::ostringstream mesh_name; + mesh_name << "block_mesh." << std::setfill('0') << std::setw(6) << myid; + + std::ofstream mesh_ofs(mesh_name.str().c_str()); + mesh_ofs.precision(8); + block_submesh.Print(mesh_ofs); + } + { + std::ostringstream mesh_name; + mesh_name << "cylinder_mesh." << std::setfill('0') << std::setw(6) << myid; + + std::ofstream mesh_ofs(mesh_name.str().c_str()); + mesh_ofs.precision(8); + cylinder_submesh.Print(mesh_ofs); + } + + ParFiniteElementSpace fes_block(&block_submesh, &fec); + + Array block_wall_attributes(block_submesh.bdr_attributes.Max()); + block_wall_attributes = 1; + block_wall_attributes[8] = 0; + + Array outer_cylinder_wall_attributes( + block_submesh.bdr_attributes.Max()); + outer_cylinder_wall_attributes = 0; + outer_cylinder_wall_attributes[8] = 1; + + fes_block.GetEssentialTrueDofs(block_wall_attributes, ess_tdofs); + + ConvectionDiffusionTDO d_tdo(fes_block, ess_tdofs, 0.0, 1.0); + + ParGridFunction temperature_block_gf(&fes_block); + temperature_block_gf = 0.0; + + VectorFunctionCoefficient one(3, square_xy); + temperature_block_gf.ProjectBdrCoefficientNormal(one, + block_wall_attributes); + + Vector temperature_block; + temperature_block_gf.GetTrueDofs(temperature_block); + + RK3SSPSolver d_ode_solver; + d_ode_solver.Init(d_tdo); + + Array cylinder_surface_attributes(1); + cylinder_surface_attributes[0] = 9; + + auto cylinder_surface_submesh = ParSubMesh::CreateFromBoundary(parent_mesh, + cylinder_surface_attributes); + + char vishost[] = "localhost"; + int visport = 19916; + socketstream cyl_sol_sock; + if (visualization) + { + cyl_sol_sock.open(vishost, visport); + cyl_sol_sock << "parallel " << num_procs << " " << myid << "\n"; + cyl_sol_sock.precision(8); + cyl_sol_sock << "solution\n" << cylinder_submesh << temperature_cylinder_gf << + "pause\n" << std::flush; + } + socketstream block_sol_sock; + if (visualization) + { + block_sol_sock.open(vishost, visport); + block_sol_sock << "parallel " << num_procs << " " << myid << "\n"; + block_sol_sock.precision(8); + block_sol_sock << "solution\n" << block_submesh << temperature_block_gf << + "pause\n" << std::flush; + } + + // Create the transfer map needed in the time integration loop + auto temperature_block_to_cylinder_map = ParSubMesh::CreateTransferMap( + temperature_block_gf, + temperature_cylinder_gf); + + double t = 0.0; + bool last_step = false; + for (int ti = 1; !last_step; ti++) + { + if (t + dt >= t_final - dt/2) + { + last_step = true; + } + + // Advance the diffusion equation on the outer block to the next time step + d_ode_solver.Step(temperature_block, t, dt); + { + // Transfer the solution from the inner surface of the outer block to + // the cylinder outer surface to act as a boundary condition. + temperature_block_gf.SetFromTrueDofs(temperature_block); + + temperature_block_to_cylinder_map.Transfer(temperature_block_gf, + temperature_cylinder_gf); + + temperature_cylinder_gf.GetTrueDofs(temperature_cylinder); + } + // Advance the convection-diffusion equation on the outer block to the + // next time step + cd_ode_solver.Step(temperature_cylinder, t, dt); + + if (last_step || (ti % vis_steps) == 0) + { + if (myid == 0) + { + out << "step " << ti << ", t = " << t << std::endl; + } + + temperature_cylinder_gf.SetFromTrueDofs(temperature_cylinder); + temperature_block_gf.SetFromTrueDofs(temperature_block); + + if (visualization) + { + cyl_sol_sock << "parallel " << num_procs << " " << myid << "\n"; + cyl_sol_sock << "solution\n" << cylinder_submesh << temperature_cylinder_gf << + std::flush; + block_sol_sock << "parallel " << num_procs << " " << myid << "\n"; + block_sol_sock << "solution\n" << block_submesh << temperature_block_gf << + std::flush; + } + } + } + + return 0; +} From ef07982ea4b71c7e94c077761008693e5a806ec5 Mon Sep 17 00:00:00 2001 From: "Stowell, Mark L" Date: Sun, 4 Feb 2024 20:16:40 -0800 Subject: [PATCH 175/200] Removing variants of multidomain miniapp --- miniapps/multidomain/multidomain_nd.cpp | 413 ----------------------- miniapps/multidomain/multidomain_rt.cpp | 431 ------------------------ 2 files changed, 844 deletions(-) delete mode 100644 miniapps/multidomain/multidomain_nd.cpp delete mode 100644 miniapps/multidomain/multidomain_rt.cpp diff --git a/miniapps/multidomain/multidomain_nd.cpp b/miniapps/multidomain/multidomain_nd.cpp deleted file mode 100644 index 75e43d7761..0000000000 --- a/miniapps/multidomain/multidomain_nd.cpp +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright (c) 2010-2024, Lawrence 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. - -// This miniapp aims to demonstrate how to solve two PDEs, that represent -// different physics, on the same domain. MFEM's SubMesh interface is used to -// compute on and transfer between the spaces of predefined parts of the domain. -// For the sake of simplicity, the spaces on each domain are using the same -// order H1 finite elements. This does not mean that the approach is limited to -// this configuration. -// -// A 3D domain comprised of an outer box with a cylinder shaped inside is used. -// -// A heat equation is described on the outer box domain -// -// dT/dt = κΔT in outer box -// T = T_wall on outside wall -// ∇T•n = 0 on inside (cylinder) wall -// -// with temperature T and coefficient κ (non-physical in this example). -// -// A convection-diffusion equation is described inside the cylinder domain -// -// dT/dt = κΔT - α∇•(b T) in inner cylinder -// T = T_wall on cylinder wall (obtained from heat equation) -// ∇T•n = 0 else -// -// with temperature T, coefficients κ, α and prescribed velocity profile b. -// -// To couple the solutions of both equations, a segregated solve with one way -// coupling approach is used. The heat equation of the outer box is solved from -// the timestep T_box(t) to T_box(t+dt). Then for the convection-diffusion -// equation T_wall is set to T_box(t+dt) and the equation is solved for T(t+dt) -// which results in a first-order one way coupling. - -#include "mfem.hpp" -#include -#include - -using namespace mfem; - -// Prescribed velocity profile for the convection-diffusion equation inside the -// cylinder. The profile is constructed s.t. it approximates a no-slip (v=0) -// directly at the cylinder wall boundary. -void velocity_profile(const Vector &c, Vector &q) -{ - double A = 1.0; - double x = c(0); - double y = c(1); - double r = sqrt(pow(x, 2.0) + pow(y, 2.0)); - - q(0) = 0.0; - q(1) = 0.0; - - if (std::abs(r) >= 0.25 - 1e-8) - { - q(2) = 0.0; - } - else - { - q(2) = -A * exp(-(pow(x, 2.0) / 2.0 + pow(y, 2.0) / 2.0)); - } -} - -void square_xy(const Vector &p, Vector &v) -{ - v.SetSize(3); - - v[0] = -2.0 * p[1]; - v[1] = 2.0 * p[0]; - v[2] = 0.0; -} - -/** - * @brief Convection-diffusion time dependent operator - * - * dT/dt = κΔT - α∇•(b T) - * - * Can also be used to create a diffusion or convection only operator by setting - * α or κ to zero. - */ -class ConvectionDiffusionTDO : public TimeDependentOperator -{ -public: - /** - * @brief Construct a new convection-diffusion time dependent operator. - * - * @param fes The ParFiniteElementSpace the solution is defined on - * @param ess_tdofs All essential true dofs (relevant if fes is using H1 - * finite elements) - * @param alpha The convection coefficient - * @param kappa The diffusion coefficient - */ - ConvectionDiffusionTDO(ParFiniteElementSpace &fes, - Array ess_tdofs, - double alpha = 1.0, - double kappa = 1.0e-1) - : TimeDependentOperator(fes.GetTrueVSize()), - Mform(&fes), - Kform(&fes), - bform(&fes), - ess_tdofs_(ess_tdofs), - M_solver(fes.GetComm()) - { - d = new ConstantCoefficient(-kappa); - q = new VectorFunctionCoefficient(fes.GetParMesh()->Dimension(), - velocity_profile); - - aq = new ScalarVectorProductCoefficient(alpha, *q); - - Mform.AddDomainIntegrator(new VectorFEMassIntegrator); - Mform.Assemble(0); - Mform.Finalize(); - - if (fes.IsDGSpace()) - { - M.Reset(Mform.ParallelAssemble(), true); - - inflow = new ConstantCoefficient(0.0); - bform.AddBdrFaceIntegrator( - new BoundaryFlowIntegrator(*inflow, *q, alpha)); - } - else - { - Kform.AddDomainIntegrator(new MixedWeakCurlCrossIntegrator(*aq)); - Kform.AddDomainIntegrator(new CurlCurlIntegrator(*d)); - Kform.Assemble(0); - - Array empty; - Kform.FormSystemMatrix(empty, K); - Mform.FormSystemMatrix(ess_tdofs_, M); - - bform.Assemble(); - b = bform.ParallelAssemble(); - } - - M_solver.iterative_mode = false; - M_solver.SetRelTol(1e-8); - M_solver.SetAbsTol(0.0); - M_solver.SetMaxIter(100); - M_solver.SetPrintLevel(0); - M_prec.SetType(HypreSmoother::Jacobi); - M_solver.SetPreconditioner(M_prec); - M_solver.SetOperator(*M); - - t1.SetSize(height); - t2.SetSize(height); - } - - void Mult(const Vector &u, Vector &du_dt) const override - { - K->Mult(u, t1); - t1.Add(1.0, *b); - M_solver.Mult(t1, du_dt); - du_dt.SetSubVector(ess_tdofs_, 0.0); - } - - ~ConvectionDiffusionTDO() - { - delete aq; - delete q; - delete d; - delete b; - } - - /// Mass form - ParBilinearForm Mform; - - /// Stiffness form. Might include diffusion, convection or both. - ParBilinearForm Kform; - - /// Mass opeperator - OperatorHandle M; - - /// Stiffness opeperator. Might include diffusion, convection or both. - OperatorHandle K; - - /// RHS form - ParLinearForm bform; - - /// RHS vector - Vector *b = nullptr; - - /// Velocity coefficient - VectorCoefficient *q = nullptr; - - /// alpha * Velocity coefficient - VectorCoefficient *aq = nullptr; - - /// Diffusion coefficient - Coefficient *d = nullptr; - - /// Inflow coefficient - Coefficient *inflow = nullptr; - - /// Essential true dof array. Relevant for eliminating boundary conditions - /// when using an H1 space. - Array ess_tdofs_; - - double current_dt = -1.0; - - /// Mass matrix solver - CGSolver M_solver; - - /// Mass matrix preconditioner - HypreSmoother M_prec; - - /// Auxiliary vectors - mutable Vector t1, t2; -}; - -int main(int argc, char *argv[]) -{ - Mpi::Init(); - Hypre::Init(); - int num_procs = Mpi::WorldSize(); - int myid = Mpi::WorldRank(); - - int order = 2; - double t_final = 5.0; - double dt = 1.0e-5; - bool visualization = true; - int vis_steps = 10; - - OptionsParser args(argc, argv); - args.AddOption(&order, "-o", "--order", - "Finite element order (polynomial degree)."); - args.AddOption(&t_final, "-tf", "--t-final", - "Final time; start time is 0."); - args.AddOption(&dt, "-dt", "--time-step", - "Time step."); - args.AddOption(&visualization, "-vis", "--visualization", "-no-vis", - "--no-visualization", - "Enable or disable GLVis visualization."); - args.AddOption(&vis_steps, "-vs", "--visualization-steps", - "Visualize every n-th timestep."); - args.ParseCheck(); - - Mesh *serial_mesh = new Mesh("multidomain-hex.mesh"); - ParMesh parent_mesh = ParMesh(MPI_COMM_WORLD, *serial_mesh); - delete serial_mesh; - - parent_mesh.UniformRefinement(); - - ND_FECollection fec(order, parent_mesh.Dimension()); - - // Create the sub-domains and accompanying Finite Element spaces from - // corresponding attributes. This specific mesh has two domain attributes and - // 9 boundary attributes. - Array cylinder_domain_attributes(1); - cylinder_domain_attributes[0] = 1; - - auto cylinder_submesh = - ParSubMesh::CreateFromDomain(parent_mesh, cylinder_domain_attributes); - - ParFiniteElementSpace fes_cylinder(&cylinder_submesh, &fec); - - Array inflow_attributes(cylinder_submesh.bdr_attributes.Max()); - inflow_attributes = 0; - inflow_attributes[7] = 1; - - Array inner_cylinder_wall_attributes( - cylinder_submesh.bdr_attributes.Max()); - inner_cylinder_wall_attributes = 0; - inner_cylinder_wall_attributes[8] = 1; - - // For the convection-diffusion equation inside the cylinder domain, the - // inflow surface and outer wall are treated as Dirichlet boundary - // conditions. - Array inflow_tdofs, interface_tdofs, ess_tdofs; - fes_cylinder.GetEssentialTrueDofs(inflow_attributes, inflow_tdofs); - fes_cylinder.GetEssentialTrueDofs(inner_cylinder_wall_attributes, - interface_tdofs); - ess_tdofs.Append(inflow_tdofs); - ess_tdofs.Append(interface_tdofs); - ess_tdofs.Sort(); - ess_tdofs.Unique(); - ConvectionDiffusionTDO cd_tdo(fes_cylinder, ess_tdofs); - - ParGridFunction temperature_cylinder_gf(&fes_cylinder); - temperature_cylinder_gf = 0.0; - - Vector temperature_cylinder; - temperature_cylinder_gf.GetTrueDofs(temperature_cylinder); - - RK3SSPSolver cd_ode_solver; - cd_ode_solver.Init(cd_tdo); - - Array outer_domain_attributes(1); - outer_domain_attributes[0] = 2; - - auto block_submesh = ParSubMesh::CreateFromDomain(parent_mesh, - outer_domain_attributes); - - ParFiniteElementSpace fes_block(&block_submesh, &fec); - - Array block_wall_attributes(block_submesh.bdr_attributes.Max()); - block_wall_attributes = 0; - block_wall_attributes[0] = 1; - block_wall_attributes[1] = 1; - block_wall_attributes[2] = 1; - block_wall_attributes[3] = 1; - - Array outer_cylinder_wall_attributes( - block_submesh.bdr_attributes.Max()); - outer_cylinder_wall_attributes = 0; - outer_cylinder_wall_attributes[8] = 1; - - fes_block.GetEssentialTrueDofs(block_wall_attributes, ess_tdofs); - - ConvectionDiffusionTDO d_tdo(fes_block, ess_tdofs, 0.0, 1.0); - - ParGridFunction temperature_block_gf(&fes_block); - temperature_block_gf = 0.0; - - VectorFunctionCoefficient one(3, square_xy); - temperature_block_gf.ProjectBdrCoefficientTangent(one, - block_wall_attributes); - - Vector temperature_block; - temperature_block_gf.GetTrueDofs(temperature_block); - - RK3SSPSolver d_ode_solver; - d_ode_solver.Init(d_tdo); - - Array cylinder_surface_attributes(1); - cylinder_surface_attributes[0] = 9; - - auto cylinder_surface_submesh = ParSubMesh::CreateFromBoundary(parent_mesh, - cylinder_surface_attributes); - - char vishost[] = "localhost"; - int visport = 19916; - socketstream cyl_sol_sock; - if (visualization) - { - cyl_sol_sock.open(vishost, visport); - cyl_sol_sock << "parallel " << num_procs << " " << myid << "\n"; - cyl_sol_sock.precision(8); - cyl_sol_sock << "solution\n" << cylinder_submesh << temperature_cylinder_gf << - "pause\n" << std::flush; - } - socketstream block_sol_sock; - if (visualization) - { - block_sol_sock.open(vishost, visport); - block_sol_sock << "parallel " << num_procs << " " << myid << "\n"; - block_sol_sock.precision(8); - block_sol_sock << "solution\n" << block_submesh << temperature_block_gf << - "pause\n" << std::flush; - } - - // Create the transfer map needed in the time integration loop - auto temperature_block_to_cylinder_map = ParSubMesh::CreateTransferMap( - temperature_block_gf, - temperature_cylinder_gf); - - double t = 0.0; - bool last_step = false; - for (int ti = 1; !last_step; ti++) - { - if (t + dt >= t_final - dt/2) - { - last_step = true; - } - - // Advance the diffusion equation on the outer block to the next time step - d_ode_solver.Step(temperature_block, t, dt); - { - // Transfer the solution from the inner surface of the outer block to - // the cylinder outer surface to act as a boundary condition. - temperature_block_gf.SetFromTrueDofs(temperature_block); - - temperature_block_to_cylinder_map.Transfer(temperature_block_gf, - temperature_cylinder_gf); - - temperature_cylinder_gf.GetTrueDofs(temperature_cylinder); - } - // Advance the convection-diffusion equation on the outer block to the - // next time step - cd_ode_solver.Step(temperature_cylinder, t, dt); - - if (last_step || (ti % vis_steps) == 0) - { - if (myid == 0) - { - out << "step " << ti << ", t = " << t << std::endl; - } - - temperature_cylinder_gf.SetFromTrueDofs(temperature_cylinder); - temperature_block_gf.SetFromTrueDofs(temperature_block); - - if (visualization) - { - cyl_sol_sock << "parallel " << num_procs << " " << myid << "\n"; - cyl_sol_sock << "solution\n" << cylinder_submesh << temperature_cylinder_gf << - std::flush; - block_sol_sock << "parallel " << num_procs << " " << myid << "\n"; - block_sol_sock << "solution\n" << block_submesh << temperature_block_gf << - std::flush; - } - } - } - - return 0; -} diff --git a/miniapps/multidomain/multidomain_rt.cpp b/miniapps/multidomain/multidomain_rt.cpp deleted file mode 100644 index 538a03c715..0000000000 --- a/miniapps/multidomain/multidomain_rt.cpp +++ /dev/null @@ -1,431 +0,0 @@ -// Copyright (c) 2010-2024, Lawrence 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. - -// This miniapp aims to demonstrate how to solve two PDEs, that represent -// different physics, on the same domain. MFEM's SubMesh interface is used to -// compute on and transfer between the spaces of predefined parts of the domain. -// For the sake of simplicity, the spaces on each domain are using the same -// order H1 finite elements. This does not mean that the approach is limited to -// this configuration. -// -// A 3D domain comprised of an outer box with a cylinder shaped inside is used. -// -// A heat equation is described on the outer box domain -// -// dT/dt = κΔT in outer box -// T = T_wall on outside wall -// ∇T•n = 0 on inside (cylinder) wall -// -// with temperature T and coefficient κ (non-physical in this example). -// -// A convection-diffusion equation is described inside the cylinder domain -// -// dT/dt = κΔT - α∇•(b T) in inner cylinder -// T = T_wall on cylinder wall (obtained from heat equation) -// ∇T•n = 0 else -// -// with temperature T, coefficients κ, α and prescribed velocity profile b. -// -// To couple the solutions of both equations, a segregated solve with one way -// coupling approach is used. The heat equation of the outer box is solved from -// the timestep T_box(t) to T_box(t+dt). Then for the convection-diffusion -// equation T_wall is set to T_box(t+dt) and the equation is solved for T(t+dt) -// which results in a first-order one way coupling. - -#include "mfem.hpp" -#include -#include - -using namespace mfem; - -// Prescribed velocity profile for the convection-diffusion equation inside the -// cylinder. The profile is constructed s.t. it approximates a no-slip (v=0) -// directly at the cylinder wall boundary. -void velocity_profile(const Vector &c, Vector &q) -{ - double x = c(0); - double y = c(1); - double z = c(2); - double A = -16.0 * pow(z - 0.5, 2) * M_E; - double r = sqrt(pow(x, 2.0) + pow(y, 2.0)); - - q(0) = 0.0; - q(1) = 0.0; - q(2) = 0.0; - - if (std::abs(r) >= 0.25 - 1e-8) - { - return; - } - else - { - const double qr = -A * r * exp(-16.0 * (pow(x, 2.0) + pow(y, 2.0))); - q(0) = qr * x; - q(1) = qr * y; - } -} - -void square_xy(const Vector &p, Vector &v) -{ - v.SetSize(3); - - v[0] = 2.0 * p[0]; - v[1] = 2.0 * p[1]; - v[2] = 0.0; -} - -/** - * @brief Convection-diffusion time dependent operator - * - * dT/dt = κΔT - α∇•(b T) - * - * Can also be used to create a diffusion or convection only operator by setting - * α or κ to zero. - */ -class ConvectionDiffusionTDO : public TimeDependentOperator -{ -public: - /** - * @brief Construct a new convection-diffusion time dependent operator. - * - * @param fes The ParFiniteElementSpace the solution is defined on - * @param ess_tdofs All essential true dofs (relevant if fes is using H1 - * finite elements) - * @param alpha The convection coefficient - * @param kappa The diffusion coefficient - */ - ConvectionDiffusionTDO(ParFiniteElementSpace &fes, - Array ess_tdofs, - double alpha = 1.0, - double kappa = 1.0e-1) - : TimeDependentOperator(fes.GetTrueVSize()), - Mform(&fes), - Kform(&fes), - bform(&fes), - ess_tdofs_(ess_tdofs), - M_solver(fes.GetComm()) - { - d = new ConstantCoefficient(-kappa); - q = new VectorFunctionCoefficient(fes.GetParMesh()->Dimension(), - velocity_profile); - - aq = new ScalarVectorProductCoefficient(alpha, *q); - - Mform.AddDomainIntegrator(new VectorFEMassIntegrator); - Mform.Assemble(0); - Mform.Finalize(); - - if (fes.IsDGSpace()) - { - M.Reset(Mform.ParallelAssemble(), true); - - inflow = new ConstantCoefficient(0.0); - bform.AddBdrFaceIntegrator( - new BoundaryFlowIntegrator(*inflow, *q, alpha)); - } - else - { - Kform.AddDomainIntegrator(new MixedWeakGradDotIntegrator(*aq)); - Kform.AddDomainIntegrator(new DivDivIntegrator(*d)); - Kform.Assemble(0); - - Array empty; - Kform.FormSystemMatrix(empty, K); - Mform.FormSystemMatrix(ess_tdofs_, M); - - bform.Assemble(); - b = bform.ParallelAssemble(); - } - - M_solver.iterative_mode = false; - M_solver.SetRelTol(1e-8); - M_solver.SetAbsTol(0.0); - M_solver.SetMaxIter(100); - M_solver.SetPrintLevel(0); - M_prec.SetType(HypreSmoother::Jacobi); - M_solver.SetPreconditioner(M_prec); - M_solver.SetOperator(*M); - - t1.SetSize(height); - t2.SetSize(height); - } - - void Mult(const Vector &u, Vector &du_dt) const override - { - K->Mult(u, t1); - t1.Add(1.0, *b); - M_solver.Mult(t1, du_dt); - du_dt.SetSubVector(ess_tdofs_, 0.0); - } - - ~ConvectionDiffusionTDO() - { - delete aq; - delete q; - delete d; - delete b; - } - - /// Mass form - ParBilinearForm Mform; - - /// Stiffness form. Might include diffusion, convection or both. - ParBilinearForm Kform; - - /// Mass opeperator - OperatorHandle M; - - /// Stiffness opeperator. Might include diffusion, convection or both. - OperatorHandle K; - - /// RHS form - ParLinearForm bform; - - /// RHS vector - Vector *b = nullptr; - - /// Velocity coefficient - VectorCoefficient *q = nullptr; - - /// alpha * Velocity coefficient - VectorCoefficient *aq = nullptr; - - /// Diffusion coefficient - Coefficient *d = nullptr; - - /// Inflow coefficient - Coefficient *inflow = nullptr; - - /// Essential true dof array. Relevant for eliminating boundary conditions - /// when using an H1 space. - Array ess_tdofs_; - - double current_dt = -1.0; - - /// Mass matrix solver - CGSolver M_solver; - - /// Mass matrix preconditioner - HypreSmoother M_prec; - - /// Auxiliary vectors - mutable Vector t1, t2; -}; - -int main(int argc, char *argv[]) -{ - Mpi::Init(); - Hypre::Init(); - int num_procs = Mpi::WorldSize(); - int myid = Mpi::WorldRank(); - - int order = 2; - double t_final = 5.0; - double dt = 1.0e-5; - bool visualization = true; - int vis_steps = 10; - - OptionsParser args(argc, argv); - args.AddOption(&order, "-o", "--order", - "Finite element order (polynomial degree)."); - args.AddOption(&t_final, "-tf", "--t-final", - "Final time; start time is 0."); - args.AddOption(&dt, "-dt", "--time-step", - "Time step."); - args.AddOption(&visualization, "-vis", "--visualization", "-no-vis", - "--no-visualization", - "Enable or disable GLVis visualization."); - args.AddOption(&vis_steps, "-vs", "--visualization-steps", - "Visualize every n-th timestep."); - args.ParseCheck(); - - Mesh *serial_mesh = new Mesh("multidomain-hex.mesh"); - ParMesh parent_mesh = ParMesh(MPI_COMM_WORLD, *serial_mesh); - delete serial_mesh; - - parent_mesh.UniformRefinement(); - - RT_FECollection fec(order, parent_mesh.Dimension()); - - // Create the sub-domains and accompanying Finite Element spaces from - // corresponding attributes. This specific mesh has two domain attributes and - // 9 boundary attributes. - Array cylinder_domain_attributes(1); - cylinder_domain_attributes[0] = 1; - - auto cylinder_submesh = - ParSubMesh::CreateFromDomain(parent_mesh, cylinder_domain_attributes); - - ParFiniteElementSpace fes_cylinder(&cylinder_submesh, &fec); - - Array inflow_attributes(cylinder_submesh.bdr_attributes.Max()); - inflow_attributes = 0; - inflow_attributes[5] = 1; - inflow_attributes[7] = 1; - - Array inner_cylinder_wall_attributes( - cylinder_submesh.bdr_attributes.Max()); - inner_cylinder_wall_attributes = 0; - inner_cylinder_wall_attributes[8] = 1; - - // For the convection-diffusion equation inside the cylinder domain, the - // inflow surface and outer wall are treated as Dirichlet boundary - // conditions. - Array inflow_tdofs, interface_tdofs, ess_tdofs; - fes_cylinder.GetEssentialTrueDofs(inflow_attributes, inflow_tdofs); - fes_cylinder.GetEssentialTrueDofs(inner_cylinder_wall_attributes, - interface_tdofs); - ess_tdofs.Append(inflow_tdofs); - ess_tdofs.Append(interface_tdofs); - ess_tdofs.Sort(); - ess_tdofs.Unique(); - ConvectionDiffusionTDO cd_tdo(fes_cylinder, ess_tdofs); - - ParGridFunction temperature_cylinder_gf(&fes_cylinder); - temperature_cylinder_gf = 0.0; - - Vector temperature_cylinder; - temperature_cylinder_gf.GetTrueDofs(temperature_cylinder); - - RK3SSPSolver cd_ode_solver; - cd_ode_solver.Init(cd_tdo); - - Array outer_domain_attributes(1); - outer_domain_attributes[0] = 2; - - auto block_submesh = ParSubMesh::CreateFromDomain(parent_mesh, - outer_domain_attributes); - { - std::ostringstream mesh_name; - mesh_name << "block_mesh." << std::setfill('0') << std::setw(6) << myid; - - std::ofstream mesh_ofs(mesh_name.str().c_str()); - mesh_ofs.precision(8); - block_submesh.Print(mesh_ofs); - } - { - std::ostringstream mesh_name; - mesh_name << "cylinder_mesh." << std::setfill('0') << std::setw(6) << myid; - - std::ofstream mesh_ofs(mesh_name.str().c_str()); - mesh_ofs.precision(8); - cylinder_submesh.Print(mesh_ofs); - } - - ParFiniteElementSpace fes_block(&block_submesh, &fec); - - Array block_wall_attributes(block_submesh.bdr_attributes.Max()); - block_wall_attributes = 1; - block_wall_attributes[8] = 0; - - Array outer_cylinder_wall_attributes( - block_submesh.bdr_attributes.Max()); - outer_cylinder_wall_attributes = 0; - outer_cylinder_wall_attributes[8] = 1; - - fes_block.GetEssentialTrueDofs(block_wall_attributes, ess_tdofs); - - ConvectionDiffusionTDO d_tdo(fes_block, ess_tdofs, 0.0, 1.0); - - ParGridFunction temperature_block_gf(&fes_block); - temperature_block_gf = 0.0; - - VectorFunctionCoefficient one(3, square_xy); - temperature_block_gf.ProjectBdrCoefficientNormal(one, - block_wall_attributes); - - Vector temperature_block; - temperature_block_gf.GetTrueDofs(temperature_block); - - RK3SSPSolver d_ode_solver; - d_ode_solver.Init(d_tdo); - - Array cylinder_surface_attributes(1); - cylinder_surface_attributes[0] = 9; - - auto cylinder_surface_submesh = ParSubMesh::CreateFromBoundary(parent_mesh, - cylinder_surface_attributes); - - char vishost[] = "localhost"; - int visport = 19916; - socketstream cyl_sol_sock; - if (visualization) - { - cyl_sol_sock.open(vishost, visport); - cyl_sol_sock << "parallel " << num_procs << " " << myid << "\n"; - cyl_sol_sock.precision(8); - cyl_sol_sock << "solution\n" << cylinder_submesh << temperature_cylinder_gf << - "pause\n" << std::flush; - } - socketstream block_sol_sock; - if (visualization) - { - block_sol_sock.open(vishost, visport); - block_sol_sock << "parallel " << num_procs << " " << myid << "\n"; - block_sol_sock.precision(8); - block_sol_sock << "solution\n" << block_submesh << temperature_block_gf << - "pause\n" << std::flush; - } - - // Create the transfer map needed in the time integration loop - auto temperature_block_to_cylinder_map = ParSubMesh::CreateTransferMap( - temperature_block_gf, - temperature_cylinder_gf); - - double t = 0.0; - bool last_step = false; - for (int ti = 1; !last_step; ti++) - { - if (t + dt >= t_final - dt/2) - { - last_step = true; - } - - // Advance the diffusion equation on the outer block to the next time step - d_ode_solver.Step(temperature_block, t, dt); - { - // Transfer the solution from the inner surface of the outer block to - // the cylinder outer surface to act as a boundary condition. - temperature_block_gf.SetFromTrueDofs(temperature_block); - - temperature_block_to_cylinder_map.Transfer(temperature_block_gf, - temperature_cylinder_gf); - - temperature_cylinder_gf.GetTrueDofs(temperature_cylinder); - } - // Advance the convection-diffusion equation on the outer block to the - // next time step - cd_ode_solver.Step(temperature_cylinder, t, dt); - - if (last_step || (ti % vis_steps) == 0) - { - if (myid == 0) - { - out << "step " << ti << ", t = " << t << std::endl; - } - - temperature_cylinder_gf.SetFromTrueDofs(temperature_cylinder); - temperature_block_gf.SetFromTrueDofs(temperature_block); - - if (visualization) - { - cyl_sol_sock << "parallel " << num_procs << " " << myid << "\n"; - cyl_sol_sock << "solution\n" << cylinder_submesh << temperature_cylinder_gf << - std::flush; - block_sol_sock << "parallel " << num_procs << " " << myid << "\n"; - block_sol_sock << "solution\n" << block_submesh << temperature_block_gf << - std::flush; - } - } - } - - return 0; -} From 5480f0833fce01ce4183d33adab7d63b45cf28be Mon Sep 17 00:00:00 2001 From: Sebastian Grimberg Date: Mon, 5 Feb 2024 08:38:18 -0800 Subject: [PATCH 176/200] Fix missing using in ElasticityComponentIntegrator --- fem/bilininteg.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/bilininteg.hpp b/fem/bilininteg.hpp index 494a4c74bc..de671d9ba4 100644 --- a/fem/bilininteg.hpp +++ b/fem/bilininteg.hpp @@ -300,7 +300,6 @@ public: FaceElementTransformations &Trans, DenseMatrix &elmat); - using BilinearFormIntegrator::AssemblePA; virtual void AssemblePA(const FiniteElementSpace& fes) { bfi->AssemblePA(fes); @@ -3084,6 +3083,7 @@ public: /// 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, From 2e71be8a833f50454c5ba3194862c983146e693b Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Mon, 5 Feb 2024 11:24:15 -0800 Subject: [PATCH 177/200] Split Det2D into Det2D and Det2DSurface --- fem/qinterp/det.cpp | 191 ++++++++++++++++++++++++-------------------- 1 file changed, 104 insertions(+), 87 deletions(-) diff --git a/fem/qinterp/det.cpp b/fem/qinterp/det.cpp index 437edb7ead..523a7a48a8 100644 --- a/fem/qinterp/det.cpp +++ b/fem/qinterp/det.cpp @@ -58,10 +58,10 @@ static void Det2D(const int NE, const double *g, const double *x, double *y, - const int sdim, const int d1d = 0, const int q1d = 0) { + static constexpr int SDIM = 2; static constexpr int NBZ = 1; const int D1D = T_D1D ? T_D1D : d1d; @@ -69,117 +69,132 @@ 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, sdim, NE); + const auto X = Reshape(x, D1D, D1D, SDIM, NE); auto Y = Reshape(y, Q1D, Q1D, NE); - if (sdim == 2) + mfem::forall_2D_batch(NE, Q1D, Q1D, NBZ, [=] MFEM_HOST_DEVICE (int e) { - 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; + + MFEM_SHARED double BG[2][MQ1*MD1]; + 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); + + kernels::internal::GradX(D1D,Q1D,BG,XY,DQ); + kernels::internal::GradY(D1D,Q1D,BG,DQ,QQ); + + MFEM_FOREACH_THREAD(qy,y,Q1D) { - 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; - - 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]; - - kernels::internal::LoadX(e,D1D,X,XY); - kernels::internal::LoadBG(D1D,Q1D,B,G,BG); - - kernels::internal::GradX(D1D,Q1D,BG,XY,DQ); - kernels::internal::GradY(D1D,Q1D,BG,DQ,QQ); - - MFEM_FOREACH_THREAD(qy,y,Q1D) + MFEM_FOREACH_THREAD(qx,x,Q1D) { - MFEM_FOREACH_THREAD(qx,x,Q1D) - { - double J[4]; - kernels::internal::PullGrad(Q1D,qx,qy,QQ,J); - Y(qx,qy,e) = kernels::Det<2>(J); - } + double J[4]; + kernels::internal::PullGrad(Q1D,qx,qy,QQ,J); + Y(qx,qy,e) = kernels::Det<2>(J); } - }); - } - else + } + }); +} + +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) { - static constexpr int SDIM = 3; - 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) { - 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) { - MFEM_FOREACH_THREAD(dx,x,D1D) + for (int d = 0; d < SDIM; ++d) { - for (int d = 0; d < SDIM; ++d) - { - XYZ[d][tidz][dx + dy*D1D] = X(dx,dy,d,e); - } + XYZ[d][tidz][dx + dy*D1D] = X(dx,dy,d,e); } } - MFEM_SYNC_THREAD; + } + MFEM_SYNC_THREAD; - ConstDeviceMatrix B_mat(BG[0], D1D, Q1D); - ConstDeviceMatrix G_mat(BG[1], D1D, Q1D); + ConstDeviceMatrix B_mat(BG[0], D1D, Q1D); + ConstDeviceMatrix G_mat(BG[1], D1D, Q1D); - // x contraction - MFEM_FOREACH_THREAD(dy,y,D1D) + // x contraction + MFEM_FOREACH_THREAD(dy,y,D1D) + { + MFEM_FOREACH_THREAD(qx,x,Q1D) { - MFEM_FOREACH_THREAD(qx,x,Q1D) + for (int d = 0; d < SDIM; ++d) { - for (int d = 0; d < SDIM; ++d) + double u = 0.0; + double v = 0.0; + for (int dx = 0; dx < D1D; ++dx) { - 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; + 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_SYNC_THREAD; + // y contraction and determinant computation + MFEM_FOREACH_THREAD(qy,y,Q1D) + { + MFEM_FOREACH_THREAD(qx,x,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) { - 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) { - 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); - } + 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); } + 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 @@ -309,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; } } From 6db3c3b136576d746ad6c718fa55395ad4829d3c Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Mon, 5 Feb 2024 11:31:23 -0800 Subject: [PATCH 178/200] Bugfix --- fem/qinterp/det.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fem/qinterp/det.cpp b/fem/qinterp/det.cpp index 523a7a48a8..fdcd504155 100644 --- a/fem/qinterp/det.cpp +++ b/fem/qinterp/det.cpp @@ -307,15 +307,15 @@ void TensorDeterminants(const int NE, { switch (id) { - case 0x222: return Det2D<2,2>(NE,B,G,X,Y,2); - case 0x223: return Det2D<2,3>(NE,B,G,X,Y,2); - case 0x224: return Det2D<2,4>(NE,B,G,X,Y,2); - case 0x226: return Det2D<2,6>(NE,B,G,X,Y,2); - case 0x234: return Det2D<3,4>(NE,B,G,X,Y,2); - case 0x236: return Det2D<3,6>(NE,B,G,X,Y,2); - case 0x244: return Det2D<4,4>(NE,B,G,X,Y,2); - case 0x246: return Det2D<4,6>(NE,B,G,X,Y,2); - case 0x256: return Det2D<5,6>(NE,B,G,X,Y,2); + case 0x222: return Det2D<2,2>(NE,B,G,X,Y); + case 0x223: return Det2D<2,3>(NE,B,G,X,Y); + case 0x224: return Det2D<2,4>(NE,B,G,X,Y); + case 0x226: return Det2D<2,6>(NE,B,G,X,Y); + case 0x234: return Det2D<3,4>(NE,B,G,X,Y); + case 0x236: return Det2D<3,6>(NE,B,G,X,Y); + case 0x244: return Det2D<4,4>(NE,B,G,X,Y); + case 0x246: return Det2D<4,6>(NE,B,G,X,Y); + case 0x256: return Det2D<5,6>(NE,B,G,X,Y); default: { const int MD = DeviceDofQuadLimits::Get().MAX_D1D; From df69bdacd0bde74114040ed041b3555274bbb465 Mon Sep 17 00:00:00 2001 From: Tomov Date: Tue, 6 Feb 2024 12:13:09 -0800 Subject: [PATCH 179/200] Added a unit test. --- tests/unit/CMakeLists.txt | 1 + tests/unit/data/holes.mesh | 1169 +++++++++++++++++++++++++ tests/unit/fem/test_nonlinearform.cpp | 98 +++ 3 files changed, 1268 insertions(+) create mode 100644 tests/unit/data/holes.mesh create mode 100644 tests/unit/fem/test_nonlinearform.cpp diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index dc0e9fea8d..87f591b142 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -89,6 +89,7 @@ set(UNIT_TESTS_SRCS fem/test_linearform_ext.cpp fem/test_lor.cpp fem/test_lor_batched.cpp + fem/test_nonlinearform.cpp fem/test_operatorjacobismoother.cpp fem/test_oscillation.cpp fem/test_pa_coeff.cpp diff --git a/tests/unit/data/holes.mesh b/tests/unit/data/holes.mesh new file mode 100644 index 0000000000..ae1c30e609 --- /dev/null +++ b/tests/unit/data/holes.mesh @@ -0,0 +1,1169 @@ +MFEM mesh v1.0 + +# +# MFEM Geometry Types (see mesh/geom.hpp): +# +# POINT = 0 +# SEGMENT = 1 +# TRIANGLE = 2 +# SQUARE = 3 +# TETRAHEDRON = 4 +# CUBE = 5 +# PRISM = 6 +# PYRAMID = 7 +# + +dimension +2 + +elements +64 +1 3 0 26 70 29 +1 3 26 3 27 70 +1 3 70 27 4 28 +1 3 29 70 28 1 +1 3 1 28 71 32 +1 3 28 4 30 71 +1 3 71 30 5 31 +1 3 32 71 31 2 +1 3 5 33 72 31 +1 3 33 8 34 72 +1 3 72 34 9 35 +1 3 31 72 35 2 +1 3 8 36 73 34 +1 3 36 12 37 73 +1 3 73 37 15 38 +1 3 34 73 38 9 +1 3 11 39 74 41 +1 3 39 14 40 74 +1 3 74 40 15 37 +1 3 41 74 37 12 +1 3 10 42 75 44 +1 3 42 13 43 75 +1 3 75 43 14 39 +1 3 44 75 39 11 +1 3 6 45 76 47 +1 3 45 13 42 76 +1 3 76 42 10 46 +1 3 47 76 46 7 +1 3 0 48 77 26 +1 3 48 6 47 77 +1 3 77 47 7 49 +1 3 26 77 49 3 +1 3 13 50 78 43 +1 3 50 16 51 78 +1 3 78 51 17 52 +1 3 43 78 52 14 +1 3 14 52 79 40 +1 3 52 17 53 79 +1 3 79 53 18 54 +1 3 40 79 54 15 +1 3 18 55 80 54 +1 3 55 21 56 80 +1 3 80 56 22 57 +1 3 54 80 57 15 +1 3 21 58 81 56 +1 3 58 25 59 81 +1 3 81 59 2 60 +1 3 56 81 60 22 +1 3 24 61 82 62 +1 3 61 1 32 82 +1 3 82 32 2 59 +1 3 62 82 59 25 +1 3 23 63 83 64 +1 3 63 0 29 83 +1 3 83 29 1 61 +1 3 64 83 61 24 +1 3 19 65 84 67 +1 3 65 0 63 84 +1 3 84 63 23 66 +1 3 67 84 66 20 +1 3 13 68 85 50 +1 3 68 19 67 85 +1 3 85 67 20 69 +1 3 50 85 69 16 + +boundary +48 +1 1 0 48 +1 1 48 6 +1 1 6 45 +1 1 45 13 +1 1 13 68 +1 1 68 19 +1 1 19 65 +1 1 65 0 +2 1 2 60 +2 1 60 22 +2 1 22 57 +2 1 57 15 +2 1 15 38 +2 1 38 9 +2 1 9 35 +2 1 35 2 +3 1 7 49 +3 1 49 3 +3 1 10 46 +3 1 46 7 +3 1 11 44 +3 1 44 10 +3 1 12 41 +3 1 41 11 +3 1 8 36 +3 1 36 12 +3 1 5 33 +3 1 33 8 +3 1 4 30 +3 1 30 5 +3 1 3 27 +3 1 27 4 +4 1 20 69 +4 1 69 16 +4 1 23 66 +4 1 66 20 +4 1 24 64 +4 1 64 23 +4 1 25 62 +4 1 62 24 +4 1 21 58 +4 1 58 25 +4 1 18 55 +4 1 55 21 +4 1 17 53 +4 1 53 18 +4 1 16 51 +4 1 51 17 + +vertices +86 + +nodes +FiniteElementSpace +FiniteElementCollection: L2_T1_2D_P3 +VDim: 2 +Ordering: 1 + +-1 -0.5 +-0.95044565 -0.45044565 +-0.87026503 -0.37026503 +-0.82071068 -0.32071068 +-1 -0.4309017 +-0.95252838 -0.3882171 +-0.87571371 -0.31927479 +-0.82823118 -0.27678382 +-1 -0.3190983 +-0.95524361 -0.28750957 +-0.88282121 -0.23660752 +-0.83805104 -0.20534943 +-1 -0.25 +-0.95651701 -0.22525919 +-0.88615616 -0.18543555 +-0.84266246 -0.16102267 +-0.82071068 -0.32071068 +-0.77115633 -0.27115633 +-0.69097571 -0.19097571 +-0.64142136 -0.14142136 +-0.82823118 -0.27678382 +-0.78073043 -0.23444039 +-0.70374857 -0.16651011 +-0.65590881 -0.12526948 +-0.83805104 -0.20534943 +-0.7932578 -0.17434394 +-0.72062343 -0.12518149 +-0.67539763 -0.096102401 +-0.84266246 -0.16102267 +-0.79915085 -0.13686067 +-0.72862507 -0.09876776 +-0.68477591 -0.076536686 +-0.84266246 -0.16102267 +-0.79915085 -0.13686067 +-0.72862507 -0.09876776 +-0.68477591 -0.076536686 +-0.84615675 -0.11659389 +-0.8036206 -0.09918116 +-0.7347212 -0.071850317 +-0.69197951 -0.056070194 +-0.8494391 -0.04456245 +-0.80782264 -0.037936893 +-0.7404735 -0.027581523 +-0.69882308 -0.021665274 +-0.85 0 +-0.80854102 0 +-0.74145898 0 +-0.7 0 +-1 -0.25 +-0.95651701 -0.22525919 +-0.88615616 -0.18543555 +-0.84266246 -0.16102267 +-1 -0.1809017 +-0.95748122 -0.16300326 +-0.88868203 -0.13421727 +-0.84615675 -0.11659389 +-1 -0.069098301 +-0.9583864 -0.062263205 +-0.89105378 -0.051278929 +-0.8494391 -0.04456245 +-1 0 +-0.95854102 0 +-0.89145898 0 +-0.85 0 +-1 0 +-0.95854102 0 +-0.89145898 0 +-0.85 0 +-1 0.069098301 +-0.9583864 0.062263205 +-0.89105378 0.051278929 +-0.8494391 0.04456245 +-1 0.1809017 +-0.95748122 0.16300326 +-0.88868203 0.13421727 +-0.84615675 0.11659389 +-1 0.25 +-0.95651701 0.22525919 +-0.88615616 0.18543555 +-0.84266246 0.16102267 +-0.85 0 +-0.80854102 0 +-0.74145898 0 +-0.7 0 +-0.8494391 0.04456245 +-0.80782264 0.037936893 +-0.7404735 0.027581523 +-0.69882308 0.021665274 +-0.84615675 0.11659389 +-0.8036206 0.09918116 +-0.7347212 0.071850317 +-0.69197951 0.056070194 +-0.84266246 0.16102267 +-0.79915085 0.13686067 +-0.72862507 0.09876776 +-0.68477591 0.076536686 +-0.84266246 0.16102267 +-0.79915085 0.13686067 +-0.72862507 0.09876776 +-0.68477591 0.076536686 +-0.83805104 0.20534943 +-0.7932578 0.17434394 +-0.72062343 0.12518149 +-0.67539763 0.096102401 +-0.82823118 0.27678382 +-0.78073043 0.23444039 +-0.70374857 0.16651011 +-0.65590881 0.12526948 +-0.82071068 0.32071068 +-0.77115633 0.27115633 +-0.69097571 0.19097571 +-0.64142136 0.14142136 +-1 0.25 +-0.95651701 0.22525919 +-0.88615616 0.18543555 +-0.84266246 0.16102267 +-1 0.3190983 +-0.95524361 0.28750957 +-0.88282121 0.23660752 +-0.83805104 0.20534943 +-1 0.4309017 +-0.95252838 0.3882171 +-0.87571371 0.31927479 +-0.82823118 0.27678382 +-1 0.5 +-0.95044565 0.45044565 +-0.87026503 0.37026503 +-0.82071068 0.32071068 +-0.64142136 0.14142136 +-0.62526948 0.15590881 +-0.5961024 0.17539763 +-0.57653669 0.18477591 +-0.69097571 0.19097571 +-0.66651011 0.20374857 +-0.62518149 0.22062343 +-0.59876776 0.22862507 +-0.77115633 0.27115633 +-0.73444039 0.28073043 +-0.67434394 0.2932578 +-0.63686067 0.29915085 +-0.82071068 0.32071068 +-0.77678382 0.32823118 +-0.70534943 0.33805104 +-0.66102267 0.34266246 +-0.57653669 0.18477591 +-0.55607019 0.19197951 +-0.52166527 0.19882308 +-0.5 0.2 +-0.59876776 0.22862507 +-0.57185032 0.2347212 +-0.52758152 0.2404735 +-0.5 0.24145898 +-0.63686067 0.29915085 +-0.59918116 0.3036206 +-0.53793689 0.30782264 +-0.5 0.30854102 +-0.66102267 0.34266246 +-0.61659389 0.34615675 +-0.54456245 0.3494391 +-0.5 0.35 +-0.66102267 0.34266246 +-0.61659389 0.34615675 +-0.54456245 0.3494391 +-0.5 0.35 +-0.68543555 0.38615616 +-0.63421727 0.38868203 +-0.55127893 0.39105378 +-0.5 0.39145898 +-0.72525919 0.45651701 +-0.66300326 0.45748122 +-0.56226321 0.4583864 +-0.5 0.45854102 +-0.75 0.5 +-0.6809017 0.5 +-0.5690983 0.5 +-0.5 0.5 +-0.82071068 0.32071068 +-0.77678382 0.32823118 +-0.70534943 0.33805104 +-0.66102267 0.34266246 +-0.87026503 0.37026503 +-0.81927479 0.37571371 +-0.73660752 0.38282121 +-0.68543555 0.38615616 +-0.95044565 0.45044565 +-0.8882171 0.45252838 +-0.78750957 0.45524361 +-0.72525919 0.45651701 +-1 0.5 +-0.9309017 0.5 +-0.8190983 0.5 +-0.75 0.5 +-0.5 0.2 +-0.47833473 0.19882308 +-0.44392981 0.19197951 +-0.42346331 0.18477591 +-0.5 0.24145898 +-0.47241848 0.2404735 +-0.42814968 0.2347212 +-0.40123224 0.22862507 +-0.5 0.30854102 +-0.46206311 0.30782264 +-0.40081884 0.3036206 +-0.36313933 0.29915085 +-0.5 0.35 +-0.45543755 0.3494391 +-0.38340611 0.34615675 +-0.33897733 0.34266246 +-0.42346331 0.18477591 +-0.4038976 0.17539763 +-0.37473052 0.15590881 +-0.35857864 0.14142136 +-0.40123224 0.22862507 +-0.37481851 0.22062343 +-0.33348989 0.20374857 +-0.30902429 0.19097571 +-0.36313933 0.29915085 +-0.32565606 0.2932578 +-0.26555961 0.28073043 +-0.22884367 0.27115633 +-0.33897733 0.34266246 +-0.29465057 0.33805104 +-0.22321618 0.32823118 +-0.17928932 0.32071068 +-0.33897733 0.34266246 +-0.29465057 0.33805104 +-0.22321618 0.32823118 +-0.17928932 0.32071068 +-0.31456445 0.38615616 +-0.26339248 0.38282121 +-0.18072521 0.37571371 +-0.12973497 0.37026503 +-0.27474081 0.45651701 +-0.21249043 0.45524361 +-0.1117829 0.45252838 +-0.04955435 0.45044565 +-0.25 0.5 +-0.1809017 0.5 +-0.069098301 0.5 +0 0.5 +-0.5 0.35 +-0.45543755 0.3494391 +-0.38340611 0.34615675 +-0.33897733 0.34266246 +-0.5 0.39145898 +-0.44872107 0.39105378 +-0.36578273 0.38868203 +-0.31456445 0.38615616 +-0.5 0.45854102 +-0.43773679 0.4583864 +-0.33699674 0.45748122 +-0.27474081 0.45651701 +-0.5 0.5 +-0.4309017 0.5 +-0.3190983 0.5 +-0.25 0.5 +-0.3 0 +-0.25854102 0 +-0.19145898 0 +-0.15 0 +-0.30117692 0.021665274 +-0.2595265 0.027581523 +-0.19217736 0.037936893 +-0.1505609 0.04456245 +-0.30802049 0.056070194 +-0.2652788 0.071850317 +-0.1963794 0.09918116 +-0.15384325 0.11659389 +-0.31522409 0.076536686 +-0.27137493 0.09876776 +-0.20084915 0.13686067 +-0.15733754 0.16102267 +-0.15 0 +-0.10854102 0 +-0.04145898 0 +0 0 +-0.1505609 0.04456245 +-0.10894622 0.051278929 +-0.041613604 0.062263205 +0 0.069098301 +-0.15384325 0.11659389 +-0.11131797 0.13421727 +-0.042518777 0.16300326 +0 0.1809017 +-0.15733754 0.16102267 +-0.11384384 0.18543555 +-0.043482986 0.22525919 +0 0.25 +-0.15733754 0.16102267 +-0.11384384 0.18543555 +-0.043482986 0.22525919 +0 0.25 +-0.16194896 0.20534943 +-0.11717879 0.23660752 +-0.044756393 0.28750957 +0 0.3190983 +-0.17176882 0.27678382 +-0.12428629 0.31927479 +-0.047471619 0.3882171 +0 0.4309017 +-0.17928932 0.32071068 +-0.12973497 0.37026503 +-0.04955435 0.45044565 +0 0.5 +-0.31522409 0.076536686 +-0.27137493 0.09876776 +-0.20084915 0.13686067 +-0.15733754 0.16102267 +-0.32460237 0.096102401 +-0.27937657 0.12518149 +-0.2067422 0.17434394 +-0.16194896 0.20534943 +-0.34409119 0.12526948 +-0.29625143 0.16651011 +-0.21926957 0.23444039 +-0.17176882 0.27678382 +-0.35857864 0.14142136 +-0.30902429 0.19097571 +-0.22884367 0.27115633 +-0.17928932 0.32071068 +-0.35857864 -0.14142136 +-0.30902429 -0.19097571 +-0.22884367 -0.27115633 +-0.17928932 -0.32071068 +-0.34409119 -0.12526948 +-0.29625143 -0.16651011 +-0.21926957 -0.23444039 +-0.17176882 -0.27678382 +-0.32460237 -0.096102401 +-0.27937657 -0.12518149 +-0.2067422 -0.17434394 +-0.16194896 -0.20534943 +-0.31522409 -0.076536686 +-0.27137493 -0.09876776 +-0.20084915 -0.13686067 +-0.15733754 -0.16102267 +-0.17928932 -0.32071068 +-0.12973497 -0.37026503 +-0.04955435 -0.45044565 +0 -0.5 +-0.17176882 -0.27678382 +-0.12428629 -0.31927479 +-0.047471619 -0.3882171 +0 -0.4309017 +-0.16194896 -0.20534943 +-0.11717879 -0.23660752 +-0.044756393 -0.28750957 +0 -0.3190983 +-0.15733754 -0.16102267 +-0.11384384 -0.18543555 +-0.043482986 -0.22525919 +0 -0.25 +-0.15733754 -0.16102267 +-0.11384384 -0.18543555 +-0.043482986 -0.22525919 +0 -0.25 +-0.15384325 -0.11659389 +-0.11131797 -0.13421727 +-0.042518777 -0.16300326 +0 -0.1809017 +-0.1505609 -0.04456245 +-0.10894622 -0.051278929 +-0.041613604 -0.062263205 +0 -0.069098301 +-0.15 0 +-0.10854102 0 +-0.04145898 0 +0 0 +-0.31522409 -0.076536686 +-0.27137493 -0.09876776 +-0.20084915 -0.13686067 +-0.15733754 -0.16102267 +-0.30802049 -0.056070194 +-0.2652788 -0.071850317 +-0.1963794 -0.09918116 +-0.15384325 -0.11659389 +-0.30117692 -0.021665274 +-0.2595265 -0.027581523 +-0.19217736 -0.037936893 +-0.1505609 -0.04456245 +-0.3 0 +-0.25854102 0 +-0.19145898 0 +-0.15 0 +-0.5 -0.5 +-0.4309017 -0.5 +-0.3190983 -0.5 +-0.25 -0.5 +-0.5 -0.45854102 +-0.43773679 -0.4583864 +-0.33699674 -0.45748122 +-0.27474081 -0.45651701 +-0.5 -0.39145898 +-0.44872107 -0.39105378 +-0.36578273 -0.38868203 +-0.31456445 -0.38615616 +-0.5 -0.35 +-0.45543755 -0.3494391 +-0.38340611 -0.34615675 +-0.33897733 -0.34266246 +-0.25 -0.5 +-0.1809017 -0.5 +-0.069098301 -0.5 +0 -0.5 +-0.27474081 -0.45651701 +-0.21249043 -0.45524361 +-0.1117829 -0.45252838 +-0.04955435 -0.45044565 +-0.31456445 -0.38615616 +-0.26339248 -0.38282121 +-0.18072521 -0.37571371 +-0.12973497 -0.37026503 +-0.33897733 -0.34266246 +-0.29465057 -0.33805104 +-0.22321618 -0.32823118 +-0.17928932 -0.32071068 +-0.33897733 -0.34266246 +-0.29465057 -0.33805104 +-0.22321618 -0.32823118 +-0.17928932 -0.32071068 +-0.36313933 -0.29915085 +-0.32565606 -0.2932578 +-0.26555961 -0.28073043 +-0.22884367 -0.27115633 +-0.40123224 -0.22862507 +-0.37481851 -0.22062343 +-0.33348989 -0.20374857 +-0.30902429 -0.19097571 +-0.42346331 -0.18477591 +-0.4038976 -0.17539763 +-0.37473052 -0.15590881 +-0.35857864 -0.14142136 +-0.5 -0.35 +-0.45543755 -0.3494391 +-0.38340611 -0.34615675 +-0.33897733 -0.34266246 +-0.5 -0.30854102 +-0.46206311 -0.30782264 +-0.40081884 -0.3036206 +-0.36313933 -0.29915085 +-0.5 -0.24145898 +-0.47241848 -0.2404735 +-0.42814968 -0.2347212 +-0.40123224 -0.22862507 +-0.5 -0.2 +-0.47833473 -0.19882308 +-0.44392981 -0.19197951 +-0.42346331 -0.18477591 +-1 -0.5 +-0.9309017 -0.5 +-0.8190983 -0.5 +-0.75 -0.5 +-0.95044565 -0.45044565 +-0.8882171 -0.45252838 +-0.78750957 -0.45524361 +-0.72525919 -0.45651701 +-0.87026503 -0.37026503 +-0.81927479 -0.37571371 +-0.73660752 -0.38282121 +-0.68543555 -0.38615616 +-0.82071068 -0.32071068 +-0.77678382 -0.32823118 +-0.70534943 -0.33805104 +-0.66102267 -0.34266246 +-0.75 -0.5 +-0.6809017 -0.5 +-0.5690983 -0.5 +-0.5 -0.5 +-0.72525919 -0.45651701 +-0.66300326 -0.45748122 +-0.56226321 -0.4583864 +-0.5 -0.45854102 +-0.68543555 -0.38615616 +-0.63421727 -0.38868203 +-0.55127893 -0.39105378 +-0.5 -0.39145898 +-0.66102267 -0.34266246 +-0.61659389 -0.34615675 +-0.54456245 -0.3494391 +-0.5 -0.35 +-0.66102267 -0.34266246 +-0.61659389 -0.34615675 +-0.54456245 -0.3494391 +-0.5 -0.35 +-0.63686067 -0.29915085 +-0.59918116 -0.3036206 +-0.53793689 -0.30782264 +-0.5 -0.30854102 +-0.59876776 -0.22862507 +-0.57185032 -0.2347212 +-0.52758152 -0.2404735 +-0.5 -0.24145898 +-0.57653669 -0.18477591 +-0.55607019 -0.19197951 +-0.52166527 -0.19882308 +-0.5 -0.2 +-0.82071068 -0.32071068 +-0.77678382 -0.32823118 +-0.70534943 -0.33805104 +-0.66102267 -0.34266246 +-0.77115633 -0.27115633 +-0.73444039 -0.28073043 +-0.67434394 -0.2932578 +-0.63686067 -0.29915085 +-0.69097571 -0.19097571 +-0.66651011 -0.20374857 +-0.62518149 -0.22062343 +-0.59876776 -0.22862507 +-0.64142136 -0.14142136 +-0.62526948 -0.15590881 +-0.5961024 -0.17539763 +-0.57653669 -0.18477591 +0 -0.5 +0.04955435 -0.45044565 +0.12973497 -0.37026503 +0.17928932 -0.32071068 +0 -0.4309017 +0.047471619 -0.3882171 +0.12428629 -0.31927479 +0.17176882 -0.27678382 +0 -0.3190983 +0.044756393 -0.28750957 +0.11717879 -0.23660752 +0.16194896 -0.20534943 +0 -0.25 +0.043482986 -0.22525919 +0.11384384 -0.18543555 +0.15733754 -0.16102267 +0.17928932 -0.32071068 +0.22884367 -0.27115633 +0.30902429 -0.19097571 +0.35857864 -0.14142136 +0.17176882 -0.27678382 +0.21926957 -0.23444039 +0.29625143 -0.16651011 +0.34409119 -0.12526948 +0.16194896 -0.20534943 +0.2067422 -0.17434394 +0.27937657 -0.12518149 +0.32460237 -0.096102401 +0.15733754 -0.16102267 +0.20084915 -0.13686067 +0.27137493 -0.09876776 +0.31522409 -0.076536686 +0.15733754 -0.16102267 +0.20084915 -0.13686067 +0.27137493 -0.09876776 +0.31522409 -0.076536686 +0.15384325 -0.11659389 +0.1963794 -0.09918116 +0.2652788 -0.071850317 +0.30802049 -0.056070194 +0.1505609 -0.04456245 +0.19217736 -0.037936893 +0.2595265 -0.027581523 +0.30117692 -0.021665274 +0.15 0 +0.19145898 0 +0.25854102 0 +0.3 0 +0 -0.25 +0.043482986 -0.22525919 +0.11384384 -0.18543555 +0.15733754 -0.16102267 +0 -0.1809017 +0.042518777 -0.16300326 +0.11131797 -0.13421727 +0.15384325 -0.11659389 +0 -0.069098301 +0.041613604 -0.062263205 +0.10894622 -0.051278929 +0.1505609 -0.04456245 +0 0 +0.04145898 0 +0.10854102 0 +0.15 0 +0 0 +0.04145898 0 +0.10854102 0 +0.15 0 +0 0.069098301 +0.041613604 0.062263205 +0.10894622 0.051278929 +0.1505609 0.04456245 +0 0.1809017 +0.042518777 0.16300326 +0.11131797 0.13421727 +0.15384325 0.11659389 +0 0.25 +0.043482986 0.22525919 +0.11384384 0.18543555 +0.15733754 0.16102267 +0.15 0 +0.19145898 0 +0.25854102 0 +0.3 0 +0.1505609 0.04456245 +0.19217736 0.037936893 +0.2595265 0.027581523 +0.30117692 0.021665274 +0.15384325 0.11659389 +0.1963794 0.09918116 +0.2652788 0.071850317 +0.30802049 0.056070194 +0.15733754 0.16102267 +0.20084915 0.13686067 +0.27137493 0.09876776 +0.31522409 0.076536686 +0.15733754 0.16102267 +0.20084915 0.13686067 +0.27137493 0.09876776 +0.31522409 0.076536686 +0.16194896 0.20534943 +0.2067422 0.17434394 +0.27937657 0.12518149 +0.32460237 0.096102401 +0.17176882 0.27678382 +0.21926957 0.23444039 +0.29625143 0.16651011 +0.34409119 0.12526948 +0.17928932 0.32071068 +0.22884367 0.27115633 +0.30902429 0.19097571 +0.35857864 0.14142136 +0 0.25 +0.043482986 0.22525919 +0.11384384 0.18543555 +0.15733754 0.16102267 +0 0.3190983 +0.044756393 0.28750957 +0.11717879 0.23660752 +0.16194896 0.20534943 +0 0.4309017 +0.047471619 0.3882171 +0.12428629 0.31927479 +0.17176882 0.27678382 +0 0.5 +0.04955435 0.45044565 +0.12973497 0.37026503 +0.17928932 0.32071068 +0.35857864 0.14142136 +0.37473052 0.15590881 +0.4038976 0.17539763 +0.42346331 0.18477591 +0.30902429 0.19097571 +0.33348989 0.20374857 +0.37481851 0.22062343 +0.40123224 0.22862507 +0.22884367 0.27115633 +0.26555961 0.28073043 +0.32565606 0.2932578 +0.36313933 0.29915085 +0.17928932 0.32071068 +0.22321618 0.32823118 +0.29465057 0.33805104 +0.33897733 0.34266246 +0.42346331 0.18477591 +0.44392981 0.19197951 +0.47833473 0.19882308 +0.5 0.2 +0.40123224 0.22862507 +0.42814968 0.2347212 +0.47241848 0.2404735 +0.5 0.24145898 +0.36313933 0.29915085 +0.40081884 0.3036206 +0.46206311 0.30782264 +0.5 0.30854102 +0.33897733 0.34266246 +0.38340611 0.34615675 +0.45543755 0.3494391 +0.5 0.35 +0.33897733 0.34266246 +0.38340611 0.34615675 +0.45543755 0.3494391 +0.5 0.35 +0.31456445 0.38615616 +0.36578273 0.38868203 +0.44872107 0.39105378 +0.5 0.39145898 +0.27474081 0.45651701 +0.33699674 0.45748122 +0.43773679 0.4583864 +0.5 0.45854102 +0.25 0.5 +0.3190983 0.5 +0.4309017 0.5 +0.5 0.5 +0.17928932 0.32071068 +0.22321618 0.32823118 +0.29465057 0.33805104 +0.33897733 0.34266246 +0.12973497 0.37026503 +0.18072521 0.37571371 +0.26339248 0.38282121 +0.31456445 0.38615616 +0.04955435 0.45044565 +0.1117829 0.45252838 +0.21249043 0.45524361 +0.27474081 0.45651701 +0 0.5 +0.069098301 0.5 +0.1809017 0.5 +0.25 0.5 +0.5 0.2 +0.52166527 0.19882308 +0.55607019 0.19197951 +0.57653669 0.18477591 +0.5 0.24145898 +0.52758152 0.2404735 +0.57185032 0.2347212 +0.59876776 0.22862507 +0.5 0.30854102 +0.53793689 0.30782264 +0.59918116 0.3036206 +0.63686067 0.29915085 +0.5 0.35 +0.54456245 0.3494391 +0.61659389 0.34615675 +0.66102267 0.34266246 +0.57653669 0.18477591 +0.5961024 0.17539763 +0.62526948 0.15590881 +0.64142136 0.14142136 +0.59876776 0.22862507 +0.62518149 0.22062343 +0.66651011 0.20374857 +0.69097571 0.19097571 +0.63686067 0.29915085 +0.67434394 0.2932578 +0.73444039 0.28073043 +0.77115633 0.27115633 +0.66102267 0.34266246 +0.70534943 0.33805104 +0.77678382 0.32823118 +0.82071068 0.32071068 +0.66102267 0.34266246 +0.70534943 0.33805104 +0.77678382 0.32823118 +0.82071068 0.32071068 +0.68543555 0.38615616 +0.73660752 0.38282121 +0.81927479 0.37571371 +0.87026503 0.37026503 +0.72525919 0.45651701 +0.78750957 0.45524361 +0.8882171 0.45252838 +0.95044565 0.45044565 +0.75 0.5 +0.8190983 0.5 +0.9309017 0.5 +1 0.5 +0.5 0.35 +0.54456245 0.3494391 +0.61659389 0.34615675 +0.66102267 0.34266246 +0.5 0.39145898 +0.55127893 0.39105378 +0.63421727 0.38868203 +0.68543555 0.38615616 +0.5 0.45854102 +0.56226321 0.4583864 +0.66300326 0.45748122 +0.72525919 0.45651701 +0.5 0.5 +0.5690983 0.5 +0.6809017 0.5 +0.75 0.5 +0.7 0 +0.74145898 0 +0.80854102 0 +0.85 0 +0.69882308 0.021665274 +0.7404735 0.027581523 +0.80782264 0.037936893 +0.8494391 0.04456245 +0.69197951 0.056070194 +0.7347212 0.071850317 +0.8036206 0.09918116 +0.84615675 0.11659389 +0.68477591 0.076536686 +0.72862507 0.09876776 +0.79915085 0.13686067 +0.84266246 0.16102267 +0.85 0 +0.89145898 0 +0.95854102 0 +1 0 +0.8494391 0.04456245 +0.89105378 0.051278929 +0.9583864 0.062263205 +1 0.069098301 +0.84615675 0.11659389 +0.88868203 0.13421727 +0.95748122 0.16300326 +1 0.1809017 +0.84266246 0.16102267 +0.88615616 0.18543555 +0.95651701 0.22525919 +1 0.25 +0.84266246 0.16102267 +0.88615616 0.18543555 +0.95651701 0.22525919 +1 0.25 +0.83805104 0.20534943 +0.88282121 0.23660752 +0.95524361 0.28750957 +1 0.3190983 +0.82823118 0.27678382 +0.87571371 0.31927479 +0.95252838 0.3882171 +1 0.4309017 +0.82071068 0.32071068 +0.87026503 0.37026503 +0.95044565 0.45044565 +1 0.5 +0.68477591 0.076536686 +0.72862507 0.09876776 +0.79915085 0.13686067 +0.84266246 0.16102267 +0.67539763 0.096102401 +0.72062343 0.12518149 +0.7932578 0.17434394 +0.83805104 0.20534943 +0.65590881 0.12526948 +0.70374857 0.16651011 +0.78073043 0.23444039 +0.82823118 0.27678382 +0.64142136 0.14142136 +0.69097571 0.19097571 +0.77115633 0.27115633 +0.82071068 0.32071068 +0.64142136 -0.14142136 +0.69097571 -0.19097571 +0.77115633 -0.27115633 +0.82071068 -0.32071068 +0.65590881 -0.12526948 +0.70374857 -0.16651011 +0.78073043 -0.23444039 +0.82823118 -0.27678382 +0.67539763 -0.096102401 +0.72062343 -0.12518149 +0.7932578 -0.17434394 +0.83805104 -0.20534943 +0.68477591 -0.076536686 +0.72862507 -0.09876776 +0.79915085 -0.13686067 +0.84266246 -0.16102267 +0.82071068 -0.32071068 +0.87026503 -0.37026503 +0.95044565 -0.45044565 +1 -0.5 +0.82823118 -0.27678382 +0.87571371 -0.31927479 +0.95252838 -0.3882171 +1 -0.4309017 +0.83805104 -0.20534943 +0.88282121 -0.23660752 +0.95524361 -0.28750957 +1 -0.3190983 +0.84266246 -0.16102267 +0.88615616 -0.18543555 +0.95651701 -0.22525919 +1 -0.25 +0.84266246 -0.16102267 +0.88615616 -0.18543555 +0.95651701 -0.22525919 +1 -0.25 +0.84615675 -0.11659389 +0.88868203 -0.13421727 +0.95748122 -0.16300326 +1 -0.1809017 +0.8494391 -0.04456245 +0.89105378 -0.051278929 +0.9583864 -0.062263205 +1 -0.069098301 +0.85 0 +0.89145898 0 +0.95854102 0 +1 0 +0.68477591 -0.076536686 +0.72862507 -0.09876776 +0.79915085 -0.13686067 +0.84266246 -0.16102267 +0.69197951 -0.056070194 +0.7347212 -0.071850317 +0.8036206 -0.09918116 +0.84615675 -0.11659389 +0.69882308 -0.021665274 +0.7404735 -0.027581523 +0.80782264 -0.037936893 +0.8494391 -0.04456245 +0.7 0 +0.74145898 0 +0.80854102 0 +0.85 0 +0.5 -0.5 +0.5690983 -0.5 +0.6809017 -0.5 +0.75 -0.5 +0.5 -0.45854102 +0.56226321 -0.4583864 +0.66300326 -0.45748122 +0.72525919 -0.45651701 +0.5 -0.39145898 +0.55127893 -0.39105378 +0.63421727 -0.38868203 +0.68543555 -0.38615616 +0.5 -0.35 +0.54456245 -0.3494391 +0.61659389 -0.34615675 +0.66102267 -0.34266246 +0.75 -0.5 +0.8190983 -0.5 +0.9309017 -0.5 +1 -0.5 +0.72525919 -0.45651701 +0.78750957 -0.45524361 +0.8882171 -0.45252838 +0.95044565 -0.45044565 +0.68543555 -0.38615616 +0.73660752 -0.38282121 +0.81927479 -0.37571371 +0.87026503 -0.37026503 +0.66102267 -0.34266246 +0.70534943 -0.33805104 +0.77678382 -0.32823118 +0.82071068 -0.32071068 +0.66102267 -0.34266246 +0.70534943 -0.33805104 +0.77678382 -0.32823118 +0.82071068 -0.32071068 +0.63686067 -0.29915085 +0.67434394 -0.2932578 +0.73444039 -0.28073043 +0.77115633 -0.27115633 +0.59876776 -0.22862507 +0.62518149 -0.22062343 +0.66651011 -0.20374857 +0.69097571 -0.19097571 +0.57653669 -0.18477591 +0.5961024 -0.17539763 +0.62526948 -0.15590881 +0.64142136 -0.14142136 +0.5 -0.35 +0.54456245 -0.3494391 +0.61659389 -0.34615675 +0.66102267 -0.34266246 +0.5 -0.30854102 +0.53793689 -0.30782264 +0.59918116 -0.3036206 +0.63686067 -0.29915085 +0.5 -0.24145898 +0.52758152 -0.2404735 +0.57185032 -0.2347212 +0.59876776 -0.22862507 +0.5 -0.2 +0.52166527 -0.19882308 +0.55607019 -0.19197951 +0.57653669 -0.18477591 +0 -0.5 +0.069098301 -0.5 +0.1809017 -0.5 +0.25 -0.5 +0.04955435 -0.45044565 +0.1117829 -0.45252838 +0.21249043 -0.45524361 +0.27474081 -0.45651701 +0.12973497 -0.37026503 +0.18072521 -0.37571371 +0.26339248 -0.38282121 +0.31456445 -0.38615616 +0.17928932 -0.32071068 +0.22321618 -0.32823118 +0.29465057 -0.33805104 +0.33897733 -0.34266246 +0.25 -0.5 +0.3190983 -0.5 +0.4309017 -0.5 +0.5 -0.5 +0.27474081 -0.45651701 +0.33699674 -0.45748122 +0.43773679 -0.4583864 +0.5 -0.45854102 +0.31456445 -0.38615616 +0.36578273 -0.38868203 +0.44872107 -0.39105378 +0.5 -0.39145898 +0.33897733 -0.34266246 +0.38340611 -0.34615675 +0.45543755 -0.3494391 +0.5 -0.35 +0.33897733 -0.34266246 +0.38340611 -0.34615675 +0.45543755 -0.3494391 +0.5 -0.35 +0.36313933 -0.29915085 +0.40081884 -0.3036206 +0.46206311 -0.30782264 +0.5 -0.30854102 +0.40123224 -0.22862507 +0.42814968 -0.2347212 +0.47241848 -0.2404735 +0.5 -0.24145898 +0.42346331 -0.18477591 +0.44392981 -0.19197951 +0.47833473 -0.19882308 +0.5 -0.2 +0.17928932 -0.32071068 +0.22321618 -0.32823118 +0.29465057 -0.33805104 +0.33897733 -0.34266246 +0.22884367 -0.27115633 +0.26555961 -0.28073043 +0.32565606 -0.2932578 +0.36313933 -0.29915085 +0.30902429 -0.19097571 +0.33348989 -0.20374857 +0.37481851 -0.22062343 +0.40123224 -0.22862507 +0.35857864 -0.14142136 +0.37473052 -0.15590881 +0.4038976 -0.17539763 +0.42346331 -0.18477591 diff --git a/tests/unit/fem/test_nonlinearform.cpp b/tests/unit/fem/test_nonlinearform.cpp new file mode 100644 index 0000000000..1cb1a03a5b --- /dev/null +++ b/tests/unit/fem/test_nonlinearform.cpp @@ -0,0 +1,98 @@ +// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced +// at the Lawrence Livermore National Laboratory. All Rights reserved. See files +// LICENSE and NOTICE for details. LLNL-CODE-806117. +// +// 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 "mfem.hpp" +#include "unit_tests.hpp" + +using namespace mfem; + +TEST_CASE("NonlinearForm Boundary Integrator", "[NonlinearForm]") +{ + // See problem description in ex27. + + Mesh mesh("./data/holes.mesh", 1, 1); + H1_FECollection fec(1, mesh.Dimension()); + FiniteElementSpace fespace(&mesh, &fec); + + Array nbc_bdr(mesh.bdr_attributes.Max()); + Array rbc_bdr(mesh.bdr_attributes.Max()); + Array dbc_bdr(mesh.bdr_attributes.Max()); + nbc_bdr = 0; nbc_bdr[0] = 1; + rbc_bdr = 0; rbc_bdr[1] = 1; + dbc_bdr = 0; dbc_bdr[2] = 1; + + Array ess_tdof_list(0); + fespace.GetEssentialTrueDofs(dbc_bdr, ess_tdof_list); + + // See defaults in ex27. + ConstantCoefficient matCoef(1.0); + ConstantCoefficient dbcCoef(0.0); + ConstantCoefficient nbcCoef(1.0); + ConstantCoefficient rbcACoef(1.0); + ConstantCoefficient rbcBCoef(1.0); + ProductCoefficient m_nbcCoef(matCoef, nbcCoef); + ProductCoefficient m_rbcACoef(matCoef, rbcACoef); + ProductCoefficient m_rbcBCoef(matCoef, rbcBCoef); + + GridFunction u1(&fespace), u2(&fespace); + u1 = 0.0; + u2 = 0.0; + u1.ProjectBdrCoefficient(dbcCoef, dbc_bdr); + u2.ProjectBdrCoefficient(dbcCoef, dbc_bdr); + + LinearForm b(&fespace); + b.AddBoundaryIntegrator(new BoundaryLFIntegrator(m_nbcCoef), nbc_bdr); + b.AddBoundaryIntegrator(new BoundaryLFIntegrator(m_rbcBCoef), rbc_bdr); + b.Assemble(); + + // Solve as a linear problem. + { + BilinearForm a(&fespace); + a.AddDomainIntegrator(new DiffusionIntegrator(matCoef)); + a.AddBoundaryIntegrator(new MassIntegrator(m_rbcACoef), rbc_bdr); + a.Assemble(); + + OperatorPtr A; + Vector B, X; + a.FormLinearSystem(ess_tdof_list, u1, b, A, X, B); + GSSmoother M((SparseMatrix&)(*A)); + PCG(*A, M, B, X, 1, 500, 1e-12, 0.0); + a.RecoverFEMSolution(X, b, u1); + } + + // Solve as a nonlinear problem. + { + NonlinearForm a_nf(&fespace); + a_nf.AddDomainIntegrator(new DiffusionIntegrator(matCoef)); + a_nf.AddBoundaryIntegrator(new MassIntegrator(m_rbcACoef), rbc_bdr); + a_nf.SetEssentialTrueDofs(ess_tdof_list); + + IterativeSolver::PrintLevel print; + print.Iterations(); + CGSolver cg; + cg.SetPrintLevel(print); + cg.SetMaxIter(100); + cg.SetRelTol(1e-12); cg.SetAbsTol(0.0); + + NewtonSolver newton; + newton.iterative_mode = false; + newton.SetSolver(cg); + newton.SetOperator(a_nf); + newton.SetPrintLevel(print); + newton.SetRelTol(1e-14); newton.SetAbsTol(0.0); + newton.SetMaxIter(1); + + newton.Mult(b, u2); + } + + u2 -= u1; + REQUIRE(u2.Norml2() == MFEM_Approx(0.0, 1e-5)); +} From 2a75319cc93815f6e4ebc94be84ca55e1636405b Mon Sep 17 00:00:00 2001 From: Tomov Date: Tue, 6 Feb 2024 12:14:42 -0800 Subject: [PATCH 180/200] minor --- tests/unit/fem/test_nonlinearform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/fem/test_nonlinearform.cpp b/tests/unit/fem/test_nonlinearform.cpp index 1cb1a03a5b..dabc39f74e 100644 --- a/tests/unit/fem/test_nonlinearform.cpp +++ b/tests/unit/fem/test_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. // From b90039cbbff37412e7c7a178634253962a4aa061 Mon Sep 17 00:00:00 2001 From: Tomov Date: Tue, 6 Feb 2024 12:17:57 -0800 Subject: [PATCH 181/200] style --- tests/unit/fem/test_nonlinearform.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/unit/fem/test_nonlinearform.cpp b/tests/unit/fem/test_nonlinearform.cpp index dabc39f74e..00bda04ee8 100644 --- a/tests/unit/fem/test_nonlinearform.cpp +++ b/tests/unit/fem/test_nonlinearform.cpp @@ -17,21 +17,21 @@ using namespace mfem; TEST_CASE("NonlinearForm Boundary Integrator", "[NonlinearForm]") { // See problem description in ex27. - + Mesh mesh("./data/holes.mesh", 1, 1); H1_FECollection fec(1, mesh.Dimension()); FiniteElementSpace fespace(&mesh, &fec); - + Array nbc_bdr(mesh.bdr_attributes.Max()); Array rbc_bdr(mesh.bdr_attributes.Max()); Array dbc_bdr(mesh.bdr_attributes.Max()); nbc_bdr = 0; nbc_bdr[0] = 1; rbc_bdr = 0; rbc_bdr[1] = 1; dbc_bdr = 0; dbc_bdr[2] = 1; - + Array ess_tdof_list(0); fespace.GetEssentialTrueDofs(dbc_bdr, ess_tdof_list); - + // See defaults in ex27. ConstantCoefficient matCoef(1.0); ConstantCoefficient dbcCoef(0.0); @@ -41,25 +41,25 @@ TEST_CASE("NonlinearForm Boundary Integrator", "[NonlinearForm]") ProductCoefficient m_nbcCoef(matCoef, nbcCoef); ProductCoefficient m_rbcACoef(matCoef, rbcACoef); ProductCoefficient m_rbcBCoef(matCoef, rbcBCoef); - + GridFunction u1(&fespace), u2(&fespace); u1 = 0.0; u2 = 0.0; u1.ProjectBdrCoefficient(dbcCoef, dbc_bdr); u2.ProjectBdrCoefficient(dbcCoef, dbc_bdr); - + LinearForm b(&fespace); b.AddBoundaryIntegrator(new BoundaryLFIntegrator(m_nbcCoef), nbc_bdr); b.AddBoundaryIntegrator(new BoundaryLFIntegrator(m_rbcBCoef), rbc_bdr); b.Assemble(); - + // Solve as a linear problem. { BilinearForm a(&fespace); a.AddDomainIntegrator(new DiffusionIntegrator(matCoef)); a.AddBoundaryIntegrator(new MassIntegrator(m_rbcACoef), rbc_bdr); a.Assemble(); - + OperatorPtr A; Vector B, X; a.FormLinearSystem(ess_tdof_list, u1, b, A, X, B); @@ -67,21 +67,21 @@ TEST_CASE("NonlinearForm Boundary Integrator", "[NonlinearForm]") PCG(*A, M, B, X, 1, 500, 1e-12, 0.0); a.RecoverFEMSolution(X, b, u1); } - + // Solve as a nonlinear problem. { NonlinearForm a_nf(&fespace); a_nf.AddDomainIntegrator(new DiffusionIntegrator(matCoef)); a_nf.AddBoundaryIntegrator(new MassIntegrator(m_rbcACoef), rbc_bdr); a_nf.SetEssentialTrueDofs(ess_tdof_list); - + IterativeSolver::PrintLevel print; print.Iterations(); CGSolver cg; cg.SetPrintLevel(print); cg.SetMaxIter(100); cg.SetRelTol(1e-12); cg.SetAbsTol(0.0); - + NewtonSolver newton; newton.iterative_mode = false; newton.SetSolver(cg); @@ -89,10 +89,10 @@ TEST_CASE("NonlinearForm Boundary Integrator", "[NonlinearForm]") newton.SetPrintLevel(print); newton.SetRelTol(1e-14); newton.SetAbsTol(0.0); newton.SetMaxIter(1); - + newton.Mult(b, u2); } - + u2 -= u1; REQUIRE(u2.Norml2() == MFEM_Approx(0.0, 1e-5)); } From 66d8a7a9584e4b8151b630b9c79ee6bbbd7e7c41 Mon Sep 17 00:00:00 2001 From: "Mittal, Ketan" Date: Tue, 6 Feb 2024 15:45:25 -0800 Subject: [PATCH 182/200] fix ptr for empty partition --- fem/gslib.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/fem/gslib.cpp b/fem/gslib.cpp index 356b4178a7..270862feb4 100644 --- a/fem/gslib.cpp +++ b/fem/gslib.cpp @@ -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)); From 74e31a42167ba2ee603c2211e2b1a38bc85fee70 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Tue, 6 Feb 2024 16:03:51 -0800 Subject: [PATCH 183/200] Check for compatible dimensions in QuadratureInterpolator determinant computation --- fem/quadinterpolator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fem/quadinterpolator.cpp b/fem/quadinterpolator.cpp index 30b7497d7b..3f765b9e05 100644 --- a/fem/quadinterpolator.cpp +++ b/fem/quadinterpolator.cpp @@ -476,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) { @@ -483,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"); @@ -534,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, From 231b0970e1280e1b9f22c1b730f93159be9d64ce Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Tue, 6 Feb 2024 16:06:49 -0800 Subject: [PATCH 184/200] Wrap long lines --- mesh/mesh.cpp | 3 ++- mesh/mesh.hpp | 3 ++- mesh/submesh/submesh_utils.cpp | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mesh/mesh.cpp b/mesh/mesh.cpp index 3ec4c16a1c..e86e528081 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp @@ -475,7 +475,8 @@ void Mesh::GetBdrElementTransformation(int i, IsoparametricTransformation* ElTr) Geometry::Type face_geom = GetBdrElementGeometry(i); face_info = EncodeFaceInfo( DecodeFaceInfoLocalIndex(face_info), - Geometry::GetInverseOrientation(face_geom, DecodeFaceInfoOrientaiton(face_info)) + Geometry::GetInverseOrientation( + face_geom, DecodeFaceInfoOrientaiton(face_info)) ); GetLocalFaceTransformation(GetBdrElementType(i), diff --git a/mesh/mesh.hpp b/mesh/mesh.hpp index c8d4beb658..9880186832 100644 --- a/mesh/mesh.hpp +++ b/mesh/mesh.hpp @@ -1904,7 +1904,8 @@ public: /// @brief Given @a local_face_index and @a orientation, return the /// corresponding encoded "face info int". @sa FaceInfo. - static int EncodeFaceInfo(int local_face_index, int orientation) { return orientation + local_face_index*64; } + static int EncodeFaceInfo(int local_face_index, int orientation) + { return orientation + local_face_index*64; } /// @name More advanced entity information access methods /// @{ diff --git a/mesh/submesh/submesh_utils.cpp b/mesh/submesh/submesh_utils.cpp index 9e6bf441f3..147b4b59b6 100644 --- a/mesh/submesh/submesh_utils.cpp +++ b/mesh/submesh/submesh_utils.cpp @@ -124,8 +124,8 @@ void BuildVdofToVdofMap(const FiniteElementSpace& subfes, parent_element_ids[i], parent_volel_id, face_info); face_info = Mesh::EncodeFaceInfo( Mesh::DecodeFaceInfoLocalIndex(face_info), - Geometry::GetInverseOrientation(face_geom, - Mesh::DecodeFaceInfoOrientaiton(face_info))); + Geometry::GetInverseOrientation( + face_geom, Mesh::DecodeFaceInfoOrientaiton(face_info))); pm->GetLocalFaceTransformation( pm->GetBdrElementType(parent_element_ids[i]), pm->GetElementType(parent_volel_id), From 7039f52ed6a476e4de8cbe024a4f6b8bea43579e Mon Sep 17 00:00:00 2001 From: victor-decaria-nnl <97457991+victor-decaria-nnl@users.noreply.github.com> Date: Wed, 7 Feb 2024 10:40:32 -0500 Subject: [PATCH 185/200] Update operator.hpp Make override notation consistent with rest of class --- linalg/operator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linalg/operator.hpp b/linalg/operator.hpp index ad7a66c2ab..beb604e5b3 100644 --- a/linalg/operator.hpp +++ b/linalg/operator.hpp @@ -926,7 +926,7 @@ public: void AddMult(const Vector &x, Vector &y, const double a = 1.0) const override; - virtual void MultTranspose(const Vector &x, Vector &y) const; + void MultTranspose(const Vector &x, Vector &y) const override; /** @brief Implementation of Mult or MultTranspose. * TODO - Generalize to allow constraining rows and columns differently. From 5957cf2e4381cccf70134102c9c4b10390ab3c2f Mon Sep 17 00:00:00 2001 From: victor-decaria-nnl <97457991+victor-decaria-nnl@users.noreply.github.com> Date: Wed, 7 Feb 2024 11:01:34 -0500 Subject: [PATCH 186/200] Update test_operator.cpp explicitly write 0 as 0.0 --- tests/unit/linalg/test_operator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/linalg/test_operator.cpp b/tests/unit/linalg/test_operator.cpp index 8fca9a9f96..a9bd53554a 100644 --- a/tests/unit/linalg/test_operator.cpp +++ b/tests/unit/linalg/test_operator.cpp @@ -97,8 +97,8 @@ TEST_CASE("ConstrainedOperator", "[ConstrainedOperator][Operator]") REQUIRE(constrained_mult_application(A, list, x, y_true_transpose, true) == MFEM_Approx(0.0)); // DIAG_ZERO checks - Vector y_true_zero({0., 9783.932185967293, 3579.7299142176153, 0., 1344.7657848396123}); - Vector y_true_zero_transpose({0, 5723.696294059853, 7877.828900340113, 0., 2883.1173002839714}); + Vector y_true_zero({0.0, 9783.932185967293, 3579.7299142176153, 0.0, 1344.7657848396123}); + Vector y_true_zero_transpose({0.0, 5723.696294059853, 7877.828900340113, 0.0, 2883.1173002839714}); REQUIRE(constrained_mult_application(A, list, x, y_true_zero, false, Operator::DiagonalPolicy::DIAG_ZERO) == MFEM_Approx(0.0)); REQUIRE(constrained_mult_application(A, list, x, y_true_zero_transpose, true, From ec804f711f62f946ae56857c556bf3f24c961dd5 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Wed, 7 Feb 2024 09:21:43 -0800 Subject: [PATCH 187/200] In the CMake build system, fix a bug where the C++ standard, CMAKE_CXX_STANDARD, and related CMake flags cannot be set at config time by the user. Reported-by: @cyrush (issue #4117) --- CMakeLists.txt | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bd37563b5..a7098d6e8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") From 76006e9b14a90cd7ed9453a6aef6296da88a2ef3 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 7 Feb 2024 09:32:45 -0800 Subject: [PATCH 188/200] Fix typo --- mesh/mesh.cpp | 2 +- mesh/mesh.hpp | 4 ++-- mesh/submesh/submesh_utils.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mesh/mesh.cpp b/mesh/mesh.cpp index d051230248..d3187e2833 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp @@ -478,7 +478,7 @@ void Mesh::GetBdrElementTransformation(int i, face_info = EncodeFaceInfo( DecodeFaceInfoLocalIndex(face_info), Geometry::GetInverseOrientation( - face_geom, DecodeFaceInfoOrientaiton(face_info)) + face_geom, DecodeFaceInfoOrientation(face_info)) ); IntegrationPointTransformation Loc1; diff --git a/mesh/mesh.hpp b/mesh/mesh.hpp index 9809ae27bb..adfed3479f 100644 --- a/mesh/mesh.hpp +++ b/mesh/mesh.hpp @@ -1481,7 +1481,7 @@ public: the face info with inverted orientation. It does @b not return information corresponding to a second adjacent face. This function is deprecated, use Geometry::GetInverseOrientation, Mesh::EncodeFaceInfo, - Mesh::DecodeFaceInfoOrientaiton, and Mesh::DecodeFaceInfoLocalIndex + Mesh::DecodeFaceInfoOrientation, and Mesh::DecodeFaceInfoLocalIndex instead. @sa GetBdrElementAdjacentElement() */ @@ -1955,7 +1955,7 @@ public: }; /// Given a "face info int", return the face orientation. @sa FaceInfo. - static int DecodeFaceInfoOrientaiton(int info) { return info%64; } + static int DecodeFaceInfoOrientation(int info) { return info%64; } /// Given a "face info int", return the local face index. @sa FaceInfo. static int DecodeFaceInfoLocalIndex(int info) { return info/64; } diff --git a/mesh/submesh/submesh_utils.cpp b/mesh/submesh/submesh_utils.cpp index 28b3c07323..f086dfb42b 100644 --- a/mesh/submesh/submesh_utils.cpp +++ b/mesh/submesh/submesh_utils.cpp @@ -125,7 +125,7 @@ void BuildVdofToVdofMap(const FiniteElementSpace& subfes, face_info = Mesh::EncodeFaceInfo( Mesh::DecodeFaceInfoLocalIndex(face_info), Geometry::GetInverseOrientation( - face_geom, Mesh::DecodeFaceInfoOrientaiton(face_info))); + face_geom, Mesh::DecodeFaceInfoOrientation(face_info))); pm->GetLocalFaceTransformation( pm->GetBdrElementType(parent_element_ids[i]), pm->GetElementType(parent_volel_id), From 11f6944a823cafa6f40dac1bca7be18edf39fb20 Mon Sep 17 00:00:00 2001 From: Will Pazner <11493037+pazner@users.noreply.github.com> Date: Wed, 7 Feb 2024 10:38:06 -0800 Subject: [PATCH 189/200] Update fem/geom.cpp Co-authored-by: Veselin Dobrev --- fem/geom.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fem/geom.cpp b/fem/geom.cpp index 61dbaec7f2..fb20ff5957 100644 --- a/fem/geom.cpp +++ b/fem/geom.cpp @@ -256,7 +256,8 @@ template int GetInverseOrientation_(int orientation) { using geom_t = Geometry::Constants; - MFEM_ASSERT(orientation < geom_t::NumOrient, "Invalid orientation"); + MFEM_ASSERT(0 <= orientation && orientation < geom_t::NumOrient, + "Invalid orientation"); return geom_t::InvOrient[orientation]; } From a67d9f9158e683151c7e524d073b3595468eff76 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Wed, 7 Feb 2024 10:37:46 -0800 Subject: [PATCH 190/200] Replace all calls to Mesh::GetBdrElementBaseGeometry with Mesh::GetBdrElementGeometry --- examples/ex25.cpp | 2 +- examples/ex25p.cpp | 2 +- fem/fespace.cpp | 10 +++++----- fem/pfespace.cpp | 4 ++-- mesh/mesh.cpp | 10 +++++----- mesh/submesh/submesh_utils.cpp | 2 +- miniapps/meshing/reflector.cpp | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) 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/fem/fespace.cpp b/fem/fespace.cpp index 75a0e99074..03ef7afd12 100644 --- a/fem/fespace.cpp +++ b/fem/fespace.cpp @@ -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) diff --git a/fem/pfespace.cpp b/fem/pfespace.cpp index ffb448cabe..00d4f5d5ee 100644 --- a/fem/pfespace.cpp +++ b/fem/pfespace.cpp @@ -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(); } diff --git a/mesh/mesh.cpp b/mesh/mesh.cpp index d3187e2833..c3eb0e2b94 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp @@ -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; @@ -4965,7 +4965,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]); @@ -5149,7 +5149,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); @@ -11524,7 +11524,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); } }; diff --git a/mesh/submesh/submesh_utils.cpp b/mesh/submesh/submesh_utils.cpp index f086dfb42b..fb9f87d536 100644 --- a/mesh/submesh/submesh_utils.cpp +++ b/mesh/submesh/submesh_utils.cpp @@ -118,7 +118,7 @@ void BuildVdofToVdofMap(const FiniteElementSpace& subfes, auto pm = parentfes.GetMesh(); const Geometry::Type face_geom = - pm->GetBdrElementBaseGeometry(parent_element_ids[i]); + pm->GetBdrElementGeometry(parent_element_ids[i]); int face_info, parent_volel_id; pm->GetBdrElementAdjacentElement( parent_element_ids[i], parent_volel_id, face_info); diff --git a/miniapps/meshing/reflector.cpp b/miniapps/meshing/reflector.cpp index e941194401..4b35ad95a0 100644 --- a/miniapps/meshing/reflector.cpp +++ b/miniapps/meshing/reflector.cpp @@ -938,7 +938,7 @@ Mesh* ReflectHighOrderMesh(Mesh & mesh, Vector origin, Vector normal) mfem::Swap(rv[0], rv[2]); // Fix the orientation - const Geometry::Type orig_geom = mesh.GetBdrElementBaseGeometry(i); + const Geometry::Type orig_geom = mesh.GetBdrElementGeometry(i); Element *rbe = reflected->NewElement(orig_geom); rbe->SetVertices(v); reflected->AddBdrElement(rbe); From fbe53c754899eb1eb1bf9bb36164541ff1bd4ecf Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Thu, 8 Feb 2024 09:09:11 -0800 Subject: [PATCH 191/200] Move forall kernel out of QuadratureSpaceBase::ConstructWeights Fix nvcc issue: '__host__ __device__ lambda cannot have private or protected access within its class' --- fem/qspace.cpp | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/fem/qspace.cpp b/fem/qspace.cpp index 5a2e56c96a..7819bfba55 100644 --- a/fem/qspace.cpp +++ b/fem/qspace.cpp @@ -37,6 +37,24 @@ 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 @@ -47,15 +65,7 @@ void QuadratureSpaceBase::ConstructWeights() const // Then scale by the quadrature weights. const IntegrationRule &ir = GetIntRule(0); - const int N = 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]; - }); + ScaleByQuadratureWeights(weights, ir); } const Vector &QuadratureSpaceBase::GetWeights() const From f5f62ac93c03f0233067937b7f53d51d2c18b66b Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Thu, 8 Feb 2024 10:42:53 -0800 Subject: [PATCH 192/200] Update tests/unit/mesh/test_geometric_factors.cpp --- tests/unit/mesh/test_geometric_factors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/mesh/test_geometric_factors.cpp b/tests/unit/mesh/test_geometric_factors.cpp index eb376ef3a5..9a482c7ef5 100644 --- a/tests/unit/mesh/test_geometric_factors.cpp +++ b/tests/unit/mesh/test_geometric_factors.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. // From 26a480f831a3af976ffd9de48b489bb6172b63e2 Mon Sep 17 00:00:00 2001 From: JacobLotz Date: Fri, 9 Feb 2024 13:58:06 +0100 Subject: [PATCH 193/200] Add two functions --- mesh/nurbs.hpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mesh/nurbs.hpp b/mesh/nurbs.hpp index 2d1792e24b..6a9677a8af 100644 --- a/mesh/nurbs.hpp +++ b/mesh/nurbs.hpp @@ -296,10 +296,10 @@ protected: void ConnectBoundaries1D(int bnd0, int bnd1); void ConnectBoundaries2D(int bnd0, int bnd1); void ConnectBoundaries3D(int bnd0, int bnd1); - int DofMap(int dof) const - { - return (d_to_d.Size() > 0 )? d_to_d[dof] : dof; - }; + // int DofMap(int dof) const + // { + // return (d_to_d.Size() > 0 )? d_to_d[dof] : dof; + // }; // also count the global NumOfVertices and the global NumOfDofs void GenerateOffsets(); @@ -428,6 +428,15 @@ public: int GetNTotalDof() const { return NumOfDofs; } int GetNDof() const { return NumOfActiveDofs; } + /// Returns the local dof number + int GetActiveDof(int glob) const { return activeDof[glob]; }; + + /// Returns the dof index whilst accounting for periodic boundaries + int DofMap(int dof) const + { + return (d_to_d.Size() > 0 )? d_to_d[dof] : dof; + }; + /// Returns knotvectors in each dimension for patch @a p. void GetPatchKnotVectors(int p, Array &kv) const; From 3cdc57e9065a8b7c9a813fae70f2064fbb09a7b0 Mon Sep 17 00:00:00 2001 From: JacobLotz Date: Fri, 9 Feb 2024 14:00:45 +0100 Subject: [PATCH 194/200] clean up --- mesh/nurbs.hpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mesh/nurbs.hpp b/mesh/nurbs.hpp index 6a9677a8af..9a71cfaf7b 100644 --- a/mesh/nurbs.hpp +++ b/mesh/nurbs.hpp @@ -296,10 +296,6 @@ protected: void ConnectBoundaries1D(int bnd0, int bnd1); void ConnectBoundaries2D(int bnd0, int bnd1); void ConnectBoundaries3D(int bnd0, int bnd1); - // int DofMap(int dof) const - // { - // return (d_to_d.Size() > 0 )? d_to_d[dof] : dof; - // }; // also count the global NumOfVertices and the global NumOfDofs void GenerateOffsets(); From 57e310293540a1533ba408a8d89ce7fe842cc502 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Fri, 9 Feb 2024 10:43:58 -0800 Subject: [PATCH 195/200] Deprecate GeometricMultigrid constructor without essential boundaries --- fem/ceed/solvers/algebraic.cpp | 2 +- fem/multigrid.hpp | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/fem/ceed/solvers/algebraic.cpp b/fem/ceed/solvers/algebraic.cpp index 9500094166..981b8d202c 100644 --- a/fem/ceed/solvers/algebraic.cpp +++ b/fem/ceed/solvers/algebraic.cpp @@ -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/multigrid.hpp b/fem/multigrid.hpp index 208ad4b002..e6e7340474 100644 --- a/fem/multigrid.hpp +++ b/fem/multigrid.hpp @@ -170,8 +170,16 @@ protected: Array bfs; public: - /// @brief Construct an empty geometric multigrid object for the given finite + /// @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 From 1b76dbd97c9349abad30dd17625be2cfe8e8da5d Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Sun, 11 Feb 2024 21:02:43 -0800 Subject: [PATCH 196/200] In the constructor of class GeometricMultigrid, allow the input array ess_bdr to be empty. --- fem/multigrid.cpp | 46 +++++++++++++++++++++++++++++++--------------- fem/multigrid.hpp | 4 ++++ 2 files changed, 35 insertions(+), 15 deletions(-) diff --git a/fem/multigrid.cpp b/fem/multigrid.cpp index ba53e030c7..8368f94669 100644 --- a/fem/multigrid.cpp +++ b/fem/multigrid.cpp @@ -274,26 +274,42 @@ GeometricMultigrid::GeometricMultigrid( const Array &ess_bdr) : fespaces(fespaces_) { - const int nlevels = fespaces.GetNumLevels(); - ownedProlongations.SetSize(nlevels - 1); - ownedProlongations = true; - - essentialTrueDofs.SetSize(nlevels); - prolongations.SetSize(nlevels - 1); - for (int level = 0; level < nlevels; ++level) + bool have_ess_bdr = false; + for (int i = 0; i < ess_bdr.Size(); i++) { - essentialTrueDofs[level] = new Array; - fespaces.GetFESpaceAtLevel(level).GetEssentialTrueDofs( - ess_bdr, *essentialTrueDofs[level]); + 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) { - prolongations[level] = new RectangularConstrainedOperator( - fespaces.GetProlongationAtLevel(level), - *essentialTrueDofs[level], - *essentialTrueDofs[level + 1] - ); + if (have_ess_bdr) + { + prolongations[level] = new RectangularConstrainedOperator( + fespaces.GetProlongationAtLevel(level), + *essentialTrueDofs[level], + *essentialTrueDofs[level + 1] + ); + } + else + { + prolongations[level] = fespaces.GetProlongationAtLevel(level); + } } } diff --git a/fem/multigrid.hpp b/fem/multigrid.hpp index e6e7340474..3e6f0c2116 100644 --- a/fem/multigrid.hpp +++ b/fem/multigrid.hpp @@ -185,6 +185,10 @@ public: /// @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); From 4df15bf52605c3c84329e8b4718dcbda219ab51d Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Mon, 12 Feb 2024 17:12:42 -0800 Subject: [PATCH 197/200] Early return in QuadratureSpaceBase::GetWeights with empty mesh partitions --- fem/qspace.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fem/qspace.cpp b/fem/qspace.cpp index 17e9343639..937f8ac939 100644 --- a/fem/qspace.cpp +++ b/fem/qspace.cpp @@ -70,6 +70,7 @@ void QuadratureSpaceBase::ConstructWeights() const const Vector &QuadratureSpaceBase::GetWeights() const { + if (GetNE() == 0) { return weights; } if (weights.Size() == 0 || nodes_sequence != mesh.GetNodesSequence()) { ConstructWeights(); From d461ee1bca16d6c6817e581d7c48185fc2101893 Mon Sep 17 00:00:00 2001 From: Will Pazner Date: Thu, 15 Feb 2024 17:15:10 -0800 Subject: [PATCH 198/200] Update nodes_sequence more places in Mesh --- mesh/mesh.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mesh/mesh.cpp b/mesh/mesh.cpp index 7de1d1c1ae..fe9008af76 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp @@ -2586,6 +2586,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 @@ -2972,6 +2973,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 @@ -5744,6 +5746,7 @@ void Mesh::UpdateNURBS() Nodes->FESpace()->Update(); Nodes->Update(); + NodesUpdated(); NURBSext->SetCoordsFromPatches(*Nodes); if (NumOfVertices != NURBSext->GetNV()) @@ -10131,11 +10134,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, @@ -10337,6 +10336,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); } } From de445cbeb2824660d0c0c8049da92c95096dd6d7 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Sat, 17 Feb 2024 13:41:41 -0800 Subject: [PATCH 199/200] In SmemPAHdivMassApply2D, fix the case when D1D < Q1D. Note: such cases are currently not instatiated in the library. Reported-by: Tom Stitt --- fem/integ/bilininteg_hdiv_kernels.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fem/integ/bilininteg_hdiv_kernels.hpp b/fem/integ/bilininteg_hdiv_kernels.hpp index 398ecf28b7..11715bf372 100644 --- a/fem/integ/bilininteg_hdiv_kernels.hpp +++ b/fem/integ/bilininteg_hdiv_kernels.hpp @@ -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; } From 8132d10cddb7a5548c62e2f337ff572049f6eea8 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Mon, 19 Feb 2024 15:05:20 -0800 Subject: [PATCH 200/200] Fix math style in comments --- linalg/mumps.hpp | 8 ++++---- linalg/strumpack.hpp | 4 ++-- linalg/superlu.hpp | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/linalg/mumps.hpp b/linalg/mumps.hpp index 108f4a3271..fb73080ebf 100644 --- a/linalg/mumps.hpp +++ b/linalg/mumps.hpp @@ -86,7 +86,7 @@ public: void SetOperator(const Operator &op); /** - * @brief Solve \f$ y = Op^{-1} x \f$ + * @brief Solve $ y = Op^{-1} x $ * * @param x RHS vector * @param y Solution vector @@ -94,7 +94,7 @@ public: void Mult(const Vector &x, Vector &y) const; /** - * @brief Solve \f$ Y_i = Op^{-T} X_i \f$ + * @brief Solve $ Y_i = Op^{-T} X_i $ * * @param X Array of RHS vectors * @param Y Array of Solution vectors @@ -102,7 +102,7 @@ public: void ArrayMult(const Array &X, Array &Y) const; /** - * @brief Transpose Solve \f$ y = Op^{-T} x \f$ + * @brief Transpose Solve $ y = Op^{-T} x $ * * @param x RHS vector * @param y Solution vector @@ -110,7 +110,7 @@ public: void MultTranspose(const Vector &x, Vector &y) const; /** - * @brief Transpose Solve \f$ Y_i = Op^{-T} X_i \f$ + * @brief Transpose Solve $ Y_i = Op^{-T} X_i $ * * @param X Array of RHS vectors * @param Y Array of Solution vectors diff --git a/linalg/strumpack.hpp b/linalg/strumpack.hpp index 236e33dfef..a03b89d707 100644 --- a/linalg/strumpack.hpp +++ b/linalg/strumpack.hpp @@ -95,10 +95,10 @@ public: /// Default destructor. virtual ~STRUMPACKSolverBase(); - /// Factor and solve the linear system \f$y = Op^{-1} x \f$. + /// 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 \f$ Y_i = Op^{-1} X_i \f$ + /** @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; diff --git a/linalg/superlu.hpp b/linalg/superlu.hpp index 73a9d15d48..6b71a147ba 100644 --- a/linalg/superlu.hpp +++ b/linalg/superlu.hpp @@ -58,15 +58,15 @@ typedef enum { /// Natural ordering NATURAL, - /// Minimum degree ordering on structure of \f$ A^T*A \f$ + /// Minimum degree ordering on structure of $ A^T*A $ MMD_ATA, - /// Minimum degree ordering on structure of \f$ A^T+A \f$ + /// Minimum degree ordering on structure of $ A^T+A $ MMD_AT_PLUS_A, /// Approximate minimum degree column ordering COLAMD, - /// Sequential ordering on structure of \f$ A^T+A \f$ using the METIS package + /// Sequential ordering on structure of $ A^T+A $ using the METIS package METIS_AT_PLUS_A, - /** @brief Sequential ordering on structure of \f$ A^T+A \f$ using the + /** @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 @@ -182,22 +182,22 @@ public: @note @a A must be a SuperLURowLocMatrix. */ void SetOperator(const Operator &op); - /** @brief Factor and solve the linear system \f$ y = Op^{-1} x \f$ + /** @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 \f$ y_i = Op^{-1} x_i \f$ + /** @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; /** @brief Factor and solve the transposed linear system - \f$ y = Op^{-T} x \f$ + $ 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 - \f$ y_i = Op^{-T} x_i \f$ for all i in the @a X and @a Y arrays. + $ 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; @@ -234,7 +234,7 @@ public: void SetIterativeRefine(superlu::IterRefine iter_ref); /** @brief Specify whether to replace tiny diagonals encountered - during pivot with \f$ \sqrt{\epsilon} \lVert A \rVert \f$ + during pivot with $ \sqrt{\epsilon} \lVert A \rVert $ (default false) */ void SetReplaceTinyPivot(bool rtp);