https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Moose Namespace Reference

MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to address this in their environment if C++17 compatibility isn't found. More...

Namespaces

namespace  DataFileUtils
 
namespace  FV
 
namespace  internal
 
namespace  Kokkos
 
namespace  MFEM
 Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).
 
namespace  Mortar
 
namespace  ParameterRegistration
 
namespace  PetscSupport
 
namespace  SlepcSupport
 
namespace  UnitUtils
 
namespace  WebServerControlTypeRegistration
 Defines classes for registering values that can be parsed, communicated, and stored in the WebServerControl.
 

Classes

struct  _enumerate_iterator
 
struct  _enumerate_range
 
struct  _enumerate_struct
 
struct  ADType
 
struct  ADType< ADRankFourTensor >
 
struct  ADType< ADRankThreeTensor >
 
struct  ADType< ADRankTwoTensor >
 
struct  ADType< ADReal >
 
struct  ADType< ADSymmetricRankFourTensor >
 
struct  ADType< ADSymmetricRankTwoTensor >
 
struct  ADType< ADVariableGradient >
 
struct  ADType< ADVariableSecond >
 
struct  ADType< ADVariableValue >
 
struct  ADType< ChainedADReal >
 
struct  ADType< ChainedReal >
 
struct  ADType< DenseMatrix< T > >
 
struct  ADType< DenseVector< T > >
 
struct  ADType< Eigen::Matrix< T, M, N, O, M2, N2 > >
 
struct  ADType< Point >
 
struct  ADType< RankFourTensor >
 
struct  ADType< RankThreeTensor >
 
struct  ADType< RankTwoTensor >
 
struct  ADType< Real >
 
struct  ADType< RealEigenMatrix >
 
struct  ADType< RealEigenVector >
 
struct  ADType< RealVectorValue >
 
struct  ADType< std::list< T, std::allocator< T > > >
 
struct  ADType< std::set< T, std::less< T >, std::allocator< T > > >
 
struct  ADType< std::vector< T, std::allocator< T > > >
 
struct  ADType< SymmetricRankFourTensor >
 
struct  ADType< SymmetricRankTwoTensor >
 
struct  ADType< VariableGradient >
 
struct  ADType< VariableSecond >
 
struct  ADType< VariableValue >
 
struct  ADType< W< T > >
 
class  ADWrapperFunctor
 Wraps non-AD functors such that they can be used in objects that have requested the functor as AD. More...
 
class  ArrayComponentFunctor
 This is essentially a forwarding functor that forwards the spatial and temporal evaluation arguments to the parent array functor and then returns the result indexed at a given component. More...
 
class  BSpline
 Class implementing a uniform clamped B-Spline curve. More...
 
class  Builder
 Parses MOOSE input using HIT/WASP. More...
 
class  Capability
 An entry for a single capability. More...
 
class  CapabilityException
 Common execption to be thrown when interacting with capabilities. More...
 
class  ConstantFunctor
 Class template for creating constant functors. More...
 
struct  DerivativeStringClass
 Struct that all MOOSE derivative strings derive from. More...
 
struct  DOFType
 
struct  DOFType< RealVectorValue >
 
struct  ElemArg
 A structure that is used to evaluate Moose functors logically at an element/cell center. More...
 
struct  ElemPointArg
 A structure that is used to evaluate Moose functors at an arbitrary physical point contained within an element. More...
 
struct  ElemQpArg
 Argument for requesting functor evaluation at a quadrature point location in an element. More...
 
struct  ElemSideQpArg
 Argument for requesting functor evaluation at quadrature point locations on an element side. More...
 
struct  FaceArg
 A structure defining a "face" evaluation calling argument for Moose functors. More...
 
class  FunctionBase
 
class  FunctorAbstract
 Abstract base class that can be used to hold collections of functors. More...
 
class  FunctorBase
 Base class template for functor objects. More...
 
class  FunctorEnvelope
 This is a wrapper that forwards calls to the implementation, which can be switched out at any time without disturbing references to FunctorBase. More...
 
class  FunctorEnvelopeBase
 A non-templated base class for functors that allow an owner object to hold different class template instantiations of Functor in a single container. More...
 
struct  FunctorGradientEvaluationKind
 This structure takes an evaluation kind as a template argument and defines a constant expression indicating the associated gradient kind. More...
 
struct  FunctorGradientEvaluationKind< FunctorEvaluationKind::Dot >
 The gradient kind associated with a time derivative is the gradient of the time derivative. More...
 
struct  FunctorGradientEvaluationKind< FunctorEvaluationKind::Value >
 The gradient kind associated with a value is simply the gradient. More...
 
struct  FunctorReturnType
 A structure that defines the return type of a functor based on the type of the functor and the requested evaluation kind, e.g. More...
 
struct  FunctorReturnType< T, FunctorEvaluationKind::Dot >
 The return type of a time derivative evaluation is the same as the value type. More...
 
struct  FunctorReturnType< T, FunctorEvaluationKind::GradDot >
 The return type of a gradient of time derivative evaluation is the same as the gradient type. More...
 
struct  FunctorReturnType< T, FunctorEvaluationKind::Gradient >
 The return type of a gradient evaluation is the rank increment of a value return type. More...
 
struct  FunctorReturnType< T, FunctorEvaluationKind::Value >
 The return type for a value evaluation is just the type of the functor. More...
 
struct  indirect_comparator
 
struct  IsADType
 
struct  IsADType< ADPoint >
 
struct  IsADType< ADReal >
 
struct  IsADType< MetaPhysicL::DualNumber< T, Args... > >
 
struct  IsADType< W< T, Args... > >
 
class  LibtorchArtificialNeuralNet
 
class  LibtorchArtificialNeuralNetTrainer
 Templated class which is responsible for training LibtorchArtificialNeuralNets. More...
 
class  LibtorchDataset
 This class is a wrapper around a libtorch dataset which can be used by the data loaders in the neural net training process. More...
 
class  LibtorchNeuralNetBase
 This base class is meant to gather the functions and members common in every neural network based on Libtorch. More...
 
struct  LibtorchTrainingOptions
 A struct containing necessary information for training neural networks. More...
 
struct  NodeArg
 
class  NullFunctor
 A functor that serves as a placeholder during the simulation setup phase if a functor consumer requests a functor that has not yet been constructed. More...
 
class  ParameterRegistry
 Registry that allows for the typeless setting of a parameter value from a hit field. More...
 
class  PassKey
 
class  PeriodicBCHelper
 Helper class for setting up periodic boundary conditions via an Action. More...
 
class  RawValueFunctor
 
class  ScopedCommSwapper
 
class  ScopedDeprecatedIsError
 Scoped helper for setting Moose::_deprecated_is_error during this scope. More...
 
class  ScopedThrowOnError
 Scoped helper for setting Moose::_throw_on_error during this scope. More...
 
struct  SerialAccess
 Serial access requires object data to be stored contiguously. More...
 
class  SerialAccessRange
 
