From 5a2bf6360a096502bb23d1b6a2454ecb50d8da31 Mon Sep 17 00:00:00 2001 From: Guillaume Giudicelli Date: Sat, 12 Oct 2024 20:49:48 -0600 Subject: [PATCH] Remove libMesh namespace from framework: mostly headers - declare sub-namespaces of libMesh as their own namespaces - add libMesh:: in front of many objects - add using libMesh::many_common_ones refs #28499 --- .../include/actions/AddPeriodicBCAction.h | 3 +- framework/include/actions/AddVariableAction.h | 11 +- .../include/actions/SetupQuadratureAction.h | 2 +- framework/include/auxkernels/AuxKernel.h | 9 + .../include/auxkernels/ElementQualityAux.h | 2 +- framework/include/auxkernels/ProjectionAux.h | 2 +- framework/include/base/Adaptivity.h | 16 +- framework/include/base/Assembly.h | 101 +++--- framework/include/base/Factory.h | 2 +- framework/include/base/MeshGeneratorSystem.h | 9 +- framework/include/base/Moose.h | 13 +- framework/include/base/MooseApp.h | 22 +- framework/include/base/MooseError.h | 16 +- framework/include/base/MooseFunctor.h | 16 +- .../include/base/MooseFunctorArguments.h | 4 +- framework/include/base/MooseInit.h | 2 +- framework/include/base/MooseObjectUnitTest.h | 2 +- .../include/base/libMeshReducedNamespace.h | 290 ++++++++++++++++++ .../include/bcs/FunctionPeriodicBoundary.h | 6 +- framework/include/dampers/ElementDamper.h | 2 +- .../include/dirackernels/DiracKernelInfo.h | 2 +- .../include/executioners/FixedPointSolve.h | 2 + framework/include/functions/Function.h | 2 + .../functions/MooseParsedFunctionWrapper.h | 2 +- .../functions/PiecewiseConstantFromCSV.h | 2 +- .../fvkernels/FVPointValueConstraint.h | 2 +- .../include/geomsearch/ElementPairInfo.h | 1 + .../include/geomsearch/FindContactPoint.h | 13 +- .../include/geomsearch/GeometricSearchData.h | 4 +- .../geomsearch/GeometricSearchInterface.h | 4 +- .../include/geomsearch/PenetrationInfo.h | 2 + .../include/geomsearch/PenetrationLocator.h | 5 +- .../include/geomsearch/PenetrationThread.h | 34 +- .../hdgkernels/DiffusionHDGAssemblyHelper.h | 12 +- framework/include/ics/InitialConditionTempl.h | 13 +- .../include/interfaces/OrientedBoxInterface.h | 2 +- .../include/interfaces/ScalarCoupleable.h | 2 +- framework/include/interfaces/XFEMInterface.h | 4 +- framework/include/limiters/Limiter.h | 4 +- .../include/loops/AllLocalDofIndicesThread.h | 8 +- .../include/loops/AllNodesSendListThread.h | 4 +- .../loops/ComputeInitialConditionThread.h | 2 +- framework/include/loops/MaxQpsThread.h | 2 +- .../include/loops/ThreadedElementLoopBase.h | 3 + .../include/loops/UpdateErrorVectorsThread.h | 13 +- framework/include/markers/Marker.h | 2 + .../include/markers/ReporterPointMarker.h | 2 +- .../materials/DerivativeMaterialInterface.h | 2 +- .../include/materials/MaterialProperty.h | 8 +- .../materials/MaterialPropertyStorage.h | 21 +- framework/include/mesh/BndNode.h | 4 +- framework/include/mesh/FileMesh.h | 2 +- framework/include/mesh/MooseMesh.h | 84 ++--- .../meshgenerators/SideSetsGeneratorBase.h | 4 +- framework/include/multiapps/MultiApp.h | 17 +- .../outputs/BlockRestrictionDebugOutput.h | 2 +- framework/include/outputs/ConsoleUtils.h | 2 +- framework/include/outputs/Exodus.h | 4 +- framework/include/outputs/Nemesis.h | 2 +- framework/include/outputs/Output.h | 2 +- framework/include/outputs/OversampleOutput.h | 2 +- .../include/outputs/TopResidualDebugOutput.h | 2 +- .../VariableResidualNormsDebugOutput.h | 2 +- framework/include/parser/Builder.h | 2 +- .../include/partitioner/LibmeshPartitioner.h | 5 +- .../include/partitioner/MoosePartitioner.h | 2 + .../positions/QuadraturePointsPositions.h | 4 +- .../include/postprocessors/FindValueOnLine.h | 2 +- framework/include/postprocessors/NumDOFs.h | 2 +- framework/include/postprocessors/NumVars.h | 2 +- framework/include/postprocessors/PointValue.h | 2 +- .../preconditioners/MoosePreconditioner.h | 2 +- .../PhysicsBasedPreconditioner.h | 13 +- .../VariableCondensationPreconditioner.h | 9 +- framework/include/problems/DisplacedProblem.h | 3 + .../include/problems/DumpObjectsProblem.h | 2 +- framework/include/problems/FEProblemBase.h | 183 +++++------ .../problems/ReferenceResidualProblem.h | 2 +- framework/include/problems/SubProblem.h | 47 +-- .../ProxyRelationshipManager.h | 2 +- .../RelationshipManager.h | 7 +- framework/include/reporters/ReporterState.h | 2 +- framework/include/restart/DataIO.h | 24 +- framework/include/systems/AuxiliarySystem.h | 14 +- .../systems/ComputeFDResidualFunctor.h | 16 +- .../include/systems/ComputeResidualFunctor.h | 12 +- framework/include/systems/DisplacedSystem.h | 12 +- .../systems/DumpObjectsNonlinearSystem.h | 6 +- framework/include/systems/LinearSystem.h | 4 +- .../include/systems/NonlinearEigenSystem.h | 12 +- framework/include/systems/NonlinearSystem.h | 13 +- .../include/systems/NonlinearSystemBase.h | 12 +- framework/include/systems/SolverSystem.h | 2 + framework/include/systems/SystemBase.h | 34 +- .../timeintegrators/ExplicitTimeIntegrator.h | 2 +- .../timeintegrators/LumpedPreconditioner.h | 2 +- .../include/timeintegrators/TimeIntegrator.h | 3 +- .../include/transfers/MultiAppFieldTransfer.h | 2 +- ...tiAppGeneralFieldShapeEvaluationTransfer.h | 9 +- .../transfers/MultiAppGeneralFieldTransfer.h | 40 +-- .../MultiAppGeometricInterpolationTransfer.h | 22 +- .../transfers/MultiAppNearestNodeTransfer.h | 6 +- .../transfers/MultiAppProjectionTransfer.h | 8 +- .../include/transfers/MultiAppTransfer.h | 15 +- framework/include/transfers/Transfer.h | 4 +- .../userobjects/ElementQualityChecker.h | 6 +- .../userobjects/NodalNormalsPreprocessor.h | 2 +- framework/include/userobjects/RadialAverage.h | 2 + .../include/userobjects/SolutionUserObject.h | 34 +- framework/include/utils/ArbitraryQuadrature.h | 24 +- framework/include/utils/ColumnMajorMatrix.h | 9 +- .../include/utils/CompileTimeDerivatives.h | 2 +- framework/include/utils/Conversion.h | 6 +- .../utils/ElementsIntersectedByPlane.h | 18 +- .../include/utils/FactorizedRankTwoTensor.h | 8 +- framework/include/utils/FormattedTable.h | 2 +- framework/include/utils/GeometryUtils.h | 49 ++- framework/include/utils/GreenGaussGradient.h | 26 +- framework/include/utils/GriddedData.h | 2 - framework/include/utils/ImageSampler.h | 8 +- framework/include/utils/InputParameters.h | 6 +- framework/include/utils/LeastSquaresFitBase.h | 2 + framework/include/utils/LineSegment.h | 3 +- framework/include/utils/MathFVUtils.h | 28 +- framework/include/utils/MathUtils.h | 27 +- .../include/utils/MeshBaseImageSampler.h | 10 +- .../include/utils/MooseLagrangeHelpers.h | 98 +++--- .../utils/MooseMeshElementConversionUtils.h | 2 + .../include/utils/MooseMeshXYCuttingUtils.h | 23 +- framework/include/utils/MooseTypes.h | 51 +-- framework/include/utils/MooseUtils.h | 125 ++++---- framework/include/utils/ParallelUniqueId.h | 2 - framework/include/utils/PerfGraph.h | 2 +- framework/include/utils/PetscSupport.h | 5 +- framework/include/utils/PetscVectorReader.h | 1 + framework/include/utils/PointReduction.h | 10 +- framework/include/utils/PolynomialFit.h | 2 + framework/include/utils/RankFourTensor.h | 44 +-- .../utils/RankFourTensorImplementation.h | 4 +- framework/include/utils/RankMap.h | 4 +- framework/include/utils/RankThreeTensor.h | 43 ++- .../utils/RankThreeTensorImplementation.h | 14 +- framework/include/utils/RankTwoTensor.h | 53 ++-- .../utils/RankTwoTensorImplementation.h | 6 +- framework/include/utils/RayTracing.h | 2 +- framework/include/utils/SerialAccess.h | 4 +- framework/include/utils/SolutionInvalidity.h | 2 +- .../include/utils/SymmetricRankFourTensor.h | 23 +- .../SymmetricRankFourTensorImplementation.h | 8 +- .../include/utils/SymmetricRankTwoTensor.h | 32 +- .../SymmetricRankTwoTensorImplementation.h | 21 +- .../include/utils/TrilinearInterpolation.h | 2 + .../include/variables/MooseLinearVariableFV.h | 25 +- .../include/variables/MooseVariableBase.h | 17 +- .../include/variables/MooseVariableData.h | 59 ++-- .../include/variables/MooseVariableDataBase.h | 20 +- .../include/variables/MooseVariableDataFV.h | 26 +- .../variables/MooseVariableDataLinearFV.h | 18 +- framework/include/variables/MooseVariableFE.h | 26 +- framework/include/variables/MooseVariableFV.h | 21 +- .../include/variables/MooseVariableField.h | 22 +- .../variables/MooseVariableFieldBase.h | 6 +- .../LineMaterialSamplerBase.h | 2 +- .../vectorpostprocessors/PointSamplerBase.h | 2 +- framework/src/auxkernels/ElementQualityAux.C | 3 +- framework/src/bcs/FunctionPeriodicBoundary.C | 4 +- framework/src/bcs/IntegratedBC.C | 4 +- framework/src/bounds/BoundsBase.C | 2 +- framework/src/executioners/Eigenvalue.C | 3 + .../src/fvkernels/FVPointValueConstraint.C | 6 +- framework/src/kernels/ArrayKernel.C | 6 +- framework/src/mesh/AnnularMesh.C | 10 +- framework/src/mesh/ConcentricCircleMesh.C | 202 ++++++------ framework/src/mesh/FaceInfo.C | 5 +- framework/src/mesh/FileMesh.C | 3 + framework/src/mesh/MooseMesh.C | 48 +-- .../ConcentricCircleMeshGenerator.C | 2 +- .../meshgenerators/ExtraNodesetGenerator.C | 2 +- .../src/meshgenerators/FileMeshGenerator.C | 4 +- .../FillBetweenSidesetsGenerator.C | 4 +- .../LowerDBlockFromSidesetGenerator.C | 4 +- .../meshgenerators/MeshDiagnosticsGenerator.C | 43 +-- framework/src/meshgenerators/MeshGenerator.C | 4 +- .../src/meshgenerators/RefineBlockGenerator.C | 4 +- .../meshgenerators/RefineSidesetGenerator.C | 2 +- .../SideSetsFromPointsGenerator.C | 3 +- .../meshgenerators/SideSetsGeneratorBase.C | 8 +- .../src/meshgenerators/SmoothMeshGenerator.C | 2 +- .../src/meshgenerators/XYDelaunayGenerator.C | 12 +- .../src/meshgenerators/XYZDelaunayGenerator.C | 2 +- .../ActivateElementsUserObjectBase.C | 4 +- .../ElementSubdomainModifierBase.C | 2 +- .../src/partitioner/LibmeshPartitioner.C | 38 ++- .../ElemSideNeighborLayersTester.C | 4 +- .../src/userobjects/ElementQualityChecker.C | 9 +- .../src/userobjects/SolutionUserObject.C | 22 +- .../vectorpostprocessors/ElementsAlongLine.C | 2 +- .../IntersectionPointsAlongLine.C | 2 +- .../src/vectorpostprocessors/WorkBalance.C | 2 +- 199 files changed, 1742 insertions(+), 1241 deletions(-) create mode 100644 framework/include/base/libMeshReducedNamespace.h diff --git a/framework/include/actions/AddPeriodicBCAction.h b/framework/include/actions/AddPeriodicBCAction.h index 62c0233f726c..9d1df3a9af02 100644 --- a/framework/include/actions/AddPeriodicBCAction.h +++ b/framework/include/actions/AddPeriodicBCAction.h @@ -39,7 +39,8 @@ class AddPeriodicBCAction : public Action */ bool autoTranslationBoundaries(); - void setPeriodicVars(PeriodicBoundaryBase & p, const std::vector & var_names); + void setPeriodicVars(libMesh::PeriodicBoundaryBase & p, + const std::vector & var_names); MooseMesh * _mesh; }; diff --git a/framework/include/actions/AddVariableAction.h b/framework/include/actions/AddVariableAction.h index e43e764d2517..f76043c7645c 100644 --- a/framework/include/actions/AddVariableAction.h +++ b/framework/include/actions/AddVariableAction.h @@ -40,13 +40,13 @@ class AddVariableAction : public MooseObjectAction /** * determine the FEType by examining family and order in the provided parameters */ - static FEType feType(const InputParameters & params); + static libMesh::FEType feType(const InputParameters & params); /** * DEPRECATED: Use variableType instead */ static std::string - determineType(const FEType & fe_type, unsigned int components, bool is_fv = false); + determineType(const libMesh::FEType & fe_type, unsigned int components, bool is_fv = false); /** * Determines a variable type @@ -54,8 +54,9 @@ class AddVariableAction : public MooseObjectAction * @param is_fv Whether or not the variable is use for finite volume * @param is_array Whether or not the variable is an array variable */ - static std::string - variableType(const FEType & fe_type, const bool is_fv = false, const bool is_array = false); + static std::string variableType(const libMesh::FEType & fe_type, + const bool is_fv = false, + const bool is_array = false); protected: /** @@ -85,7 +86,7 @@ class AddVariableAction : public MooseObjectAction std::set getSubdomainIDs(); /// FEType for the variable being created - FEType _fe_type; + libMesh::FEType _fe_type; /// True if the variable being created is a scalar bool _scalar_var; diff --git a/framework/include/actions/SetupQuadratureAction.h b/framework/include/actions/SetupQuadratureAction.h index 9bb1041cbf04..38b065b98532 100644 --- a/framework/include/actions/SetupQuadratureAction.h +++ b/framework/include/actions/SetupQuadratureAction.h @@ -50,7 +50,7 @@ class SetupQuadratureAction : public Action } protected: - QuadratureType _type; + libMesh::QuadratureType _type; Order _order; Order _element_order; Order _side_order; diff --git a/framework/include/auxkernels/AuxKernel.h b/framework/include/auxkernels/AuxKernel.h index 2e1cbe32e998..4d3f71fdb076 100644 --- a/framework/include/auxkernels/AuxKernel.h +++ b/framework/include/auxkernels/AuxKernel.h @@ -44,6 +44,15 @@ class AuxiliarySystem; class SystemBase; class MooseMesh; +using libMesh::CONSTANT; +using libMesh::DofObject; +using libMesh::FIRST; +using libMesh::LAGRANGE; +using libMesh::MONOMIAL; + +using libMesh::DISCONTINUOUS; +using libMesh::SIDE_DISCONTINUOUS; + /** * Base class for creating new auxiliary kernels and auxiliary boundary conditions. * diff --git a/framework/include/auxkernels/ElementQualityAux.h b/framework/include/auxkernels/ElementQualityAux.h index 973334d6552e..ee5be4af1be4 100644 --- a/framework/include/auxkernels/ElementQualityAux.h +++ b/framework/include/auxkernels/ElementQualityAux.h @@ -27,5 +27,5 @@ class ElementQualityAux : public AuxKernel virtual Real computeValue() override; /// The metric type to use - ElemQuality _metric_type; + libMesh::ElemQuality _metric_type; }; diff --git a/framework/include/auxkernels/ProjectionAux.h b/framework/include/auxkernels/ProjectionAux.h index 6c5c103c4a24..e16d33edcbfe 100644 --- a/framework/include/auxkernels/ProjectionAux.h +++ b/framework/include/auxkernels/ProjectionAux.h @@ -37,7 +37,7 @@ class ProjectionAux : public AuxKernel const MooseVariableFieldBase & _source_variable; /// The system owning the source variable - const System & _source_sys; + const libMesh::System & _source_sys; /// Whether to use the auxkernel block restriction to limit the values for the source variables bool _use_block_restriction_for_source; diff --git a/framework/include/base/Adaptivity.h b/framework/include/base/Adaptivity.h index fe40f7843c95..a886575ccb98 100644 --- a/framework/include/base/Adaptivity.h +++ b/framework/include/base/Adaptivity.h @@ -30,7 +30,7 @@ class DisplacedProblem; template class MooseVariableFE; typedef MooseVariableFE MooseVariable; -typedef MooseVariableFE> VectorMooseVariable; +typedef MooseVariableFE> VectorMooseVariable; class MooseEnum; class MultiMooseEnum; @@ -82,7 +82,7 @@ class Adaptivity : public ConsoleStreamInterface, /** * Set the error norm (FIXME: improve description) */ - void setErrorNorm(SystemNorm & sys_norm); + void setErrorNorm(libMesh::SystemNorm & sys_norm); /** * @@ -241,7 +241,7 @@ class Adaptivity : public ConsoleStreamInterface, * * @param indicator_field The name of the field to get an ErrorVector for. */ - ErrorVector & getErrorVector(const std::string & indicator_field); + libMesh::ErrorVector & getErrorVector(const std::string & indicator_field); /** * Update the ErrorVectors that have been requested through calls to getErrorVector(). @@ -262,16 +262,16 @@ class Adaptivity : public ConsoleStreamInterface, /// on/off flag reporting if the adaptivity system has been initialized bool _initialized; /// A mesh refinement object to be used either with initial refinement or with Adaptivity. - std::unique_ptr _mesh_refinement; + std::unique_ptr _mesh_refinement; /// Error estimator to be used by the apps. - std::unique_ptr _error_estimator; + std::unique_ptr _error_estimator; /// Error vector for use with the error estimator. - std::unique_ptr _error; + std::unique_ptr _error; std::shared_ptr _displaced_problem; /// A mesh refinement object for displaced mesh - std::unique_ptr _displaced_mesh_refinement; + std::unique_ptr _displaced_mesh_refinement; /// the number of adaptivity steps to do at the beginning of simulation unsigned int _initial_steps; @@ -310,7 +310,7 @@ class Adaptivity : public ConsoleStreamInterface, bool _recompute_markers_during_cycles; /// Stores pointers to ErrorVectors associated with indicator field names - std::map> _indicator_field_to_error_vector; + std::map> _indicator_field_to_error_vector; bool _p_refinement_flag = false; }; diff --git a/framework/include/base/Assembly.h b/framework/include/base/Assembly.h index ca45a70f0f00..2cb73c032891 100644 --- a/framework/include/base/Assembly.h +++ b/framework/include/base/Assembly.h @@ -62,6 +62,14 @@ class XFEMInterface; class SubProblem; class NodeFaceConstraint; +using libMesh::FEBase; +using libMesh::FEFamily; +using libMesh::FEType; +using libMesh::FEVectorBase; +using libMesh::LAGRANGE_VEC; +using libMesh::Order; +using libMesh::QuadratureType; + /// Computes a conversion multiplier for use when computing integraals for the /// current coordinate system type. This allows us to handle cases where we use RZ, /// spherical, or other non-cartesian coordinate systems. The factor returned @@ -205,13 +213,13 @@ class Assembly * Returns the reference to the current quadrature being used * @return A _reference_ to the pointer. Make sure to store this as a reference! */ - const QBase * const & qRule() const { return constify_ref(_current_qrule); } + const libMesh::QBase * const & qRule() const { return constify_ref(_current_qrule); } /** * Returns the reference to the current quadrature being used * @return A _reference_ to the pointer. Make sure to store this as a reference! */ - QBase * const & writeableQRule() { return _current_qrule; } + libMesh::QBase * const & writeableQRule() { return _current_qrule; } /** * Returns the reference to the quadrature points @@ -281,13 +289,13 @@ class Assembly * Returns the reference to the current quadrature being used on a current face * @return A _reference_. Make sure to store this as a reference! */ - const QBase * const & qRuleFace() const { return constify_ref(_current_qrule_face); } + const libMesh::QBase * const & qRuleFace() const { return constify_ref(_current_qrule_face); } /** * Returns the reference to the current quadrature being used on a current face * @return A _reference_. Make sure to store this as a reference! */ - QBase * const & writeableQRuleFace() { return _current_qrule_face; } + libMesh::QBase * const & writeableQRuleFace() { return _current_qrule_face; } /** * Returns the reference to the current quadrature being used @@ -466,13 +474,16 @@ class Assembly * Returns the reference to the current quadrature being used on a current neighbor * @return A _reference_. Make sure to store this as a reference! */ - const QBase * const & qRuleNeighbor() const { return constify_ref(_current_qrule_neighbor); } + const libMesh::QBase * const & qRuleNeighbor() const + { + return constify_ref(_current_qrule_neighbor); + } /** * Returns the reference to the current quadrature being used on a current neighbor * @return A _reference_. Make sure to store this as a reference! */ - QBase * const & writeableQRuleNeighbor() { return _current_qrule_neighbor; } + libMesh::QBase * const & writeableQRuleNeighbor() { return _current_qrule_neighbor; } /** * Returns the reference to the transformed jacobian weights on a current face @@ -538,7 +549,7 @@ class Assembly * @param qrule The qrule you want to set * @param dim The spatial dimension of the qrule */ - void setVolumeQRule(QBase * qrule, unsigned int dim); + void setVolumeQRule(libMesh::QBase * qrule, unsigned int dim); /** * Set the qrule to be used for face integration. @@ -548,7 +559,7 @@ class Assembly * @param qrule The qrule you want to set * @param dim The spatial dimension of the qrule */ - void setFaceQRule(QBase * qrule, unsigned int dim); + void setFaceQRule(libMesh::QBase * qrule, unsigned int dim); /** * Specifies a custom qrule for integration on mortar segment mesh @@ -582,7 +593,7 @@ class Assembly * @param qrule The qrule you want to set * @param dim The spatial dimension of the qrule */ - void setLowerQRule(QBase * qrule, unsigned int dim); + void setLowerQRule(libMesh::QBase * qrule, unsigned int dim); public: /** @@ -593,7 +604,7 @@ class Assembly * @param qrule The qrule you want to set * @param dim The spatial dimension of the qrule */ - void setNeighborQRule(QBase * qrule, unsigned int dim); + void setNeighborQRule(libMesh::QBase * qrule, unsigned int dim); /** * Reinitialize objects (JxW, q_points, ...) for an elements @@ -657,7 +668,7 @@ class Assembly /** * Returns a reference to the quadrature rule for the mortar segments */ - const QBase * const & qRuleMortar() const { return constify_ref(_qrule_msm); } + const libMesh::QBase * const & qRuleMortar() const { return constify_ref(_qrule_msm); } private: /** @@ -735,7 +746,7 @@ class Assembly /** * Initialize the Assembly object and set the CouplingMatrix for use throughout. */ - void init(const CouplingMatrix * cm); + void init(const libMesh::CouplingMatrix * cm); /// Create pair of variables requiring nonlocal jacobian contributions void initNonlocalCoupling(); @@ -925,10 +936,10 @@ class Assembly /** * Adds element matrix for ivar rows and jvar columns to the global Jacobian matrix. */ - void addJacobianBlock(SparseMatrix & jacobian, + void addJacobianBlock(libMesh::SparseMatrix & jacobian, unsigned int ivar, unsigned int jvar, - const DofMap & dof_map, + const libMesh::DofMap & dof_map, std::vector & dof_indices, GlobalDataKey, TagID tag); @@ -937,10 +948,10 @@ class Assembly * Add element matrix for ivar rows and jvar columns to the global Jacobian matrix for given * tags. */ - void addJacobianBlockTags(SparseMatrix & jacobian, + void addJacobianBlockTags(libMesh::SparseMatrix & jacobian, unsigned int ivar, unsigned int jvar, - const DofMap & dof_map, + const libMesh::DofMap & dof_map, std::vector & dof_indices, GlobalDataKey, const std::set & tags); @@ -948,10 +959,10 @@ class Assembly /** * Adds non-local element matrix for ivar rows and jvar columns to the global Jacobian matrix. */ - void addJacobianBlockNonlocal(SparseMatrix & jacobian, + void addJacobianBlockNonlocal(libMesh::SparseMatrix & jacobian, unsigned int ivar, unsigned int jvar, - const DofMap & dof_map, + const libMesh::DofMap & dof_map, const std::vector & idof_indices, const std::vector & jdof_indices, GlobalDataKey, @@ -960,10 +971,10 @@ class Assembly /** * Adds non-local element matrix for ivar rows and jvar columns to the global Jacobian matrix. */ - void addJacobianBlockNonlocalTags(SparseMatrix & jacobian, + void addJacobianBlockNonlocalTags(libMesh::SparseMatrix & jacobian, unsigned int ivar, unsigned int jvar, - const DofMap & dof_map, + const libMesh::DofMap & dof_map, const std::vector & idof_indices, const std::vector & jdof_indices, GlobalDataKey, @@ -1000,10 +1011,10 @@ class Assembly * Adds three neighboring element matrices for ivar rows and jvar columns to the global Jacobian * matrix. */ - void addJacobianNeighbor(SparseMatrix & jacobian, + void addJacobianNeighbor(libMesh::SparseMatrix & jacobian, unsigned int ivar, unsigned int jvar, - const DofMap & dof_map, + const libMesh::DofMap & dof_map, std::vector & dof_indices, std::vector & neighbor_dof_indices, GlobalDataKey, @@ -1013,10 +1024,10 @@ class Assembly * Adds three neighboring element matrices for ivar rows and jvar columns to the global Jacobian * matrix. */ - void addJacobianNeighborTags(SparseMatrix & jacobian, + void addJacobianNeighborTags(libMesh::SparseMatrix & jacobian, unsigned int ivar, unsigned int jvar, - const DofMap & dof_map, + const libMesh::DofMap & dof_map, std::vector & dof_indices, std::vector & neighbor_dof_indices, GlobalDataKey, @@ -1847,7 +1858,7 @@ class Assembly * current subdomain (as set via setCurrentSubdomainID is used to determine * the correct rule. The attached quadrature rule is also returned. */ - inline const QBase * attachQRuleElem(unsigned int dim, FEBase & fe) + inline const libMesh::QBase * attachQRuleElem(unsigned int dim, FEBase & fe) { auto qrule = qrules(dim).vol.get(); fe.attach_quadrature_rule(qrule); @@ -1859,7 +1870,7 @@ class Assembly * current subdomain (as set via setCurrentSubdomainID is used to determine * the correct rule. The attached quadrature rule is also returned. */ - inline const QBase * attachQRuleFace(unsigned int dim, FEBase & fe) + inline const libMesh::QBase * attachQRuleFace(unsigned int dim, FEBase & fe) { auto qrule = qrules(dim).face.get(); fe.attach_quadrature_rule(qrule); @@ -1941,7 +1952,7 @@ class Assembly void reinitFENeighbor(const Elem * neighbor, const std::vector & reference_points); template - void setCoordinateTransformation(const QBase * qrule, + void setCoordinateTransformation(const libMesh::QBase * qrule, const Points & q_points, Coords & coord, SubdomainID sub_id); @@ -1975,7 +1986,7 @@ class Assembly void computeGradPhiAD(const Elem * elem, unsigned int n_qp, ADTemplateVariablePhiGradient & grad_phi, - FEGenericBase * fe); + libMesh::FEGenericBase * fe); /** * resize any objects that contribute to automatic differentiation-related mapping calculations @@ -2072,7 +2083,7 @@ class Assembly /** * Add a local Jacobian block to a global Jacobian with proper scaling. */ - void addJacobianBlock(SparseMatrix & jacobian, + void addJacobianBlock(libMesh::SparseMatrix & jacobian, DenseMatrix & jac_block, const MooseVariableBase & ivar, const MooseVariableBase & jvar, @@ -2262,8 +2273,8 @@ class Assembly const bool _displaced; /// Coupling matrices - const CouplingMatrix * _cm; - const CouplingMatrix & _nonlocal_cm; + const libMesh::CouplingMatrix * _cm; + const libMesh::CouplingMatrix & _nonlocal_cm; /// Whether we are currently computing the residual const bool & _computing_residual; @@ -2292,7 +2303,7 @@ class Assembly /// Flag that indicates if the jacobian block for the lower dimensional element was used std::vector>> _jacobian_block_lower_used; /// DOF map - const DofMap & _dof_map; + const libMesh::DofMap & _dof_map; /// Thread number (id) THREAD_ID _tid; @@ -2354,9 +2365,9 @@ class Assembly /// The current helper object for transforming coordinates FEBase * _current_fe_helper; /// The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac kernels) - QBase * _current_qrule; + libMesh::QBase * _current_qrule; /// The current volumetric quadrature for the element - QBase * _current_qrule_volume; + libMesh::QBase * _current_qrule_volume; /// The current arbitrary quadrature rule used within the element interior ArbitraryQuadrature * _current_qrule_arbitrary; /// The current arbitrary quadrature rule used on the element face @@ -2386,11 +2397,11 @@ class Assembly } /// volume/elem (meshdim) quadrature rule - std::unique_ptr vol; + std::unique_ptr vol; /// area/face (meshdim-1) quadrature rule - std::unique_ptr face; + std::unique_ptr face; /// finite volume face/flux quadrature rule (meshdim-1) - std::unique_ptr fv_face; + std::unique_ptr fv_face; /// volume/elem (meshdim) custom points quadrature rule std::unique_ptr arbitrary_vol; /// area/face (meshdim-1) custom points quadrature rule @@ -2411,7 +2422,7 @@ class Assembly /// the subdomain that has the highest specified quadrature order. So when /// you need to access a face quadrature rule, you should retrieve it via this /// function. - QBase * qruleFace(const Elem * elem, unsigned int side); + libMesh::QBase * qruleFace(const Elem * elem, unsigned int side); ArbitraryQuadrature * qruleArbitraryFace(const Elem * elem, unsigned int side); template @@ -2466,7 +2477,7 @@ class Assembly /// helper object for transforming coordinates FEBase * _current_fe_face_helper; /// quadrature rule used on faces - QBase * _current_qrule_face; + libMesh::QBase * _current_qrule_face; /// The current arbitrary quadrature rule used on element faces ArbitraryQuadrature * _current_qface_arbitrary; /// The current quadrature points on a face @@ -2507,7 +2518,7 @@ class Assembly std::map _holder_fe_lower_helper; /// quadrature rule used on neighbors - QBase * _current_qrule_neighbor; + libMesh::QBase * _current_qrule_neighbor; /// The current quadrature points on the neighbor face MooseArray _current_q_points_face_neighbor; /// Flag to indicate that JxW_neighbor is needed @@ -2530,13 +2541,13 @@ class Assembly /// raw pointer because we need to be able to return a reference to it because /// we will be constructing other objects that need the qrule before the qrule /// is actually created - QBase * _qrule_msm; + libMesh::QBase * _qrule_msm; /// Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh bool _custom_mortar_qrule; /// quadrature rule used on lower dimensional elements. This should always be /// the same as the face qrule - QBase * _current_qrule_lower; + libMesh::QBase * _current_qrule_lower; protected: /// The current "element" we are currently on. @@ -2821,11 +2832,11 @@ class Assembly const NumericVector * _scaling_vector = nullptr; /// In place side element builder for _current_side_elem - ElemSideBuilder _current_side_elem_builder; + libMesh::ElemSideBuilder _current_side_elem_builder; /// In place side element builder for _current_neighbor_side_elem - ElemSideBuilder _current_neighbor_side_elem_builder; + libMesh::ElemSideBuilder _current_neighbor_side_elem_builder; /// In place side element builder for computeFaceMap() - ElemSideBuilder _compute_face_map_side_elem_builder; + libMesh::ElemSideBuilder _compute_face_map_side_elem_builder; const Elem * _msm_elem = nullptr; diff --git a/framework/include/base/Factory.h b/framework/include/base/Factory.h index 820d316216f3..5e0ddca10a15 100644 --- a/framework/include/base/Factory.h +++ b/framework/include/base/Factory.h @@ -253,7 +253,7 @@ Factory::createUnique(const std::string & obj_name, { auto object = createUnique(obj_name, name, parameters, tid, false); if (!dynamic_cast(object.get())) - mooseError("We expected to create an object of type '" + demangle(typeid(T).name()) + + mooseError("We expected to create an object of type '" + libMesh::demangle(typeid(T).name()) + "'.\nInstead we received a parameters object for type '" + obj_name + "'.\nDid you call the wrong \"add\" method in your Action?"); diff --git a/framework/include/base/MeshGeneratorSystem.h b/framework/include/base/MeshGeneratorSystem.h index 4fc1e1179a1c..6441842478fe 100644 --- a/framework/include/base/MeshGeneratorSystem.h +++ b/framework/include/base/MeshGeneratorSystem.h @@ -78,7 +78,8 @@ class MeshGeneratorSystem : public PerfGraphInterface, public libMesh::ParallelO * Get a reference to a pointer that will be the output of the * MeshGenerator named name */ - [[nodiscard]] std::unique_ptr & getMeshGeneratorOutput(const MeshGeneratorName & name); + [[nodiscard]] std::unique_ptr & + getMeshGeneratorOutput(const MeshGeneratorName & name); /** * Creates (constructs) all of the MeshGenerators that have been @@ -112,7 +113,7 @@ class MeshGeneratorSystem : public PerfGraphInterface, public libMesh::ParallelO /** * Get the saved mesh by name */ - [[nodiscard]] std::unique_ptr getSavedMesh(const std::string & name); + [[nodiscard]] std::unique_ptr getSavedMesh(const std::string & name); /** * Get all user-defined saved meshes except main and main_displaced @@ -227,13 +228,13 @@ class MeshGeneratorSystem : public PerfGraphInterface, public libMesh::ParallelO std::vector> _ordered_mesh_generators; /// Holds the output for each mesh generator - including duplicates needed downstream - std::map>> _mesh_generator_outputs; + std::map>> _mesh_generator_outputs; /// The final mesh generator name to use std::string _final_generator_name; /// Holds the map of save in mesh -> name - std::map> _save_in_meshes; + std::map> _save_in_meshes; /// The name of the data driven generator, if any std::optional _data_driven_generator_name; diff --git a/framework/include/base/Moose.h b/framework/include/base/Moose.h index 4bf02d629e90..65d489e72742 100644 --- a/framework/include/base/Moose.h +++ b/framework/include/base/Moose.h @@ -12,6 +12,7 @@ #include "libmesh/perf_log.h" #include "libmesh/libmesh_common.h" #include "XTermConstants.h" +#include "libmesh/utility.h" // to declare namespace #include #include @@ -32,18 +33,16 @@ using UniquePtr = std::unique_ptr; #endif } -using namespace libMesh; - class ActionFactory; class Factory; class MooseEnumItem; class ExecFlagEnum; class MooseVariableFieldBase; -void MooseVecView(NumericVector & vector); -void MooseVecView(const NumericVector & vector); -void MooseMatView(SparseMatrix & mat); -void MooseMatView(const SparseMatrix & mat); +void MooseVecView(libMesh::NumericVector & vector); +void MooseVecView(const libMesh::NumericVector & vector); +void MooseMatView(libMesh::SparseMatrix & mat); +void MooseMatView(const libMesh::SparseMatrix & mat); /** * MOOSE now contains C++17 code, so give a reasonable error message @@ -171,7 +170,7 @@ extern bool show_multiple; * * This is no longer instantiated in the framework and will be removed in the future. */ -extern PerfLog perf_log; +extern libMesh::PerfLog perf_log; /** * Variable indicating whether we will enable FPE trapping for this run. diff --git a/framework/include/base/MooseApp.h b/framework/include/base/MooseApp.h index 7f2782320159..003a1b02bbd9 100644 --- a/framework/include/base/MooseApp.h +++ b/framework/include/base/MooseApp.h @@ -454,12 +454,15 @@ class MooseApp : public ConsoleStreamInterface, /** * Set the Exodus reader to restart variables from an Exodus mesh file */ - void setExReaderForRestart(std::shared_ptr && exreader) { _ex_reader = exreader; } + void setExReaderForRestart(std::shared_ptr && exreader) + { + _ex_reader = exreader; + } /** * Get the Exodus reader to restart variables from an Exodus mesh file */ - ExodusII_IO * getExReaderForRestart() const { return _ex_reader.get(); } + libMesh::ExodusII_IO * getExReaderForRestart() const { return _ex_reader.get(); } /** * Actually build everything in the input file. @@ -1036,7 +1039,7 @@ class MooseApp : public ConsoleStreamInterface, bool defaultAutomaticScaling() const { return _automatic_automatic_scaling; } // Return the communicator for this application - const std::shared_ptr getCommunicator() const { return _comm; } + const std::shared_ptr getCommunicator() const { return _comm; } /** * Return the container of relationship managers @@ -1091,14 +1094,14 @@ class MooseApp : public ConsoleStreamInterface, /** * Helper method for dynamic loading of objects */ - void dynamicRegistration(const Parameters & params); + void dynamicRegistration(const libMesh::Parameters & params); /** * Recursively loads libraries and dependencies in the proper order to fully register a * MOOSE application that may have several dependencies. REQUIRES: dynamic linking loader support. */ void loadLibraryAndDependencies(const std::string & library_filename, - const Parameters & params, + const libMesh::Parameters & params, bool load_dependencies = true); /// Constructor is protected so that this object is constructed through the AppFactory object @@ -1132,7 +1135,7 @@ class MooseApp : public ConsoleStreamInterface, const std::string _type; /// The MPI communicator this App is going to use - const std::shared_ptr _comm; + const std::shared_ptr _comm; /// The output file basename std::string _output_file_base; @@ -1252,7 +1255,7 @@ class MooseApp : public ConsoleStreamInterface, bool _initial_from_file; /// The Exodus reader when _initial_from_file is set to true - std::shared_ptr _ex_reader; + std::shared_ptr _ex_reader; /// This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh. bool _distributed_mesh_on_command_line; @@ -1295,7 +1298,8 @@ class MooseApp : public ConsoleStreamInterface, /// GhostingFunctor). Anytime we clone in attachRelationshipManagers we create a map entry from /// the cloned undisplaced relationship manager to its displaced clone counterpart. We leverage /// this map when removing relationship managers/ghosting functors - std::unordered_map> _undisp_to_disp_rms; + std::unordered_map> + _undisp_to_disp_rms; struct DynamicLibraryInfo { @@ -1383,7 +1387,7 @@ class MooseApp : public ConsoleStreamInterface, RelationshipManager & createRMFromTemplateAndInit(const RelationshipManager & template_rm, MooseMesh & moose_mesh, MeshBase & mesh, - const DofMap * dof_map = nullptr); + const libMesh::DofMap * dof_map = nullptr); /** * Creates a recoverable PerfGraph. diff --git a/framework/include/base/MooseError.h b/framework/include/base/MooseError.h index f4ed912d10ec..b6f6e7eef170 100644 --- a/framework/include/base/MooseError.h +++ b/framework/include/base/MooseError.h @@ -81,7 +81,7 @@ operator<<(std::ostream & os, const std::tuple & tup) if (err != MPI_SUCCESS) \ { \ if (libMesh::global_n_processors() == 1) \ - print_trace(); \ + libMesh::print_trace(); \ libmesh_here(); \ MOOSE_ABORT; \ } \ @@ -111,7 +111,7 @@ operator<<(std::ostream & os, const std::tuple & tup) { \ Moose::err << _assert_oss_.str() << std::flush; \ if (libMesh::global_n_processors() == 1) \ - print_trace(); \ + libMesh::print_trace(); \ else \ libMesh::write_traceout(); \ libmesh_here(); \ @@ -131,7 +131,7 @@ namespace moose namespace internal { -inline Threads::spin_mutex moose_stream_lock; +inline libMesh::Threads::spin_mutex moose_stream_lock; /// Builds and returns a string of the form: /// @@ -190,7 +190,7 @@ mooseWarningStream(S & oss, Args &&... args) throw std::runtime_error(msg); { - Threads::spin_mutex::scoped_lock lock(moose_stream_lock); + libMesh::Threads::spin_mutex::scoped_lock lock(moose_stream_lock); oss << msg << std::flush; } } @@ -206,7 +206,7 @@ mooseUnusedStream(S & oss, Args &&... args) throw std::runtime_error(msg); { - Threads::spin_mutex::scoped_lock lock(moose_stream_lock); + libMesh::Threads::spin_mutex::scoped_lock lock(moose_stream_lock); oss << msg << std::flush; } } @@ -219,7 +219,7 @@ mooseInfoStreamRepeated(S & oss, Args &&... args) mooseStreamAll(ss, args...); std::string msg = mooseMsgFmt(ss.str(), "*** Info ***", COLOR_CYAN); { - Threads::spin_mutex::scoped_lock lock(moose_stream_lock); + libMesh::Threads::spin_mutex::scoped_lock lock(moose_stream_lock); oss << msg << std::flush; } } @@ -254,11 +254,11 @@ mooseDeprecatedStream(S & oss, const bool expired, const bool print_title, Args if (Moose::show_trace) { if (libMesh::global_n_processors() == 1) - print_trace(ss); + libMesh::print_trace(ss); else libMesh::write_traceout(); { - Threads::spin_mutex::scoped_lock lock(moose_stream_lock); + libMesh::Threads::spin_mutex::scoped_lock lock(moose_stream_lock); oss << ss.str() << std::endl; }; }; diff --git a/framework/include/base/MooseFunctor.h b/framework/include/base/MooseFunctor.h index 1c639cbd5dbd..6160f04527b9 100644 --- a/framework/include/base/MooseFunctor.h +++ b/framework/include/base/MooseFunctor.h @@ -68,8 +68,8 @@ struct FunctorReturnType { typedef typename MetaPhysicL::ReplaceAlgebraicType< T, - typename TensorTools::IncrementRank::type>::type>::type - type; + typename libMesh::TensorTools::IncrementRank< + typename MetaPhysicL::ValueType::type>::type>::type type; }; /** @@ -498,7 +498,7 @@ class FunctorBase : public FunctorAbstract */ template ValueType queryQpCache(unsigned int qp, - const QBase & qrule, + const libMesh::QBase & qrule, std::vector> & qp_cache_data, const SpaceArg & space, const StateArg & state) const; @@ -520,7 +520,7 @@ class FunctorBase : public FunctorAbstract // caching implementation /// Current key for qp map cache - mutable dof_id_type _current_qp_map_key = DofObject::invalid_id; + mutable dof_id_type _current_qp_map_key = libMesh::DofObject::invalid_id; /// Current value for qp map cache mutable std::vector> * _current_qp_map_value = nullptr; @@ -536,7 +536,7 @@ class FunctorBase : public FunctorAbstract // caching implementation /// Current key for side-qp map cache - mutable dof_id_type _current_side_qp_map_key = DofObject::invalid_id; + mutable dof_id_type _current_side_qp_map_key = libMesh::DofObject::invalid_id; /// Current value for side-qp map cache mutable std::vector>> * _current_side_qp_map_value = @@ -624,7 +624,7 @@ template template typename FunctorBase::ValueType FunctorBase::queryQpCache(const unsigned int qp, - const QBase & qrule, + const libMesh::QBase & qrule, std::vector> & qp_cache_data, const SpaceArg & space, const StateArg & state) const @@ -799,9 +799,9 @@ FunctorBase::clearCacheData() pr.first = false; } - _current_qp_map_key = DofObject::invalid_id; + _current_qp_map_key = libMesh::DofObject::invalid_id; _current_qp_map_value = nullptr; - _current_side_qp_map_key = DofObject::invalid_id; + _current_side_qp_map_key = libMesh::DofObject::invalid_id; _current_side_qp_map_value = nullptr; _elem_arg_to_value.clear(); diff --git a/framework/include/base/MooseFunctorArguments.h b/framework/include/base/MooseFunctorArguments.h index c87371ed3c62..2f597ca017cc 100644 --- a/framework/include/base/MooseFunctorArguments.h +++ b/framework/include/base/MooseFunctorArguments.h @@ -159,7 +159,7 @@ struct ElemQpArg unsigned int qp; /// The quadrature rule - const QBase * qrule; + const libMesh::QBase * qrule; /// The physical location of the quadrature point Point point; @@ -191,7 +191,7 @@ struct ElemSideQpArg unsigned int qp; /// The qudrature rule - const QBase * qrule; + const libMesh::QBase * qrule; /// The physical location of the quadrature point Point point; diff --git a/framework/include/base/MooseInit.h b/framework/include/base/MooseInit.h index e2eeda6c73b3..38ccf40b74af 100644 --- a/framework/include/base/MooseInit.h +++ b/framework/include/base/MooseInit.h @@ -20,7 +20,7 @@ * This object must be created in the main() of any MOOSE-based application so * everything is properly initialized and finalized. */ -class MooseInit : public LibMeshInit +class MooseInit : public libMesh::LibMeshInit { public: MooseInit(int argc, char * argv[], MPI_Comm COMM_WORLD_IN = MPI_COMM_WORLD); diff --git a/framework/include/base/MooseObjectUnitTest.h b/framework/include/base/MooseObjectUnitTest.h index 789463dac9ce..dca6e78fe250 100644 --- a/framework/include/base/MooseObjectUnitTest.h +++ b/framework/include/base/MooseObjectUnitTest.h @@ -95,7 +95,7 @@ class MooseObjectUnitTest : public ::testing::Test problem_params.set("_object_name") = "name2"; _fe_problem = _factory.create("FEProblem", "problem", problem_params); - _fe_problem->createQRules(QGAUSS, FIRST, FIRST, FIRST); + _fe_problem->createQRules(libMesh::QGAUSS, libMesh::FIRST, libMesh::FIRST, libMesh::FIRST); _app->actionWarehouse().problemBase() = _fe_problem; } diff --git a/framework/include/base/libMeshReducedNamespace.h b/framework/include/base/libMeshReducedNamespace.h new file mode 100644 index 000000000000..0113b814df6a --- /dev/null +++ b/framework/include/base/libMeshReducedNamespace.h @@ -0,0 +1,290 @@ +//* This file is part of the MOOSE framework +//* https://www.mooseframework.org +//* +//* All rights reserved, see COPYRIGHT for full restrictions +//* https://github.com/idaholab/moose/blob/master/COPYRIGHT +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +// This is the minimal set of headers to make all the types below that cannot be +// forward-declared as classes available. +// If we want to reduce this list, we would have to forward-declare functions as well +#include "libmesh/libmesh.h" +#include "libmesh/id_types.h" +#include "libmesh/simple_range.h" +#include "libmesh/int_range.h" +#include "libmesh/vector_value.h" +#include "libmesh/tensor_value.h" +#include "libmesh/mesh_tools.h" +#include "libmesh/elem_range.h" +#include "libmesh/node_range.h" +#include "libmesh/print_trace.h" +#include "libmesh/remote_elem.h" + +// Added for convenience +#include "libmesh/enum_elem_type.h" +#include "libmesh/enum_fe_family.h" +#include "libmesh/enum_order.h" + +// README +// If you hit a compilation error that the XYZ class shown here is not defined, and it is declared +// in this header then you forgot to include the libMesh header in your header/source that actually +// declared the class. We only forward declare it here. + +// We want all the types below to be available everywhere +// Element types +namespace libMesh +{ +class Edge; +class Edge2; +class Edge3; +class Edge4; +class Hex; +class Hex8; +class Hex20; +class Hex27; +class Prism; +class Prism15; +class Prism18; +class Prism21; +class Prism6; +class Pyramid; +class Pyramid5; +class Pyramid13; +class Pyramid14; +class Quad; +class Quad4; +class Quad8; +class Quad9; +class Tet; +class Tet4; +class Tet10; +class Tet14; +class Tri; +class Tri3; +class Tri6; +class Tri7; +class RemoteElem; +} + +using libMesh::Edge; +using libMesh::Edge2; +using libMesh::EDGE2; +using libMesh::Edge3; +using libMesh::EDGE3; +using libMesh::Edge4; +using libMesh::EDGE4; +using libMesh::ElemType; +using libMesh::Hex; +using libMesh::Hex20; +using libMesh::HEX20; +using libMesh::Hex27; +using libMesh::HEX27; +using libMesh::Hex8; +using libMesh::HEX8; +using libMesh::Prism; +using libMesh::Prism15; +using libMesh::PRISM15; +using libMesh::Prism18; +using libMesh::PRISM18; +using libMesh::Prism21; +using libMesh::PRISM21; +using libMesh::Prism6; +using libMesh::PRISM6; +using libMesh::Pyramid; +using libMesh::PYRAMID13; +using libMesh::PYRAMID14; +using libMesh::PYRAMID5; +using libMesh::Quad; +using libMesh::Quad4; +using libMesh::QUAD4; +using libMesh::Quad8; +using libMesh::QUAD8; +using libMesh::Quad9; +using libMesh::QUAD9; +using libMesh::remote_elem; +using libMesh::RemoteElem; +using libMesh::Tet; +using libMesh::Tet10; +using libMesh::TET10; +using libMesh::Tet14; +using libMesh::TET14; +using libMesh::Tet4; +using libMesh::TET4; +using libMesh::Tri; +using libMesh::Tri3; +using libMesh::TRI3; +using libMesh::TRI6; +using libMesh::TRI7; + +// Ranges +namespace libMesh +{ +template +class StoredRange; +} + +using libMesh::ConstElemRange; +using libMesh::ConstNodeRange; +using libMesh::NodeRange; +using libMesh::StoredRange; + +// Mesh classes +namespace libMesh +{ +class DistributedMesh; +class ReplicatedMesh; +class UnstructuredMesh; +class MeshBase; +class BoundingBox; +} + +using libMesh::BoundingBox; +using libMesh::DistributedMesh; +using libMesh::MeshBase; +using libMesh::ReplicatedMesh; +using libMesh::UnstructuredMesh; + +// Solver classes +namespace libMesh +{ +class Partitioner; +class DofObject; +class OrderWrapper; +class PetscSolverException; +} +using libMesh::DofObject; +using libMesh::OrderWrapper; +using libMesh::Partitioner; +using libMesh::PetscSolverException; + +// Common data types +using libMesh::boundary_id_type; +using libMesh::dof_id_type; +using libMesh::Number; +using libMesh::numeric_index_type; +using libMesh::processor_id_type; +using libMesh::Real; +using libMesh::RealTensor; +using libMesh::subdomain_id_type; +using libMesh::unique_id_type; + +// Common templated types +namespace libMesh +{ +template +class NumericVector; +template +class SparseMatrix; +template +class TensorValue; +template +class TypeVector; +template +class TypeNTensor; +template +class TypeTensor; +template +class VectorValue; +} + +using libMesh::NumericVector; +using libMesh::SparseMatrix; +using libMesh::TensorValue; +using libMesh::TypeNTensor; +using libMesh::TypeTensor; +using libMesh::TypeVector; +using libMesh::VectorValue; + +// Common FE families +using libMesh::L2_HIERARCHIC; +using libMesh::L2_LAGRANGE; +using libMesh::LAGRANGE; +using libMesh::MONOMIAL; +using libMesh::SCALAR; + +// Counting from 0 to 20 +using libMesh::CONSTANT; +using libMesh::EIGHTEENTH; +using libMesh::EIGHTH; +using libMesh::ELEVENTH; +using libMesh::FIFTEENTH; +using libMesh::FIFTH; +using libMesh::FIRST; +using libMesh::FOURTEENTH; +using libMesh::FOURTH; +using libMesh::INVALID_ORDER; +using libMesh::NINETEENTH; +using libMesh::NINTH; +using libMesh::Order; +using libMesh::SECOND; +using libMesh::SEVENTEENTH; +using libMesh::SEVENTH; +using libMesh::SIXTEENTH; +using libMesh::SIXTH; +using libMesh::TENTH; +using libMesh::THIRD; +using libMesh::THIRTEENTH; +using libMesh::TWELFTH; +using libMesh::TWENTIETH; + +// Common mesh classes +namespace libMesh +{ +class BoundaryInfo; +class Elem; +class Node; +class Point; +} + +using libMesh::BoundaryInfo; +using libMesh::Elem; +using libMesh::Node; +using libMesh::Point; + +// Common utilities +using libMesh::as_range; +using libMesh::cast_int; +using libMesh::cast_ptr; +using libMesh::cast_ref; +using libMesh::demangle; +using libMesh::index_range; +using libMesh::libmesh_ignore; +using libMesh::make_range; + +// Common defaults +using libMesh::invalid_uint; +using libMesh::TOLERANCE; + +// Declare all the nested namespaces we use in MOOSE without prefacing with +// libMesh:: +namespace libMesh +{ +namespace MeshTools +{ +} +namespace Predicates +{ +} +namespace TensorTools +{ +} +namespace Threads +{ +} +namespace Utility +{ +} +namespace Parallel +{ +} +} +namespace MeshTools = libMesh::MeshTools; +namespace Predicates = libMesh::Predicates; +namespace TensorTools = libMesh::TensorTools; +namespace Threads = libMesh::Threads; +namespace Utility = libMesh::Utility; +namespace Parallel = libMesh::Parallel; diff --git a/framework/include/bcs/FunctionPeriodicBoundary.h b/framework/include/bcs/FunctionPeriodicBoundary.h index 0d9372884486..6e19e78c755e 100644 --- a/framework/include/bcs/FunctionPeriodicBoundary.h +++ b/framework/include/bcs/FunctionPeriodicBoundary.h @@ -24,7 +24,7 @@ class Function; * Periodic boundary for calculation periodic BC on domains where the translation is given by * functions */ -class FunctionPeriodicBoundary : public PeriodicBoundaryBase +class FunctionPeriodicBoundary : public libMesh::PeriodicBoundaryBase { public: /** @@ -44,12 +44,12 @@ class FunctionPeriodicBoundary : public PeriodicBoundaryBase * @param pt - point on the 'source' boundary * @return point on the paired boundary */ - virtual Point get_corresponding_pos(const Point & pt) const override; + virtual libMesh::Point get_corresponding_pos(const libMesh::Point & pt) const override; /** * Required interface, this class must be able to clone itself */ - virtual std::unique_ptr clone(TransformationType t) const override; + virtual std::unique_ptr clone(TransformationType t) const override; protected: // /// The dimension of the problem (says which _tr_XYZ member variables are active) diff --git a/framework/include/dampers/ElementDamper.h b/framework/include/dampers/ElementDamper.h index 3a29db9ef8ee..21f4f014c1bc 100644 --- a/framework/include/dampers/ElementDamper.h +++ b/framework/include/dampers/ElementDamper.h @@ -68,7 +68,7 @@ class ElementDamper : public Damper, protected MaterialPropertyInterface /// Quadrature points const MooseArray & _q_point; /// Quadrature rule - const QBase * const & _qrule; + const libMesh::QBase * const & _qrule; /// Transformed Jacobian weights const MooseArray & _JxW; diff --git a/framework/include/dirackernels/DiracKernelInfo.h b/framework/include/dirackernels/DiracKernelInfo.h index 171a203eea31..09324d9e0080 100644 --- a/framework/include/dirackernels/DiracKernelInfo.h +++ b/framework/include/dirackernels/DiracKernelInfo.h @@ -98,7 +98,7 @@ class DiracKernelInfo /// by all DiracKernels to find Points. It needs to be centrally managed and it /// also needs to be rebuilt in FEProblemBase::meshChanged() to work with Mesh /// adaptivity. - std::unique_ptr _point_locator; + std::unique_ptr _point_locator; /// threshold distance squared below which two points are considered identical const Real _point_equal_distance_sq; diff --git a/framework/include/executioners/FixedPointSolve.h b/framework/include/executioners/FixedPointSolve.h index e1abf510dcd4..11970e0de6b1 100644 --- a/framework/include/executioners/FixedPointSolve.h +++ b/framework/include/executioners/FixedPointSolve.h @@ -14,6 +14,8 @@ // System includes #include +using libMesh::PARALLEL; + class FixedPointSolve : public SolveObject { public: diff --git a/framework/include/functions/Function.h b/framework/include/functions/Function.h index 8665a1f2e62c..f12086a371e6 100644 --- a/framework/include/functions/Function.h +++ b/framework/include/functions/Function.h @@ -29,6 +29,8 @@ namespace libMesh class Point; } +using libMesh::RealGradient; + /** * Base class for function objects. Functions override value to supply a * value at a point. diff --git a/framework/include/functions/MooseParsedFunctionWrapper.h b/framework/include/functions/MooseParsedFunctionWrapper.h index 33708ef2dc50..d84d02c79569 100644 --- a/framework/include/functions/MooseParsedFunctionWrapper.h +++ b/framework/include/functions/MooseParsedFunctionWrapper.h @@ -90,7 +90,7 @@ class MooseParsedFunctionWrapper std::vector _initial_vals; /// Pointer to the libMesh::ParsedFunction object - std::unique_ptr> _function_ptr; + std::unique_ptr> _function_ptr; /// Stores indices into _addr variable that are connected to Postprocessors std::vector _pp_index; diff --git a/framework/include/functions/PiecewiseConstantFromCSV.h b/framework/include/functions/PiecewiseConstantFromCSV.h index f3d443a3c9b3..9b4efb526be8 100644 --- a/framework/include/functions/PiecewiseConstantFromCSV.h +++ b/framework/include/functions/PiecewiseConstantFromCSV.h @@ -46,5 +46,5 @@ class PiecewiseConstantFromCSV : public Function const PropertyReadFile::ReadTypeEnum _read_type; /// The point locator is used when values are sorted by elements or blocks in the CSV - std::unique_ptr _point_locator; + std::unique_ptr _point_locator; }; diff --git a/framework/include/fvkernels/FVPointValueConstraint.h b/framework/include/fvkernels/FVPointValueConstraint.h index 345dbe0f1322..ff78009b4a1d 100644 --- a/framework/include/fvkernels/FVPointValueConstraint.h +++ b/framework/include/fvkernels/FVPointValueConstraint.h @@ -42,7 +42,7 @@ class FVPointValueConstraint : public FVScalarLagrangeMultiplierConstraint const Point _point; /// We use a point locator in case the constraint is a point value - std::unique_ptr _point_locator; + std::unique_ptr _point_locator; /// Pointer to the element in case we have a point constraint const Elem * _my_elem; diff --git a/framework/include/geomsearch/ElementPairInfo.h b/framework/include/geomsearch/ElementPairInfo.h index 08e0cfd41d46..186f8c2a1172 100644 --- a/framework/include/geomsearch/ElementPairInfo.h +++ b/framework/include/geomsearch/ElementPairInfo.h @@ -11,6 +11,7 @@ // MOOSE includes #include "Moose.h" +#include "MooseTypes.h" #include "libmesh/point.h" diff --git a/framework/include/geomsearch/FindContactPoint.h b/framework/include/geomsearch/FindContactPoint.h index d95f72689545..75f77af67734 100644 --- a/framework/include/geomsearch/FindContactPoint.h +++ b/framework/include/geomsearch/FindContactPoint.h @@ -10,6 +10,7 @@ #pragma once // Moose #include "Moose.h" +#include "MooseTypes.h" // Forward declarations class PenetrationInfo; @@ -28,14 +29,16 @@ namespace Moose { void findContactPoint(PenetrationInfo & p_info, - FEBase * fe_elem, - FEBase * fe_side, - FEType & fe_side_type, - const Point & secondary_point, + libMesh::FEBase * fe_elem, + libMesh::FEBase * fe_side, + libMesh::FEType & fe_side_type, + const libMesh::Point & secondary_point, bool start_with_centroid, const Real tangential_tolerance, bool & contact_point_on_side, bool & search_succeeded); -void restrictPointToFace(Point & p, const Elem * side, std::vector & off_edge_nodes); +void restrictPointToFace(libMesh::Point & p, + const libMesh::Elem * side, + std::vector & off_edge_nodes); } diff --git a/framework/include/geomsearch/GeometricSearchData.h b/framework/include/geomsearch/GeometricSearchData.h index f69c705e1dce..84b9347e100c 100644 --- a/framework/include/geomsearch/GeometricSearchData.h +++ b/framework/include/geomsearch/GeometricSearchData.h @@ -43,10 +43,10 @@ class GeometricSearchData PenetrationLocator & getPenetrationLocator(const BoundaryName & primary, const BoundaryName & secondary, - Order order = FIRST); + libMesh::Order order = libMesh::FIRST); PenetrationLocator & getQuadraturePenetrationLocator(const BoundaryName & primary, const BoundaryName & secondary, - Order order = FIRST); + libMesh::Order order = libMesh::FIRST); NearestNodeLocator & getNearestNodeLocator(const BoundaryName & primary, const BoundaryName & secondary); diff --git a/framework/include/geomsearch/GeometricSearchInterface.h b/framework/include/geomsearch/GeometricSearchInterface.h index cfc14454f4a3..6f60488af8c7 100644 --- a/framework/include/geomsearch/GeometricSearchInterface.h +++ b/framework/include/geomsearch/GeometricSearchInterface.h @@ -20,6 +20,8 @@ class NearestNodeLocator; class MooseObject; class BoundaryName; +using libMesh::Order; + class GeometricSearchInterface { public: @@ -28,7 +30,7 @@ class GeometricSearchInterface GeometricSearchInterface(const MooseObject * moose_object); /** - * Retrieve the PentrationLocator associated with the two sides. + * Retrieve the PenetrationLocator associated with the two sides. */ PenetrationLocator & getPenetrationLocator(const BoundaryName & primary, const BoundaryName & secondary, Order order); diff --git a/framework/include/geomsearch/PenetrationInfo.h b/framework/include/geomsearch/PenetrationInfo.h index 4ca8f36748f2..49ed8a31072f 100644 --- a/framework/include/geomsearch/PenetrationInfo.h +++ b/framework/include/geomsearch/PenetrationInfo.h @@ -23,6 +23,8 @@ class Node; class Elem; } +using libMesh::RealGradient; + /** * Data structure used to hold penetration information */ diff --git a/framework/include/geomsearch/PenetrationLocator.h b/framework/include/geomsearch/PenetrationLocator.h index 418ec81bd59a..afee72fa290b 100644 --- a/framework/include/geomsearch/PenetrationLocator.h +++ b/framework/include/geomsearch/PenetrationLocator.h @@ -10,6 +10,7 @@ #pragma once // Moose includes +#include "MooseTypes.h" #include "Restartable.h" #include "PenetrationInfo.h" #include "PerfGraphInterface.h" @@ -67,10 +68,10 @@ class PenetrationLocator : Restartable, public PerfGraphInterface BoundaryID _primary_boundary; BoundaryID _secondary_boundary; - FEType _fe_type; + libMesh::FEType _fe_type; // One FE for each thread and for each dimension - std::vector> _fe; + std::vector> _fe; NearestNodeLocator & _nearest_node; diff --git a/framework/include/geomsearch/PenetrationThread.h b/framework/include/geomsearch/PenetrationThread.h index 5ae62447569a..e13aa0715f3e 100644 --- a/framework/include/geomsearch/PenetrationThread.h +++ b/framework/include/geomsearch/PenetrationThread.h @@ -19,7 +19,7 @@ template class MooseVariableFE; typedef MooseVariableFE MooseVariable; -typedef MooseVariableFE> VectorMooseVariable; +typedef MooseVariableFE> VectorMooseVariable; class PenetrationThread { @@ -36,8 +36,8 @@ class PenetrationThread bool do_normal_smoothing, Real normal_smoothing_distance, PenetrationLocator::NORMAL_SMOOTHING_METHOD normal_smoothing_method, - std::vector> & fes, - FEType & fe_type, + std::vector> & fes, + libMesh::FEType & fe_type, NearestNodeLocator & nearest_node, const std::map> & node_to_elem_map, const std::vector> & bc_tuples); @@ -72,9 +72,9 @@ class PenetrationThread MooseVariable * _nodal_normal_y; MooseVariable * _nodal_normal_z; - std::vector> & _fes; + std::vector> & _fes; - FEType & _fe_type; + libMesh::FEType & _fe_type; NearestNodeLocator & _nearest_node; @@ -86,7 +86,7 @@ class PenetrationThread THREAD_ID _tid; /// Helper for building element sides without extraneous allocation - ElemSideBuilder _elem_side_builder; + libMesh::ElemSideBuilder _elem_side_builder; enum CompeteInteractionResult { @@ -124,27 +124,27 @@ class PenetrationThread CommonEdgeResult interactionsOffCommonEdge(PenetrationInfo * pi1, PenetrationInfo * pi2); - bool findRidgeContactPoint(Point & contact_point, + bool findRidgeContactPoint(libMesh::Point & contact_point, Real & tangential_distance, const Node *& closest_node, unsigned int & index, - Point & contact_point_ref, + libMesh::Point & contact_point_ref, std::vector & p_info, const unsigned int index1, const unsigned int index2); void getSideCornerNodes(const Elem * side, std::vector & corner_nodes); - bool restrictPointToSpecifiedEdgeOfFace(Point & p, + bool restrictPointToSpecifiedEdgeOfFace(libMesh::Point & p, const Node *& closest_node, const Elem * side, const std::vector & edge_nodes); - bool restrictPointToFace(Point & p, const Node *& closest_node, const Elem * side); + bool restrictPointToFace(libMesh::Point & p, const Node *& closest_node, const Elem * side); bool isFaceReasonableCandidate(const Elem * primary_elem, const Elem * side, - FEBase * fe, - const Point * secondary_point, + libMesh::FEBase * fe, + const libMesh::Point * secondary_point, const Real tangential_tolerance); void @@ -155,7 +155,7 @@ class PenetrationThread std::vector & edge_face_weights, std::vector & p_info, const Node & secondary_node); - void getSmoothingEdgeNodesAndWeights(const Point & p, + void getSmoothingEdgeNodesAndWeights(const libMesh::Point & p, const Elem * side, std::vector> & edge_nodes, std::vector & edge_face_weights); @@ -179,15 +179,15 @@ class PenetrationThread void getSidesOnPrimaryBoundary(std::vector & sides, const Elem * const elem); - void computeSlip(FEBase & fe, PenetrationInfo & info); + void computeSlip(libMesh::FEBase & fe, PenetrationInfo & info); void switchInfo(PenetrationInfo *& info, PenetrationInfo *& infoNew); struct RidgeData { unsigned int _index; - Point _closest_coor; - Point _closest_coor_ref; + libMesh::Point _closest_coor; + libMesh::Point _closest_coor_ref; Real _tangential_distance; const Node * _closest_node; }; @@ -195,7 +195,7 @@ class PenetrationThread struct RidgeSetData { Real _distance; - Point _closest_coor; + libMesh::Point _closest_coor; const Node * _closest_node; std::vector _ridge_data_vec; }; diff --git a/framework/include/hdgkernels/DiffusionHDGAssemblyHelper.h b/framework/include/hdgkernels/DiffusionHDGAssemblyHelper.h index 9fe0ca72681b..84b674f45b39 100644 --- a/framework/include/hdgkernels/DiffusionHDGAssemblyHelper.h +++ b/framework/include/hdgkernels/DiffusionHDGAssemblyHelper.h @@ -63,7 +63,7 @@ class DiffusionHDGAssemblyHelper : virtual public HDGData * functions, and u is the diffused scalar field */ void vectorVolumeResidual(const unsigned int i_offset, - const MooseArray & vector_sol, + const MooseArray & vector_sol, const MooseArray & scalar_sol, const MooseArray & JxW, const QBase & qrule); @@ -87,7 +87,7 @@ class DiffusionHDGAssemblyHelper : virtual public HDGData * a forcing function */ void scalarVolumeResidual(const unsigned int i_offset, - const MooseArray & vector_field, + const MooseArray & vector_field, const Moose::Functor & source, const MooseArray & JxW, const QBase & qrule, @@ -138,7 +138,7 @@ class DiffusionHDGAssemblyHelper : virtual public HDGData * - + <\tau * (u - \hat{u}) * n * n, w> */ void scalarFaceResidual(const unsigned int i_offset, - const MooseArray & vector_sol, + const MooseArray & vector_sol, const MooseArray & scalar_sol, const MooseArray & lm_sol, const MooseArray & JxW_face, @@ -162,7 +162,7 @@ class DiffusionHDGAssemblyHelper : virtual public HDGData * - + <\tau * (u - \hat{u}) * n * n, \mu> */ void lmFaceResidual(const unsigned int i_offset, - const MooseArray & vector_sol, + const MooseArray & vector_sol, const MooseArray & scalar_sol, const MooseArray & lm_sol, const MooseArray & JxW_face, @@ -197,7 +197,7 @@ class DiffusionHDGAssemblyHelper : virtual public HDGData * Weakly imposes a Dirichlet condition for the scalar field in the scalar field equation */ void scalarDirichletResidual(const unsigned int i_offset, - const MooseArray & vector_sol, + const MooseArray & vector_sol, const MooseArray & scalar_sol, const Moose::Functor & dirichlet_value, const MooseArray & JxW_face, @@ -228,7 +228,7 @@ class DiffusionHDGAssemblyHelper : virtual public HDGData const std::vector & _lm_u_dof_indices; // local solutions at quadrature points - const MooseArray & _qu_sol; + const MooseArray & _qu_sol; const MooseArray & _u_sol; const MooseArray & _lm_u_sol; diff --git a/framework/include/ics/InitialConditionTempl.h b/framework/include/ics/InitialConditionTempl.h index f16e4e66d1b4..1ef91272ba79 100644 --- a/framework/include/ics/InitialConditionTempl.h +++ b/framework/include/ics/InitialConditionTempl.h @@ -34,7 +34,7 @@ class InitialConditionTempl : public InitialConditionBase typedef typename OutputTools::OutputGradient GradientType; typedef typename OutputTools::OutputShapeGradient GradientShapeType; typedef typename OutputTools::OutputData DataType; - typedef FEGenericBase FEBaseType; + typedef libMesh::FEGenericBase FEBaseType; /** * Constructor @@ -87,9 +87,12 @@ class InitialConditionTempl : public InitialConditionBase * Helps perform multiplication of GradientTypes: a normal dot product for vectors and a * contraction for tensors */ - Real dotHelper(const RealGradient & op1, const RealGradient & op2) { return op1 * op2; } + Real dotHelper(const libMesh::RealGradient & op1, const libMesh::RealGradient & op2) + { + return op1 * op2; + } Real dotHelper(const RealTensor & op1, const RealTensor & op2) { return op1.contract(op2); } - RealEigenVector dotHelper(const RealVectorArrayValue & op1, const RealGradient & op2) + RealEigenVector dotHelper(const RealVectorArrayValue & op1, const libMesh::RealGradient & op2) { RealEigenVector v = op1.col(0) * op2(0); for (const auto i : make_range(Moose::dim)) @@ -146,9 +149,9 @@ class InitialConditionTempl : public InitialConditionBase DenseVector _Ue; /// The finite element type for the IC variable - const FEType & _fe_type; + const libMesh::FEType & _fe_type; /// The type of continuity, e.g. C0, C1 - FEContinuity _cont; + libMesh::FEContinuity _cont; /// The global DOF indices std::vector _dof_indices; diff --git a/framework/include/interfaces/OrientedBoxInterface.h b/framework/include/interfaces/OrientedBoxInterface.h index 122de94076b9..3bd788edc46b 100644 --- a/framework/include/interfaces/OrientedBoxInterface.h +++ b/framework/include/interfaces/OrientedBoxInterface.h @@ -66,5 +66,5 @@ class OrientedBoxInterface std::unique_ptr _rot_matrix; /// The bounding box used to test if the point is contained within - std::unique_ptr _bounding_box; + std::unique_ptr _bounding_box; }; diff --git a/framework/include/interfaces/ScalarCoupleable.h b/framework/include/interfaces/ScalarCoupleable.h index e4e8e7f2ecc5..95cf03656831 100644 --- a/framework/include/interfaces/ScalarCoupleable.h +++ b/framework/include/interfaces/ScalarCoupleable.h @@ -85,7 +85,7 @@ class ScalarCoupleable * @param comp Component number for vector of coupled variables * @return Order of coupled variable */ - Order coupledScalarOrder(const std::string & var_name, unsigned int comp = 0) const; + libMesh::Order coupledScalarOrder(const std::string & var_name, unsigned int comp = 0) const; /** * Returns value of a scalar coupled variable diff --git a/framework/include/interfaces/XFEMInterface.h b/framework/include/interfaces/XFEMInterface.h index 8c30c5abc9a1..c297bf9889dc 100644 --- a/framework/include/interfaces/XFEMInterface.h +++ b/framework/include/interfaces/XFEMInterface.h @@ -109,7 +109,7 @@ class XFEMInterface : public ConsoleStreamInterface virtual bool getXFEMWeights(MooseArray & weights, const Elem * elem, - QBase * qrule, + libMesh::QBase * qrule, const MooseArray & q_points) = 0; /** @@ -122,7 +122,7 @@ class XFEMInterface : public ConsoleStreamInterface */ virtual bool getXFEMFaceWeights(MooseArray & weights, const Elem * elem, - QBase * qrule, + libMesh::QBase * qrule, const MooseArray & q_points, unsigned int side) = 0; diff --git a/framework/include/limiters/Limiter.h b/framework/include/limiters/Limiter.h index 5b2f35ae8cf0..63f9221dfaef 100644 --- a/framework/include/limiters/Limiter.h +++ b/framework/include/limiters/Limiter.h @@ -66,13 +66,13 @@ class Limiter */ virtual T limit(const T & phi_upwind, const T & phi_downwind, - const VectorValue * grad_phi_upwind, + const libMesh::VectorValue * grad_phi_upwind, const RealVectorValue & dCD) const = 0; virtual bool constant() const = 0; virtual InterpMethod interpMethod() const = 0; T operator()(const T & phi_upwind, const T & phi_downwind, - const VectorValue * grad_phi_upwind, + const libMesh::VectorValue * grad_phi_upwind, const RealVectorValue & dCD) const { return std::max(T(0), std::min(T(2), limit(phi_upwind, phi_downwind, grad_phi_upwind, dCD))); diff --git a/framework/include/loops/AllLocalDofIndicesThread.h b/framework/include/loops/AllLocalDofIndicesThread.h index 0fc582994fe6..8b572afd697d 100644 --- a/framework/include/loops/AllLocalDofIndicesThread.h +++ b/framework/include/loops/AllLocalDofIndicesThread.h @@ -27,16 +27,16 @@ class SubProblem; * Grab all the (possibly semi)local dof indices for the variables passed in, in the system passed * in. */ -class AllLocalDofIndicesThread : public ParallelObject +class AllLocalDofIndicesThread : public libMesh::ParallelObject { public: AllLocalDofIndicesThread(SubProblem & problem, std::vector vars, bool include_semilocal = false); // Splitting Constructor - AllLocalDofIndicesThread(AllLocalDofIndicesThread & x, Threads::split split); + AllLocalDofIndicesThread(AllLocalDofIndicesThread & x, libMesh::Threads::split split); - void operator()(const ConstElemRange & range); + void operator()(const libMesh::ConstElemRange & range); void join(const AllLocalDofIndicesThread & y); @@ -46,7 +46,7 @@ class AllLocalDofIndicesThread : public ParallelObject protected: SubProblem & _problem; - System * _sys; + libMesh::System * _sys; std::vector _var_numbers; /// Whether to include semilocal dof indices diff --git a/framework/include/loops/AllNodesSendListThread.h b/framework/include/loops/AllNodesSendListThread.h index 4bf6f12c6cbf..b84e974bb9b6 100644 --- a/framework/include/loops/AllNodesSendListThread.h +++ b/framework/include/loops/AllNodesSendListThread.h @@ -27,7 +27,7 @@ class AllNodesSendListThread AllNodesSendListThread(FEProblemBase & fe_problem, const MooseMesh & mesh, const std::vector & var_nums, - const System & system); + const libMesh::System & system); AllNodesSendListThread(AllNodesSendListThread & x, Threads::split split); @@ -47,7 +47,7 @@ class AllNodesSendListThread private: std::vector _var_nums; - const System & _system; + const libMesh::System & _system; const unsigned int _system_number; diff --git a/framework/include/loops/ComputeInitialConditionThread.h b/framework/include/loops/ComputeInitialConditionThread.h index bfcd3b03a7e5..f18cdedbfa06 100644 --- a/framework/include/loops/ComputeInitialConditionThread.h +++ b/framework/include/loops/ComputeInitialConditionThread.h @@ -24,7 +24,7 @@ class ComputeInitialConditionThread // Splitting Constructor ComputeInitialConditionThread(ComputeInitialConditionThread & x, Threads::split split); - void operator()(const ConstElemRange & range); + void operator()(const libMesh::ConstElemRange & range); void join(const ComputeInitialConditionThread & /*y*/); protected: diff --git a/framework/include/loops/MaxQpsThread.h b/framework/include/loops/MaxQpsThread.h index 9b3c003c5633..388e9af24c25 100644 --- a/framework/include/loops/MaxQpsThread.h +++ b/framework/include/loops/MaxQpsThread.h @@ -32,7 +32,7 @@ class MaxQpsThread // Splitting Constructor MaxQpsThread(MaxQpsThread & x, Threads::split split); - void operator()(const ConstElemRange & range); + void operator()(const libMesh::ConstElemRange & range); void join(const MaxQpsThread & y); diff --git a/framework/include/loops/ThreadedElementLoopBase.h b/framework/include/loops/ThreadedElementLoopBase.h index 07d2eaade18e..6cbdf21dba10 100644 --- a/framework/include/loops/ThreadedElementLoopBase.h +++ b/framework/include/loops/ThreadedElementLoopBase.h @@ -16,6 +16,9 @@ #include "libmesh/libmesh_exceptions.h" #include "libmesh/elem.h" +using libMesh::ConstElemRange; +using libMesh::ConstNodeRange; + /** * Base class for assembly-like calculations. */ diff --git a/framework/include/loops/UpdateErrorVectorsThread.h b/framework/include/loops/UpdateErrorVectorsThread.h index 8ddafbe52696..f4d6e387812b 100644 --- a/framework/include/loops/UpdateErrorVectorsThread.h +++ b/framework/include/loops/UpdateErrorVectorsThread.h @@ -16,12 +16,12 @@ class AuxiliarySystem; class Adaptivity; -class UpdateErrorVectorsThread : public ThreadedElementLoop +class UpdateErrorVectorsThread : public ThreadedElementLoop { public: - UpdateErrorVectorsThread( - FEProblemBase & fe_problem, - const std::map> & indicator_field_to_error_vector); + UpdateErrorVectorsThread(FEProblemBase & fe_problem, + const std::map> & + indicator_field_to_error_vector); // Splitting Constructor UpdateErrorVectorsThread(UpdateErrorVectorsThread & x, Threads::split split); @@ -32,12 +32,13 @@ class UpdateErrorVectorsThread : public ThreadedElementLoop protected: /// Map from indicators to error vectors (markers solution vector) - const std::map> & _indicator_field_to_error_vector; + const std::map> & + _indicator_field_to_error_vector; AuxiliarySystem & _aux_sys; unsigned int _system_number; Adaptivity & _adaptivity; NumericVector & _solution; /// Map from indicator variable number to error vectors (markers solution vector) - std::map _indicator_field_number_to_error_vector; + std::map _indicator_field_number_to_error_vector; }; diff --git a/framework/include/markers/Marker.h b/framework/include/markers/Marker.h index 0a973a115fd7..1440e3ae363c 100644 --- a/framework/include/markers/Marker.h +++ b/framework/include/markers/Marker.h @@ -32,6 +32,8 @@ typedef MooseVariableFE MooseVariable; typedef MooseVariableFE> VectorMooseVariable; class Adaptivity; +using libMesh::ErrorVector; + class Marker : public MooseObject, public BlockRestrictable, public SetupInterface, diff --git a/framework/include/markers/ReporterPointMarker.h b/framework/include/markers/ReporterPointMarker.h index 90fe30a9290a..1d86e1f48bb3 100644 --- a/framework/include/markers/ReporterPointMarker.h +++ b/framework/include/markers/ReporterPointMarker.h @@ -36,7 +36,7 @@ class ReporterPointMarker : public Marker, public ReporterInterface ///z coordinate const std::vector & _z_coord; /// Pointer to PointLocatorBase object - std::unique_ptr _pl; + std::unique_ptr _pl; /// list of sort uniqued elements containing points std::set _point_elems; }; diff --git a/framework/include/materials/DerivativeMaterialInterface.h b/framework/include/materials/DerivativeMaterialInterface.h index 9355c8f4b135..83e9ccc7ed06 100644 --- a/framework/include/materials/DerivativeMaterialInterface.h +++ b/framework/include/materials/DerivativeMaterialInterface.h @@ -428,7 +428,7 @@ DerivativeMaterialInterface::validateCouplingHelper(const MaterialPropertyNam // iterate over all variables in the current system (in groups) for (unsigned int i = 0; i < system.n_variable_groups(); ++i) { - const VariableGroup & vg = system.variable_group(i); + const libMesh::VariableGroup & vg = system.variable_group(i); for (unsigned int j = 0; j < vg.n_variables(); ++j) { std::vector cj(c.begin(), c.end()); diff --git a/framework/include/materials/MaterialProperty.h b/framework/include/materials/MaterialProperty.h index 4ca96ef53498..ffd2e06caa0d 100644 --- a/framework/include/materials/MaterialProperty.h +++ b/framework/include/materials/MaterialProperty.h @@ -260,10 +260,12 @@ MaterialPropertyBase::qpCopy(const unsigned int to_qp, { // If we're the same if (rhs.isAD() == is_ad) - _value[to_qp] = cast_ptr *>(&rhs)->_value[from_qp]; + _value[to_qp] = + libMesh::cast_ptr *>(&rhs)->_value[from_qp]; else moose::internal::rawValueEqualityHelper( - _value[to_qp], (*cast_ptr *>(&rhs))[from_qp]); + _value[to_qp], + (*libMesh::cast_ptr *>(&rhs))[from_qp]); } template @@ -293,7 +295,7 @@ MaterialPropertyBase::swap(PropertyValue & rhs) if (rhs.isAD() == is_ad) { mooseAssert(dynamic_cast(&rhs), "Expected same type is not the same"); - this->_value.swap(cast_ptr(&rhs)->_value); + this->_value.swap(libMesh::cast_ptr(&rhs)->_value); return; } diff --git a/framework/include/materials/MaterialPropertyStorage.h b/framework/include/materials/MaterialPropertyStorage.h index ae29c30a48d1..ea38c69ec857 100644 --- a/framework/include/materials/MaterialPropertyStorage.h +++ b/framework/include/materials/MaterialPropertyStorage.h @@ -102,8 +102,8 @@ class MaterialPropertyStorage */ void prolongStatefulProps(processor_id_type pid, const std::vector> & refinement_map, - const QBase & qrule, - const QBase & qrule_face, + const libMesh::QBase & qrule, + const libMesh::QBase & qrule_face, MaterialPropertyStorage & parent_material_props, const THREAD_ID tid, const Elem & elem, @@ -128,8 +128,8 @@ class MaterialPropertyStorage */ void updateStatefulPropsForPRefinement(const processor_id_type pid, const std::vector & p_refinement_map, - const QBase & qrule, - const QBase & qrule_face, + const libMesh::QBase & qrule, + const libMesh::QBase & qrule_face, const THREAD_ID tid, const Elem & elem, const int input_side); @@ -148,8 +148,8 @@ class MaterialPropertyStorage */ void restrictStatefulProps(const std::vector> & coarsening_map, const std::vector & coarsened_element_children, - const QBase & qrule, - const QBase & qrule_face, + const libMesh::QBase & qrule, + const libMesh::QBase & qrule_face, const THREAD_ID tid, const Elem & elem, int input_side = -1); @@ -310,15 +310,18 @@ class MaterialPropertyStorage /** * @returns A range over states to be used in range-based for loops */ - IntRange stateIndexRange() const { return IntRange(0, numStates()); } + libMesh::IntRange stateIndexRange() const + { + return libMesh::IntRange(0, numStates()); + } /** * @returns A range over stateful states to be used in range-based for loops * * Will be an empty range if there are no stateful states */ - IntRange statefulIndexRange() const + libMesh::IntRange statefulIndexRange() const { - return IntRange(1, numStates()); + return libMesh::IntRange(1, numStates()); } /** diff --git a/framework/include/mesh/BndNode.h b/framework/include/mesh/BndNode.h index 4ee4b3c783f3..df39706f73e3 100644 --- a/framework/include/mesh/BndNode.h +++ b/framework/include/mesh/BndNode.h @@ -18,10 +18,10 @@ class Node; struct BndNode { - BndNode(Node * node, BoundaryID bnd_id) : _node(node), _bnd_id(bnd_id) {} + BndNode(libMesh::Node * node, BoundaryID bnd_id) : _node(node), _bnd_id(bnd_id) {} /// pointer to the node - Node * _node; + libMesh::Node * _node; /// boundary id for the node BoundaryID _bnd_id; }; diff --git a/framework/include/mesh/FileMesh.h b/framework/include/mesh/FileMesh.h index ec607f753e12..cdc1d3bb5142 100644 --- a/framework/include/mesh/FileMesh.h +++ b/framework/include/mesh/FileMesh.h @@ -35,7 +35,7 @@ class FileMesh : public MooseMesh std::string _file_name; /// Auxiliary object for restart - std::unique_ptr _exreader; + std::unique_ptr _exreader; /// The requested dimension of the mesh. For some file meshes, this is not required may be implied /// from the element type(s). diff --git a/framework/include/mesh/MooseMesh.h b/framework/include/mesh/MooseMesh.h index 09cc6554bb73..6b4b35d11c47 100644 --- a/framework/include/mesh/MooseMesh.h +++ b/framework/include/mesh/MooseMesh.h @@ -52,7 +52,7 @@ class GhostingFunctor; class BoundingBox; } // Useful typedefs -typedef StoredRange::iterator, Node *> SemiLocalNodeRange; +typedef libMesh::StoredRange::iterator, Node *> SemiLocalNodeRange; // List of supported geometrical elements const std::string LIST_GEOM_ELEM = "EDGE EDGE2 EDGE3 EDGE4 " @@ -426,12 +426,14 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf * Return pointers to range objects for various types of ranges * (local nodes, boundary elems, etc.). */ - ConstElemRange * getActiveLocalElementRange(); - NodeRange * getActiveNodeRange(); + libMesh::ConstElemRange * getActiveLocalElementRange(); + libMesh::NodeRange * getActiveNodeRange(); SemiLocalNodeRange * getActiveSemiLocalNodeRange() const; - ConstNodeRange * getLocalNodeRange(); - StoredRange * getBoundaryNodeRange(); - StoredRange * getBoundaryElementRange(); + libMesh::ConstNodeRange * getLocalNodeRange(); + libMesh::StoredRange * + getBoundaryNodeRange(); + libMesh::StoredRange * + getBoundaryElementRange(); ///@} /** @@ -631,7 +633,7 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf * @param inflation_multiplier This amount will be multiplied by the length of the diagonal of the * bounding box to find the amount to inflate the bounding box by in all directions. */ - BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier = 0.01) const; + libMesh::BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier = 0.01) const; /** * Implicit conversion operator from MooseMesh -> libMesh::MeshBase. @@ -780,14 +782,14 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf */ void buildPeriodicNodeMap(std::multimap & periodic_node_map, unsigned int var_number, - PeriodicBoundaries * pbs) const; + libMesh::PeriodicBoundaries * pbs) const; /** * This routine builds a datastructure of node ids organized by periodic boundary ids */ void buildPeriodicNodeSets(std::map> & periodic_node_sets, unsigned int var_number, - PeriodicBoundaries * pbs) const; + libMesh::PeriodicBoundaries * pbs) const; /** * Returns the width of the requested dimension @@ -1020,7 +1022,7 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf /** * Setter for custom partitioner */ - void setCustomPartitioner(Partitioner * partitioner); + void setCustomPartitioner(libMesh::Partitioner * partitioner); ///@{ /** @@ -1040,7 +1042,7 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf * Proxy function to get a (sub)PointLocator from either the underlying libMesh mesh (default), or * to allow derived meshes to return a custom point locator. */ - virtual std::unique_ptr getPointLocator() const; + virtual std::unique_ptr getPointLocator() const; /** * Returns the name of the mesh file read to produce this mesh if any or an empty string @@ -1367,7 +1369,7 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf protected: /// Deprecated (DO NOT USE) - std::vector> _ghosting_functors; + std::vector> _ghosting_functors; /// The list of active geometric relationship managers (bound to the underlying MeshBase object). std::vector> _relationship_managers; @@ -1394,7 +1396,7 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf bool _partitioner_overridden; /// The custom partitioner - std::unique_ptr _custom_partitioner; + std::unique_ptr _custom_partitioner; bool _custom_partitioner_requested; /// Convenience enums @@ -1448,13 +1450,14 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf * A range for use with threading. We do this so that it doesn't have * to get rebuilt all the time (which takes time). */ - std::unique_ptr _active_local_elem_range; + std::unique_ptr _active_local_elem_range; std::unique_ptr _active_semilocal_node_range; - std::unique_ptr _active_node_range; - std::unique_ptr _local_node_range; - std::unique_ptr> _bnd_node_range; - std::unique_ptr> + std::unique_ptr _active_node_range; + std::unique_ptr _local_node_range; + std::unique_ptr> + _bnd_node_range; + std::unique_ptr> _bnd_elem_range; /// A map of all of the current nodes to the elements that they are connected to. @@ -1608,8 +1611,8 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf * @param child_side The side number of the child (-1 if not mapping sides) */ void buildRefinementMap(const Elem & elem, - QBase & qrule, - QBase & qrule_face, + libMesh::QBase & qrule, + libMesh::QBase & qrule_face, int parent_side, int child, int child_side); @@ -1623,7 +1626,10 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf * @param qrule_face The current face quadrature rule * @param input_side The side to map */ - void buildCoarseningMap(const Elem & elem, QBase & qrule, QBase & qrule_face, int input_side); + void buildCoarseningMap(const Elem & elem, + libMesh::QBase & qrule, + libMesh::QBase & qrule_face, + int input_side); /** * Find the closest points that map "from" to "to" and fill up "qp_map". @@ -1660,8 +1666,8 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf * @param child_side - The id of the child's side */ void findAdaptivityQpMaps(const Elem * template_elem, - QBase & qrule, - QBase & qrule_face, + libMesh::QBase & qrule, + libMesh::QBase & qrule_face, std::vector> & refinement_map, std::vector> & coarsen_map, int parent_side, @@ -1672,10 +1678,10 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf const std::vector & getPRefinementMapHelper( const Elem & elem, - const std::map, std::vector> &) const; + const std::map, std::vector> &) const; const std::vector & getPCoarseningMapHelper( const Elem & elem, - const std::map, std::vector> &) const; + const std::map, std::vector> &) const; /** * Update the coordinate transformation object based on our coordinate system data. The coordinate @@ -1702,14 +1708,16 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf /// on the parent element that the child element reference point is closest to, and a /// \p _distance member which is the distance between the mapped child and parent reference /// quadrature points - std::map, std::vector>> _elem_type_to_refinement_map; + std::map, std::vector>> + _elem_type_to_refinement_map; - std::map, std::vector> _elem_type_to_p_refinement_map; - std::map, std::vector> + std::map, std::vector> + _elem_type_to_p_refinement_map; + std::map, std::vector> _elem_type_to_p_refinement_side_map; /// Holds mappings for "internal" child sides to parent volume. The second key is (child, child_side). - std::map, std::vector>>> + std::map, std::vector>>> _elem_type_to_child_side_refinement_map; /// Holds mappings for volume to volume and parent side to child side @@ -1726,11 +1734,12 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf /// the parent quadrature point index. The \p _to data member will correspond to which child /// element quadrature point is closest to the parent quadrature point. And \p _distance is /// the distance between the two - std::map, std::vector>> + std::map, std::vector>> _elem_type_to_coarsening_map; - std::map, std::vector> _elem_type_to_p_coarsening_map; - std::map, std::vector> + std::map, std::vector> + _elem_type_to_p_coarsening_map; + std::map, std::vector> _elem_type_to_p_coarsening_side_map; struct SubdomainData @@ -1834,13 +1843,13 @@ MooseMesh::coordTransform() } template <> -struct MooseMesh::MeshType +struct MooseMesh::MeshType { static const ParallelType value = ParallelType::REPLICATED; }; template <> -struct MooseMesh::MeshType +struct MooseMesh::MeshType { static const ParallelType value = ParallelType::DISTRIBUTED; }; @@ -2023,8 +2032,9 @@ struct MooseMesh::const_bnd_elem_iterator : variant_filter_iterator ConstBndNodeRange; -typedef StoredRange ConstBndElemRange; +typedef libMesh::StoredRange ConstBndNodeRange; +typedef libMesh::StoredRange + ConstBndElemRange; template std::unique_ptr @@ -2033,7 +2043,7 @@ MooseMesh::buildTypedMesh(unsigned int dim) // If the requested mesh type to build doesn't match our current value for _use_distributed_mesh, // then we need to make sure to make our state consistent because other objects, like the periodic // boundary condition action, will be querying isDistributedMesh() - if (_use_distributed_mesh != std::is_same::value) + if (_use_distributed_mesh != std::is_same::value) { if (getMeshPtr()) mooseError("A MooseMesh object is being asked to build a libMesh mesh that is a different " diff --git a/framework/include/meshgenerators/SideSetsGeneratorBase.h b/framework/include/meshgenerators/SideSetsGeneratorBase.h index bdad948cd36e..92a9acef6532 100644 --- a/framework/include/meshgenerators/SideSetsGeneratorBase.h +++ b/framework/include/meshgenerators/SideSetsGeneratorBase.h @@ -144,7 +144,7 @@ class SideSetsGeneratorBase : public MeshGenerator */ const Real _normal_tol; - std::unique_ptr _fe_face; - std::unique_ptr _qface; + std::unique_ptr _fe_face; + std::unique_ptr _qface; std::map> _visited; }; diff --git a/framework/include/multiapps/MultiApp.h b/framework/include/multiapps/MultiApp.h index 0412a2ae9de9..466f525a268b 100644 --- a/framework/include/multiapps/MultiApp.h +++ b/framework/include/multiapps/MultiApp.h @@ -226,9 +226,10 @@ class MultiApp : public MooseObject, * @param displaced_mesh True if the bounding box is retrieved for the displaced mesh, other false * @param coord_transform An optional coordinate transformation object */ - virtual BoundingBox getBoundingBox(unsigned int app, - bool displaced_mesh, - const MultiAppCoordTransform * coord_transform = nullptr); + virtual libMesh::BoundingBox + getBoundingBox(unsigned int app, + bool displaced_mesh, + const MultiAppCoordTransform * coord_transform = nullptr); /** * Get the FEProblemBase this MultiApp is part of. @@ -268,7 +269,8 @@ class MultiApp : public MooseObject, * @param var_name The name of the variable you are going to be transferring to. * @return The vector to fill. */ - virtual NumericVector & appTransferVector(unsigned int app, std::string var_name); + virtual libMesh::NumericVector & appTransferVector(unsigned int app, + std::string var_name); /** * @return Number of Global Apps in this MultiApp @@ -375,7 +377,8 @@ class MultiApp : public MooseObject, * Transform a bounding box according to the transformations in the provided coordinate * transformation object */ - static void transformBoundingBox(BoundingBox & box, const MultiAppCoordTransform & transform); + static void transformBoundingBox(libMesh::BoundingBox & box, + const MultiAppCoordTransform & transform); /** * Sets all the app's output file bases. @see MooseApp::setOutputFileBase for usage @@ -541,7 +544,7 @@ class MultiApp : public MooseObject, std::vector _has_bounding_box; /// This multi-app's bounding box - std::vector _bounding_box; + std::vector _bounding_box; /// Relative bounding box inflation Real _inflation; @@ -598,7 +601,7 @@ class MultiApp : public MooseObject, const bool _no_restore; /// The solution from the end of the previous solve, this is cloned from the Nonlinear solution during restore - std::vector>> _end_solutions; + std::vector>> _end_solutions; /// The app configuration resulting from calling init LocalRankConfig _rank_config; diff --git a/framework/include/outputs/BlockRestrictionDebugOutput.h b/framework/include/outputs/BlockRestrictionDebugOutput.h index 460ba5b54b34..392747166066 100644 --- a/framework/include/outputs/BlockRestrictionDebugOutput.h +++ b/framework/include/outputs/BlockRestrictionDebugOutput.h @@ -39,7 +39,7 @@ class BlockRestrictionDebugOutput : public Output const NonlinearSystemBase & _nl; /// Reference to libMesh system - const System & _sys; + const libMesh::System & _sys; /** * Perform the debugging output diff --git a/framework/include/outputs/ConsoleUtils.h b/framework/include/outputs/ConsoleUtils.h index 12f141ceff86..f056540e1e13 100644 --- a/framework/include/outputs/ConsoleUtils.h +++ b/framework/include/outputs/ConsoleUtils.h @@ -80,7 +80,7 @@ std::string outputOutputInformation(MooseApp & app); * @param system The libMesh system to output * @see outputAuxiliarySystemInformation outputNonlinearSystemInformation */ -std::string outputSystemInformationHelper(System & system); +std::string outputSystemInformationHelper(libMesh::System & system); /** * Output the legacy flag information diff --git a/framework/include/outputs/Exodus.h b/framework/include/outputs/Exodus.h index d45804868fac..6e67ec7877bd 100644 --- a/framework/include/outputs/Exodus.h +++ b/framework/include/outputs/Exodus.h @@ -91,7 +91,7 @@ class Exodus : public OversampleOutput * @param mesh The MooseMesh object that is queried to determine the appropriate output dimension. */ static void - setOutputDimensionInExodusWriter(ExodusII_IO & exodus_io, + setOutputDimensionInExodusWriter(libMesh::ExodusII_IO & exodus_io, const MooseMesh & mesh, OutputDimension output_dim = OutputDimension::DEFAULT); @@ -142,7 +142,7 @@ class Exodus : public OversampleOutput virtual std::string filename() override; /// Pointer to the libMesh::ExodusII_IO object that performs the actual data output - std::unique_ptr _exodus_io_ptr; + std::unique_ptr _exodus_io_ptr; /// Storage for scalar values (postprocessors and scalar AuxVariables) std::vector _global_values; diff --git a/framework/include/outputs/Nemesis.h b/framework/include/outputs/Nemesis.h index 07213b0ad08c..ac6cccf6b7ab 100644 --- a/framework/include/outputs/Nemesis.h +++ b/framework/include/outputs/Nemesis.h @@ -76,7 +76,7 @@ class Nemesis : public AdvancedOutput virtual std::string filename() override; /// Pointer to the libMesh::NemesisII_IO object that performs the actual data output - std::unique_ptr _nemesis_io_ptr; + std::unique_ptr _nemesis_io_ptr; /// Storage for scalar values (postprocessors and scalar AuxVariables) std::vector _global_values; diff --git a/framework/include/outputs/Output.h b/framework/include/outputs/Output.h index 480d3f7a042b..88622b12a52a 100644 --- a/framework/include/outputs/Output.h +++ b/framework/include/outputs/Output.h @@ -185,7 +185,7 @@ class Output : public MooseObject, bool _use_displaced; /// Reference the the libMesh::EquationSystems object that contains the data - EquationSystems * _es_ptr; + libMesh::EquationSystems * _es_ptr; /// A convenience pointer to the current mesh (reference or displaced depending on "use_displaced") MooseMesh * _mesh_ptr; diff --git a/framework/include/outputs/OversampleOutput.h b/framework/include/outputs/OversampleOutput.h index 03f294572157..1529c8fb626d 100644 --- a/framework/include/outputs/OversampleOutput.h +++ b/framework/include/outputs/OversampleOutput.h @@ -86,7 +86,7 @@ class OversampleOutput : public AdvancedOutput * This is only populated when the oversample() function is called, it must * be cleaned up by the destructor. */ - std::vector>> _mesh_functions; + std::vector>> _mesh_functions; /// When oversampling, the output is shift by this amount Point _position; diff --git a/framework/include/outputs/TopResidualDebugOutput.h b/framework/include/outputs/TopResidualDebugOutput.h index eabf688d111f..9e7bb12959a0 100644 --- a/framework/include/outputs/TopResidualDebugOutput.h +++ b/framework/include/outputs/TopResidualDebugOutput.h @@ -110,5 +110,5 @@ class TopResidualDebugOutput : public PetscOutput NonlinearSystemBase & _nl; /// Reference to libMesh system - System & _sys; + libMesh::System & _sys; }; diff --git a/framework/include/outputs/VariableResidualNormsDebugOutput.h b/framework/include/outputs/VariableResidualNormsDebugOutput.h index 0aad69f34f73..7c5493627ca4 100644 --- a/framework/include/outputs/VariableResidualNormsDebugOutput.h +++ b/framework/include/outputs/VariableResidualNormsDebugOutput.h @@ -42,5 +42,5 @@ class VariableResidualNormsDebugOutput : public PetscOutput NonlinearSystemBase & _nl; /// Reference to libMesh system - System & _sys; + libMesh::System & _sys; }; diff --git a/framework/include/parser/Builder.h b/framework/include/parser/Builder.h index fba2ee49c76d..779f9d7a666f 100644 --- a/framework/include/parser/Builder.h +++ b/framework/include/parser/Builder.h @@ -105,7 +105,7 @@ class Builder : public ConsoleStreamInterface, public hit::Walker void walk(const std::string & fullpath, const std::string & nodepath, hit::Node * n); - void errorCheck(const Parallel::Communicator & comm, bool warn_unused, bool err_unused); + void errorCheck(const libMesh::Parallel::Communicator & comm, bool warn_unused, bool err_unused); std::vector listValidParams(std::string & section_name); diff --git a/framework/include/partitioner/LibmeshPartitioner.h b/framework/include/partitioner/LibmeshPartitioner.h index 030ccd25a087..337859851329 100644 --- a/framework/include/partitioner/LibmeshPartitioner.h +++ b/framework/include/partitioner/LibmeshPartitioner.h @@ -29,8 +29,9 @@ class LibmeshPartitioner : public MoosePartitioner virtual std::unique_ptr clone() const; virtual void partition(MeshBase & mesh, const unsigned int n); virtual void partition(MeshBase & mesh); - virtual void prepareBlocksForSubdomainPartitioner(const MeshBase & mesh, - SubdomainPartitioner & subdomain_partitioner); + virtual void + prepareBlocksForSubdomainPartitioner(const MeshBase & mesh, + libMesh::SubdomainPartitioner & subdomain_partitioner); protected: virtual void _do_partition(MeshBase & mesh, const unsigned int n); diff --git a/framework/include/partitioner/MoosePartitioner.h b/framework/include/partitioner/MoosePartitioner.h index 5c461df7ea1c..86d5103b53ac 100644 --- a/framework/include/partitioner/MoosePartitioner.h +++ b/framework/include/partitioner/MoosePartitioner.h @@ -15,6 +15,8 @@ #include "libmesh/partitioner.h" +using libMesh::Partitioner; + /** * Base class for MOOSE partitioner */ diff --git a/framework/include/positions/QuadraturePointsPositions.h b/framework/include/positions/QuadraturePointsPositions.h index 09549ff1d5be..ea9e2adb8d27 100644 --- a/framework/include/positions/QuadraturePointsPositions.h +++ b/framework/include/positions/QuadraturePointsPositions.h @@ -30,7 +30,7 @@ class QuadraturePointsPositions : public Positions, BlockRestrictable MooseMesh & _mesh; /// Type of the quadrature - QuadratureType _q_type; + libMesh::QuadratureType _q_type; /// Order of the quadrature - Order _q_order; + libMesh::Order _q_order; }; diff --git a/framework/include/postprocessors/FindValueOnLine.h b/framework/include/postprocessors/FindValueOnLine.h index a9c80e3d6a19..cc71614409b9 100644 --- a/framework/include/postprocessors/FindValueOnLine.h +++ b/framework/include/postprocessors/FindValueOnLine.h @@ -68,5 +68,5 @@ class FindValueOnLine : public GeneralPostprocessor, public Coupleable std::vector _point_vec; /// helper object to locate elements containing points - std::unique_ptr _pl; + std::unique_ptr _pl; }; diff --git a/framework/include/postprocessors/NumDOFs.h b/framework/include/postprocessors/NumDOFs.h index aaa6ce2e2b21..7f826ef95a04 100644 --- a/framework/include/postprocessors/NumDOFs.h +++ b/framework/include/postprocessors/NumDOFs.h @@ -39,6 +39,6 @@ class NumDOFs : public GeneralPostprocessor const SystemEnum _system_enum; - const System * _system_pointer; + const libMesh::System * _system_pointer; const EquationSystems * _es_pointer; }; diff --git a/framework/include/postprocessors/NumVars.h b/framework/include/postprocessors/NumVars.h index 997ecb4d5e95..4a4e54a756ea 100644 --- a/framework/include/postprocessors/NumVars.h +++ b/framework/include/postprocessors/NumVars.h @@ -34,6 +34,6 @@ class NumVars : public GeneralPostprocessor const SystemEnum _system_enum; - const System * _system_pointer; + const libMesh::System * _system_pointer; const EquationSystems * _es_pointer; }; diff --git a/framework/include/postprocessors/PointValue.h b/framework/include/postprocessors/PointValue.h index c708617d0706..f646c335dc23 100644 --- a/framework/include/postprocessors/PointValue.h +++ b/framework/include/postprocessors/PointValue.h @@ -34,7 +34,7 @@ class PointValue : public GeneralPostprocessor const unsigned int _var_number; /// A reference to the system containing the variable - const System & _system; + const libMesh::System & _system; /// The point to locate const Point & _point; diff --git a/framework/include/preconditioners/MoosePreconditioner.h b/framework/include/preconditioners/MoosePreconditioner.h index 9c8495756703..db380904e868 100644 --- a/framework/include/preconditioners/MoosePreconditioner.h +++ b/framework/include/preconditioners/MoosePreconditioner.h @@ -54,7 +54,7 @@ class MoosePreconditioner : public MooseObject, public Restartable, public PerfG protected: /// Setup the coupling matrix on the finite element problem - void setCouplingMatrix(std::unique_ptr cm); + void setCouplingMatrix(std::unique_ptr cm); /// Subproblem this preconditioner is part of FEProblemBase & _fe_problem; diff --git a/framework/include/preconditioners/PhysicsBasedPreconditioner.h b/framework/include/preconditioners/PhysicsBasedPreconditioner.h index d79377077384..57c940ecc1e3 100644 --- a/framework/include/preconditioners/PhysicsBasedPreconditioner.h +++ b/framework/include/preconditioners/PhysicsBasedPreconditioner.h @@ -25,7 +25,8 @@ class NonlinearSystemBase; /** * Implements a segregated solve preconditioner. */ -class PhysicsBasedPreconditioner : public MoosePreconditioner, public Preconditioner +class PhysicsBasedPreconditioner : public MoosePreconditioner, + public libMesh::Preconditioner { public: /** @@ -43,7 +44,7 @@ class PhysicsBasedPreconditioner : public MoosePreconditioner, public Preconditi // FIXME: use better name void addSystem(unsigned int var, std::vector off_diag, - PreconditionerType type = AMG_PRECOND); + libMesh::PreconditionerType type = libMesh::AMG_PRECOND); /** * Computes the preconditioned vector "y" based on input "x". @@ -72,13 +73,13 @@ class PhysicsBasedPreconditioner : public MoosePreconditioner, public Preconditi /// The nonlinear system this PBP is associated with (convenience reference) NonlinearSystemBase & _nl; /// List of linear system that build up the preconditioner - std::vector _systems; + std::vector _systems; /// Holds one Preconditioner object per small system to solve. - std::vector>> _preconditioners; + std::vector>> _preconditioners; /// Holds the order the blocks are solved for. std::vector _solve_order; /// Which preconditioner to use for each solve. - std::vector _pre_type; + std::vector _pre_type; /// Holds which off diagonal blocks to compute. std::vector> _off_diag; @@ -89,5 +90,5 @@ class PhysicsBasedPreconditioner : public MoosePreconditioner, public Preconditi * This is really just for convenience so we don't have * to keep looking this thing up through it's name. */ - std::vector *>> _off_diag_mats; + std::vector *>> _off_diag_mats; }; diff --git a/framework/include/preconditioners/VariableCondensationPreconditioner.h b/framework/include/preconditioners/VariableCondensationPreconditioner.h index 2b0d01e2fda6..35b50db21b20 100644 --- a/framework/include/preconditioners/VariableCondensationPreconditioner.h +++ b/framework/include/preconditioners/VariableCondensationPreconditioner.h @@ -23,6 +23,8 @@ // C++ includes #include +using libMesh::PetscMatrix; + // Forward declarations class NonlinearSystemBase; class VariableCondensationPreconditioner; @@ -30,7 +32,8 @@ class VariableCondensationPreconditioner; /** * Interface for condensing out LMs for the dual mortar approach. */ -class VariableCondensationPreconditioner : public MoosePreconditioner, public Preconditioner +class VariableCondensationPreconditioner : public MoosePreconditioner, + public libMesh::Preconditioner { public: static InputParameters validParams(); @@ -144,7 +147,7 @@ class VariableCondensationPreconditioner : public MoosePreconditioner, public Pr MooseMesh & _mesh; /// DofMap for easy reference - const DofMap & _dofmap; + const libMesh::DofMap & _dofmap; /// Whether the coupling is diagonal const bool _is_lm_coupling_diagonal; @@ -188,7 +191,7 @@ class VariableCondensationPreconditioner : public MoosePreconditioner, public Pr mutable bool _need_condense; /// Which preconditioner to use for the solve - PreconditionerType _pre_type; + libMesh::PreconditionerType _pre_type; /// Holds one Preconditioner object for the condensed system to solve std::unique_ptr> _preconditioner; diff --git a/framework/include/problems/DisplacedProblem.h b/framework/include/problems/DisplacedProblem.h index 699d9573f952..1ad5e4cb02ae 100644 --- a/framework/include/problems/DisplacedProblem.h +++ b/framework/include/problems/DisplacedProblem.h @@ -32,6 +32,9 @@ template class NumericVector; } +using libMesh::Order; +using libMesh::QuadratureType; + class DisplacedProblem : public SubProblem { public: diff --git a/framework/include/problems/DumpObjectsProblem.h b/framework/include/problems/DumpObjectsProblem.h index 8db1a7b3ba3a..2b4207eabf27 100644 --- a/framework/include/problems/DumpObjectsProblem.h +++ b/framework/include/problems/DumpObjectsProblem.h @@ -62,7 +62,7 @@ class DumpObjectsProblem : public FEProblemBase void dumpVariableHelper(const std::string & system, const std::string & var_name, - FEFamily family, + libMesh::FEFamily family, Order order, Real scale_factor, const std::set * const active_subdomains); diff --git a/framework/include/problems/FEProblemBase.h b/framework/include/problems/FEProblemBase.h index 392c6e904338..c1f9cb8be039 100644 --- a/framework/include/problems/FEProblemBase.h +++ b/framework/include/problems/FEProblemBase.h @@ -165,7 +165,7 @@ class FEProblemBase : public SubProblem, public Restartable ONLY_LIST, }; - virtual EquationSystems & es() override { return _req.set().es(); } + virtual libMesh::EquationSystems & es() override { return _req.set().es(); } virtual MooseMesh & mesh() override { return _mesh; } virtual const MooseMesh & mesh() const override { return _mesh; } const MooseMesh & mesh(bool use_displaced) const override; @@ -187,12 +187,13 @@ class FEProblemBase : public SubProblem, public Restartable * @param cm coupling matrix to be set * @param nl_sys_num which nonlinear system we are setting the coupling matrix for */ - void setCouplingMatrix(std::unique_ptr cm, const unsigned int nl_sys_num); + void setCouplingMatrix(std::unique_ptr cm, + const unsigned int nl_sys_num); // DEPRECATED METHOD - void setCouplingMatrix(CouplingMatrix * cm, const unsigned int nl_sys_num); + void setCouplingMatrix(libMesh::CouplingMatrix * cm, const unsigned int nl_sys_num); - const CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const override; + const libMesh::CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const override; /// Set custom coupling matrix for variables requiring nonlocal contribution void setNonlocalCouplingMatrix(); @@ -291,7 +292,7 @@ class FEProblemBase : public SubProblem, public Restartable virtual bool hasScalarVariable(const std::string & var_name) const override; virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string & var_name) override; - virtual System & getSystem(const std::string & var_name) override; + virtual libMesh::System & getSystem(const std::string & var_name) override; /** * Set the MOOSE variables to be reinited on each element. @@ -331,10 +332,10 @@ class FEProblemBase : public SubProblem, public Restartable virtual void setActiveScalarVariableCoupleableMatrixTags(std::set & mtags, const THREAD_ID tid) override; - virtual void createQRules(QuadratureType type, - Order order, - Order volume_order = INVALID_ORDER, - Order face_order = INVALID_ORDER, + virtual void createQRules(libMesh::QuadratureType type, + libMesh::Order order, + libMesh::Order volume_order = libMesh::INVALID_ORDER, + libMesh::Order face_order = libMesh::INVALID_ORDER, SubdomainID block = Moose::ANY_BLOCK_ID, bool allow_negative_qweights = true); @@ -345,9 +346,9 @@ class FEProblemBase : public SubProblem, public Restartable * lower than or equal to the current volume/elem quadrature rule order, * then nothing is done (i.e. this function is idempotent). */ - void bumpVolumeQRuleOrder(Order order, SubdomainID block); + void bumpVolumeQRuleOrder(libMesh::Order order, SubdomainID block); - void bumpAllQRuleOrder(Order order, SubdomainID block); + void bumpAllQRuleOrder(libMesh::Order order, SubdomainID block); /** * @return The maximum number of quadrature points in use on any element in this problem. @@ -357,7 +358,7 @@ class FEProblemBase : public SubProblem, public Restartable /** * @return The maximum order for all scalar variables in this problem's systems. */ - Order getMaxScalarOrder() const; + libMesh::Order getMaxScalarOrder() const; /** * @return Flag indicating nonlocal coupling exists or not. @@ -476,8 +477,8 @@ class FEProblemBase : public SubProblem, public Restartable * getEvaluableElementRange() returns the element range that is evaluable based on both the * nonlinear dofmap and the auxliary dofmap. */ - const ConstElemRange & getEvaluableElementRange(); - const ConstElemRange & getNonlinearEvaluableElementRange(); + const libMesh::ConstElemRange & getEvaluableElementRange(); + const libMesh::ConstElemRange & getNonlinearEvaluableElementRange(); ///@} ///@{ @@ -492,8 +493,8 @@ class FEProblemBase : public SubProblem, public Restartable * getCurrentAlgebraicBndNodeRange returns the boundary node ranges that contributes * to the system */ - const ConstElemRange & getCurrentAlgebraicElementRange(); - const ConstNodeRange & getCurrentAlgebraicNodeRange(); + const libMesh::ConstElemRange & getCurrentAlgebraicElementRange(); + const libMesh::ConstNodeRange & getCurrentAlgebraicNodeRange(); const ConstBndNodeRange & getCurrentAlgebraicBndNodeRange(); ///@} @@ -515,8 +516,8 @@ class FEProblemBase : public SubProblem, public Restartable * @param range A pointer to the const range object representing the algebraic * elements, nodes, or boundary nodes. */ - void setCurrentAlgebraicElementRange(ConstElemRange * range); - void setCurrentAlgebraicNodeRange(ConstNodeRange * range); + void setCurrentAlgebraicElementRange(libMesh::ConstElemRange * range); + void setCurrentAlgebraicNodeRange(libMesh::ConstNodeRange * range); void setCurrentAlgebraicBndNodeRange(ConstBndNodeRange * range); ///@} @@ -826,14 +827,14 @@ class FEProblemBase : public SubProblem, public Restartable InputParameters & params); virtual void addAuxVariable(const std::string & var_name, - const FEType & type, + const libMesh::FEType & type, const std::set * const active_subdomains = NULL); virtual void addAuxArrayVariable(const std::string & var_name, - const FEType & type, + const libMesh::FEType & type, unsigned int components, const std::set * const active_subdomains = NULL); virtual void addAuxScalarVariable(const std::string & var_name, - Order order, + libMesh::Order order, Real scale_factor = 1., const std::set * const active_subdomains = NULL); virtual void addAuxKernel(const std::string & kernel_name, @@ -898,7 +899,7 @@ class FEProblemBase : public SubProblem, public Restartable * This is needed when elements/boundary nodes are added to a specific subdomain * at an intermediate step */ - void projectInitialConditionOnCustomRange(ConstElemRange & elem_range, + void projectInitialConditionOnCustomRange(libMesh::ConstElemRange & elem_range, ConstBndNodeRange & bnd_node_range); // Materials ///// @@ -1339,50 +1340,50 @@ class FEProblemBase : public SubProblem, public Restartable /** * This function is called by Libmesh to form a residual. */ - virtual void computeResidualSys(NonlinearImplicitSystem & sys, - const NumericVector & soln, - NumericVector & residual); + virtual void computeResidualSys(libMesh::NonlinearImplicitSystem & sys, + const NumericVector & soln, + NumericVector & residual); /** * This function is called by Libmesh to form a residual. This is deprecated. * We should remove this as soon as RattleSnake is fixed. */ - void computeResidual(NonlinearImplicitSystem & sys, - const NumericVector & soln, - NumericVector & residual); + void computeResidual(libMesh::NonlinearImplicitSystem & sys, + const NumericVector & soln, + NumericVector & residual); /** * Form a residual with default tags (nontime, time, residual). */ - virtual void computeResidual(const NumericVector & soln, - NumericVector & residual, + virtual void computeResidual(const NumericVector & soln, + NumericVector & residual, const unsigned int nl_sys_num); /** * Form a residual and Jacobian with default tags */ - void computeResidualAndJacobian(const NumericVector & soln, - NumericVector & residual, - SparseMatrix & jacobian); + void computeResidualAndJacobian(const NumericVector & soln, + NumericVector & residual, + libMesh::SparseMatrix & jacobian); /** * Form a residual vector for a given tag */ - virtual void computeResidualTag(const NumericVector & soln, - NumericVector & residual, + virtual void computeResidualTag(const NumericVector & soln, + NumericVector & residual, TagID tag); /** * Form a residual vector for a given tag and "residual" tag */ - virtual void computeResidualType(const NumericVector & soln, - NumericVector & residual, + virtual void computeResidualType(const NumericVector & soln, + NumericVector & residual, TagID tag); /** * Form a residual vector for a set of tags. It should not be called directly * by users. */ - virtual void computeResidualInternal(const NumericVector & soln, - NumericVector & residual, + virtual void computeResidualInternal(const NumericVector & soln, + NumericVector & residual, const std::set & tags); /** * Form multiple residual vectors and each is associated with one tag @@ -1392,28 +1393,28 @@ class FEProblemBase : public SubProblem, public Restartable /** * Form a Jacobian matrix. It is called by Libmesh. */ - virtual void computeJacobianSys(NonlinearImplicitSystem & sys, - const NumericVector & soln, - SparseMatrix & jacobian); + virtual void computeJacobianSys(libMesh::NonlinearImplicitSystem & sys, + const NumericVector & soln, + libMesh::SparseMatrix & jacobian); /** * Form a Jacobian matrix with the default tag (system). */ - virtual void computeJacobian(const NumericVector & soln, - SparseMatrix & jacobian, + virtual void computeJacobian(const NumericVector & soln, + libMesh::SparseMatrix & jacobian, const unsigned int nl_sys_num); /** * Form a Jacobian matrix for a given tag. */ - virtual void computeJacobianTag(const NumericVector & soln, - SparseMatrix & jacobian, + virtual void computeJacobianTag(const NumericVector & soln, + libMesh::SparseMatrix & jacobian, TagID tag); /** * Form a Jacobian matrix for multiple tags. It should not be called directly by users. */ - virtual void computeJacobianInternal(const NumericVector & soln, - SparseMatrix & jacobian, + virtual void computeJacobianInternal(const NumericVector & soln, + libMesh::SparseMatrix & jacobian, const std::set & tags); /** @@ -1445,7 +1446,7 @@ class FEProblemBase : public SubProblem, public Restartable * @param jvar the block-column of the Jacobian * */ - virtual void computeJacobianBlock(SparseMatrix & jacobian, + virtual void computeJacobianBlock(libMesh::SparseMatrix & jacobian, libMesh::System & precond_system, unsigned int ivar, unsigned int jvar); @@ -1459,9 +1460,9 @@ class FEProblemBase : public SubProblem, public Restartable * @param compute_gradients A flag to disable the computation of new gradients during the * assembly, can be used to lag gradients */ - void computeLinearSystemSys(LinearImplicitSystem & sys, - SparseMatrix & system_matrix, - NumericVector & rhs, + void computeLinearSystemSys(libMesh::LinearImplicitSystem & sys, + libMesh::SparseMatrix & system_matrix, + NumericVector & rhs, const bool compute_gradients = true); /** @@ -1475,15 +1476,15 @@ class FEProblemBase : public SubProblem, public Restartable * @param compute_gradients A flag to disable the computation of new gradients during the * assembly, can be used to lag gradients */ - void computeLinearSystemTags(const NumericVector & soln, - SparseMatrix & system_matrix, - NumericVector & rhs, + void computeLinearSystemTags(const NumericVector & soln, + libMesh::SparseMatrix & system_matrix, + NumericVector & rhs, const std::set & vector_tags, const std::set & matrix_tags, const bool compute_gradients = true); - virtual Real computeDamping(const NumericVector & soln, - const NumericVector & update); + virtual Real computeDamping(const NumericVector & soln, + const NumericVector & update); /** * Check to see whether the problem should update the solution @@ -1497,28 +1498,28 @@ class FEProblemBase : public SubProblem, public Restartable * @param ghosted_solution Ghosted solution vector * @return true if the solution was modified, false otherwise */ - virtual bool updateSolution(NumericVector & vec_solution, - NumericVector & ghosted_solution); + virtual bool updateSolution(NumericVector & vec_solution, + NumericVector & ghosted_solution); /** * Perform cleanup tasks after application of predictor to solution vector * @param ghosted_solution Ghosted solution vector */ - virtual void predictorCleanup(NumericVector & ghosted_solution); - - virtual void computeBounds(NonlinearImplicitSystem & sys, - NumericVector & lower, - NumericVector & upper); - virtual void computeNearNullSpace(NonlinearImplicitSystem & sys, - std::vector *> & sp); - virtual void computeNullSpace(NonlinearImplicitSystem & sys, - std::vector *> & sp); - virtual void computeTransposeNullSpace(NonlinearImplicitSystem & sys, - std::vector *> & sp); - virtual void computePostCheck(NonlinearImplicitSystem & sys, - const NumericVector & old_soln, - NumericVector & search_direction, - NumericVector & new_soln, + virtual void predictorCleanup(NumericVector & ghosted_solution); + + virtual void computeBounds(libMesh::NonlinearImplicitSystem & sys, + NumericVector & lower, + NumericVector & upper); + virtual void computeNearNullSpace(libMesh::NonlinearImplicitSystem & sys, + std::vector *> & sp); + virtual void computeNullSpace(libMesh::NonlinearImplicitSystem & sys, + std::vector *> & sp); + virtual void computeTransposeNullSpace(libMesh::NonlinearImplicitSystem & sys, + std::vector *> & sp); + virtual void computePostCheck(libMesh::NonlinearImplicitSystem & sys, + const NumericVector & old_soln, + NumericVector & search_direction, + NumericVector & new_soln, bool & changed_search_direction, bool & changed_new_soln); @@ -1542,23 +1543,25 @@ class FEProblemBase : public SubProblem, public Restartable * @param residual The vector to add the cached contributions to. * @param tid The thread id. */ - virtual void addCachedResidualDirectly(NumericVector & residual, const THREAD_ID tid); + virtual void addCachedResidualDirectly(NumericVector & residual, + const THREAD_ID tid); - virtual void setResidual(NumericVector & residual, const THREAD_ID tid) override; - virtual void setResidualNeighbor(NumericVector & residual, const THREAD_ID tid) override; + virtual void setResidual(NumericVector & residual, const THREAD_ID tid) override; + virtual void setResidualNeighbor(NumericVector & residual, + const THREAD_ID tid) override; virtual void addJacobian(const THREAD_ID tid) override; virtual void addJacobianNeighbor(const THREAD_ID tid) override; virtual void addJacobianNeighborLowerD(const THREAD_ID tid) override; virtual void addJacobianLowerD(const THREAD_ID tid) override; - virtual void addJacobianBlockTags(SparseMatrix & jacobian, + virtual void addJacobianBlockTags(libMesh::SparseMatrix & jacobian, unsigned int ivar, unsigned int jvar, const DofMap & dof_map, std::vector & dof_indices, const std::set & tags, const THREAD_ID tid); - virtual void addJacobianNeighbor(SparseMatrix & jacobian, + virtual void addJacobianNeighbor(libMesh::SparseMatrix & jacobian, unsigned int ivar, unsigned int jvar, const DofMap & dof_map, @@ -1734,7 +1737,7 @@ class FEProblemBase : public SubProblem, public Restartable * This is needed when elements/boundary nodes are added to a specific subdomain * at an intermediate step */ - void initElementStatefulProps(const ConstElemRange & elem_range, const bool threaded); + void initElementStatefulProps(const libMesh::ConstElemRange & elem_range, const bool threaded); /** * Method called to perform a series of sanity checks before a simulation is run. This method @@ -2491,8 +2494,8 @@ class FEProblemBase : public SubProblem, public Restartable /// The auxiliary system std::shared_ptr _aux; - Moose::CouplingType _coupling; ///< Type of variable coupling - std::vector> _cm; ///< Coupling matrix for variables. + Moose::CouplingType _coupling; ///< Type of variable coupling + std::vector> _cm; ///< Coupling matrix for variables. /// Dimension of the subspace spanned by the vectors with a given prefix std::map _subspace_dim; @@ -2596,7 +2599,7 @@ class FEProblemBase : public SubProblem, public Restartable /// Helper to check for duplicate variable names across systems or within a single system bool duplicateVariableCheck(const std::string & var_name, - const FEType & type, + const libMesh::FEType & type, bool is_aux, const std::set * const active_subdomains); @@ -2731,7 +2734,7 @@ class FEProblemBase : public SubProblem, public Restartable unsigned int _max_qps; /// Maximum scalar variable order - Order _max_scalar_order; + libMesh::Order _max_scalar_order; /// Indicates whether or not this executioner has a time integrator (during setup) bool _has_time_integrator; @@ -2768,12 +2771,12 @@ class FEProblemBase : public SubProblem, public Restartable std::shared_ptr _line_search; - std::unique_ptr _evaluable_local_elem_range; - std::unique_ptr _nl_evaluable_local_elem_range; - std::unique_ptr _aux_evaluable_local_elem_range; + std::unique_ptr _evaluable_local_elem_range; + std::unique_ptr _nl_evaluable_local_elem_range; + std::unique_ptr _aux_evaluable_local_elem_range; - std::unique_ptr _current_algebraic_elem_range; - std::unique_ptr _current_algebraic_node_range; + std::unique_ptr _current_algebraic_elem_range; + std::unique_ptr _current_algebraic_node_range; std::unique_ptr _current_algebraic_bnd_node_range; /// Automatic differentiaion (AD) flag which indicates whether any consumer has @@ -3085,7 +3088,7 @@ FEProblemBase::assembly(const THREAD_ID tid, const unsigned int sys_num) const return *_assembly[tid][sys_num]; } -inline const CouplingMatrix * +inline const libMesh::CouplingMatrix * FEProblemBase::couplingMatrix(const unsigned int i) const { return _cm[i].get(); diff --git a/framework/include/problems/ReferenceResidualProblem.h b/framework/include/problems/ReferenceResidualProblem.h index 7b7f3c84320b..5804c87511a2 100644 --- a/framework/include/problems/ReferenceResidualProblem.h +++ b/framework/include/problems/ReferenceResidualProblem.h @@ -137,7 +137,7 @@ class ReferenceResidualProblem : public FEProblem bool _local_norm; /// Container for normalization type - FEMNormType _norm_type; + libMesh::FEMNormType _norm_type; /// Container for convergence treatment when the reference residual is zero const enum class ZeroReferenceType { ZERO_TOLERANCE, RELATIVE_TOLERANCE } _zero_ref_type; diff --git a/framework/include/problems/SubProblem.h b/framework/include/problems/SubProblem.h index 9cc95d40f6a6..74a0ab45e749 100644 --- a/framework/include/problems/SubProblem.h +++ b/framework/include/problems/SubProblem.h @@ -68,6 +68,10 @@ class NumericVector; class System; } // namespace libMesh +using libMesh::CouplingMatrix; +using libMesh::DofMap; +using libMesh::EquationSystems; + /** * Generic class for solving transient nonlinear problems * @@ -80,7 +84,7 @@ class SubProblem : public Problem SubProblem(const InputParameters & parameters); virtual ~SubProblem(); - virtual EquationSystems & es() = 0; + virtual libMesh::EquationSystems & es() = 0; virtual MooseMesh & mesh() = 0; virtual const MooseMesh & mesh() const = 0; virtual const MooseMesh & mesh(bool use_displaced) const = 0; @@ -281,7 +285,7 @@ class SubProblem : public Problem const std::string & var_name) = 0; /// Returns the equation system containing the variable provided - virtual System & getSystem(const std::string & var_name) = 0; + virtual libMesh::System & getSystem(const std::string & var_name) = 0; /** * Set the MOOSE variables to be reinited on each element. @@ -360,17 +364,19 @@ class SubProblem : public Problem virtual void cacheResidualNeighbor(const THREAD_ID tid); virtual void addCachedResidual(const THREAD_ID tid); - virtual void setResidual(NumericVector & residual, const THREAD_ID tid) = 0; - virtual void setResidualNeighbor(NumericVector & residual, const THREAD_ID tid) = 0; + virtual void setResidual(libMesh::NumericVector & residual, + const THREAD_ID tid) = 0; + virtual void setResidualNeighbor(libMesh::NumericVector & residual, + const THREAD_ID tid) = 0; virtual void addJacobian(const THREAD_ID tid) = 0; virtual void addJacobianNeighbor(const THREAD_ID tid) = 0; virtual void addJacobianNeighborLowerD(const THREAD_ID tid) = 0; virtual void addJacobianLowerD(const THREAD_ID tid) = 0; - virtual void addJacobianNeighbor(SparseMatrix & jacobian, + virtual void addJacobianNeighbor(libMesh::SparseMatrix & jacobian, unsigned int ivar, unsigned int jvar, - const DofMap & dof_map, + const libMesh::DofMap & dof_map, std::vector & dof_indices, std::vector & neighbor_dof_indices, const std::set & tags, @@ -643,7 +649,10 @@ class SubProblem : public Problem /** * @return the nonlocal coupling matrix for the i'th nonlinear system */ - const CouplingMatrix & nonlocalCouplingMatrix(const unsigned i) const { return _nonlocal_cm[i]; } + const libMesh::CouplingMatrix & nonlocalCouplingMatrix(const unsigned i) const + { + return _nonlocal_cm[i]; + } /** * Returns true if the problem is in the process of computing the Jacobian @@ -742,7 +751,7 @@ class SubProblem : public Problem /** * The coupling matrix defining what blocks exist in the preconditioning matrix */ - virtual const CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const = 0; + virtual const libMesh::CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const = 0; private: /** @@ -754,7 +763,7 @@ class SubProblem : public Problem * MeshBase (the underlying MeshBase will be the same for every system held by this object's * EquationSystems object) */ - void cloneAlgebraicGhostingFunctor(GhostingFunctor & algebraic_gf, bool to_mesh = true); + void cloneAlgebraicGhostingFunctor(libMesh::GhostingFunctor & algebraic_gf, bool to_mesh = true); /** * Creates (n_sys - 1) clones of the provided coupling ghosting functor (corresponding to the @@ -765,28 +774,28 @@ class SubProblem : public Problem * MeshBase (the underlying MeshBase will be the same for every system held by this object's * EquationSystems object) */ - void cloneCouplingGhostingFunctor(GhostingFunctor & coupling_gf, bool to_mesh = true); + void cloneCouplingGhostingFunctor(libMesh::GhostingFunctor & coupling_gf, bool to_mesh = true); public: /** * Add an algebraic ghosting functor to this problem's DofMaps */ - void addAlgebraicGhostingFunctor(GhostingFunctor & algebraic_gf, bool to_mesh = true); + void addAlgebraicGhostingFunctor(libMesh::GhostingFunctor & algebraic_gf, bool to_mesh = true); /** * Add a coupling functor to this problem's DofMaps */ - void addCouplingGhostingFunctor(GhostingFunctor & coupling_gf, bool to_mesh = true); + void addCouplingGhostingFunctor(libMesh::GhostingFunctor & coupling_gf, bool to_mesh = true); /** * Remove an algebraic ghosting functor from this problem's DofMaps */ - void removeAlgebraicGhostingFunctor(GhostingFunctor & algebraic_gf); + void removeAlgebraicGhostingFunctor(libMesh::GhostingFunctor & algebraic_gf); /** * Remove a coupling ghosting functor from this problem's DofMaps */ - void removeCouplingGhostingFunctor(GhostingFunctor & coupling_gf); + void removeCouplingGhostingFunctor(libMesh::GhostingFunctor & coupling_gf); /** * Automatic scaling setter @@ -1008,7 +1017,7 @@ class SubProblem : public Problem /// The Factory for building objects Factory & _factory; - std::vector _nonlocal_cm; /// nonlocal coupling matrix; + std::vector _nonlocal_cm; /// nonlocal coupling matrix; DiracKernelInfo _dirac_kernel_info; @@ -1151,13 +1160,15 @@ class SubProblem : public Problem /// A map from a root algebraic ghosting functor, e.g. the ghosting functor passed into \p /// removeAlgebraicGhostingFunctor, to its clones in other systems, e.g. systems other than system /// 0 - std::unordered_map>> + std::unordered_map>> _root_alg_gf_to_sys_clones; /// A map from a root coupling ghosting functor, e.g. the ghosting functor passed into \p /// removeCouplingGhostingFunctor, to its clones in other systems, e.g. systems other than system /// 0 - std::unordered_map>> + std::unordered_map>> _root_coupling_gf_to_sys_clones; /// Whether p-refinement has been requested at any point during the simulation @@ -1453,5 +1464,5 @@ SubProblem::setCurrentlyComputingResidualAndJacobian( namespace Moose { -void initial_condition(EquationSystems & es, const std::string & system_name); +void initial_condition(libMesh::EquationSystems & es, const std::string & system_name); } // namespace Moose diff --git a/framework/include/relationshipmanagers/ProxyRelationshipManager.h b/framework/include/relationshipmanagers/ProxyRelationshipManager.h index 1c4544ef5379..de4112b949f2 100644 --- a/framework/include/relationshipmanagers/ProxyRelationshipManager.h +++ b/framework/include/relationshipmanagers/ProxyRelationshipManager.h @@ -50,5 +50,5 @@ class ProxyRelationshipManager : public RelationshipManager protected: virtual void internalInitWithMesh(const MeshBase &) override{}; - System * _other_system; + libMesh::System * _other_system; }; diff --git a/framework/include/relationshipmanagers/RelationshipManager.h b/framework/include/relationshipmanagers/RelationshipManager.h index ae5b3a789969..3524d4fd2781 100644 --- a/framework/include/relationshipmanagers/RelationshipManager.h +++ b/framework/include/relationshipmanagers/RelationshipManager.h @@ -35,7 +35,8 @@ class RelationshipManager : public MooseObject, public libMesh::GhostingFunctor /** * Called before this RM is attached */ - void init(MooseMesh & moose_mesh, const MeshBase & mesh, const DofMap * dof_map = nullptr); + void + init(MooseMesh & moose_mesh, const MeshBase & mesh, const libMesh::DofMap * dof_map = nullptr); /** * Whether or not this RM has been init-ed. NOTE that this just indicates that the \p init method @@ -117,7 +118,7 @@ class RelationshipManager : public MooseObject, public libMesh::GhostingFunctor */ bool useDisplacedMesh() const { return _use_displaced_mesh; } - const DofMap * dofMap() { return _dof_map; } + const libMesh::DofMap * dofMap() { return _dof_map; } protected: /** @@ -135,7 +136,7 @@ class RelationshipManager : public MooseObject, public libMesh::GhostingFunctor /// Pointer to DofMap (may be null if this is geometric only). This is useful for setting coupling /// matrices in call-backs from DofMap::reinit - const DofMap * _dof_map = nullptr; + const libMesh::DofMap * _dof_map = nullptr; /// Boolean indicating whether this RM can be attached early (e.g. all parameters are known /// without the need for inspecting things like variables or other parts of the system that diff --git a/framework/include/reporters/ReporterState.h b/framework/include/reporters/ReporterState.h index 027db5b34e46..da380bef934c 100644 --- a/framework/include/reporters/ReporterState.h +++ b/framework/include/reporters/ReporterState.h @@ -23,7 +23,7 @@ class MooseObject; class ReporterContextBase; /** - * The base class for storing a Repoter's state + * The base class for storing a Reporter's state * * The base class is needed in order to store the states without a template * parameter so that they can be iterated through to observe the producers diff --git a/framework/include/restart/DataIO.h b/framework/include/restart/DataIO.h index d3ae60059669..b62fd4220071 100644 --- a/framework/include/restart/DataIO.h +++ b/framework/include/restart/DataIO.h @@ -201,7 +201,7 @@ inline void dataStore(std::ostream & /*stream*/, T *& /*v*/, void * /*context*/) { mooseError("Attempting to store a raw pointer type: \"", - demangle(typeid(T).name()), + libMesh::demangle(typeid(T).name()), " *\" as restartable data!\nWrite a custom dataStore() template specialization!\n\n"); } @@ -418,7 +418,7 @@ template <> * cannot be ghosted, and the provided context must be the Communicator. */ void dataStore(std::ostream & stream, - std::unique_ptr> & v, + std::unique_ptr> & v, void * context); template @@ -439,7 +439,7 @@ dataStore(std::ostream & stream, ADReal (&dn)[N], void * context) template void -dataStore(std::ostream & stream, NumericVector & v, void * context) +dataStore(std::ostream & stream, libMesh::NumericVector & v, void * context) { v.close(); @@ -469,13 +469,13 @@ dataStore(std::ostream & stream, DenseVector & v, void * context) } template -void dataStore(std::ostream & stream, TensorValue & v, void * context); +void dataStore(std::ostream & stream, libMesh::TensorValue & v, void * context); template -void dataStore(std::ostream & stream, DenseMatrix & v, void * context); +void dataStore(std::ostream & stream, libMesh::DenseMatrix & v, void * context); template -void dataStore(std::ostream & stream, VectorValue & v, void * context); +void dataStore(std::ostream & stream, libMesh::VectorValue & v, void * context); template void @@ -534,7 +534,7 @@ void dataLoad(std::istream & /*stream*/, T *& /*v*/, void * /*context*/) { mooseError("Attempting to load a raw pointer type: \"", - demangle(typeid(T).name()), + libMesh::demangle(typeid(T).name()), " *\" as restartable data!\nWrite a custom dataLoad() template specialization!\n\n"); } @@ -752,7 +752,7 @@ template <> * and local sizes that the vector was stored with. */ void dataLoad(std::istream & stream, - std::unique_ptr> & v, + std::unique_ptr> & v, void * context); template @@ -773,7 +773,7 @@ dataLoad(std::istream & stream, ADReal (&dn)[N], void * context) template void -dataLoad(std::istream & stream, NumericVector & v, void * context) +dataLoad(std::istream & stream, libMesh::NumericVector & v, void * context) { numeric_index_type size = v.local_size(); for (numeric_index_type i = v.first_local_index(); i < v.first_local_index() + size; i++) @@ -804,13 +804,13 @@ dataLoad(std::istream & stream, DenseVector & v, void * context) } template -void dataLoad(std::istream & stream, TensorValue & v, void * context); +void dataLoad(std::istream & stream, libMesh::TensorValue & v, void * context); template -void dataLoad(std::istream & stream, DenseMatrix & v, void * context); +void dataLoad(std::istream & stream, libMesh::DenseMatrix & v, void * context); template -void dataLoad(std::istream & stream, VectorValue & v, void * context); +void dataLoad(std::istream & stream, libMesh::VectorValue & v, void * context); template void diff --git a/framework/include/systems/AuxiliarySystem.h b/framework/include/systems/AuxiliarySystem.h index dae30d4f2a11..29609ae4e6bc 100644 --- a/framework/include/systems/AuxiliarySystem.h +++ b/framework/include/systems/AuxiliarySystem.h @@ -34,6 +34,8 @@ template class NumericVector; } +using libMesh::Order; + /** * A system that holds auxiliary variables * @@ -97,7 +99,7 @@ class AuxiliarySystem : public SystemBase, public PerfGraphInterface virtual void serializeSolution(); // This is an empty function since the Aux system doesn't have a matrix! - virtual void augmentSparsity(SparsityPattern::Graph & /*sparsity*/, + virtual void augmentSparsity(libMesh::SparsityPattern::Graph & /*sparsity*/, std::vector & /*n_nz*/, std::vector & /*n_oz*/) override; @@ -118,7 +120,7 @@ class AuxiliarySystem : public SystemBase, public PerfGraphInterface /** * Get the minimum quadrature order for evaluating elemental auxiliary variables */ - virtual Order getMinQuadratureOrder() override; + virtual libMesh::Order getMinQuadratureOrder() override; /** * Indicated whether this system needs material properties on boundaries. @@ -126,10 +128,10 @@ class AuxiliarySystem : public SystemBase, public PerfGraphInterface */ bool needMaterialOnSide(BoundaryID bnd_id); - virtual System & sys() { return _sys; } + virtual libMesh::System & sys() { return _sys; } - virtual System & system() override { return _sys; } - virtual const System & system() const override { return _sys; } + virtual libMesh::System & system() override { return _sys; } + virtual const libMesh::System & system() const override { return _sys; } virtual void setPreviousNewtonSolution(); @@ -165,7 +167,7 @@ class AuxiliarySystem : public SystemBase, public PerfGraphInterface template void computeNodalVarsHelper(const MooseObjectWarehouse & warehouse); - System & _sys; + libMesh::System & _sys; /// solution vector from nonlinear solver const NumericVector * _current_solution; diff --git a/framework/include/systems/ComputeFDResidualFunctor.h b/framework/include/systems/ComputeFDResidualFunctor.h index 6b725021e7fd..b8d01e86bd1b 100644 --- a/framework/include/systems/ComputeFDResidualFunctor.h +++ b/framework/include/systems/ComputeFDResidualFunctor.h @@ -10,12 +10,18 @@ #pragma once #include "libmesh/nonlinear_implicit_system.h" +#include "MooseTypes.h" -using namespace libMesh; +namespace libMesh +{ +template +class NumericVector; +class NonlinearImplicitSystem; +} class FEProblemBase; -class ComputeFDResidualFunctor : public NonlinearImplicitSystem::ComputeResidual +class ComputeFDResidualFunctor : public libMesh::NonlinearImplicitSystem::ComputeResidual { private: FEProblemBase & _fe_problem; @@ -23,7 +29,7 @@ class ComputeFDResidualFunctor : public NonlinearImplicitSystem::ComputeResidual public: ComputeFDResidualFunctor(FEProblemBase & fe_problem); - void residual(const NumericVector & soln, - NumericVector & residual, - NonlinearImplicitSystem & sys) override; + void residual(const libMesh::NumericVector & soln, + libMesh::NumericVector & residual, + libMesh::NonlinearImplicitSystem & sys) override; }; diff --git a/framework/include/systems/ComputeResidualFunctor.h b/framework/include/systems/ComputeResidualFunctor.h index 67c2e02cd48f..8ff6742c1e24 100644 --- a/framework/include/systems/ComputeResidualFunctor.h +++ b/framework/include/systems/ComputeResidualFunctor.h @@ -10,12 +10,18 @@ #pragma once #include "libmesh/nonlinear_implicit_system.h" +#include "MooseTypes.h" -using namespace libMesh; +namespace libMesh +{ +template +class NumericVector; +class NonlinearImplicitSystem; +} class FEProblemBase; -class ComputeResidualFunctor : public NonlinearImplicitSystem::ComputeResidual +class ComputeResidualFunctor : public libMesh::NonlinearImplicitSystem::ComputeResidual { private: FEProblemBase & _fe_problem; @@ -25,5 +31,5 @@ class ComputeResidualFunctor : public NonlinearImplicitSystem::ComputeResidual void residual(const NumericVector & soln, NumericVector & residual, - NonlinearImplicitSystem & sys) override; + libMesh::NonlinearImplicitSystem & sys) override; }; diff --git a/framework/include/systems/DisplacedSystem.h b/framework/include/systems/DisplacedSystem.h index 32b62ad16430..70d1afa7292d 100644 --- a/framework/include/systems/DisplacedSystem.h +++ b/framework/include/systems/DisplacedSystem.h @@ -21,6 +21,8 @@ class TransientSystem; typedef TransientSystem TransientExplicitSystem; } +using libMesh::TransientExplicitSystem; + class DisplacedSystem : public SystemBase { public: @@ -83,12 +85,12 @@ class DisplacedSystem : public SystemBase _undisplaced_system.disassociateDefaultVectorTags(); } - virtual void associateMatrixToTag(SparseMatrix & matrix, TagID tag) override + virtual void associateMatrixToTag(libMesh::SparseMatrix & matrix, TagID tag) override { _undisplaced_system.associateMatrixToTag(matrix, tag); } - virtual void disassociateMatrixFromTag(SparseMatrix & matrix, TagID tag) override + virtual void disassociateMatrixFromTag(libMesh::SparseMatrix & matrix, TagID tag) override { _undisplaced_system.disassociateMatrixFromTag(matrix, tag); } @@ -178,7 +180,7 @@ class DisplacedSystem : public SystemBase * This is an empty function since the displaced system doesn't have a matrix! * All sparsity pattern modification will be taken care of by the undisplaced system directly */ - virtual void augmentSparsity(SparsityPattern::Graph & /*sparsity*/, + virtual void augmentSparsity(libMesh::SparsityPattern::Graph & /*sparsity*/, std::vector & /*n_nz*/, std::vector & /*n_oz*/) override { @@ -235,11 +237,11 @@ class DisplacedSystem : public SystemBase Moose::SolutionIterationType iteration_type = Moose::SolutionIterationType::Time) const override; - virtual SparseMatrix & getMatrix(TagID tag) override + virtual libMesh::SparseMatrix & getMatrix(TagID tag) override { return _undisplaced_system.getMatrix(tag); } - virtual const SparseMatrix & getMatrix(TagID tag) const override + virtual const libMesh::SparseMatrix & getMatrix(TagID tag) const override { return _undisplaced_system.getMatrix(tag); } diff --git a/framework/include/systems/DumpObjectsNonlinearSystem.h b/framework/include/systems/DumpObjectsNonlinearSystem.h index 0b3564ff6a6a..8da7dd0fe47f 100644 --- a/framework/include/systems/DumpObjectsNonlinearSystem.h +++ b/framework/include/systems/DumpObjectsNonlinearSystem.h @@ -26,7 +26,7 @@ class DumpObjectsNonlinearSystem : public NonlinearSystemBase public: DumpObjectsNonlinearSystem(FEProblemBase & problem, const std::string & name); - virtual NonlinearSolver * nonlinearSolver() override { return NULL; } + virtual libMesh::NonlinearSolver * nonlinearSolver() override { return NULL; } virtual void solve() override {} virtual void stopSolve(const ExecFlagType &) override {} virtual bool converged() override { return true; } @@ -35,7 +35,9 @@ class DumpObjectsNonlinearSystem : public NonlinearSystemBase virtual unsigned int getCurrentNonlinearIterationNumber() override { return 0; } virtual void setupFiniteDifferencedPreconditioner() override {} - virtual void attachPreconditioner(Preconditioner * /* preconditioner */) override {} + virtual void attachPreconditioner(libMesh::Preconditioner * /* preconditioner */) override + { + } void residualAndJacobianTogether() override {} protected: diff --git a/framework/include/systems/LinearSystem.h b/framework/include/systems/LinearSystem.h index 3fe3f4fd86e8..23234306e832 100644 --- a/framework/include/systems/LinearSystem.h +++ b/framework/include/systems/LinearSystem.h @@ -72,7 +72,7 @@ class LinearSystem : public SolverSystem, public PerfGraphInterface /** * Return a reference to the stored linear implicit system */ - LinearImplicitSystem & linearImplicitSystem() { return _linear_implicit_system; } + libMesh::LinearImplicitSystem & linearImplicitSystem() { return _linear_implicit_system; } /** * Return a numeric vector that is associated with the time tag. @@ -169,7 +169,7 @@ class LinearSystem : public SolverSystem, public PerfGraphInterface Real _final_linear_residual; /// Base class reference to the linear implicit system in libmesh - LinearImplicitSystem & _linear_implicit_system; + libMesh::LinearImplicitSystem & _linear_implicit_system; /// Vectors to store the new gradients during the computation. This is needed /// because the old gradients might still be needed to determine boundary values diff --git a/framework/include/systems/NonlinearEigenSystem.h b/framework/include/systems/NonlinearEigenSystem.h index 014fa36ae038..18d3b9952a3d 100644 --- a/framework/include/systems/NonlinearEigenSystem.h +++ b/framework/include/systems/NonlinearEigenSystem.h @@ -79,7 +79,7 @@ class NonlinearEigenSystem : public NonlinearSystemBase */ unsigned int getNumConvergedEigenvalues() const { return _eigen_sys.get_n_converged(); }; - virtual NonlinearSolver * nonlinearSolver() override; + virtual libMesh::NonlinearSolver * nonlinearSolver() override; /** * Retrieve snes from slepc eigen solver. It is valid for only nonlinear eigen solver. @@ -92,7 +92,7 @@ class NonlinearEigenSystem : public NonlinearSystemBase */ virtual EPS getEPS(); - CondensedEigenSystem & sys() { return _eigen_sys; } + libMesh::CondensedEigenSystem & sys() { return _eigen_sys; } /** * For eigenvalue problems (including standard and generalized), inhomogeneous (Dirichlet or @@ -165,9 +165,9 @@ class NonlinearEigenSystem : public NonlinearSystemBase TagID precondMatrixTag() const { return _precond_tag; } - virtual void attachPreconditioner(Preconditioner * preconditioner) override; + virtual void attachPreconditioner(libMesh::Preconditioner * preconditioner) override; - Preconditioner * preconditioner() const { return _preconditioner; } + libMesh::Preconditioner * preconditioner() const { return _preconditioner; } virtual void turnOffJacobian() override; @@ -188,7 +188,7 @@ class NonlinearEigenSystem : public NonlinearSystemBase void computeScalingJacobian() override; void computeScalingResidual() override; - CondensedEigenSystem & _eigen_sys; + libMesh::CondensedEigenSystem & _eigen_sys; EigenProblem & _eigen_problem; std::unique_ptr _solver_configuration; std::vector> _eigen_values; @@ -202,7 +202,7 @@ class NonlinearEigenSystem : public NonlinearSystemBase TagID _precond_tag; bool _precond_matrix_includes_eigen; // Libmesh preconditioner - Preconditioner * _preconditioner; + libMesh::Preconditioner * _preconditioner; /// The number of degrees of freedom constrained at the libMesh level, e.g. via hanging node or /// periodic boundary constraints diff --git a/framework/include/systems/NonlinearSystem.h b/framework/include/systems/NonlinearSystem.h index 5570840ee173..e4928750b225 100644 --- a/framework/include/systems/NonlinearSystem.h +++ b/framework/include/systems/NonlinearSystem.h @@ -24,7 +24,8 @@ * * It is a part of FEProblemBase ;-) */ -class NonlinearSystem : public NonlinearSystemBase, public NonlinearImplicitSystem::ComputePreCheck +class NonlinearSystem : public NonlinearSystemBase, + public libMesh::NonlinearImplicitSystem::ComputePreCheck { public: NonlinearSystem(FEProblemBase & problem, const std::string & name); @@ -58,23 +59,23 @@ class NonlinearSystem : public NonlinearSystemBase, public NonlinearImplicitSyst virtual NumericVector & RHS() override { return *_nl_implicit_sys.rhs; } - virtual NonlinearSolver * nonlinearSolver() override + virtual libMesh::NonlinearSolver * nonlinearSolver() override { return _nl_implicit_sys.nonlinear_solver.get(); } virtual SNES getSNES() override; - virtual NonlinearImplicitSystem & sys() { return _nl_implicit_sys; } + virtual libMesh::NonlinearImplicitSystem & sys() { return _nl_implicit_sys; } - virtual void attachPreconditioner(Preconditioner * preconditioner) override; + virtual void attachPreconditioner(libMesh::Preconditioner * preconditioner) override; virtual void residualAndJacobianTogether() override; virtual void precheck(const NumericVector & precheck_soln, NumericVector & search_direction, bool & changed, - NonlinearImplicitSystem & S) override; + libMesh::NonlinearImplicitSystem & S) override; virtual void potentiallySetupFiniteDifferencing() override; @@ -82,7 +83,7 @@ class NonlinearSystem : public NonlinearSystemBase, public NonlinearImplicitSyst void computeScalingJacobian() override; void computeScalingResidual() override; - NonlinearImplicitSystem & _nl_implicit_sys; + libMesh::NonlinearImplicitSystem & _nl_implicit_sys; ComputeResidualFunctor _nl_residual_functor; ComputeFDResidualFunctor _fd_residual_functor; ComputeResidualAndJacobian _resid_and_jac_functor; diff --git a/framework/include/systems/NonlinearSystemBase.h b/framework/include/systems/NonlinearSystemBase.h index 43b901581532..4d79f87a147e 100644 --- a/framework/include/systems/NonlinearSystemBase.h +++ b/framework/include/systems/NonlinearSystemBase.h @@ -81,7 +81,7 @@ class NonlinearSystemBase : public SolverSystem, public PerfGraphInterface virtual void solve() override = 0; - virtual NonlinearSolver * nonlinearSolver() = 0; + virtual libMesh::NonlinearSolver * nonlinearSolver() = 0; virtual SNES getSNES() = 0; @@ -365,12 +365,12 @@ class NonlinearSystemBase : public SolverSystem, public PerfGraphInterface /** * Associate jacobian to systemMatrixTag, and then form a matrix for all the tags */ - void computeJacobian(SparseMatrix & jacobian, const std::set & tags); + void computeJacobian(libMesh::SparseMatrix & jacobian, const std::set & tags); /** * Take all tags in the system, and form a matrix for all tags in the system */ - void computeJacobian(SparseMatrix & jacobian); + void computeJacobian(libMesh::SparseMatrix & jacobian); /** * Computes several Jacobian blocks simultaneously, summing their contributions into smaller @@ -452,7 +452,7 @@ class NonlinearSystemBase : public SolverSystem, public PerfGraphInterface virtual NumericVector & RHS() = 0; - virtual void augmentSparsity(SparsityPattern::Graph & sparsity, + virtual void augmentSparsity(libMesh::SparsityPattern::Graph & sparsity, std::vector & n_nz, std::vector & n_oz) override; @@ -511,7 +511,7 @@ class NonlinearSystemBase : public SolverSystem, public PerfGraphInterface * Attach a customized preconditioner that requires physics knowledge. * Generic preconditioners should be implemented in PETSc, instead. */ - virtual void attachPreconditioner(Preconditioner * preconditioner) = 0; + virtual void attachPreconditioner(libMesh::Preconditioner * preconditioner) = 0; /** * Setup damping stuff (called before we actually start) @@ -991,7 +991,7 @@ class NonlinearSystemBase : public SolverSystem, public PerfGraphInterface bool _off_diagonals_in_auto_scaling; /// A diagonal matrix used for computing scaling - std::unique_ptr> _scaling_matrix; + std::unique_ptr> _scaling_matrix; private: /** diff --git a/framework/include/systems/SolverSystem.h b/framework/include/systems/SolverSystem.h index f3f2238df135..da198750f4c7 100644 --- a/framework/include/systems/SolverSystem.h +++ b/framework/include/systems/SolverSystem.h @@ -19,6 +19,8 @@ class SubProblem; class FEProblemBase; +namespace SparsityPattern = libMesh::SparsityPattern; + class SolverSystem : public SystemBase { public: diff --git a/framework/include/systems/SystemBase.h b/framework/include/systems/SystemBase.h index 985a61acb915..7dc90ba5a531 100644 --- a/framework/include/systems/SystemBase.h +++ b/framework/include/systems/SystemBase.h @@ -48,6 +48,11 @@ class DofMap; class FEType; } +using libMesh::DofMap; +using libMesh::FEType; +// using libMesh::Preconditioner; +using libMesh::System; + /** * ///< Type of coordinate system */ @@ -56,7 +61,7 @@ void extraSendList(std::vector & send_list, void * context); /** * Free function used for a libMesh callback */ -void extraSparsity(SparsityPattern::Graph & sparsity, +void extraSparsity(libMesh::SparsityPattern::Graph & sparsity, std::vector & n_nz, std::vector & n_oz, void * context); @@ -147,8 +152,8 @@ class SystemBase : public libMesh::ParallelObject, public ConsoleStreamInterface /** * Get the reference to the libMesh system */ - virtual System & system() = 0; - virtual const System & system() const = 0; + virtual libMesh::System & system() = 0; + virtual const libMesh::System & system() const = 0; /** * This is called prior to the libMesh system has been init'd. MOOSE system wrappers can use this @@ -356,12 +361,12 @@ class SystemBase : public libMesh::ParallelObject, public ConsoleStreamInterface /** * Get a raw SparseMatrix */ - virtual SparseMatrix & getMatrix(TagID tag); + virtual libMesh::SparseMatrix & getMatrix(TagID tag); /** * Get a raw SparseMatrix */ - virtual const SparseMatrix & getMatrix(TagID tag) const; + virtual const libMesh::SparseMatrix & getMatrix(TagID tag) const; /** * Make all exsiting matrices ative @@ -402,12 +407,12 @@ class SystemBase : public libMesh::ParallelObject, public ConsoleStreamInterface /** * Associate a matrix to a tag */ - virtual void associateMatrixToTag(SparseMatrix & matrix, TagID tag); + virtual void associateMatrixToTag(libMesh::SparseMatrix & matrix, TagID tag); /** * Disassociate a matrix from a tag */ - virtual void disassociateMatrixFromTag(SparseMatrix & matrix, TagID tag); + virtual void disassociateMatrixFromTag(libMesh::SparseMatrix & matrix, TagID tag); /** * Disassociate any matrix that is associated with a given tag @@ -441,7 +446,7 @@ class SystemBase : public libMesh::ParallelObject, public ConsoleStreamInterface /** * Will modify the sparsity pattern to add logical geometric connections */ - virtual void augmentSparsity(SparsityPattern::Graph & sparsity, + virtual void augmentSparsity(libMesh::SparsityPattern::Graph & sparsity, std::vector & n_nz, std::vector & n_oz) = 0; @@ -638,7 +643,7 @@ class SystemBase : public libMesh::ParallelObject, public ConsoleStreamInterface * Get minimal quadrature order needed for integrating variables in this system * @return The minimal order of quadrature */ - virtual Order getMinQuadratureOrder(); + virtual libMesh::Order getMinQuadratureOrder(); /** * Prepare the system for use @@ -794,7 +799,7 @@ class SystemBase : public libMesh::ParallelObject, public ConsoleStreamInterface * vector. */ NumericVector & - addVector(const std::string & vector_name, const bool project, const ParallelType type); + addVector(const std::string & vector_name, const bool project, const libMesh::ParallelType type); /** * Adds a solution length vector to the system with the specified TagID @@ -809,7 +814,8 @@ class SystemBase : public libMesh::ParallelObject, public ConsoleStreamInterface * The ghosting pattern is the same as the solution * vector. */ - NumericVector & addVector(TagID tag, const bool project, const ParallelType type); + NumericVector & + addVector(TagID tag, const bool project, const libMesh::ParallelType type); /** * Close vector with the given tag @@ -849,7 +855,7 @@ class SystemBase : public libMesh::ParallelObject, public ConsoleStreamInterface * * @param tag_name The name of the tag */ - SparseMatrix & addMatrix(TagID tag); + libMesh::SparseMatrix & addMatrix(TagID tag); /** * Removes a matrix with a given tag @@ -871,7 +877,7 @@ class SystemBase : public libMesh::ParallelObject, public ConsoleStreamInterface virtual void computeVariables(const NumericVector & /*soln*/) {} - void copyVars(ExodusII_IO & io); + void copyVars(libMesh::ExodusII_IO & io); /** * Copy current solution into old and older @@ -996,7 +1002,7 @@ class SystemBase : public libMesh::ParallelObject, public ConsoleStreamInterface /// Tagged vectors (pointer) std::vector *> _tagged_vectors; /// Tagged matrices (pointer) - std::vector *> _tagged_matrices; + std::vector *> _tagged_matrices; /// Active flags for tagged matrices std::vector _matrix_tag_active_flags; diff --git a/framework/include/timeintegrators/ExplicitTimeIntegrator.h b/framework/include/timeintegrators/ExplicitTimeIntegrator.h index 313f8a3bd6ad..fd3775bb2cc3 100644 --- a/framework/include/timeintegrators/ExplicitTimeIntegrator.h +++ b/framework/include/timeintegrators/ExplicitTimeIntegrator.h @@ -81,7 +81,7 @@ class ExplicitTimeIntegrator : public TimeIntegrator, public MeshChangedInterfac TagID _Ke_time_tag; /// For solving with the consistent matrix - std::unique_ptr> _linear_solver; + std::unique_ptr> _linear_solver; /// For solving with lumped preconditioning std::unique_ptr _preconditioner; diff --git a/framework/include/timeintegrators/LumpedPreconditioner.h b/framework/include/timeintegrators/LumpedPreconditioner.h index 716c0ba5012b..6d9705b91742 100644 --- a/framework/include/timeintegrators/LumpedPreconditioner.h +++ b/framework/include/timeintegrators/LumpedPreconditioner.h @@ -26,7 +26,7 @@ class LumpedPreconditioner; * Class to that applies the lumped mass matrix preconditioner * in the ExplicitTimeIntegrator */ -class LumpedPreconditioner : public Preconditioner +class LumpedPreconditioner : public libMesh::Preconditioner { public: LumpedPreconditioner(const NumericVector & diag_inverse) diff --git a/framework/include/timeintegrators/TimeIntegrator.h b/framework/include/timeintegrators/TimeIntegrator.h index c7aade25760a..e3ffe51a7b27 100644 --- a/framework/include/timeintegrators/TimeIntegrator.h +++ b/framework/include/timeintegrators/TimeIntegrator.h @@ -169,8 +169,7 @@ class TimeIntegrator : public MooseObject, public Restartable NonlinearSystemBase & _nl; /// Nonlinear implicit system, if applicable; otherwise, nullptr - // NonlinearImplicitSystem * _nonlinear_implicit_system; - NonlinearImplicitSystem * _nonlinear_implicit_system; + libMesh::NonlinearImplicitSystem * _nonlinear_implicit_system; /// residual vector for time contributions NumericVector & _Re_time; diff --git a/framework/include/transfers/MultiAppFieldTransfer.h b/framework/include/transfers/MultiAppFieldTransfer.h index b76caebf0568..06fb76561657 100644 --- a/framework/include/transfers/MultiAppFieldTransfer.h +++ b/framework/include/transfers/MultiAppFieldTransfer.h @@ -34,5 +34,5 @@ class MultiAppFieldTransfer : public MultiAppTransfer /// Returns the Problem's equation system, displaced or not /// Be careful! If you transfer TO a displaced system you will likely need a synchronization /// So most transfers reach the non-displaced system directly - EquationSystems & getEquationSystem(FEProblemBase & problem, bool use_displaced) const; + libMesh::EquationSystems & getEquationSystem(FEProblemBase & problem, bool use_displaced) const; }; diff --git a/framework/include/transfers/MultiAppGeneralFieldShapeEvaluationTransfer.h b/framework/include/transfers/MultiAppGeneralFieldShapeEvaluationTransfer.h index aff01327b7b8..e5ba9d18c081 100644 --- a/framework/include/transfers/MultiAppGeneralFieldShapeEvaluationTransfer.h +++ b/framework/include/transfers/MultiAppGeneralFieldShapeEvaluationTransfer.h @@ -37,7 +37,8 @@ class MultiAppGeneralFieldShapeEvaluationTransfer : public MultiAppGeneralFieldT * @param[in] var_name the variable to build the mesh functions for * @param[out] the mesh functions */ - void buildMeshFunctions(const unsigned int var_index, std::vector & local_meshfuns); + void buildMeshFunctions(const unsigned int var_index, + std::vector & local_meshfuns); /* * Evaluate interpolation values for incoming points @@ -48,16 +49,16 @@ class MultiAppGeneralFieldShapeEvaluationTransfer : public MultiAppGeneralFieldT */ void evaluateInterpValuesWithMeshFunctions( const std::vector & local_bboxes, - std::vector & local_meshfuns, + std::vector & local_meshfuns, const std::vector> & incoming_points, std::vector> & outgoing_vals); /* * Bounding boxes */ - std::vector _local_bboxes; + std::vector _local_bboxes; /* * Local mesh functions */ - std::vector _local_meshfuns; + std::vector _local_meshfuns; }; diff --git a/framework/include/transfers/MultiAppGeneralFieldTransfer.h b/framework/include/transfers/MultiAppGeneralFieldTransfer.h index 80efa437b98f..89a889c44074 100644 --- a/framework/include/transfers/MultiAppGeneralFieldTransfer.h +++ b/framework/include/transfers/MultiAppGeneralFieldTransfer.h @@ -109,7 +109,7 @@ class MultiAppGeneralFieldTransfer : public MultiAppConservativeTransfer * @param pl locator for the mesh of the source app * @param pt point in the local coordinates of the source app we're considering */ - bool inMesh(const PointLocatorBase * const pl, const Point & pt) const; + bool inMesh(const libMesh::PointLocatorBase * const pl, const Point & pt) const; /* * Whether or not a given element is part of the given blocks @@ -136,7 +136,7 @@ class MultiAppGeneralFieldTransfer : public MultiAppConservativeTransfer * @param pt point to examine, in the local coordinates (same as the point locator) */ bool inBlocks(const std::set & blocks, - const PointLocatorBase * const pl, + const libMesh::PointLocatorBase * const pl, const Point & pt) const; /* @@ -168,7 +168,7 @@ class MultiAppGeneralFieldTransfer : public MultiAppConservativeTransfer bool onBoundaries(const std::set & boundaries, const std::set & block_restriction, const MooseMesh & mesh, - const PointLocatorBase * const pl, + const libMesh::PointLocatorBase * const pl, const Point & pt) const; /** @@ -254,7 +254,7 @@ class MultiAppGeneralFieldTransfer : public MultiAppConservativeTransfer const bool _elemental_boundary_restriction_on_sides; /// Point locators, useful to examine point location with regards to domain restriction - std::vector> _from_point_locators; + std::vector> _from_point_locators; /// First app each processor owns, indexed by processor /// If no app on the processor, will have a -1 for the app start instead @@ -517,10 +517,10 @@ template class RecordRequests { protected: - typedef typename TensorTools::MakeBaseNumber::type DofValueType; + typedef typename libMesh::TensorTools::MakeBaseNumber::type DofValueType; public: - typedef typename TensorTools::MakeReal::type RealType; + typedef typename libMesh::TensorTools::MakeReal::type RealType; typedef DofValueType ValuePushType; typedef Output FunctorValue; @@ -538,9 +538,9 @@ class RecordRequests } } - void init_context(FEMContext &) {} + void init_context(libMesh::FEMContext &) {} - Output eval_at_node(const FEMContext &, + Output eval_at_node(const libMesh::FEMContext &, unsigned int /*variable_index*/, unsigned int /*elem_dim*/, const Node & n, @@ -551,7 +551,7 @@ class RecordRequests return 0; } - Output eval_at_point(const FEMContext &, + Output eval_at_point(const libMesh::FEMContext &, unsigned int /*variable_index*/, const Point & n, const Real /*time*/, @@ -563,7 +563,7 @@ class RecordRequests bool is_grid_projection() { return false; } - void eval_mixed_derivatives(const FEMContext & /*c*/, + void eval_mixed_derivatives(const libMesh::FEMContext & /*c*/, unsigned int /*i*/, unsigned int /*dim*/, const Node & /*n*/, @@ -579,7 +579,7 @@ class RecordRequests } void eval_old_dofs(const Elem &, - const FEType &, + const libMesh::FEType &, unsigned int, unsigned int, std::vector &, @@ -623,12 +623,12 @@ template class CachedData { protected: - typedef typename TensorTools::MakeBaseNumber::type DofValueType; + typedef typename libMesh::TensorTools::MakeBaseNumber::type DofValueType; public: typedef PointIndexedMap Cache; - typedef typename TensorTools::MakeReal::type RealType; + typedef typename libMesh::TensorTools::MakeReal::type RealType; typedef DofValueType ValuePushType; typedef Output FunctorValue; @@ -637,7 +637,7 @@ class CachedData * @param cache a map/cache to search for points in * @param backup a function that can be queried for a point value when the cache doesnt have it */ - CachedData(const Cache & cache, const FunctionBase & backup, Real default_value) + CachedData(const Cache & cache, const libMesh::FunctionBase & backup, Real default_value) : _cache(cache), _backup(backup.clone()), _default_value(default_value) { } @@ -650,10 +650,10 @@ class CachedData { } - void init_context(FEMContext &) {} + void init_context(libMesh::FEMContext &) {} /// Gets a value at the node location - Output eval_at_node(const FEMContext &, + Output eval_at_node(const libMesh::FEMContext &, unsigned int /*i*/, unsigned int /*elem_dim*/, const Node & n, @@ -673,7 +673,7 @@ class CachedData } /// Gets a value at a point - Output eval_at_point(const FEMContext &, + Output eval_at_point(const libMesh::FEMContext &, unsigned int /*i*/, const Point & n, const Real /*time*/, @@ -693,7 +693,7 @@ class CachedData bool is_grid_projection() { return false; } - void eval_mixed_derivatives(const FEMContext & /*c*/, + void eval_mixed_derivatives(const libMesh::FEMContext & /*c*/, unsigned int /*i*/, unsigned int /*dim*/, const Node & /*n*/, @@ -709,7 +709,7 @@ class CachedData } void eval_old_dofs(const Elem &, - const FEType &, + const libMesh::FEType &, unsigned int, unsigned int, std::vector &, @@ -723,7 +723,7 @@ class CachedData const Cache & _cache; /// Function to evaluate for uncached points - std::unique_ptr> _backup; + std::unique_ptr> _backup; /// Default value when no point is found const Real _default_value; diff --git a/framework/include/transfers/MultiAppGeometricInterpolationTransfer.h b/framework/include/transfers/MultiAppGeometricInterpolationTransfer.h index fbb175204341..1e8e3cd4755a 100644 --- a/framework/include/transfers/MultiAppGeometricInterpolationTransfer.h +++ b/framework/include/transfers/MultiAppGeometricInterpolationTransfer.h @@ -35,18 +35,18 @@ class MultiAppGeometricInterpolationTransfer : public MultiAppConservativeTransf virtual void execute() override; protected: - void - fillSourceInterpolationPoints(FEProblemBase & from_problem, - const MooseVariableFieldBase & from_var, - const MultiAppCoordTransform & from_app_transform, - std::unique_ptr> & idi); + void fillSourceInterpolationPoints( + FEProblemBase & from_problem, + const MooseVariableFieldBase & from_var, + const MultiAppCoordTransform & from_app_transform, + std::unique_ptr> & idi); - void - interpolateTargetPoints(FEProblemBase & to_problem, - MooseVariableFieldBase & to_var, - NumericVector & to_solution, - const MultiAppCoordTransform & to_app_transform, - const std::unique_ptr> & idi); + void interpolateTargetPoints( + FEProblemBase & to_problem, + MooseVariableFieldBase & to_var, + NumericVector & to_solution, + const MultiAppCoordTransform & to_app_transform, + const std::unique_ptr> & idi); void subdomainIDsNode(MooseMesh & mesh, const Node & node, std::set & subdomainids); diff --git a/framework/include/transfers/MultiAppNearestNodeTransfer.h b/framework/include/transfers/MultiAppNearestNodeTransfer.h index 33928a4cfe09..11ea31efabf5 100644 --- a/framework/include/transfers/MultiAppNearestNodeTransfer.h +++ b/framework/include/transfers/MultiAppNearestNodeTransfer.h @@ -39,7 +39,7 @@ class MultiAppNearestNodeTransfer : public MultiAppConservativeTransfer * @return The maximum distance between the point p and the eight corners of * the bounding box bbox. */ - Real bboxMaxDistance(const Point & p, const BoundingBox & bbox); + Real bboxMaxDistance(const Point & p, const libMesh::BoundingBox & bbox); /** * Return the distance between the given point and the nearest corner of the @@ -49,11 +49,11 @@ class MultiAppNearestNodeTransfer : public MultiAppConservativeTransfer * @return The minimum distance between the point p and the eight corners of * the bounding box bbox. */ - Real bboxMinDistance(const Point & p, const BoundingBox & bbox); + Real bboxMinDistance(const Point & p, const libMesh::BoundingBox & bbox); /** * Get nearest node candidates. - * @param local_entities: space locatins and their associated elements + * @param local_entities: space locations and their associated elements * @param local_comps: comp num for the unknowns on DofObject. It is useful * for higher order method */ diff --git a/framework/include/transfers/MultiAppProjectionTransfer.h b/framework/include/transfers/MultiAppProjectionTransfer.h index 7d59290603e1..10fd54ecee6c 100644 --- a/framework/include/transfers/MultiAppProjectionTransfer.h +++ b/framework/include/transfers/MultiAppProjectionTransfer.h @@ -35,7 +35,7 @@ class MultiAppProjectionTransfer : public MultiAppConservativeTransfer void toMultiApp(); void fromMultiApp(); - void assembleL2(EquationSystems & es, const std::string & system_name); + void assembleL2(libMesh::EquationSystems & es, const std::string & system_name); void projectSolution(unsigned int to_problem); @@ -43,17 +43,17 @@ class MultiAppProjectionTransfer : public MultiAppConservativeTransfer /// True, if we need to recompute the projection matrix bool _compute_matrix; - std::vector _proj_sys; + std::vector _proj_sys; /// Having one projection variable number seems weird, but there is always one variable in every system being used for projection, /// thus is always going to be 0 unless something changes in libMesh or we change the way we project variables unsigned int _proj_var_num; - friend void assemble_l2(EquationSystems & es, const std::string & system_name); + friend void assemble_l2(libMesh::EquationSystems & es, const std::string & system_name); // These variables allow us to cache qps for fixed meshes. bool _fixed_meshes; bool _qps_cached; - std::map> _cached_qps; + std::map> _cached_qps; std::map, unsigned int>> _cached_index_map; diff --git a/framework/include/transfers/MultiAppTransfer.h b/framework/include/transfers/MultiAppTransfer.h index 1fb840fb588d..e5f555a4d4c7 100644 --- a/framework/include/transfers/MultiAppTransfer.h +++ b/framework/include/transfers/MultiAppTransfer.h @@ -130,15 +130,16 @@ class MultiAppTransfer : public Transfer * Transform a bounding box according to the transformations in the provided coordinate * transformation object */ - static void transformBoundingBox(BoundingBox & box, const MultiAppCoordTransform & transform); + static void transformBoundingBox(libMesh::BoundingBox & box, + const MultiAppCoordTransform & transform); /// Deprecated class attribute for compatibility with the apps std::shared_ptr _multi_app; std::vector _to_problems; std::vector _from_problems; - std::vector _to_es; - std::vector _from_es; + std::vector _to_es; + std::vector _from_es; std::vector _to_meshes; std::vector _from_meshes; std::vector _to_positions; @@ -176,8 +177,8 @@ class MultiAppTransfer : public Transfer * Note: global bounding boxes are not indexed by app number. But rather outer indexing is by * process, then the inner indexing is by local app number. */ - std::vector getFromBoundingBoxes(); - std::vector getFromBoundingBoxes(BoundaryID boundary_id); + std::vector getFromBoundingBoxes(); + std::vector getFromBoundingBoxes(BoundaryID boundary_id); ///@} /** @@ -190,7 +191,7 @@ class MultiAppTransfer : public Transfer * If we are transferring to a multiapp, return the appropriate solution * vector */ - NumericVector & getTransferVector(unsigned int i_local, std::string var_name); + libMesh::NumericVector & getTransferVector(unsigned int i_local, std::string var_name); /// Given local app index, returns global app index. std::vector _to_local2global_map; @@ -245,7 +246,7 @@ class MultiAppTransfer : public Transfer const std::string & param_name = "") const; /// Extends bounding boxes to avoid missing points - void extendBoundingBoxes(const Real factor, std::vector & bboxes) const; + void extendBoundingBoxes(const Real factor, std::vector & bboxes) const; private: /** diff --git a/framework/include/transfers/Transfer.h b/framework/include/transfers/Transfer.h index cb7b7c7bbc17..72e90b94d3b0 100644 --- a/framework/include/transfers/Transfer.h +++ b/framework/include/transfers/Transfer.h @@ -63,7 +63,7 @@ class Transfer : public MooseObject, * @param es The EquationSystems object to be searched. * @param var_name The name of the variable you are looking for. */ - static System * find_sys(EquationSystems & es, const std::string & var_name); + static libMesh::System * find_sys(libMesh::EquationSystems & es, const std::string & var_name); enum DIRECTION { @@ -110,5 +110,5 @@ class Transfer : public MooseObject, MultiMooseEnum _directions; public: - const static Number OutOfMeshValue; + const static libMesh::Number OutOfMeshValue; }; diff --git a/framework/include/userobjects/ElementQualityChecker.h b/framework/include/userobjects/ElementQualityChecker.h index d8cb20d82d0f..c873729ebcf1 100644 --- a/framework/include/userobjects/ElementQualityChecker.h +++ b/framework/include/userobjects/ElementQualityChecker.h @@ -29,10 +29,10 @@ class ElementQualityChecker : public ElementUserObject void finalize() override; protected: - bool checkMetricApplicability(const ElemQuality & elem_metric, - const std::vector & elem_metrics); + bool checkMetricApplicability(const libMesh::ElemQuality & elem_metric, + const std::vector & elem_metrics); - ElemQuality _m_type; + libMesh::ElemQuality _m_type; const bool _has_upper_bound; const bool _has_lower_bound; Real _upper_bound; diff --git a/framework/include/userobjects/NodalNormalsPreprocessor.h b/framework/include/userobjects/NodalNormalsPreprocessor.h index 76f45bbad047..1a66a87fc942 100644 --- a/framework/include/userobjects/NodalNormalsPreprocessor.h +++ b/framework/include/userobjects/NodalNormalsPreprocessor.h @@ -50,7 +50,7 @@ class NodalNormalsPreprocessor : public ElementUserObject protected: AuxiliarySystem & _aux; - FEType _fe_type; + libMesh::FEType _fe_type; bool _has_corners; std::vector _boundaries; BoundaryID _corner_boundary_id; diff --git a/framework/include/userobjects/RadialAverage.h b/framework/include/userobjects/RadialAverage.h index cf88f5b2d312..72d06e0e8b49 100644 --- a/framework/include/userobjects/RadialAverage.h +++ b/framework/include/userobjects/RadialAverage.h @@ -23,6 +23,8 @@ class ThreadedRadialAverageLoop; +using libMesh::StoredRange; + /** * Gather and communicate a full list of all quadrature points and the values of * a selected material property at each point. Use a KD-Tree to get the weighted spatial diff --git a/framework/include/userobjects/SolutionUserObject.h b/framework/include/userobjects/SolutionUserObject.h index 9030fe05180f..caa608425e36 100644 --- a/framework/include/userobjects/SolutionUserObject.h +++ b/framework/include/userobjects/SolutionUserObject.h @@ -139,7 +139,7 @@ class SolutionUserObject : public GeneralUserObject * @param subdomain_ids Subdomains IDs where to look for the value, if nullptr look everywhere * @return The desired value for the given variable at a location */ - RealGradient + libMesh::RealGradient pointValueGradientWrapper(Real t, const Point & p, const std::string & var_name, @@ -155,7 +155,7 @@ class SolutionUserObject : public GeneralUserObject * @param subdomain_ids Subdomains IDs where to look for the value, if nullptr look everywhere * @return The desired value for the given variable at a location */ - RealGradient + libMesh::RealGradient pointValueGradient(Real t, const Point & p, const std::string & var_name, @@ -170,7 +170,7 @@ class SolutionUserObject : public GeneralUserObject * @param subdomain_ids Subdomains IDs where to look for the value, if nullptr look everywhere * @return The desired value for the given variable at a location */ - RealGradient + libMesh::RealGradient pointValueGradient(Real t, Point pt, const unsigned int local_var_index, @@ -188,7 +188,7 @@ class SolutionUserObject : public GeneralUserObject * @param subdomain_ids Subdomains IDs where to look for the value, if nullptr look everywhere * @return The desired value for the given variable at a location */ - std::map discontinuousPointValueGradient( + std::map discontinuousPointValueGradient( Real t, const Point & p, const std::string & var_name, @@ -206,7 +206,7 @@ class SolutionUserObject : public GeneralUserObject * @param subdomain_ids Subdomains IDs where to look for the value, if nullptr look everywhere * @return The desired value for the given variable at a location */ - std::map discontinuousPointValueGradient( + std::map discontinuousPointValueGradient( Real t, Point pt, const unsigned int local_var_index, @@ -364,7 +364,7 @@ class SolutionUserObject : public GeneralUserObject * @param subdomain_ids Subdomains IDs where to look for the value, if nullptr look everywhere * @param func_num The MeshFunction index to use (1 = _mesh_function; 2 = _mesh_function2) */ - RealGradient + libMesh::RealGradient evalMeshFunctionGradient(const Point & p, const unsigned int local_var_index, unsigned int func_num, @@ -379,7 +379,7 @@ class SolutionUserObject : public GeneralUserObject * @param subdomain_ids Subdomains IDs where to look for the value, if nullptr look everywhere * @param func_num The MeshFunction index to use (1 = _mesh_function; 2 = _mesh_function2) */ - std::map evalMultiValuedMeshFunctionGradient( + std::map evalMultiValuedMeshFunctionGradient( const Point & p, const unsigned int local_var_index, unsigned int func_num, @@ -423,32 +423,32 @@ class SolutionUserObject : public GeneralUserObject /// Flag for triggering interpolation of ExodusII data bool _interpolate_times; - /// Pointer the libmesh::mesh object - std::unique_ptr _mesh; + /// Pointer the libMesh::mesh object + std::unique_ptr _mesh; - /// Pointer to the libmesh::EquationSystems object - std::unique_ptr _es; + /// Pointer to the libMesh::EquationSystems object + std::unique_ptr _es; /// Pointer libMesh::System class storing the read solution - System * _system; + libMesh::System * _system; /// Pointer the libMesh::MeshFunction object that the read data is stored - std::unique_ptr _mesh_function; + std::unique_ptr _mesh_function; /// Pointer to the libMesh::ExodusII used to read the files - std::unique_ptr _exodusII_io; + std::unique_ptr _exodusII_io; /// Pointer to the serial solution vector std::unique_ptr> _serialized_solution; /// Pointer to second libMesh::EquationSystems object, used for interpolation - std::unique_ptr _es2; + std::unique_ptr _es2; /// Pointer to a second libMesh::System object, used for interpolation - System * _system2; + libMesh::System * _system2; /// Pointer to second libMesh::MeshFuntion, used for interpolation - std::unique_ptr _mesh_function2; + std::unique_ptr _mesh_function2; /// Pointer to second serial solution, used for interpolation std::unique_ptr> _serialized_solution2; diff --git a/framework/include/utils/ArbitraryQuadrature.h b/framework/include/utils/ArbitraryQuadrature.h index 3293eab2197a..bb25c6283eec 100644 --- a/framework/include/utils/ArbitraryQuadrature.h +++ b/framework/include/utils/ArbitraryQuadrature.h @@ -10,7 +10,7 @@ #pragma once // MOOSE includes -#include "Moose.h" // using namespace libMesh +#include "Moose.h" #include "libmesh/quadrature.h" @@ -18,10 +18,11 @@ * Implements a fake quadrature rule where you can specify the locations * (in the reference domain) of the quadrature points. */ -class ArbitraryQuadrature : public QBase +class ArbitraryQuadrature : public libMesh::QBase { public: - ArbitraryQuadrature(const unsigned int _dim, const Order _order = INVALID_ORDER); + ArbitraryQuadrature(const unsigned int _dim, + const libMesh::Order _order = libMesh::INVALID_ORDER); /** * Copy/move ctor, copy/move assignment operator, and destructor are @@ -33,21 +34,21 @@ class ArbitraryQuadrature : public QBase ArbitraryQuadrature & operator=(ArbitraryQuadrature &&) = default; virtual ~ArbitraryQuadrature() = default; - QuadratureType type() const override; + libMesh::QuadratureType type() const override; /** * Set the quadrature points. Note that this also sets the quadrature weights to unity */ - void setPoints(const std::vector & points); + void setPoints(const std::vector & points); /** * Set the quadrature weights */ - void setWeights(const std::vector & weights); + void setWeights(const std::vector & weights); virtual bool shapes_need_reinit() override { return true; } - virtual std::unique_ptr clone() const override; + virtual std::unique_ptr clone() const override; private: /** @@ -55,7 +56,10 @@ class ArbitraryQuadrature : public QBase * by the quadrature initialization routines. Please do not * modify the function names or signatures. */ - void init_1D(const ElemType _type = INVALID_ELEM, unsigned int p_level = 0) override; - void init_2D(const ElemType _type = INVALID_ELEM, unsigned int p_level = 0) override; - void init_3D(const ElemType _type = INVALID_ELEM, unsigned int p_level = 0) override; + void init_1D(const libMesh::ElemType _type = libMesh::INVALID_ELEM, + unsigned int p_level = 0) override; + void init_2D(const libMesh::ElemType _type = libMesh::INVALID_ELEM, + unsigned int p_level = 0) override; + void init_3D(const libMesh::ElemType _type = libMesh::INVALID_ELEM, + unsigned int p_level = 0) override; }; diff --git a/framework/include/utils/ColumnMajorMatrix.h b/framework/include/utils/ColumnMajorMatrix.h index 75f2f75288a9..ee63add10f78 100644 --- a/framework/include/utils/ColumnMajorMatrix.h +++ b/framework/include/utils/ColumnMajorMatrix.h @@ -10,7 +10,6 @@ #pragma once #include "DenseMatrix.h" -#include "Moose.h" // using namespace libMesh #include "MooseError.h" #include "ADReal.h" #include "MooseTypes.h" @@ -421,8 +420,8 @@ ColumnMajorMatrixTempl::fill(TypeTensor & tensor) mooseError( "Cannot fill tensor! The ColumnMajorMatrix doesn't have the same number of entries!"); - for (const auto j : make_range(Moose::dim)) - for (const auto i : make_range(Moose::dim)) + for (const auto j : libMesh::make_range(Moose::dim)) + for (const auto i : libMesh::make_range(Moose::dim)) tensor(i, j) = _values[j * Moose::dim + i]; } @@ -729,8 +728,8 @@ ColumnMajorMatrixTempl::operator+=(const TypeTensor & rhs) mooseError("Cannot perform matrix addition and assignment! The shapes of the two operands are " "not compatible!"); - for (const auto j : make_range(Moose::dim)) - for (const auto i : make_range(Moose::dim)) + for (const auto j : libMesh::make_range(Moose::dim)) + for (const auto i : libMesh::make_range(Moose::dim)) (*this)(i, j) += rhs(i, j); return *this; diff --git a/framework/include/utils/CompileTimeDerivatives.h b/framework/include/utils/CompileTimeDerivatives.h index 70d07223fc46..17d19b733cca 100644 --- a/framework/include/utils/CompileTimeDerivatives.h +++ b/framework/include/utils/CompileTimeDerivatives.h @@ -802,7 +802,7 @@ pow(const B & base) else if constexpr (std::is_base_of::value) \ return OP(makeValue(left), right); \ else \ - static_assert(always_false, "This should not be instantiated."); \ + static_assert(libMesh::always_false, "This should not be instantiated."); \ } CT_OPERATOR_BINARY(+, CTAdd) diff --git a/framework/include/utils/Conversion.h b/framework/include/utils/Conversion.h index d9568e13c2d6..61839e5b2ad6 100644 --- a/framework/include/utils/Conversion.h +++ b/framework/include/utils/Conversion.h @@ -32,10 +32,10 @@ template T stringToEnum(const std::string & s); template <> -QuadratureType stringToEnum(const std::string & s); +libMesh::QuadratureType stringToEnum(const std::string & s); template <> -Order stringToEnum(const std::string & s); +libMesh::Order stringToEnum(const std::string & s); template <> CoordinateSystemType stringToEnum(const std::string & s); @@ -118,7 +118,7 @@ std::string stringify(const VarFieldType & t); std::string stringify(const std::string & s); /// Convert FEType from libMesh into string -std::string stringify(FEFamily f); +std::string stringify(libMesh::FEFamily f); /// Convert SolutionIterationType into string std::string stringify(SolutionIterationType t); diff --git a/framework/include/utils/ElementsIntersectedByPlane.h b/framework/include/utils/ElementsIntersectedByPlane.h index 0c13392fe50c..5ec82e96d296 100644 --- a/framework/include/utils/ElementsIntersectedByPlane.h +++ b/framework/include/utils/ElementsIntersectedByPlane.h @@ -32,10 +32,10 @@ namespace Moose * @param intersected_elems The elements intersected by the plane. Will be empty if there are no * intersections. */ -void elementsIntersectedByPlane(const Point & p0, - const Point & normal, - const MeshBase & mesh, - std::vector & intersected_elems); +void elementsIntersectedByPlane(const libMesh::Point & p0, + const libMesh::Point & normal, + const libMesh::MeshBase & mesh, + std::vector & intersected_elems); /** * Find all of the elements intersected by a plane. @@ -46,9 +46,9 @@ void elementsIntersectedByPlane(const Point & p0, * @param intersected_elems The elements intersected by the plane. Will be empty if there are no * intersections. */ -void elementsIntersectedByPlane(const Point & p0, - const Point & p1, - const Point & p2, - const MeshBase & mesh, - std::vector & intersected_elems); +void elementsIntersectedByPlane(const libMesh::Point & p0, + const libMesh::Point & p1, + const libMesh::Point & p2, + const libMesh::MeshBase & mesh, + std::vector & intersected_elems); } diff --git a/framework/include/utils/FactorizedRankTwoTensor.h b/framework/include/utils/FactorizedRankTwoTensor.h index b85f7623cc99..31bedb1b4c22 100644 --- a/framework/include/utils/FactorizedRankTwoTensor.h +++ b/framework/include/utils/FactorizedRankTwoTensor.h @@ -165,7 +165,7 @@ namespace MathUtils FactorizedRankTwoTensorTempl operatorname(const FactorizedRankTwoTensorTempl & A, \ const T2 & arg) \ { \ - if constexpr (ScalarTraits::value) \ + if constexpr (libMesh::ScalarTraits::value) \ { \ FactorizedRankTwoTensorOperatorMapBody(operator) \ } \ @@ -225,7 +225,7 @@ namespace MathUtils RankFourTensorTempl derivativename( \ const FactorizedRankTwoTensorTempl & A, const T2 & arg) \ { \ - if constexpr (ScalarTraits::value) \ + if constexpr (libMesh::ScalarTraits::value) \ { \ FactorizedRankTwoTensorOperatorMapDerivativeBody(operator, derivative) \ } \ @@ -263,7 +263,7 @@ template FactorizedRankTwoTensorTempl FactorizedRankTwoTensorTempl::operator*(const T2 & a) const { - if constexpr (ScalarTraits::value) + if constexpr (libMesh::ScalarTraits::value) { FactorizedRankTwoTensorTempl A = *this; for (auto & eigval : A._eigvals) @@ -277,7 +277,7 @@ template FactorizedRankTwoTensorTempl FactorizedRankTwoTensorTempl::operator/(const T2 & a) const { - if constexpr (ScalarTraits::value) + if constexpr (libMesh::ScalarTraits::value) { FactorizedRankTwoTensorTempl A = *this; for (auto & eigval : A._eigvals) diff --git a/framework/include/utils/FormattedTable.h b/framework/include/utils/FormattedTable.h index 7be093928a52..d93abe528dd3 100644 --- a/framework/include/utils/FormattedTable.h +++ b/framework/include/utils/FormattedTable.h @@ -206,7 +206,7 @@ class FormattedTable void printCSV(const std::string & file_name, int interval = 1, bool align = false); void printEnsight(const std::string & file_name); - void writeExodus(ExodusII_IO * ex_out, Real time); + void writeExodus(libMesh::ExodusII_IO * ex_out, Real time); void makeGnuplot(const std::string & base_file, const std::string & format); static MooseEnum getWidthModes(); diff --git a/framework/include/utils/GeometryUtils.h b/framework/include/utils/GeometryUtils.h index eb883782d4ab..03827f769b1c 100644 --- a/framework/include/utils/GeometryUtils.h +++ b/framework/include/utils/GeometryUtils.h @@ -20,14 +20,14 @@ namespace geom_utils * @param[in] pt point * @return whether point is equal to the zero point */ -bool isPointZero(const Point & pt); +bool isPointZero(const libMesh::Point & pt); /** * Get the unit vector for a point parameter * @param[in] pt point * @param[in] name name of the parameter */ -Point unitVector(const Point & pt, const std::string & name); +libMesh::Point unitVector(const libMesh::Point & pt, const std::string & name); /** * Rotate point about an axis @@ -36,7 +36,9 @@ Point unitVector(const Point & pt, const std::string & name); * @param[in] axis axis expressed as vector * @return rotated point */ -Point rotatePointAboutAxis(const Point & p, const Real angle, const Point & axis); +libMesh::Point rotatePointAboutAxis(const libMesh::Point & p, + const libMesh::Real angle, + const libMesh::Point & axis); /** * Get the minimum distance from a point to another set of points, in the plane @@ -46,9 +48,9 @@ Point rotatePointAboutAxis(const Point & p, const Real angle, const Point & axis * @param[in] axis axis perpendicular to the plane of the polygon * @return minimum distance to the provided points */ -Real minDistanceToPoints(const Point & pt, - const std::vector & candidates, - const unsigned int axis); +libMesh::Real minDistanceToPoints(const libMesh::Point & pt, + const std::vector & candidates, + const unsigned int axis); /** * Get the corner coordinates of a regular 2-D polygon, assuming a face of the polygon @@ -58,8 +60,8 @@ Real minDistanceToPoints(const Point & pt, * @param[in] axis axis perpendicular to the plane of the polygon * @return corner coordinates */ -std::vector -polygonCorners(const unsigned int num_sides, const Real radius, const unsigned int axis); +std::vector +polygonCorners(const unsigned int num_sides, const libMesh::Real radius, const unsigned int axis); /** * Get the indices of the plane perpendicular to the specified axis. @@ -79,7 +81,8 @@ std::pair projectedIndices(const unsigned int axis); * @param[in] axis axis perpendicular to the projection plane * @return point */ -Point projectPoint(const Real x0, const Real x1, const unsigned int axis); +libMesh::Point +projectPoint(const libMesh::Real x0, const libMesh::Real x1, const unsigned int axis); /** * Get the unit normal vector between two points (which are first projected onto @@ -90,7 +93,7 @@ Point projectPoint(const Real x0, const Real x1, const unsigned int axis); * @param[in] axis project points onto plane perpendicular to this axis * @return unit normal */ -Point projectedUnitNormal(Point pt1, Point pt2, const unsigned int axis); +libMesh::Point projectedUnitNormal(libMesh::Point pt1, libMesh::Point pt2, const unsigned int axis); /** * Compute the distance from a 3-D line, provided in terms of two points on the line @@ -99,7 +102,9 @@ Point projectedUnitNormal(Point pt1, Point pt2, const unsigned int axis); * @param[in] line1 second point on line * @return distance from line */ -Real distanceFromLine(const Point & pt, const Point & line0, const Point & line1); +libMesh::Real distanceFromLine(const libMesh::Point & pt, + const libMesh::Point & line0, + const libMesh::Point & line1); /** * Compute the distance from a 3-D line, provided in terms of two points on the line. @@ -111,7 +116,10 @@ Real distanceFromLine(const Point & pt, const Point & line0, const Point & line1 * @param[in] axis axis index (0 = x, 1 = y, 2 = z) perpendicular to the projection plane * @return distance from line */ -Real projectedDistanceFromLine(Point pt, Point line0, Point line1, const unsigned int axis); +libMesh::Real projectedDistanceFromLine(libMesh::Point pt, + libMesh::Point line0, + libMesh::Point line1, + const unsigned int axis); /** * If positive, point is on the positive side of the half space (and vice versa). Because @@ -123,7 +131,10 @@ Real projectedDistanceFromLine(Point pt, Point line0, Point line1, const unsigne * @param[in] axis axis perpendicular to plane onto which point and line are first projected * @return half space of line */ -Real projectedLineHalfSpace(Point pt1, Point pt2, Point pt3, const unsigned int axis); +libMesh::Real projectedLineHalfSpace(libMesh::Point pt1, + libMesh::Point pt2, + libMesh::Point pt3, + const unsigned int axis); /** * Whether a point is in 2-D a polygon in the plane perpendicular to the specified @@ -133,8 +144,9 @@ Real projectedLineHalfSpace(Point pt1, Point pt2, Point pt3, const unsigned int * @param[in] axis axis perpendicular to the plane of the polygon * @return whether point is inside the polygon */ -bool -pointInPolygon(const Point & point, const std::vector & corners, const unsigned int axis); +bool pointInPolygon(const libMesh::Point & point, + const std::vector & corners, + const unsigned int axis); /** * Whether a point is on the edge of a 2-D polygon in the plane perpendicular to @@ -144,12 +156,15 @@ pointInPolygon(const Point & point, const std::vector & corners, const un * @param[in] axis axis perpendicular to the plane of the polygon * @return whether point is on edge of polygon */ -bool pointOnEdge(const Point & point, const std::vector & corners, const unsigned int axis); +bool pointOnEdge(const libMesh::Point & point, + const std::vector & corners, + const unsigned int axis); /** * Get corner points of a bounding box, with side length re-scaled * @param[in] box bounding box to start from * @param[in] factor by which to multiply the bounding box side */ -std::vector boxCorners(const BoundingBox & box, const Real factor); +std::vector boxCorners(const libMesh::BoundingBox & box, + const libMesh::Real factor); } // end of namespace geom_utils diff --git a/framework/include/utils/GreenGaussGradient.h b/framework/include/utils/GreenGaussGradient.h index b31e4d2eefe1..74b2634da446 100644 --- a/framework/include/utils/GreenGaussGradient.h +++ b/framework/include/utils/GreenGaussGradient.h @@ -35,8 +35,9 @@ namespace FV * @param mesh The mesh on which we are computing the gradient * @return The computed cell gradient */ -template ::value>::type> -VectorValue +template ::value>::type> +libMesh::VectorValue greenGaussGradient(const ElemArg & elem_arg, const StateArg & state_arg, const FunctorBase & functor, @@ -54,7 +55,7 @@ greenGaussGradient(const ElemArg & elem_arg, try { - VectorValue grad; + libMesh::VectorValue grad; bool volume_set = false; Real volume = 0; @@ -75,15 +76,15 @@ greenGaussGradient(const ElemArg & elem_arg, // vector, e.g. the face area times the outward facing normal // ebf eqns: element gradient coefficients, e.g. eqn. 2, LHS term 2 coefficient - std::vector> ebf_grad_coeffs; + std::vector> ebf_grad_coeffs; // ebf eqns: rhs b values. These will actually correspond to the elem_value so we can use a // pointer and avoid copying. This is the RHS of eqn. 2 std::vector ebf_b; // elem grad eqns: ebf coefficients, e.g. eqn. 1, LHS term 2 coefficients - std::vector> grad_ebf_coeffs; + std::vector> grad_ebf_coeffs; // elem grad eqns: rhs b value, e.g. eqn. 1 RHS - VectorValue grad_b = 0; + libMesh::VectorValue grad_b = 0; auto action_functor = [&volume_set, &volume, @@ -255,8 +256,9 @@ greenGaussGradient(const ElemArg & elem_arg, * @param mesh The mesh on which we are computing the gradient * @return The computed cell gradient */ -template ::value>::type> -VectorValue +template ::value>::type> +libMesh::VectorValue greenGaussGradient(const FaceArg & face_arg, const StateArg & state_arg, const FunctorBase & functor, @@ -278,14 +280,14 @@ greenGaussGradient(const FaceArg & face_arg, // This is the component of the gradient which is parallel to the line connecting // the cell centers. Therefore, we can use our second order, central difference // scheme to approximate it. - VectorValue face_gradient = (value_neighbor - value_elem) / fi.dCNMag() * fi.eCN(); + libMesh::VectorValue face_gradient = (value_neighbor - value_elem) / fi.dCNMag() * fi.eCN(); // We only need nonorthogonal correctors in 2+ dimensions if (mesh.dimension() > 1) { // We are using an orthogonal approach for the non-orthogonal correction, for more information // see Hrvoje Jasak's PhD Thesis (Imperial College, 1996) - VectorValue interpolated_gradient; + libMesh::VectorValue interpolated_gradient; // Compute the gradients in the two cells on both sides of the face const auto & grad_elem = @@ -317,7 +319,7 @@ template TensorValue greenGaussGradient(const ElemArg & elem_arg, const StateArg & state_arg, - const Moose::FunctorBase> & functor, + const Moose::FunctorBase> & functor, const bool two_term_boundary_expansion, const MooseMesh & mesh) { @@ -338,7 +340,7 @@ template TensorValue greenGaussGradient(const FaceArg & face_arg, const StateArg & state_arg, - const Moose::FunctorBase> & functor, + const Moose::FunctorBase> & functor, const bool two_term_boundary_expansion, const MooseMesh & mesh) { diff --git a/framework/include/utils/GriddedData.h b/framework/include/utils/GriddedData.h index e28a6d2721bb..09e98b217a2b 100644 --- a/framework/include/utils/GriddedData.h +++ b/framework/include/utils/GriddedData.h @@ -13,8 +13,6 @@ #include "MooseError.h" #include "MooseUtils.h" -// using namespace libMesh; - #include #include #include diff --git a/framework/include/utils/ImageSampler.h b/framework/include/utils/ImageSampler.h index 91b4bf07bc64..9939ac5065f0 100644 --- a/framework/include/utils/ImageSampler.h +++ b/framework/include/utils/ImageSampler.h @@ -63,7 +63,7 @@ class ImageSampler : public FileRangeBuilder * Return the pixel value for the given point * @param p The point at which to extract pixel data */ - virtual Real sample(const Point & p) const; + virtual libMesh::Real sample(const libMesh::Point & p) const; /** * Perform initialization of image data @@ -114,13 +114,13 @@ class ImageSampler : public FileRangeBuilder #endif /// Origin of image - Point _origin; + libMesh::Point _origin; /// Pixel dimension of image std::vector _dims; /// Physical dimensions of image - Point _physical_dims; + libMesh::Point _physical_dims; /// Physical pixel size std::vector _voxel; @@ -131,7 +131,7 @@ class ImageSampler : public FileRangeBuilder #endif /// Bounding box for testing points - BoundingBox _bounding_box; + libMesh::BoundingBox _bounding_box; /// Parameters for interface const InputParameters & _is_pars; diff --git a/framework/include/utils/InputParameters.h b/framework/include/utils/InputParameters.h index 69e04df6fcdc..ded54ab9c1cd 100644 --- a/framework/include/utils/InputParameters.h +++ b/framework/include/utils/InputParameters.h @@ -60,7 +60,7 @@ class Builder; * The main MOOSE class responsible for handling user-defined * parameters in almost every MOOSE system. */ -class InputParameters : public Parameters +class InputParameters : public libMesh::Parameters { public: InputParameters(const InputParameters & rhs); @@ -1750,7 +1750,7 @@ InputParameters::checkConsistentType(const std::string & name_in) const mooseError("Attempting to set parameter \"", name, "\" with type (", - demangle(typeid(T).name()), + libMesh::demangle(typeid(T).name()), ")\nbut the parameter already exists as type (", it->second->type(), ")"); @@ -2099,7 +2099,7 @@ InputParameters::transferParam(const InputParameters & source_params, else { std::vector coupled_values; - for (const auto i : make_range(source_params.numberDefaultCoupledValues(name))) + for (const auto i : libMesh::make_range(source_params.numberDefaultCoupledValues(name))) coupled_values.push_back(source_params.defaultCoupledValue(name, i)); addCoupledVar(p_name, coupled_values, description); } diff --git a/framework/include/utils/LeastSquaresFitBase.h b/framework/include/utils/LeastSquaresFitBase.h index fac10fef4e0d..07f1d67ce765 100644 --- a/framework/include/utils/LeastSquaresFitBase.h +++ b/framework/include/utils/LeastSquaresFitBase.h @@ -14,6 +14,8 @@ #include "Moose.h" +using libMesh::Real; + /** * Base class for linear least squares fit method. Derived classes must implement * the fillMatrix() and sample() methods with the functional form of the fit. diff --git a/framework/include/utils/LineSegment.h b/framework/include/utils/LineSegment.h index 01283bf62666..66c4e06e3129 100644 --- a/framework/include/utils/LineSegment.h +++ b/framework/include/utils/LineSegment.h @@ -10,7 +10,6 @@ #pragma once // MOOSE includes -#include "Moose.h" // using namespace libMesh #include "DataIO.h" #include "json.h" @@ -53,7 +52,7 @@ class LineSegment */ bool contains_point(const Point & p) const; - bool intersect(const Plane & pl, Point & intersect_p) const; + bool intersect(const libMesh::Plane & pl, Point & intersect_p) const; bool intersect(const LineSegment & l1, Point & intersect_p) const; diff --git a/framework/include/utils/MathFVUtils.h b/framework/include/utils/MathFVUtils.h index 7ac85fbd5ca0..33536a62b338 100644 --- a/framework/include/utils/MathFVUtils.h +++ b/framework/include/utils/MathFVUtils.h @@ -22,6 +22,8 @@ template class MooseVariableFV; class FaceArgInterface; +using libMesh::VectorValue; + namespace Moose { namespace FV @@ -471,7 +473,7 @@ std::pair interpCoeffs(const Limiter & limiter, const T & phi_upwind, const T & phi_downwind, - const VectorValue * const grad_phi_upwind, + const libMesh::VectorValue * const grad_phi_upwind, const FaceInfo & fi, const bool fi_elem_is_upwind) { @@ -491,7 +493,7 @@ interpCoeffs(const Limiter & limiter, */ template ::value>::type> + typename Enable = typename std::enable_if::value>::type> Scalar interpolate(const Limiter & limiter, const Scalar & phi_upwind, @@ -508,7 +510,7 @@ interpolate(const Limiter & limiter, * Vector overload */ template -VectorValue +libMesh::VectorValue interpolate(const Limiter & limiter, const TypeVector & phi_upwind, const TypeVector & phi_downwind, @@ -519,13 +521,13 @@ interpolate(const Limiter & limiter, mooseAssert(limiter.constant() || grad_phi_upwind, "Non-null gradient only supported for constant limiters."); - const VectorValue * const gradient_example = nullptr; - VectorValue ret; + const libMesh::VectorValue * const gradient_example = nullptr; + libMesh::VectorValue ret; for (const auto i : make_range(unsigned(LIBMESH_DIM))) { if (grad_phi_upwind) { - const VectorValue gradient = grad_phi_upwind->row(i); + const libMesh::VectorValue gradient = grad_phi_upwind->row(i); ret(i) = interpolate(limiter, phi_upwind(i), phi_downwind(i), &gradient, fi, fi_elem_is_upwind); } @@ -546,7 +548,7 @@ interpolate(const Limiter & limiter, */ template ::value>::type> + typename Enable = typename std::enable_if::value>::type> std::pair, std::pair> interpCoeffsAndAdvected(const FunctorBase & functor, const FaceArg & face, const StateArg & time) { @@ -588,7 +590,7 @@ interpCoeffsAndAdvected(const FunctorBase & functor, const FaceArg & face, co template ::value>::type> + typename Enable = typename std::enable_if::value>::type> T interpolate(const FunctorBase & functor, const FaceArg & face, const StateArg & time) { @@ -605,12 +607,12 @@ interpolate(const FunctorBase & functor, const FaceArg & face, const StateArg } template -VectorValue -interpolate(const FunctorBase> & functor, +libMesh::VectorValue +interpolate(const FunctorBase> & functor, const FaceArg & face, const StateArg & time) { - static const VectorValue grad_zero(0); + static const libMesh::VectorValue grad_zero(0); mooseAssert(face.fi, "this must be non-null"); const auto limiter = Limiter::value_type>::build(face.limiter_type); @@ -620,7 +622,7 @@ interpolate(const FunctorBase> & functor, auto phi_upwind = functor(upwind_arg, time); auto phi_downwind = functor(downwind_arg, time); - VectorValue ret; + libMesh::VectorValue ret; T coeff_upwind, coeff_downwind; if (face.limiter_type == LimiterType::Upwind || @@ -644,7 +646,7 @@ interpolate(const FunctorBase> & functor, for (unsigned int i = 0; i < LIBMESH_DIM; ++i) { const auto &component_upwind = phi_upwind(i), component_downwind = phi_downwind(i); - const VectorValue grad = grad_phi_upwind.row(i); + const libMesh::VectorValue grad = grad_phi_upwind.row(i); std::tie(coeff_upwind, coeff_downwind) = interpCoeffs( *limiter, component_upwind, component_downwind, &grad, *face.fi, face.elem_is_upwind); ret(i) = coeff_upwind * component_upwind + coeff_downwind * component_downwind; diff --git a/framework/include/utils/MathUtils.h b/framework/include/utils/MathUtils.h index 3ea425304721..8355c13a326e 100644 --- a/framework/include/utils/MathUtils.h +++ b/framework/include/utils/MathUtils.h @@ -159,12 +159,13 @@ negativePart(T x) return x < 0.0 ? x : 0.0; } -template ::value && ScalarTraits::value && - ScalarTraits::value, - int>::type = 0> +template < + typename T, + typename T2, + typename T3, + typename std::enable_if::value && libMesh::ScalarTraits::value && + libMesh::ScalarTraits::value, + int>::type = 0> void addScaled(const T & a, const T2 & b, T3 & result) { @@ -174,9 +175,11 @@ addScaled(const T & a, const T2 & b, T3 & result) template ::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> void -addScaled(const T & scalar, const NumericVector & numeric_vector, NumericVector & result) +addScaled(const T & scalar, + const libMesh::NumericVector & numeric_vector, + libMesh::NumericVector & result) { result.add(scalar, numeric_vector); } @@ -328,8 +331,8 @@ smootherStep(T x, T2 start, T2 end, bool derivative = false) } x = (x - start) / (end - start); if (derivative) - return 30.0 * Utility::pow<2>(x) * (x * (x - 2.0) + 1.0) / (end - start); - return Utility::pow<3>(x) * (x * (x * 6.0 - 15.0) + 10.0); + return 30.0 * libMesh::Utility::pow<2>(x) * (x * (x - 2.0) + 1.0) / (end - start); + return libMesh::Utility::pow<3>(x) * (x * (x * 6.0 - 15.0) + 10.0); } enum class ComputeType @@ -354,9 +357,9 @@ smootherStep(const X & x, const S & start, const E & end) } const auto u = (x - start) / (end - start); if constexpr (compute_type == ComputeType::derivative) - return 30.0 * Utility::pow<2>(u) * (u * (u - 2.0) + 1.0) / (end - start); + return 30.0 * libMesh::Utility::pow<2>(u) * (u * (u - 2.0) + 1.0) / (end - start); if constexpr (compute_type == ComputeType::value) - return Utility::pow<3>(u) * (u * (u * 6.0 - 15.0) + 10.0); + return libMesh::Utility::pow<3>(u) * (u * (u * 6.0 - 15.0) + 10.0); } /** diff --git a/framework/include/utils/MeshBaseImageSampler.h b/framework/include/utils/MeshBaseImageSampler.h index 8032c13e2734..a726f1bb8ded 100644 --- a/framework/include/utils/MeshBaseImageSampler.h +++ b/framework/include/utils/MeshBaseImageSampler.h @@ -61,12 +61,12 @@ class MeshBaseImageSampler : public FileRangeBuilder * Return the pixel value for the given point * @param p The point at which to extract pixel data */ - virtual Real sample(const Point & p); + virtual libMesh::Real sample(const libMesh::Point & p); /** * Perform initialization of image data */ - virtual void setupImageSampler(MeshBase & mesh); + virtual void setupImageSampler(libMesh::MeshBase & mesh); protected: /** @@ -131,13 +131,13 @@ class MeshBaseImageSampler : public FileRangeBuilder #endif /// Origin of image - Point _origin; + libMesh::Point _origin; /// Pixel dimension of image std::vector _dims; /// Physical dimensions of image - Point _physical_dims; + libMesh::Point _physical_dims; /// Physical pixel size std::vector _voxel; @@ -148,7 +148,7 @@ class MeshBaseImageSampler : public FileRangeBuilder #endif /// Bounding box for testing points - BoundingBox _bounding_box; + libMesh::BoundingBox _bounding_box; /// Parameters for interface const InputParameters & _is_pars; diff --git a/framework/include/utils/MooseLagrangeHelpers.h b/framework/include/utils/MooseLagrangeHelpers.h index 974a8778f721..2185d4f647ca 100644 --- a/framework/include/utils/MooseLagrangeHelpers.h +++ b/framework/include/utils/MooseLagrangeHelpers.h @@ -24,7 +24,7 @@ fe_lagrange_1D_shape(const Order order, const unsigned int i, const T & xi) switch (order) { // Lagrange linears - case FIRST: + case libMesh::FIRST: { libmesh_assert_less(i, 2); @@ -42,7 +42,7 @@ fe_lagrange_1D_shape(const Order order, const unsigned int i, const T & xi) } // Lagrange quadratics - case SECOND: + case libMesh::SECOND: { libmesh_assert_less(i, 3); @@ -63,7 +63,7 @@ fe_lagrange_1D_shape(const Order order, const unsigned int i, const T & xi) } // Lagrange cubics - case THIRD: + case libMesh::THIRD: { libmesh_assert_less(i, 4); @@ -98,7 +98,7 @@ fe_lagrange_1D_shape_deriv(const Order order, const unsigned int i, const T & xi switch (order) { // Lagrange linear shape function derivatives - case FIRST: + case libMesh::FIRST: { libmesh_assert_less(i, 2); @@ -116,7 +116,7 @@ fe_lagrange_1D_shape_deriv(const Order order, const unsigned int i, const T & xi } // Lagrange quadratic shape function derivatives - case SECOND: + case libMesh::SECOND: { libmesh_assert_less(i, 3); @@ -137,7 +137,7 @@ fe_lagrange_1D_shape_deriv(const Order order, const unsigned int i, const T & xi } // Lagrange cubic shape function derivatives - case THIRD: + case libMesh::THIRD: { libmesh_assert_less(i, 4); @@ -168,7 +168,7 @@ fe_lagrange_1D_shape_deriv(const Order order, const unsigned int i, const T & xi // Copy of libMesh function but templated to enable calling with DualNumber vectors template class VectorType> T -fe_lagrange_2D_shape(const ElemType type, +fe_lagrange_2D_shape(const libMesh::ElemType type, const Order order, const unsigned int i, const VectorType & p) @@ -176,15 +176,15 @@ fe_lagrange_2D_shape(const ElemType type, switch (order) { // linear Lagrange shape functions - case FIRST: + case libMesh::FIRST: { switch (type) { - case QUAD4: - case QUADSHELL4: - case QUAD8: - case QUADSHELL8: - case QUAD9: + case libMesh::QUAD4: + case libMesh::QUADSHELL4: + case libMesh::QUAD8: + case libMesh::QUADSHELL8: + case libMesh::QUAD9: { // Compute quad shape functions as a tensor-product const T xi = p(0); @@ -199,10 +199,10 @@ fe_lagrange_2D_shape(const ElemType type, return (fe_lagrange_1D_shape(FIRST, i0[i], xi) * fe_lagrange_1D_shape(FIRST, i1[i], eta)); } - case TRI3: - case TRISHELL3: - case TRI6: - case TRI7: + case libMesh::TRI3: + case libMesh::TRISHELL3: + case libMesh::TRI6: + case libMesh::TRI7: { const T zeta1 = p(0); const T zeta2 = p(1); @@ -232,11 +232,11 @@ fe_lagrange_2D_shape(const ElemType type, } // quadratic Lagrange shape functions - case SECOND: + case libMesh::SECOND: { switch (type) { - case QUAD8: + case libMesh::QUAD8: { // Compute quad shape functions as a tensor-product const T xi = p(0); @@ -266,7 +266,7 @@ fe_lagrange_2D_shape(const ElemType type, mooseError("Invalid shape function index i = ", i); } } - case QUAD9: + case libMesh::QUAD9: { // Compute quad shape functions as a tensor-product const T xi = p(0); @@ -278,11 +278,11 @@ fe_lagrange_2D_shape(const ElemType type, static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2}; static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2}; - return (fe_lagrange_1D_shape(SECOND, i0[i], xi) * - fe_lagrange_1D_shape(SECOND, i1[i], eta)); + return (fe_lagrange_1D_shape(libMesh::SECOND, i0[i], xi) * + fe_lagrange_1D_shape(libMesh::SECOND, i1[i], eta)); } - case TRI6: - case TRI7: + case libMesh::TRI6: + case libMesh::TRI7: { const T zeta1 = p(0); const T zeta2 = p(1); @@ -321,11 +321,11 @@ fe_lagrange_2D_shape(const ElemType type, } // "cubic" (one cubic bubble) Lagrange shape functions - case THIRD: + case libMesh::THIRD: { switch (type) { - case TRI7: + case libMesh::TRI7: { const T zeta1 = p(0); const T zeta2 = p(1); @@ -375,7 +375,7 @@ fe_lagrange_2D_shape(const ElemType type, template class VectorType> T -fe_lagrange_2D_shape_deriv(const ElemType type, +fe_lagrange_2D_shape_deriv(const libMesh::ElemType type, const Order order, const unsigned int i, const unsigned int j, @@ -386,15 +386,15 @@ fe_lagrange_2D_shape_deriv(const ElemType type, switch (order) { // linear Lagrange shape functions - case FIRST: + case libMesh::FIRST: { switch (type) { - case QUAD4: - case QUADSHELL4: - case QUAD8: - case QUADSHELL8: - case QUAD9: + case libMesh::QUAD4: + case libMesh::QUADSHELL4: + case libMesh::QUAD8: + case libMesh::QUADSHELL8: + case libMesh::QUAD9: { // Compute quad shape functions as a tensor-product const T xi = p(0); @@ -423,10 +423,10 @@ fe_lagrange_2D_shape_deriv(const ElemType type, } } - case TRI3: - case TRISHELL3: - case TRI6: - case TRI7: + case libMesh::TRI3: + case libMesh::TRISHELL3: + case libMesh::TRI6: + case libMesh::TRI7: { libmesh_assert_less(i, 3); @@ -487,12 +487,12 @@ fe_lagrange_2D_shape_deriv(const ElemType type, } // quadratic Lagrange shape functions - case SECOND: + case libMesh::SECOND: { switch (type) { - case QUAD8: - case QUADSHELL8: + case libMesh::QUAD8: + case libMesh::QUADSHELL8: { const T xi = p(0); const T eta = p(1); @@ -570,7 +570,7 @@ fe_lagrange_2D_shape_deriv(const ElemType type, } } - case QUAD9: + case libMesh::QUAD9: { // Compute quad shape functions as a tensor-product const T xi = p(0); @@ -586,21 +586,21 @@ fe_lagrange_2D_shape_deriv(const ElemType type, { // d()/dxi case 0: - return (fe_lagrange_1D_shape_deriv(SECOND, i0[i], xi) * - fe_lagrange_1D_shape(SECOND, i1[i], eta)); + return (fe_lagrange_1D_shape_deriv(libMesh::SECOND, i0[i], xi) * + fe_lagrange_1D_shape(libMesh::SECOND, i1[i], eta)); // d()/deta case 1: - return (fe_lagrange_1D_shape(SECOND, i0[i], xi) * - fe_lagrange_1D_shape_deriv(SECOND, i1[i], eta)); + return (fe_lagrange_1D_shape(libMesh::SECOND, i0[i], xi) * + fe_lagrange_1D_shape_deriv(libMesh::SECOND, i1[i], eta)); default: mooseError("Invalid derivative index j = ", j); } } - case TRI6: - case TRI7: + case libMesh::TRI6: + case libMesh::TRI7: { libmesh_assert_less(i, 6); @@ -682,11 +682,11 @@ fe_lagrange_2D_shape_deriv(const ElemType type, } // "cubic" (one cubic bubble) Lagrange shape functions - case THIRD: + case libMesh::THIRD: { switch (type) { - case TRI7: + case libMesh::TRI7: { libmesh_assert_less(i, 7); diff --git a/framework/include/utils/MooseMeshElementConversionUtils.h b/framework/include/utils/MooseMeshElementConversionUtils.h index fad0dbbc8b12..c3e1aa6f7d46 100644 --- a/framework/include/utils/MooseMeshElementConversionUtils.h +++ b/framework/include/utils/MooseMeshElementConversionUtils.h @@ -13,6 +13,8 @@ #include "MooseTypes.h" +using libMesh::ReplicatedMesh; + namespace MooseMeshElementConversionUtils { // Define for comparing the key value of BCTuple diff --git a/framework/include/utils/MooseMeshXYCuttingUtils.h b/framework/include/utils/MooseMeshXYCuttingUtils.h index 20cfa2493f41..d4bad26e6c6a 100644 --- a/framework/include/utils/MooseMeshXYCuttingUtils.h +++ b/framework/include/utils/MooseMeshXYCuttingUtils.h @@ -36,7 +36,7 @@ namespace MooseMeshXYCuttingUtils * @param side_to_remove which side of the mesh needs to be removed: true means ax+by+c>0 and * false means ax+by+c<0 */ -void lineRemoverMoveNode(ReplicatedMesh & mesh, +void lineRemoverMoveNode(libMesh::ReplicatedMesh & mesh, const std::vector & bdry_pars, const subdomain_id_type block_id_to_remove, const std::set & subdomain_ids_set, @@ -109,7 +109,7 @@ Point twoPointandLineIntersection(const Point & pt1, * @return whether any elements have been fixed */ bool -quasiTriElementsFixer(ReplicatedMesh & mesh, +quasiTriElementsFixer(libMesh::ReplicatedMesh & mesh, const std::set & subdomain_ids_set, const subdomain_id_type tri_elem_subdomain_shift = Moose::INVALID_BLOCK_ID, const SubdomainName tri_elem_subdomain_name_suffix = "tri"); @@ -141,7 +141,7 @@ std::vector> vertex_distances(const Elem & elem); * @param new_boundary_id boundary id of the new boundary that divides the single element side and * the double element side */ -void triElemSplitter(ReplicatedMesh & mesh, +void triElemSplitter(libMesh::ReplicatedMesh & mesh, const dof_id_type elem_id, const unsigned short node_shift, const dof_id_type nid_3, @@ -161,7 +161,7 @@ void triElemSplitter(ReplicatedMesh & mesh, * @param second_elem_side_id subdomain id of the second element side * @param new_boundary_id boundary id of the new boundary that divides the two elements */ -void triElemSplitter(ReplicatedMesh & mesh, +void triElemSplitter(libMesh::ReplicatedMesh & mesh, const dof_id_type elem_id, const unsigned short node_shift, const dof_id_type nid_m, @@ -175,7 +175,7 @@ void triElemSplitter(ReplicatedMesh & mesh, * @param elem_id id of the QUAD4 element that needs to be split * @param tri_elem_subdomain_shift subdomain id shift used to define the TRI element subdomains */ -void quadElemSplitter(ReplicatedMesh & mesh, +void quadElemSplitter(libMesh::ReplicatedMesh & mesh, const dof_id_type elem_id, const subdomain_id_type tri_elem_subdomain_shift); @@ -188,7 +188,7 @@ void quadElemSplitter(ReplicatedMesh & mesh, * @param tri_elem_subdomain_name_suffix suffix used to name the TRI element subdomains generated * due to the conversion */ -void quadToTriOnLine(ReplicatedMesh & mesh, +void quadToTriOnLine(libMesh::ReplicatedMesh & mesh, const std::vector & cut_line_params, const dof_id_type tri_subdomain_id_shift, const SubdomainName tri_elem_subdomain_name_suffix); @@ -202,7 +202,7 @@ void quadToTriOnLine(ReplicatedMesh & mesh, * removed * @param new_boundary_id boundary id of the new boundary that forms due to the trimming */ -void lineRemoverCutElemTri(ReplicatedMesh & mesh, +void lineRemoverCutElemTri(libMesh::ReplicatedMesh & mesh, const std::vector & cut_line_params, const subdomain_id_type block_id_to_remove, const boundary_id_type new_boundary_id); @@ -222,7 +222,7 @@ void lineRemoverCutElemTri(ReplicatedMesh & mesh, * @param improve_boundary_tri_elems flag to indicate whether the boundary TRI3 elements need to be * improved */ -void lineRemoverCutElem(ReplicatedMesh & mesh, +void lineRemoverCutElem(libMesh::ReplicatedMesh & mesh, const std::vector & cut_line_params, const dof_id_type tri_subdomain_id_shift, const SubdomainName tri_elem_subdomain_name_suffix, @@ -235,7 +235,8 @@ void lineRemoverCutElem(ReplicatedMesh & mesh, * @param mesh input mesh with the boundary TRI3 elements that need to be improved * @param boundary_to_improve boundary id of the boundary that needs to be improved */ -void boundaryTriElemImprover(ReplicatedMesh & mesh, const boundary_id_type boundary_to_improve); +void boundaryTriElemImprover(libMesh::ReplicatedMesh & mesh, + const boundary_id_type boundary_to_improve); /** * Make a TRI3 element with the given node ids and subdomain id with boundary information @@ -250,7 +251,7 @@ void boundaryTriElemImprover(ReplicatedMesh & mesh, const boundary_id_type bound * @param boundary_ids_for_side_2 boundary ids of the third side of the TRI3 element */ void makeImprovedTriElement( - ReplicatedMesh & mesh, + libMesh::ReplicatedMesh & mesh, const dof_id_type node_id_0, const dof_id_type node_id_1, const dof_id_type node_id_2, @@ -272,7 +273,7 @@ void makeImprovedTriElement( * @param is_inverse flag to indicate if the two nodes are in the same direction as the side * @return true if the element contains the side with the given pair of nodes */ -bool elemSideLocator(ReplicatedMesh & mesh, +bool elemSideLocator(libMesh::ReplicatedMesh & mesh, const dof_id_type elem_id, const dof_id_type node_id_0, const dof_id_type node_id_1, diff --git a/framework/include/utils/MooseTypes.h b/framework/include/utils/MooseTypes.h index a5e91e45d924..c79ab293e98f 100644 --- a/framework/include/utils/MooseTypes.h +++ b/framework/include/utils/MooseTypes.h @@ -9,6 +9,8 @@ #pragma once +#include "libMeshReducedNamespace.h" + #include "Moose.h" #include "ADReal.h" #include "EigenADReal.h" @@ -27,6 +29,7 @@ #include "libmesh/boundary_info.h" #include "libmesh/parameters.h" #include "libmesh/dense_vector.h" +#include "libmesh/dense_matrix.h" #include "libmesh/int_range.h" // BOOST include @@ -132,28 +135,13 @@ class InputParameters; namespace libMesh { -template -class VectorValue; typedef VectorValue RealVectorValue; typedef Eigen::Matrix RealDIMValue; typedef Eigen::Matrix RealEigenVector; typedef Eigen::Matrix RealVectorArrayValue; typedef Eigen::Matrix RealTensorArrayValue; typedef Eigen::Matrix RealEigenMatrix; -template -class TypeVector; -template -class TensorValue; typedef TensorValue RealTensorValue; -template -class TypeTensor; -template -class TypeNTensor; -class Point; -template -class DenseMatrix; -template -class DenseVector; namespace TensorTools { @@ -177,6 +165,22 @@ struct DecrementRank> } } +// Common types defined in libMesh +using libMesh::Gradient; +using libMesh::RealGradient; + +// Bring these common types added to the libMesh namespace in this header +// to global namespace +using libMesh::DenseMatrix; +using libMesh::DenseVector; +using libMesh::RealDIMValue; +using libMesh::RealEigenMatrix; +using libMesh::RealEigenVector; +using libMesh::RealTensorArrayValue; +using libMesh::RealTensorValue; +using libMesh::RealVectorArrayValue; +using libMesh::RealVectorValue; + namespace MetaPhysicL { template @@ -203,8 +207,9 @@ typedef unsigned int PerfID; typedef unsigned int InvalidSolutionID; using RestartableDataMapName = std::string; // see MooseApp.h -typedef StoredRange::iterator, dof_id_type> NodeIdRange; -typedef StoredRange::iterator, const Elem *> ConstElemPointerRange; +typedef libMesh::StoredRange::iterator, dof_id_type> NodeIdRange; +typedef libMesh::StoredRange::iterator, const Elem *> + ConstElemPointerRange; namespace Moose { @@ -266,9 +271,9 @@ struct DOFType template struct OutputTools { - typedef typename TensorTools::IncrementRank::type OutputGradient; - typedef typename TensorTools::IncrementRank::type OutputSecond; - typedef typename TensorTools::DecrementRank::type OutputDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputDivergence; typedef MooseArray VariableValue; typedef MooseArray VariableGradient; @@ -277,9 +282,9 @@ struct OutputTools typedef MooseArray VariableDivergence; typedef typename Moose::ShapeType::type OutputShape; - typedef typename TensorTools::IncrementRank::type OutputShapeGradient; - typedef typename TensorTools::IncrementRank::type OutputShapeSecond; - typedef typename TensorTools::DecrementRank::type OutputShapeDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputShapeGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputShapeSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputShapeDivergence; typedef MooseArray> VariablePhiValue; typedef MooseArray> VariablePhiGradient; diff --git a/framework/include/utils/MooseUtils.h b/framework/include/utils/MooseUtils.h index 7ffbecd99455..2f983539b5e1 100644 --- a/framework/include/utils/MooseUtils.h +++ b/framework/include/utils/MooseUtils.h @@ -329,7 +329,7 @@ template std::string prettyCppType(const T * = nullptr) { - return prettyCppType(demangle(typeid(T).name())); + return prettyCppType(libMesh::demangle(typeid(T).name())); } /** @@ -353,12 +353,13 @@ doesMapContainValue(const std::map & the_map, const T2 & value) * @param tol The tolerance to be used * @return true if var1 and var2 are equal within tol */ -template ::value && ScalarTraits::value && - ScalarTraits::value, - int>::type = 0> +template < + typename T, + typename T2, + typename T3 = T, + typename std::enable_if::value && libMesh::ScalarTraits::value && + libMesh::ScalarTraits::value, + int>::type = 0> bool absoluteFuzzyEqual(const T & var1, const T2 & var2, @@ -376,12 +377,13 @@ absoluteFuzzyEqual(const T & var1, * @param tol The tolerance to be used * @return true if var1 > var2 or var1 == var2 within tol */ -template ::value && ScalarTraits::value && - ScalarTraits::value, - int>::type = 0> +template < + typename T, + typename T2, + typename T3 = T, + typename std::enable_if::value && libMesh::ScalarTraits::value && + libMesh::ScalarTraits::value, + int>::type = 0> bool absoluteFuzzyGreaterEqual(const T & var1, const T2 & var2, @@ -399,12 +401,13 @@ absoluteFuzzyGreaterEqual(const T & var1, * @param tol The tolerance to be used * @return true if var1 > var2 and var1 != var2 within tol */ -template ::value && ScalarTraits::value && - ScalarTraits::value, - int>::type = 0> +template < + typename T, + typename T2, + typename T3 = T, + typename std::enable_if::value && libMesh::ScalarTraits::value && + libMesh::ScalarTraits::value, + int>::type = 0> bool absoluteFuzzyGreaterThan(const T & var1, const T2 & var2, @@ -422,12 +425,13 @@ absoluteFuzzyGreaterThan(const T & var1, * @param tol The tolerance to be used * @return true if var1 < var2 or var1 == var2 within tol */ -template ::value && ScalarTraits::value && - ScalarTraits::value, - int>::type = 0> +template < + typename T, + typename T2, + typename T3 = T, + typename std::enable_if::value && libMesh::ScalarTraits::value && + libMesh::ScalarTraits::value, + int>::type = 0> bool absoluteFuzzyLessEqual(const T & var1, const T2 & var2, @@ -444,12 +448,13 @@ absoluteFuzzyLessEqual(const T & var1, * @param tol The tolerance to be used * @return true if var1 < var2 and var1 != var2 within tol */ -template ::value && ScalarTraits::value && - ScalarTraits::value, - int>::type = 0> +template < + typename T, + typename T2, + typename T3 = T, + typename std::enable_if::value && libMesh::ScalarTraits::value && + libMesh::ScalarTraits::value, + int>::type = 0> bool absoluteFuzzyLessThan(const T & var1, const T2 & var2, @@ -521,12 +526,13 @@ relativeFuzzyEqual(const T & var1, * @param tol The tolerance to be used * @return true if var1 > var2 or var1 == var2 within relative tol */ -template ::value && ScalarTraits::value && - ScalarTraits::value, - int>::type = 0> +template < + typename T, + typename T2, + typename T3 = T, + typename std::enable_if::value && libMesh::ScalarTraits::value && + libMesh::ScalarTraits::value, + int>::type = 0> bool relativeFuzzyGreaterEqual(const T & var1, const T2 & var2, @@ -545,12 +551,13 @@ relativeFuzzyGreaterEqual(const T & var1, * @param tol The tolerance to be used * @return true if var1 > var2 and var1 != var2 within relative tol */ -template ::value && ScalarTraits::value && - ScalarTraits::value, - int>::type = 0> +template < + typename T, + typename T2, + typename T3 = T, + typename std::enable_if::value && libMesh::ScalarTraits::value && + libMesh::ScalarTraits::value, + int>::type = 0> bool relativeFuzzyGreaterThan(const T & var1, const T2 & var2, @@ -570,12 +577,13 @@ relativeFuzzyGreaterThan(const T & var1, * @param tol The tolerance to be used * @return true if var1 < var2 or var1 == var2 within relative tol */ -template ::value && ScalarTraits::value && - ScalarTraits::value, - int>::type = 0> +template < + typename T, + typename T2, + typename T3 = T, + typename std::enable_if::value && libMesh::ScalarTraits::value && + libMesh::ScalarTraits::value, + int>::type = 0> bool relativeFuzzyLessEqual(const T & var1, const T2 & var2, @@ -594,12 +602,13 @@ relativeFuzzyLessEqual(const T & var1, * @param tol The tolerance to be used * @return true if var1 < var2 and var1 != var2 within relative tol */ -template ::value && ScalarTraits::value && - ScalarTraits::value, - int>::type = 0> +template < + typename T, + typename T2, + typename T3 = T, + typename std::enable_if::value && libMesh::ScalarTraits::value && + libMesh::ScalarTraits::value, + int>::type = 0> bool relativeFuzzyLessThan(const T & var1, const T2 & var2, @@ -851,8 +860,8 @@ convert(const std::string & str, bool throw_on_failure = false) T val; if ((ss >> val).fail() || !ss.eof()) { - std::string msg = - std::string("Unable to convert '") + str + "' to type " + demangle(typeid(T).name()); + std::string msg = std::string("Unable to convert '") + str + "' to type " + + libMesh::demangle(typeid(T).name()); if (throw_on_failure) throw std::invalid_argument(msg); @@ -1092,7 +1101,7 @@ findPair(C & container, const M1 & first, const M2 & second) * @param p2 Second corner of the constructed bounding box * @return Valid bounding box */ -BoundingBox buildBoundingBox(const Point & p1, const Point & p2); +libMesh::BoundingBox buildBoundingBox(const Point & p1, const Point & p2); /** * Utility class template for a semidynamic vector with a maximum size N diff --git a/framework/include/utils/ParallelUniqueId.h b/framework/include/utils/ParallelUniqueId.h index a911b55d5697..c048d6f159ee 100644 --- a/framework/include/utils/ParallelUniqueId.h +++ b/framework/include/utils/ParallelUniqueId.h @@ -24,8 +24,6 @@ #include "MooseException.h" #endif -using namespace libMesh; - class ParallelUniqueId { public: diff --git a/framework/include/utils/PerfGraph.h b/framework/include/utils/PerfGraph.h index 9755626eaa93..05879ca54698 100644 --- a/framework/include/utils/PerfGraph.h +++ b/framework/include/utils/PerfGraph.h @@ -337,7 +337,7 @@ class PerfGraph : protected ConsoleStreamInterface PerfGraphRegistry & _perf_graph_registry; /// This processor id - const processor_id_type _pid; + const libMesh::processor_id_type _pid; /// Name of the root node const std::string _root_name; diff --git a/framework/include/utils/PetscSupport.h b/framework/include/utils/PetscSupport.h index 968c5ad26004..88ce92c41c4e 100644 --- a/framework/include/utils/PetscSupport.h +++ b/framework/include/utils/PetscSupport.h @@ -67,9 +67,10 @@ void petscSetKSPDefaults(FEProblemBase & problem, KSP ksp); */ template void -setLinearSolverDefaults(FEProblemBase & problem, LinearSolver & linear_solver) +setLinearSolverDefaults(FEProblemBase & problem, libMesh::LinearSolver & linear_solver) { - petscSetKSPDefaults(problem, libMesh::cast_ref &>(linear_solver).ksp()); + petscSetKSPDefaults(problem, + libMesh::cast_ref &>(linear_solver).ksp()); } /** diff --git a/framework/include/utils/PetscVectorReader.h b/framework/include/utils/PetscVectorReader.h index 0ab35ed64966..708dc0852e6e 100644 --- a/framework/include/utils/PetscVectorReader.h +++ b/framework/include/utils/PetscVectorReader.h @@ -16,6 +16,7 @@ using libMesh::Number; using libMesh::numeric_index_type; +using libMesh::NumericVector; using libMesh::PetscVector; /** diff --git a/framework/include/utils/PointReduction.h b/framework/include/utils/PointReduction.h index 2798f8a64259..fadba1d989de 100644 --- a/framework/include/utils/PointReduction.h +++ b/framework/include/utils/PointReduction.h @@ -15,7 +15,7 @@ namespace PointReduction { -typedef std::pair FunctionNode; +typedef std::pair FunctionNode; typedef std::vector FunctionNodeList; /** @@ -26,9 +26,9 @@ typedef std::vector FunctionNodeList; * @param begin The first (x,y) point defining the line to compute the distance to * @param end The second (x,y) point defining the line to compute the distance to */ -Real perpendicularDistance(const FunctionNode & point, - const FunctionNode & begin, - const FunctionNode & end); +libMesh::Real perpendicularDistance(const FunctionNode & point, + const FunctionNode & begin, + const FunctionNode & end); /** * Generate a pruned function node list using the Ramer-Douglas-Peucker algorithm. @@ -36,6 +36,6 @@ Real perpendicularDistance(const FunctionNode & point, * @param list An ordered (by x) list of (x,y) points defining a pointwise defined function. * @param epsilon The Ramer-Douglas-Peucker tolerance parameter for coarsening. */ -FunctionNodeList douglasPeucker(const FunctionNodeList &, Real epsilon); +FunctionNodeList douglasPeucker(const FunctionNodeList &, libMesh::Real epsilon); } // namespace PointReduction diff --git a/framework/include/utils/PolynomialFit.h b/framework/include/utils/PolynomialFit.h index 4d3c3952c6c3..5d4ba1a6dad6 100644 --- a/framework/include/utils/PolynomialFit.h +++ b/framework/include/utils/PolynomialFit.h @@ -11,6 +11,8 @@ #include "LeastSquaresFitBase.h" +using libMesh::Real; + /** * Least squares polynomial fit * diff --git a/framework/include/utils/RankFourTensor.h b/framework/include/utils/RankFourTensor.h index 2a8733d7c7f1..c1cd1c839ab4 100644 --- a/framework/include/utils/RankFourTensor.h +++ b/framework/include/utils/RankFourTensor.h @@ -26,7 +26,6 @@ #include #include -using libMesh::Real; using libMesh::tuple_of; namespace libMesh { @@ -113,17 +112,17 @@ class RankFourTensorTempl template struct TwoTensorMultTraits { - static const bool value = ScalarTraits::value; + static const bool value = libMesh::ScalarTraits::value; }; template struct TwoTensorMultTraits { - static const bool value = ScalarTraits::value; + static const bool value = libMesh::ScalarTraits::value; }; template struct TwoTensorMultTraits { - static const bool value = ScalarTraits::value; + static const bool value = libMesh::ScalarTraits::value; }; /// Default constructor; fills to zero @@ -186,7 +185,8 @@ class RankFourTensorTempl * \returns A reference to *this. */ template - typename boostcopy::enable_if_c::value, RankFourTensorTempl &>::type + typename libMesh::boostcopy::enable_if_c::value, + RankFourTensorTempl &>::type operator=(const Scalar & libmesh_dbg_var(p)) { libmesh_assert_equal_to(p, Scalar(0)); @@ -203,7 +203,7 @@ class RankFourTensorTempl /// C_ijkl*a template auto operator*(const T2 & a) const -> - typename std::enable_if::value, + typename std::enable_if::value, RankFourTensorTempl>::type; /// C_ijkl *= a @@ -212,7 +212,7 @@ class RankFourTensorTempl /// C_ijkl/a template auto operator/(const T2 & a) const -> - typename std::enable_if::value, + typename std::enable_if::value, RankFourTensorTempl>::type; /// C_ijkl /= a for all i, j, k, l @@ -286,7 +286,7 @@ class RankFourTensorTempl * @return C_xxx = a_ijkl*b_m where m={i,j,k,l} and xxx the remaining indices */ template - RankThreeTensorTempl contraction(const VectorValue & b) const; + RankThreeTensorTempl contraction(const libMesh::VectorValue & b) const; /** * Fills the tensor entries ignoring the last dimension (ie, C_ijkl=0 if any of i, j, k, or l = @@ -366,7 +366,7 @@ class RankFourTensorTempl T sum3x3() const; /// Calculates the vector a[i] = sum over j Ciijj for i and j varying from 0 to 2 - VectorValue sum3x1() const; + libMesh::VectorValue sum3x1() const; /// Calculates C_imnt A_jm B_kn C_lt RankFourTensorTempl tripleProductJkl(const RankTwoTensorTempl &, @@ -516,10 +516,10 @@ struct RawType> { constexpr auto N = RankFourTensorTempl::N; value_type ret; - for (auto i : make_range(N)) - for (auto j : make_range(N)) - for (auto k : make_range(N)) - for (auto l : make_range(N)) + for (auto i : libMesh::make_range(N)) + for (auto j : libMesh::make_range(N)) + for (auto k : libMesh::make_range(N)) + for (auto l : libMesh::make_range(N)) ret(i, j, k, l) = raw_value(in(i, j, k, l)); return ret; @@ -530,7 +530,7 @@ struct RawType> template inline auto operator*(const T1 & a, const RankFourTensorTempl & b) -> - typename std::enable_if::value, + typename std::enable_if::value, RankFourTensorTempl>::type { return b * a; @@ -540,7 +540,7 @@ template template RankFourTensorTempl::RankFourTensorTempl(const RankFourTensorTempl & copy) { - for (auto i : make_range(N4)) + for (auto i : libMesh::make_range(N4)) _vals[i] = copy._vals[i]; } @@ -548,13 +548,13 @@ template template auto RankFourTensorTempl::operator*(const T2 & b) const -> - typename std::enable_if::value, + typename std::enable_if::value, RankFourTensorTempl>::type { typedef decltype(T() * T2()) ValueType; RankFourTensorTempl result; - for (auto i : make_range(N4)) + for (auto i : libMesh::make_range(N4)) result._vals[i] = _vals[i] * b; return result; @@ -564,11 +564,11 @@ template template auto RankFourTensorTempl::operator/(const T2 & b) const -> - typename std::enable_if::value, + typename std::enable_if::value, RankFourTensorTempl>::type { RankFourTensorTempl result; - for (auto i : make_range(N4)) + for (auto i : libMesh::make_range(N4)) result._vals[i] = _vals[i] / b; return result; } @@ -735,12 +735,12 @@ RankFourTensorTempl::inverse() const { // Allocate on the heap if you're going to exceed the stack size limit Eigen::Matrix mat(9, 9); - for (auto i : make_range(9 * 9)) + for (auto i : libMesh::make_range(9 * 9)) mat(i) = _vals[i]; mat = mat.inverse(); - for (auto i : make_range(9 * 9)) + for (auto i : libMesh::make_range(9 * 9)) result._vals[i] = mat(i); } else @@ -757,7 +757,7 @@ RankFourTensorTempl::inverse() const template template RankThreeTensorTempl -RankFourTensorTempl::contraction(const VectorValue & b) const +RankFourTensorTempl::contraction(const libMesh::VectorValue & b) const { RankThreeTensorTempl result; static constexpr std::size_t z[4][3] = {{1, 2, 3}, {0, 2, 3}, {0, 1, 3}, {0, 1, 2}}; diff --git a/framework/include/utils/RankFourTensorImplementation.h b/framework/include/utils/RankFourTensorImplementation.h index 400392c7fa8a..a5cd05461db0 100644 --- a/framework/include/utils/RankFourTensorImplementation.h +++ b/framework/include/utils/RankFourTensorImplementation.h @@ -930,11 +930,11 @@ RankFourTensorTempl::sum3x3() const } template -VectorValue +libMesh::VectorValue RankFourTensorTempl::sum3x1() const { // used for volumetric locking correction - VectorValue a(3); + libMesh::VectorValue a(3); a(0) = (*this)(0, 0, 0, 0) + (*this)(0, 0, 1, 1) + (*this)(0, 0, 2, 2); // C0000 + C0011 + C0022 a(1) = (*this)(1, 1, 0, 0) + (*this)(1, 1, 1, 1) + (*this)(1, 1, 2, 2); // C1100 + C1111 + C1122 a(2) = (*this)(2, 2, 0, 0) + (*this)(2, 2, 1, 1) + (*this)(2, 2, 2, 2); // C2200 + C2211 + C2222 diff --git a/framework/include/utils/RankMap.h b/framework/include/utils/RankMap.h index e5fb0d582b94..7381ce55348e 100644 --- a/framework/include/utils/RankMap.h +++ b/framework/include/utils/RankMap.h @@ -20,13 +20,13 @@ * * https://github.com/idaholab/moose/pull/12351 */ -class RankMap : ParallelObject, PerfGraphInterface +class RankMap : libMesh::ParallelObject, PerfGraphInterface { public: /** * Constructs and fills the map */ - RankMap(const Parallel::Communicator & comm, PerfGraph & perf_graph); + RankMap(const libMesh::Parallel::Communicator & comm, PerfGraph & perf_graph); /** * Returns the "hardware ID" (a unique ID given to each physical compute node in the job) diff --git a/framework/include/utils/RankThreeTensor.h b/framework/include/utils/RankThreeTensor.h index a826e840507d..58b4402bc995 100644 --- a/framework/include/utils/RankThreeTensor.h +++ b/framework/include/utils/RankThreeTensor.h @@ -19,7 +19,6 @@ #include "metaphysicl/raw_type.h" -using libMesh::Real; namespace libMesh { template @@ -126,7 +125,7 @@ class RankThreeTensorTempl RankThreeTensorTempl & operator=(const RankThreeTensorTempl & a); /// b_i = r_ijk * a_jk - VectorValue operator*(const RankTwoTensorTempl & a) const; + libMesh::VectorValue operator*(const RankTwoTensorTempl & a) const; /// r_ijk*a RankThreeTensorTempl operator*(const T a) const; @@ -169,7 +168,7 @@ class RankThreeTensorTempl * Rotate the tensor using * r_ijk = R_im R_in R_ko r_mno */ - void rotate(const TensorValue & R); + void rotate(const libMesh::TensorValue & R); /// Static method for use in validParams for getting the "fill_method" static MooseEnum fillMethodEnum(); @@ -189,7 +188,7 @@ class RankThreeTensorTempl * ref. Kuhl et. al. Int. J. Solids Struct. 38(2001) 2933-2952 * @param input plane normal vector */ - void fillFromPlaneNormal(const VectorValue & input); + void fillFromPlaneNormal(const libMesh::VectorValue & input); /** * Creates fourth order tensor D_{ijkl}=A_{mij}*b_{mn}*A_{nkl} where A is rank 3 and b is rank 2 @@ -202,7 +201,7 @@ class RankThreeTensorTempl * * c_i = A_{ijk} * b_{jk} */ - VectorValue doubleContraction(const RankTwoTensorTempl & b) const; + libMesh::VectorValue doubleContraction(const RankTwoTensorTempl & b) const; protected: /// The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) @@ -236,9 +235,9 @@ struct RawType> static value_type value(const RankThreeTensorTempl & in) { value_type ret; - for (const auto i : make_range(RankThreeTensorTempl::N)) - for (const auto j : make_range(RankThreeTensorTempl::N)) - for (const auto k : make_range(RankThreeTensorTempl::N)) + for (const auto i : libMesh::make_range(RankThreeTensorTempl::N)) + for (const auto j : libMesh::make_range(RankThreeTensorTempl::N)) + for (const auto k : libMesh::make_range(RankThreeTensorTempl::N)) ret(i, j, k) = raw_value(in(i, j, k)); return ret; @@ -250,7 +249,7 @@ template template RankThreeTensorTempl::RankThreeTensorTempl(const RankThreeTensorTempl & copy) { - for (const auto i : make_range(N3)) + for (const auto i : libMesh::make_range(N3)) _vals[i] = copy._vals[i]; } @@ -260,19 +259,19 @@ void RankThreeTensorTempl::rotate(const T2 & R) { unsigned int index = 0; - for (const auto i : make_range(N)) - for (const auto j : make_range(N)) - for (const auto k : make_range(N)) + for (const auto i : libMesh::make_range(N)) + for (const auto j : libMesh::make_range(N)) + for (const auto k : libMesh::make_range(N)) { unsigned int index2 = 0; T sum = 0.0; - for (const auto m : make_range(N)) + for (const auto m : libMesh::make_range(N)) { T a = R(i, m); - for (const auto n : make_range(N)) + for (const auto n : libMesh::make_range(N)) { T ab = a * R(j, n); - for (const auto o : make_range(N)) + for (const auto o : libMesh::make_range(N)) sum += ab * R(k, o) * _vals[index2++]; } } @@ -290,15 +289,15 @@ operator*(T a, const RankThreeTensorTempl & b) ///r=v*A where r is rank 2, v is vector and A is rank 3 template RankTwoTensorTempl -operator*(const VectorValue & p, const RankThreeTensorTempl & b) +operator*(const libMesh::VectorValue & p, const RankThreeTensorTempl & b) { static_assert(RankThreeTensorTempl::N == RankTwoTensorTempl::N, "RankTwoTensor and RankThreeTensor have to have the same dimension N."); RankTwoTensorTempl result; - for (const auto i : make_range(RankThreeTensorTempl::N)) - for (const auto j : make_range(RankThreeTensorTempl::N)) - for (const auto k : make_range(RankThreeTensorTempl::N)) + for (const auto i : libMesh::make_range(RankThreeTensorTempl::N)) + for (const auto j : libMesh::make_range(RankThreeTensorTempl::N)) + for (const auto k : libMesh::make_range(RankThreeTensorTempl::N)) result(i, j) += p(k) * b(k, i, j); return result; @@ -309,9 +308,9 @@ template RankThreeTensorTempl & RankThreeTensorTempl::operator=(const RankThreeTensorTempl & a) { - for (const auto i : make_range(N)) - for (const auto j : make_range(N)) - for (const auto k : make_range(N)) + for (const auto i : libMesh::make_range(N)) + for (const auto j : libMesh::make_range(N)) + for (const auto k : libMesh::make_range(N)) (*this)(i, j, k) = a(i, j, k); return *this; diff --git a/framework/include/utils/RankThreeTensorImplementation.h b/framework/include/utils/RankThreeTensorImplementation.h index 9e7ebd795032..598410fc6ef1 100644 --- a/framework/include/utils/RankThreeTensorImplementation.h +++ b/framework/include/utils/RankThreeTensorImplementation.h @@ -99,10 +99,10 @@ RankThreeTensorTempl::operator=(const RankThreeTensorTempl & a) } template -VectorValue +libMesh::VectorValue RankThreeTensorTempl::operator*(const RankTwoTensorTempl & a) const { - VectorValue result; + libMesh::VectorValue result; for (auto i : make_range(N)) { @@ -257,7 +257,7 @@ RankThreeTensorTempl::fillFromInputVector(const std::vector & input, FillM mooseError("To use fillFromPlaneNormal, your input must have size 3, the supplied size was ", input.size(), "."); - fillFromPlaneNormal(VectorValue(input[0], input[1], input[2])); + fillFromPlaneNormal(libMesh::VectorValue(input[0], input[1], input[2])); } else @@ -267,7 +267,7 @@ RankThreeTensorTempl::fillFromInputVector(const std::vector & input, FillM template void -RankThreeTensorTempl::fillFromPlaneNormal(const VectorValue & input) +RankThreeTensorTempl::fillFromPlaneNormal(const libMesh::VectorValue & input) { unsigned int index = 0; for (auto i : make_range(N)) @@ -314,7 +314,7 @@ RankThreeTensorTempl::mixedProductRankFour(const RankTwoTensorTempl & a) c template void -RankThreeTensorTempl::rotate(const TensorValue & R) +RankThreeTensorTempl::rotate(const libMesh::TensorValue & R) { RankThreeTensorTempl old = *this; @@ -354,10 +354,10 @@ RankThreeTensorTempl::fillGeneralFromInputVector(const std::vector & input } template -VectorValue +libMesh::VectorValue RankThreeTensorTempl::doubleContraction(const RankTwoTensorTempl & b) const { - VectorValue result; + libMesh::VectorValue result; for (auto i : make_range(N)) for (auto j : make_range(N2)) diff --git a/framework/include/utils/RankTwoTensor.h b/framework/include/utils/RankTwoTensor.h index de9f0ee7a6ce..3c0caf5afbb6 100644 --- a/framework/include/utils/RankTwoTensor.h +++ b/framework/include/utils/RankTwoTensor.h @@ -473,7 +473,7 @@ class RankTwoTensorTempl : public libMesh::TensorValue * // 6 ] * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - VectorValue column(const unsigned int i) const; + libMesh::VectorValue column(const unsigned int i) const; /// @} @@ -541,7 +541,8 @@ class RankTwoTensorTempl : public libMesh::TensorValue * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ template - typename boostcopy::enable_if_c::value, RankTwoTensorTempl &>::type + typename libMesh::boostcopy::enable_if_c::value, + RankTwoTensorTempl &>::type operator=(const Scalar & libmesh_dbg_var(p)) { libmesh_assert_equal_to(p, Scalar(0)); @@ -940,7 +941,7 @@ class RankTwoTensorTempl : public libMesh::TensorValue * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ template - RankTwoTensorTempl::supertype> + RankTwoTensorTempl::supertype> operator+(const libMesh::TypeTensor & a) const; /** @@ -962,7 +963,7 @@ class RankTwoTensorTempl : public libMesh::TensorValue * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ template - RankTwoTensorTempl::supertype> + RankTwoTensorTempl::supertype> operator-(const libMesh::TypeTensor & a) const; /** @@ -995,8 +996,9 @@ class RankTwoTensorTempl : public libMesh::TensorValue * // 6 12 18 ] * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - template ::value, int>::type = 0> - RankTwoTensorTempl::supertype> operator*(const T2 & a) const; + template ::value, int>::type = 0> + RankTwoTensorTempl::supertype> + operator*(const T2 & a) const; /** * Return this tensor divided by a scalar (component-wise) @@ -1012,8 +1014,9 @@ class RankTwoTensorTempl : public libMesh::TensorValue * // 1.5 3.0 4.5 ] * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - template ::value, int>::type = 0> - RankTwoTensorTempl::supertype> operator/(const T2 & a) const; + template ::value, int>::type = 0> + RankTwoTensorTempl::supertype> + operator/(const T2 & a) const; /** * Return this tensor multiplied by a vector. \f$ b_i = A_{ij} a_j \f$ @@ -1034,7 +1037,7 @@ class RankTwoTensorTempl : public libMesh::TensorValue * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ template - libMesh::TypeVector::supertype> + libMesh::TypeVector::supertype> operator*(const libMesh::TypeVector & a) const; /** @@ -1056,7 +1059,7 @@ class RankTwoTensorTempl : public libMesh::TensorValue * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ template - RankTwoTensorTempl::supertype> + RankTwoTensorTempl::supertype> operator*(const libMesh::TypeTensor & a) const; /** @@ -1163,7 +1166,7 @@ class RankTwoTensorTempl : public libMesh::TensorValue * @brief Return the tensor product of this second order tensor with a vector \f$ C_{ijk} = A_{jk} * b_{i} \f$ */ - RankThreeTensorTempl mixedProductJkI(const VectorValue & b) const; + RankThreeTensorTempl mixedProductJkI(const libMesh::VectorValue & b) const; /** * @brief Return the positive projection tensor @@ -1383,8 +1386,8 @@ struct RawType> static value_type value(const RankTwoTensorTempl & in) { value_type ret; - for (auto i : make_range(RankTwoTensorTempl::N)) - for (auto j : make_range(RankTwoTensorTempl::N)) + for (auto i : libMesh::make_range(RankTwoTensorTempl::N)) + for (auto j : libMesh::make_range(RankTwoTensorTempl::N)) ret(i, j) = raw_value(in(i, j)); return ret; @@ -1394,7 +1397,7 @@ struct RawType> template template -RankTwoTensorTempl::supertype> +RankTwoTensorTempl::supertype> RankTwoTensorTempl::operator+(const libMesh::TypeTensor & b) const { return libMesh::TensorValue::operator+(b); @@ -1402,15 +1405,15 @@ RankTwoTensorTempl::operator+(const libMesh::TypeTensor & b) const template template -RankTwoTensorTempl::supertype> +RankTwoTensorTempl::supertype> RankTwoTensorTempl::operator-(const libMesh::TypeTensor & b) const { return libMesh::TensorValue::operator-(b); } template -template ::value, int>::type> -RankTwoTensorTempl::supertype> +template ::value, int>::type> +RankTwoTensorTempl::supertype> RankTwoTensorTempl::operator*(const T2 & b) const { return libMesh::TensorValue::operator*(b); @@ -1418,7 +1421,7 @@ RankTwoTensorTempl::operator*(const T2 & b) const template template -libMesh::TypeVector::supertype> +libMesh::TypeVector::supertype> RankTwoTensorTempl::operator*(const libMesh::TypeVector & b) const { return libMesh::TensorValue::operator*(b); @@ -1426,15 +1429,15 @@ RankTwoTensorTempl::operator*(const libMesh::TypeVector & b) const template template -RankTwoTensorTempl::supertype> +RankTwoTensorTempl::supertype> RankTwoTensorTempl::operator*(const libMesh::TypeTensor & b) const { return libMesh::TensorValue::operator*(b); } template -template ::value, int>::type> -RankTwoTensorTempl::supertype> +template ::value, int>::type> +RankTwoTensorTempl::supertype> RankTwoTensorTempl::operator/(const T2 & b) const { return libMesh::TensorValue::operator/(b); @@ -1453,7 +1456,7 @@ RankTwoTensorTempl::positiveProjectionEigenDecomposition(std::vector & eig // Separate out positive and negative eigen values std::array epos; std::array d; - for (auto i : make_range(N)) + for (auto i : libMesh::make_range(N)) { epos[i] = (std::abs(eigval[i]) + eigval[i]) / 2.0; d[i] = 0 < eigval[i] ? 1.0 : 0.0; @@ -1463,15 +1466,15 @@ RankTwoTensorTempl::positiveProjectionEigenDecomposition(std::vector & eig RankFourTensorTempl proj_pos; RankFourTensorTempl Gab, Gba; - for (auto a : make_range(N)) + for (auto a : libMesh::make_range(N)) { const auto Ma = RankTwoTensorTempl::selfOuterProduct(eigvec.column(a)); proj_pos += d[a] * Ma.outerProduct(Ma); } usingTensorIndices(i_, j_, k_, l_); - for (const auto a : make_range(N)) - for (const auto b : make_range(a)) + for (const auto a : libMesh::make_range(N)) + for (const auto b : libMesh::make_range(a)) { const auto Ma = RankTwoTensorTempl::selfOuterProduct(eigvec.column(a)); const auto Mb = RankTwoTensorTempl::selfOuterProduct(eigvec.column(b)); diff --git a/framework/include/utils/RankTwoTensorImplementation.h b/framework/include/utils/RankTwoTensorImplementation.h index 09b9031ea16a..27563a0e9106 100644 --- a/framework/include/utils/RankTwoTensorImplementation.h +++ b/framework/include/utils/RankTwoTensorImplementation.h @@ -270,10 +270,10 @@ RankTwoTensorTempl::fillFromScalarVariable(const VariableValue & scalar_varia } template -VectorValue +libMesh::VectorValue RankTwoTensorTempl::column(const unsigned int c) const { - return VectorValue((*this)(0, c), (*this)(1, c), (*this)(2, c)); + return libMesh::VectorValue((*this)(0, c), (*this)(1, c), (*this)(2, c)); } template @@ -484,7 +484,7 @@ RankTwoTensorTempl::contraction(const RankThreeTensorTempl & b) const template RankThreeTensorTempl -RankTwoTensorTempl::mixedProductJkI(const VectorValue & b) const +RankTwoTensorTempl::mixedProductJkI(const libMesh::VectorValue & b) const { RankThreeTensorTempl result; diff --git a/framework/include/utils/RayTracing.h b/framework/include/utils/RayTracing.h index b518730cf3bb..a226b97f9a26 100644 --- a/framework/include/utils/RayTracing.h +++ b/framework/include/utils/RayTracing.h @@ -39,7 +39,7 @@ namespace Moose void elementsIntersectedByLine(const Point & p0, const Point & p1, const MeshBase & mesh, - const PointLocatorBase & point_locator, + const libMesh::PointLocatorBase & point_locator, std::vector & intersected_elems, std::vector & segments); } diff --git a/framework/include/utils/SerialAccess.h b/framework/include/utils/SerialAccess.h index 71c08929da00..8cb62e5d9339 100644 --- a/framework/include/utils/SerialAccess.h +++ b/framework/include/utils/SerialAccess.h @@ -55,8 +55,8 @@ SERIAL_ACCESS_SCALAR(const ADReal); static constexpr std::size_t size() { return sizeval; } \ } -SERIAL_ACCESS_CONST_SIZE(VectorValue, &obj(0u), Moose::dim); -SERIAL_ACCESS_CONST_SIZE(const VectorValue, &obj(0u), Moose::dim); +SERIAL_ACCESS_CONST_SIZE(libMesh::VectorValue, &obj(0u), Moose::dim); +SERIAL_ACCESS_CONST_SIZE(const libMesh::VectorValue, &obj(0u), Moose::dim); SERIAL_ACCESS_CONST_SIZE(RankTwoTensorTempl, &obj(0u, 0u), RankTwoTensorTempl::N2); SERIAL_ACCESS_CONST_SIZE(const RankTwoTensorTempl, &obj(0u, 0u), RankTwoTensorTempl::N2); SERIAL_ACCESS_CONST_SIZE(RankFourTensorTempl, &obj(0u, 0u, 0u, 0u), RankFourTensorTempl::N4); diff --git a/framework/include/utils/SolutionInvalidity.h b/framework/include/utils/SolutionInvalidity.h index 2756d6ea2227..740106b18071 100644 --- a/framework/include/utils/SolutionInvalidity.h +++ b/framework/include/utils/SolutionInvalidity.h @@ -34,7 +34,7 @@ class VariadicTable; * The SolutionInvalidity will contain all the information about the occurrence(s) of solution * invalidity */ -class SolutionInvalidity : protected ConsoleStreamInterface, public ParallelObject +class SolutionInvalidity : protected ConsoleStreamInterface, public libMesh::ParallelObject { public: using SolutionInvalidityRegistry = moose::internal::SolutionInvalidityRegistry; diff --git a/framework/include/utils/SymmetricRankFourTensor.h b/framework/include/utils/SymmetricRankFourTensor.h index 2fa0fff35683..e50fa360cdf9 100644 --- a/framework/include/utils/SymmetricRankFourTensor.h +++ b/framework/include/utils/SymmetricRankFourTensor.h @@ -46,6 +46,8 @@ class VectorValue; // Forward declarations class MooseEnum; +namespace boostcopy = libMesh::boostcopy; + namespace MathUtils { /** @@ -121,17 +123,17 @@ class SymmetricRankFourTensorTempl template struct TwoTensorMultTraits { - static const bool value = ScalarTraits::value; + static const bool value = libMesh::ScalarTraits::value; }; template struct TwoTensorMultTraits { - static const bool value = ScalarTraits::value; + static const bool value = libMesh::ScalarTraits::value; }; template struct TwoTensorMultTraits { - static const bool value = ScalarTraits::value; + static const bool value = libMesh::ScalarTraits::value; }; /// Default constructor; fills to zero @@ -192,7 +194,8 @@ class SymmetricRankFourTensorTempl * \returns A reference to *this. */ template - typename boostcopy::enable_if_c::value, SymmetricRankFourTensorTempl &>::type + typename boostcopy::enable_if_c::value, + SymmetricRankFourTensorTempl &>::type operator=(const Scalar & libmesh_dbg_var(p)) { libmesh_assert_equal_to(p, Scalar(0)); @@ -208,7 +211,7 @@ class SymmetricRankFourTensorTempl /// C_ijkl*a template auto operator*(const T2 & a) const -> - typename std::enable_if::value, + typename std::enable_if::value, SymmetricRankFourTensorTempl>::type; /// C_ijkl *= a @@ -217,7 +220,7 @@ class SymmetricRankFourTensorTempl /// C_ijkl/a template auto operator/(const T2 & a) const -> - typename std::enable_if::value, + typename std::enable_if::value, SymmetricRankFourTensorTempl>::type; /// C_ijkl /= a for all i, j, k, l @@ -326,7 +329,7 @@ class SymmetricRankFourTensorTempl T sum3x3() const; /// Calculates the vector a[i] = sum over j Ciijj for i and j varying from 0 to 2 - VectorValue sum3x1() const; + libMesh::VectorValue sum3x1() const; /// checks if the tensor is symmetric bool isSymmetric() const; @@ -427,7 +430,7 @@ struct RawType> template inline auto operator*(const T1 & a, const SymmetricRankFourTensorTempl & b) -> - typename std::enable_if::value, + typename std::enable_if::value, SymmetricRankFourTensorTempl>::type { return b * a; @@ -446,7 +449,7 @@ template template auto SymmetricRankFourTensorTempl::operator*(const T2 & b) const -> - typename std::enable_if::value, + typename std::enable_if::value, SymmetricRankFourTensorTempl>::type { typedef decltype(T() * T2()) ValueType; @@ -483,7 +486,7 @@ template template auto SymmetricRankFourTensorTempl::operator/(const T2 & b) const -> - typename std::enable_if::value, + typename std::enable_if::value, SymmetricRankFourTensorTempl>::type { SymmetricRankFourTensorTempl result; diff --git a/framework/include/utils/SymmetricRankFourTensorImplementation.h b/framework/include/utils/SymmetricRankFourTensorImplementation.h index 8e94dd8d3a65..3b1e3c1f0393 100644 --- a/framework/include/utils/SymmetricRankFourTensorImplementation.h +++ b/framework/include/utils/SymmetricRankFourTensorImplementation.h @@ -496,14 +496,14 @@ SymmetricRankFourTensorTempl::sum3x3() const } template -VectorValue +libMesh::VectorValue SymmetricRankFourTensorTempl::sum3x1() const { mooseAssert(LIBMESH_DIM == 3, "This method assumes LIBMESH_DIM == 3"); // used for volumetric locking correction - return VectorValue(_vals[0] + _vals[1] + _vals[2], - _vals[6] + _vals[7] + _vals[8], - _vals[12] + _vals[13] + _vals[14]); + return libMesh::VectorValue(_vals[0] + _vals[1] + _vals[2], + _vals[6] + _vals[7] + _vals[8], + _vals[12] + _vals[13] + _vals[14]); } template diff --git a/framework/include/utils/SymmetricRankTwoTensor.h b/framework/include/utils/SymmetricRankTwoTensor.h index a89071b2449a..237a74baf697 100644 --- a/framework/include/utils/SymmetricRankTwoTensor.h +++ b/framework/include/utils/SymmetricRankTwoTensor.h @@ -43,6 +43,8 @@ template class TensorValue; } +namespace boostcopy = libMesh::boostcopy; + namespace MathUtils { template @@ -198,10 +200,10 @@ class SymmetricRankTwoTensorTempl } /// get the specified row of the tensor - VectorValue row(const unsigned int n) const; + libMesh::VectorValue row(const unsigned int n) const; /// get the specified column of the tensor - VectorValue column(const unsigned int n) const { return row(n); } + libMesh::VectorValue column(const unsigned int n) const { return row(n); } /// return the matrix multiplied with its transpose A*A^T (guaranteed symmetric) [[nodiscard]] static SymmetricRankTwoTensorTempl timesTranspose(const RankTwoTensorTempl &); @@ -248,7 +250,8 @@ class SymmetricRankTwoTensorTempl * Assignment-from-scalar operator. Used only to zero out vectors. */ template - typename boostcopy::enable_if_c::value, SymmetricRankTwoTensorTempl &>::type + typename boostcopy::enable_if_c::value, + SymmetricRankTwoTensorTempl &>::type operator=(const Scalar & libmesh_dbg_var(p)) { libmesh_assert_equal_to(p, Scalar(0)); @@ -261,7 +264,7 @@ class SymmetricRankTwoTensorTempl /// returns _vals + a template - SymmetricRankTwoTensorTempl::supertype> + SymmetricRankTwoTensorTempl::supertype> operator+(const SymmetricRankTwoTensorTempl & a) const; /// sets _vals -= a and returns vals @@ -269,7 +272,7 @@ class SymmetricRankTwoTensorTempl /// returns _vals - a template - SymmetricRankTwoTensorTempl::supertype> + SymmetricRankTwoTensorTempl::supertype> operator-(const SymmetricRankTwoTensorTempl & a) const; /// returns -_vals @@ -281,7 +284,7 @@ class SymmetricRankTwoTensorTempl /// returns _vals*a template auto operator*(const T2 & a) const -> - typename std::enable_if::value, + typename std::enable_if::value, SymmetricRankTwoTensorTempl>::type; /// performs _vals /= a @@ -290,12 +293,13 @@ class SymmetricRankTwoTensorTempl /// returns _vals/a template auto operator/(const T2 & a) const -> - typename std::enable_if::value, + typename std::enable_if::value, SymmetricRankTwoTensorTempl>::type; /// Defines multiplication with a vector to get a vector template - TypeVector::supertype> operator*(const TypeVector & a) const; + TypeVector::supertype> + operator*(const TypeVector & a) const; /// Defines logical equality with another SymmetricRankTwoTensorTempl template @@ -512,7 +516,7 @@ template template auto SymmetricRankTwoTensorTempl::operator*(const T2 & a) const -> - typename std::enable_if::value, + typename std::enable_if::value, SymmetricRankTwoTensorTempl>::type { SymmetricRankTwoTensorTempl result; @@ -525,7 +529,7 @@ template template auto SymmetricRankTwoTensorTempl::operator/(const T2 & a) const -> - typename std::enable_if::value, + typename std::enable_if::value, SymmetricRankTwoTensorTempl>::type { SymmetricRankTwoTensorTempl result; @@ -537,10 +541,10 @@ SymmetricRankTwoTensorTempl::operator/(const T2 & a) const -> /// Defines multiplication with a vector to get a vector template template -TypeVector::supertype> +TypeVector::supertype> SymmetricRankTwoTensorTempl::operator*(const TypeVector & a) const { - TypeVector::supertype> ret; + TypeVector::supertype> ret; ret(0) = a(0) * _vals[0] + a(1) * _vals[5] + a(2) * _vals[4]; ret(1) = a(0) * _vals[5] + a(1) * _vals[1] + a(2) * _vals[3]; ret(2) = a(0) * _vals[4] + a(1) * _vals[3] + a(2) * _vals[2]; @@ -685,8 +689,8 @@ SymmetricRankTwoTensorTempl::operator=(const SymmetricRankTwoTensorTempl template inline typename std::enable_if_t< - ScalarTraits::value, - SymmetricRankTwoTensorTempl::supertype>> + libMesh::ScalarTraits::value, + SymmetricRankTwoTensorTempl::supertype>> operator*(const Scalar & factor, const SymmetricRankTwoTensorTempl & t) { return t * factor; diff --git a/framework/include/utils/SymmetricRankTwoTensorImplementation.h b/framework/include/utils/SymmetricRankTwoTensorImplementation.h index 598ce0145d69..ce40f0c2a639 100644 --- a/framework/include/utils/SymmetricRankTwoTensorImplementation.h +++ b/framework/include/utils/SymmetricRankTwoTensorImplementation.h @@ -269,17 +269,20 @@ SymmetricRankTwoTensorTempl::transpose() const /// multiply vector v with row n of this tensor template -VectorValue +libMesh::VectorValue SymmetricRankTwoTensorTempl::row(const unsigned int n) const { switch (n) { case 0: - return VectorValue(_vals[0], _vals[5] / mandelFactor(5), _vals[4] / mandelFactor(4)); + return libMesh::VectorValue( + _vals[0], _vals[5] / mandelFactor(5), _vals[4] / mandelFactor(4)); case 1: - return VectorValue(_vals[5] / mandelFactor(5), _vals[1], _vals[3] / mandelFactor(3)); + return libMesh::VectorValue( + _vals[5] / mandelFactor(5), _vals[1], _vals[3] / mandelFactor(3)); case 2: - return VectorValue(_vals[4] / mandelFactor(4), _vals[3] / mandelFactor(3), _vals[2]); + return libMesh::VectorValue( + _vals[4] / mandelFactor(4), _vals[3] / mandelFactor(3), _vals[2]); default: mooseError("Invalid row"); } @@ -383,10 +386,10 @@ SymmetricRankTwoTensorTempl::operator-=(const SymmetricRankTwoTensorTempl template template -SymmetricRankTwoTensorTempl::supertype> +SymmetricRankTwoTensorTempl::supertype> SymmetricRankTwoTensorTempl::operator+(const SymmetricRankTwoTensorTempl & a) const { - SymmetricRankTwoTensorTempl::supertype> result; + SymmetricRankTwoTensorTempl::supertype> result; for (std::size_t i = 0; i < N; ++i) result(i) = _vals[i] + a(i); return result; @@ -394,11 +397,11 @@ SymmetricRankTwoTensorTempl::operator+(const SymmetricRankTwoTensorTempl template template -SymmetricRankTwoTensorTempl::supertype> +SymmetricRankTwoTensorTempl::supertype> SymmetricRankTwoTensorTempl::operator-(const SymmetricRankTwoTensorTempl & a) const { - SymmetricRankTwoTensorTempl::supertype> result( - SymmetricRankTwoTensorTempl::supertype>::initNone); + SymmetricRankTwoTensorTempl::supertype> result( + SymmetricRankTwoTensorTempl::supertype>::initNone); for (std::size_t i = 0; i < N; ++i) result(i) = _vals[i] - a(i); return result; diff --git a/framework/include/utils/TrilinearInterpolation.h b/framework/include/utils/TrilinearInterpolation.h index b6988a9aff6f..e22fbb2a13ed 100644 --- a/framework/include/utils/TrilinearInterpolation.h +++ b/framework/include/utils/TrilinearInterpolation.h @@ -12,6 +12,8 @@ #include #include "Moose.h" +using libMesh::Real; + /** * This class interpolates a function of three values (f(x,y,z)). It takes 4 * vectors for x, y, z, and function values, f(x,y,z). The vector of function diff --git a/framework/include/variables/MooseLinearVariableFV.h b/framework/include/variables/MooseLinearVariableFV.h index fcfe967582e4..beb0600da0b2 100644 --- a/framework/include/variables/MooseLinearVariableFV.h +++ b/framework/include/variables/MooseLinearVariableFV.h @@ -183,7 +183,7 @@ class MooseLinearVariableFV : public MooseVariableField mutable RealVectorValue _cell_gradient; /// Pointer to the cell gradients which are stored on the linear system - const std::vector>> & _grad_container; + const std::vector>> & _grad_container; /// Holder for all the data associated with the "main" element. The data in this is /// mainly used by finite element-based loops such as the postprocessor and auxkernel @@ -229,7 +229,7 @@ class MooseLinearVariableFV : public MooseVariableField /// The current (ghosted) solution. Note that this needs to be stored as a reference to a pointer /// because the solution might not exist at the time that this variable is constructed, so we /// cannot safely dereference at that time - const NumericVector * const & _solution; + const libMesh::NumericVector * const & _solution; /// Shape functions, only used when we are postprocessing or using this variable /// in an auxiliary system @@ -276,7 +276,10 @@ class MooseLinearVariableFV : public MooseVariableField virtual void residualSetup() override {} virtual void jacobianSetup() override {} - virtual FEContinuity getContinuity() const override { return _element_data->getContinuity(); }; + virtual libMesh::FEContinuity getContinuity() const override + { + return _element_data->getContinuity(); + }; virtual void setNodalValue(const OutputType & value, unsigned int idx = 0) override; @@ -308,9 +311,9 @@ class MooseLinearVariableFV : public MooseVariableField virtual void setLowerDofValues(const DenseVector & values) override; - virtual void insert(NumericVector & vector) override; - virtual void insertLower(NumericVector & vector) override; - virtual void add(NumericVector & vector) override; + virtual void insert(libMesh::NumericVector & vector) override; + virtual void insertLower(libMesh::NumericVector & vector) override; + virtual void add(libMesh::NumericVector & vector) override; virtual void setActiveTags(const std::set & vtags) override; @@ -397,10 +400,12 @@ class MooseLinearVariableFV : public MooseVariableField [[noreturn]] virtual const DoFValue & dofValuesDotDotNeighbor() const override; [[noreturn]] virtual const DoFValue & dofValuesDotDotOld() const override; [[noreturn]] virtual const DoFValue & dofValuesDotDotOldNeighbor() const override; - [[noreturn]] virtual const MooseArray & dofValuesDuDotDu() const override; - [[noreturn]] virtual const MooseArray & dofValuesDuDotDuNeighbor() const override; - [[noreturn]] virtual const MooseArray & dofValuesDuDotDotDu() const override; - [[noreturn]] virtual const MooseArray & dofValuesDuDotDotDuNeighbor() const override; + [[noreturn]] virtual const MooseArray & dofValuesDuDotDu() const override; + [[noreturn]] virtual const MooseArray & + dofValuesDuDotDuNeighbor() const override; + [[noreturn]] virtual const MooseArray & dofValuesDuDotDotDu() const override; + [[noreturn]] virtual const MooseArray & + dofValuesDuDotDotDuNeighbor() const override; [[noreturn]] virtual const MooseArray & adDofValues() const override; [[noreturn]] virtual const MooseArray & adDofValuesNeighbor() const override; diff --git a/framework/include/variables/MooseVariableBase.h b/framework/include/variables/MooseVariableBase.h index 4bdd5a2462e6..5c41e89a1ff9 100644 --- a/framework/include/variables/MooseVariableBase.h +++ b/framework/include/variables/MooseVariableBase.h @@ -51,7 +51,7 @@ class MooseVariableBase : public MooseObject, /** * Get the type of finite element object */ - const FEType & feType() const { return _fe_type; } + const libMesh::FEType & feType() const { return _fe_type; } /** * Get the system this variable is part of. @@ -99,7 +99,7 @@ class MooseVariableBase : public MooseObject, * Get the order of this variable * Note: Order enum can be implicitly converted to unsigned int. */ - Order order() const; + libMesh::Order order() const; /** * Get the number of components @@ -122,12 +122,15 @@ class MooseVariableBase : public MooseObject, /** * Return the continuity of this variable */ - virtual FEContinuity getContinuity() const { mooseError("Base class cannot determine this"); }; + virtual libMesh::FEContinuity getContinuity() const + { + mooseError("Base class cannot determine this"); + }; /** * The DofMap associated with the system this variable is in. */ - const DofMap & dofMap() const { return _dof_map; } + const libMesh::DofMap & dofMap() const { return _dof_map; } virtual void getDofIndices(const Elem * /*elem*/, std::vector & /*dof_indices*/) const @@ -192,7 +195,7 @@ class MooseVariableBase : public MooseObject, SystemBase & _sys; /// The FEType associated with this variable - FEType _fe_type; + libMesh::FEType _fe_type; /// variable number (from libMesh) unsigned int _var_num; @@ -210,13 +213,13 @@ class MooseVariableBase : public MooseObject, SubProblem & _subproblem; /// libMesh variable object for this variable - const Variable & _variable; + const libMesh::Variable & _variable; /// Assembly data Assembly & _assembly; /// DOF map - const DofMap & _dof_map; + const libMesh::DofMap & _dof_map; /// DOF indices std::vector _dof_indices; diff --git a/framework/include/variables/MooseVariableData.h b/framework/include/variables/MooseVariableData.h index 60478194d3ee..2368a6c1d2ec 100644 --- a/framework/include/variables/MooseVariableData.h +++ b/framework/include/variables/MooseVariableData.h @@ -50,9 +50,9 @@ class MooseVariableData : public MooseVariableDataBase { public: // type for gradient, second and divergence of template class OutputType - typedef typename TensorTools::IncrementRank::type OutputGradient; - typedef typename TensorTools::IncrementRank::type OutputSecond; - typedef typename TensorTools::DecrementRank::type OutputDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputDivergence; // shortcut for types storing values on quadrature points typedef MooseArray FieldVariableValue; @@ -65,9 +65,9 @@ class MooseVariableData : public MooseVariableDataBase typedef typename Moose::ShapeType::type OutputShape; // type for gradient, second and divergence of shape functions of template class OutputType - typedef typename TensorTools::IncrementRank::type OutputShapeGradient; - typedef typename TensorTools::IncrementRank::type OutputShapeSecond; - typedef typename TensorTools::DecrementRank::type OutputShapeDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputShapeGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputShapeSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputShapeDivergence; // shortcut for types storing shape function values on quadrature points typedef MooseArray> FieldVariablePhiValue; @@ -241,8 +241,8 @@ class MooseVariableData : public MooseVariableDataBase //////////////////////////////// Nodal stuff /////////////////////////////////////////// bool isNodal() const override { return _is_nodal; } - bool hasDoFsOnNodes() const override { return _continuity != DISCONTINUOUS; } - FEContinuity getContinuity() const override { return _continuity; }; + bool hasDoFsOnNodes() const override { return _continuity != libMesh::DISCONTINUOUS; } + libMesh::FEContinuity getContinuity() const override { return _continuity; }; const Node * const & node() const { return _node; } const dof_id_type & nodalDofIndex() const { return _nodal_dof_index; } bool isNodalDefined() const { return _has_dof_indices; } @@ -376,7 +376,7 @@ class MooseVariableData : public MooseVariableDataBase /** * Write a nodal value to the passed-in solution vector */ - void insertNodalValue(NumericVector & residual, const OutputData & v); + void insertNodalValue(libMesh::NumericVector & residual, const OutputData & v); OutputData getNodalValue(const Node & node, Moose::SolutionState state) const; OutputData getElementalValue(const Elem * elem, Moose::SolutionState state, unsigned int idx = 0) const; @@ -412,7 +412,8 @@ class MooseVariableData : public MooseVariableDataBase /** * Add passed in local DOF values to a solution vector */ - void addSolution(NumericVector & sol, const DenseVector & v) const; + void addSolution(libMesh::NumericVector & sol, + const DenseVector & v) const; /////////////////////////// DoF value getters ///////////////////////////////////// @@ -420,8 +421,8 @@ class MooseVariableData : public MooseVariableDataBase const DoFValue & dofValuesDotOld() const; const DoFValue & dofValuesDotDot() const; const DoFValue & dofValuesDotDotOld() const; - const MooseArray & dofValuesDuDotDu() const; - const MooseArray & dofValuesDuDotDotDu() const; + const MooseArray & dofValuesDuDotDu() const; + const MooseArray & dofValuesDuDotDotDu() const; /** * Return the AD dof values @@ -439,12 +440,12 @@ class MooseVariableData : public MooseVariableDataBase /** * Compute and store incremental change in solution at QPs based on increment_vec */ - void computeIncrementAtQps(const NumericVector & increment_vec); + void computeIncrementAtQps(const libMesh::NumericVector & increment_vec); /** * Compute and store incremental change at the current node based on increment_vec */ - void computeIncrementAtNode(const NumericVector & increment_vec); + void computeIncrementAtNode(const libMesh::NumericVector & increment_vec); private: /** @@ -455,7 +456,7 @@ class MooseVariableData : public MooseVariableDataBase void assignADNodalValue(const ADReal & value, const unsigned int & component); void fetchADDoFValues(); - const FEType & _fe_type; + const libMesh::FEType & _fe_type; const unsigned int _var_num; @@ -471,7 +472,7 @@ class MooseVariableData : public MooseVariableDataBase dof_id_type _nodal_dof_index; /// Continuity type of the variable - FEContinuity _continuity; + libMesh::FEContinuity _continuity; /// Increment in the variable used in dampers FieldVariableValue _increment; @@ -603,44 +604,46 @@ class MooseVariableData : public MooseVariableDataBase const bool _use_dual; std::function::VariablePhiValue &(const Assembly &, - FEType)> + libMesh::FEType)> _phi_assembly_method; std::function::VariablePhiValue &(const Assembly &, - FEType)> + libMesh::FEType)> _phi_face_assembly_method; std::function::VariablePhiGradient &(const Assembly &, - FEType)> + libMesh::FEType)> _grad_phi_assembly_method; std::function::VariablePhiGradient &(const Assembly &, - FEType)> + libMesh::FEType)> _grad_phi_face_assembly_method; std::function::VariablePhiSecond &(const Assembly &, - FEType)> + libMesh::FEType)> _second_phi_assembly_method; std::function::VariablePhiSecond &(const Assembly &, - FEType)> + libMesh::FEType)> _second_phi_face_assembly_method; std::function::VariablePhiCurl &(const Assembly &, - FEType)> + libMesh::FEType)> _curl_phi_assembly_method; std::function::VariablePhiCurl &(const Assembly &, - FEType)> + libMesh::FEType)> _curl_phi_face_assembly_method; std::function::VariablePhiDivergence &(const Assembly &, - FEType)> + libMesh::FEType)> _div_phi_assembly_method; std::function::VariablePhiDivergence &(const Assembly &, - FEType)> + libMesh::FEType)> _div_phi_face_assembly_method; - std::function &(const Assembly &, FEType)> + std::function &(const Assembly &, + libMesh::FEType)> _ad_grad_phi_assembly_method; - std::function &(const Assembly &, FEType)> + std::function &(const Assembly &, + libMesh::FEType)> _ad_grad_phi_face_assembly_method; /// Pointer to time integrator diff --git a/framework/include/variables/MooseVariableDataBase.h b/framework/include/variables/MooseVariableDataBase.h index 5f357847044f..0d798260b3c6 100644 --- a/framework/include/variables/MooseVariableDataBase.h +++ b/framework/include/variables/MooseVariableDataBase.h @@ -34,9 +34,9 @@ class MooseVariableDataBase { public: // type for gradient, second and divergence of template class OutputType - typedef typename TensorTools::IncrementRank::type OutputGradient; - typedef typename TensorTools::IncrementRank::type OutputSecond; - typedef typename TensorTools::DecrementRank::type OutputDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputDivergence; // shortcut for types storing values on quadrature points typedef MooseArray FieldVariableValue; @@ -65,7 +65,7 @@ class MooseVariableDataBase /** * Return the variable continuity */ - virtual FEContinuity getContinuity() const = 0; + virtual libMesh::FEContinuity getContinuity() const = 0; /** * Local solution getter @@ -93,12 +93,12 @@ class MooseVariableDataBase /** * Set the current local DOF values to the input vector */ - void insert(NumericVector & residual); + void insert(libMesh::NumericVector & residual); /** * Add the current local DOF values to the input vector */ - void add(NumericVector & residual); + void add(libMesh::NumericVector & residual); /** * prepare the initial condition @@ -160,7 +160,7 @@ class MooseVariableDataBase */ void fetchDoFValues(); void zeroSizeDofValues(); - void getArrayDoFValues(const NumericVector & sol, + void getArrayDoFValues(const libMesh::NumericVector & sol, unsigned int n, MooseArray & dof_values) const; void assignNodalValue(); @@ -189,7 +189,7 @@ class MooseVariableDataBase const THREAD_ID _tid; /// The degree of freedom map from libMesh - const DofMap & _dof_map; + const libMesh::DofMap & _dof_map; /// Number of components of the associated variable unsigned int _count; @@ -271,10 +271,10 @@ class MooseVariableDataBase /// the previous time step's solution value second time derivative DoFValue _dof_values_dotdot_old; /// derivatives of the solution value time derivative with respect to the degrees of freedom - MooseArray _dof_du_dot_du; + MooseArray _dof_du_dot_du; /// derivatives of the solution value second time derivative with respect to the degrees of /// freedom - MooseArray _dof_du_dotdot_du; + MooseArray _dof_du_dotdot_du; /// nodal values of u_dot OutputType _nodal_value_dot; diff --git a/framework/include/variables/MooseVariableDataFV.h b/framework/include/variables/MooseVariableDataFV.h index 83bce9314717..168efd90d137 100644 --- a/framework/include/variables/MooseVariableDataFV.h +++ b/framework/include/variables/MooseVariableDataFV.h @@ -70,9 +70,9 @@ class MooseVariableDataFV : public MooseVariableDataBase, public Mes { public: // type for gradient, second and divergence of template class OutputType - typedef typename TensorTools::IncrementRank::type OutputGradient; - typedef typename TensorTools::IncrementRank::type OutputSecond; - typedef typename TensorTools::DecrementRank::type OutputDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputDivergence; // shortcut for types storing values on quadrature points typedef MooseArray FieldVariableValue; @@ -85,9 +85,9 @@ class MooseVariableDataFV : public MooseVariableDataBase, public Mes typedef typename Moose::ShapeType::type OutputShape; // type for gradient, second and divergence of shape functions of template class OutputType - typedef typename TensorTools::IncrementRank::type OutputShapeGradient; - typedef typename TensorTools::IncrementRank::type OutputShapeSecond; - typedef typename TensorTools::DecrementRank::type OutputShapeDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputShapeGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputShapeSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputShapeDivergence; // DoF value type for the template class OutputType typedef typename Moose::DOFType::type OutputData; @@ -101,7 +101,7 @@ class MooseVariableDataFV : public MooseVariableDataBase, public Mes bool isNodal() const override { return false; } bool hasDoFsOnNodes() const override { return false; } - FEContinuity getContinuity() const override { return DISCONTINUOUS; } + libMesh::FEContinuity getContinuity() const override { return libMesh::DISCONTINUOUS; } /** * Returns whether this data structure needs automatic differentiation calculations @@ -251,8 +251,8 @@ class MooseVariableDataFV : public MooseVariableDataBase, public Mes const DoFValue & dofValuesDotOld() const; const DoFValue & dofValuesDotDot() const; const DoFValue & dofValuesDotDotOld() const; - const MooseArray & dofValuesDuDotDu() const; - const MooseArray & dofValuesDuDotDotDu() const; + const MooseArray & dofValuesDuDotDu() const; + const MooseArray & dofValuesDuDotDotDu() const; /** * Return the AD dof values @@ -270,7 +270,7 @@ class MooseVariableDataFV : public MooseVariableDataBase, public Mes /** * Compute and store incremental change in solution at QPs based on increment_vec */ - void computeIncrementAtQps(const NumericVector & increment_vec); + void computeIncrementAtQps(const libMesh::NumericVector & increment_vec); /// checks if a Dirichlet BC exists on this face bool hasDirichletBC() const { return _has_dirichlet_bc; } @@ -298,7 +298,7 @@ class MooseVariableDataFV : public MooseVariableDataBase, public Mes /// A const reference to the owning MooseVariableFV object const MooseVariableFV & _var; - const FEType & _fe_type; + const libMesh::FEType & _fe_type; const unsigned int _var_num; @@ -308,7 +308,7 @@ class MooseVariableDataFV : public MooseVariableDataBase, public Mes Moose::ElementType _element_type; /// Continuity type of the variable - FEContinuity _continuity; + libMesh::FEContinuity _continuity; /// Increment in the variable used in dampers FieldVariableValue _increment; @@ -401,7 +401,7 @@ class MooseVariableDataFV : public MooseVariableDataBase, public Mes const bool _displaced; /// The quadrature rule - const QBase * _qrule; + const libMesh::QBase * _qrule; /// A dummy ADReal variable ADReal _ad_real_dummy = 0; diff --git a/framework/include/variables/MooseVariableDataLinearFV.h b/framework/include/variables/MooseVariableDataLinearFV.h index 7e7bbff67acc..cebaa667e0b4 100644 --- a/framework/include/variables/MooseVariableDataLinearFV.h +++ b/framework/include/variables/MooseVariableDataLinearFV.h @@ -52,9 +52,9 @@ class MooseVariableDataLinearFV : public MooseVariableDataBase { public: // type for gradient, second and divergence of template class OutputType - typedef typename TensorTools::IncrementRank::type OutputGradient; - typedef typename TensorTools::IncrementRank::type OutputSecond; - typedef typename TensorTools::DecrementRank::type OutputDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputDivergence; // shortcut for types storing values on quadrature points typedef MooseArray FieldVariableValue; @@ -67,9 +67,9 @@ class MooseVariableDataLinearFV : public MooseVariableDataBase typedef typename Moose::ShapeType::type OutputShape; // type for gradient, second and divergence of shape functions of template class OutputType - typedef typename TensorTools::IncrementRank::type OutputShapeGradient; - typedef typename TensorTools::IncrementRank::type OutputShapeSecond; - typedef typename TensorTools::DecrementRank::type OutputShapeDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputShapeGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputShapeSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputShapeDivergence; // DoF value type for the template class OutputType typedef typename Moose::DOFType::type OutputData; @@ -83,7 +83,7 @@ class MooseVariableDataLinearFV : public MooseVariableDataBase bool isNodal() const override { return false; } bool hasDoFsOnNodes() const override { return false; } - FEContinuity getContinuity() const override { return DISCONTINUOUS; } + libMesh::FEContinuity getContinuity() const override { return libMesh::DISCONTINUOUS; } /** * Set the geometry type before calculating variables values. @@ -145,7 +145,7 @@ class MooseVariableDataLinearFV : public MooseVariableDataBase const MooseLinearVariableFV & _var; /// Reference to the variable's finite element type - const FEType & _fe_type; + const libMesh::FEType & _fe_type; /// The index of the variable in the system const unsigned int _var_num; @@ -176,7 +176,7 @@ class MooseVariableDataLinearFV : public MooseVariableDataBase const bool _displaced; /// Pointer to the quadrature rule - const QBase * _qrule; + const libMesh::QBase * _qrule; using MooseVariableDataBase::_sys; using MooseVariableDataBase::_subproblem; diff --git a/framework/include/variables/MooseVariableFE.h b/framework/include/variables/MooseVariableFE.h index 800cc8d8fddd..6ee6dcc38e29 100644 --- a/framework/include/variables/MooseVariableFE.h +++ b/framework/include/variables/MooseVariableFE.h @@ -146,7 +146,7 @@ class MooseVariableFE : public MooseVariableField bool isNodal() const override { return _element_data->isNodal(); } bool hasDoFsOnNodes() const override { return _element_data->hasDoFsOnNodes(); } - FEContinuity getContinuity() const override { return _element_data->getContinuity(); }; + libMesh::FEContinuity getContinuity() const override { return _element_data->getContinuity(); }; const Node * const & node() const { return _element_data->node(); } const dof_id_type & nodalDofIndex() const override { return _element_data->nodalDofIndex(); } virtual bool isNodalDefined() const override; @@ -513,7 +513,7 @@ class MooseVariableFE : public MooseVariableField /** * Write a nodal value to the passed-in solution vector */ - void insertNodalValue(NumericVector & residual, const OutputData & v); + void insertNodalValue(libMesh::NumericVector & residual, const OutputData & v); /** * Get the value of this variable at given node @@ -552,23 +552,23 @@ class MooseVariableFE : public MooseVariableField /** * Set the current local DOF values to the input vector */ - virtual void insert(NumericVector & vector) override; - virtual void insertLower(NumericVector & vector) override; + virtual void insert(libMesh::NumericVector & vector) override; + virtual void insertLower(libMesh::NumericVector & vector) override; /** * Add the current local DOF values to the input vector */ - virtual void add(NumericVector & vector) override; + virtual void add(libMesh::NumericVector & vector) override; /** * Add passed in local DOF values onto the current solution */ - void addSolution(const DenseVector & v); + void addSolution(const DenseVector & v); /** * Add passed in local neighbor DOF values onto the current solution */ - void addSolutionNeighbor(const DenseVector & v); + void addSolutionNeighbor(const DenseVector & v); const DoFValue & dofValue() const; const DoFValue & dofValues() const override; @@ -589,10 +589,10 @@ class MooseVariableFE : public MooseVariableField const DoFValue & dofValuesDotDotNeighborResidual() const; const DoFValue & dofValuesDotDotOld() const override; const DoFValue & dofValuesDotDotOldNeighbor() const override; - const MooseArray & dofValuesDuDotDu() const override; - const MooseArray & dofValuesDuDotDuNeighbor() const override; - const MooseArray & dofValuesDuDotDotDu() const override; - const MooseArray & dofValuesDuDotDotDuNeighbor() const override; + const MooseArray & dofValuesDuDotDu() const override; + const MooseArray & dofValuesDuDotDuNeighbor() const override; + const MooseArray & dofValuesDuDotDotDu() const override; + const MooseArray & dofValuesDuDotDotDuNeighbor() const override; /** * Return the AD dof values @@ -607,12 +607,12 @@ class MooseVariableFE : public MooseVariableField /** * Compute and store incremental change in solution at QPs based on increment_vec */ - void computeIncrementAtQps(const NumericVector & increment_vec); + void computeIncrementAtQps(const libMesh::NumericVector & increment_vec); /** * Compute and store incremental change at the current node based on increment_vec */ - void computeIncrementAtNode(const NumericVector & increment_vec); + void computeIncrementAtNode(const libMesh::NumericVector & increment_vec); /** * Compute the variable value at a point on an element diff --git a/framework/include/variables/MooseVariableFV.h b/framework/include/variables/MooseVariableFV.h index 2e092d306e40..ff49f7c58411 100644 --- a/framework/include/variables/MooseVariableFV.h +++ b/framework/include/variables/MooseVariableFV.h @@ -157,7 +157,10 @@ class MooseVariableFV : public MooseVariableField bool hasDoFsOnNodes() const override final { return false; } - FEContinuity getContinuity() const override final { return _element_data->getContinuity(); }; + libMesh::FEContinuity getContinuity() const override final + { + return _element_data->getContinuity(); + }; virtual bool isNodalDefined() const override final { return false; } @@ -398,9 +401,9 @@ class MooseVariableFV : public MooseVariableField /// @return Variable value OutputData getElementalValueOlder(const Elem * elem, unsigned int idx = 0) const; - virtual void insert(NumericVector & vector) override; - virtual void insertLower(NumericVector & vector) override; - virtual void add(NumericVector & vector) override; + virtual void insert(libMesh::NumericVector & vector) override; + virtual void insertLower(libMesh::NumericVector & vector) override; + virtual void add(libMesh::NumericVector & vector) override; const DoFValue & dofValues() const override; const DoFValue & dofValuesOld() const override; @@ -418,10 +421,10 @@ class MooseVariableFV : public MooseVariableField const DoFValue & dofValuesDotDotNeighbor() const override; const DoFValue & dofValuesDotDotOld() const override; const DoFValue & dofValuesDotDotOldNeighbor() const override; - const MooseArray & dofValuesDuDotDu() const override; - const MooseArray & dofValuesDuDotDuNeighbor() const override; - const MooseArray & dofValuesDuDotDotDu() const override; - const MooseArray & dofValuesDuDotDotDuNeighbor() const override; + const MooseArray & dofValuesDuDotDu() const override; + const MooseArray & dofValuesDuDotDuNeighbor() const override; + const MooseArray & dofValuesDuDotDotDu() const override; + const MooseArray & dofValuesDuDotDotDuNeighbor() const override; /// Returns the AD dof values. const MooseArray & adDofValues() const override; @@ -671,7 +674,7 @@ class MooseVariableFV : public MooseVariableField /// The current (ghosted) solution. Note that this needs to be stored as a reference to a pointer /// because the solution might not exist at the time that this variable is constructed, so we /// cannot safely dereference at that time - const NumericVector * const & _solution; + const libMesh::NumericVector * const & _solution; /// Shape functions const FieldVariablePhiValue & _phi; diff --git a/framework/include/variables/MooseVariableField.h b/framework/include/variables/MooseVariableField.h index f304ff0e23d5..05f76e6b06ab 100644 --- a/framework/include/variables/MooseVariableField.h +++ b/framework/include/variables/MooseVariableField.h @@ -43,9 +43,9 @@ class MooseVariableField : public MooseVariableFieldBase, { public: // type for gradient, second and divergence of template class OutputType - typedef typename TensorTools::IncrementRank::type OutputGradient; - typedef typename TensorTools::IncrementRank::type OutputSecond; - typedef typename TensorTools::DecrementRank::type OutputDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputDivergence; // shortcut for types storing values on quadrature points typedef MooseArray FieldVariableValue; @@ -58,9 +58,9 @@ class MooseVariableField : public MooseVariableFieldBase, typedef typename Moose::ShapeType::type OutputShape; // type for gradient, second and divergence of shape functions of template class OutputType - typedef typename TensorTools::IncrementRank::type OutputShapeGradient; - typedef typename TensorTools::IncrementRank::type OutputShapeSecond; - typedef typename TensorTools::DecrementRank::type OutputShapeDivergence; + typedef typename libMesh::TensorTools::IncrementRank::type OutputShapeGradient; + typedef typename libMesh::TensorTools::IncrementRank::type OutputShapeSecond; + typedef typename libMesh::TensorTools::DecrementRank::type OutputShapeDivergence; // shortcut for types storing shape function values on quadrature points typedef MooseArray> FieldVariablePhiValue; @@ -353,10 +353,10 @@ class MooseVariableField : public MooseVariableFieldBase, virtual const DoFValue & dofValuesDotDotNeighbor() const = 0; virtual const DoFValue & dofValuesDotDotOld() const = 0; virtual const DoFValue & dofValuesDotDotOldNeighbor() const = 0; - virtual const MooseArray & dofValuesDuDotDu() const = 0; - virtual const MooseArray & dofValuesDuDotDuNeighbor() const = 0; - virtual const MooseArray & dofValuesDuDotDotDu() const = 0; - virtual const MooseArray & dofValuesDuDotDotDuNeighbor() const = 0; + virtual const MooseArray & dofValuesDuDotDu() const = 0; + virtual const MooseArray & dofValuesDuDotDuNeighbor() const = 0; + virtual const MooseArray & dofValuesDuDotDotDu() const = 0; + virtual const MooseArray & dofValuesDuDotDotDuNeighbor() const = 0; /** * tag values getters @@ -385,7 +385,7 @@ class MooseVariableField : public MooseVariableFieldBase, /** * Get the solution corresponding to the provided state */ - const NumericVector & getSolution(const Moose::StateArg & state) const; + const libMesh::NumericVector & getSolution(const Moose::StateArg & state) const; /// the time integrator used for computing time derivatives const TimeIntegrator * const _time_integrator; diff --git a/framework/include/variables/MooseVariableFieldBase.h b/framework/include/variables/MooseVariableFieldBase.h index 47fc2bc500d0..d85e90dac73f 100644 --- a/framework/include/variables/MooseVariableFieldBase.h +++ b/framework/include/variables/MooseVariableFieldBase.h @@ -182,18 +182,18 @@ class MooseVariableFieldBase : public MooseVariableBase /** * Insert the currently cached degree of freedom values into the provided \p vector */ - virtual void insert(NumericVector & vector) = 0; + virtual void insert(libMesh::NumericVector & vector) = 0; /** * Insert the currently cached degree of freedom values for a lower-dimensional element into the * provided \p vector */ - virtual void insertLower(NumericVector & vector) = 0; + virtual void insertLower(libMesh::NumericVector & vector) = 0; /** * Add the currently cached degree of freedom values into the provided \p vector */ - virtual void add(NumericVector & vector) = 0; + virtual void add(libMesh::NumericVector & vector) = 0; /** * Return phi size diff --git a/framework/include/vectorpostprocessors/LineMaterialSamplerBase.h b/framework/include/vectorpostprocessors/LineMaterialSamplerBase.h index 63e32722566c..f3b15ffd4757 100644 --- a/framework/include/vectorpostprocessors/LineMaterialSamplerBase.h +++ b/framework/include/vectorpostprocessors/LineMaterialSamplerBase.h @@ -149,7 +149,7 @@ LineMaterialSamplerBase::execute() std::vector intersected_elems; std::vector segments; - std::unique_ptr pl = _mesh.getPointLocator(); + std::unique_ptr pl = _mesh.getPointLocator(); Moose::elementsIntersectedByLine(_start, _end, _mesh, *pl, intersected_elems, segments); const RealVectorValue line_vec = _end - _start; diff --git a/framework/include/vectorpostprocessors/PointSamplerBase.h b/framework/include/vectorpostprocessors/PointSamplerBase.h index 519e839f62e7..9c3205a59a56 100644 --- a/framework/include/vectorpostprocessors/PointSamplerBase.h +++ b/framework/include/vectorpostprocessors/PointSamplerBase.h @@ -57,7 +57,7 @@ class PointSamplerBase : public GeneralVectorPostprocessor, protected SamplerBas std::vector _found_points; /// Point locator - std::unique_ptr _pl; + std::unique_ptr _pl; /// Postprocessor multiplying the variables const Real & _pp_value; diff --git a/framework/src/auxkernels/ElementQualityAux.C b/framework/src/auxkernels/ElementQualityAux.C index 0888ffa7dad0..ffa6ff5257fa 100644 --- a/framework/src/auxkernels/ElementQualityAux.C +++ b/framework/src/auxkernels/ElementQualityAux.C @@ -28,7 +28,8 @@ ElementQualityAux::validParams() } ElementQualityAux::ElementQualityAux(const InputParameters & parameters) - : AuxKernel(parameters), _metric_type(getParam("metric").getEnum()) + : AuxKernel(parameters), + _metric_type(getParam("metric").getEnum()) { if (isNodal()) mooseError("ElementQualityAux only works on elemental fields."); diff --git a/framework/src/bcs/FunctionPeriodicBoundary.C b/framework/src/bcs/FunctionPeriodicBoundary.C index f7db52ec846c..fb0c0faddcfe 100644 --- a/framework/src/bcs/FunctionPeriodicBoundary.C +++ b/framework/src/bcs/FunctionPeriodicBoundary.C @@ -35,7 +35,7 @@ FunctionPeriodicBoundary::FunctionPeriodicBoundary(FEProblemBase & feproblem, } FunctionPeriodicBoundary::FunctionPeriodicBoundary(const FunctionPeriodicBoundary & o) - : PeriodicBoundaryBase(o), _dim(o._dim), _tr_x(o._tr_x), _tr_y(o._tr_y), _tr_z(o._tr_z) + : libMesh::PeriodicBoundaryBase(o), _dim(o._dim), _tr_x(o._tr_x), _tr_y(o._tr_y), _tr_z(o._tr_z) { // Initialize the functions (i.e., call thier initialSetup methods) init(); @@ -71,7 +71,7 @@ FunctionPeriodicBoundary::get_corresponding_pos(const Point & pt) const return pt; } -std::unique_ptr +std::unique_ptr FunctionPeriodicBoundary::clone(TransformationType t) const { if (t == INVERSE) diff --git a/framework/src/bcs/IntegratedBC.C b/framework/src/bcs/IntegratedBC.C index 7222b814517c..4b86e0f108c5 100644 --- a/framework/src/bcs/IntegratedBC.C +++ b/framework/src/bcs/IntegratedBC.C @@ -98,7 +98,7 @@ IntegratedBC::computeResidual() if (_has_save_in) { - Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); + libMesh::Threads::spin_mutex::scoped_lock lock(libMesh::Threads::spin_mtx); for (unsigned int i = 0; i < _save_in.size(); i++) _save_in[i]->sys().solution().add_vector(_local_re, _save_in[i]->dofIndices()); } @@ -128,7 +128,7 @@ IntegratedBC::computeJacobian() for (unsigned int i = 0; i < rows; i++) diag(i) = _local_ke(i, i); - Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); + libMesh::Threads::spin_mutex::scoped_lock lock(libMesh::Threads::spin_mtx); for (unsigned int i = 0; i < _diag_save_in.size(); i++) _diag_save_in[i]->sys().solution().add_vector(diag, _diag_save_in[i]->dofIndices()); } diff --git a/framework/src/bounds/BoundsBase.C b/framework/src/bounds/BoundsBase.C index 3281ce136dc3..be4ba6ebd638 100644 --- a/framework/src/bounds/BoundsBase.C +++ b/framework/src/bounds/BoundsBase.C @@ -41,7 +41,7 @@ BoundsBase::BoundsBase(const InputParameters & parameters) mooseWarning("A variational inequalities solver must be used in conjunction with Bounds")); // Check that the bounded variable is of a supported type - if (!_bounded_var.isNodal() && (_bounded_var.feType().order != CONSTANT)) + if (!_bounded_var.isNodal() && (_bounded_var.feType().order != libMesh::CONSTANT)) paramError("bounded_variable", "Bounded variable must be nodal or of a CONSTANT order!"); const auto & dummy = diff --git a/framework/src/executioners/Eigenvalue.C b/framework/src/executioners/Eigenvalue.C index cf2634dd9080..a98863be4610 100644 --- a/framework/src/executioners/Eigenvalue.C +++ b/framework/src/executioners/Eigenvalue.C @@ -18,6 +18,9 @@ #include "libmesh/petsc_solver_exception.h" +// Needed for LIBMESH_CHECK_ERR +using libMesh::PetscSolverException; + registerMooseObject("MooseApp", Eigenvalue); InputParameters diff --git a/framework/src/fvkernels/FVPointValueConstraint.C b/framework/src/fvkernels/FVPointValueConstraint.C index 29259ce7be8f..9e10c59c1131 100644 --- a/framework/src/fvkernels/FVPointValueConstraint.C +++ b/framework/src/fvkernels/FVPointValueConstraint.C @@ -39,7 +39,7 @@ void FVPointValueConstraint::setMyElem() { // Find the element containing the point - _point_locator = PointLocatorBase::build(TREE_LOCAL_ELEMENTS, _mesh); + _point_locator = libMesh::PointLocatorBase::build(libMesh::TREE_LOCAL_ELEMENTS, _mesh); _point_locator->enable_out_of_mesh_mode(); // We only check in the restricted blocks, if needed @@ -48,11 +48,11 @@ FVPointValueConstraint::setMyElem() // We communicate the results and if there is conflict between processes, // the minimum cell ID is chosen - const dof_id_type elem_id = elem ? elem->id() : DofObject::invalid_id; + const dof_id_type elem_id = elem ? elem->id() : libMesh::DofObject::invalid_id; dof_id_type min_elem_id = elem_id; _mesh.comm().min(min_elem_id); - if (min_elem_id == DofObject::invalid_id) + if (min_elem_id == libMesh::DofObject::invalid_id) mooseError("The specified point for the FVPointValueConstraint is not in the " "domain! Try alleviating block restrictions or " "using another point!"); diff --git a/framework/src/kernels/ArrayKernel.C b/framework/src/kernels/ArrayKernel.C index aef0e31df237..4909bc1dabda 100644 --- a/framework/src/kernels/ArrayKernel.C +++ b/framework/src/kernels/ArrayKernel.C @@ -114,7 +114,7 @@ ArrayKernel::computeResidual() if (_has_save_in) { - Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); + libMesh::Threads::spin_mutex::scoped_lock lock(libMesh::Threads::spin_mtx); for (const auto & var : _save_in) { auto * avar = dynamic_cast(var); @@ -149,7 +149,7 @@ ArrayKernel::computeJacobian() if (_has_diag_save_in) { DenseVector diag = _assembly.getJacobianDiagonal(_local_ke); - Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); + libMesh::Threads::spin_mutex::scoped_lock lock(libMesh::Threads::spin_mtx); for (const auto & var : _diag_save_in) { auto * avar = dynamic_cast(var); @@ -198,7 +198,7 @@ ArrayKernel::computeOffDiagJacobian(const unsigned int jvar_num) if (_has_diag_save_in && same_var) { DenseVector diag = _assembly.getJacobianDiagonal(_local_ke); - Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); + libMesh::Threads::spin_mutex::scoped_lock lock(libMesh::Threads::spin_mtx); for (const auto & var : _diag_save_in) { auto * avar = dynamic_cast(var); diff --git a/framework/src/mesh/AnnularMesh.C b/framework/src/mesh/AnnularMesh.C index d0eccd1d7c57..ddcf2aae81d0 100644 --- a/framework/src/mesh/AnnularMesh.C +++ b/framework/src/mesh/AnnularMesh.C @@ -167,7 +167,7 @@ AnnularMesh::buildMesh() mesh.clear(); mesh.set_mesh_dimension(2); mesh.set_spatial_dimension(2); - BoundaryInfo & boundary_info = mesh.get_boundary_info(); + libMesh::BoundaryInfo & boundary_info = mesh.get_boundary_info(); const unsigned num_angular_nodes = (_full_annulus ? _nt : _nt + 1); const unsigned num_nodes = @@ -207,7 +207,7 @@ AnnularMesh::buildMesh() const Real x = current_r * std::cos(angle * M_PI / 180.0); const Real y = current_r * std::sin(angle * M_PI / 180.0); nodes[node_id] = mesh.add_point(Point(x, y, 0.0), node_id); - Elem * elem = mesh.add_elem(new Quad4); + Elem * elem = mesh.add_elem(new libMesh::Quad4); elem->set_node(0) = nodes[node_id]; elem->set_node(1) = nodes[node_id - 1]; elem->set_node(2) = nodes[node_id - num_angular_nodes - 1]; @@ -231,7 +231,7 @@ AnnularMesh::buildMesh() if (_full_annulus) { // add element connecting to node at angle=0 - Elem * elem = mesh.add_elem(new Quad4); + Elem * elem = mesh.add_elem(new libMesh::Quad4); elem->set_node(0) = nodes[node_id - num_angular_nodes]; elem->set_node(1) = nodes[node_id - 1]; elem->set_node(2) = nodes[node_id - num_angular_nodes - 1]; @@ -254,7 +254,7 @@ AnnularMesh::buildMesh() boundary_info.add_node(node_id, 0); // boundary_id=0 is centre for (unsigned angle_num = 0; angle_num < num_angular_nodes - 1; ++angle_num) { - Elem * elem = mesh.add_elem(new Tri3); + Elem * elem = mesh.add_elem(new libMesh::Tri3); elem->set_node(0) = nodes[node_id]; elem->set_node(1) = nodes[node_id - num_angular_nodes + angle_num]; elem->set_node(2) = nodes[node_id - num_angular_nodes + angle_num + 1]; @@ -262,7 +262,7 @@ AnnularMesh::buildMesh() } if (_full_annulus) { - Elem * elem = mesh.add_elem(new Tri3); + Elem * elem = mesh.add_elem(new libMesh::Tri3); elem->set_node(0) = nodes[node_id]; elem->set_node(1) = nodes[node_id - 1]; elem->set_node(2) = nodes[node_id - num_angular_nodes]; diff --git a/framework/src/mesh/ConcentricCircleMesh.C b/framework/src/mesh/ConcentricCircleMesh.C index 78bb831aa7bf..89f0756e8704 100644 --- a/framework/src/mesh/ConcentricCircleMesh.C +++ b/framework/src/mesh/ConcentricCircleMesh.C @@ -148,7 +148,7 @@ ConcentricCircleMesh::buildMesh() // volume preserving function for the center circle if (i == 0) { - const Real target_area = M_PI * Utility::pow<2>(total_concentric_circles[i]); + const Real target_area = M_PI * libMesh::Utility::pow<2>(total_concentric_circles[i]); Real modified_radius = std::sqrt(2 * target_area / std::sin(d_angle) / _num_sectors / 4); original_radius = total_concentric_circles[i]; total_concentric_circles[i] = modified_radius; @@ -156,10 +156,10 @@ ConcentricCircleMesh::buildMesh() else { // volume preserving functions for outer circles - const Real target_area = M_PI * (Utility::pow<2>(total_concentric_circles[i]) - - Utility::pow<2>(original_radius)); + const Real target_area = M_PI * (libMesh::Utility::pow<2>(total_concentric_circles[i]) - + libMesh::Utility::pow<2>(original_radius)); Real modified_radius = std::sqrt(target_area / std::sin(d_angle) / _num_sectors / 2 + - Utility::pow<2>(total_concentric_circles[i - 1])); + libMesh::Utility::pow<2>(total_concentric_circles[i - 1])); original_radius = total_concentric_circles[i]; total_concentric_circles[i] = modified_radius; } @@ -169,11 +169,11 @@ ConcentricCircleMesh::buildMesh() // number of total nodes unsigned num_total_nodes = 0; if (_has_outer_square) - num_total_nodes = Utility::pow<2>(_num_sectors / 2 + 1) + + num_total_nodes = libMesh::Utility::pow<2>(_num_sectors / 2 + 1) + (_num_sectors + 1) * (total_concentric_circles.size() + _rings.back()) + (_num_sectors + 1); else - num_total_nodes = Utility::pow<2>(_num_sectors / 2 + 1) + + num_total_nodes = libMesh::Utility::pow<2>(_num_sectors / 2 + 1) + (_num_sectors + 1) * total_concentric_circles.size(); std::vector nodes(num_total_nodes); @@ -329,9 +329,9 @@ ConcentricCircleMesh::buildMesh() } // adding elements for other concentric circles - index = Utility::pow<2>(_num_sectors / 2 + 1); + index = libMesh::Utility::pow<2>(_num_sectors / 2 + 1); limit = static_cast(num_total_nodes) - standard - 2; - int num_nodes_boundary = Utility::pow<2>(_num_sectors / 2 + 1) + _num_sectors + 1; + int num_nodes_boundary = libMesh::Utility::pow<2>(_num_sectors / 2 + 1) + _num_sectors + 1; counter = 0; while (index < limit) @@ -347,8 +347,8 @@ ConcentricCircleMesh::buildMesh() if (index < limit - (standard + 1) * i && index >= limit - (standard + 1) * (i + 1)) elem->subdomain_id() = subdomainIDs[subdomainIDs.size() - 1 - i]; - int const initial = Utility::pow<2>(standard / 2 + 1); - int const final = Utility::pow<2>(standard / 2 + 1) + _num_sectors - 1; + int const initial = libMesh::Utility::pow<2>(standard / 2 + 1); + int const final = libMesh::Utility::pow<2>(standard / 2 + 1) + _num_sectors - 1; if ((index - initial) % (standard + 1) == 0) boundary_info.add_side(elem, 0, 2); @@ -390,7 +390,7 @@ ConcentricCircleMesh::buildMesh() if (_portion == "top_left") { - MeshTools::Modification::rotate(mesh, 90, 0, 0); + libMesh::MeshTools::Modification::rotate(mesh, 90, 0, 0); boundary_info.sideset_name(1) = "bottom"; boundary_info.sideset_name(2) = "right"; @@ -404,7 +404,7 @@ ConcentricCircleMesh::buildMesh() } else if (_portion == "bottom_left") { - MeshTools::Modification::rotate(mesh, 180, 0, 0); + libMesh::MeshTools::Modification::rotate(mesh, 180, 0, 0); boundary_info.sideset_name(1) = "right"; boundary_info.sideset_name(2) = "top"; @@ -418,7 +418,7 @@ ConcentricCircleMesh::buildMesh() } else if (_portion == "bottom_right") { - MeshTools::Modification::rotate(mesh, 270, 0, 0); + libMesh::MeshTools::Modification::rotate(mesh, 270, 0, 0); boundary_info.sideset_name(1) = "top"; boundary_info.sideset_name(2) = "left"; @@ -435,16 +435,16 @@ ConcentricCircleMesh::buildMesh() { ReplicatedMesh other_mesh(mesh); // This is to rotate the mesh and also to reset boundary IDs. - MeshTools::Modification::rotate(other_mesh, 90, 0, 0); + libMesh::MeshTools::Modification::rotate(other_mesh, 90, 0, 0); if (_has_outer_square) { - MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); - MeshTools::Modification::change_boundary_id(other_mesh, 2, 6); - MeshTools::Modification::change_boundary_id(other_mesh, 3, 7); - MeshTools::Modification::change_boundary_id(other_mesh, 4, 1); - MeshTools::Modification::change_boundary_id(other_mesh, 5, 2); - MeshTools::Modification::change_boundary_id(other_mesh, 6, 3); - MeshTools::Modification::change_boundary_id(other_mesh, 7, 4); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 2, 6); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 3, 7); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 4, 1); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 5, 2); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 6, 3); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 7, 4); mesh.prepare_for_use(); other_mesh.prepare_for_use(); mesh.stitch_meshes(other_mesh, 1, 3, TOLERANCE, true); @@ -455,15 +455,15 @@ ConcentricCircleMesh::buildMesh() } else { - MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); - MeshTools::Modification::change_boundary_id(other_mesh, 2, 1); - MeshTools::Modification::change_boundary_id(other_mesh, 5, 2); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 2, 1); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 5, 2); mesh.prepare_for_use(); other_mesh.prepare_for_use(); mesh.stitch_meshes(other_mesh, 1, 1, TOLERANCE, true); - MeshTools::Modification::change_boundary_id(mesh, 2, 1); - MeshTools::Modification::change_boundary_id(mesh, 3, 2); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 2, 1); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 3, 2); mesh.get_boundary_info().sideset_name(1) = "bottom"; mesh.get_boundary_info().sideset_name(2) = "outer"; } @@ -474,16 +474,16 @@ ConcentricCircleMesh::buildMesh() { ReplicatedMesh other_mesh(mesh); // This is to rotate the mesh and also to reset boundary IDs. - MeshTools::Modification::rotate(other_mesh, 270, 0, 0); + libMesh::MeshTools::Modification::rotate(other_mesh, 270, 0, 0); if (_has_outer_square) { - MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); - MeshTools::Modification::change_boundary_id(other_mesh, 2, 6); - MeshTools::Modification::change_boundary_id(other_mesh, 3, 7); - MeshTools::Modification::change_boundary_id(other_mesh, 4, 3); - MeshTools::Modification::change_boundary_id(other_mesh, 5, 4); - MeshTools::Modification::change_boundary_id(other_mesh, 6, 1); - MeshTools::Modification::change_boundary_id(other_mesh, 7, 2); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 2, 6); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 3, 7); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 4, 3); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 5, 4); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 6, 1); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 7, 2); mesh.prepare_for_use(); other_mesh.prepare_for_use(); mesh.stitch_meshes(other_mesh, 2, 4, TOLERANCE, true); @@ -494,14 +494,14 @@ ConcentricCircleMesh::buildMesh() } else { - MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); - MeshTools::Modification::change_boundary_id(other_mesh, 2, 1); - MeshTools::Modification::change_boundary_id(other_mesh, 5, 2); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 2, 1); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 5, 2); mesh.prepare_for_use(); other_mesh.prepare_for_use(); mesh.stitch_meshes(other_mesh, 2, 2, TOLERANCE, true); - MeshTools::Modification::change_boundary_id(mesh, 3, 2); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 3, 2); mesh.get_boundary_info().sideset_name(1) = "left"; mesh.get_boundary_info().sideset_name(2) = "outer"; } @@ -512,26 +512,26 @@ ConcentricCircleMesh::buildMesh() ReplicatedMesh other_mesh(mesh); // This is to rotate the mesh and to reset boundary IDs. - MeshTools::Modification::rotate(other_mesh, 90, 0, 0); - MeshTools::Modification::rotate(mesh, 180, 0, 0); + libMesh::MeshTools::Modification::rotate(other_mesh, 90, 0, 0); + libMesh::MeshTools::Modification::rotate(mesh, 180, 0, 0); if (_has_outer_square) { // The other mesh is created by rotating the original mesh about 90 degrees. - MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); - MeshTools::Modification::change_boundary_id(other_mesh, 2, 6); - MeshTools::Modification::change_boundary_id(other_mesh, 3, 7); - MeshTools::Modification::change_boundary_id(other_mesh, 4, 1); - MeshTools::Modification::change_boundary_id(other_mesh, 5, 2); - MeshTools::Modification::change_boundary_id(other_mesh, 6, 3); - MeshTools::Modification::change_boundary_id(other_mesh, 7, 4); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 2, 6); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 3, 7); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 4, 1); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 5, 2); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 6, 3); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 7, 4); // The original mesh is then rotated about 180 degrees. - MeshTools::Modification::change_boundary_id(mesh, 1, 5); - MeshTools::Modification::change_boundary_id(mesh, 2, 6); - MeshTools::Modification::change_boundary_id(mesh, 3, 7); - MeshTools::Modification::change_boundary_id(mesh, 4, 2); - MeshTools::Modification::change_boundary_id(mesh, 5, 3); - MeshTools::Modification::change_boundary_id(mesh, 6, 4); - MeshTools::Modification::change_boundary_id(mesh, 7, 1); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 2, 6); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 3, 7); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 4, 2); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 5, 3); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 6, 4); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 7, 1); mesh.prepare_for_use(); other_mesh.prepare_for_use(); mesh.stitch_meshes(other_mesh, 4, 2, TOLERANCE, true); @@ -542,15 +542,15 @@ ConcentricCircleMesh::buildMesh() } else { - MeshTools::Modification::change_boundary_id(mesh, 1, 5); - MeshTools::Modification::change_boundary_id(mesh, 2, 1); - MeshTools::Modification::change_boundary_id(mesh, 5, 2); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 2, 1); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 5, 2); mesh.prepare_for_use(); other_mesh.prepare_for_use(); mesh.stitch_meshes(other_mesh, 1, 1, TOLERANCE, true); - MeshTools::Modification::change_boundary_id(mesh, 2, 1); - MeshTools::Modification::change_boundary_id(mesh, 3, 2); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 2, 1); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 3, 2); mesh.get_boundary_info().sideset_name(1) = "right"; mesh.get_boundary_info().sideset_name(2) = "outer"; } @@ -560,26 +560,26 @@ ConcentricCircleMesh::buildMesh() { ReplicatedMesh other_mesh(mesh); // This is to rotate the mesh and also to reset boundary IDs. - MeshTools::Modification::rotate(other_mesh, 180, 0, 0); - MeshTools::Modification::rotate(mesh, 270, 0, 0); + libMesh::MeshTools::Modification::rotate(other_mesh, 180, 0, 0); + libMesh::MeshTools::Modification::rotate(mesh, 270, 0, 0); if (_has_outer_square) { // The other mesh is created by rotating the original mesh about 180 degrees. - MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); - MeshTools::Modification::change_boundary_id(other_mesh, 2, 6); - MeshTools::Modification::change_boundary_id(other_mesh, 3, 7); - MeshTools::Modification::change_boundary_id(other_mesh, 4, 2); - MeshTools::Modification::change_boundary_id(other_mesh, 5, 3); - MeshTools::Modification::change_boundary_id(other_mesh, 6, 4); - MeshTools::Modification::change_boundary_id(other_mesh, 7, 1); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 2, 6); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 3, 7); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 4, 2); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 5, 3); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 6, 4); + libMesh::MeshTools::Modification::change_boundary_id(other_mesh, 7, 1); // The original mesh is rotated about 270 degrees. - MeshTools::Modification::change_boundary_id(mesh, 1, 5); - MeshTools::Modification::change_boundary_id(mesh, 2, 6); - MeshTools::Modification::change_boundary_id(mesh, 3, 7); - MeshTools::Modification::change_boundary_id(mesh, 4, 3); - MeshTools::Modification::change_boundary_id(mesh, 5, 4); - MeshTools::Modification::change_boundary_id(mesh, 6, 1); - MeshTools::Modification::change_boundary_id(mesh, 7, 2); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 2, 6); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 3, 7); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 4, 3); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 5, 4); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 6, 1); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 7, 2); mesh.prepare_for_use(); other_mesh.prepare_for_use(); mesh.stitch_meshes(other_mesh, 1, 3, TOLERANCE, true); @@ -590,15 +590,15 @@ ConcentricCircleMesh::buildMesh() } else { - MeshTools::Modification::change_boundary_id(mesh, 1, 5); - MeshTools::Modification::change_boundary_id(mesh, 2, 1); - MeshTools::Modification::change_boundary_id(mesh, 5, 2); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 2, 1); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 5, 2); mesh.prepare_for_use(); other_mesh.prepare_for_use(); mesh.stitch_meshes(other_mesh, 1, 1, TOLERANCE, true); - MeshTools::Modification::change_boundary_id(mesh, 2, 1); - MeshTools::Modification::change_boundary_id(mesh, 3, 2); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 2, 1); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 3, 2); mesh.get_boundary_info().sideset_name(1) = "top"; mesh.get_boundary_info().sideset_name(2) = "outer"; } @@ -609,18 +609,18 @@ ConcentricCircleMesh::buildMesh() ReplicatedMesh portion_two(mesh); // This is to rotate the mesh and also to reset boundary IDs. - MeshTools::Modification::rotate(portion_two, 90, 0, 0); + libMesh::MeshTools::Modification::rotate(portion_two, 90, 0, 0); if (_has_outer_square) { // Portion 2: 2nd quadrant - MeshTools::Modification::change_boundary_id(portion_two, 1, 5); - MeshTools::Modification::change_boundary_id(portion_two, 2, 6); - MeshTools::Modification::change_boundary_id(portion_two, 3, 7); - MeshTools::Modification::change_boundary_id(portion_two, 4, 1); - MeshTools::Modification::change_boundary_id(portion_two, 5, 2); - MeshTools::Modification::change_boundary_id(portion_two, 6, 3); - MeshTools::Modification::change_boundary_id(portion_two, 7, 4); + libMesh::MeshTools::Modification::change_boundary_id(portion_two, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(portion_two, 2, 6); + libMesh::MeshTools::Modification::change_boundary_id(portion_two, 3, 7); + libMesh::MeshTools::Modification::change_boundary_id(portion_two, 4, 1); + libMesh::MeshTools::Modification::change_boundary_id(portion_two, 5, 2); + libMesh::MeshTools::Modification::change_boundary_id(portion_two, 6, 3); + libMesh::MeshTools::Modification::change_boundary_id(portion_two, 7, 4); mesh.prepare_for_use(); portion_two.prepare_for_use(); // 'top_half' @@ -628,14 +628,14 @@ ConcentricCircleMesh::buildMesh() // 'bottom_half' ReplicatedMesh portion_bottom(mesh); - MeshTools::Modification::rotate(portion_bottom, 180, 0, 0); - MeshTools::Modification::change_boundary_id(portion_bottom, 1, 5); - MeshTools::Modification::change_boundary_id(portion_bottom, 2, 6); - MeshTools::Modification::change_boundary_id(portion_bottom, 3, 7); - MeshTools::Modification::change_boundary_id(portion_bottom, 4, 2); - MeshTools::Modification::change_boundary_id(portion_bottom, 5, 3); - MeshTools::Modification::change_boundary_id(portion_bottom, 6, 4); - MeshTools::Modification::change_boundary_id(portion_bottom, 7, 1); + libMesh::MeshTools::Modification::rotate(portion_bottom, 180, 0, 0); + libMesh::MeshTools::Modification::change_boundary_id(portion_bottom, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(portion_bottom, 2, 6); + libMesh::MeshTools::Modification::change_boundary_id(portion_bottom, 3, 7); + libMesh::MeshTools::Modification::change_boundary_id(portion_bottom, 4, 2); + libMesh::MeshTools::Modification::change_boundary_id(portion_bottom, 5, 3); + libMesh::MeshTools::Modification::change_boundary_id(portion_bottom, 6, 4); + libMesh::MeshTools::Modification::change_boundary_id(portion_bottom, 7, 1); mesh.prepare_for_use(); portion_bottom.prepare_for_use(); // 'full' @@ -649,21 +649,21 @@ ConcentricCircleMesh::buildMesh() } else { - MeshTools::Modification::change_boundary_id(portion_two, 1, 5); - MeshTools::Modification::change_boundary_id(portion_two, 2, 1); - MeshTools::Modification::change_boundary_id(portion_two, 5, 2); + libMesh::MeshTools::Modification::change_boundary_id(portion_two, 1, 5); + libMesh::MeshTools::Modification::change_boundary_id(portion_two, 2, 1); + libMesh::MeshTools::Modification::change_boundary_id(portion_two, 5, 2); // 'top half' mesh.prepare_for_use(); portion_two.prepare_for_use(); mesh.stitch_meshes(portion_two, 1, 1, TOLERANCE, true); // 'bottom half' ReplicatedMesh portion_bottom(mesh); - MeshTools::Modification::rotate(portion_bottom, 180, 0, 0); + libMesh::MeshTools::Modification::rotate(portion_bottom, 180, 0, 0); // 'full' mesh.prepare_for_use(); portion_bottom.prepare_for_use(); mesh.stitch_meshes(portion_bottom, 2, 2, TOLERANCE, true); - MeshTools::Modification::change_boundary_id(mesh, 3, 1); + libMesh::MeshTools::Modification::change_boundary_id(mesh, 3, 1); mesh.get_boundary_info().sideset_name(1) = "outer"; portion_bottom.clear(); } diff --git a/framework/src/mesh/FaceInfo.C b/framework/src/mesh/FaceInfo.C index e5c4ffce1bbd..360cfa7adeef 100644 --- a/framework/src/mesh/FaceInfo.C +++ b/framework/src/mesh/FaceInfo.C @@ -28,8 +28,9 @@ FaceInfo::FaceInfo(const ElemInfo * elem_info, unsigned int side, const dof_id_t // Compute face-related quantities unsigned int dim = _elem_info->elem()->dim(); const std::unique_ptr face = _elem_info->elem()->build_side_ptr(_elem_side_id); - std::unique_ptr fe(FEBase::build(dim, FEType(_elem_info->elem()->default_order()))); - QGauss qface(dim - 1, CONSTANT); + std::unique_ptr fe( + libMesh::FEBase::build(dim, libMesh::FEType(_elem_info->elem()->default_order()))); + libMesh::QGauss qface(dim - 1, libMesh::CONSTANT); fe->attach_quadrature_rule(&qface); const std::vector & normals = fe->get_normals(); fe->reinit(_elem_info->elem(), _elem_side_id); diff --git a/framework/src/mesh/FileMesh.C b/framework/src/mesh/FileMesh.C index 6fca191be0bc..76bb3b250fb9 100644 --- a/framework/src/mesh/FileMesh.C +++ b/framework/src/mesh/FileMesh.C @@ -19,6 +19,9 @@ #include "libmesh/nemesis_io.h" #include "libmesh/parallel_mesh.h" +using libMesh::ExodusII_IO; +using libMesh::Nemesis_IO; + registerMooseObject("MooseApp", FileMesh); InputParameters diff --git a/framework/src/mesh/MooseMesh.C b/framework/src/mesh/MooseMesh.C index bc0ebdff5404..9df8f95c0643 100644 --- a/framework/src/mesh/MooseMesh.C +++ b/framework/src/mesh/MooseMesh.C @@ -1699,7 +1699,7 @@ PointListAdaptor::getPoint( void MooseMesh::buildPeriodicNodeMap(std::multimap & periodic_node_map, unsigned int var_number, - PeriodicBoundaries * pbs) const + libMesh::PeriodicBoundaries * pbs) const { TIME_SECTION("buildPeriodicNodeMap", 5); @@ -1743,7 +1743,7 @@ MooseMesh::buildPeriodicNodeMap(std::multimap & period std::vector> ret_matches; // iterate over periodic nodes (boundary ids are in contiguous blocks) - PeriodicBoundaryBase * periodic = nullptr; + libMesh::PeriodicBoundaryBase * periodic = nullptr; BoundaryID current_bc_id = BoundaryInfo::invalid_id; for (auto & pair : periodic_nodes) { @@ -1784,7 +1784,7 @@ MooseMesh::buildPeriodicNodeMap(std::multimap & period void MooseMesh::buildPeriodicNodeSets(std::map> & periodic_node_sets, unsigned int var_number, - PeriodicBoundaries * pbs) const + libMesh::PeriodicBoundaries * pbs) const { TIME_SECTION("buildPeriodicNodeSets", 5); @@ -1801,7 +1801,7 @@ MooseMesh::buildPeriodicNodeSets(std::map> & p periodic_node_sets[bc_id].insert(node_id); else // This still might be a periodic node but we just haven't seen this boundary_id yet { - const PeriodicBoundaryBase * periodic = pbs->boundary(bc_id); + const libMesh::PeriodicBoundaryBase * periodic = pbs->boundary(bc_id); if (periodic && periodic->is_my_variable(var_number)) periodic_node_sets[bc_id].insert(node_id); } @@ -1908,15 +1908,15 @@ MooseMesh::detectPairedSidesets() plus_y_ids(dim), minus_z_ids(dim), plus_z_ids(dim); std::vector> fe_faces(dim); - std::vector> qfaces(dim); + std::vector> qfaces(dim); for (unsigned side_dim = 0; side_dim < dim; ++side_dim) { // Face is assumed to be flat, therefore normal is assumed to be // constant over the face, therefore only compute it at 1 qp. - qfaces[side_dim] = std::unique_ptr(new QGauss(side_dim, CONSTANT)); + qfaces[side_dim] = std::unique_ptr(new libMesh::QGauss(side_dim, CONSTANT)); // A first-order Lagrange FE for the face. - fe_faces[side_dim] = FEBase::build(side_dim + 1, FEType(FIRST, LAGRANGE)); + fe_faces[side_dim] = FEBase::build(side_dim + 1, FEType(FIRST, libMesh::LAGRANGE)); fe_faces[side_dim]->attach_quadrature_rule(qfaces[side_dim].get()); } @@ -2240,7 +2240,7 @@ MooseMesh::buildPRefinementAndCoarseningMaps(Assembly * const assembly) } // The only requirement on the FEType is that it can be arbitrarily p-refined - const FEType p_refinable_fe_type(CONSTANT, MONOMIAL); + const FEType p_refinable_fe_type(CONSTANT, libMesh::MONOMIAL); std::vector volume_ref_points_coarse, volume_ref_points_fine, face_ref_points_coarse, face_ref_points_fine; std::vector p_levels; @@ -2274,12 +2274,12 @@ MooseMesh::buildPRefinementAndCoarseningMaps(Assembly * const assembly) qrule->init(elem->type(), elem->p_level()); volume_ref_points_coarse = qrule->get_points(); fe_face->reinit(elem, (unsigned int)0); - FEInterface::inverse_map( + libMesh::FEInterface::inverse_map( dim, p_refinable_fe_type, elem, face_phys_points, face_ref_points_coarse); p_levels.resize(max_p_level + 1); std::iota(p_levels.begin(), p_levels.end(), 0); - MeshRefinement mesh_refinement(mesh); + libMesh::MeshRefinement mesh_refinement(mesh); for (const auto p_level : p_levels) { @@ -2287,7 +2287,7 @@ MooseMesh::buildPRefinementAndCoarseningMaps(Assembly * const assembly) qrule->init(elem->type(), elem->p_level()); volume_ref_points_fine = qrule->get_points(); fe_face->reinit(elem, (unsigned int)0); - FEInterface::inverse_map( + libMesh::FEInterface::inverse_map( dim, p_refinable_fe_type, elem, face_phys_points, face_ref_points_fine); const auto map_key = std::make_pair(elem_type, p_level); @@ -2528,8 +2528,8 @@ MooseMesh::findAdaptivityQpMaps(const Elem * template_elem, std::vector parent_ref_points; - FEInterface::inverse_map(elem->dim(), FEType(), elem, *q_points, parent_ref_points); - MeshRefinement mesh_refinement(mesh); + libMesh::FEInterface::inverse_map(elem->dim(), FEType(), elem, *q_points, parent_ref_points); + libMesh::MeshRefinement mesh_refinement(mesh); mesh_refinement.uniformly_refine(1); // A map from the child element index to the locations of all the child's quadrature points in @@ -2574,7 +2574,7 @@ MooseMesh::findAdaptivityQpMaps(const Elem * template_elem, std::vector child_ref_points; - FEInterface::inverse_map(elem->dim(), FEType(), elem, *q_points, child_ref_points); + libMesh::FEInterface::inverse_map(elem->dim(), FEType(), elem, *q_points, child_ref_points); child_to_ref_points[child] = child_ref_points; std::vector & qp_map = refinement_map[child]; @@ -3522,7 +3522,7 @@ MooseMesh::setPartitioner(MeshBase & mesh_base, break; case 0: // linear - mesh_base.partitioner().reset(new LinearPartitioner); + mesh_base.partitioner().reset(new libMesh::LinearPartitioner); break; case 1: // centroid { @@ -3534,20 +3534,24 @@ MooseMesh::setPartitioner(MeshBase & mesh_base, MooseEnum direction = params.get("centroid_partitioner_direction"); if (direction == "x") - mesh_base.partitioner().reset(new CentroidPartitioner(CentroidPartitioner::X)); + mesh_base.partitioner().reset( + new libMesh::CentroidPartitioner(libMesh::CentroidPartitioner::X)); else if (direction == "y") - mesh_base.partitioner().reset(new CentroidPartitioner(CentroidPartitioner::Y)); + mesh_base.partitioner().reset( + new libMesh::CentroidPartitioner(libMesh::CentroidPartitioner::Y)); else if (direction == "z") - mesh_base.partitioner().reset(new CentroidPartitioner(CentroidPartitioner::Z)); + mesh_base.partitioner().reset( + new libMesh::CentroidPartitioner(libMesh::CentroidPartitioner::Z)); else if (direction == "radial") - mesh_base.partitioner().reset(new CentroidPartitioner(CentroidPartitioner::RADIAL)); + mesh_base.partitioner().reset( + new libMesh::CentroidPartitioner(libMesh::CentroidPartitioner::RADIAL)); break; } case 2: // hilbert_sfc - mesh_base.partitioner().reset(new HilbertSFCPartitioner); + mesh_base.partitioner().reset(new libMesh::HilbertSFCPartitioner); break; case 3: // morton_sfc - mesh_base.partitioner().reset(new MortonSFCPartitioner); + mesh_base.partitioner().reset(new libMesh::MortonSFCPartitioner); break; } } @@ -3586,7 +3590,7 @@ MooseMesh::setIsCustomPartitionerRequested(bool cpr) _custom_partitioner_requested = cpr; } -std::unique_ptr +std::unique_ptr MooseMesh::getPointLocator() const { return getMesh().sub_point_locator(); diff --git a/framework/src/meshgenerators/ConcentricCircleMeshGenerator.C b/framework/src/meshgenerators/ConcentricCircleMeshGenerator.C index ca8536ca0b91..a6d6f5a4e27d 100644 --- a/framework/src/meshgenerators/ConcentricCircleMeshGenerator.C +++ b/framework/src/meshgenerators/ConcentricCircleMeshGenerator.C @@ -980,7 +980,7 @@ ConcentricCircleMeshGenerator::generate() mesh->prepare_for_use(); // Laplace smoothing - LaplaceMeshSmoother lms(*mesh); + libMesh::LaplaceMeshSmoother lms(*mesh); lms.smooth(_smoothing_max_it); mesh->prepare_for_use(); diff --git a/framework/src/meshgenerators/ExtraNodesetGenerator.C b/framework/src/meshgenerators/ExtraNodesetGenerator.C index eea80bc2810b..f84ab7493cff 100644 --- a/framework/src/meshgenerators/ExtraNodesetGenerator.C +++ b/framework/src/meshgenerators/ExtraNodesetGenerator.C @@ -78,7 +78,7 @@ ExtraNodesetGenerator::generate() // add nodes with their coordinates const auto dim = mesh->mesh_dimension(); - std::unique_ptr locator = mesh->sub_point_locator(); + std::unique_ptr locator = mesh->sub_point_locator(); locator->enable_out_of_mesh_mode(); const auto tolerance = getParam("tolerance"); diff --git a/framework/src/meshgenerators/FileMeshGenerator.C b/framework/src/meshgenerators/FileMeshGenerator.C index 697c3ad94fa9..a74412f1d4d1 100644 --- a/framework/src/meshgenerators/FileMeshGenerator.C +++ b/framework/src/meshgenerators/FileMeshGenerator.C @@ -93,7 +93,7 @@ FileMeshGenerator::generate() bool restart_exodus = (getParam("use_for_exodus_restart") && _app.getExodusFileRestart()); if (exodus) { - auto exreader = std::make_shared(*mesh); + auto exreader = std::make_shared(*mesh); MooseUtils::checkFileReadable(_file_name); if (has_exodus_integers) @@ -119,7 +119,7 @@ FileMeshGenerator::generate() if (getParam("clear_spline_nodes")) MeshTools::clear_spline_nodes(*mesh); } - MeshCommunication().broadcast(*mesh); + libMesh::MeshCommunication().broadcast(*mesh); } // Skip partitioning if the user requested it if (_skip_partitioning) diff --git a/framework/src/meshgenerators/FillBetweenSidesetsGenerator.C b/framework/src/meshgenerators/FillBetweenSidesetsGenerator.C index 9f96fcdd4715..d213854d9914 100644 --- a/framework/src/meshgenerators/FillBetweenSidesetsGenerator.C +++ b/framework/src/meshgenerators/FillBetweenSidesetsGenerator.C @@ -110,8 +110,8 @@ FillBetweenSidesetsGenerator::generate() auto input_mesh_2 = std::move(_input_2); // Only serialized meshes are supported right now - MeshSerializer serial_1(*input_mesh_1); - MeshSerializer serial_2(*input_mesh_2); + libMesh::MeshSerializer serial_1(*input_mesh_1); + libMesh::MeshSerializer serial_2(*input_mesh_2); if (*(input_mesh_1->elem_dimensions().begin()) != 2 || *(input_mesh_1->elem_dimensions().rbegin()) != 2) diff --git a/framework/src/meshgenerators/LowerDBlockFromSidesetGenerator.C b/framework/src/meshgenerators/LowerDBlockFromSidesetGenerator.C index 11841a5c2fa1..f32080199e68 100644 --- a/framework/src/meshgenerators/LowerDBlockFromSidesetGenerator.C +++ b/framework/src/meshgenerators/LowerDBlockFromSidesetGenerator.C @@ -108,8 +108,8 @@ LowerDBlockFromSidesetGenerator::generate() } } - std::set connected_elements(elements_to_send.begin(), - elements_to_send.end()); + std::set connected_elements( + elements_to_send.begin(), elements_to_send.end()); std::set connected_nodes; reconnect_nodes(connected_elements, connected_nodes); std::set connected_node_ids; diff --git a/framework/src/meshgenerators/MeshDiagnosticsGenerator.C b/framework/src/meshgenerators/MeshDiagnosticsGenerator.C index 2740aa87f396..9a34ae0a490a 100644 --- a/framework/src/meshgenerators/MeshDiagnosticsGenerator.C +++ b/framework/src/meshgenerators/MeshDiagnosticsGenerator.C @@ -207,8 +207,9 @@ MeshDiagnosticsGenerator::checkSidesetsOrientation(const std::unique_ptr face = elem_ptr->build_side_ptr(side_id); - std::unique_ptr fe(FEBase::build(elem_ptr->dim(), FEType(elem_ptr->default_order()))); - QGauss qface(elem_ptr->dim() - 1, CONSTANT); + std::unique_ptr fe( + libMesh::FEBase::build(elem_ptr->dim(), libMesh::FEType(elem_ptr->default_order()))); + libMesh::QGauss qface(elem_ptr->dim() - 1, CONSTANT); fe->attach_quadrature_rule(&qface); const auto & normals = fe->get_normals(); fe->reinit(elem_ptr, side_id); @@ -225,9 +226,9 @@ MeshDiagnosticsGenerator::checkSidesetsOrientation(const std::unique_ptr fe_neighbor( - FEBase::build(neighbor->dim(), FEType(neighbor->default_order()))); - QGauss qface(neighbor->dim() - 1, CONSTANT); + std::unique_ptr fe_neighbor(libMesh::FEBase::build( + neighbor->dim(), libMesh::FEType(neighbor->default_order()))); + libMesh::QGauss qface(neighbor->dim() - 1, CONSTANT); fe_neighbor->attach_quadrature_rule(&qface); const auto & neigh_normals = fe_neighbor->get_normals(); fe_neighbor->reinit(neighbor, neigh_side_index); @@ -491,7 +492,7 @@ MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity( // will modify the mesh for the analysis of the next nodes // Make a copy of the mesh, add this element auto mesh_copy = mesh->clone(); - MeshRefinement mesh_refiner(*mesh_copy); + libMesh::MeshRefinement mesh_refiner(*mesh_copy); // loop on nodes, assumes a replicated mesh for (auto & node : mesh->node_ptr_range()) @@ -1130,19 +1131,19 @@ MeshDiagnosticsGenerator::checkLocalJacobians(const std::unique_ptr & unsigned int num_negative_elem_qp_jacobians = 0; // Get a high-ish order quadrature auto qrule_dimension = mesh->mesh_dimension(); - QGauss qrule(qrule_dimension, FIFTH); + libMesh::QGauss qrule(qrule_dimension, FIFTH); // Use a constant monomial - const FEType fe_type(CONSTANT, libMesh::MONOMIAL); + const libMesh::FEType fe_type(CONSTANT, libMesh::MONOMIAL); // Initialize a basic constant monomial shape function everywhere - std::unique_ptr fe_elem; + std::unique_ptr fe_elem; if (mesh->mesh_dimension() == 1) - fe_elem = std::make_unique>(fe_type); + fe_elem = std::make_unique>(fe_type); if (mesh->mesh_dimension() == 2) - fe_elem = std::make_unique>(fe_type); + fe_elem = std::make_unique>(fe_type); else - fe_elem = std::make_unique>(fe_type); + fe_elem = std::make_unique>(fe_type); fe_elem->get_JxW(); fe_elem->attach_quadrature_rule(&qrule); @@ -1155,15 +1156,15 @@ MeshDiagnosticsGenerator::checkLocalJacobians(const std::unique_ptr & { // Re-initialize a quadrature qrule_dimension = elem->dim(); - qrule = QGauss(qrule_dimension, FIFTH); + qrule = libMesh::QGauss(qrule_dimension, FIFTH); // Re-initialize a monomial FE if (elem->dim() == 1) - fe_elem = std::make_unique>(fe_type); + fe_elem = std::make_unique>(fe_type); if (elem->dim() == 2) - fe_elem = std::make_unique>(fe_type); + fe_elem = std::make_unique>(fe_type); else - fe_elem = std::make_unique>(fe_type); + fe_elem = std::make_unique>(fe_type); fe_elem->get_JxW(); fe_elem->attach_quadrature_rule(&qrule); @@ -1197,7 +1198,7 @@ MeshDiagnosticsGenerator::checkLocalJacobians(const std::unique_ptr & unsigned int num_negative_side_qp_jacobians = 0; // Get a high-ish order side quadrature auto qrule_side_dimension = mesh->mesh_dimension() - 1; - QGauss qrule_side(qrule_side_dimension, FIFTH); + libMesh::QGauss qrule_side(qrule_side_dimension, FIFTH); // Use the side quadrature now fe_elem->attach_quadrature_rule(&qrule_side); @@ -1209,15 +1210,15 @@ MeshDiagnosticsGenerator::checkLocalJacobians(const std::unique_ptr & if (int(qrule_side_dimension) != elem->dim() - 1) { qrule_side_dimension = elem->dim() - 1; - qrule_side = QGauss(qrule_side_dimension, FIFTH); + qrule_side = libMesh::QGauss(qrule_side_dimension, FIFTH); // Re-initialize a side FE if (elem->dim() == 1) - fe_elem = std::make_unique>(fe_type); + fe_elem = std::make_unique>(fe_type); if (elem->dim() == 2) - fe_elem = std::make_unique>(fe_type); + fe_elem = std::make_unique>(fe_type); else - fe_elem = std::make_unique>(fe_type); + fe_elem = std::make_unique>(fe_type); fe_elem->get_JxW(); fe_elem->attach_quadrature_rule(&qrule_side); diff --git a/framework/src/meshgenerators/MeshGenerator.C b/framework/src/meshgenerators/MeshGenerator.C index f5c6aabce09a..3737ba4cc177 100644 --- a/framework/src/meshgenerators/MeshGenerator.C +++ b/framework/src/meshgenerators/MeshGenerator.C @@ -302,7 +302,7 @@ MeshGenerator::generateInternal() if (!getParam("nemesis")) { - ExodusII_IO exio(*mesh); + libMesh::ExodusII_IO exio(*mesh); if (mesh->mesh_dimension() == 1) exio.write_as_dimension(3); @@ -314,7 +314,7 @@ MeshGenerator::generateInternal() } else { - Nemesis_IO nemesis_io(*mesh); + libMesh::Nemesis_IO nemesis_io(*mesh); // Default to non-HDF5 output for wider compatibility nemesis_io.set_hdf5_writing(false); diff --git a/framework/src/meshgenerators/RefineBlockGenerator.C b/framework/src/meshgenerators/RefineBlockGenerator.C index a65f3fb8e598..2150a046c613 100644 --- a/framework/src/meshgenerators/RefineBlockGenerator.C +++ b/framework/src/meshgenerators/RefineBlockGenerator.C @@ -101,7 +101,7 @@ RefineBlockGenerator::generate() if (found_element_to_refine) { - MeshRefinement refinedmesh(*mesh_ptr); + libMesh::MeshRefinement refinedmesh(*mesh_ptr); if (!_enable_neighbor_refinement) refinedmesh.face_level_mismatch_limit() = 0; refinedmesh.refine_elements(); @@ -132,7 +132,7 @@ RefineBlockGenerator::recursive_refine(std::vector block_ids, elem->set_refinement_flag(Elem::REFINE); } } - MeshRefinement refinedmesh(*mesh); + libMesh::MeshRefinement refinedmesh(*mesh); if (!_enable_neighbor_refinement) refinedmesh.face_level_mismatch_limit() = 0; refinedmesh.refine_elements(); diff --git a/framework/src/meshgenerators/RefineSidesetGenerator.C b/framework/src/meshgenerators/RefineSidesetGenerator.C index fa5d134aecd2..affd3ab006c4 100644 --- a/framework/src/meshgenerators/RefineSidesetGenerator.C +++ b/framework/src/meshgenerators/RefineSidesetGenerator.C @@ -160,7 +160,7 @@ RefineSidesetGenerator::recursive_refine(std::vector boundary_ elem->set_refinement_flag(Elem::REFINE); } - MeshRefinement refinedmesh(*mesh); + libMesh::MeshRefinement refinedmesh(*mesh); if (!_enable_neighbor_refinement) refinedmesh.face_level_mismatch_limit() = 0; diff --git a/framework/src/meshgenerators/SideSetsFromPointsGenerator.C b/framework/src/meshgenerators/SideSetsFromPointsGenerator.C index 6841701df4c9..39ebe35a28c0 100644 --- a/framework/src/meshgenerators/SideSetsFromPointsGenerator.C +++ b/framework/src/meshgenerators/SideSetsFromPointsGenerator.C @@ -74,7 +74,8 @@ SideSetsFromPointsGenerator::generate() _visited.clear(); - std::unique_ptr pl = PointLocatorBase::build(TREE, *mesh); + std::unique_ptr pl = + libMesh::PointLocatorBase::build(libMesh::TREE, *mesh); for (const auto i : index_range(boundary_ids)) { diff --git a/framework/src/meshgenerators/SideSetsGeneratorBase.C b/framework/src/meshgenerators/SideSetsGeneratorBase.C index bd411075cddb..d924e4128138 100644 --- a/framework/src/meshgenerators/SideSetsGeneratorBase.C +++ b/framework/src/meshgenerators/SideSetsGeneratorBase.C @@ -119,10 +119,10 @@ SideSetsGeneratorBase::setup(MeshBase & mesh) const auto dim = mesh.mesh_dimension(); // Setup the FE Object so we can calculate normals - FEType fe_type(Utility::string_to_enum("CONSTANT"), - Utility::string_to_enum("MONOMIAL")); - _fe_face = FEBase::build(dim, fe_type); - _qface = std::make_unique(dim - 1, FIRST); + libMesh::FEType fe_type(Utility::string_to_enum("CONSTANT"), + Utility::string_to_enum("MONOMIAL")); + _fe_face = libMesh::FEBase::build(dim, fe_type); + _qface = std::make_unique(dim - 1, FIRST); _fe_face->attach_quadrature_rule(_qface.get()); // Must always pre-request quantities you want to compute _fe_face->get_normals(); diff --git a/framework/src/meshgenerators/SmoothMeshGenerator.C b/framework/src/meshgenerators/SmoothMeshGenerator.C index 22de6d122d99..129d4c2a1229 100644 --- a/framework/src/meshgenerators/SmoothMeshGenerator.C +++ b/framework/src/meshgenerators/SmoothMeshGenerator.C @@ -49,7 +49,7 @@ SmoothMeshGenerator::generate() auto mesh = dynamic_pointer_cast(old_mesh); - LaplaceMeshSmoother lms(static_cast(*mesh)); + libMesh::LaplaceMeshSmoother lms(static_cast(*mesh)); lms.smooth(_iterations); diff --git a/framework/src/meshgenerators/XYDelaunayGenerator.C b/framework/src/meshgenerators/XYDelaunayGenerator.C index 9254ba3f0312..13a554b143ad 100644 --- a/framework/src/meshgenerators/XYDelaunayGenerator.C +++ b/framework/src/meshgenerators/XYDelaunayGenerator.C @@ -184,8 +184,8 @@ XYDelaunayGenerator::generate() dynamic_pointer_cast(std::move(_bdy_ptr)); // Get ready to triangulate the line segments we extract from it - Poly2TriTriangulator poly2tri(*mesh); - poly2tri.triangulation_type() = TriangulatorInterface::PSLG; + libMesh::Poly2TriTriangulator poly2tri(*mesh); + poly2tri.triangulation_type() = libMesh::TriangulatorInterface::PSLG; // If we're using a user-requested subset of boundaries on that // mesh, get their ids. @@ -240,8 +240,8 @@ XYDelaunayGenerator::generate() poly2tri.minimum_angle() = 0; // Not yet supported poly2tri.smooth_after_generating() = _smooth_tri; - std::vector meshed_holes; - std::vector triangulator_hole_ptrs(_hole_ptrs.size()); + std::vector meshed_holes; + std::vector triangulator_hole_ptrs(_hole_ptrs.size()); std::vector> hole_ptrs(_hole_ptrs.size()); // This tells us the element orders of the hole meshes // For the boundary meshes, it can be access through poly2tri.segment_midpoints. @@ -463,14 +463,14 @@ XYDelaunayGenerator::generate() // redundant serialization and deserialization (libMesh // MeshedHole and stitch_meshes still also require // serialization) we'll do the serialization up front. - MeshSerializer serial_hole(hole_mesh); + libMesh::MeshSerializer serial_hole(hole_mesh); // It would have been nicer for MeshedHole to add the BCID // itself, but we want MeshedHole to work with a const mesh. // We'll still use MeshedHole, for its code distinguishing // outer boundaries from inner boundaries on a // hole-with-holes. - TriangulatorInterface::MeshedHole mh{hole_mesh}; + libMesh::TriangulatorInterface::MeshedHole mh{hole_mesh}; // We have to translate from MeshedHole points to mesh // sides. diff --git a/framework/src/meshgenerators/XYZDelaunayGenerator.C b/framework/src/meshgenerators/XYZDelaunayGenerator.C index f0726eae9f4a..9c55768f217d 100644 --- a/framework/src/meshgenerators/XYZDelaunayGenerator.C +++ b/framework/src/meshgenerators/XYZDelaunayGenerator.C @@ -120,7 +120,7 @@ XYZDelaunayGenerator::generate() dynamic_pointer_cast(std::move(_bdy_ptr)); // Get ready to triangulate its boundary - NetGenMeshInterface ngint(*mesh); + libMesh::NetGenMeshInterface ngint(*mesh); ngint.smooth_after_generating() = _smooth_tri; diff --git a/framework/src/meshmodifiers/ActivateElementsUserObjectBase.C b/framework/src/meshmodifiers/ActivateElementsUserObjectBase.C index 2dc5b1d2e333..f9c3c256b5fb 100644 --- a/framework/src/meshmodifiers/ActivateElementsUserObjectBase.C +++ b/framework/src/meshmodifiers/ActivateElementsUserObjectBase.C @@ -110,7 +110,7 @@ ActivateElementsUserObjectBase::finalize() Note: this needs to be done before updating boundary info because updating boundary requires the updated element subdomain ids */ - SyncSubdomainIds sync(_mesh.getMesh()); + libMesh::SyncSubdomainIds sync(_mesh.getMesh()); Parallel::sync_dofobject_data_by_id(_mesh.getMesh().comm(), _mesh.getMesh().elements_begin(), _mesh.getMesh().elements_end(), @@ -122,7 +122,7 @@ ActivateElementsUserObjectBase::finalize() auto displaced_problem = _fe_problem.getDisplacedProblem(); if (displaced_problem) { - SyncSubdomainIds sync_mesh(displaced_problem->mesh().getMesh()); + libMesh::SyncSubdomainIds sync_mesh(displaced_problem->mesh().getMesh()); Parallel::sync_dofobject_data_by_id(displaced_problem->mesh().getMesh().comm(), displaced_problem->mesh().getMesh().elements_begin(), displaced_problem->mesh().getMesh().elements_end(), diff --git a/framework/src/meshmodifiers/ElementSubdomainModifierBase.C b/framework/src/meshmodifiers/ElementSubdomainModifierBase.C index 04ff582ea07f..4b3e9d3a5636 100644 --- a/framework/src/meshmodifiers/ElementSubdomainModifierBase.C +++ b/framework/src/meshmodifiers/ElementSubdomainModifierBase.C @@ -253,7 +253,7 @@ ElementSubdomainModifierBase::applySubdomainChanges( } // Synchronize ghost element subdomain changes - SyncSubdomainIds sync(mesh.getMesh()); + libMesh::SyncSubdomainIds sync(mesh.getMesh()); Parallel::sync_dofobject_data_by_id( mesh.getMesh().comm(), mesh.getMesh().elements_begin(), mesh.getMesh().elements_end(), sync); } diff --git a/framework/src/partitioner/LibmeshPartitioner.C b/framework/src/partitioner/LibmeshPartitioner.C index 739b644bd74f..826b1141a9b2 100644 --- a/framework/src/partitioner/LibmeshPartitioner.C +++ b/framework/src/partitioner/LibmeshPartitioner.C @@ -51,14 +51,14 @@ LibmeshPartitioner::LibmeshPartitioner(const InputParameters & params) switch (_partitioner_name) { case -2: // metis - _partitioner = std::make_unique(); + _partitioner = std::make_unique(); break; case -1: // parmetis - _partitioner = std::make_unique(); + _partitioner = std::make_unique(); break; case 0: // linear - _partitioner = std::make_unique(); + _partitioner = std::make_unique(); break; case 1: // centroid { @@ -69,23 +69,27 @@ LibmeshPartitioner::LibmeshPartitioner(const InputParameters & params) MooseEnum direction = getParam("centroid_partitioner_direction"); if (direction == "x") - _partitioner = std::make_unique(CentroidPartitioner::X); + _partitioner = + std::make_unique(libMesh::CentroidPartitioner::X); else if (direction == "y") - _partitioner = std::make_unique(CentroidPartitioner::Y); + _partitioner = + std::make_unique(libMesh::CentroidPartitioner::Y); else if (direction == "z") - _partitioner = std::make_unique(CentroidPartitioner::Z); + _partitioner = + std::make_unique(libMesh::CentroidPartitioner::Z); else if (direction == "radial") - _partitioner = std::make_unique(CentroidPartitioner::RADIAL); + _partitioner = + std::make_unique(libMesh::CentroidPartitioner::RADIAL); break; } case 2: // hilbert_sfc - _partitioner = std::make_unique(); + _partitioner = std::make_unique(); break; case 3: // morton_sfc - _partitioner = std::make_unique(); + _partitioner = std::make_unique(); break; case 4: // subdomain_partitioner - _partitioner = std::make_unique(); + _partitioner = std::make_unique(); break; } } @@ -98,13 +102,13 @@ LibmeshPartitioner::clone() const switch (_partitioner_name) { case -2: // metis - return std::make_unique(); + return std::make_unique(); case -1: // parmetis - return std::make_unique(); + return std::make_unique(); case 0: // linear - return std::make_unique(); + return std::make_unique(); case 1: // centroid { @@ -115,13 +119,13 @@ LibmeshPartitioner::clone() const MooseEnum direction = getParam("centroid_partitioner_direction"); if (direction == "x") - return std::make_unique(CentroidPartitioner::X); + return std::make_unique(libMesh::CentroidPartitioner::X); else if (direction == "y") - return std::make_unique(CentroidPartitioner::Y); + return std::make_unique(libMesh::CentroidPartitioner::Y); else if (direction == "z") - return std::make_unique(CentroidPartitioner::Z); + return std::make_unique(libMesh::CentroidPartitioner::Z); else if (direction == "radial") - return std::make_unique(CentroidPartitioner::RADIAL); + return std::make_unique(libMesh::CentroidPartitioner::RADIAL); break; } case 2: // hilbert_sfc diff --git a/framework/src/userobjects/ElemSideNeighborLayersTester.C b/framework/src/userobjects/ElemSideNeighborLayersTester.C index d744b83efdd4..95cc0b43d61b 100644 --- a/framework/src/userobjects/ElemSideNeighborLayersTester.C +++ b/framework/src/userobjects/ElemSideNeighborLayersTester.C @@ -21,7 +21,7 @@ ElemSideNeighborLayersTester::validParams() InputParameters params = ElementUOProvider::validParams(); params.addParam( "rank", - DofObject::invalid_processor_id, + libMesh::DofObject::invalid_processor_id, "The rank for which the ghosted elements are recorded (Default: ALL)"); params.set("execute_on") = EXEC_TIMESTEP_BEGIN; @@ -62,7 +62,7 @@ ElemSideNeighborLayersTester::execute() { auto my_processor_id = processor_id(); - if (_rank == DofObject::invalid_processor_id || my_processor_id == _rank) + if (_rank == libMesh::DofObject::invalid_processor_id || my_processor_id == _rank) { for (const auto & current_elem : _fe_problem.getNonlinearEvaluableElementRange()) _evaluable_data.emplace(current_elem->id()); diff --git a/framework/src/userobjects/ElementQualityChecker.C b/framework/src/userobjects/ElementQualityChecker.C index 9064b6ce03a9..1caa1bb4a9c5 100644 --- a/framework/src/userobjects/ElementQualityChecker.C +++ b/framework/src/userobjects/ElementQualityChecker.C @@ -52,7 +52,7 @@ ElementQualityChecker::validParams() ElementQualityChecker::ElementQualityChecker(const InputParameters & parameters) : ElementUserObject(parameters), - _m_type(getParam("metric_type").getEnum()), + _m_type(getParam("metric_type").getEnum()), _has_upper_bound(isParamValid("upper_bound")), _has_lower_bound(isParamValid("lower_bound")), _upper_bound(_has_upper_bound ? getParam("upper_bound") : 0.0), @@ -80,7 +80,7 @@ void ElementQualityChecker::execute() { // obtain the available quality metric for current ElemType - std::vector metrics_avail = libMesh::Quality::valid(_current_elem->type()); + std::vector metrics_avail = libMesh::Quality::valid(_current_elem->type()); // check whether the provided quality metric is applicable to current ElemType if (!checkMetricApplicability(_m_type, metrics_avail)) @@ -197,8 +197,9 @@ ElementQualityChecker::finalize() } bool -ElementQualityChecker::checkMetricApplicability(const ElemQuality & elem_metric, - const std::vector & elem_metrics) +ElementQualityChecker::checkMetricApplicability( + const libMesh::ElemQuality & elem_metric, + const std::vector & elem_metrics) { bool has_metric = false; diff --git a/framework/src/userobjects/SolutionUserObject.C b/framework/src/userobjects/SolutionUserObject.C index c916bfbdf654..2d8d9d47f203 100644 --- a/framework/src/userobjects/SolutionUserObject.C +++ b/framework/src/userobjects/SolutionUserObject.C @@ -187,14 +187,14 @@ SolutionUserObject::readXda() // Use new read syntax (binary) if (_file_type == "xdr") _es->read(_es_file, - DECODE, + libMesh::DECODE, EquationSystems::READ_HEADER | EquationSystems::READ_DATA | EquationSystems::READ_ADDITIONAL_DATA); // Use new read syntax else if (_file_type == "xda") _es->read(_es_file, - READ, + libMesh::READ, EquationSystems::READ_HEADER | EquationSystems::READ_DATA | EquationSystems::READ_ADDITIONAL_DATA); @@ -216,7 +216,7 @@ SolutionUserObject::readExodusII() _system_name = "SolutionUserObjectSystem"; // Read the Exodus file - _exodusII_io = std::make_unique(*_mesh); + _exodusII_io = std::make_unique(*_mesh); _exodusII_io->read(_mesh_file); readBlockIdMapFromExodusII(); _exodus_times = &_exodusII_io->get_time_steps(); @@ -261,7 +261,7 @@ SolutionUserObject::readExodusII() // Create EquationSystems object for solution _es = std::make_unique(*_mesh); - _es->add_system(_system_name); + _es->add_system(_system_name); _system = &_es->get_system(_system_name); // Get the variable name lists as set; these need to be sets to perform set_intersection @@ -327,7 +327,7 @@ SolutionUserObject::readExodusII() { // Create a second equation system _es2 = std::make_unique(*_mesh); - _es2->add_system(_system_name); + _es2->add_system(_system_name); _system2 = &_es2->get_system(_system_name); // Add the variables to the system @@ -504,7 +504,7 @@ SolutionUserObject::initialSetup() // Initialize the serial solution vector _serialized_solution = NumericVector::build(_communicator); - _serialized_solution->init(_system->n_dofs(), false, SERIAL); + _serialized_solution->init(_system->n_dofs(), false, libMesh::SERIAL); // Pull down a full copy of this vector on every processor so we can get values in parallel _system->solution->localize(*_serialized_solution); @@ -528,8 +528,8 @@ SolutionUserObject::initialSetup() } // Create the MeshFunction for working with the solution data - _mesh_function = - std::make_unique(*_es, *_serialized_solution, _system->get_dof_map(), var_nums); + _mesh_function = std::make_unique( + *_es, *_serialized_solution, _system->get_dof_map(), var_nums); _mesh_function->init(); // Tell the MeshFunctions that we might be querying them outside the @@ -544,11 +544,11 @@ SolutionUserObject::initialSetup() // Need to pull down a full copy of this vector on every processor so we can get values in // parallel _serialized_solution2 = NumericVector::build(_communicator); - _serialized_solution2->init(_system2->n_dofs(), false, SERIAL); + _serialized_solution2->init(_system2->n_dofs(), false, libMesh::SERIAL); _system2->solution->localize(*_serialized_solution2); // Create the MeshFunction for the second copy of the data - _mesh_function2 = std::make_unique( + _mesh_function2 = std::make_unique( *_es2, *_serialized_solution2, _system2->get_dof_map(), var_nums); _mesh_function2->init(); _mesh_function2->enable_out_of_mesh_mode(default_values); @@ -1245,7 +1245,7 @@ void SolutionUserObject::readBlockIdMapFromExodusII() { #ifdef LIBMESH_HAVE_EXODUS_API - ExodusII_IO_Helper & exio_helper = _exodusII_io->get_exio_helper(); + libMesh::ExodusII_IO_Helper & exio_helper = _exodusII_io->get_exio_helper(); const auto & id_to_block = exio_helper.id_to_block_names; _block_name_to_id.clear(); _block_id_to_name.clear(); diff --git a/framework/src/vectorpostprocessors/ElementsAlongLine.C b/framework/src/vectorpostprocessors/ElementsAlongLine.C index bdbd2a7aaee7..7db20519b9a2 100644 --- a/framework/src/vectorpostprocessors/ElementsAlongLine.C +++ b/framework/src/vectorpostprocessors/ElementsAlongLine.C @@ -48,7 +48,7 @@ ElementsAlongLine::execute() std::vector intersected_elems; std::vector segments; - std::unique_ptr pl = _fe_problem.mesh().getPointLocator(); + std::unique_ptr pl = _fe_problem.mesh().getPointLocator(); Moose::elementsIntersectedByLine( _start, _end, _fe_problem.mesh(), *pl, intersected_elems, segments); diff --git a/framework/src/vectorpostprocessors/IntersectionPointsAlongLine.C b/framework/src/vectorpostprocessors/IntersectionPointsAlongLine.C index 126413ce22e2..55a15c605571 100644 --- a/framework/src/vectorpostprocessors/IntersectionPointsAlongLine.C +++ b/framework/src/vectorpostprocessors/IntersectionPointsAlongLine.C @@ -65,7 +65,7 @@ IntersectionPointsAlongLine::execute() std::vector intersected_elems; std::vector segments; - std::unique_ptr pl = _fe_problem.mesh().getPointLocator(); + std::unique_ptr pl = _fe_problem.mesh().getPointLocator(); // We may not have any elements along the given line; if so then // that shouldn't throw a libMesh error. diff --git a/framework/src/vectorpostprocessors/WorkBalance.C b/framework/src/vectorpostprocessors/WorkBalance.C index d9069e911d0f..40d382e2b651 100644 --- a/framework/src/vectorpostprocessors/WorkBalance.C +++ b/framework/src/vectorpostprocessors/WorkBalance.C @@ -228,7 +228,7 @@ public: processor_id_type _this_pid; - ElemSideBuilder _elem_side_builder; + libMesh::ElemSideBuilder _elem_side_builder; std::unique_ptr _petsc_partitioner;