struct  SerialAccessValueTypeHelper
 Value type helper (necessary for any type that does not have a value_type member or where value_type doesn't have a suitable meaning (ADReal)). More...
 
struct  SerialAccessValueTypeHelper< ADReal >
 
struct  SerialAccessValueTypeHelper< Real >
 
struct  ShapeType
 
struct  ShapeType< Eigen::Matrix< Real, Eigen::Dynamic, 1 > >
 
class  Span
 Replacement for std::span which we only get in c++20. More...
 
struct  StateArg
 State argument for evaluating functors. More...
 
class  TorchScriptModule
 
struct  TypeList
 Helper structure to hold a list of types. More...
 
class  UnknownCapabilitiesException
 Exception thrown when capabilities are unknown. More...
 
class  UnusedWalker
 
class  VectorComponentFunctor
 This is essentially a forwarding functor that forwards the spatial and temporal evaluation arguments to the parent vector functor and then returns the result indexed at a given component. More...
 
class  VectorCompositeFunctor
 A functor that returns a vector composed of its component functor evaluations. More...
 
class  WebServerControlTypeRegistry
 A static registry used to register and build values of different types for the WebServerControl. More...
 

Typedefs

template<typename T >
using Functor = FunctorEnvelope< T >
 
template<typename T , bool is_ad>
using GenericType = typename std::conditional< is_ad, typename ADType< T >::type, T >::type
 
typedef std::function< void(const InputParameters &, InputParameters &)> RelationshipManagerInputParameterCallback
 The type for the callback to set RelationshipManager parameters.
 

Enumerations

enum class  FunctorEvaluationKind { Value , Gradient , Dot , GradDot }
 An enumeration of possible functor evaluation kinds. More...
 
enum  SolutionState : int { Current = 0 , Old = 1 , Older = 2 , PreviousNL = -1 }
 
enum class  SolutionIterationType : unsigned short {
  Time = 0 , Nonlinear , MultiAppFixedPoint , MultiSystemFixedPoint ,
  Count
}
 
enum  GeometryType { Volume , Face }
 
enum  MaterialDataType {
  BLOCK_MATERIAL_DATA , BOUNDARY_MATERIAL_DATA , FACE_MATERIAL_DATA , NEIGHBOR_MATERIAL_DATA ,
  INTERFACE_MATERIAL_DATA
}
 MaterialData types. More...
 
enum  AuxGroup { PRE_IC = 0 , PRE_AUX = 1 , POST_AUX = 2 , ALL = 3 }
 Flag for AuxKernel related execution type. More...
 
enum  VarKindType { VAR_SOLVER , VAR_AUXILIARY , VAR_ANY }
 Framework-wide stuff. More...
 
enum  VarFieldType {
  VAR_FIELD_STANDARD , VAR_FIELD_SCALAR , VAR_FIELD_VECTOR , VAR_FIELD_ARRAY ,
  VAR_FIELD_ANY
}
 
enum  CouplingType { COUPLING_DIAG , COUPLING_FULL , COUPLING_CUSTOM }
 
enum  ConstraintSideType { SIDE_PRIMARY , SIDE_SECONDARY }
 
enum  DGResidualType { Element , Neighbor }
 
enum  DGJacobianType { ElementElement , ElementNeighbor , NeighborElement , NeighborNeighbor }
 
enum  ConstraintType { Secondary = Element , Primary = Neighbor }
 
enum class  ElementType : unsigned int { Element = DGResidualType::Element , Neighbor = DGResidualType::Neighbor , Lower = DGResidualType::Neighbor + 1 }
 
enum class  MortarType : unsigned int { Secondary = static_cast<unsigned int>(Moose::ElementType::Element) , Primary = static_cast<unsigned int>(Moose::ElementType::Neighbor) , Lower = static_cast<unsigned int>(Moose::ElementType::Lower) }
 
enum class  ComputeType { Residual , Jacobian , ResidualAndJacobian }
 The type of nonlinear computation being performed. More...
 
enum class  RESTARTABLE_FILTER : unsigned char { RECOVERABLE }
 The filter type applied to a particular piece of "restartable" data. More...
 
enum  ConstraintJacobianType {
  SecondarySecondary = ElementElement , SecondaryPrimary = ElementNeighbor , PrimarySecondary = NeighborElement , PrimaryPrimary = NeighborNeighbor ,
  LowerLower , LowerSecondary , LowerPrimary , SecondaryLower ,
  PrimaryLower
}
 
enum  CoordinateSystemType : int { COORD_XYZ = 0 , COORD_RZ , COORD_RSPHERICAL }
 
enum  PCSideType { PCS_LEFT , PCS_RIGHT , PCS_SYMMETRIC , PCS_DEFAULT }
 Preconditioning side. More...
 
enum  MooseKSPNormType {
  KSPN_NONE , KSPN_PRECONDITIONED , KSPN_UNPRECONDITIONED , KSPN_NATURAL ,
  KSPN_DEFAULT
}
 Norm type for converge test. More...
 
enum  SolveType {
  ST_PJFNK , ST_JFNK , ST_NEWTON , ST_FD ,
  ST_LINEAR
}
 Type of the solve. More...
 
enum  EigenSolveType {
  EST_POWER , EST_ARNOLDI , EST_KRYLOVSCHUR , EST_JACOBI_DAVIDSON ,
  EST_NONLINEAR_POWER , EST_NEWTON , EST_PJFNK , EST_PJFNKMO ,
  EST_JFNK
}
 Type of the eigen solve. More...
 
enum  EigenProblemType {
  EPT_HERMITIAN , EPT_NON_HERMITIAN , EPT_GEN_HERMITIAN , EPT_GEN_INDEFINITE ,
  EPT_GEN_NON_HERMITIAN , EPT_POS_GEN_NON_HERMITIAN , EPT_SLEPC_DEFAULT
}
 Type of the eigen problem. More...
 
enum  WhichEigenPairs {
  WEP_LARGEST_MAGNITUDE , WEP_SMALLEST_MAGNITUDE , WEP_LARGEST_REAL , WEP_SMALLEST_REAL ,
  WEP_LARGEST_IMAGINARY , WEP_SMALLEST_IMAGINARY , WEP_TARGET_MAGNITUDE , WEP_TARGET_REAL ,
  WEP_TARGET_IMAGINARY , WEP_ALL_EIGENVALUES , WEP_SLEPC_DEFAULT
}
 Which eigen pairs. More...
 
enum  TimeIntegratorType {
  TI_IMPLICIT_EULER , TI_EXPLICIT_EULER , TI_CRANK_NICOLSON , TI_BDF2 ,
  TI_EXPLICIT_MIDPOINT , TI_LSTABLE_DIRK2 , TI_EXPLICIT_TVD_RK_2 , TI_NEWMARK_BETA
}
 Time integrators. More...
 
enum  ConstraintFormulationType { Penalty , Kinematic }
 Type of constraint formulation. More...
 
enum  LineSearchType {
  LS_INVALID , LS_DEFAULT , LS_NONE , LS_BASIC ,
  LS_SHELL , LS_CONTACT , LS_PROJECT , LS_L2 ,
  LS_BT , LS_CP
}
 Type of the line search. More...
 
enum  MffdType { MFFD_INVALID , MFFD_WP , MFFD_DS }
 Type of the matrix-free finite-differencing parameter. More...
 
enum  PatchUpdateType { Never , Always , Auto , Iteration }
 Type of patch update strategy for modeling node-face constraints or contact. More...
 
enum class  RelationshipManagerType : unsigned char { DEFAULT = 0 , GEOMETRIC = 1 << 0 , ALGEBRAIC = 1 << 1 , COUPLING = 1 << 2 }
 Main types of Relationship Managers. More...
 
enum  RMSystemType { NONLINEAR , AUXILIARY , NONE }
 
enum  VectorTagType { VECTOR_TAG_RESIDUAL = 0 , VECTOR_TAG_SOLUTION = 1 , VECTOR_TAG_ANY = 2 }
 
enum class  FEBackend { LibMesh , MFEM }
 

Functions

InputParameters commonAdaptivityParams ()
 
bool colorConsole ()
 Returns whether Console coloring is turned on (default: true).
 
bool setColorConsole (bool use_color, bool force=false)
 Turns color escape sequences on/off for info written to stdout.
 
void registerAll (Factory &f, ActionFactory &af, Syntax &s)
 Register objects that are in MOOSE.
 
void registerObjects (Factory &factory, const std::set< std::string > &obj_labels)
 
void addActionTypes (Syntax &syntax)
 
void registerActions (Syntax &syntax, ActionFactory &action_factory)
 Multiple Action class can be associated with a single input file section, in which case all associated Actions will be created and "acted" on when the associated input file section is seen.
 
void registerActions (Syntax &syntax, ActionFactory &action_factory, const std::set< std::string > &obj_labels)
 
void associateSyntax (Syntax &syntax, ActionFactory &action_factory)
 
void setSolverDefaults (FEProblemBase &problem)
 
MPI_Comm swapLibMeshComm (MPI_Comm new_comm)
 Swap the libMesh MPI communicator out for ours.
 
std::string hitMessagePrefix (const hit::Node &node)
 Get the prefix to be associated with a hit node for a message.
 
StateArg currentState ()
 
StateArg oldState ()
 
StateArg previousNonlinearState ()
 
StateArg previousMultiAppFixedPointState ()
 
StateArg previousMultiSystemFixedPointState ()
 
std::unique_ptr< MooseAppcreateMooseApp (const std::string &default_app_type, int argc, char *argv[])
 Create a MooseApp from command-line arguments.
 
template<typename DefaultAppType >
int main (int argc, char *argv[])
 Initialize, create and run a MooseApp.
 
void findContactPoint (PenetrationInfo &p_info, FEBase *fe_elem, FEBase *fe_side, FEType &, const libMesh::Point &secondary_point, bool start_with_centroid, const Real tangential_tolerance, bool &contact_point_on_side, bool &search_succeeded)
 Finds the closest point (called the contact point) on the primary_elem on side "side" to the secondary_point.
 
void restrictPointToFace (libMesh::Point &p, const libMesh::Elem *side, std::vector< const libMesh::Node * > &off_edge_nodes)
 
void to_json (nlohmann::json &json, const Moose::LibtorchArtificialNeuralNet *const &network)
 
void initial_condition (libMesh::EquationSystems &es, const std::string &system_name)
 
void assemble_matrix (EquationSystems &es, const std::string &system_name)
 
template<std::size_t N>
void derivInsert (SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N > > &derivs, libMesh::dof_id_type index, Real value)
 
bool globalADIndexing ()
 Whether we are using global AD indexing.
 
std::size_t adOffset (unsigned int var_num, std::size_t max_dofs_per_elem, ElementType element_type=ElementType::Element, unsigned int num_vars_in_system=0)
 Helper function for computing automatic differentiation offset.
 
std::size_t adOffset (unsigned int var_num, std::size_t max_dofs_per_elem, DGJacobianType dg_jacobian_type, unsigned int num_vars_in_system=0)
 
std::unordered_map< dof_id_type, Real > globalDofIndexToDerivative (const ADReal &ad_real, const SystemBase &sys, ElementType elem_type=ElementType::Element, THREAD_ID tid=0)
 Generate a map from global dof index to derivative value.
 
template<typename T >
auto globalDofIndexToDerivative (const T &ad_real_container, const SystemBase &sys, ElementType elem_type=ElementType::Element, THREAD_ID tid=0) -> std::vector< std::unordered_map< dof_id_type, typename std::enable_if< std::is_same< ADReal, typename T::value_type >::value, Real >::type > >
 Generate a map from global dof index to derivative value for a (probably quadrature-point-based) container like a material property or a variable value.
 
bool doDerivatives (const SubProblem &subproblem, const SystemBase &sys)
 
template<bool is_ad>
GenericReal< is_ad > ADRealToGenericReal (const ADReal &u_ad)
 Converts an ADReal to a GenericReal<is_ad>
 
template<typename T >
stringToEnum (const std::string &s)
 
template<>
libMesh::QuadratureType stringToEnum< libMesh::QuadratureType > (const std::string &s)
 
template<>
libMesh::Order stringToEnum< libMesh::Order > (const std::string &s)
 
template<>
CoordinateSystemType stringToEnum< CoordinateSystemType > (const std::string &s)
 
template<>
SolveType stringToEnum< SolveType > (const std::string &s)
 
template<>
LineSearchType stringToEnum< LineSearchType > (const std::string &s)
 
template<>
TimeIntegratorType stringToEnum< TimeIntegratorType > (const std::string &s)
 
template<>
RelationshipManagerType stringToEnum< RelationshipManagerType > (const std::string &s)
 
template<typename T >
std::vector< T > vectorStringsToEnum (const MultiMooseEnum &v)
 
template<typename T >
std::string stringify (const T &t)
 conversion to string
 
std::string stringify (bool v)
 
std::string stringify (int v)
 
std::string stringify (long v)
 
std::string stringify (long long v)
 
std::string stringify (unsigned int v)
 
std::string stringify (unsigned long v)
 
std::string stringify (unsigned long long v)
 
template<typename... T>
std::string stringify (std::variant< T... > v)
 
std::string stringify (const SolveType &t)
 Convert solve type into human readable string.
 
std::string stringify (const EigenSolveType &t)
 Convert eigen solve type into human readable string.
 
std::string stringify (const VarFieldType &t)
 Convert variable field type into human readable string.
 
std::string stringify (const std::string &s)
 Add no-op stringify if the argument already is a string (must use overloading)
 
std::string stringify (libMesh::FEFamily f)
 Convert FEType from libMesh into string.
 
std::string stringify (SolutionIterationType t)
 Convert SolutionIterationType into string.
 
std::string stringify (ElementType t)
 Convert ElementType into string.
 
std::string stringify (libMesh::ElemType t)
 Convert the libmesh ElemType into string.
 
template<typename T , typename U >
std::string stringify (const std::pair< T, U > &p, const std::string &delim=":")
 Add pair stringify to support maps.
 
template<typename... Args>
std::string stringify (const std::tuple< Args... > &t, const std::string &delim=":")
 Add tuple stringify.
 
template<template< typename... > class T, typename... U>
std::string stringify (const T< U... > &c, const std::string &delim=", ", const std::string &elem_encl="", bool enclose_list_in_curly_braces=false)
 Convert a container to a string with elements separated by delimiter of user's choice.
 
std::string stringifyExact (Real)
 Stringify Reals with enough precision to guarantee lossless Real -> string -> Real roundtrips.
 
void elementsIntersectedByPlane (const libMesh::Point &p0, const libMesh::Point &normal, const libMesh::MeshBase &mesh, std::vector< const libMesh::Elem * > &intersected_elems)
 Find all of the elements intersected by a plane.
 
void elementsIntersectedByPlane (const libMesh::Point &p0, const libMesh::Point &p1, const libMesh::Point &p2, const libMesh::MeshBase &mesh, std::vector< const libMesh::Elem * > &intersected_elems)
 Find all of the elements intersected by a plane.
 
template<class Iterator >
_enumerate_range< Iterator > enumerate (Iterator first, Iterator last, typename std::iterator_traits< Iterator >::difference_type initial)
 Enumerate function for iterating over a range and obtaining both a reference to the underlying type and an index simultaneously.
 
template<class Container >
_enumerate_range< typename Container::iterator > enumerate (Container &content)
 
template<class Container >
_enumerate_range< typename Container::const_iterator > enumerate (const Container &content)
 
std::string getExec ()
 Gets the full path to the running executable on Mac OS X and linux.
 
std::string getExecutablePath ()
 Gets the directory the running executable is on Mac OS X and linux.
 
std::string getExecutableName ()
 Gets the name of the running executable on Mac OS X and linux.
 
template<class RandomAccessIterator >
void initialize_indirect_sort (RandomAccessIterator beg, RandomAccessIterator end, std::vector< size_t > &b)
 
template<class RandomAccessIterator >
void indirectSort (RandomAccessIterator beg, RandomAccessIterator end, std::vector< size_t > &b)
 
template<class RandomAccessIterator , class UserComparisonFunctor >
void indirectSort (RandomAccessIterator beg, RandomAccessIterator end, std::vector< size_t > &b, UserComparisonFunctor user_comp)
 
template<typename T >
void applyIndices (T &container, const std::vector< size_t > &indices)
 Uses indices created by the indirectSort function to sort the given container (which must support random access, resizing, and std::swap.
 
template<typename T , typename C >
std::map< T, C > createMapFromVectors (const std::vector< T > &keys, const std::vector< C > &values)
 Create a map from two vectors.
 
template<typename T >
std::map< T, MooseEnumcreateMapFromVectorAndMultiMooseEnum (const std::vector< T > &keys, const MultiMooseEnum &values)
 Create a map from a vector of keys and MultiMooseEnum acting as a vector.
 
void hash_combine (std::size_t &)
 Used for hash function specialization for Attribute objects.
 
template<typename T , typename... Rest>
void hash_combine (std::size_t &seed, const T &v, Rest &&... rest)
 Used to combine an existing hash value with the hash of one or more other values (v and rest).
 
template<typename T , typename... Rest>
void hash_combine (std::size_t &seed, const std::vector< T > &v, Rest &&... rest)
 Used for hash function specialization for Attribute objects.
 
template<typename T , typename... Rest>
void hash_combine (std::size_t &seed, const std::set< T > &v, Rest &&... rest)
 Used for hash function specialization for Attribute objects.
 
template<typename T >
fe_lagrange_1D_shape (const Order order, const unsigned int i, const T &xi)
 
template<typename T >
fe_lagrange_1D_shape_deriv (const Order order, const unsigned int i, const T &xi)
 
template<typename T , template< typename > class VectorType>
fe_lagrange_2D_shape (const libMesh::ElemType type, const Order order, const unsigned int i, const VectorType< T > &p)
 
template<typename T , template< typename > class VectorType>
fe_lagrange_2D_shape_deriv (const libMesh::ElemType type, const Order order, const unsigned int i, const unsigned int j, const VectorType< T > &p)
 
std::string stringify (const Moose::RelationshipManagerType &t)
 
std::string stringify (const Moose::TimeIntegratorType &t)
 
template<class C >
auto makeSpan (C &container, std::size_t offset, std::size_t n)
 Helper function for creating a span from a given container.
 
template<std::size_t N>
void derivInsert (NumberArray< N, Real > &derivs, dof_id_type index, Real value)
 
void elementsIntersectedByLine (const Point &p0, const Point &p1, const MeshBase &mesh, const libMesh::PointLocatorBase &point_locator, std::vector< Elem * > &intersected_elems, std::vector< LineSegment > &segments)
 Find all of the elements intersected by a line.
 
 SERIAL_ACCESS_SCALAR (Real)
 
 SERIAL_ACCESS_SCALAR (ADReal)
 
 SERIAL_ACCESS_CONST_SIZE (libMesh::VectorValue, &obj(0u), Moose::dim)
 
 SERIAL_ACCESS_CONST_SIZE (RankTwoTensorTempl, &obj(0u, 0u), RankTwoTensorTempl< T >::N2)
 
 SERIAL_ACCESS_CONST_SIZE (RankFourTensorTempl, &obj(0u, 0u, 0u, 0u), RankFourTensorTempl< T >::N4)
 
 SERIAL_ACCESS_DYNAMIC_SIZE (DenseVector, &obj(0u), obj.size())
 
template<typename T >
SerialAccessRange< T > serialAccess (T &obj)
 
template<template< typename, int > class L, int I, typename T , typename... Ts, typename... As>
void typeLoopInternal (TypeList< T, Ts... >, As... args)
 Type loop.
 
template<template< typename, int > class L, typename... Ts, typename... As>
void typeLoop (TypeList< Ts... >, As... args)
 Type loop.
 
template<typename T >
void initDofIndices (T &data, const Elem &elem)
 
void associateSyntaxInner (Syntax &syntax, ActionFactory &action_factory)
 
bool isSectionActive (const hit::Node &node)
 
std::vector< std::string > findSimilar (const std::string &param, const std::vector< std::string > &options)
 
void compute_linear_system (libMesh::EquationSystems &es, const std::string &system_name)
 
void assemble_matrix (EquationSystems &es, const std::string &system_name)
 
void compute_jacobian (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, NonlinearImplicitSystem &sys)
 
void compute_bounds (NumericVector< Number > &lower, NumericVector< Number > &upper, NonlinearImplicitSystem &sys)
 
void compute_nullspace (std::vector< NumericVector< Number > * > &sp, NonlinearImplicitSystem &sys)
 
void compute_transpose_nullspace (std::vector< NumericVector< Number > * > &sp, NonlinearImplicitSystem &sys)
 
void compute_nearnullspace (std::vector< NumericVector< Number > * > &sp, NonlinearImplicitSystem &sys)
 
void compute_postcheck (const NumericVector< Number > &old_soln, NumericVector< Number > &search_direction, NumericVector< Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln, NonlinearImplicitSystem &sys)
 
void initCoordinateSystemType ()
 
void initSolveType ()
 
void initEigenSolveType ()
 
void initEigenProlemType ()
 
void initWhichEigenPairs ()
 
void initLineSearchType ()
 
void initTimeIntegratorsType ()
 
void initMffdType ()
 
void initRMType ()
 
template<>
QuadratureType stringToEnum< QuadratureType > (const std::string &s)
 
template<>
Order stringToEnum< Order > (const std::string &s)
 
template<>
CoordinateSystemType stringToEnum< CoordinateSystemType > (const std::string &s)
 
template<>
SolveType stringToEnum< SolveType > (const std::string &s)
 
template<>
EigenSolveType stringToEnum< EigenSolveType > (const std::string &s)
 
template<>
EigenProblemType stringToEnum< EigenProblemType > (const std::string &s)
 
template<>
WhichEigenPairs stringToEnum< WhichEigenPairs > (const std::string &s)
 
template<>
LineSearchType stringToEnum< LineSearchType > (const std::string &s)
 
template<>
TimeIntegratorType stringToEnum< TimeIntegratorType > (const std::string &s)
 
template<>
MffdType stringToEnum< MffdType > (const std::string &s)
 
template<>
RelationshipManagerType stringToEnum< RelationshipManagerType > (const std::string &s)
 
Point toPoint (const std::vector< Real > &pos)
 
void findElementsIntersectedByPlane (const libMesh::Plane &plane, const MeshBase &mesh, std::vector< const Elem * > &intersected_elems)
 
int sideIntersectedByLine (const Elem *elem, std::vector< int > &not_side, const LineSegment &line_segment, Point &intersection_point)
 Figure out which (if any) side of an Elem is intersected by a line.
 
int sideNeighborIsOn (const Elem *elem, const Elem *neighbor)
 Returns the side number for elem that neighbor is on.
 
void recursivelyFindElementsIntersectedByLine (const LineSegment &line_segment, const Elem *current_elem, int incoming_side, const Point &incoming_point, std::vector< Elem * > &intersected_elems, std::vector< LineSegment > &segments)
 Recursively find all elements intersected by a line segment.
 
void elementsIntersectedByLine (const Point &p0, const Point &p1, const MeshBase &, const PointLocatorBase &point_locator, std::vector< Elem * > &intersected_elems, std::vector< LineSegment > &segments)
 

Variables

static constexpr std::size_t dim = LIBMESH_DIM
 This is the dimension of all vector and tensor datastructures used in MOOSE.
 
constexpr std::size_t invalid_size_t = std::numeric_limits<std::size_t>::max()
 Value for invalid size_t indices.
 
volatile std::sig_atomic_t interrupt_signal_number = 0
 Used by the signal handler to determine if we should write a checkpoint file out at any point during operation.
 
bool show_multiple = false
 Set to false (the default) to display an error message only once for each error call code location (as opposed to every time the code is executed).
 
libMesh::PerfLog perf_log
 Perflog to be used by applications.
 
bool _trap_fpe
 Variable indicating whether we will enable FPE trapping for this run.
 
bool _warnings_are_errors = false
 Variable to toggle any warning into an error (includes deprecated code warnings)
 
bool _deprecated_is_error = false
 Variable to toggle only deprecated warnings as errors.
 
bool _throw_on_error = false
 Variable to turn on exceptions during mooseError(), should only be used within MOOSE unit tests or when about to perform threaded operations because exception throwing in threaded regions is safe while aborting is inherently not when singletons are involved (e.g.
 
bool _throw_on_warning = false
 Variable to turn on exceptions during mooseWarning(), should only be used in MOOSE unit tests.
 
ExecFlagEnum execute_flags
 Storage for the registered execute flags.
 
constexpr std::size_t constMaxQpsPerElem = 1000
 This is used for places where we initialize some qp-sized data structures that would end up being sized too small after the quadrature order gets bumped (dynamically in-sim).
 
template<class... Ts>
constexpr std::false_type always_false {}
 This is a helper variable template for cases when we want to use a default compile-time error with constexpr-based if conditions.
 
const processor_id_type INVALID_PROCESSOR_ID = libMesh::DofObject::invalid_processor_id
 
const SubdomainID ANY_BLOCK_ID = libMesh::Elem::invalid_subdomain_id - 1
 
const SubdomainID INVALID_BLOCK_ID = libMesh::Elem::invalid_subdomain_id
 
const BoundaryID ANY_BOUNDARY_ID = static_cast<BoundaryID>(-1)
 
const BoundaryID INVALID_BOUNDARY_ID = libMesh::BoundaryInfo::invalid_id
 
const TagID INVALID_TAG_ID = static_cast<TagID>(-1)
 
const TagTypeID INVALID_TAG_TYPE_ID = static_cast<TagTypeID>(-1)
 
const std::set< SubdomainIDEMPTY_BLOCK_IDS = {}
 
const std::set< BoundaryIDEMPTY_BOUNDARY_IDS = {}
 
const TagName SOLUTION_TAG = "SOLUTION"
 
const TagName OLD_SOLUTION_TAG = "SOLUTION_STATE_1"
 
const TagName OLDER_SOLUTION_TAG = "SOLUTION_STATE_2"
 
const TagName PREVIOUS_NL_SOLUTION_TAG = "U_PREVIOUS_NL_NEWTON"
 
const TagName PREVIOUS_MULTIAPP_FP_SOLUTION_TAG = "U_PREVIOUS_MULTIAPP_FP"
 
const TagName PREVIOUS_MULTISYSTEM_FP_SOLUTION_TAG = "U_PREVIOUS_MULTISYSTEM_FP"
 
const TagName SOLUTION_DOT_TAG = "u_dot_factor"
 
const TagName SOLUTION_DOTDOT_TAG = "u_dotdot_factor"
 
static bool _color_console = isatty(fileno(stdout))
 
std::map< std::string, CoordinateSystemTypecoordinate_system_type_to_enum
 
std::map< std::string, SolveTypesolve_type_to_enum
 
std::map< std::string, EigenSolveTypeeigen_solve_type_to_enum
 
std::map< std::string, EigenProblemTypeeigen_problem_type_to_enum
 
std::map< std::string, WhichEigenPairswhich_eigen_pairs_to_enum
 
std::map< std::string, LineSearchTypeline_search_type_to_enum
 
std::map< std::string, TimeIntegratorTypetime_integrator_to_enum
 
std::map< std::string, MffdTypemffd_type_to_enum
 
std::map< std::string, RelationshipManagerTyperm_type_to_enum
 

Detailed Description

MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to address this in their environment if C++17 compatibility isn't found.

Typedef Documentation

◆ Functor

template<typename T >
using Moose::Functor = typedef FunctorEnvelope<T>

Definition at line 33 of file MooseFunctorForward.h.

◆ GenericType

template<typename T , bool is_ad>
using Moose::GenericType = typedef typename std::conditional<is_ad, typename ADType<T>::type, T>::type

Definition at line 694 of file MooseTypes.h.

◆ RelationshipManagerInputParameterCallback

The type for the callback to set RelationshipManager parameters.

Definition at line 1043 of file MooseTypes.h.

Enumeration Type Documentation

◆ AuxGroup

Flag for AuxKernel related execution type.

Enumerator
PRE_IC 
PRE_AUX 
POST_AUX 
ALL 

Definition at line 757 of file MooseTypes.h.

758{
759 PRE_IC = 0,
760 PRE_AUX = 1,
761 POST_AUX = 2,
762 ALL = 3
763};
@ POST_AUX
Definition MooseTypes.h:761
@ PRE_AUX
Definition MooseTypes.h:760

◆ ComputeType

enum class Moose::ComputeType
strong

The type of nonlinear computation being performed.

Enumerator
Residual 
Jacobian 
ResidualAndJacobian 

Definition at line 834 of file MooseTypes.h.

◆ ConstraintFormulationType

Type of constraint formulation.

Enumerator
Penalty 
Kinematic 

Definition at line 971 of file MooseTypes.h.

972{
973 Penalty,
975};
@ Penalty
Definition MooseTypes.h:973
@ Kinematic
Definition MooseTypes.h:974

◆ ConstraintJacobianType

Enumerator
SecondarySecondary 
SecondaryPrimary 
PrimarySecondary 
PrimaryPrimary 
LowerLower 
LowerSecondary 
LowerPrimary 
SecondaryLower 
PrimaryLower 

Definition at line 850 of file MooseTypes.h.

◆ ConstraintSideType

Enumerator
SIDE_PRIMARY 
SIDE_SECONDARY 

Definition at line 791 of file MooseTypes.h.

792{
795};
@ SIDE_SECONDARY
Definition MooseTypes.h:794
@ SIDE_PRIMARY
Definition MooseTypes.h:793

◆ ConstraintType

Enumerator
Secondary 
Primary 

Definition at line 811 of file MooseTypes.h.

812{
815};
@ Neighbor
Definition MooseTypes.h:800
@ Primary
Definition MooseTypes.h:814
@ Secondary
Definition MooseTypes.h:813

◆ CoordinateSystemType

Enumerator
COORD_XYZ 
COORD_RZ 
COORD_RSPHERICAL 

Definition at line 863 of file MooseTypes.h.

864{
865 COORD_XYZ = 0,
866 COORD_RZ,
868};
@ COORD_RZ
Definition MooseTypes.h:866
@ COORD_RSPHERICAL
Definition MooseTypes.h:867
@ COORD_XYZ
Definition MooseTypes.h:865

◆ CouplingType

Enumerator
COUPLING_DIAG 
COUPLING_FULL 
COUPLING_CUSTOM 

Definition at line 784 of file MooseTypes.h.

785{
789};
@ COUPLING_FULL
Definition MooseTypes.h:787
@ COUPLING_DIAG
Definition MooseTypes.h:786
@ COUPLING_CUSTOM
Definition MooseTypes.h:788

◆ DGJacobianType

Enumerator
ElementElement 
ElementNeighbor 
NeighborElement 
NeighborNeighbor 

Definition at line 803 of file MooseTypes.h.

◆ DGResidualType

Enumerator
Element 
Neighbor 

Definition at line 797 of file MooseTypes.h.

798{
799 Element,
801};

◆ EigenProblemType

Type of the eigen problem.

Enumerator
EPT_HERMITIAN 

Hermitian.

EPT_NON_HERMITIAN 

Non-Hermitian.

EPT_GEN_HERMITIAN 

Generalized Hermitian.

EPT_GEN_INDEFINITE 

Generalized Hermitian indefinite.

EPT_GEN_NON_HERMITIAN 

Generalized Non-Hermitian.

EPT_POS_GEN_NON_HERMITIAN 

Generalized Non-Hermitian with positive (semi-)definite B.

EPT_SLEPC_DEFAULT 

use whatever SLPEC has by default

Definition at line 924 of file MooseTypes.h.

925{
933};
@ EPT_GEN_INDEFINITE
Generalized Hermitian indefinite.
Definition MooseTypes.h:929
@ EPT_NON_HERMITIAN
Non-Hermitian.
Definition MooseTypes.h:927
@ EPT_GEN_HERMITIAN
Generalized Hermitian.
Definition MooseTypes.h:928
@ EPT_HERMITIAN
Hermitian.
Definition MooseTypes.h:926
@ EPT_GEN_NON_HERMITIAN
Generalized Non-Hermitian.
Definition MooseTypes.h:930
@ EPT_POS_GEN_NON_HERMITIAN
Generalized Non-Hermitian with positive (semi-)definite B.
Definition MooseTypes.h:931
@ EPT_SLEPC_DEFAULT
use whatever SLPEC has by default
Definition MooseTypes.h:932

◆ EigenSolveType

Type of the eigen solve.

Enumerator
EST_POWER 

Power / Inverse / RQI.

EST_ARNOLDI 

Arnoldi.

EST_KRYLOVSCHUR 

Krylov-Schur.

EST_JACOBI_DAVIDSON 

Jacobi-Davidson.

EST_NONLINEAR_POWER 

Nonlinear inverse power.

EST_NEWTON 

Newton-based eigensolver with an assembled Jacobian matrix (fully coupled by default)

EST_PJFNK 

Preconditioned Jacobian-free Newton Krylov.

EST_PJFNKMO 

The same as PJFNK except that matrix-vector multiplication is employed to replace residual evaluation in linear solver.

EST_JFNK 

Jacobian-free Newton Krylov.

Definition at line 908 of file MooseTypes.h.

909{
910 EST_POWER,
915 EST_NEWTON,
916 EST_PJFNK,
918 EST_JFNK
919};
@ EST_PJFNKMO
The same as PJFNK except that matrix-vector multiplication is employed to replace residual evaluation...
Definition MooseTypes.h:917
@ EST_JACOBI_DAVIDSON
Jacobi-Davidson.
Definition MooseTypes.h:913
@ EST_KRYLOVSCHUR
Krylov-Schur.
Definition MooseTypes.h:912
@ EST_JFNK
Jacobian-free Newton Krylov.
Definition MooseTypes.h:918
@ EST_NEWTON
Newton-based eigensolver with an assembled Jacobian matrix (fully coupled by default)
Definition MooseTypes.h:915
@ EST_POWER
Power / Inverse / RQI.
Definition MooseTypes.h:910
@ EST_NONLINEAR_POWER
Nonlinear inverse power.
Definition MooseTypes.h:914
@ EST_ARNOLDI
Arnoldi.
Definition MooseTypes.h:911
@ EST_PJFNK
Preconditioned Jacobian-free Newton Krylov.
Definition MooseTypes.h:916

◆ ElementType

enum class Moose::ElementType : unsigned int
strong
Enumerator
Element 
Neighbor 
Lower 

Definition at line 817 of file MooseTypes.h.

818{
819 Element = DGResidualType::Element,
820 Neighbor = DGResidualType::Neighbor,
821 Lower = DGResidualType::Neighbor + 1
822};

◆ FEBackend

enum class Moose::FEBackend
strong
Enumerator
LibMesh 
MFEM 

Definition at line 1315 of file MooseTypes.h.

1316{
1317 LibMesh
1318#ifdef MOOSE_MFEM_ENABLED
1319 ,
1320 MFEM
1321#endif
1322};

◆ FunctorEvaluationKind

enum class Moose::FunctorEvaluationKind
strong

An enumeration of possible functor evaluation kinds.

The available options are value, gradient, time derivative (dot), and gradient of time derivative (gradDot)

Enumerator
Value 
Gradient 
Dot 
GradDot 

Definition at line 36 of file MooseFunctor.h.

◆ GeometryType

Enumerator
Volume 
Face 

Definition at line 282 of file MooseTypes.h.

283{
284 Volume,
285 Face
286};

◆ LineSearchType

Type of the line search.

Enumerator
LS_INVALID 

means not set

LS_DEFAULT 
LS_NONE 
LS_BASIC 
LS_SHELL 
LS_CONTACT 
LS_PROJECT 
LS_L2 
LS_BT 
LS_CP 

Definition at line 979 of file MooseTypes.h.

980{
981 LS_INVALID,
983 LS_NONE,
984 LS_BASIC,
985 LS_SHELL,
988 LS_L2,
989 LS_BT,
990 LS_CP
991};
@ LS_DEFAULT
Definition MooseTypes.h:982
@ LS_NONE
Definition MooseTypes.h:983
@ LS_PROJECT
Definition MooseTypes.h:987
@ LS_CONTACT
Definition MooseTypes.h:986
@ LS_SHELL
Definition MooseTypes.h:985
@ LS_BASIC
Definition MooseTypes.h:984
@ LS_INVALID
means not set
Definition MooseTypes.h:981

◆ MaterialDataType

MaterialData types.

See also
FEProblemBase, MaterialPropertyInterface
Enumerator
BLOCK_MATERIAL_DATA 
BOUNDARY_MATERIAL_DATA 
FACE_MATERIAL_DATA 
NEIGHBOR_MATERIAL_DATA 
INTERFACE_MATERIAL_DATA 

Definition at line 745 of file MooseTypes.h.

◆ MffdType

Type of the matrix-free finite-differencing parameter.

Enumerator
MFFD_INVALID 

means not set

MFFD_WP 
MFFD_DS 

Definition at line 996 of file MooseTypes.h.

997{
999 MFFD_WP,
1000 MFFD_DS
1001};
@ MFFD_WP
Definition MooseTypes.h:999
@ MFFD_INVALID
means not set
Definition MooseTypes.h:998

◆ MooseKSPNormType

Norm type for converge test.

Enumerator
KSPN_NONE 
KSPN_PRECONDITIONED 
KSPN_UNPRECONDITIONED 
KSPN_NATURAL 
KSPN_DEFAULT 

Use whatever we have in PETSc.

Definition at line 884 of file MooseTypes.h.

885{
886 KSPN_NONE,
891};
@ KSPN_NONE
Definition MooseTypes.h:886
@ KSPN_PRECONDITIONED
Definition MooseTypes.h:887
@ KSPN_UNPRECONDITIONED
Definition MooseTypes.h:888
@ KSPN_DEFAULT
Use whatever we have in PETSc.
Definition MooseTypes.h:890
@ KSPN_NATURAL
Definition MooseTypes.h:889

◆ MortarType

enum class Moose::MortarType : unsigned int
strong
Enumerator
Secondary 
Primary 
Lower 

Definition at line 824 of file MooseTypes.h.

825{
826 Secondary = static_cast<unsigned int>(Moose::ElementType::Element),
827 Primary = static_cast<unsigned int>(Moose::ElementType::Neighbor),
828 Lower = static_cast<unsigned int>(Moose::ElementType::Lower)
829};

◆ PatchUpdateType

Type of patch update strategy for modeling node-face constraints or contact.

Enumerator
Never 
Always 
Auto 
Iteration 

Definition at line 1006 of file MooseTypes.h.

1007{
1008 Never,
1009 Always,
1010 Auto,
1011 Iteration
1012};
@ Iteration

◆ PCSideType

Preconditioning side.

Enumerator
PCS_LEFT 
PCS_RIGHT 
PCS_SYMMETRIC 
PCS_DEFAULT 

Use whatever we have in PETSc.

Definition at line 873 of file MooseTypes.h.

874{
875 PCS_LEFT,
876 PCS_RIGHT,
879};
@ PCS_LEFT
Definition MooseTypes.h:875
@ PCS_DEFAULT
Use whatever we have in PETSc.
Definition MooseTypes.h:878
@ PCS_SYMMETRIC
Definition MooseTypes.h:877
@ PCS_RIGHT
Definition MooseTypes.h:876

◆ RelationshipManagerType

enum class Moose::RelationshipManagerType : unsigned char
strong

Main types of Relationship Managers.

Enumerator
DEFAULT 
GEOMETRIC 
ALGEBRAIC 
COUPLING 

Definition at line 1017 of file MooseTypes.h.

◆ RESTARTABLE_FILTER

enum class Moose::RESTARTABLE_FILTER : unsigned char
strong

The filter type applied to a particular piece of "restartable" data.

These filters will be applied during deserialization to include or exclude data as appropriate.

Enumerator
RECOVERABLE 

Definition at line 845 of file MooseTypes.h.

◆ RMSystemType

Enumerator
NONLINEAR 
AUXILIARY 
NONE 

Definition at line 1025 of file MooseTypes.h.

1026{
1027 NONLINEAR,
1028 AUXILIARY,
1029 NONE
1030};
@ AUXILIARY

◆ SolutionIterationType

enum class Moose::SolutionIterationType : unsigned short
strong
Enumerator
Time 
Nonlinear 
MultiAppFixedPoint 
MultiSystemFixedPoint 
Count 

Definition at line 269 of file MooseTypes.h.

270{
271 Time = 0,
272 Nonlinear,
275 // Special name for determing the total size of
276 // iteration types. If adding a new type, it should
277 // always be above this entry.
278 Count
279};

◆ SolutionState

Enumerator
Current 
Old 
Older 
PreviousNL 

Definition at line 261 of file MooseTypes.h.

262{
263 Current = 0,
264 Old = 1,
265 Older = 2,
266 PreviousNL = -1
267};
@ Current
Definition MooseTypes.h:263
@ PreviousNL
Definition MooseTypes.h:266

◆ SolveType

Type of the solve.

Enumerator
ST_PJFNK 

Preconditioned Jacobian-Free Newton Krylov.

ST_JFNK 

Jacobian-Free Newton Krylov.

ST_NEWTON 

Full Newton Solve.

ST_FD 

Use finite differences to compute Jacobian.

ST_LINEAR 

Solving a linear problem.

Definition at line 896 of file MooseTypes.h.

897{
898 ST_PJFNK,
899 ST_JFNK,
900 ST_NEWTON,
901 ST_FD,
902 ST_LINEAR
903};
@ ST_FD
Use finite differences to compute Jacobian.
Definition MooseTypes.h:901
@ ST_LINEAR
Solving a linear problem.
Definition MooseTypes.h:902
@ ST_NEWTON
Full Newton Solve.
Definition MooseTypes.h:900
@ ST_JFNK
Jacobian-Free Newton Krylov.
Definition MooseTypes.h:899
@ ST_PJFNK
Preconditioned Jacobian-Free Newton Krylov.
Definition MooseTypes.h:898

◆ TimeIntegratorType

Time integrators.

Enumerator
TI_IMPLICIT_EULER 
TI_EXPLICIT_EULER 
TI_CRANK_NICOLSON 
TI_BDF2 
TI_EXPLICIT_MIDPOINT 
TI_LSTABLE_DIRK2 
TI_EXPLICIT_TVD_RK_2 
TI_NEWMARK_BETA 

Definition at line 956 of file MooseTypes.h.

957{
961 TI_BDF2,
966};
@ TI_EXPLICIT_EULER
Definition MooseTypes.h:959
@ TI_EXPLICIT_TVD_RK_2
Definition MooseTypes.h:964
@ TI_EXPLICIT_MIDPOINT
Definition MooseTypes.h:962
@ TI_NEWMARK_BETA
Definition MooseTypes.h:965
@ TI_IMPLICIT_EULER
Definition MooseTypes.h:958
@ TI_CRANK_NICOLSON
Definition MooseTypes.h:960
@ TI_BDF2
Definition MooseTypes.h:961
@ TI_LSTABLE_DIRK2
Definition MooseTypes.h:963

◆ VarFieldType

Enumerator
VAR_FIELD_STANDARD 
VAR_FIELD_SCALAR 
VAR_FIELD_VECTOR 
VAR_FIELD_ARRAY 
VAR_FIELD_ANY 

Definition at line 775 of file MooseTypes.h.

776{
782};
@ VAR_FIELD_SCALAR
Definition MooseTypes.h:778
@ VAR_FIELD_STANDARD
Definition MooseTypes.h:777
@ VAR_FIELD_ARRAY
Definition MooseTypes.h:780
@ VAR_FIELD_ANY
Definition MooseTypes.h:781
@ VAR_FIELD_VECTOR
Definition MooseTypes.h:779

◆ VarKindType

Framework-wide stuff.

Enumerator
VAR_SOLVER 
VAR_AUXILIARY 
VAR_ANY 

Definition at line 768 of file MooseTypes.h.

769{
772 VAR_ANY
773};
@ VAR_ANY
Definition MooseTypes.h:772
@ VAR_AUXILIARY
Definition MooseTypes.h:771
@ VAR_SOLVER
Definition MooseTypes.h:770

◆ VectorTagType

Enumerator
VECTOR_TAG_RESIDUAL 
VECTOR_TAG_SOLUTION 
VECTOR_TAG_ANY 

Definition at line 1032 of file MooseTypes.h.

1033{
1036 VECTOR_TAG_ANY = 2
1037};
@ VECTOR_TAG_SOLUTION
@ VECTOR_TAG_ANY
@ VECTOR_TAG_RESIDUAL

◆ WhichEigenPairs

Which eigen pairs.

Enumerator
WEP_LARGEST_MAGNITUDE 

largest magnitude

WEP_SMALLEST_MAGNITUDE 

smallest magnitude

WEP_LARGEST_REAL 

largest real

WEP_SMALLEST_REAL 

smallest real

WEP_LARGEST_IMAGINARY 

largest imaginary

WEP_SMALLEST_IMAGINARY 

smallest imaginary

WEP_TARGET_MAGNITUDE 

target magnitude

WEP_TARGET_REAL 

target real

WEP_TARGET_IMAGINARY 

target imaginary

WEP_ALL_EIGENVALUES 

all eigenvalues

WEP_SLEPC_DEFAULT 

use whatever we have in SLEPC

Definition at line 938 of file MooseTypes.h.

939{
951};
@ WEP_TARGET_MAGNITUDE
target magnitude
Definition MooseTypes.h:946
@ WEP_LARGEST_IMAGINARY
largest imaginary
Definition MooseTypes.h:944
@ WEP_TARGET_IMAGINARY
target imaginary
Definition MooseTypes.h:948
@ WEP_SMALLEST_REAL
smallest real
Definition MooseTypes.h:943
@ WEP_SLEPC_DEFAULT
use whatever we have in SLEPC
Definition MooseTypes.h:950
@ WEP_LARGEST_MAGNITUDE
largest magnitude
Definition MooseTypes.h:940
@ WEP_SMALLEST_MAGNITUDE
smallest magnitude
Definition MooseTypes.h:941
@ WEP_ALL_EIGENVALUES
all eigenvalues
Definition MooseTypes.h:949
@ WEP_SMALLEST_IMAGINARY
smallest imaginary
Definition MooseTypes.h:945
@ WEP_TARGET_REAL
target real
Definition MooseTypes.h:947
@ WEP_LARGEST_REAL
largest real
Definition MooseTypes.h:942

Function Documentation

◆ addActionTypes()

void Moose::addActionTypes ( Syntax syntax)

The (optional) last param here indicates whether the task should trigger an Action auto-build. If a task is marked as "true". Then MOOSE will attempt to build the associated Action if one is not supplied by some other means (usually through the input file or custom Action). Only Actions that do not have required parameters and have defaults for all optional parameters can be built automatically (See ActionWarehouse.C).

Note: Many of the actions in the "Minimal Problem" section are marked as false. However, we can generally force creation of these "Action"s as needed by registering them to syntax that we expect to see even if those "Action"s don't normally pick up parameters from the input file.

Additional Actions

The following is the default set of action dependencies for a basic MOOSE problem. The formatting of this string is important. Each line represents a set of dependencies that depend on the previous line. Items on the same line have equal weight and can be executed in any order.

Additional dependencies can be inserted later inside of user applications with calls to ActionWarehouse::addDependency("task", "pre_req")

The (optional) last param here indicates whether the task should trigger an Action auto-build. If a task is marked as "true". Then MOOSE will attempt to build the associated Action if one is not supplied by some other means (usually through the input file or custom Action). Only Actions that do not have required parameters and have defaults for all optional parameters can be built automatically (See ActionWarehouse.C).

Note: Many of the actions in the "Minimal Problem" section are marked as false. However, we can generally force creation of these "Action"s as needed by registering them to syntax that we expect to see even if those "Action"s don't normally pick up parameters from the input file.

Additional Actions

The following is the default set of action dependencies for a basic MOOSE problem. The formatting of this string is important. Each line represents a set of dependencies that depend on the previous line. Items on the same line have equal weight and can be executed in any order.

Additional dependencies can be inserted later inside of user applications with calls to ActionWarehouse::addDependency("task", "pre_req")

Definition at line 109 of file Moose.C.

109 {2006},
110 url={http://dx.doi.org/10.1007/s00366-006-0049-3}
111})");
112
113#ifdef MOOSE_MFEM_ENABLED
114 // Like libMesh, the MFEM citation is emitted by MooseApp::requestCitations() only when the run
115 // actually uses the MFEM backend.
116 Registry::addAppCitation("MFEM",
117 "mfem-2024",
118 R"(@article{mfem-2024,
119 title = {High-Performance Finite Elements with {MFEM}},
120 author = {J. Andrej and N. Atallah and J.-P. B{\"a}cker and J.-S. Camier and D. Copeland and V. Dobrev and Y. Dudouit and T. Duswald and B. Keith and D. Kim and T. Kolev and B. Lazarov and K. Mittal and W. Pazner and S. Petrides and S. Shiraiwa and M. Stowell and V. Tomov},
121 journal = {The International Journal of High Performance Computing Applications},
122 volume = {38},
123 number = {5},
124 pages = {447--467},
125 year = {2024},
126 publisher = {SAGE Publications Sage UK: London, England},
127})");
128#endif
129}
130
131void
132registerObjects(Factory & factory, const std::set<std::string> & obj_labels)
133{
134 Registry::registerObjectsTo(factory, obj_labels);
135}
136
137void
138addActionTypes(Syntax & syntax)
139{
152 // clang-format off
153 /**************************/
154 /**** Register Actions ****/
155 /**************************/
156 registerMooseObjectTask("create_problem", Problem, false);
157 registerMooseObjectTask("setup_executioner", Executioner, false);
158 registerMooseObjectTask("read_executor", Executor, false);
159 registerTask("add_executor", true);
160
161 // TODO Organize these somewhere
162 registerTask("init_physics", false);
163 registerTask("init_component_physics", false);
164 registerTask("meta_action_component", false);
165 registerTask("setup_component", false);
166 // 'list_component' is used to retrieve ActionComponents for the syntax JSON
167 registerTask("list_component", false);
168
169 // This task does not construct an object, but it needs all of the parameters that
170 // would normally be used to construct an object.
171 registerMooseObjectTask("determine_system_type", Executioner, true);
172
173 registerMooseObjectTask("setup_mesh", MooseMesh, false);
174 registerMooseObjectTask("set_mesh_base", MooseMesh, false);
175 registerMooseObjectTask("init_mesh", MooseMesh, false);
176 registerMooseObjectTask("add_mesh_generator", MeshGenerator, false);
177 registerTask("create_added_mesh_generators", true);
178 registerMooseObjectTask("append_mesh_generator", MeshGenerator, false);
179
180 registerMooseObjectTask("add_kernel", Kernel, false);
181 appendMooseObjectTask ("add_kernel", EigenKernel);
182 appendMooseObjectTask ("add_kernel", VectorKernel);
183 appendMooseObjectTask ("add_kernel", ArrayKernel);
184 appendMooseObjectTask ("add_kernel", ADArrayKernel);
185
186 registerMooseObjectTask("add_variable", MooseVariableBase, false);
187 registerMooseObjectTask("add_aux_variable", MooseVariableBase, false);
188 registerMooseObjectTask("add_elemental_field_variable", MooseVariableBase, false);
189 registerMooseObjectTask("add_variables_physics", MooseVariableBase, false);
190
191 registerMooseObjectTask("add_nodal_kernel", NodalKernel, false);
192
193 registerMooseObjectTask("add_functor_material", FunctorMaterial, false);
194 registerMooseObjectTask("add_material", MaterialBase, false);
195 appendDeprecatedMooseObjectTask("add_material", FunctorMaterial);
196 registerMooseObjectTask("add_materials_physics", FunctorMaterial, false);
197 appendMooseObjectTask ("add_materials_physics", MaterialBase);
198
199 registerMooseObjectTask("add_bc", BoundaryCondition, false);
200
201 registerMooseObjectTask("add_function", Function, false);
202
203 registerMooseObjectTask("add_distribution", Distribution, false);
204 registerMooseObjectTask("add_sampler", Sampler, false);
205
206 registerMooseObjectTask("add_aux_kernel", AuxKernel, false);
207 appendMooseObjectTask ("add_aux_kernel", VectorAuxKernel);
208 appendMooseObjectTask ("add_aux_kernel", ArrayAuxKernel);
209
210 registerMooseObjectTask("add_bound", Bounds, false);
211
212 registerMooseObjectTask("add_scalar_kernel", ScalarKernel, false);
213 registerMooseObjectTask("add_aux_scalar_kernel", AuxScalarKernel, false);
214 registerMooseObjectTask("add_dirac_kernel", DiracKernel, false);
215 appendMooseObjectTask ("add_dirac_kernel", VectorDiracKernel);
216 registerMooseObjectTask("add_dg_kernel", DGKernel, false);
217 registerMooseObjectTask("add_fv_kernel", FVKernel, false);
218 registerMooseObjectTask("add_interpolation_method", FVInterpolationMethod, false);
219 registerMooseObjectTask("add_interpolation_method_physics", FVInterpolationMethod, false);
220 registerMooseObjectTask("add_linear_fv_kernel", LinearFVKernel, false);
221 registerMooseObjectTask("add_fv_bc", FVBoundaryCondition, false);
222 registerMooseObjectTask("add_linear_fv_bc", LinearFVBoundaryCondition, false);
223 registerMooseObjectTask("add_fv_ik", FVInterfaceKernel, false);
224 registerMooseObjectTask("add_interface_kernel", InterfaceKernel, false);
225 appendMooseObjectTask ("add_interface_kernel", VectorInterfaceKernel);
226 registerMooseObjectTask("add_constraint", Constraint, false);
227 registerMooseObjectTask("add_hybridized_kernel", HDGKernel, false);
228 registerMooseObjectTask("add_hybridized_integrated_bc", HDGIntegratedBC, false);
229
230 registerMooseObjectTask("add_ic", InitialCondition, false);
231 appendMooseObjectTask ("add_ic", ScalarInitialCondition);
232 registerMooseObjectTask("add_fv_ic", FVInitialCondition, false);
233 registerMooseObjectTask("add_ics_physics", InitialCondition, false);
234 appendMooseObjectTask ("add_ics_physics", FVInitialCondition);
235 appendMooseObjectTask ("add_ics_physics", ScalarInitialCondition);
236
237 registerMooseObjectTask("add_damper", Damper, false);
238 registerMooseObjectTask("setup_predictor", Predictor, false);
239 registerMooseObjectTask("add_time_steppers", TimeStepper, false);
240 registerMooseObjectTask("add_time_stepper", TimeStepper, false);
241 registerTask ("compose_time_stepper", true);
242 registerMooseObjectTask("setup_time_integrators", TimeIntegrator, false);
243 registerMooseObjectTask("setup_time_integrator", TimeIntegrator, false);
244 registerMooseObjectTask("add_convergence", Convergence, false);
245
246 registerMooseObjectTask("add_preconditioning", MoosePreconditioner, false);
247 registerMooseObjectTask("add_field_split", Split, false);
248
249 registerMooseObjectTask("add_mesh_division", MeshDivision, false);
250 registerMooseObjectTask("add_user_object", UserObject, false);
251 appendMooseObjectTask ("add_user_object", Postprocessor);
252
253 appendDeprecatedMooseObjectTask("add_user_object", Corrector);
254 registerMooseObjectTask("add_corrector", Corrector, false);
255 appendDeprecatedMooseObjectTask("add_user_object", MeshModifier);
256 registerMooseObjectTask("add_mesh_modifier", MeshModifier, false);
257
258 registerMooseObjectTask("add_postprocessor", Postprocessor, false);
259 registerMooseObjectTask("add_vector_postprocessor", VectorPostprocessor, false);
260 registerMooseObjectTask("add_reporter", Reporter, false);
261
262 registerMooseObjectTask("add_positions", Positions, false);
263 registerMooseObjectTask("add_times", Times, false);
264
265 registerMooseObjectTask("add_indicator", Indicator, false);
266 registerMooseObjectTask("add_marker", Marker, false);
267
268 registerMooseObjectTask("add_multi_app", MultiApp, false);
269 registerMooseObjectTask("add_transfer", Transfer, false);
270
271 registerMooseObjectTask("add_output", Output, false);
272
273 registerMooseObjectTask("add_control", Control, false);
274 registerMooseObjectTask("add_chain_control", ChainControl, false);
275 registerMooseObjectTask("add_partitioner", MoosePartitioner, false);
276
277 // clang-format on
278
279 registerTask("dynamic_object_registration", false);
280 registerTask("common_output", true);
281 registerTask("setup_recover_file_base", true);
282 registerTask("recover_meta_data", true);
283
284 registerTask("add_bounds_vectors", false);
285 registerTask("add_periodic_bc", false);
286 registerTask("add_aux_variable", false);
287 registerTask("add_external_aux_variables", true);
288 registerTask("add_variable", false);
289 registerTask("add_mortar_variable", false);
290
291 registerTask("execute_mesh_generators", true);
292 registerTask("uniform_refine_mesh", false);
293 registerTask("prepare_mesh", false);
294 registerTask("delete_remote_elements_after_late_geometric_ghosting", false);
295 registerTask("setup_mesh_complete", true); // calls prepare
296 registerTask("post_mesh_prepared", false);
297 registerTask("add_geometric_rm", false);
298 registerTask("attach_geometric_rm", true);
299 registerTask("attach_geometric_rm_final", true);
300
301 registerTask("init_displaced_problem", false);
302
303 registerTask("add_algebraic_rm", false);
304 registerTask("attach_algebraic_rm", true);
305 registerTask("add_coupling_rm", false);
306 registerTask("attach_coupling_rm", true);
307 registerTask("init_problem", true);
308 registerTask("check_copy_nodal_vars", true);
309 registerTask("copy_nodal_vars", true);
310 registerTask("copy_nodal_aux_vars", true);
311 registerTask("copy_vars_physics", false);
312 registerTask("setup_postprocessor_data", false);
313 registerTask("setup_time_steppers", true);
314
315 registerTask("setup_dampers", true);
316 registerTask("check_integrity", true);
317 registerTask("resolve_optional_materials", true);
318 registerTask("check_integrity_early", true);
319 registerTask("check_integrity_early_physics", false);
320 registerTask("setup_quadrature", true);
321 registerTask("create_tagged_matrices", true);
322
323 registerTask("mesh_modifiers", false);
324
326 registerTask("no_action", false); // Used for Empty Action placeholders
327 registerTask("set_global_params", false);
328 registerTask("setup_adaptivity", false);
329 registerTask("meta_action", false);
330 registerTask("setup_residual_debug", false);
331 registerTask("setup_oversampling", false);
332 registerTask("deprecated_block", false);
333 registerTask("set_adaptivity_options", false);
334 registerTask("add_mortar_interface", false);
335 registerTask("coupling_functor_check", true);
336 registerTask("add_master_action_material", false);
337 registerTask("setup_projected_properties", false);
338 registerTask("create_application_block", false);
339
340 // Dummy Actions (useful for sync points in the dependencies)
341 registerTask("setup_function_complete", false);
342 registerTask("setup_variable_complete", false);
343 registerTask("setup_executioner_complete", false);
344 registerTask("ready_to_init", true);
345
346 // Output related actions
347 registerTask("add_output_aux_variables", true);
348 registerTask("check_output", true);
349 registerTask("declare_late_reporters", true);
350
351 registerTask("create_problem_default", true);
352 registerTask("create_problem_custom", false);
353 registerTask("create_problem_complete", false);
354
355 registerTask("add_default_nonlinear_convergence", true);
356 registerTask("add_default_multiapp_fixed_point_convergence", true);
357 registerTask("add_default_steady_state_convergence", true);
358
359 registerTask("chain_control_setup", true);
360 registerTask("start_webservercontrol", true);
361
362 // Action for setting up the signal-based checkpoint
363 registerTask("auto_checkpoint_action", true);
364 /**************************/
365 /****** Dependencies ******/
366 /**************************/
377 // clang-format off
378 syntax.addDependencySets("(meta_action)"
379 "(meta_action_component)"
380 "(dynamic_object_registration)"
381 "(common_output)"
382 "(set_global_params)"
383 "(setup_recover_file_base)"
384 "(check_copy_nodal_vars)"
385 "(setup_mesh)"
386 "(add_geometric_rm)"
387 "(add_partitioner)"
388 "(add_mesh_generator)"
389 "(create_added_mesh_generators)"
390 "(append_mesh_generator)"
391 "(execute_mesh_generators)"
392 "(recover_meta_data)"
393 "(set_mesh_base)"
394 "(attach_geometric_rm)"
395 "(init_mesh)"
396 "(prepare_mesh)"
397 "(add_mortar_interface)"
398 "(uniform_refine_mesh)"
399 "(setup_mesh_complete)"
400 "(post_mesh_prepared)"
401 "(determine_system_type)"
402 "(create_problem)"
403 "(create_problem_custom)"
404 "(create_problem_default)"
405 "(create_problem_complete)"
406 "(init_displaced_problem)" // Problem must be init-ed before we start adding functors
407 "(add_function)" // Functions can depend on scalar variables & PPs, but this dependence can be
408 // added on initialSetup() rather than construction
409 "(init_component_physics)" // components must add their blocks to physics before init_physics
410 "(init_physics)"
411 "(setup_postprocessor_data)"
412 "(setup_time_integrator, setup_time_integrators)"
413 "(setup_executioner)"
414 "(setup_executioner_complete)"
415 "(setup_component)" // no particular reason for that placement
416 "(read_executor)"
417 "(add_executor)"
418 "(check_integrity_early)"
419 "(setup_predictor)"
420 "(add_aux_variable, add_variable, add_elemental_field_variable,"
421 " add_external_aux_variables)"
422 "(add_variables_physics)" // physics can skip adding variables if they already exist
423 "(add_mortar_variable)"
424 "(setup_variable_complete)"
425 "(check_integrity_early_physics)" // checks that systems and variables are consistent
426 "(setup_quadrature)"
427 "(add_convergence)"
428 "(add_default_nonlinear_convergence,"
429 " add_default_multiapp_fixed_point_convergence,"
430 " add_default_steady_state_convergence)"
431 "(add_positions)"
432 "(add_periodic_bc)"
433 "(add_user_object, add_corrector, add_mesh_modifier)"
434 "(add_field_split)" // split objects required before field split preconditioner itself
435 "(add_preconditioning)" // preconditioner may introduce objects such as static condensation which influence the underlying types of tagged matrices
436 "(create_tagged_matrices)"
437 "(add_distribution)"
438 "(add_sampler)"
439 "(setup_function_complete)"
440 "(setup_adaptivity)"
441 "(set_adaptivity_options)"
442 "(add_ic, add_fv_ic)"
443 "(add_ics_physics)" // physics can skip adding initial conditions if they already exist
444 "(add_constraint)"
445 "(add_times)"
446 "(add_time_stepper, add_time_steppers)"
447 "(compose_time_stepper)"
448 "(setup_time_steppers)"
449 "(ready_to_init)"
450 "(setup_dampers)"
451 "(setup_residual_debug)"
452 "(add_bounds_vectors)"
453 "(add_mesh_division)" // NearestPositionsDivision uses a Positions
454 "(add_multi_app)"
455 "(add_transfer)"
456 "(copy_nodal_vars, copy_nodal_aux_vars, copy_vars_physics)"
457 "(add_material)"
458 "(add_master_action_material)"
459 "(add_functor_material)"
460 "(add_materials_physics)"
461 "(setup_projected_properties)"
462 "(add_output_aux_variables)"
463 "(add_output)"
464 "(auto_checkpoint_action)"
465 "(add_postprocessor)"
466 "(add_vector_postprocessor)" // MaterialVectorPostprocessor requires this
467 // to be after material objects are created.
468 "(add_reporter)"
469 "(declare_late_reporters)"
470 "(add_aux_kernel, add_bc, add_damper, add_dirac_kernel, add_kernel,"
471 " add_nodal_kernel, add_dg_kernel, add_fv_kernel, add_interpolation_method,"
472 " add_interpolation_method_physics, add_linear_fv_kernel,"
473 " add_fv_bc, add_linear_fv_bc, add_fv_ik, add_interface_kernel,"
474 " add_scalar_kernel, add_aux_scalar_kernel, add_indicator, add_marker,"
475 " add_bound, add_hybridized_kernel, add_hybridized_integrated_bc)"
476 "(resolve_optional_materials)"
477 "(add_algebraic_rm)"
478 "(add_coupling_rm)"
479 "(attach_geometric_rm_final)"
480 "(attach_algebraic_rm)"
481 "(attach_coupling_rm)"
482 "(coupling_functor_check)"
483 "(delete_remote_elements_after_late_geometric_ghosting)"
484 "(init_problem)"
485 "(add_control, add_chain_control)"
486 "(chain_control_setup)"
487 "(start_webservercontrol)"
488 "(check_output)"
489 "(check_integrity)"
490 "(create_application_block)");
491 // clang-format on
492
493#ifdef MOOSE_MFEM_ENABLED
494 registerTask("add_mfem_problem_operator", true);
495 addTaskDependency("add_mfem_problem_operator", "init_mesh");
496 addTaskDependency("add_variable", "add_mfem_problem_operator");
497 addTaskDependency("add_aux_variable", "add_mfem_problem_operator");
498 addTaskDependency("add_elemental_field_variable", "add_mfem_problem_operator");
499 addTaskDependency("add_bc", "add_mfem_problem_operator");
500 addTaskDependency("add_kernel", "add_mfem_problem_operator");
501
502 // add SubMeshes
503 registerMooseObjectTask("add_mfem_submeshes", MFEMSubMesh, false);
504 addTaskDependency("add_mfem_submeshes", "create_problem_complete");
505
506 // add SubMesh transfers
507 appendMooseObjectTask("add_transfer", MFEMSubMeshTransfer);
508
509 // add FESpaces
510 registerMooseObjectTask("add_mfem_fespaces", MFEMFESpace, false);
511 appendMooseObjectTask("add_mfem_fespaces", MFEMFECollection);
512 addTaskDependency("add_mfem_fespaces", "add_mfem_submeshes");
513
514 // add FESpace hierarchies (must come after fespaces so the base fespace is available)
515 registerMooseObjectTask("add_mfem_fespace_hierarchies", MFEMFESpaceHierarchy, false);
516 addTaskDependency("add_mfem_fespace_hierarchies", "add_mfem_fespaces");
517
518 // variables must wait for hierarchies since a variable may reference a hierarchy's
519 // finest level via fespace_hierarchy = ...
520 addTaskDependency("add_variable", "add_mfem_fespace_hierarchies");
521 addTaskDependency("add_aux_variable", "add_mfem_fespace_hierarchies");
522 addTaskDependency("add_elemental_field_variable", "add_mfem_fespace_hierarchies");
523 // kernels only need fespaces, not hierarchies
524 addTaskDependency("add_kernel", "add_mfem_fespaces");
525
526 // add QuadratureFunctions
527 registerMooseObjectTask("add_mfem_quadrature_functions", MFEMQuadratureFunction, false);
528 // after the last task declaring coefficients the quadrature functions may project
529 addTaskDependency("add_mfem_quadrature_functions", "add_functor_material");
530 // before the tasks constructing objects that may consume the declared coefficients
531 addTaskDependency("add_kernel", "add_mfem_quadrature_functions");
532 addTaskDependency("add_bc", "add_mfem_quadrature_functions");
533 addTaskDependency("add_aux_kernel", "add_mfem_quadrature_functions");
534
535 // add complex kernels
536 registerMooseObjectTask("add_mfem_complex_kernel_components", Kernel, false);
537 registerMooseObjectTask("add_mfem_complex_bc_components", BoundaryCondition, false);
538 addTaskDependency("add_mfem_complex_kernel_components", "add_mfem_fespaces");
539 addTaskDependency("add_mfem_complex_bc_components", "add_mfem_fespaces");
540 addTaskDependency("add_mfem_complex_kernel_components", "add_kernel");
Base class for array variable (equation) kernels using automatic differentiation.
Base class for making kernels that work on auxiliary scalar variables.
Base class for creating new types of boundary conditions.
Control that additionally provides the capability to produce/consume data values, to allow control op...
Base class for all Constraint types.
Definition Constraint.h:20
Base class for Control objects.
Definition Control.h:44
Base class for convergence criteria.
Definition Convergence.h:26
The DGKernel class is responsible for calculating the residuals for various physics on internal sides...
Definition DGKernel.h:19
Base class for deriving dampers.
Definition Damper.h:28
A DiracKernel is used when you need to add contributions to the residual by means of multiplying some...
Definition DiracKernel.h:33
All Distributions should inherit from this class.
The behavior of this kernel is controlled by one problem-wise global parameter eigen_on_current - boo...
Definition EigenKernel.h:24
Executioners are objects that do the actual work of solving your problem.
Definition Executioner.h:37
The Executor class directs the execution flow of simulations.
Definition Executor.h:27
Base class for creating new types of boundary conditions.
This is a template class that implements the workhorse compute and computeNodal methods.
Base class for creating kernels that interface physics between subdomains.
Registered base class for linear FV interpolation objects.
FVKernel is a base class for all finite volume method kernels.
Definition FVKernel.h:36
Generic factory class for build all sorts of objects.
Definition Factory.h:29
Base class for function objects.
Definition Function.h:30
FunctorMaterials compute functor material properties.
Base kernel for hybridized finite element formulations.
Definition HDGKernel.h:18
This is a template class that implements the workhorse compute and computeNodal methods.
InterfaceKernel and VectorInterfaceKernel is responsible for interfacing physics across subdomains.
Base class for boundary conditions for linear FV systems.
Base class for finite volume kernels that contribute to a linear systems.
Builds and owns a mfem::ParFiniteElementSpaceHierarchy from a base FESpace by applying a sequence of ...
Constructs and stores an mfem::ParFiniteElementSpace object.
Definition MFEMFESpace.h:21
Class to transfer MFEM variable data to or from a restricted copy of the variable defined on an a sub...
Base class for construction of a mfem::ParSubMesh object.
Definition MFEMSubMesh.h:21
MaterialBases compute MaterialProperties.
Base class for MeshDivision objects.
MeshGenerators are objects that can modify or add to an existing mesh.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
Base class for MOOSE partitioner.
Base class for MOOSE preconditioners.
Base variable class.
A MultiApp represents one or more MOOSE applications that are running simultaneously.
Definition MultiApp.h:116
Base class for creating nodal kernels with hand-coded Jacobians.
Definition NodalKernel.h:19
Based class for output objects.
Definition Output.h:52
Positions objects are under the hood Reporters.
Definition Positions.h:21
Base class for all Postprocessors.
Base class for predictors.
Definition Predictor.h:29
Class that hold the whole problem being solved.
Definition Problem.h:20
static void registerObjectsTo(Factory &f, const std::set< std::string > &labels)
This registers all MooseObjects known to the registry that have the given label(s) with the factory f...
Definition Registry.C:35
Reporter objects allow for the declaration of arbitrary data types that are aggregate values for a si...
Definition Reporter.h:48
This is the base class for Samplers as used within the Stochastic Tools module.
Definition Sampler.h:52
InitialConditions are objects that set the initial value of variables.
Base class for split-based preconditioners.
Definition Split.h:26
Holding syntax for parsing input files.
Definition Syntax.h:22
void addDependencySets(const std::string &action_sets)
Adds all dependencies in a single call.
Definition Syntax.C:69
Base class for time integrators.
Base class for time stepping.
Definition TimeStepper.h:23
Times objects are under the hood Reporters, but limited to a vector of Real.
Definition Times.h:19
Base class for all Transfer objects.
Definition Transfer.h:40
Base class for user-specific data.
Definition UserObject.h:20
Base class for Postprocessors that produce a vector of values.
void registerObjects(Factory &factory, const std::set< std::string > &obj_labels)
Definition Moose.C:103
void addActionTypes(Syntax &syntax)
Definition Moose.C:109

◆ adOffset() [1/2]

std::size_t Moose::adOffset ( unsigned int  var_num,
std::size_t  max_dofs_per_elem,
DGJacobianType  dg_jacobian_type,
unsigned int  num_vars_in_system = 0 
)
inline

Definition at line 108 of file ADUtils.h.

112{
113 if (dg_jacobian_type == DGJacobianType::ElementElement ||
114 dg_jacobian_type == DGJacobianType::NeighborElement)
115 return adOffset(var_num, max_dofs_per_elem, ElementType::Element);
116 else
117 return adOffset(var_num, max_dofs_per_elem, ElementType::Neighbor, num_vars_in_system);
118}
std::size_t adOffset(unsigned int var_num, std::size_t max_dofs_per_elem, ElementType element_type=ElementType::Element, unsigned int num_vars_in_system=0)
Helper function for computing automatic differentiation offset.
Definition ADUtils.h:78

◆ adOffset() [2/2]

std::size_t Moose::adOffset ( unsigned int  var_num,
std::size_t  max_dofs_per_elem,
ElementType  element_type = ElementType::Element,
unsigned int  num_vars_in_system = 0 
)
inline

Helper function for computing automatic differentiation offset.

Let's explain how our derivative index numbering scheme works:

Let's just think about continuous finite elements for a second. We use a variable major numbering scheme, such that each variables indices are in a contiguous block. Let's imagine we have two variables, u and v, and we're on a QUAD4. The AD indices will be ordered like this:

u0, u1, u2, u3, v0, v1, v2, v3

max_dofs_per_elem should be for a QUAD4: 4. For a QUAD9, 9. HEX27, 27. Etc. For CFEM the offset will be simply be the max_dofs_per_elem number times the var_num. So for u on a QUAD4: 4 * 0 = 0. For v: 4 * 1. So u indices start at index 0, v indices start at index 4.

With DFEM or interface kernels it's a little more complicated. We essentially already have an indices block that is num_vars_in_system * max_dofs_per_elem long, so in our two var, QUAD4 example: 4 * 2 = 8. So what we do is that if we are on a neighbor element, we do an additional offset by num_vars_in_system * max_dofs_per_elem. So now our derivative indices are ordered like this:

u0, u1, u2, u3, v0, v1, v2, v3, u0_neighbor, u1_neighbor, u2_neighbor, u3_neighbor, v0_neighbor, v1_neighbor, v2_neighbor, v3_neighbor

Finally if a lower-dimensional element is involved, then we another offset of num_vars_in_system * max_dofs_per_elem:

u0, u1, u2, u3, v0, v1, v2, v3, u0_neighbor, u1_neighbor, u2_neighbor, u3_neighbor, v0_neighbor, v1_neighbor, v2_neighbor, v3_neighbor, u0_lower, u1_lower, u2_lower, u3_lower, v0_lower, v1_lower, v2_lower, v3_lower

Note that a lower dimensional block will have less indices than a higher dimensional one, but we do not optimize for that consideration at this time

Parameters
var_numThe variable number we are calculating the offset for
max_dofs_per_elemThe maximum number of degrees of freedom for any one variable on an element
element_typeThe "type" of element that we are on. Current options are ElementType::Element, ElementType::Neighbor, and ElementType::Lower
num_vars_in_systemThe number of vars in the system. This is used in offset calculation unless element_type is ElementType::Element
Returns
The automatic differentiation indexing offset

Definition at line 78 of file ADUtils.h.

82{
83 // If our element type is anything other than ElementType::Element, then the user must
84 // supply num_vars_in_system in order to calculate the offset
85 mooseAssert(element_type == ElementType::Element || num_vars_in_system,
86 "If our element type is anything other than ElementType::Element, then you "
87 "must supply num_vars_in_system in order to calculate the offset");
88
89 switch (element_type)
90 {
91 case ElementType::Element:
92 return var_num * max_dofs_per_elem;
93
94 case ElementType::Neighbor:
95 return num_vars_in_system * max_dofs_per_elem + var_num * max_dofs_per_elem;
96
97 case ElementType::Lower:
98 return 2 * num_vars_in_system * max_dofs_per_elem + var_num * max_dofs_per_elem;
99
100 default:
102 "Unsupported element type ",
103 static_cast<typename std::underlying_type<decltype(element_type)>::type>(element_type));
104 }
105}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311

Referenced by adOffset(), and globalDofIndexToDerivative().

◆ ADRealToGenericReal()

template<bool is_ad>
GenericReal< is_ad > Moose::ADRealToGenericReal ( const ADReal u_ad)

Converts an ADReal to a GenericReal<is_ad>

Definition at line 161 of file ADUtils.h.

162{
163 if constexpr (is_ad)
164 return u_ad;
165 else
166 return u_ad.value();
167}

◆ applyIndices()

template<typename T >
void Moose::applyIndices ( T &  container,
const std::vector< size_t > &  indices 
)

Uses indices created by the indirectSort function to sort the given container (which must support random access, resizing, and std::swap.

Definition at line 116 of file IndirectSort.h.

117{
118 T tmp;
119 tmp.resize(container.size());
120 for (size_t i = 0; i < indices.size(); i++)
121 tmp[i] = container[indices[i]];
122 std::swap(tmp, container);
123}

◆ assemble_matrix() [1/2]

void Moose::assemble_matrix ( EquationSystems &  es,
const std::string &  system_name 
)

Referenced by EigenProblem::init().

◆ assemble_matrix() [2/2]

void Moose::assemble_matrix ( EquationSystems es,
const std::string &  system_name 
)

Definition at line 44 of file NonlinearEigenSystem.C.

45{
46 EigenProblem * p = es.parameters.get<EigenProblem *>("_eigen_problem");
47 CondensedEigenSystem & eigen_system = es.get_system<CondensedEigenSystem>(system_name);
48 NonlinearEigenSystem & eigen_nl =
49 p->getNonlinearEigenSystem(/*nl_sys_num=*/eigen_system.number());
50
51 // If this is a nonlinear eigenvalue problem,
52 // we do not need to assemble anything
53 if (p->isNonlinearEigenvalueSolver(eigen_nl.number()))
54 {
55 // If you want an efficient eigensolver,
56 // please use PETSc 3.13 or newer.
57 // We need to do an unnecessary assembly,
58 // if you use PETSc that is older than 3.13.
59#if PETSC_RELEASE_LESS_THAN(3, 13, 0)
60 if (eigen_system.has_matrix_B())
61 p->computeJacobianTag(*eigen_system.current_local_solution,
62 eigen_system.get_matrix_B(),
63 eigen_nl.eigenMatrixTag());
64#endif
65 return;
66 }
67
68#if !PETSC_RELEASE_LESS_THAN(3, 13, 0)
69 // If we use shell matrices and do not use a shell preconditioning matrix,
70 // we only need to form a preconditioning matrix
71 if (eigen_system.use_shell_matrices() && !eigen_system.use_shell_precond_matrix())
72 {
73 p->computeJacobianTag(*eigen_system.current_local_solution,
74 eigen_system.get_precond_matrix(),
75 eigen_nl.precondMatrixTag());
76 return;
77 }
78#endif
79 // If it is a linear generalized eigenvalue problem,
80 // we assemble A and B together
81 if (eigen_system.generalized())
82 {
83 p->computeJacobianAB(*eigen_system.current_local_solution,
84 eigen_system.get_matrix_A(),
85 eigen_system.get_matrix_B(),
86 eigen_nl.nonEigenMatrixTag(),
87 eigen_nl.eigenMatrixTag());
88#if LIBMESH_HAVE_SLEPC
90 LibmeshPetscCallA(
91 p->comm().get(),
92 MatScale(static_cast<PetscMatrix<Number> &>(eigen_system.get_matrix_B()).mat(), -1.0));
93#endif
94 return;
95 }
96
97 // If it is a linear eigenvalue problem, we assemble matrix A
98 {
99 p->computeJacobianTag(*eigen_system.current_local_solution,
100 eigen_system.get_matrix_A(),
101 eigen_nl.nonEigenMatrixTag());
102
103 return;
104 }
105}
Problem for solving eigenvalue problems.
bool negativeSignEigenKernel() const
A flag indicates if a negative sign is used in eigen kernels.
NonlinearEigenSystem & getNonlinearEigenSystem(const unsigned int nl_sys_num)
virtual void computeJacobianTag(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, TagID tag) override
Form a Jacobian matrix for all kernels and BCs with a given tag.
bool isNonlinearEigenvalueSolver(unsigned int eigen_sys_num) const
void computeJacobianAB(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobianA, SparseMatrix< Number > &jacobianB, TagID tagA, TagID tagB)
Form two Jacobian matrices, where each is associated with one tag, through one element-loop.
Nonlinear eigenvalue system to be solved.
const T_sys & get_system(std::string_view name) const
const Parallel::Communicator & comm() const
const T & get(std::string_view) const

◆ associateSyntax()

void Moose::associateSyntax ( Syntax syntax,
ActionFactory action_factory 
)

Definition at line 821 of file Moose.C.

◆ associateSyntaxInner()

void Moose::associateSyntaxInner ( Syntax syntax,
ActionFactory action_factory 
)

Note: the optional third parameter is used to differentiate which task is satisfied based on the syntax encountered for classes which are registered to satisfy more than one task

Variable/AuxVariable Actions

Note: the optional third parameter is used to differentiate which task is satisfied based on the syntax encountered for classes which are registered to satisfy more than one task

Variable/AuxVariable Actions

Definition at line 590 of file Moose.C.

595 : Placeholder "no_action" actions must be put in places where it is possible to match an
596 * object with a star or a more specific parent later on. (i.e. where one needs to negate the
597 * '*' matching prematurely).
598 */
599void
600registerActions(Syntax & syntax, ActionFactory & action_factory)
601{
602 mooseDeprecated("use registerAll instead of registerActions");
603 registerActions(syntax, action_factory, {"MooseApp"});
604}
605
606void
607registerActions(Syntax & syntax,
608 ActionFactory & action_factory,
609 const std::set<std::string> & obj_labels)
610{
611 Registry::registerActionsTo(action_factory, obj_labels);
612
613 // Add these actions here so they are always executed last, without setting any dependency
614 registerTask("dump_objects", false);
615 registerTask("finish_input_file_output", false);
616}
617
618void
619associateSyntaxInner(Syntax & syntax, ActionFactory & /*action_factory*/)
620{
626 registerSyntax("DiffusionCG", "Physics/Diffusion/ContinuousGalerkin/*");
627 registerSyntax("DiffusionFV", "Physics/Diffusion/FiniteVolume/*");
628
629 registerSyntax("AddActionComponentAction", "ActionComponents/*");
630 registerSyntax("CombineComponentsMeshes", "ActionComponents");
631
632 registerSyntaxTask("CopyNodalVarsAction", "Variables/*", "check_copy_nodal_vars");
633 registerSyntaxTask("CopyNodalVarsAction", "Variables/*", "copy_nodal_vars");
634 registerSyntaxTask("CopyNodalVarsAction", "AuxVariables/*", "check_copy_nodal_vars");
635 registerSyntaxTask("CopyNodalVarsAction", "AuxVariables/*", "copy_nodal_aux_vars");
636
637 registerSyntaxTask("AddKernelAction", "Kernels/*", "add_kernel");
638 registerSyntaxTask("AddNodalKernelAction", "NodalKernels/*", "add_nodal_kernel");
639 registerSyntaxTask("AddKernelAction", "AuxKernels/*", "add_aux_kernel");
640
641 registerSyntaxTask("AddHDGKernelAction", "HDGKernels/*", "add_hybridized_kernel");
642
643 registerSyntax("AddAuxKernelAction", "AuxVariables/*/AuxKernel");
644
645 registerSyntaxTask("AddScalarKernelAction", "ScalarKernels/*", "add_scalar_kernel");
646 registerSyntaxTask("AddScalarKernelAction", "AuxScalarKernels/*", "add_aux_scalar_kernel");
647
648 registerSyntaxTask("AddBCAction", "BCs/*", "add_bc");
649
650 registerSyntax("CreateProblemAction", "Problem");
651 registerSyntax("DynamicObjectRegistrationAction", "Problem");
652
653 registerSyntax("SetupMeshAction", "Mesh");
654 registerSyntax("SetupMeshCompleteAction", "Mesh");
655 // Components should be able create a Mesh without a Mesh block
656 registerSyntax("CreateMeshSetupActionsForComponents", "ActionComponents");
657 registerSyntax("CreateDisplacedProblemAction", "Mesh");
658 registerSyntax("DisplayGhostingAction", "Mesh");
659 registerSyntax("AddMeshGeneratorAction", "Mesh/*");
660 registerSyntaxTask("EmptyAction", "Mesh/BatchMeshGeneratorAction", "no_action");
661 registerSyntax("BatchMeshGeneratorAction", "Mesh/BatchMeshGeneratorAction/*");
662 registerSyntax("ElementIDOutputAction", "Mesh");
663 syntax.registerSyntaxType("Mesh/*", "MeshGeneratorName");
664
665 registerSyntax("AddFunctionAction", "Functions/*");
666 syntax.registerSyntaxType("Functions/*", "FunctionName");
667
668 registerSyntax("AddMeshDivisionAction", "MeshDivisions/*");
669 syntax.registerSyntaxType("MeshDivisions/*", "MeshDivisionName");
670 registerSyntax("AddConvergenceAction", "Convergence/*");
671 syntax.registerSyntaxType("Convergence/*", "ConvergenceName");
672
673 registerSyntax("GlobalParamsAction", "GlobalParams");
674
675 registerSyntax("AddDistributionAction", "Distributions/*");
676 syntax.registerSyntaxType("Distributions/*", "DistributionName");
677
678 registerSyntax("AddSamplerAction", "Samplers/*");
679 syntax.registerSyntaxType("Samplers/*", "SamplerName");
680
681 registerSyntax("SetupDebugAction", "Debug");
682 registerSyntax("SetupResidualDebugAction", "Debug");
683
685 registerSyntax("AddVariableAction", "Variables/*");
686 syntax.registerSyntaxType("Variables/*", "VariableName");
687 syntax.registerSyntaxType("Variables/*", "NonlinearVariableName");
688
689 registerSyntax("AddICAction", "Variables/*/InitialCondition");
690 registerSyntax("AddFVICAction", "Variables/*/FVInitialCondition");
691
692 registerSyntax("AddAuxVariableAction", "AuxVariables/*");
693 syntax.registerSyntaxType("AuxVariables/*", "VariableName");
694 syntax.registerSyntaxType("AuxVariables/*", "AuxVariableName");
695
696 registerSyntax("AddICAction", "AuxVariables/*/InitialCondition");
697 registerSyntax("AddFVICAction", "AuxVariables/*/FVInitialCondition");
698
699 registerSyntaxTask("EmptyAction", "BCs/Periodic", "no_action"); // placeholder
700 registerSyntax("AddPeriodicBCAction", "BCs/Periodic/*");
701
702 registerSyntaxTask("AddInitialConditionAction", "ICs/*", "add_ic");
703 registerSyntaxTask("AddFVInitialConditionAction", "FVICs/*", "add_fv_ic");
704
705 registerSyntax("AddMaterialAction", "Materials/*");
706 syntax.registerSyntaxType("Materials/*", "MaterialName");
707
708 registerSyntax("AddFunctorMaterialAction", "FunctorMaterials/*");
709 syntax.registerSyntaxType("FunctorMaterials/*", "MaterialName");
710
711 registerSyntax("AddPostprocessorAction", "Postprocessors/*");
712 syntax.registerSyntaxType("Postprocessors/*", "PostprocessorName");
713 syntax.registerSyntaxType("Postprocessors/*", "UserObjectName");
714
715 registerSyntax("AddVectorPostprocessorAction", "VectorPostprocessors/*");
716 syntax.registerSyntaxType("VectorPostprocessors/*", "VectorPostprocessorName");
717
718 registerSyntax("AddReporterAction", "Reporters/*");
719 syntax.registerSyntaxType("Reporters/*", "ReporterName");
720
721 registerSyntax("AddPositionsAction", "Positions/*");
722 syntax.registerSyntaxType("Positions/*", "PositionsName");
723
724 registerSyntax("AddTimesAction", "Times/*");
725 syntax.registerSyntaxType("Times/*", "TimesName");
726
727 registerSyntax("AddDamperAction", "Dampers/*");
728
729 registerSyntax("AddOutputAction", "Outputs/*");
730 registerSyntax("CommonOutputAction", "Outputs");
731 registerSyntax("MaterialOutputAction", "Outputs");
732 registerSyntax("AutoCheckpointAction", "Outputs");
733 syntax.registerSyntaxType("Outputs/*", "OutputName");
734
735 // Note: Preconditioner Actions will be built by this setup action
736 registerSyntax("SetupPreconditionerAction", "Preconditioning/*");
737 registerSyntax("AddFieldSplitAction", "Preconditioning/*/*");
738
739 registerSyntax("CreateExecutionerAction", "Executioner");
740 registerSyntax("ReadExecutorParamsAction", "Executors/*");
741
742 registerSyntaxTask("AddTimeStepperAction", "Executioner/TimeSteppers/*", "add_time_steppers");
743 registerSyntaxTask("AddTimeStepperAction", "Executioner/TimeStepper", "add_time_stepper");
744 registerSyntaxTask(
745 "ComposeTimeStepperAction", "Executioner/TimeSteppers", "compose_time_stepper");
746 registerSyntaxTask(
747 "SetupTimeIntegratorAction", "Executioner/TimeIntegrators/*", "setup_time_integrators");
748 registerSyntaxTask(
749 "SetupTimeIntegratorAction", "Executioner/TimeIntegrator", "setup_time_integrator");
750 syntax.registerSyntaxType("Executors/*", "ExecutorName");
751
752 registerSyntax("SetupQuadratureAction", "Executioner/Quadrature");
753 registerSyntax("SetupPredictorAction", "Executioner/Predictor");
754#ifdef LIBMESH_ENABLE_AMR
755 registerSyntax("AdaptivityAction", "Executioner/Adaptivity");
756#endif
757
758 registerSyntax("PartitionerAction", "Mesh/Partitioner");
759
760 registerSyntax("AddDiracKernelAction", "DiracKernels/*");
761
762 registerSyntax("AddDGKernelAction", "DGKernels/*");
763 registerSyntax("AddFVKernelAction", "FVKernels/*");
764 registerSyntax("AddFVBCAction", "FVBCs/*");
765 registerSyntax("AddLinearFVBCAction", "LinearFVBCs/*");
766 registerSyntax("AddFVInterfaceKernelAction", "FVInterfaceKernels/*");
767 registerSyntax("CheckFVBCAction", "FVBCs");
768
769 registerSyntax("AddLinearFVKernelAction", "LinearFVKernels/*");
770
771 registerSyntax("AddInterfaceKernelAction", "InterfaceKernels/*");
772
773 registerSyntax("AddConstraintAction", "Constraints/*");
774
775 registerSyntax("AddControlAction", "Controls/*");
776 registerSyntax("AddChainControlAction", "ChainControls/*");
777 registerSyntax("AddBoundAction", "Bounds/*");
778 registerSyntax("AddBoundsVectorsAction", "Bounds");
779
780 // UserObject and some derived classes
781 registerSyntax("AddUserObjectAction", "UserObjects/*");
782 syntax.registerSyntaxType("UserObjects/*", "UserObjectName");
783
784 registerSyntax("AddCorrectorAction", "Correctors/*");
785 syntax.registerSyntaxType("Correctors/*", "UserObjectName");
786
787 registerSyntax("AddMeshModifiersAction", "MeshModifiers/*");
788 syntax.registerSyntaxType("MeshModifiers/*", "UserObjectName");
789
790 registerSyntax("AddNodalNormalsAction", "NodalNormals");
791
792 // FVInterpolationMethods
793 registerSyntax("AddFVInterpolationMethodAction", "FVInterpolationMethods/*");
794 syntax.registerSyntaxType("FVInterpolationMethods/*", "InterpolationMethodName");
795
796 // Indicator
797 registerSyntax("AddElementalFieldAction", "Adaptivity/Indicators/*");
798 registerSyntax("AddIndicatorAction", "Adaptivity/Indicators/*");
799 syntax.registerSyntaxType("Adaptivity/Indicators/*", "IndicatorName");
800
801 // Marker
802 registerSyntax("AddElementalFieldAction", "Adaptivity/Markers/*");
803 registerSyntax("AddMarkerAction", "Adaptivity/Markers/*");
804 syntax.registerSyntaxType("Adaptivity/Markers/*", "MarkerName");
805
806 // New Adaptivity System
807 registerSyntax("SetAdaptivityOptionsAction", "Adaptivity");
808
809 // Deprecated Block
810 registerSyntax("DeprecatedBlockAction", "DeprecatedBlock");
811
812 // Multi Apps
813 registerSyntax("AddMultiAppAction", "MultiApps/*");
814 syntax.registerSyntaxType("MultiApps/*", "MultiAppName");
815
816 // Transfers
817 registerSyntax("AddTransferAction", "Transfers/*");
818
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition MooseError.h:363
Specialized factory for generic Action System objects.
static void registerActionsTo(ActionFactory &f, const std::set< std::string > &labels)
This registers all Actions known to the registry that have the given label(s) with the factory f.
Definition Registry.C:69
void registerSyntaxType(const std::string &syntax, const std::string &type)
Register a type with a block.
Definition Syntax.C:363
void registerActions(Syntax &syntax, ActionFactory &action_factory)
Multiple Action class can be associated with a single input file section, in which case all associate...
Definition Moose.C:571
void associateSyntaxInner(Syntax &syntax, ActionFactory &action_factory)
Definition Moose.C:590

Referenced by registerAll(), and setColorConsole().

◆ colorConsole()

bool Moose::colorConsole ( )

Returns whether Console coloring is turned on (default: true).

Definition at line 845 of file Moose.C.

◆ commonAdaptivityParams()

InputParameters Moose::commonAdaptivityParams ( )

Definition at line 23 of file SetAdaptivityOptionsAction.C.

24{
26 params.addParam<unsigned int>(
27 "steps", 0, "The number of adaptive steps to use when doing a Steady simulation.");
28 params.addRangeCheckedParam<unsigned int>(
29 "interval", 1, "interval>0", "The number of time steps betweeen each adaptivity phase");
30 params.addParam<unsigned int>(
31 "max_h_level",
32 0,
33 "Maximum number of times a single element can be refined. If 0 then infinite.");
34 params.addParam<Real>("start_time",
35 -std::numeric_limits<Real>::max(),
36 "The time that adaptivity will be active after.");
37 params.addParam<Real>("stop_time",
38 std::numeric_limits<Real>::max(),
39 "The time after which adaptivity will no longer be active.");
40 params.addParam<unsigned int>(
41 "cycles_per_step",
42 1,
43 "The number of adaptive steps to use when on each timestep during a Transient simulation.");
44 params.addParam<bool>(
45 "recompute_markers_during_cycles", false, "Recompute markers during adaptivity cycles");
46 MooseEnum adaptivity("h=0 p=1 hp=2", "h");
47 params.addParam<MooseEnum>(
48 "adaptivity_type", adaptivity, "Select between h, p or hp mesh adaptivity");
49 return params;
50}
static InputParameters validParams()
Definition Action.C:26
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55

Referenced by AdaptivityAction::validParams(), and SetAdaptivityOptionsAction::validParams().

◆ compute_bounds()

void Moose::compute_bounds ( NumericVector< Number > &  lower,
NumericVector< Number > &  upper,
NonlinearImplicitSystem sys 
)

Definition at line 47 of file NonlinearSystem.C.

50{
51 FEProblemBase * p =
52 sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
53 p->computeBounds(sys, lower, upper);
54}
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void computeBounds(libMesh::NonlinearImplicitSystem &sys, NumericVector< libMesh::Number > &lower, NumericVector< libMesh::Number > &upper)
const EquationSystems & get_equation_systems() const

Referenced by NonlinearSystem::NonlinearSystem().

◆ compute_jacobian()

void Moose::compute_jacobian ( const NumericVector< Number > &  soln,
SparseMatrix< Number > &  jacobian,
NonlinearImplicitSystem sys 
)

Definition at line 37 of file NonlinearSystem.C.

40{
41 FEProblemBase * p =
42 sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
43 p->computeJacobianSys(sys, soln, jacobian);
44}
virtual void computeJacobianSys(libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian)
Form a Jacobian matrix.

Referenced by NonlinearSystem::NonlinearSystem(), and NonlinearSystem::setupColoringFiniteDifferencedPreconditioner().

◆ compute_linear_system()

void Moose::compute_linear_system ( libMesh::EquationSystems es,
const std::string &  system_name 
)

Definition at line 67 of file LinearSystem.C.

68{
69 FEProblemBase * p = es.parameters.get<FEProblemBase *>("_fe_problem_base");
70 auto & sys = p->getLinearSystem(p->linearSysNum(system_name));
71 auto & lin_sys = sys.linearImplicitSystem();
72 auto & matrix = *(sys.linearImplicitSystem().matrix);
73 auto & rhs = *(sys.linearImplicitSystem().rhs);
74 p->computeLinearSystemSys(lin_sys, matrix, rhs);
75}
virtual void computeLinearSystemSys(libMesh::LinearImplicitSystem &sys, libMesh::SparseMatrix< libMesh::Number > &system_matrix, NumericVector< libMesh::Number > &rhs, const bool compute_gradients=true)
Assemble both the right hand side and the system matrix of a given linear system.
LinearSystem & getLinearSystem(unsigned int sys_num)
Get non-constant reference to a linear system.
unsigned int linearSysNum(const LinearSystemName &linear_sys_name) const override

Referenced by LinearSystem::LinearSystem().

◆ compute_nearnullspace()

void Moose::compute_nearnullspace ( std::vector< NumericVector< Number > * > &  sp,
NonlinearImplicitSystem sys 
)

Definition at line 74 of file NonlinearSystem.C.

75{
76 FEProblemBase * p =
77 sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
78 p->computeNearNullSpace(sys, sp);
79}
virtual void computeNearNullSpace(libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > * > &sp)

Referenced by NonlinearSystem::NonlinearSystem().

◆ compute_nullspace()

void Moose::compute_nullspace ( std::vector< NumericVector< Number > * > &  sp,
NonlinearImplicitSystem sys 
)

Definition at line 57 of file NonlinearSystem.C.

58{
59 FEProblemBase * p =
60 sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
61 p->computeNullSpace(sys, sp);
62}
virtual void computeNullSpace(libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > * > &sp)

Referenced by NonlinearSystem::NonlinearSystem().

◆ compute_postcheck()

void Moose::compute_postcheck ( const NumericVector< Number > &  old_soln,
NumericVector< Number > &  search_direction,
NumericVector< Number > &  new_soln,
bool &  changed_search_direction,
bool &  changed_new_soln,
NonlinearImplicitSystem sys 
)

Definition at line 82 of file NonlinearSystem.C.

88{
89 FEProblemBase * p =
90 sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
92 sys, old_soln, search_direction, new_soln, changed_search_direction, changed_new_soln);
93}
virtual void computePostCheck(libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &old_soln, NumericVector< libMesh::Number > &search_direction, NumericVector< libMesh::Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln)

Referenced by NonlinearSystem::solve().

◆ compute_transpose_nullspace()

void Moose::compute_transpose_nullspace ( std::vector< NumericVector< Number > * > &  sp,
NonlinearImplicitSystem sys 
)

Definition at line 65 of file NonlinearSystem.C.

67{
68 FEProblemBase * p =
69 sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
70 p->computeTransposeNullSpace(sys, sp);
71}
virtual void computeTransposeNullSpace(libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > * > &sp)

Referenced by NonlinearSystem::NonlinearSystem().

◆ createMapFromVectorAndMultiMooseEnum()

template<typename T >
std::map< T, MooseEnum > Moose::createMapFromVectorAndMultiMooseEnum ( const std::vector< T > &  keys,
const MultiMooseEnum values 
)

Create a map from a vector of keys and MultiMooseEnum acting as a vector.

Parameters
keysthe vector of the keys
valuesthe MultiMooseEnum acting as a vector of the values
Template Parameters
Tthe type of the keys

Definition at line 58 of file MapConversionUtils.h.

59{
60 std::map<T, MooseEnum> map;
61 mooseAssert(keys.size() == values.size(),
62 "Map should be made from keys and values of the same size");
63 // No values have been specified. We cant form a map of empty MooseEnum
64 if (!values.size())
65 return map;
66 std::transform(keys.begin(),
67 keys.end(),
68 values.begin(),
69 std::inserter(map, map.end()),
70 [values](const T & a, const MooseEnumItem & b)
71 {
72 // Create a MooseEnum from the available values in the MultiMooseEnum and an
73 // actual current active item from that same MultiMooseEnum
74 MooseEnum single_value(values.getRawNames(), b.name());
75 return std::make_pair(a, single_value);
76 });
77 return map;
78}
std::array< Real, 2 > values
Definition MortarUtils.C:52
Class for containing MooseEnum item information.

◆ createMapFromVectors()

template<typename T , typename C >
std::map< T, C > Moose::createMapFromVectors ( const std::vector< T > &  keys,
const std::vector< C > &  values 
)

Create a map from two vectors.

Parameters
keysthe vector of the keys
valuesthe vector of the values
Template Parameters
Tthe type of the keys
Cthe type of the values

Definition at line 36 of file MapConversionUtils.h.

37{
38 std::map<T, C> map;
39 mooseAssert(keys.size() == values.size(),
40 "Map should be made from keys (" + std::to_string(keys.size()) + ") and values (" +
41 std::to_string(values.size()) + ") of the same size");
42
43 // No values have been specified.
44 if (!values.size())
45 {
46 return map;
47 }
48 std::transform(keys.begin(),
49 keys.end(),
50 values.begin(),
51 std::inserter(map, map.end()),
52 [](const T & a, const C & b) { return std::make_pair(a, b); });
53 return map;
54}

◆ createMooseApp()

std::unique_ptr< MooseApp > Moose::createMooseApp ( const std::string &  default_app_type,
int  argc,
char *  argv[] 
)

Create a MooseApp from command-line arguments.

Definition at line 27 of file MooseMain.C.

28{
29 // Parse the command line early in order to determine the application type, from:
30 // - the input file, to load and search for Application/type
31 // - the --app command line argument
32 // - The Application/type= hit command line argument
33 auto command_line_params = emptyInputParameters();
34 {
35 CommandLine cl(argc, argv);
36 cl.parse();
37 MooseApp::addInputParam(command_line_params);
38 MooseApp::addAppParam(command_line_params);
39 cl.populateCommandLineParams(command_line_params);
40
41 // Do not allow overriding Application/type= for subapps
42 for (const auto & arg : cl.getArguments())
43 if (std::regex_match(arg, std::regex("[A-Za-z0-9]*:Application/.*")))
45 "For command line argument '",
46 arg,
47 "': overriding the application type for MultiApps via command line is not allowed.");
48 }
49 const auto & input_filenames = command_line_params.get<std::vector<std::string>>("input_file");
50
51 // Parse command line arguments so that we can get the "--app" entry (if any) and the HIT
52 // command line arguments for the Parser
53 auto command_line = std::make_unique<CommandLine>(argc, argv);
54 command_line->parse();
55
56 // Setup the parser with the input and the HIT parameters from the command line. The parse
57 // will also look for "Application/type=" in input to specify the application type
58 auto parser = std::make_unique<Parser>(input_filenames);
59 parser->setAppType(default_app_type);
60 parser->setCommandLineParams(command_line->buildHitParams());
61 parser->parse();
62
63 // Search the command line for either --app or Application/type and let the last one win
64 for (const auto & entry : std::as_const(*command_line).getEntries())
65 if (!entry.subapp_name && entry.value &&
66 (entry.name == "--app" || entry.name == "Application/type"))
67 parser->setAppType(*entry.value);
68
69 const auto & app_type = parser->getAppType();
70 if (!AppFactory::instance().isRegistered(app_type))
71 mooseError("'", app_type, "' is not a registered application type.");
72
73 // Create an instance of the application and store it in a smart pointer for easy cleanup
74 return AppFactory::create(std::move(parser), std::move(command_line));
75}
InputParameters emptyInputParameters()
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
static std::unique_ptr< MooseApp > create(const std::string &app_type, const std::vector< std::string > &cli_args={})
Create an app with no input and command line arguments.
Definition AppFactory.C:64
static AppFactory & instance()
Get the instance of the AppFactory.
Definition AppFactory.C:20
This class wraps provides and tracks access to command line parameters.
Definition CommandLine.h:30
static void addAppParam(InputParameters &params)
Definition MooseApp.C:264
static void addInputParam(InputParameters &params)
Definition MooseApp.C:271

Referenced by main().

◆ currentState()

StateArg Moose::currentState ( )
inline

◆ derivInsert() [1/2]

template<std::size_t N>
void Moose::derivInsert ( NumberArray< N, Real > &  derivs,
dof_id_type  index,
Real  value 
)
inline

Definition at line 19 of file NumberArrayOps.h.

20{
21 mooseAssert(index < MOOSE_AD_MAX_DOFS_PER_ELEM,
22 "The requested derivative index "
23 << index << " is not less than " << MOOSE_AD_MAX_DOFS_PER_ELEM
24 << ". You can run `configure --with-derivative-size=<n>` to request a larger "
25 "derivative container.");
26 derivs[index] = value;
27}

◆ derivInsert() [2/2]

template<std::size_t N>
void Moose::derivInsert ( SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N > > &  derivs,
libMesh::dof_id_type  index,
Real  value 
)
inline

Definition at line 21 of file ADReal.h.

24{
25#ifndef NDEBUG
26 try
27 {
28 derivs.insert(index) = value;
29 }
30 catch (MetaPhysicL::LogicError &)
31 {
32 // We don't want to use a MooseError here to keep the list of includes in parsed ADReal logic
33 // minimal
34 libmesh_error_msg(
35 "The last insertion into the sparse derivative storage container exceeded the "
36 "underlying array size. Consider running `configure --with-derivative-size=<n>` to "
37 "obtain a larger underlying container");
38 }
39#else
40 derivs.insert(index) = value;
41#endif
42}
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

Referenced by MooseVariableScalar::computeAD(), MooseVariableDataFV< OutputType >::computeAD(), Assembly::computeFaceMap(), ADPenaltyPeriodicSegmentalConstraint::computeQpResidual(), ADPeriodicSegmentalConstraint::computeQpResidual(), ADPenaltyPeriodicSegmentalConstraint::computeScalarQpResidual(), Assembly::computeSinglePointMapAD(), MooseVariableFE< OutputType >::computeSolution(), MooseVariableScalar::evaluate(), MooseVariableFE< OutputType >::evaluate(), MooseVariableData< OutputType >::fetchADDofValues(), and MooseVariableDataFV< OutputType >::fetchADDofValues().

◆ doDerivatives()

bool Moose::doDerivatives ( const SubProblem subproblem,
const SystemBase sys 
)
Returns
whether we should be doing derivatives

Definition at line 83 of file ADUtils.C.

84{
85 return ADReal::do_derivatives && sys.number() == subproblem.currentNlSysNum();
86}
virtual unsigned int currentNlSysNum() const =0
unsigned int number() const
Gets the number of this system.

Referenced by MooseVariableFE< OutputType >::computeSolution(), MooseVariableScalar::evaluate(), MooseVariableFE< OutputType >::evaluate(), and MooseVariableData< OutputType >::fetchADDofValues().

◆ elementsIntersectedByLine() [1/2]

void Moose::elementsIntersectedByLine ( const Point p0,
const Point p1,
const MeshBase ,
const PointLocatorBase point_locator,
std::vector< Elem * > &  intersected_elems,
std::vector< LineSegment > &  segments 
)

Definition at line 194 of file RayTracing.C.

200{
201 // Make sure our list is clear
202 intersected_elems.clear();
203
204 // Find the starting element
205 const Elem * first_elem = point_locator(p0);
206
207 // Quick return if can't even locate the first element.
208 if (!first_elem)
209 return;
210
211 intersected_elems.push_back(const_cast<Elem *>(first_elem));
212
213 // Make a LineSegment object out of our two points for ease:
214 LineSegment line_segment = LineSegment(p0, p1);
215
216 // Find 'em!
218 line_segment, first_elem, -1, p0, intersected_elems, segments);
219}
The LineSegment class is used by the LineMaterialSamplerBase class and for some ray tracing stuff.
Definition LineSegment.h:31
void recursivelyFindElementsIntersectedByLine(const LineSegment &line_segment, const Elem *current_elem, int incoming_side, const Point &incoming_point, std::vector< Elem * > &intersected_elems, std::vector< LineSegment > &segments)
Recursively find all elements intersected by a line segment.
Definition RayTracing.C:146

◆ elementsIntersectedByLine() [2/2]

void Moose::elementsIntersectedByLine ( const Point &  p0,
const Point &  p1,
const MeshBase &  mesh,
const libMesh::PointLocatorBase point_locator,
std::vector< Elem * > &  intersected_elems,
std::vector< LineSegment > &  segments 
)

Find all of the elements intersected by a line.

The line is given as the beginning and ending points

Parameters
p0The beginning of the line
p1The end of the line
intersected_elemsThe elements intersected by the line. Will be empty if there are no intersections.
segmentsThe line segments across each element

Referenced by ElementsAlongLine::execute(), IntersectionPointsAlongLine::execute(), and LineMaterialSamplerBase< T >::execute().

◆ elementsIntersectedByPlane() [1/2]

void Moose::elementsIntersectedByPlane ( const libMesh::Point p0,
const libMesh::Point normal,
const libMesh::MeshBase mesh,
std::vector< const libMesh::Elem * > &  intersected_elems 
)

Find all of the elements intersected by a plane.

The plane is given as a point and a normal vector.

Parameters
p0Point in plane.
normalNormal vector to plane.
intersected_elemsThe elements intersected by the plane. Will be empty if there are no intersections.

Definition at line 55 of file ElementsIntersectedByPlane.C.

59{
60 // Make sure our list is clear
61 intersected_elems.clear();
62
63 // Create plane from point and normal:
64 libMesh::Plane plane(p0, normal);
65
66 // Find 'em!
67 findElementsIntersectedByPlane(plane, mesh, intersected_elems);
68}
void findElementsIntersectedByPlane(const libMesh::Plane &plane, const MeshBase &mesh, std::vector< const Elem * > &intersected_elems)

Referenced by ElementsAlongPlane::execute().

◆ elementsIntersectedByPlane() [2/2]

void Moose::elementsIntersectedByPlane ( const libMesh::Point p0,
const libMesh::Point p1,
const libMesh::Point p2,
const libMesh::MeshBase mesh,
std::vector< const libMesh::Elem * > &  intersected_elems 
)

Find all of the elements intersected by a plane.

The plane is given as three points in the plane.

Parameters
p0Point in plane.
p1Point in plane.
p2Point in plane.
intersected_elemsThe elements intersected by the plane. Will be empty if there are no intersections.

Definition at line 71 of file ElementsIntersectedByPlane.C.

76{
77 // Make sure our list is clear
78 intersected_elems.clear();
79
80 // Create plane from three points:
81 libMesh::Plane plane(p0, p1, p2);
82
83 // Find 'em!
84 findElementsIntersectedByPlane(plane, mesh, intersected_elems);
85}

◆ enumerate() [1/3]

template<class Container >
_enumerate_range< typename Container::const_iterator > Moose::enumerate ( const Container &  content)

Definition at line 68 of file Enumerate.h.

69{
71 std::begin(content), std::end(content), 0);
72}

◆ enumerate() [2/3]

template<class Container >
_enumerate_range< typename Container::iterator > Moose::enumerate ( Container &  content)

Definition at line 61 of file Enumerate.h.

62{
63 return _enumerate_range<typename Container::iterator>(std::begin(content), std::end(content), 0);
64}

◆ enumerate() [3/3]

template<class Iterator >
_enumerate_range< Iterator > Moose::enumerate ( Iterator  first,
Iterator  last,
typename std::iterator_traits< Iterator >::difference_type  initial 
)

Enumerate function for iterating over a range and obtaining both a reference to the underlying type and an index simultaneously.

This method is forward-compatible with the C++17 structured bindings capability.

C++11 compatible usage:

for (auto it : Moose::enumerate(values)) _console << it.index() << ": " << it.value() << '
';

// Here the third argument is the starting index value for (auto it : Moose::enumerate(values.begin(), values.end(), 0)) _console << it.index() << ": " << it.value() << '
';

C++17 usage (DO NOT USE IN MOOSE):

for (auto [index, value] : Moose::enumerate(values)) _console << index << ": " << value << '
';

// Here the third argument is the starting index value for (auto [index, value] : Moose::enumerate(values.begin(), values.end(), 0)) _console << index << ": " << value << '
';

Definition at line 52 of file Enumerate.h.

55{
56 return _enumerate_range<Iterator>(first, last, initial);
57}

Referenced by JvarMapInterfaceBase< T >::JvarMapInterfaceBase(), NearestPointAverage::nearestPointIndex(), NearestPointIntegralVariablePostprocessor::nearestPointIndex(), and NearestPointBase< UserObjectType, BaseType >::nearestUserObject().

◆ fe_lagrange_1D_shape()

template<typename T >
T Moose::fe_lagrange_1D_shape ( const Order  order,
const unsigned int  i,
const T &  xi 
)

Definition at line 22 of file MooseLagrangeHelpers.h.

23{
24 switch (order)
25 {
26 // Lagrange linears
27 case libMesh::FIRST:
28 {
29 libmesh_assert_less(i, 2);
30
31 switch (i)
32 {
33 case 0:
34 return .5 * (1. - xi);
35
36 case 1:
37 return .5 * (1. + xi);
38
39 default:
40 mooseError("Invalid shape function index i = ", i);
41 }
42 }
43
44 // Lagrange quadratics
45 case libMesh::SECOND:
46 {
47 libmesh_assert_less(i, 3);
48
49 switch (i)
50 {
51 case 0:
52 return .5 * xi * (xi - 1.);
53
54 case 1:
55 return .5 * xi * (xi + 1);
56
57 case 2:
58 return (1. - xi * xi);
59
60 default:
61 mooseError("Invalid shape function index i = ", i);
62 }
63 }
64
65 // Lagrange cubics
66 case libMesh::THIRD:
67 {
68 libmesh_assert_less(i, 4);
69
70 switch (i)
71 {
72 case 0:
73 return 9. / 16. * (1. / 9. - xi * xi) * (xi - 1.);
74
75 case 1:
76 return -9. / 16. * (1. / 9. - xi * xi) * (xi + 1.);
77
78 case 2:
79 return 27. / 16. * (1. - xi * xi) * (1. / 3. - xi);
80
81 case 3:
82 return 27. / 16. * (1. - xi * xi) * (1. / 3. + xi);
83
84 default:
85 mooseError("Invalid shape function index i = ", i);
86 }
87 }
88
89 default:
90 mooseError("Unsupported order");
91 }
92}
Point xi
Definition MortarUtils.C:59

Referenced by AutomaticMortarGeneration::buildMortarSegmentMesh(), fe_lagrange_2D_shape(), fe_lagrange_2D_shape_deriv(), AutomaticMortarGeneration::getNormals(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), and AutomaticMortarGeneration::projectSecondaryNodesSinglePair().

◆ fe_lagrange_1D_shape_deriv()

template<typename T >
T Moose::fe_lagrange_1D_shape_deriv ( const Order  order,
const unsigned int  i,
const T &  xi 
)

Definition at line 96 of file MooseLagrangeHelpers.h.

97{
98 switch (order)
99 {
100 // Lagrange linear shape function derivatives
101 case libMesh::FIRST:
102 {
103 libmesh_assert_less(i, 2);
104
105 switch (i)
106 {
107 case 0:
108 return -.5;
109
110 case 1:
111 return .5;
112
113 default:
114 mooseError("Invalid shape function index i = ", i);
115 }
116 }
117
118 // Lagrange quadratic shape function derivatives
119 case libMesh::SECOND:
120 {
121 libmesh_assert_less(i, 3);
122
123 switch (i)
124 {
125 case 0:
126 return xi - .5;
127
128 case 1:
129 return xi + .5;
130
131 case 2:
132 return -2. * xi;
133
134 default:
135 mooseError("Invalid shape function index i = ", i);
136 }
137 }
138
139 // Lagrange cubic shape function derivatives
140 case libMesh::THIRD:
141 {
142 libmesh_assert_less(i, 4);
143
144 switch (i)
145 {
146 case 0:
147 return -9. / 16. * (3. * xi * xi - 2. * xi - 1. / 9.);
148
149 case 1:
150 return -9. / 16. * (-3. * xi * xi - 2. * xi + 1. / 9.);
151
152 case 2:
153 return 27. / 16. * (3. * xi * xi - 2. / 3. * xi - 1.);
154
155 case 3:
156 return 27. / 16. * (-3. * xi * xi - 2. / 3. * xi + 1.);
157
158 default:
159 mooseError("Invalid shape function index i = ", i);
160 }
161 }
162
163 default:
164 mooseError("Unsupported order");
165 }
166}

Referenced by fe_lagrange_2D_shape_deriv().

◆ fe_lagrange_2D_shape()

template<typename T , template< typename > class VectorType>
T Moose::fe_lagrange_2D_shape ( const libMesh::ElemType  type,
const Order  order,
const unsigned int  i,
const VectorType< T > &  p 
)

Definition at line 171 of file MooseLagrangeHelpers.h.

175{
176 switch (order)
177 {
178 // linear Lagrange shape functions
179 case libMesh::FIRST:
180 {
181 switch (type)
182 {
183 case libMesh::QUAD4:
185 case libMesh::QUAD8:
187 case libMesh::QUAD9:
188 {
189 // Compute quad shape functions as a tensor-product
190 const T xi = p(0);
191 const T eta = p(1);
192
193 libmesh_assert_less(i, 4);
194
195 // 0 1 2 3
196 static const unsigned int i0[] = {0, 1, 1, 0};
197 static const unsigned int i1[] = {0, 0, 1, 1};
198
199 return (fe_lagrange_1D_shape(FIRST, i0[i], xi) * fe_lagrange_1D_shape(FIRST, i1[i], eta));
200 }
201
202 case libMesh::TRI3:
204 case libMesh::TRI6:
205 case libMesh::TRI7:
206 {
207 const T zeta1 = p(0);
208 const T zeta2 = p(1);
209 const T zeta0 = 1. - zeta1 - zeta2;
210
211 libmesh_assert_less(i, 3);
212
213 switch (i)
214 {
215 case 0:
216 return zeta0;
217
218 case 1:
219 return zeta1;
220
221 case 2:
222 return zeta2;
223
224 default:
225 mooseError("Invalid shape function index i = ", i);
226 }
227 }
228
229 default:
230 mooseError("Unsupported element type:", type);
231 }
232 }
233
234 // quadratic Lagrange shape functions
235 case libMesh::SECOND:
236 {
237 switch (type)
238 {
239 case libMesh::QUAD8:
240 {
241 // Compute quad shape functions as a tensor-product
242 const T xi = p(0);
243 const T eta = p(1);
244
245 libmesh_assert_less(i, 8);
246
247 switch (i)
248 {
249 case 0:
250 return .25 * (1. - xi) * (1. - eta) * (-1. - xi - eta);
251 case 1:
252 return .25 * (1. + xi) * (1. - eta) * (-1. + xi - eta);
253 case 2:
254 return .25 * (1. + xi) * (eta + 1.) * (-1. + xi + eta);
255 case 3:
256 return .25 * (1. - xi) * (eta + 1.) * (-1. - xi + eta);
257 case 4:
258 return .5 * (1. - xi * xi) * (1. - eta);
259 case 5:
260 return .5 * (1. + xi) * (1. - eta * eta);
261 case 6:
262 return .5 * (1. - xi * xi) * (1. + eta);
263 case 7:
264 return .5 * (1. - xi) * (1. - eta * eta);
265 default:
266 mooseError("Invalid shape function index i = ", i);
267 }
268 }
269 case libMesh::QUAD9:
270 {
271 // Compute quad shape functions as a tensor-product
272 const T xi = p(0);
273 const T eta = p(1);
274
275 libmesh_assert_less(i, 9);
276
277 // 0 1 2 3 4 5 6 7 8
278 static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
279 static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
280
281 return (fe_lagrange_1D_shape(libMesh::SECOND, i0[i], xi) *
283 }
284 case libMesh::TRI6:
285 case libMesh::TRI7:
286 {
287 const T zeta1 = p(0);
288 const T zeta2 = p(1);
289 const T zeta0 = 1. - zeta1 - zeta2;
290
291 libmesh_assert_less(i, 6);
292
293 switch (i)
294 {
295 case 0:
296 return 2. * zeta0 * (zeta0 - 0.5);
297
298 case 1:
299 return 2. * zeta1 * (zeta1 - 0.5);
300
301 case 2:
302 return 2. * zeta2 * (zeta2 - 0.5);
303
304 case 3:
305 return 4. * zeta0 * zeta1;
306
307 case 4:
308 return 4. * zeta1 * zeta2;
309
310 case 5:
311 return 4. * zeta2 * zeta0;
312
313 default:
314 mooseError("Invalid shape function index i = ", i);
315 }
316 }
317
318 default:
319 mooseError("Unsupported 2D element type");
320 }
321 }
322
323 // "cubic" (one cubic bubble) Lagrange shape functions
324 case libMesh::THIRD:
325 {
326 switch (type)
327 {
328 case libMesh::TRI7:
329 {
330 const T zeta1 = p(0);
331 const T zeta2 = p(1);
332 const T zeta0 = 1. - zeta1 - zeta2;
333 const T bubble_27th = zeta0 * zeta1 * zeta2;
334
335 libmesh_assert_less(i, 7);
336
337 switch (i)
338 {
339 case 0:
340 return 2. * zeta0 * (zeta0 - 0.5) + 3. * bubble_27th;
341
342 case 1:
343 return 2. * zeta1 * (zeta1 - 0.5) + 3. * bubble_27th;
344
345 case 2:
346 return 2. * zeta2 * (zeta2 - 0.5) + 3. * bubble_27th;
347
348 case 3:
349 return 4. * zeta0 * zeta1 - 12. * bubble_27th;
350
351 case 4:
352 return 4. * zeta1 * zeta2 - 12. * bubble_27th;
353
354 case 5:
355 return 4. * zeta2 * zeta0 - 12. * bubble_27th;
356
357 case 6:
358 return 27. * bubble_27th;
359
360 default:
361 mooseError("Invalid shape function index i = ", i);
362 }
363 }
364
365 default:
366 mooseError("Unsupported 2D element type");
367 }
368 }
369
370 // unsupported order
371 default:
372 mooseError("Unsupported order");
373 }
374}
Point eta
Definition MortarUtils.C:60
Real fe_lagrange_1D_shape(const Order order, const unsigned int i, const Real xi)

Referenced by AutomaticMortarGeneration::getNormals(), and Moose::Mortar::projectQPoints3d().

◆ fe_lagrange_2D_shape_deriv()

template<typename T , template< typename > class VectorType>
T Moose::fe_lagrange_2D_shape_deriv ( const libMesh::ElemType  type,
const Order  order,
const unsigned int  i,
const unsigned int  j,
const VectorType< T > &  p 
)

Definition at line 378 of file MooseLagrangeHelpers.h.

383{
384 libmesh_assert_less(j, 2);
385
386 switch (order)
387 {
388 // linear Lagrange shape functions
389 case libMesh::FIRST:
390 {
391 switch (type)
392 {
393 case libMesh::QUAD4:
395 case libMesh::QUAD8:
397 case libMesh::QUAD9:
398 {
399 // Compute quad shape functions as a tensor-product
400 const T xi = p(0);
401 const T eta = p(1);
402
403 libmesh_assert_less(i, 4);
404
405 // 0 1 2 3
406 static const unsigned int i0[] = {0, 1, 1, 0};
407 static const unsigned int i1[] = {0, 0, 1, 1};
408
409 switch (j)
410 {
411 // d()/dxi
412 case 0:
413 return (fe_lagrange_1D_shape_deriv(FIRST, i0[i], xi) *
414 fe_lagrange_1D_shape(FIRST, i1[i], eta));
415
416 // d()/deta
417 case 1:
418 return (fe_lagrange_1D_shape(FIRST, i0[i], xi) *
419 fe_lagrange_1D_shape_deriv(FIRST, i1[i], eta));
420
421 default:
422 mooseError("Invalid derivative index j = ", j);
423 }
424 }
425
426 case libMesh::TRI3:
428 case libMesh::TRI6:
429 case libMesh::TRI7:
430 {
431 libmesh_assert_less(i, 3);
432
433 const T dzeta0dxi = -1.;
434 const T dzeta1dxi = 1.;
435 const T dzeta2dxi = 0.;
436
437 const T dzeta0deta = -1.;
438 const T dzeta1deta = 0.;
439 const T dzeta2deta = 1.;
440
441 switch (j)
442 {
443 // d()/dxi
444 case 0:
445 {
446 switch (i)
447 {
448 case 0:
449 return dzeta0dxi;
450
451 case 1:
452 return dzeta1dxi;
453
454 case 2:
455 return dzeta2dxi;
456
457 default:
458 mooseError("Invalid shape function index i = ", i);
459 }
460 }
461 // d()/deta
462 case 1:
463 {
464 switch (i)
465 {
466 case 0:
467 return dzeta0deta;
468
469 case 1:
470 return dzeta1deta;
471
472 case 2:
473 return dzeta2deta;
474
475 default:
476 mooseError("Invalid shape function index i = ", i);
477 }
478 }
479 default:
480 mooseError("Invalid derivative index j = ", j);
481 }
482 }
483
484 default:
485 mooseError("Unsupported 2D element type");
486 }
487 }
488
489 // quadratic Lagrange shape functions
490 case libMesh::SECOND:
491 {
492 switch (type)
493 {
494 case libMesh::QUAD8:
496 {
497 const T xi = p(0);
498 const T eta = p(1);
499
500 libmesh_assert_less(i, 8);
501
502 switch (j)
503 {
504 // d/dxi
505 case 0:
506 switch (i)
507 {
508 case 0:
509 return .25 * (1. - eta) * ((1. - xi) * (-1.) + (-1.) * (-1. - xi - eta));
510
511 case 1:
512 return .25 * (1. - eta) * ((1. + xi) * (1.) + (1.) * (-1. + xi - eta));
513
514 case 2:
515 return .25 * (1. + eta) * ((1. + xi) * (1.) + (1.) * (-1. + xi + eta));
516
517 case 3:
518 return .25 * (1. + eta) * ((1. - xi) * (-1.) + (-1.) * (-1. - xi + eta));
519
520 case 4:
521 return .5 * (-2. * xi) * (1. - eta);
522
523 case 5:
524 return .5 * (1.) * (1. - eta * eta);
525
526 case 6:
527 return .5 * (-2. * xi) * (1. + eta);
528
529 case 7:
530 return .5 * (-1.) * (1. - eta * eta);
531
532 default:
533 mooseError("Invalid shape function index i = ", i);
534 }
535
536 // d/deta
537 case 1:
538 switch (i)
539 {
540 case 0:
541 return .25 * (1. - xi) * ((1. - eta) * (-1.) + (-1.) * (-1. - xi - eta));
542
543 case 1:
544 return .25 * (1. + xi) * ((1. - eta) * (-1.) + (-1.) * (-1. + xi - eta));
545
546 case 2:
547 return .25 * (1. + xi) * ((1. + eta) * (1.) + (1.) * (-1. + xi + eta));
548
549 case 3:
550 return .25 * (1. - xi) * ((1. + eta) * (1.) + (1.) * (-1. - xi + eta));
551
552 case 4:
553 return .5 * (1. - xi * xi) * (-1.);
554
555 case 5:
556 return .5 * (1. + xi) * (-2. * eta);
557
558 case 6:
559 return .5 * (1. - xi * xi) * (1.);
560
561 case 7:
562 return .5 * (1. - xi) * (-2. * eta);
563
564 default:
565 mooseError("Invalid shape function index i = ", i);
566 }
567
568 default:
569 mooseError("ERROR: Invalid derivative index j = ", j);
570 }
571 }
572
573 case libMesh::QUAD9:
574 {
575 // Compute quad shape functions as a tensor-product
576 const T xi = p(0);
577 const T eta = p(1);
578
579 libmesh_assert_less(i, 9);
580
581 // 0 1 2 3 4 5 6 7 8
582 static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
583 static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
584
585 switch (j)
586 {
587 // d()/dxi
588 case 0:
591
592 // d()/deta
593 case 1:
594 return (fe_lagrange_1D_shape(libMesh::SECOND, i0[i], xi) *
596
597 default:
598 mooseError("Invalid derivative index j = ", j);
599 }
600 }
601
602 case libMesh::TRI6:
603 case libMesh::TRI7:
604 {
605 libmesh_assert_less(i, 6);
606
607 const T zeta1 = p(0);
608 const T zeta2 = p(1);
609 const T zeta0 = 1. - zeta1 - zeta2;
610
611 const T dzeta0dxi = -1.;
612 const T dzeta1dxi = 1.;
613 const T dzeta2dxi = 0.;
614
615 const T dzeta0deta = -1.;
616 const T dzeta1deta = 0.;
617 const T dzeta2deta = 1.;
618
619 switch (j)
620 {
621 case 0:
622 {
623 switch (i)
624 {
625 case 0:
626 return (4. * zeta0 - 1.) * dzeta0dxi;
627
628 case 1:
629 return (4. * zeta1 - 1.) * dzeta1dxi;
630
631 case 2:
632 return (4. * zeta2 - 1.) * dzeta2dxi;
633
634 case 3:
635 return 4. * zeta1 * dzeta0dxi + 4. * zeta0 * dzeta1dxi;
636
637 case 4:
638 return 4. * zeta2 * dzeta1dxi + 4. * zeta1 * dzeta2dxi;
639
640 case 5:
641 return 4. * zeta2 * dzeta0dxi + 4 * zeta0 * dzeta2dxi;
642
643 default:
644 mooseError("Invalid shape function index i = ", i);
645 }
646 }
647
648 case 1:
649 {
650 switch (i)
651 {
652 case 0:
653 return (4. * zeta0 - 1.) * dzeta0deta;
654
655 case 1:
656 return (4. * zeta1 - 1.) * dzeta1deta;
657
658 case 2:
659 return (4. * zeta2 - 1.) * dzeta2deta;
660
661 case 3:
662 return 4. * zeta1 * dzeta0deta + 4. * zeta0 * dzeta1deta;
663
664 case 4:
665 return 4. * zeta2 * dzeta1deta + 4. * zeta1 * dzeta2deta;
666
667 case 5:
668 return 4. * zeta2 * dzeta0deta + 4 * zeta0 * dzeta2deta;
669
670 default:
671 mooseError("Invalid shape function index i = ", i);
672 }
673 }
674 default:
675 mooseError("ERROR: Invalid derivative index j = ", j);
676 }
677 }
678
679 default:
680 mooseError("ERROR: Unsupported 2D element type");
681 }
682 }
683
684 // "cubic" (one cubic bubble) Lagrange shape functions
685 case libMesh::THIRD:
686 {
687 switch (type)
688 {
689 case libMesh::TRI7:
690 {
691 libmesh_assert_less(i, 7);
692
693 const T zeta1 = p(0);
694 const T zeta2 = p(1);
695 const T zeta0 = 1. - zeta1 - zeta2;
696
697 const T dzeta0dxi = -1.;
698 const T dzeta1dxi = 1.;
699 const T dzeta2dxi = 0.;
700 const T dbubbledxi = zeta2 * (1. - 2. * zeta1 - zeta2);
701
702 const T dzeta0deta = -1.;
703 const T dzeta1deta = 0.;
704 const T dzeta2deta = 1.;
705 const T dbubbledeta = zeta1 * (1. - zeta1 - 2. * zeta2);
706
707 switch (j)
708 {
709 case 0:
710 {
711 switch (i)
712 {
713 case 0:
714 return (4. * zeta0 - 1.) * dzeta0dxi + 3. * dbubbledxi;
715
716 case 1:
717 return (4. * zeta1 - 1.) * dzeta1dxi + 3. * dbubbledxi;
718
719 case 2:
720 return (4. * zeta2 - 1.) * dzeta2dxi + 3. * dbubbledxi;
721
722 case 3:
723 return 4. * zeta1 * dzeta0dxi + 4. * zeta0 * dzeta1dxi - 12. * dbubbledxi;
724
725 case 4:
726 return 4. * zeta2 * dzeta1dxi + 4. * zeta1 * dzeta2dxi - 12. * dbubbledxi;
727
728 case 5:
729 return 4. * zeta2 * dzeta0dxi + 4 * zeta0 * dzeta2dxi - 12. * dbubbledxi;
730
731 case 6:
732 return 27. * dbubbledxi;
733
734 default:
735 mooseError("Invalid shape function index i = ", i);
736 }
737 }
738
739 case 1:
740 {
741 switch (i)
742 {
743 case 0:
744 return (4. * zeta0 - 1.) * dzeta0deta + 3. * dbubbledeta;
745
746 case 1:
747 return (4. * zeta1 - 1.) * dzeta1deta + 3. * dbubbledeta;
748
749 case 2:
750 return (4. * zeta2 - 1.) * dzeta2deta + 3. * dbubbledeta;
751
752 case 3:
753 return 4. * zeta1 * dzeta0deta + 4. * zeta0 * dzeta1deta - 12. * dbubbledeta;
754
755 case 4:
756 return 4. * zeta2 * dzeta1deta + 4. * zeta1 * dzeta2deta - 12. * dbubbledeta;
757
758 case 5:
759 return 4. * zeta2 * dzeta0deta + 4 * zeta0 * dzeta2deta - 12. * dbubbledeta;
760
761 case 6:
762 return 27. * dbubbledeta;
763
764 default:
765 mooseError("Invalid shape function index i = ", i);
766 }
767 }
768 default:
769 mooseError("ERROR: Invalid derivative index j = ", j);
770 }
771 }
772
773 default:
774 mooseError("ERROR: Unsupported 2D element type");
775 }
776 }
777
778 // unsupported order
779 default:
780 mooseError("Unsupported order");
781 }
782}
Real fe_lagrange_1D_shape_deriv(const Order order, const unsigned int i, const unsigned int j, const Real xi)

◆ findContactPoint()

void Moose::findContactPoint ( PenetrationInfo p_info,
FEBase fe_elem,
FEBase fe_side,
FEType ,
const libMesh::Point secondary_point,
bool  start_with_centroid,
const Real  tangential_tolerance,
bool &  contact_point_on_side,
bool &  search_succeeded 
)

Finds the closest point (called the contact point) on the primary_elem on side "side" to the secondary_point.

Parameters
p_infoThe penetration info object, contains primary_elem, side, various other information
fe_elemFE object for the element
fe_sideFE object for the side
fe_side_typeUnused; was used for a now-deprecated inverse_map overload.
start_with_centroidif true, start inverse mapping procedure from element centroid
tangential_tolerance'tangential' tolerance for determining whether a contact point on a side
secondary_pointThe physical space coordinates of the secondary node
contact_point_on_sidewhether or not the contact_point actually lies on that side of the element.
search_succeededwhether or not the search for the contact point succeeded. If not it should likely be discarded

Definition at line 53 of file FindContactPoint.C.

62{
63 // Default to true and we'll switch on failures
64 search_succeeded = true;
65
66 const Elem * primary_elem = p_info._elem;
67
68 unsigned int dim = primary_elem->dim();
69
70 const Elem * side = p_info._side;
71
72 const std::vector<libMesh::Point> & phys_point = fe_side->get_xyz();
73
74 const std::vector<RealGradient> & dxyz_dxi = fe_side->get_dxyzdxi();
75 const std::vector<RealGradient> & d2xyz_dxi2 = fe_side->get_d2xyzdxi2();
76 const std::vector<RealGradient> & d2xyz_dxieta = fe_side->get_d2xyzdxideta();
77
78 const std::vector<RealGradient> & dxyz_deta = fe_side->get_dxyzdeta();
79 const std::vector<RealGradient> & d2xyz_deta2 = fe_side->get_d2xyzdeta2();
80 const std::vector<RealGradient> & d2xyz_detaxi = fe_side->get_d2xyzdxideta();
81
82 if (dim == 1)
83 {
84 const Node * nearest_node = side->node_ptr(0);
85 p_info._closest_point = *nearest_node;
86 p_info._closest_point_ref =
87 primary_elem->master_point(primary_elem->get_node_index(nearest_node));
88 std::vector<libMesh::Point> elem_points = {p_info._closest_point_ref};
89
90 const std::vector<RealGradient> & elem_dxyz_dxi = fe_elem->get_dxyzdxi();
91
92 fe_elem->reinit(primary_elem, &elem_points);
93 fe_side->reinit(side, &elem_points);
94
95 p_info._normal = elem_dxyz_dxi[0];
96 if (nearest_node->id() == primary_elem->node_id(0))
97 p_info._normal *= -1.0;
98 p_info._normal /= p_info._normal.norm();
99
100 libMesh::Point from_secondary_to_closest = p_info._closest_point - secondary_point;
101 p_info._distance = from_secondary_to_closest * p_info._normal;
102 libMesh::Point tangential = from_secondary_to_closest - p_info._distance * p_info._normal;
103 p_info._tangential_distance = tangential.norm();
104 p_info._dxyzdxi = dxyz_dxi;
105 p_info._dxyzdeta = dxyz_deta;
106 p_info._d2xyzdxideta = d2xyz_dxieta;
107 p_info._side_phi = fe_side->get_phi();
108 p_info._side_grad_phi = fe_side->get_dphi();
109 contact_point_on_side = true;
110 return;
111 }
112
113 libMesh::Point ref_point;
114
115 if (start_with_centroid)
116 ref_point = FEMap::inverse_map(dim - 1, side, side->vertex_average(), TOLERANCE, false);
117 else
118 ref_point = p_info._closest_point_ref;
119
120 std::vector<libMesh::Point> points = {ref_point};
121 fe_side->reinit(side, &points);
122 RealGradient d = secondary_point - phys_point[0];
123
124 Real update_size = std::numeric_limits<Real>::max();
125
126 // Least squares
127 for (unsigned int it = 0; it < 3 && update_size > TOLERANCE * 1e3; ++it)
128 {
129 DenseMatrix<Real> jac(dim - 1, dim - 1);
130 jac(0, 0) = -(dxyz_dxi[0] * dxyz_dxi[0]);
131
132 if (dim - 1 == 2)
133 {
134 jac(1, 0) = -(dxyz_dxi[0] * dxyz_deta[0]);
135 jac(0, 1) = -(dxyz_deta[0] * dxyz_dxi[0]);
136 jac(1, 1) = -(dxyz_deta[0] * dxyz_deta[0]);
137 }
138
139 DenseVector<Real> rhs(dim - 1);
140 rhs(0) = dxyz_dxi[0] * d;
141
142 if (dim - 1 == 2)
143 rhs(1) = dxyz_deta[0] * d;
144
145 DenseVector<Real> update(dim - 1);
146 jac.lu_solve(rhs, update);
147
148 ref_point(0) -= update(0);
149
150 if (dim - 1 == 2)
151 ref_point(1) -= update(1);
152
153 points[0] = ref_point;
154 fe_side->reinit(side, &points);
155 d = secondary_point - phys_point[0];
156
157 update_size = update.l2_norm();
158 }
159
160 update_size = std::numeric_limits<Real>::max();
161
162 unsigned nit = 0;
163
164 // Newton Loop
165 const auto max_newton_its = 25;
166 const auto tolerance_newton = 1e3 * TOLERANCE * TOLERANCE;
167 for (; nit < max_newton_its && update_size > tolerance_newton; nit++)
168 {
169 d = secondary_point - phys_point[0];
170
171 DenseMatrix<Real> jac(dim - 1, dim - 1);
172 jac(0, 0) = (d2xyz_dxi2[0] * d) - (dxyz_dxi[0] * dxyz_dxi[0]);
173
174 if (dim - 1 == 2)
175 {
176 jac(1, 0) = (d2xyz_dxieta[0] * d) - (dxyz_dxi[0] * dxyz_deta[0]);
177
178 jac(0, 1) = (d2xyz_detaxi[0] * d) - (dxyz_deta[0] * dxyz_dxi[0]);
179 jac(1, 1) = (d2xyz_deta2[0] * d) - (dxyz_deta[0] * dxyz_deta[0]);
180 }
181
182 DenseVector<Real> rhs(dim - 1);
183 rhs(0) = -dxyz_dxi[0] * d;
184
185 if (dim - 1 == 2)
186 rhs(1) = -dxyz_deta[0] * d;
187
188 DenseVector<Real> update(dim - 1);
189 jac.lu_solve(rhs, update);
190
191 // Improvised line search in case the update is too large and gets out of the element so bad
192 // that we cannot reinit at the new point
193 Real mult = 1;
194 while (true)
195 {
196 try
197 {
198 ref_point(0) += mult * update(0);
199
200 if (dim - 1 == 2)
201 ref_point(1) += mult * update(1);
202
203 points[0] = ref_point;
204 fe_side->reinit(side, &points);
205 d = secondary_point - phys_point[0];
206
207 // we don't multiply by 'mult' because it is used for convergence
208 update_size = update.l2_norm();
209 break;
210 }
211 // libMesh might throw here if we hit a zero/negative Jacobian
212 catch (std::exception & e)
213 {
214 // Make sure this *is* just a bad mapping Jacobian
215 if (!strstr(e.what(), "Jacobian") && !strstr(e.what(), "det != 0"))
216 throw;
217
218 ref_point(0) -= mult * update(0);
219 if (dim - 1 == 2)
220 ref_point(1) -= mult * update(1);
221
222 mult *= 0.5;
223 if (mult < 1e-6)
224 {
225#ifndef NDEBUG
226 mooseWarning("We could not solve for the contact point.", e.what());
227#endif
228 update_size = update.l2_norm();
229 d = (secondary_point - phys_point[0]) * mult;
230 break;
231 }
232 }
233 }
234 // We failed the line search, make sure to trigger the error
235 if (mult < 1e-6)
236 {
237 nit = max_newton_its;
238 update_size = 1;
239 break;
240 }
241 }
242
243 if (nit == max_newton_its && update_size > tolerance_newton)
244 {
245 search_succeeded = false;
246#ifndef NDEBUG
247 const auto initial_point =
248 start_with_centroid ? side->vertex_average() : ref_point = p_info._closest_point_ref;
249 Moose::err << "Warning! Newton solve for contact point failed to converge!\nLast update "
250 "distance was: "
251 << update_size << "\nInitial point guess: " << initial_point
252 << "\nLast considered point: " << phys_point[0]
253 << "\nThis potential contact pair (face, point) will be discarded." << std::endl;
254#endif
255 return;
256 }
257
258 p_info._closest_point_ref = ref_point;
259 p_info._closest_point = phys_point[0];
260 p_info._distance = d.norm();
261
262 if (dim - 1 == 2)
263 {
264 p_info._normal = dxyz_dxi[0].cross(dxyz_deta[0]);
265 if (!MooseUtils::absoluteFuzzyEqual(p_info._normal.norm(), 0))
266 p_info._normal /= p_info._normal.norm();
267 }
268 else
269 {
270 const Node * const * elem_nodes = primary_elem->get_nodes();
271 const libMesh::Point in_plane_vector1 = *elem_nodes[1] - *elem_nodes[0];
272 const libMesh::Point in_plane_vector2 = *elem_nodes[2] - *elem_nodes[0];
273
274 libMesh::Point out_of_plane_normal = in_plane_vector1.cross(in_plane_vector2);
275 out_of_plane_normal /= out_of_plane_normal.norm();
276
277 p_info._normal = dxyz_dxi[0].cross(out_of_plane_normal);
278 if (std::fabs(p_info._normal.norm()) > 1e-15)
279 p_info._normal /= p_info._normal.norm();
280 }
281
282 // If the point has not penetrated the face, make the distance negative
283 const Real dot(d * p_info._normal);
284 if (dot > 0.0)
285 p_info._distance = -p_info._distance;
286
287 contact_point_on_side = side->on_reference_element(ref_point);
288
289 p_info._tangential_distance = 0.0;
290
291 if (!contact_point_on_side)
292 {
293 p_info._closest_point_on_face_ref = ref_point;
295
296 points[0] = p_info._closest_point_on_face_ref;
297 fe_side->reinit(side, &points);
298 libMesh::Point closest_point_on_face(phys_point[0]);
299
300 RealGradient off_face = closest_point_on_face - p_info._closest_point;
301 Real tangential_distance = off_face.norm();
302 p_info._tangential_distance = tangential_distance;
303 if (tangential_distance <= tangential_tolerance)
304 {
305 contact_point_on_side = true;
306 }
307 }
308
309 const std::vector<std::vector<Real>> & phi = fe_side->get_phi();
310 const std::vector<std::vector<RealGradient>> & grad_phi = fe_side->get_dphi();
311
312 points[0] = p_info._closest_point_ref;
313 fe_side->reinit(side, &points);
314
315 p_info._side_phi = phi;
316 p_info._side_grad_phi = grad_phi;
317 p_info._dxyzdxi = dxyz_dxi;
318 p_info._dxyzdeta = dxyz_deta;
319 p_info._d2xyzdxideta = d2xyz_dxieta;
320}
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition MooseError.h:345
unsigned int dim
std::vector< const Node * > _off_edge_nodes
const Elem * _side
std::vector< RealGradient > _d2xyzdxideta
Point _closest_point_on_face_ref
std::vector< RealGradient > _dxyzdeta
std::vector< RealGradient > _dxyzdxi
std::vector< std::vector< Real > > _side_phi
const Elem * _elem
std::vector< std::vector< RealGradient > > _side_grad_phi
RealVectorValue _normal
dof_id_type id() const
virtual bool on_reference_element(const Point &p, const Real eps=TOLERANCE) const=0
virtual unsigned short dim() const=0
const Node * node_ptr(const unsigned int i) const
const Node *const * get_nodes() const
unsigned int get_node_index(const Node *node_ptr) const
virtual Point master_point(const unsigned int i) const=0
dof_id_type node_id(const unsigned int i) const
Point vertex_average() const
virtual_for_inffe const std::vector< RealGradient > & get_d2xyzdxideta() const
virtual_for_inffe const std::vector< RealGradient > & get_dxyzdeta() const
virtual_for_inffe const std::vector< RealGradient > & get_d2xyzdeta2() const
virtual_for_inffe const std::vector< RealGradient > & get_d2xyzdxi2() const
virtual_for_inffe const std::vector< RealGradient > & get_dxyzdxi() const
virtual_for_inffe const std::vector< Point > & get_xyz() const
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
const std::vector< std::vector< OutputShape > > & get_phi() const
const std::vector< std::vector< OutputGradient > > & get_dphi() const
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
TypeVector< typename CompareTypes< T, T2 >::supertype > cross(const TypeVector< T2 > &v) const
void restrictPointToFace(libMesh::Point &p, const libMesh::Elem *side, std::vector< const libMesh::Node * > &off_edge_nodes)
static constexpr Real TOLERANCE
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by PenetrationThread::createInfoForElem(), and PenetrationThread::operator()().

◆ findElementsIntersectedByPlane()

void Moose::findElementsIntersectedByPlane ( const libMesh::Plane plane,
const MeshBase mesh,
std::vector< const Elem * > &  intersected_elems 
)

Definition at line 26 of file ElementsIntersectedByPlane.C.

29{
30 // Loop over all elements to find elements intersected by the plane
31 for (const auto & elem : mesh.element_ptr_range())
32 {
33 bool intersected = false;
34
35 // Check whether the first node of this element is below or above the plane
36 const Node & node0 = elem->node_ref(0);
37 bool node0_above_plane = plane.above_surface(node0);
38
39 // Loop over the rest of the nodes and check if any node is on the other side of the plane
40 for (unsigned int i = 1; i < elem->n_nodes(); ++i)
41 {
42 const Node & node = elem->node_ref(i);
43
44 bool node_above_plane = plane.above_surface(node);
45 if (node0_above_plane != node_above_plane)
46 intersected = true;
47 }
48
49 if (intersected)
50 intersected_elems.push_back(elem);
51 }
52}
virtual bool above_surface(const Point &p) const override
MeshBase & mesh

Referenced by elementsIntersectedByPlane(), and elementsIntersectedByPlane().

◆ findSimilar()

std::vector< std::string > Moose::findSimilar ( const std::string &  param,
const std::vector< std::string > &  options 
)

Definition at line 80 of file Builder.C.

81{
82 std::vector<std::string> candidates;
83 if (options.size() == 0)
84 return candidates;
85
86 int mindist = MooseUtils::levenshteinDist(options[0], param);
87 for (const auto & opt : options)
88 {
89 const int dist = MooseUtils::levenshteinDist(opt, param);
90 // magic number heuristics to get similarity distance cutoff
91 const int dist_cutoff = 1 + param.size() / 5;
92 if (dist > dist_cutoff || dist > mindist)
93 continue;
94
95 if (dist < mindist)
96 {
97 mindist = dist;
98 candidates.clear();
99 }
100 candidates.push_back(opt);
101 }
102 return candidates;
103}
std::string opt
int levenshteinDist(const std::string &s1, const std::string &s2)
Definition MooseUtils.C:187

Referenced by Moose::UnusedWalker::walk().

◆ getExec()

std::string Moose::getExec ( )

Gets the full path to the running executable on Mac OS X and linux.

Not implemented for windows.

Definition at line 24 of file ExecutablePath.C.

25{
26 std::string exec_path;
27 char path[1024];
28
29#if defined(__APPLE__)
30 uint32_t size = sizeof(path);
31 if (_NSGetExecutablePath(path, &size) == 0)
32 exec_path = path;
33 else
34 mooseError("Unable to retrieve executable path");
35#elif defined(__WIN32__)
36 return "./";
37#else // Linux with Proc
38 std::ostringstream oss;
39 oss << "/proc/" << getpid() << "/exe";
40 int ch = readlink(oss.str().c_str(), path, 1024);
41 if (ch != -1)
42 {
43 path[ch] = 0;
44 exec_path = path;
45 }
46#endif
47 return exec_path;
48}

Referenced by SystemInfo::getExecutable(), getExecutableName(), getExecutablePath(), and Moose::internal::Capabilities::registerMooseCapabilities().

◆ getExecutableName()

std::string Moose::getExecutableName ( )

Gets the name of the running executable on Mac OS X and linux.

Not implemented for windows.

Definition at line 60 of file ExecutablePath.C.

61{
62 auto name = getExec();
63 // strip off the path to get the name
64 std::string::size_type start = name.find_last_of("/");
65 if (start == std::string::npos)
66 start = 0;
67 return name.substr(start, std::string::npos);
68}
std::string getExec()
Gets the full path to the running executable on Mac OS X and linux.

Referenced by MooseApp::appBinaryName(), and MooseApp::runInputs().

◆ getExecutablePath()

std::string Moose::getExecutablePath ( )

Gets the directory the running executable is on Mac OS X and linux.

Not implemented for windows.

Definition at line 51 of file ExecutablePath.C.

52{
53 auto exec_path = getExec();
54 // strip off the exeuctable to get the PATH
55 std::string::size_type t = exec_path.find_last_of("/");
56 return exec_path.substr(0, t) + "/";
57}

Referenced by Registry::determineDataFilePath(), MooseUtils::docsDir(), MooseUtils::installedInputsDir(), ADFParser::JITCompile(), and MooseUtils::runTestsExecutable().

◆ globalADIndexing()

bool Moose::globalADIndexing ( )
inline

Whether we are using global AD indexing.

Definition at line 28 of file ADUtils.h.

29{
30 return true;
31}

Referenced by FEProblemBase::init().

◆ globalDofIndexToDerivative() [1/2]

std::unordered_map< dof_id_type, Real > Moose::globalDofIndexToDerivative ( const ADReal ad_real,
const SystemBase sys,
ElementType  elem_type = ElementType::Element,
THREAD_ID  tid = 0 
)

Generate a map from global dof index to derivative value.

Definition at line 27 of file ADUtils.C.

31{
32 mooseAssert(dynamic_cast<const NonlinearSystemBase *>(&sys),
33 "This must be a nonlinear system base object");
34 const Assembly & assembly = sys.subproblem().assembly(tid, sys.number());
35 const Elem * elem;
36 switch (elem_type)
37 {
38 case ElementType::Element:
39 elem = assembly.elem();
40 break;
41
42 case ElementType::Neighbor:
43 elem = assembly.neighbor();
44 break;
45
46 case ElementType::Lower:
47 elem = assembly.lowerDElem();
48 break;
49
50 default:
51 mooseError("Unrecognized element type");
52 }
53
54 std::unordered_map<dof_id_type, Real> ret_val;
55
56 const System & libmesh_sys = sys.system();
57 const DofMap & dof_map = libmesh_sys.get_dof_map();
58
59 const unsigned int num_vars = libmesh_sys.n_vars();
60
61 const auto max_dofs_per_elem = sys.getMaxVarNDofsPerElem();
62
63 for (unsigned int var_num = 0; var_num < num_vars; ++var_num)
64 {
65 std::vector<dof_id_type> global_indices;
66
67 // Get the global indices corresponding to var_num that exist on elem
68 dof_map.dof_indices(elem, global_indices, var_num);
69
70 // determine the AD offset for the current var
71 const auto ad_offset = adOffset(var_num, max_dofs_per_elem, elem_type, num_vars);
72
73 // Map from global index to derivative
74 for (MooseIndex(global_indices) local_index = 0; local_index < global_indices.size();
75 ++local_index)
76 ret_val[global_indices[local_index]] = ad_real.derivatives()[ad_offset + local_index];
77 }
78
79 return ret_val;
80}
Keeps track of stuff related to assembling.
Definition Assembly.h:110
const Elem *const & elem() const
Return the current element.
Definition Assembly.h:414
const Elem *const & neighbor() const
Return the neighbor element.
Definition Assembly.h:470
const Elem *const & lowerDElem() const
Return the lower dimensional element.
Definition Assembly.h:476
Nonlinear system to be solved.
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
SubProblem & subproblem()
Definition SystemBase.h:102
std::size_t getMaxVarNDofsPerElem() const
Gets the maximum number of dofs used by any one variable on any one element.
Definition SystemBase.h:604
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
unsigned int n_vars() const
const DofMap & get_dof_map() const

Referenced by globalDofIndexToDerivative().

◆ globalDofIndexToDerivative() [2/2]

template<typename T >
auto Moose::globalDofIndexToDerivative ( const T &  ad_real_container,
const SystemBase sys,
ElementType  elem_type = ElementType::Element,
THREAD_ID  tid = 0 
) -> std::vector<std::unordered_map< dof_id_type, typename std::enable_if<std::is_same<ADReal, typename T::value_type>::value, Real>::type>>

Generate a map from global dof index to derivative value for a (probably quadrature-point-based) container like a material property or a variable value.

Definition at line 135 of file ADUtils.h.

142{
143 std::vector<std::unordered_map<dof_id_type, Real>> ret_val(ad_real_container.size());
144
145 for (MooseIndex(ad_real_container) i = 0; i < ad_real_container.size(); ++i)
146 ret_val[i] = globalDofIndexToDerivative(ad_real_container[i], sys, elem_type, tid);
147
148 return ret_val;
149}
std::unordered_map< dof_id_type, Real > globalDofIndexToDerivative(const ADReal &ad_real, const SystemBase &sys, ElementType elem_type=ElementType::Element, THREAD_ID tid=0)
Generate a map from global dof index to derivative value.
Definition ADUtils.C:27

◆ hash_combine() [1/4]

void Moose::hash_combine ( std::size_t &  )
inline

◆ hash_combine() [2/4]

template<typename T , typename... Rest>
void Moose::hash_combine ( std::size_t &  seed,
const std::set< T > &  v,
Rest &&...  rest 
)
inline

Used for hash function specialization for Attribute objects.

Definition at line 50 of file MooseHashing.h.

51{
52 for (auto & val : v)
53 hash_combine(seed, val);
54 hash_combine(seed, std::forward<Rest>(rest)...);
55}

◆ hash_combine() [3/4]

template<typename T , typename... Rest>
void Moose::hash_combine ( std::size_t &  seed,
const std::vector< T > &  v,
Rest &&...  rest 
)
inline

Used for hash function specialization for Attribute objects.

Definition at line 40 of file MooseHashing.h.

41{
42 for (auto & val : v)
43 hash_combine(seed, val);
44 hash_combine(seed, std::forward<Rest>(rest)...);
45}

◆ hash_combine() [4/4]

template<typename T , typename... Rest>
void Moose::hash_combine ( std::size_t &  seed,
const T &  v,
Rest &&...  rest 
)
inline

Used to combine an existing hash value with the hash of one or more other values (v and rest).

For example "auto h = std::hash("hello"); hash_combine(h, my_int_val, my_float_val, etc.);"

Definition at line 30 of file MooseHashing.h.

31{
32 std::hash<T> hasher;
33 seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
34 hash_combine(seed, std::forward<Rest>(rest)...);
35}

◆ hitMessagePrefix()

std::string Moose::hitMessagePrefix ( const hit::Node &  node)

Get the prefix to be associated with a hit node for a message.

Definition at line 883 of file Moose.C.

887 : _throw_on_error_before(Moose::_throw_on_error)
888{
889 mooseAssert(!libMesh::Threads::in_threads, "Cannot be used in threads");
890 Moose::_throw_on_error = throw_on_error;
891}
892
bool _throw_on_error
Variable to turn on exceptions during mooseError(), should only be used within MOOSE unit tests or wh...
Definition Moose.C:896

Referenced by MooseBase::messagePrefix(), moose::internal::mooseErrorRaw(), and InputParameters::paramMessagePrefix().

◆ indirectSort() [1/2]

template<class RandomAccessIterator >
void Moose::indirectSort ( RandomAccessIterator  beg,
RandomAccessIterator  end,
std::vector< size_t > &  b 
)

Definition at line 68 of file IndirectSort.h.

69{
70 // Space in b
71 initialize_indirect_sort(beg, end, b);
72
73 // Typedef for less typing. Note: use of std::iterator_traits means this should work with
74 // naked pointers too...
75 typedef std::less<typename std::iterator_traits<RandomAccessIterator>::value_type>
76 LessThanComparator;
77
78 // Construct comparator object
80
81 // Sort the indices, based on the data
82 //
83 // Many use cases pass in a partial order, not a total order; use
84 // stable_sort to make the results of that as reproduceable as
85 // possible.
86 std::stable_sort(b.begin(), b.end(), ic);
87}
void initialize_indirect_sort(RandomAccessIterator beg, RandomAccessIterator end, std::vector< size_t > &b)

Referenced by SamplerBase::finalize(), and PerfGraph::printHeaviestSections().

◆ indirectSort() [2/2]

template<class RandomAccessIterator , class UserComparisonFunctor >
void Moose::indirectSort ( RandomAccessIterator  beg,
RandomAccessIterator  end,
std::vector< size_t > &  b,
UserComparisonFunctor  user_comp 
)

Definition at line 93 of file IndirectSort.h.

97{
98 // Space in b
99 initialize_indirect_sort(beg, end, b);
100
101 // Construct comparator object
103
104 // Sort the indices, based on the data
105 //
106 // Many use cases pass in a partial order, not a total order; use
107 // stable_sort to make the results of that as reproduceable as
108 // possible.
109 std::stable_sort(b.begin(), b.end(), ic);
110}

◆ initCoordinateSystemType()

void Moose::initCoordinateSystemType ( )

Definition at line 37 of file Conversion.C.

38{
40 {
44 }
45}
std::map< std::string, CoordinateSystemType > coordinate_system_type_to_enum
Definition Conversion.C:26

Referenced by stringToEnum< CoordinateSystemType >().

◆ initDofIndices()

template<typename T >
void Moose::initDofIndices ( T &  data,
const Elem &  elem 
)

Definition at line 47 of file MooseVariableDataFV.h.

48{
49 if (data._prev_elem != &elem)
50 {
51 data._dof_map.dof_indices(&elem, data._dof_indices, data._var_num);
52 data._prev_elem = &elem;
53 }
54}

Referenced by MooseVariableFV< OutputType >::getValue(), MooseVariableDataFV< OutputType >::initDofIndices(), and MooseVariableDataLinearFV< OutputType >::initDofIndices().

◆ initEigenProlemType()

void Moose::initEigenProlemType ( )

Definition at line 78 of file Conversion.C.

79{
81 {
89 }
90}
std::map< std::string, EigenProblemType > eigen_problem_type_to_enum
Definition Conversion.C:29

Referenced by stringToEnum< EigenProblemType >().

◆ initEigenSolveType()

void Moose::initEigenSolveType ( )

Definition at line 61 of file Conversion.C.

62{
63 if (eigen_solve_type_to_enum.empty())
64 {
74 }
75}
std::map< std::string, EigenSolveType > eigen_solve_type_to_enum
Definition Conversion.C:28

Referenced by stringToEnum< EigenSolveType >().

◆ initial_condition()

void Moose::initial_condition ( libMesh::EquationSystems es,
const std::string &  system_name 
)
private

◆ initialize_indirect_sort()

template<class RandomAccessIterator >
void Moose::initialize_indirect_sort ( RandomAccessIterator  beg,
RandomAccessIterator  end,
std::vector< size_t > &  b 
)

Definition at line 52 of file IndirectSort.h.

55{
56 // enough storage for all the indices
57 b.resize(std::distance(beg, end));
58
59 // iota
60 for (size_t i = 0; i < b.size(); ++i)
61 b[i] = i;
62}

Referenced by indirectSort(), and indirectSort().

◆ initLineSearchType()

void Moose::initLineSearchType ( )

Definition at line 112 of file Conversion.C.

113{
114 if (line_search_type_to_enum.empty())
115 {
119
126 }
127}
std::map< std::string, LineSearchType > line_search_type_to_enum
Definition Conversion.C:31

Referenced by stringToEnum< LineSearchType >().

◆ initMffdType()

void Moose::initMffdType ( )

Definition at line 145 of file Conversion.C.

146{
147 if (mffd_type_to_enum.empty())
148 {
151 }
152}
std::map< std::string, MffdType > mffd_type_to_enum
Definition Conversion.C:33

Referenced by stringToEnum< MffdType >().

◆ initRMType()

void Moose::initRMType ( )

Definition at line 155 of file Conversion.C.

156{
157 if (rm_type_to_enum.empty())
158 {
159 rm_type_to_enum["DEFAULT"] = RelationshipManagerType::DEFAULT;
160 rm_type_to_enum["GEOMETRIC"] = RelationshipManagerType::GEOMETRIC;
161 rm_type_to_enum["ALGEBRAIC"] = RelationshipManagerType::ALGEBRAIC;
162 rm_type_to_enum["COUPLING"] = RelationshipManagerType::COUPLING;
163 }
164}
std::map< std::string, RelationshipManagerType > rm_type_to_enum
Definition Conversion.C:34

Referenced by stringToEnum< RelationshipManagerType >().

◆ initSolveType()

void Moose::initSolveType ( )

Definition at line 48 of file Conversion.C.

49{
50 if (solve_type_to_enum.empty())
51 {
54 solve_type_to_enum["NEWTON"] = ST_NEWTON;
56 solve_type_to_enum["LINEAR"] = ST_LINEAR;
57 }
58}
std::map< std::string, SolveType > solve_type_to_enum
Definition Conversion.C:27

Referenced by stringToEnum< SolveType >().

◆ initTimeIntegratorsType()

void Moose::initTimeIntegratorsType ( )

Definition at line 130 of file Conversion.C.

131{
132 if (time_integrator_to_enum.empty())
133 {
134 time_integrator_to_enum["IMPLICIT_EULER"] = TI_IMPLICIT_EULER;
135 time_integrator_to_enum["EXPLICIT_EULER"] = TI_EXPLICIT_EULER;
136 time_integrator_to_enum["CRANK_NICOLSON"] = TI_CRANK_NICOLSON;
138 time_integrator_to_enum["EXPLICIT_MIDPOINT"] = TI_EXPLICIT_MIDPOINT;
139 time_integrator_to_enum["LSTABLE_DIRK2"] = TI_LSTABLE_DIRK2;
141 }
142}
std::map< std::string, TimeIntegratorType > time_integrator_to_enum
Definition Conversion.C:32

Referenced by stringToEnum< TimeIntegratorType >().

◆ initWhichEigenPairs()

void Moose::initWhichEigenPairs ( )

Definition at line 93 of file Conversion.C.

94{
95 if (which_eigen_pairs_to_enum.empty())
96 {
108 }
109}
std::map< std::string, WhichEigenPairs > which_eigen_pairs_to_enum
Definition Conversion.C:30

Referenced by stringToEnum< WhichEigenPairs >().

◆ isSectionActive()

bool Moose::isSectionActive ( const hit::Node &  node)

Definition at line 45 of file Builder.C.

46{
47 const hit::Node * n = &node;
48 while (n)
49 {
50 const auto section = n->parent();
51 if (section)
52 {
53 // only check current level, not nested ones
54 if (const auto active = section->find("active");
55 active && active->type() == hit::NodeType::Field && active->parent() == section)
56 {
57 const auto vars = active->param<std::vector<std::string>>();
58 return std::find_if(vars.begin(),
59 vars.end(),
60 [&n](const auto & var)
61 { return n->path() == hit::pathNorm(var); }) != vars.end();
62 }
63 // only check current level, not nested ones
64 if (const auto inactive = section->find("inactive");
65 inactive && inactive->type() == hit::NodeType::Field && inactive->parent() == section)
66 {
67 const auto vars = inactive->param<std::vector<std::string>>();
68 return std::find_if(vars.begin(),
69 vars.end(),
70 [&n](const auto & var)
71 { return n->path() == hit::pathNorm(var); }) == vars.end();
72 }
73 }
74 n = section;
75 }
76 return true;
77}
char ** vars

Referenced by Moose::UnusedWalker::walk(), and Moose::Builder::walkRaw().

◆ main()

template<typename DefaultAppType >
int Moose::main ( int  argc,
char *  argv[] 
)

Initialize, create and run a MooseApp.

Definition at line 31 of file MooseMain.h.

32{
33 MooseInit init(argc, argv);
34
35 DefaultAppType::registerApps();
36
37 const auto default_app_type = MooseUtils::prettyCppType<DefaultAppType>();
38
39 auto app = createMooseApp(default_app_type, argc, argv);
40
41 app->run();
42
43 return app->exitCode();
44}
Initialization object for any MOOSE-based application.
Definition MooseInit.h:24
std::unique_ptr< MooseApp > createMooseApp(const std::string &default_app_type, int argc, char *argv[])
Create a MooseApp from command-line arguments.
Definition MooseMain.C:27

◆ makeSpan()

template<class C >
auto Moose::makeSpan ( C &  container,
std::size_t  offset,
std::size_t  n 
)

Helper function for creating a span from a given container.

This helper function will automatically deduce whether we're spanning over non-const or const elements

Definition at line 1095 of file MooseTypes.h.

1096{
1097 using PointerType = decltype(std::data(container));
1098 using ElementType = std::remove_pointer_t<PointerType>;
1099 return Moose::Span<ElementType>{std::data(container) + offset, n};
1100}
Replacement for std::span which we only get in c++20.

Referenced by TaggingInterface::addJacobian(), and TaggingInterface::addResiduals().

◆ oldState()

StateArg Moose::oldState ( )
inline

Definition at line 162 of file MooseFunctorArguments.h.

163{
164 return {(unsigned int)1};
165}
void ErrorVector unsigned int

Referenced by TransientInterface::determineState(), and FunctorChangeFunctorMaterialTempl< is_ad >::referenceState().

◆ previousMultiAppFixedPointState()

StateArg Moose::previousMultiAppFixedPointState ( )
inline

Definition at line 174 of file MooseFunctorArguments.h.

175{
176 return {(unsigned int)1, SolutionIterationType::MultiAppFixedPoint};
177}

Referenced by FunctorChangeFunctorMaterialTempl< is_ad >::referenceState().

◆ previousMultiSystemFixedPointState()

StateArg Moose::previousMultiSystemFixedPointState ( )
inline

Definition at line 180 of file MooseFunctorArguments.h.

181{
182 return {(unsigned int)1, SolutionIterationType::MultiSystemFixedPoint};
183}

Referenced by FunctorChangeFunctorMaterialTempl< is_ad >::referenceState().

◆ previousNonlinearState()

StateArg Moose::previousNonlinearState ( )
inline

Definition at line 168 of file MooseFunctorArguments.h.

169{
170 return {(unsigned int)1, SolutionIterationType::Nonlinear};
171}

Referenced by FunctorChangeFunctorMaterialTempl< is_ad >::referenceState().

◆ recursivelyFindElementsIntersectedByLine()

void Moose::recursivelyFindElementsIntersectedByLine ( const LineSegment line_segment,
const Elem current_elem,
int  incoming_side,
const Point incoming_point,
std::vector< Elem * > &  intersected_elems,
std::vector< LineSegment > &  segments 
)

Recursively find all elements intersected by a line segment.

Works by moving from one element to the next through the side of the current element. This means that (other than for the first element) there is always an incoming_side that is the reason we ended up in this element in the first place. Search all the other sides to see if there is a next element...

Parameters
line_segmentthe LineSegment to intersect
current_elemThe current element that needs to be searched
incoming_sideThe side of the current element that was intersected by the LineSegment that brought us here
intersected_elemsThe output
segmentsLine segments for the path across each element

Definition at line 146 of file RayTracing.C.

152{
153 Point intersection_point;
154
155 std::vector<int> not_side(1, incoming_side);
156
157 // Find the side of this element that the LineSegment intersects... while ignoring the incoming
158 // side (we don't want to move backward!)
159 int intersected_side =
160 sideIntersectedByLine(current_elem, not_side, line_segment, intersection_point);
161
162 if (intersected_side != -1) // -1 means that we didn't find any side
163 {
164 // Get the neighbor on that side
165 const Elem * neighbor = current_elem->neighbor_ptr(intersected_side);
166
167 if (neighbor)
168 {
169 // Add it to the list
170 intersected_elems.push_back(const_cast<Elem *>(neighbor));
171
172 // Add the line segment across the element to the segments list
173 segments.push_back(LineSegment(incoming_point, intersection_point));
174
175 // Note: This is finding the side the current_elem is on for the neighbor. That's the
176 // "incoming_side" for the neighbor
177 int incoming_side = sideNeighborIsOn(neighbor, current_elem);
178
179 // Recurse
181 line_segment, neighbor, incoming_side, intersection_point, intersected_elems, segments);
182 }
183 else // Add the final segment
184 segments.push_back(LineSegment(incoming_point, line_segment.end()));
185 }
186 else // Add the final segment
187 segments.push_back(LineSegment(incoming_point, line_segment.end()));
188
189 // Finished... return out!
190 return;
191}
const Point & end() const
Ending of the line segment.
Definition LineSegment.h:90
const Elem * neighbor_ptr(unsigned int i) const
int sideIntersectedByLine(const Elem *elem, std::vector< int > &not_side, const LineSegment &line_segment, Point &intersection_point)
Figure out which (if any) side of an Elem is intersected by a line.
Definition RayTracing.C:36
int sideNeighborIsOn(const Elem *elem, const Elem *neighbor)
Returns the side number for elem that neighbor is on.
Definition RayTracing.C:117

Referenced by elementsIntersectedByLine(), and recursivelyFindElementsIntersectedByLine().

◆ registerActions() [1/2]

void Moose::registerActions ( Syntax syntax,
ActionFactory action_factory 
)

Multiple Action class can be associated with a single input file section, in which case all associated Actions will be created and "acted" on when the associated input file section is seen.

Action classes can also be registered to act on more than one input file section for a different task if similar logic can work in multiple cases

Example: "add_variable" <--— -> [Variables/ *] \ / CopyNodalVarsAction / \ "add_aux_variable" <- -> [AuxVariables/ *]

Note: Placeholder "no_action" actions must be put in places where it is possible to match an object with a star or a more specific parent later on. (i.e. where one needs to negate the '*' matching prematurely).

Definition at line 571 of file Moose.C.

Referenced by registerAll(), and setColorConsole().

◆ registerActions() [2/2]

void Moose::registerActions ( Syntax syntax,
ActionFactory action_factory,
const std::set< std::string > &  obj_labels 
)

Definition at line 578 of file Moose.C.

587 :
588

◆ registerAll()

void Moose::registerAll ( Factory f,
ActionFactory af,
Syntax s 
)

Register objects that are in MOOSE.

Definition at line 69 of file Moose.C.

70{
71 registerObjects(f, {"MooseApp"});
72 associateSyntaxInner(s, af);
73 registerActions(s, af, {"MooseApp"});
74 registerAppDataFilePath("moose");
75 registerRepository("moose", "github.com/idaholab/moose");
76
77 // Citation emitted by the --citations command-line option: the current framework paper is tied to
78 // "MooseApp" (so it is cited whenever a MooseApp object is used, and apps composed of MooseApp
79 // inherit it), and modules register their own app citations (via Registry::addAppCitation) which
80 // are cited only when one of their objects is actually used. PETSc and its sub-packages register
81 // their own citations, which --citations emits through PETSc.
82 Registry::addAppCitation("MooseApp",
83 "harbour2025moose",
84 R"(@article{harbour2025moose,
85 title = {4.0 {MOOSE}: Enabling massively parallel Multiphysics simulation},
86 journal = {{SoftwareX}},
87 volume = {31},
88 pages = {102264},
89 year = {2025},
90 issn = {2352-7110},
91 doi = {https://doi.org/10.1016/j.softx.2025.102264},
92 url = {https://www.sciencedirect.com/science/article/pii/S2352711025002316},
93 author = {Logan Harbour and Guillaume Giudicelli and Alexander D. Lindsay and Peter German and Joshua Hansel and Casey Icenhour and Mengnan Li and Jason M. Miller and Roy H. Stogner and Patrick Behne and Daniel Yankura and Zachary M. Prince and Corey DeChant and Daniel Schwen and Benjamin W. Spencer and Mauricio Tano and Namjae Choi and Yaqi Wang and Max Nezdyur and Yinbin Miao and Tianchen Hu and Shikhar Kumar and Christopher Matthews and Brandon Langley and Nuno Nobre and Alexander Blair and Chris MacMackin and Henrique Bergallo Rocha and Edward Palmer and Jesse Carter and J{\"o}rg Meier and Andrew E. Slaughter and David Andr{\v{s}} and Robert W. Carlsen and Fande Kong and Derek R. Gaston and Cody J. Permann},
94})");
95
96 // The libMesh citation is registered under "libMesh" but not tied to any object label, so the
97 // per-object loop in MooseApp::requestCitations() does not emit it; emission is gated on the
98 // finite element backend actually used in the run.
100 "libMeshPaper",
static void addAppCitation(const std::string &app_name, const std::string &key, const std::string &bibtex)
Register a citation (the full BibTeX bibtex text, identified by key) tied to the app app_name; emitte...
Definition Registry.C:198

◆ registerObjects()

void Moose::registerObjects ( Factory factory,
const std::set< std::string > &  obj_labels 
)

Definition at line 103 of file Moose.C.

103 {{\texttt{libMesh}: A C++ Library for Parallel Adaptive Mesh
104 Refinement/Coarsening Simulations}},
105 journal = {Engineering with Computers},
106 volume = {22},
Real volume(const MeshBase &mesh, unsigned int dim=libMesh::invalid_uint)
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...

Referenced by registerAll().

◆ restrictPointToFace()

void Moose::restrictPointToFace ( libMesh::Point p,
const libMesh::Elem side,
std::vector< const libMesh::Node * > &  off_edge_nodes 
)

Definition at line 323 of file FindContactPoint.C.

326{
327 const ElemType t(side->type());
328 off_edge_nodes.clear();
329 Real & xi = p(0);
330 Real & eta = p(1);
331
332 switch (t)
333 {
334 case EDGE2:
335 case EDGE3:
336 case EDGE4:
337 {
338 // The reference 1D element is [-1,1].
339 if (xi < -1.0)
340 {
341 xi = -1.0;
342 off_edge_nodes.push_back(side->node_ptr(0));
343 }
344 else if (xi > 1.0)
345 {
346 xi = 1.0;
347 off_edge_nodes.push_back(side->node_ptr(1));
348 }
349 break;
350 }
351
352 case TRI3:
353 case TRI6:
354 case TRI7:
355 {
356 // The reference triangle is isosceles
357 // and is bound by xi=0, eta=0, and xi+eta=1.
358
359 if (xi <= 0.0 && eta <= 0.0)
360 {
361 xi = 0.0;
362 eta = 0.0;
363 off_edge_nodes.push_back(side->node_ptr(0));
364 }
365 else if (xi > 0.0 && xi < 1.0 && eta < 0.0)
366 {
367 eta = 0.0;
368 off_edge_nodes.push_back(side->node_ptr(0));
369 off_edge_nodes.push_back(side->node_ptr(1));
370 }
371 else if (eta > 0.0 && eta < 1.0 && xi < 0.0)
372 {
373 xi = 0.0;
374 off_edge_nodes.push_back(side->node_ptr(2));
375 off_edge_nodes.push_back(side->node_ptr(0));
376 }
377 else if (xi >= 1.0 && (eta - xi) <= -1.0)
378 {
379 xi = 1.0;
380 eta = 0.0;
381 off_edge_nodes.push_back(side->node_ptr(1));
382 }
383 else if (eta >= 1.0 && (eta - xi) >= 1.0)
384 {
385 xi = 0.0;
386 eta = 1.0;
387 off_edge_nodes.push_back(side->node_ptr(2));
388 }
389 else if ((xi + eta) > 1.0)
390 {
391 Real delta = (xi + eta - 1.0) / 2.0;
392 xi -= delta;
393 eta -= delta;
394 off_edge_nodes.push_back(side->node_ptr(1));
395 off_edge_nodes.push_back(side->node_ptr(2));
396 }
397 break;
398 }
399
400 case QUAD4:
401 case QUAD8:
402 case QUAD9:
403 {
404 // The reference quadrilateral element is [-1,1]^2.
405 if (xi < -1.0)
406 {
407 xi = -1.0;
408 if (eta < -1.0)
409 {
410 eta = -1.0;
411 off_edge_nodes.push_back(side->node_ptr(0));
412 }
413 else if (eta > 1.0)
414 {
415 eta = 1.0;
416 off_edge_nodes.push_back(side->node_ptr(3));
417 }
418 else
419 {
420 off_edge_nodes.push_back(side->node_ptr(3));
421 off_edge_nodes.push_back(side->node_ptr(0));
422 }
423 }
424 else if (xi > 1.0)
425 {
426 xi = 1.0;
427 if (eta < -1.0)
428 {
429 eta = -1.0;
430 off_edge_nodes.push_back(side->node_ptr(1));
431 }
432 else if (eta > 1.0)
433 {
434 eta = 1.0;
435 off_edge_nodes.push_back(side->node_ptr(2));
436 }
437 else
438 {
439 off_edge_nodes.push_back(side->node_ptr(1));
440 off_edge_nodes.push_back(side->node_ptr(2));
441 }
442 }
443 else
444 {
445 if (eta < -1.0)
446 {
447 eta = -1.0;
448 off_edge_nodes.push_back(side->node_ptr(0));
449 off_edge_nodes.push_back(side->node_ptr(1));
450 }
451 else if (eta > 1.0)
452 {
453 eta = 1.0;
454 off_edge_nodes.push_back(side->node_ptr(2));
455 off_edge_nodes.push_back(side->node_ptr(3));
456 }
457 }
458 break;
459 }
460
461 default:
462 {
463 mooseError("Unsupported face type: ", t);
464 break;
465 }
466 }
467}
virtual ElemType type() const=0

Referenced by findContactPoint().

◆ SERIAL_ACCESS_CONST_SIZE() [1/3]

Moose::SERIAL_ACCESS_CONST_SIZE ( libMesh::VectorValue  ,
obj0u,
Moose::dim   
)

◆ SERIAL_ACCESS_CONST_SIZE() [2/3]

Moose::SERIAL_ACCESS_CONST_SIZE ( RankFourTensorTempl  ,
obj0u, 0u, 0u, 0u,
RankFourTensorTempl< T >::N4   
)

◆ SERIAL_ACCESS_CONST_SIZE() [3/3]

Moose::SERIAL_ACCESS_CONST_SIZE ( RankTwoTensorTempl  ,
obj0u, 0u,
RankTwoTensorTempl< T >::N2   
)

◆ SERIAL_ACCESS_DYNAMIC_SIZE()

Moose::SERIAL_ACCESS_DYNAMIC_SIZE ( DenseVector  ,
obj0u,
obj.  size() 
)

◆ SERIAL_ACCESS_SCALAR() [1/2]

Moose::SERIAL_ACCESS_SCALAR ( ADReal  )

◆ SERIAL_ACCESS_SCALAR() [2/2]

Moose::SERIAL_ACCESS_SCALAR ( Real  )

◆ serialAccess()

template<typename T >
SerialAccessRange< T > Moose::serialAccess ( T &  obj)

◆ setColorConsole()

bool Moose::setColorConsole ( bool  use_color,
bool  force = false 
)

Turns color escape sequences on/off for info written to stdout.

Returns the the set value which may be different than use_color.

Definition at line 851 of file Moose.C.

851{
852 associateSyntaxInner(syntax, action_factory);
853 registerActions(syntax, action_factory);
854}
855

Referenced by CommonOutputAction::act(), and MooseApp::setupOptions().

◆ setSolverDefaults()

void Moose::setSolverDefaults ( FEProblemBase problem)

Definition at line 828 of file Moose.C.

◆ sideIntersectedByLine()

int Moose::sideIntersectedByLine ( const Elem elem,
std::vector< int > &  not_side,
const LineSegment line_segment,
Point intersection_point 
)

Figure out which (if any) side of an Elem is intersected by a line.

Parameters
elemThe elem to search
not_sideSides to not search (Use -1 if you want to search all sides)
intersection_pointIf an intersection is found this will be filled with the x,y,z position of that intersection
Returns
The side that is intersected by the line. Will return -1 if it doesn't intersect any side

Definition at line 36 of file RayTracing.C.

40{
41 unsigned int n_sides = elem->n_sides();
42
43 // Whether or not they intersect
44 bool intersect = false;
45
46 unsigned int dim = elem->dim();
47
48 for (unsigned int i = 0; i < n_sides; i++)
49 {
50 // Don't search the "not_side"
51 // Note: A linear search is fine here because this vector is going to be < n_sides
52 if (std::find(not_side.begin(), not_side.end(), static_cast<int>(i)) != not_side.end())
53 continue;
54
55 // Get a simplified side element
56 std::unique_ptr<const Elem> side_elem = elem->side_ptr(i);
57
58 if (dim == 3)
59 {
60 // Make a plane out of the first three nodes on the side
61 Plane plane(side_elem->point(0), side_elem->point(1), side_elem->point(2));
62
63 // See if they intersect
64 intersect = line_segment.intersect(plane, intersection_point);
65 }
66 else if (dim == 2)
67 {
68 // Make a Line Segment out of the first two nodes on the side
69 LineSegment side_segment(side_elem->point(0), side_elem->point(1));
70
71 // See if they intersect
72 intersect = line_segment.intersect(side_segment, intersection_point);
73 }
74 else // 1D
75 {
76 // See if the line segment contains the point
77 intersect = line_segment.contains_point(side_elem->point(0));
78
79 // If it does then save off that one point as the intersection point
80 if (intersect)
81 intersection_point = side_elem->point(0);
82 }
83
84 if (intersect)
85 {
86 if (side_elem->contains_point(intersection_point))
87 {
88 const Elem * neighbor = elem->neighbor_ptr(i);
89
90 // If this side is on a boundary, let's do another search and see if we can find a better
91 // candidate
92 if (!neighbor)
93 {
94 not_side.push_back(i); // Make sure we don't find this side again
95
96 int better_side = sideIntersectedByLine(elem, not_side, line_segment, intersection_point);
97
98 if (better_side != -1)
99 return better_side;
100 }
101
102 return i;
103 }
104 }
105 }
106
107 // Didn't find one
108 return -1;
109}
bool intersect(const libMesh::Plane &pl, Point &intersect_p) const
Check if a line segment intersects a plane, and if so, return the intersection point.
Definition LineSegment.C:70
bool contains_point(const Point &p) const
Determines whether a point is in a line segment or not.
Definition LineSegment.C:63
virtual std::unique_ptr< Elem > side_ptr(unsigned int i)=0
virtual unsigned int n_sides() const=0

Referenced by recursivelyFindElementsIntersectedByLine(), and sideIntersectedByLine().

◆ sideNeighborIsOn()

int Moose::sideNeighborIsOn ( const Elem elem,
const Elem neighbor 
)

Returns the side number for elem that neighbor is on.

Returns -1 if the neighbor can't be found to be a neighbor

Definition at line 117 of file RayTracing.C.

118{
119 unsigned int n_sides = elem->n_sides();
120
121 for (unsigned int i = 0; i < n_sides; i++)
122 {
123 if (elem->neighbor_ptr(i) == neighbor)
124 return i;
125 }
126
127 return -1;
128}

Referenced by recursivelyFindElementsIntersectedByLine().

◆ stringify() [1/22]

std::string Moose::stringify ( bool  v)
inline

Definition at line 73 of file Conversion.h.

74{
75 return v ? "true" : "false";
76}

◆ stringify() [2/22]

std::string Moose::stringify ( const EigenSolveType t)

Convert eigen solve type into human readable string.

Definition at line 403 of file Conversion.C.

404{
405 switch (t)
406 {
407 case EST_POWER:
408 return "Power";
409 case EST_ARNOLDI:
410 return "ARNOLDI";
411 case EST_KRYLOVSCHUR:
412 return "KRYLOVSCHUR";
414 return "Jacobi Davidson";
416 return "Nonlinear Power";
417 case EST_PJFNKMO:
418 return "PJFNK with Matrix Only";
419 case EST_NEWTON:
420 return "Newton";
421 case EST_JFNK:
422 return "JFNK";
423 case EST_PJFNK:
424 return "Preconditioned JFNK";
425 }
426 return "";
427}

◆ stringify() [3/22]

std::string Moose::stringify ( const Moose::RelationshipManagerType t)

Definition at line 326 of file Conversion.C.

327{
328 // Cannot make a switch statement because the boolean logic doesn't work well with the class type
329 // enumeration and because Cody says so.
330 if (t == RelationshipManagerType::DEFAULT)
331 return "DEFAULT";
332 if (t == RelationshipManagerType::GEOMETRIC)
333 return "GEOMETRIC";
334 if (t == RelationshipManagerType::ALGEBRAIC)
335 return "ALGEBRAIC";
336 if (t == (RelationshipManagerType::GEOMETRIC | RelationshipManagerType::ALGEBRAIC))
337 return "GEOMETRIC and ALGEBRAIC";
338 if (t == (RelationshipManagerType::ALGEBRAIC | RelationshipManagerType::COUPLING))
339 return "ALGEBRAIC and COUPLING";
340 if (t == (RelationshipManagerType::GEOMETRIC | RelationshipManagerType::ALGEBRAIC |
341 RelationshipManagerType::COUPLING))
342 return "GEOMETRIC and ALGEBRAIC and COUPLING";
343 if (t == RelationshipManagerType::COUPLING)
344 return "COUPLING";
345
346 mooseError("Unknown RelationshipManagerType");
347}

◆ stringify() [4/22]

std::string Moose::stringify ( const Moose::TimeIntegratorType t)

Definition at line 351 of file Conversion.C.

352{
353 switch (t)
354 {
355 case TimeIntegratorType::TI_IMPLICIT_EULER:
356 return "IMPLICIT_EULER";
357 case TimeIntegratorType::TI_EXPLICIT_EULER:
358 return "EXPLICIT_EULER";
359 case TimeIntegratorType::TI_CRANK_NICOLSON:
360 return "CRANK_NICOLSON";
361 case TimeIntegratorType::TI_BDF2:
362 return "BDF2";
363 case TimeIntegratorType::TI_EXPLICIT_MIDPOINT:
364 return "EXPLICIT_MIDPOINT";
365 case TimeIntegratorType::TI_LSTABLE_DIRK2:
366 return "LSTABLE_DIRK2";
367 case TimeIntegratorType::TI_EXPLICIT_TVD_RK_2:
368 return "EXPLICIT_TVDRK2";
369 default:
370 mooseError("Unknown TimeIntegratorType");
371 }
372}

◆ stringify() [5/22]

std::string Moose::stringify ( const SolveType t)

Convert solve type into human readable string.

Definition at line 384 of file Conversion.C.

385{
386 switch (t)
387 {
388 case ST_NEWTON:
389 return "NEWTON";
390 case ST_JFNK:
391 return "JFNK";
392 case ST_PJFNK:
393 return "Preconditioned JFNK";
394 case ST_FD:
395 return "FD";
396 case ST_LINEAR:
397 return "Linear";
398 }
399 return "";
400}

◆ stringify() [6/22]

template<typename T , typename U >
std::string Moose::stringify ( const std::pair< T, U > &  p,
const std::string &  delim = ":" 
)

Add pair stringify to support maps.

Definition at line 154 of file Conversion.h.

154 :")
155{
156 return stringify(p.first) + delim + stringify(p.second);
157}

◆ stringify() [7/22]

std::string Moose::stringify ( const std::string &  s)

Add no-op stringify if the argument already is a string (must use overloading)

Definition at line 489 of file Conversion.C.

490{
491 return s;
492}

◆ stringify() [8/22]

template<typename... Args>
std::string Moose::stringify ( const std::tuple< Args... > &  t,
const std::string &  delim = ":" 
)

Add tuple stringify.

Definition at line 162 of file Conversion.h.

162 :")
163{
164 if constexpr (sizeof...(Args) == 0)
165 {
166 return "";
167 }
168
169 return std::apply(
170 [&delim](const auto &... args)
171 {
172 std::size_t n{0};
173 std::string result;
174 ((result += (n++ == 0 ? "" : delim) + stringify(args)), ...);
175 return result;
176 },
177 t);
178}

◆ stringify() [9/22]

template<typename T >
std::string Moose::stringify ( const T &  t)

conversion to string

Definition at line 64 of file Conversion.h.

65{
66 std::ostringstream os;
67 os << t;
68 return os.str();
69}

Referenced by MaterialDerivativeTestAction::act(), SetupResidualDebugAction::act(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), PhysicsComponentInterface::addBoundaryConditionsFromComponents(), PhysicsComponentInterface::addInitialConditionsFromComponents(), LinearFVFluxKernel::addMatrixContribution(), ComponentPhysicsInterface::addPhysics(), AddActionComponentAction::addRelationshipManagers(), LinearFVFluxKernel::addRightHandSideContribution(), MooseVariableData< OutputType >::adGradPhi(), MooseVariableData< OutputType >::adGradPhiFace(), MooseEnum::assign(), MooseEnum::assign(), AuxKernelBase::AuxKernelBase(), MooseMeshUtils::buildLoopBoundaryOf2DMesh(), ParsedFunctorMaterialTempl< is_ad >::buildParsedFunction(), CartesianMeshGenerator::CartesianMeshGenerator(), Moose::BSpline::CdBBasis(), PhysicsBase::checkBlockRestrictionIdentical(), InputParametersChecksUtils< C >::checkBlockwiseConsistency(), MooseMesh::checkCoordinateSystems(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), FEProblemBase::checkExceptionAndStopSolve(), Moose::FunctorBase< T >::checkFace(), MeshGenerator::checkGetMesh(), Steady::checkIntegrity(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), MeshDiagnosticsGenerator::checkPolygons(), FEProblemBase::checkProblemIntegrity(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), InputParametersChecksUtils< C >::checkTwoDVectorParamsNoRespectiveOverlap(), BlockRestrictable::checkVariable(), InputParametersChecksUtils< C >::checkVectorParamsNoOverlap(), CircularBoundaryCorrectionGenerator::circularCenterCalculator(), Moose::SlepcSupport::clearFreeNonlinearPowerIterations(), FEProblemBase::computeUserObjectsInternal(), CopyValueAux::CopyValueAux(), PhysicsBase::copyVariablesFromMesh(), Moose::Kokkos::ArrayBase< T, dimension, index_type >::createInternal(), Moose::Kokkos::dataLoad(), DebugResidualAux::DebugResidualAux(), DGKernelBase::DGKernelBase(), CartesianGridDivision::divisionIndex(), CylindricalGridDivision::divisionIndex(), SphericalGridDivision::divisionIndex(), FEProblemBase::duplicateVariableCheck(), MonotoneCubicInterpolation::errorCheck(), UnitsConversionEvaler::eval(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MeshDivisionFunctorReductionVectorPostprocessor::execute(), DOFMapOutput::filename(), ElementQualityChecker::finalize(), DiracKernelInfo::findPoint(), ParsedMaterialHelper< is_ad >::functionParse(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), AdvancedExtruderGenerator::generate(), CoarsenBlockGenerator::generate(), ExtraNodesetGenerator::generate(), RefineBlockGenerator::generate(), ActionWarehouse::getAction(), FunctorBinnedValuesDivision::getBinIndex(), ComputeFVFluxThread< RangeType, AttributeTagType >::getBlockNames(), MeshCoarseningUtils::getFineElementsFromInteriorNode(), SolutionUserObjectBase::getLocalVarIndex(), MooseEnumBase::getRawNames(), MooseApp::getRelationshipManagerInfo(), SystemBase::getScalarVariable(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), SystemBase::getVariable(), MooseLinearVariableFV< RealEigenVector >::gradSlnComponent(), Moose::FV::harmonicInterpolation(), ParsedDownSelectionPositions::initialize(), BlockRestrictable::initializeBlockRestrictable(), MultiAppGeneralFieldTransfer::initialSetup(), MatrixTools::inverse(), LeastSquaresFitHistory::LeastSquaresFitHistory(), MultiApp::localApp(), ParsedConvergence::makeParsedFunction(), MeshDivisionAux::MeshDivisionAux(), SystemBase::oldSolutionStateVectorName(), ComputeLinearFVLimitedGradientThread::operator()(), MaterialOutputAction::outputHelper(), Parser::parse(), PatternedMeshGenerator::PatternedMeshGenerator(), ProjectSideSetOntoLevelSetGenerator::pointPairLevelSetInterception(), CompileTimeDerivatives::CTValue< tag, T >::print(), CompileTimeDerivatives::CTArrayRef< tag, T, I >::print(), CompileTimeDerivatives::CTIPow< B, E >::print(), libMesh::print_helper(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), CompileTimeDerivatives::printTag(), TopResidualDebugOutput::printTopResiduals(), ProjectedStatefulMaterialStorageAction::processProperty(), DerivativeParsedMaterialHelperTempl< is_ad >::recurseMatProps(), CoarsenBlockGenerator::recursiveCoarsen(), Moose::internal::Capabilities::registerMooseCapabilities(), PhysicsBase::reportPotentiallyMissedParameters(), Moose::Kokkos::Thread< thread_id_type, max_dimension >::resize(), PicardSolve::saveVariableValues(), SecantSolve::saveVariableValues(), SteffensenSolve::saveVariableValues(), MeshRepairGenerator::separateSubdomainsByElementType(), MooseMesh::setCoordSystem(), Moose::SlepcSupport::setFreeNonlinearPowerIterations(), Moose::SlepcSupport::setNewtonPetscOptions(), Moose::SlepcSupport::setSlepcEigenSolverTolerances(), Split::setup(), MultiSystemSolveObject::setupMultiSystemFixedPointRelaxationFactors(), SamplerBase::setupVariables(), PhysicsBase::shouldCreateIC(), PhysicsBase::shouldCreateTimeDerivative(), PhysicsBase::shouldCreateVariable(), SystemBase::solutionState(), FEProblemBase::solverSysNum(), FEProblemBase::solverTypeString(), EigenProblem::solverTypeString(), StitchMeshGenerator::StitchMeshGenerator(), NonlinearSystem::stopSolve(), stringify(), stringify(), stringify(), Moose::internal::stringify_variant(), PiecewiseByBlockLambdaFunctor< T >::subdomainErrorMessage(), PiecewiseByBlockLambdaFunctor< T >::subdomainNameAndID(), and FEProblemSolve::validParams().

◆ stringify() [10/22]

template<template< typename... > class T, typename... U>
std::string Moose::stringify ( const T< U... > &  c,
const std::string &  delim = ", ",
const std::string &  elem_encl = "",
bool  enclose_list_in_curly_braces = false 
)

Convert a container to a string with elements separated by delimiter of user's choice.

Optionally, the container elements can be enclosed by curly braces and can enclose elements in quotations (or other characters) to make the separation of elements more clear.

Parameters
[in]cContainer to stringify
[in]delimString to print between elements
[in]elem_enclString to use at the beginning and end of each element, typically quotation marks
[in]enclose_list_in_curly_bracesEnclose the list string in curly braces?

Definition at line 195 of file Conversion.h.

199{
200 std::string str;
201 if (enclose_list_in_curly_braces)
202 str += "{";
203 const auto begin = c.begin();
204 const auto end = c.end();
205 for (auto i = begin; i != end; ++i)
206 str += (i != begin ? delim : "") + elem_encl + stringify(*i) + elem_encl;
207 if (enclose_list_in_curly_braces)
208 str += "}";
209 return str;
210}

◆ stringify() [11/22]

std::string Moose::stringify ( const VarFieldType t)

Convert variable field type into human readable string.

Definition at line 430 of file Conversion.C.

431{
432 switch (t)
433 {
435 return "STANDARD";
436 case VAR_FIELD_VECTOR:
437 return "VECTOR";
438 case VAR_FIELD_ARRAY:
439 return "ARRAY";
440 case VAR_FIELD_SCALAR:
441 return "SCALAR";
442 case VAR_FIELD_ANY:
443 return "ANY";
444 }
445 return "";
446}

◆ stringify() [12/22]

std::string Moose::stringify ( ElementType  t)

Convert ElementType into string.

Definition at line 467 of file Conversion.C.

468{
469 switch (t)
470 {
471 case ElementType::Element:
472 return "ELEMENT";
473 case ElementType::Neighbor:
474 return "NEIGHBOR";
475 case ElementType::Lower:
476 return "LOWER";
477 default:
478 mooseError("unrecognized type");
479 }
480}

◆ stringify() [13/22]

std::string Moose::stringify ( int  v)
inline

Definition at line 80 of file Conversion.h.

81{
82 return std::to_string(v);
83}

◆ stringify() [14/22]

std::string Moose::stringify ( libMesh::ElemType  t)

Convert the libmesh ElemType into string.

Definition at line 483 of file Conversion.C.

484{
486}
std::string enum_to_string(const T e)

◆ stringify() [15/22]

std::string Moose::stringify ( libMesh::FEFamily  f)

Convert FEType from libMesh into string.

Definition at line 375 of file Conversion.C.

376{
378}

◆ stringify() [16/22]

std::string Moose::stringify ( long long  v)
inline

Definition at line 90 of file Conversion.h.

91{
92 return std::to_string(v);
93}

◆ stringify() [17/22]

std::string Moose::stringify ( long  v)
inline

Definition at line 85 of file Conversion.h.

86{
87 return std::to_string(v);
88}

◆ stringify() [18/22]

std::string Moose::stringify ( SolutionIterationType  t)

Convert SolutionIterationType into string.

Definition at line 449 of file Conversion.C.

450{
451 switch (t)
452 {
453 case SolutionIterationType::Time:
454 return "time";
455 case SolutionIterationType::Nonlinear:
456 return "nonlinear";
457 case SolutionIterationType::MultiAppFixedPoint:
458 return "multiapp_fixed_point";
459 case SolutionIterationType::MultiSystemFixedPoint:
460 return "multisystem_fixed_point";
461 default:
462 mooseError("Unhandled SolutionIterationType");
463 }
464}

◆ stringify() [19/22]

template<typename... T>
std::string Moose::stringify ( std::variant< T... >  v)
inline

Definition at line 122 of file Conversion.h.

123{
124 return (internal::stringify_variant<T>(v) + ...);
125}

◆ stringify() [20/22]

std::string Moose::stringify ( unsigned int  v)
inline

Definition at line 95 of file Conversion.h.

96{
97 return std::to_string(v);
98}

◆ stringify() [21/22]

std::string Moose::stringify ( unsigned long long  v)
inline

Definition at line 105 of file Conversion.h.

106{
107 return std::to_string(v);
108}

◆ stringify() [22/22]

std::string Moose::stringify ( unsigned long  v)
inline

Definition at line 100 of file Conversion.h.

101{
102 return std::to_string(v);
103}

◆ stringifyExact()

std::string Moose::stringifyExact ( Real  t)

Stringify Reals with enough precision to guarantee lossless Real -> string -> Real roundtrips.

Definition at line 495 of file Conversion.C.

496{
497 // this or std::numeric_limits<T>::max_digits10
498 const unsigned int max_digits10 =
499 std::floor(std::numeric_limits<Real>::digits * std::log10(2) + 2);
500
501 std::ostringstream os;
502 os << std::setprecision(max_digits10) << t;
503 return os.str();
504}

◆ stringToEnum()

template<typename T >
T Moose::stringToEnum ( const std::string &  s)

◆ stringToEnum< CoordinateSystemType >() [1/2]

template<>
CoordinateSystemType Moose::stringToEnum< CoordinateSystemType > ( const std::string &  s)

Definition at line 187 of file Conversion.C.

189{
191
192 std::string upper(s);
193 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
194
195 if (!coordinate_system_type_to_enum.count(upper))
196 mooseError("Unknown coordinate system type: ", upper);
197
198 return coordinate_system_type_to_enum[upper];
199}
void initCoordinateSystemType()
Definition Conversion.C:37

◆ stringToEnum< CoordinateSystemType >() [2/2]

template<>
CoordinateSystemType Moose::stringToEnum< CoordinateSystemType > ( const std::string &  s)

Definition at line 187 of file Conversion.C.

189{
191
192 std::string upper(s);
193 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
194
195 if (!coordinate_system_type_to_enum.count(upper))
196 mooseError("Unknown coordinate system type: ", upper);
197
198 return coordinate_system_type_to_enum[upper];
199}

◆ stringToEnum< EigenProblemType >()

template<>
EigenProblemType Moose::stringToEnum< EigenProblemType > ( const std::string &  s)

Definition at line 232 of file Conversion.C.

234{
236
237 std::string upper(s);
238 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
239
240 if (!eigen_problem_type_to_enum.count(upper))
241 mooseError("Unknown eigen problem type: ", upper);
242
243 return eigen_problem_type_to_enum[upper];
244}
void initEigenProlemType()
Definition Conversion.C:78

◆ stringToEnum< EigenSolveType >()

template<>
EigenSolveType Moose::stringToEnum< EigenSolveType > ( const std::string &  s)

Definition at line 217 of file Conversion.C.

219{
221
222 std::string upper(s);
223 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
224
225 if (!eigen_solve_type_to_enum.count(upper))
226 mooseError("Unknown eigen solve type: ", upper);
227
228 return eigen_solve_type_to_enum[upper];
229}
void initEigenSolveType()
Definition Conversion.C:61

◆ stringToEnum< libMesh::Order >()

template<>
libMesh::Order Moose::stringToEnum< libMesh::Order > ( const std::string &  s)

◆ stringToEnum< libMesh::QuadratureType >()

template<>
libMesh::QuadratureType Moose::stringToEnum< libMesh::QuadratureType > ( const std::string &  s)

◆ stringToEnum< LineSearchType >() [1/2]

template<>
LineSearchType Moose::stringToEnum< LineSearchType > ( const std::string &  s)

Definition at line 262 of file Conversion.C.

264{
266
267 std::string upper(s);
268 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
269
270 if (!line_search_type_to_enum.count(upper))
271 mooseError("Unknown line search type: ", upper);
272
273 return line_search_type_to_enum[upper];
274}
void initLineSearchType()
Definition Conversion.C:112

◆ stringToEnum< LineSearchType >() [2/2]

template<>
LineSearchType Moose::stringToEnum< LineSearchType > ( const std::string &  s)

Definition at line 262 of file Conversion.C.

264{
266
267 std::string upper(s);
268 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
269
270 if (!line_search_type_to_enum.count(upper))
271 mooseError("Unknown line search type: ", upper);
272
273 return line_search_type_to_enum[upper];
274}

◆ stringToEnum< MffdType >()

template<>
MffdType Moose::stringToEnum< MffdType > ( const std::string &  s)

Definition at line 292 of file Conversion.C.

294{
295 initMffdType();
296
297 std::string upper(s);
298 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
299
300 if (!mffd_type_to_enum.count(upper))
301 mooseError("Unknown mffd type: ", upper);
302
303 return mffd_type_to_enum[upper];
304}
void initMffdType()
Definition Conversion.C:145

◆ stringToEnum< Order >()

template<>
Order Moose::stringToEnum< Order > ( const std::string &  s)

Definition at line 174 of file Conversion.C.

176{
177 std::string upper(s);
178 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
179
180 if (upper.compare("AUTO") == 0)
181 return INVALID_ORDER;
182 else
183 return Utility::string_to_enum<Order>(upper);
184}

Referenced by SetupQuadratureAction::act(), and DeleteElementsNearMeshGenerator::generate().

◆ stringToEnum< QuadratureType >()

template<>
QuadratureType Moose::stringToEnum< QuadratureType > ( const std::string &  s)

Definition at line 167 of file Conversion.C.

169{
170 return Utility::string_to_enum<QuadratureType>("Q" + s);
171}

◆ stringToEnum< RelationshipManagerType >() [1/2]

template<>
RelationshipManagerType Moose::stringToEnum< RelationshipManagerType > ( const std::string &  s)

Definition at line 307 of file Conversion.C.

309{
310 initRMType();
311
312 std::string upper(s);
313 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
314
315 if (!rm_type_to_enum.count(upper))
316 mooseError("Unknown RelationshipManager type: ", upper);
317
318 return rm_type_to_enum[upper];
319}
void initRMType()
Definition Conversion.C:155

◆ stringToEnum< RelationshipManagerType >() [2/2]

template<>
RelationshipManagerType Moose::stringToEnum< RelationshipManagerType > ( const std::string &  s)

Definition at line 307 of file Conversion.C.

309{
310 initRMType();
311
312 std::string upper(s);
313 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
314
315 if (!rm_type_to_enum.count(upper))
316 mooseError("Unknown RelationshipManager type: ", upper);
317
318 return rm_type_to_enum[upper];
319}

◆ stringToEnum< SolveType >() [1/2]

template<>
SolveType Moose::stringToEnum< SolveType > ( const std::string &  s)

Definition at line 202 of file Conversion.C.

204{
206
207 std::string upper(s);
208 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
209
210 if (!solve_type_to_enum.count(upper))
211 mooseError("Unknown solve type: ", upper);
212
213 return solve_type_to_enum[upper];
214}
void initSolveType()
Definition Conversion.C:48

◆ stringToEnum< SolveType >() [2/2]

template<>
SolveType Moose::stringToEnum< SolveType > ( const std::string &  s)

Definition at line 202 of file Conversion.C.

204{
206
207 std::string upper(s);
208 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
209
210 if (!solve_type_to_enum.count(upper))
211 mooseError("Unknown solve type: ", upper);
212
213 return solve_type_to_enum[upper];
214}

◆ stringToEnum< TimeIntegratorType >() [1/2]

template<>
TimeIntegratorType Moose::stringToEnum< TimeIntegratorType > ( const std::string &  s)

Definition at line 277 of file Conversion.C.

279{
281
282 std::string upper(s);
283 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
284
285 if (!time_integrator_to_enum.count(upper))
286 mooseError("Unknown time integrator: ", upper);
287
288 return time_integrator_to_enum[upper];
289}
void initTimeIntegratorsType()
Definition Conversion.C:130

◆ stringToEnum< TimeIntegratorType >() [2/2]

template<>
TimeIntegratorType Moose::stringToEnum< TimeIntegratorType > ( const std::string &  s)

Definition at line 277 of file Conversion.C.

279{
281
282 std::string upper(s);
283 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
284
285 if (!time_integrator_to_enum.count(upper))
286 mooseError("Unknown time integrator: ", upper);
287
288 return time_integrator_to_enum[upper];
289}

◆ stringToEnum< WhichEigenPairs >()

template<>
WhichEigenPairs Moose::stringToEnum< WhichEigenPairs > ( const std::string &  s)

Definition at line 247 of file Conversion.C.

249{
251
252 std::string upper(s);
253 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
254
255 if (!which_eigen_pairs_to_enum.count(upper))
256 mooseError("Unknown type of WhichEigenPairs: ", upper);
257
258 return which_eigen_pairs_to_enum[upper];
259}
void initWhichEigenPairs()
Definition Conversion.C:93

◆ swapLibMeshComm()

MPI_Comm Moose::swapLibMeshComm ( MPI_Comm  new_comm)

Swap the libMesh MPI communicator out for ours.

Note that you should usually use the Moose::ScopedCommSwapper class instead of calling this function.

Definition at line 835 of file Moose.C.

Referenced by Moose::ScopedCommSwapper::forceSwap(), and Moose::ScopedCommSwapper::~ScopedCommSwapper().

◆ to_json()

void Moose::to_json ( nlohmann::json &  json,
const Moose::LibtorchArtificialNeuralNet *const &  network 
)

Definition at line 151 of file LibtorchArtificialNeuralNet.C.

152{
153 if (network)
154 network->store(json);
155}
void store(nlohmann::json &json) const
Store the network architecture in a json file (for debugging, visualization)

◆ toPoint()

Point Moose::toPoint ( const std::vector< Real > &  pos)

Definition at line 507 of file Conversion.C.

508{
509 mooseAssert(pos.size() == LIBMESH_DIM, "Wrong array size while converting into a point");
510 return Point(pos[0], pos[1], pos[2]);
511}

◆ typeLoop()

template<template< typename, int > class L, typename... Ts, typename... As>
void Moose::typeLoop ( TypeList< Ts... >  ,
As...  args 
)

Type loop.

Definition at line 178 of file SerialAccess.h.

179{
180 typeLoopInternal<L, 0>(TypeList<Ts...>{}, args...);
181}
Helper structure to hold a list of types.

◆ typeLoopInternal()

template<template< typename, int > class L, int I, typename T , typename... Ts, typename... As>
void Moose::typeLoopInternal ( TypeList< T, Ts... >  ,
As...  args 
)

Type loop.

Definition at line 168 of file SerialAccess.h.

169{
170 L<T, I>::apply(args...);
171 if constexpr (sizeof...(Ts) > 0)
172 typeLoopInternal<L, I + 1>(TypeList<Ts...>{}, args...);
173}

◆ vectorStringsToEnum()

template<typename T >
std::vector< T > Moose::vectorStringsToEnum ( const MultiMooseEnum v)

Variable Documentation

◆ _color_console

bool Moose::_color_console = isatty(fileno(stdout))
static

Definition at line 842 of file Moose.C.

Referenced by Moose::ScopedDeprecatedIsError::ScopedDeprecatedIsError().

◆ _deprecated_is_error

bool Moose::_deprecated_is_error = false

Variable to toggle only deprecated warnings as errors.

Definition at line 895 of file Moose.C.

Referenced by moose::internal::mooseDeprecatedStream(), and MooseApp::setupOptions().

◆ _throw_on_error

bool Moose::_throw_on_error = false

Variable to turn on exceptions during mooseError(), should only be used within MOOSE unit tests or when about to perform threaded operations because exception throwing in threaded regions is safe while aborting is inherently not when singletons are involved (e.g.

what thread is responsible for destruction, or what do you do about mutexes?)

Definition at line 896 of file Moose.C.

Referenced by moose::internal::mooseErrorRaw(), MooseApp::run(), CommandLine::setCommandLineParam(), ThreadedFaceLoop< RangeType >::ThreadedFaceLoop(), and ThreadedFaceLoop< RangeType >::~ThreadedFaceLoop().

◆ _throw_on_warning

bool Moose::_throw_on_warning = false

Variable to turn on exceptions during mooseWarning(), should only be used in MOOSE unit tests.

Definition at line 897 of file Moose.C.

Referenced by moose::internal::mooseUnusedStream(), and moose::internal::mooseWarningStream().

◆ _trap_fpe

bool Moose::_trap_fpe
extern

Variable indicating whether we will enable FPE trapping for this run.

◆ _warnings_are_errors

bool Moose::_warnings_are_errors = false

Variable to toggle any warning into an error (includes deprecated code warnings)

Definition at line 894 of file Moose.C.

Referenced by moose::internal::mooseWarningStream(), and MooseApp::setupOptions().

◆ always_false

template<class... Ts>
constexpr std::false_type Moose::always_false {}
constexpr

This is a helper variable template for cases when we want to use a default compile-time error with constexpr-based if conditions.

The templating delays the triggering of the static assertion until the template is instantiated.

Definition at line 640 of file MooseTypes.h.

640{};

◆ ANY_BLOCK_ID

const SubdomainID Moose::ANY_BLOCK_ID = libMesh::Elem::invalid_subdomain_id - 1

◆ ANY_BOUNDARY_ID

const BoundaryID Moose::ANY_BOUNDARY_ID = static_cast<BoundaryID>(-1)

◆ constMaxQpsPerElem

constexpr std::size_t Moose::constMaxQpsPerElem = 1000
constexpr

This is used for places where we initialize some qp-sized data structures that would end up being sized too small after the quadrature order gets bumped (dynamically in-sim).

So for these cases, we just use this constant to size those data structures overly large to accommodate rather than come up with some overkill complex mechanism for dynamically resizing them. Eventually, we may need or implement that more sophisticated mechanism and will no longer need this.

Definition at line 258 of file MooseTypes.h.

Referenced by MaterialPropertyInterface::defaultGenericMaterialProperty(), and FEProblemBase::updateMaxQps().

◆ coordinate_system_type_to_enum

std::map<std::string, CoordinateSystemType> Moose::coordinate_system_type_to_enum

Definition at line 26 of file Conversion.C.

Referenced by initCoordinateSystemType(), and stringToEnum< CoordinateSystemType >().

◆ dim

constexpr std::size_t Moose::dim = LIBMESH_DIM
staticconstexpr

This is the dimension of all vector and tensor datastructures used in MOOSE.

We enforce LIBMESH_DIM == 3 through a static assertion above. Note that lower dimensional simulations embedded in 3D space can always be requested at runtime.

Definition at line 165 of file Moose.h.

Referenced by ADNodalBCTempl< Real, ADDirichletBCBase >::addResidual(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), ParsedFunctorMaterialTempl< is_ad >::buildParsedFunction(), Moose::Kokkos::Vector3< T >::cartesian_product(), ColumnMajorMatrixTempl< T >::ColumnMajorMatrixTempl(), ColumnMajorMatrixTempl< Real >::ColumnMajorMatrixTempl(), LinearFVAnisotropicDiffusion::computeBoundaryMatrixContribution(), LinearFVAnisotropicDiffusionFunctorNeumannBC::computeBoundaryNormalGradient(), LinearFVAnisotropicDiffusion::computeBoundaryRHSContribution(), LinearFVAnisotropicDiffusion::computeFluxMatrixContribution(), LinearFVAnisotropicDiffusion::computeFluxRHSContribution(), GenericFunctionVectorMaterialTempl< is_ad >::computeQpFunctions(), ElementW1pError::computeQpIntegral(), GenericConstantVectorMaterialTempl< is_ad >::computeQpProperties(), FVAnisotropicDiffusion::computeQpResidual(), ArrayParsedAux::computeValue(), ElementH1ErrorFunctionAux::computeValue(), ParsedAux::computeValue(), ParsedVectorAux::computeValue(), Moose::Kokkos::Real33::contract(), BatchMeshGeneratorAction::convertStringToCompoundRealScalar(), Moose::Kokkos::curlFromVectorGradient(), Moose::Kokkos::dataLoad(), dataLoad(), dataLoad(), dataLoad(), Moose::Kokkos::dataStore(), dataStore(), dataStore(), dataStore(), MooseMesh::detectOrthogonalDimRanges(), Moose::Kokkos::Real33::determinant(), SideDiffusiveFluxIntegralTempl< is_ad, T >::diffusivityGradientProduct(), InitialConditionTempl< T >::dotHelper(), Moose::MFEM::NLCurlCurlJacMatrixCoefficient::Eval(), IntersectionPointsAlongLine::execute(), LinearFVAnisotropicDiffusion::faceDiffusionTensor(), MooseVariableData< OutputType >::fill(), ColumnMajorMatrixTempl< T >::fill(), findContactPoint(), GenericFunctionVectorMaterialTempl< is_ad >::GenericFunctionVectorMaterialTempl(), Coupleable::getDefaultVectorValue(), MultiAppTransfer::getFromBoundingBoxes(), MultiAppGeneralFieldTransfer::getMaxToProblemsBBoxDimensions(), MultiAppGeneralFieldTransfer::getRestrictedFromBoundingBoxes(), ArrayFunctionIC::gradient(), Moose::FV::greenGaussGradient(), Moose::FV::greenGaussGradient(), Moose::FV::greenGaussGradient(), Moose::FV::harmonicInterpolation(), MooseAppCoordTransform::hasScalingOrRotationTransformation(), Moose::Kokkos::Real33::identity(), CartesianGridDivision::initialize(), ParsedDownSelectionPositions::initialize(), PropertyReadFile::initVoronoiCenterPoints(), Moose::Kokkos::Real33::inverse(), MooseUtils::isFinitePoint(), MultiAppCoordTransform::isIdentity(), NestedSolveTempl< is_ad >::isRelSmall(), PointListAdaptor< PointObject >::kdtree_distance(), PointListAdaptor< PointObject >::kdtree_get_pt(), Moose::Kokkos::ArrayBase< T, dimension, index_type >::n(), Moose::Kokkos::JaggedArrayInnerData< T, inner, layout >::n(), Moose::Kokkos::JaggedArray< T, inner, outer, index_type, layout >::n(), Moose::Kokkos::MaterialPropertyValueBase< T, dimension >::n(), ResetDisplacedMeshThread::onNode(), SecondaryNeighborhoodThread::operator()(), Moose::Kokkos::Thread< thread_id_type, max_dimension >::operator()(), Moose::Kokkos::JaggedArray< T, inner, outer, index_type, layout >::operator()(), Moose::Kokkos::operator*(), ColumnMajorMatrixTempl< T >::operator*(), Moose::Kokkos::Real33::operator*=(), Moose::Kokkos::Real33::operator+=(), ColumnMajorMatrixTempl< T >::operator+=(), Moose::Kokkos::Real33::operator=(), Moose::Kokkos::Real33::operator=(), Moose::Kokkos::Real33::operator=(), ColumnMajorMatrixTempl< T >::operator=(), Moose::Kokkos::JaggedArray< T, inner, outer, index_type, layout >::operator[](), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), PointIndexedMap::PointIndexedMap(), PropertyReadFile::PropertyReadFile(), Moose::Kokkos::JaggedArray< T, inner, outer, index_type, layout >::reserve(), Moose::Kokkos::Thread< thread_id_type, max_dimension >::resize(), sideIntersectedByLine(), Moose::Kokkos::Thread< thread_id_type, max_dimension >::size(), MultiApp::transformBoundingBox(), Moose::Kokkos::Real33::transpose(), and BoundingBoxIC::value().

◆ eigen_problem_type_to_enum

std::map<std::string, EigenProblemType> Moose::eigen_problem_type_to_enum

Definition at line 29 of file Conversion.C.

Referenced by initEigenProlemType(), and stringToEnum< EigenProblemType >().

◆ eigen_solve_type_to_enum

std::map<std::string, EigenSolveType> Moose::eigen_solve_type_to_enum

Definition at line 28 of file Conversion.C.

Referenced by initEigenSolveType(), and stringToEnum< EigenSolveType >().

◆ EMPTY_BLOCK_IDS

const std::set<SubdomainID> Moose::EMPTY_BLOCK_IDS = {}

Definition at line 737 of file MooseTypes.h.

737{};

◆ EMPTY_BOUNDARY_IDS

const std::set<BoundaryID> Moose::EMPTY_BOUNDARY_IDS = {}

Definition at line 738 of file MooseTypes.h.

738{};

◆ execute_flags

ExecFlagEnum Moose::execute_flags
extern

Storage for the registered execute flags.

This is needed for the ExecuteMooseObjectWarehouse to create the necessary storage containers on a per flag basis. This isn't something that should be used by application developers.

◆ interrupt_signal_number

volatile std::sig_atomic_t Moose::interrupt_signal_number = 0

Used by the signal handler to determine if we should write a checkpoint file out at any point during operation.

Definition at line 898 of file Moose.C.

Referenced by Output::outputStep(), Checkpoint::shouldOutput(), and SigHandler().

◆ INVALID_BLOCK_ID

const SubdomainID Moose::INVALID_BLOCK_ID = libMesh::Elem::invalid_subdomain_id

Definition at line 20 of file MooseTypes.C.

Referenced by FEProblemBase::checkProblemIntegrity(), ComputeFullJacobianThread::computeOnInternalFace(), ComputeResidualThread::computeOnInternalFace(), MultiAppGeometricInterpolationTransfer::computeTransformation(), MooseMeshUtils::convertBlockToMesh(), SubdomainsDivision::divisionIndex(), ElementSubdomainModifier::execute(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), ElementSubdomainModifierBase::gatherMovingBoundaryChangesHelper(), RenameBlockGenerator::generate(), RenumberBySubdomainGenerator::generate(), XYMeshLineCutter::generate(), MooseMeshUtils::getSubdomainID(), TimedSubdomainModifier::getSubdomainIDAndCheck(), MooseMeshUtils::hasSubdomainID(), ElementSubdomainModifierBase::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), AttribSubdomains::isMatch(), FaceInfo::neighborSubdomainID(), ComputeLinearFVElementalThread::operator()(), ComputeLinearFVFaceThread::operator()(), ComputeJacobianForScalingThread::operator()(), ThreadedFaceLoop< RangeType >::operator()(), ThreadedElementLoopBase< RangeType >::operator()(), ComputeLinearFVFaceThread::printBlockExecutionInformation(), ComputeFVFluxThread< RangeType, AttributeTagType >::printBlockExecutionInformation(), ComputeFVFluxThread< RangeType, AttributeTagType >::printBoundaryExecutionInformation(), MooseMeshXYCuttingUtils::quadToTriOnLine(), MooseMeshXYCuttingUtils::quasiTriElementsFixer(), PiecewiseByBlockLambdaFunctor< T >::setFunctor(), and MeshTriangulationUtils::triangulateWithDelaunay().

◆ INVALID_BOUNDARY_ID

const BoundaryID Moose::INVALID_BOUNDARY_ID = libMesh::BoundaryInfo::invalid_id

◆ INVALID_PROCESSOR_ID

const processor_id_type Moose::INVALID_PROCESSOR_ID = libMesh::DofObject::invalid_processor_id

Definition at line 18 of file MooseTypes.C.

◆ invalid_size_t

constexpr std::size_t Moose::invalid_size_t = std::numeric_limits<std::size_t>::max()
inlineconstexpr

Value for invalid size_t indices.

Definition at line 168 of file Moose.h.

◆ INVALID_TAG_ID

const TagID Moose::INVALID_TAG_ID = static_cast<TagID>(-1)

◆ INVALID_TAG_TYPE_ID

const TagTypeID Moose::INVALID_TAG_TYPE_ID = static_cast<TagTypeID>(-1)

Definition at line 24 of file MooseTypes.C.

◆ line_search_type_to_enum

std::map<std::string, LineSearchType> Moose::line_search_type_to_enum

Definition at line 31 of file Conversion.C.

Referenced by initLineSearchType(), and stringToEnum< LineSearchType >().

◆ mffd_type_to_enum

std::map<std::string, MffdType> Moose::mffd_type_to_enum

Definition at line 33 of file Conversion.C.

Referenced by initMffdType(), and stringToEnum< MffdType >().

◆ OLD_SOLUTION_TAG

const TagName Moose::OLD_SOLUTION_TAG = "SOLUTION_STATE_1"

◆ OLDER_SOLUTION_TAG

const TagName Moose::OLDER_SOLUTION_TAG = "SOLUTION_STATE_2"

◆ perf_log

libMesh::PerfLog Moose::perf_log
extern

Perflog to be used by applications.

If the application prints this in the end they will get performance info.

This is no longer instantiated in the framework and will be removed in the future.

◆ PREVIOUS_MULTIAPP_FP_SOLUTION_TAG

const TagName Moose::PREVIOUS_MULTIAPP_FP_SOLUTION_TAG = "U_PREVIOUS_MULTIAPP_FP"

◆ PREVIOUS_MULTISYSTEM_FP_SOLUTION_TAG

const TagName Moose::PREVIOUS_MULTISYSTEM_FP_SOLUTION_TAG = "U_PREVIOUS_MULTISYSTEM_FP"

Definition at line 30 of file MooseTypes.C.

Referenced by SystemBase::oldSolutionStateVectorName().

◆ PREVIOUS_NL_SOLUTION_TAG

const TagName Moose::PREVIOUS_NL_SOLUTION_TAG = "U_PREVIOUS_NL_NEWTON"

◆ rm_type_to_enum

std::map<std::string, RelationshipManagerType> Moose::rm_type_to_enum

Definition at line 34 of file Conversion.C.

Referenced by initRMType(), and stringToEnum< RelationshipManagerType >().

◆ show_multiple

bool Moose::show_multiple = false

Set to false (the default) to display an error message only once for each error call code location (as opposed to every time the code is executed).

Definition at line 899 of file Moose.C.

◆ SOLUTION_DOT_TAG

const TagName Moose::SOLUTION_DOT_TAG = "u_dot_factor"

Definition at line 31 of file MooseTypes.C.

◆ SOLUTION_DOTDOT_TAG

const TagName Moose::SOLUTION_DOTDOT_TAG = "u_dotdot_factor"

Definition at line 32 of file MooseTypes.C.

◆ SOLUTION_TAG

const TagName Moose::SOLUTION_TAG = "SOLUTION"

◆ solve_type_to_enum

std::map<std::string, SolveType> Moose::solve_type_to_enum

Definition at line 27 of file Conversion.C.

Referenced by initSolveType(), and stringToEnum< SolveType >().

◆ time_integrator_to_enum

std::map<std::string, TimeIntegratorType> Moose::time_integrator_to_enum

Definition at line 32 of file Conversion.C.

Referenced by initTimeIntegratorsType(), and stringToEnum< TimeIntegratorType >().

◆ which_eigen_pairs_to_enum

std::map<std::string, WhichEigenPairs> Moose::which_eigen_pairs_to_enum

Definition at line 30 of file Conversion.C.

Referenced by initWhichEigenPairs(), and stringToEnum< WhichEigenPairs >().