https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
FEProblemBase Class Referenceabstract

Specialization of SubProblem for solving nonlinear equations plus auxiliary equations. More...

#include <FEProblemBase.h>

Inheritance diagram for FEProblemBase:
[legend]

Classes

class  CreateTaggedMatrixKey
 
class  CurrentResidualVectorTagsKey
 Class that is used as a parameter to set/clearCurrentResidualVectorTags that allows only blessed classes to call said methods. More...
 

Public Types

enum class  CoverageCheckMode {
  FALSE , TRUE , OFF , ON ,
  SKIP_LIST , ONLY_LIST
}
 
using DataFileParameterType = DataFileName
 The parameter type this interface expects for a data file name.
 

Public Member Functions

 FEProblemBase (const InputParameters &parameters)
 
virtual ~FEProblemBase ()
 
bool initialized () const
 
virtual libMesh::EquationSystems & es () override
 
virtual MooseMesh & mesh () override
 
virtual const MooseMesh & mesh () const override
 
const MooseMesh & mesh (bool use_displaced) const override
 
MooseMesh & mesh (bool use_displaced)
 
void setCoordSystem (const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
 
void setAxisymmetricCoordAxis (const MooseEnum &rz_coord_axis)
 
void setCoupling (Moose::CouplingType type)
 Set the coupling between variables TODO: allow user-defined coupling.
 
Moose::CouplingType coupling () const
 
void setCouplingMatrix (std::unique_ptr< libMesh::CouplingMatrix > cm, const unsigned int nl_sys_num)
 Set custom coupling matrix.
 
void setCouplingMatrix (libMesh::CouplingMatrix *cm, const unsigned int nl_sys_num)
 
const libMesh::CouplingMatrix * couplingMatrix (const unsigned int nl_sys_num) const override
 The coupling matrix defining what blocks exist in the preconditioning matrix.
 
void setNonlocalCouplingMatrix ()
 Set custom coupling matrix for variables requiring nonlocal contribution.
 
bool areCoupled (const unsigned int ivar, const unsigned int jvar, const unsigned int nl_sys_num) const
 
bool hasUOAuxStateCheck () const
 Whether or not MOOSE will perform a user object/auxiliary kernel state check.
 
bool checkingUOAuxState () const
 Return a flag to indicate whether we are executing user objects and auxliary kernels for state check Note: This function can return true only when hasUOAuxStateCheck() returns true, i.e.
 
virtual bool checkResidualForNans () const override
 Whether to check residual for NaN/Inf values.
 
void setCheckResidualForNans (bool check_residual_for_nans)
 Setter for residual NaN/Inf checking.
 
void trustUserCouplingMatrix ()
 Whether to trust the user coupling matrix even if we want to do things like be paranoid and create a full coupling matrix.
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & couplingEntries (const THREAD_ID tid, const unsigned int nl_sys_num)
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & nonlocalCouplingEntries (const THREAD_ID tid, const unsigned int nl_sys_num)
 
const std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > & fieldScalarCouplingEntries (const THREAD_ID tid, const unsigned int nl_sys_num) const
 
virtual bool hasVariable (const std::string &var_name) const override
 Whether or not this problem has the variable.
 
bool hasSolverVariable (const std::string &var_name) const
 
virtual const MooseVariableFieldBase & getVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
 Returns the variable reference for requested variable which must be of the expected_var_type (Nonlinear vs.
 
MooseVariableFieldBase & getActualFieldVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested MooseVariableField which may be in any system.
 
virtual MooseVariable & getStandardVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested MooseVariable which may be in any system.
 
virtual VectorMooseVariable & getVectorVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested VectorMooseVariable which may be in any system.
 
virtual ArrayMooseVariable & getArrayVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested ArrayMooseVariable which may be in any system.
 
virtual bool hasScalarVariable (const std::string &var_name) const override
 Returns a Boolean indicating whether any system contains a variable with the name provided.
 
virtual MooseVariableScalar & getScalarVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the scalar variable reference from whichever system contains it.
 
virtual libMesh::System & getSystem (const std::string &var_name) override
 Returns the equation system containing the variable provided.
 
const RestartableEquationSystems & getRestartableEquationSystems () const
 Get the RestartableEquationSystems object.
 
virtual void setActiveElementalMooseVariables (const std::set< MooseVariableFEBase * > &moose_vars, const THREAD_ID tid) override
 Set the MOOSE variables to be reinited on each element.
 
virtual void clearActiveElementalMooseVariables (const THREAD_ID tid) override
 Clear the active elemental MooseVariableFEBase.
 
virtual void clearActiveFEVariableCoupleableMatrixTags (const THREAD_ID tid) override
 
virtual void clearActiveFEVariableCoupleableVectorTags (const THREAD_ID tid) override
 
virtual void setActiveFEVariableCoupleableVectorTags (std::set< TagID > &vtags, const THREAD_ID tid) override
 
virtual void setActiveFEVariableCoupleableMatrixTags (std::set< TagID > &mtags, const THREAD_ID tid) override
 
virtual void clearActiveScalarVariableCoupleableMatrixTags (const THREAD_ID tid) override
 
virtual void clearActiveScalarVariableCoupleableVectorTags (const THREAD_ID tid) override
 
virtual void setActiveScalarVariableCoupleableVectorTags (std::set< TagID > &vtags, const THREAD_ID tid) override
 
virtual void setActiveScalarVariableCoupleableMatrixTags (std::set< TagID > &mtags, const THREAD_ID tid) override
 
virtual void createQRules (libMesh::QuadratureType type, libMesh::Order order, libMesh::Order volume_order=libMesh::INVALID_ORDER, libMesh::Order face_order=libMesh::INVALID_ORDER, SubdomainID block=Moose::ANY_BLOCK_ID, bool allow_negative_qweights=true)
 
void bumpVolumeQRuleOrder (libMesh::Order order, SubdomainID block)
 Increases the element/volume quadrature order for the specified mesh block if and only if the current volume quadrature order is lower.
 
void bumpAllQRuleOrder (libMesh::Order order, SubdomainID block)
 
unsigned int getMaxQps () const
 
libMesh::Order getMaxScalarOrder () const
 
void checkNonlocalCoupling ()
 
void checkUserObjectJacobianRequirement (THREAD_ID tid)
 
void setVariableAllDoFMap (const std::vector< const MooseVariableFEBase * > &moose_vars)
 
const std::vector< const MooseVariableFEBase * > & getUserObjectJacobianVariables (const THREAD_ID tid) const
 
virtual Assembly & assembly (const THREAD_ID tid, const unsigned int sys_num) override
 
virtual const Assembly & assembly (const THREAD_ID tid, const unsigned int sys_num) const override
 
Moose::Kokkos::Assembly & kokkosAssembly ()
 
const Moose::Kokkos::Assembly & kokkosAssembly () const
 
virtual std::vector< VariableName > getVariableNames ()
 Returns a list of all the variables in the problem (both from the NL and Aux systems.
 
void initialSetup () override
 
void checkDuplicatePostprocessorVariableNames ()
 
void timestepSetup () override
 
void customSetup (const ExecFlagType &exec_type) override
 
void residualSetup () override
 
void jacobianSetup () override
 
virtual void prepare (const Elem *elem, const THREAD_ID tid) override
 
virtual void prepareFace (const Elem *elem, const THREAD_ID tid) override
 
virtual void prepare (const Elem *elem, unsigned int ivar, unsigned int jvar, const std::vector< dof_id_type > &dof_indices, const THREAD_ID tid) override
 
virtual void setCurrentSubdomainID (const Elem *elem, const THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, const THREAD_ID tid)
 
virtual void prepareAssembly (const THREAD_ID tid) override
 
virtual void prepareAssemblyNeighbor (const THREAD_ID tid)
 Begin a fresh neighbor accumulation phase by sizing and zeroing the neighbor blocks.
 
virtual void addGhostedElem (dof_id_type elem_id) override
 Will make sure that all dofs connected to elem_id are ghosted to this processor.
 
virtual void addGhostedBoundary (BoundaryID boundary_id) override
 Will make sure that all necessary elements from boundary_id are ghosted to this processor.
 
virtual void ghostGhostedBoundaries () override
 Causes the boundaries added using addGhostedBoundary to actually be ghosted.
 
virtual void sizeZeroes (unsigned int size, const THREAD_ID tid)
 
virtual bool reinitDirac (const Elem *elem, const THREAD_ID tid) override
 Returns true if the Problem has Dirac kernels it needs to compute on elem.
 
virtual void reinitElem (const Elem *elem, const THREAD_ID tid) override
 
virtual void reinitElemPhys (const Elem *elem, const std::vector< Point > &phys_points_in_elem, const THREAD_ID tid) override
 
void reinitElemFace (const Elem *elem, unsigned int side, BoundaryID, const THREAD_ID tid)
 
virtual void reinitElemFace (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void reinitLowerDElem (const Elem *lower_d_elem, const THREAD_ID tid, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
 
virtual void reinitNode (const Node *node, const THREAD_ID tid) override
 
virtual void reinitNodeFace (const Node *node, BoundaryID bnd_id, const THREAD_ID tid) override
 
virtual void reinitNeighbor (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void reinitNeighborPhys (const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points, const THREAD_ID tid) override
 
virtual void reinitNeighborPhys (const Elem *neighbor, const std::vector< Point > &physical_points, const THREAD_ID tid) override
 
virtual void reinitElemNeighborAndLowerD (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void reinitScalars (const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
 fills the VariableValue arrays for scalar variables from the solution vector
 
virtual void reinitOffDiagScalars (const THREAD_ID tid) override
 
virtual void getDiracElements (std::set< const Elem * > &elems) override
 Fills "elems" with the elements that should be looped over for Dirac Kernels.
 
virtual void clearDiracInfo () override
 Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in.
 
virtual void subdomainSetup (SubdomainID subdomain, const THREAD_ID tid)
 
virtual void neighborSubdomainSetup (SubdomainID subdomain, const THREAD_ID tid)
 
virtual void newAssemblyArray (std::vector< std::shared_ptr< SolverSystem > > &solver_systems)
 
virtual void initNullSpaceVectors (const InputParameters &parameters, std::vector< std::shared_ptr< NonlinearSystemBase > > &nl)
 
virtual void init () override
 
virtual void solve (const unsigned int nl_sys_num)
 
void initKokkos ()
 Construct Kokkos assembly and systems and allocate Kokkos material property storages.
 
virtual void solveLinearSystem (const unsigned int linear_sys_num, const Moose::PetscSupport::PetscOptions *po=nullptr)
 Build and solve a linear system.
 
virtual void setException (const std::string &message)
 Set an exception, which is stored at this point by toggling a member variable in this class, and which must be followed up with by a call to checkExceptionAndStopSolve().
 
virtual bool hasException ()
 Whether or not an exception has occurred.
 
virtual void checkExceptionAndStopSolve (bool print_message=true)
 Check to see if an exception has occurred on any processor and, if possible, force the solve to fail, which will result in the time step being cut.
 
virtual bool solverSystemConverged (const unsigned int solver_sys_num) override
 
virtual unsigned int nNonlinearIterations (const unsigned int nl_sys_num) const override
 
virtual unsigned int nLinearIterations (const unsigned int nl_sys_num) const override
 
virtual Real finalNonlinearResidual (const unsigned int nl_sys_num) const override
 
virtual bool computingPreSMOResidual (const unsigned int nl_sys_num) const override
 Returns true if the problem is in the process of computing it's initial residual.
 
virtual std::string solverTypeString (unsigned int solver_sys_num=0)
 Return solver type as a human readable string.
 
virtual bool startedInitialSetup ()
 Returns true if we are in or beyond the initialSetup stage.
 
virtual void onTimestepBegin () override
 
virtual void onTimestepEnd () override
 
virtual Real & time () const
 
virtual Real & timeOld () const
 
virtual Real & timeOlder () const
 The time two steps back.
 
virtual int & timeStep () const
 
virtual Real & dt () const
 
virtual Real & dtOld () const
 
Real getTimeFromStateArg (const Moose::StateArg &state) const
 Returns the time associated with the requested state.
 
virtual void transient (bool trans)
 
virtual bool isTransient () const override
 
virtual void addTimeIntegrator (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual void addPredictor (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual void copySolutionsBackwards ()
 
void skipNextForwardSolutionCopyToOld ()
 Prevents the copy of the solution vector to the old solution vector in each system.
 
virtual void advanceState ()
 Advance all of the state holding vectors / datastructures so that we can move to the next timestep.
 
virtual void restoreSolutions ()
 
void backupGeometricSearchState ()
 Snapshot geometric search state (both on the regular and, if present, the displaced mesh) so it can be restored with restoreGeometricSearchState() if this step is later rejected.
 
void restoreGeometricSearchState ()
 Restore geometric search state captured by the most recent backupGeometricSearchState().
 
virtual void saveOldSolutions ()
 Allocate vectors and save old solutions into them.
 
virtual void restoreOldSolutions ()
 Restore old solutions from the backup vectors and deallocate them.
 
void needSolutionState (unsigned int oldest_needed, Moose::SolutionIterationType iteration_type)
 Declare that we need up to old (1) or older (2) solution states for a given type of iteration.
 
bool hasSolutionState (unsigned int state, Moose::SolutionIterationType iteration_type) const
 Whether we need up to old (1) or older (2) solution states for a given type of iteration.
 
virtual void outputStep (ExecFlagType type)
 Output the current step.
 
virtual void postExecute ()
 Method called at the end of the simulation.
 
void forceOutput ()
 Indicates that the next call to outputStep should be forced.
 
virtual void initPetscOutputAndSomeSolverSettings ()
 Reinitialize PETSc output for proper linear/nonlinear iteration display.
 
Moose::PetscSupport::PetscOptions & getPetscOptions ()
 Retrieve a writable reference the PETSc options (used by PetscSupport)
 
void logAdd (const std::string &system, const std::string &name, const std::string &type, const InputParameters &params) const
 Output information about the object just added to the problem.
 
virtual void addFunction (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual bool hasFunction (const std::string &name, const THREAD_ID tid=0)
 
virtual Function & getFunction (const std::string &name, const THREAD_ID tid=0)
 
virtual void addKokkosFunction (const std::string &type, const std::string &name, InputParameters &parameters)
 Add a Kokkos function to the problem.
 
virtual bool hasKokkosFunction (const std::string &name) const
 Get whether a Kokkos function exists.
 
virtual Moose::Kokkos::Function getKokkosFunction (const std::string &name)
 Get a Kokkos function in an abstract type.
 
template<typename T >
T & getKokkosFunction (const std::string &name)
 Get a Kokkos function in a concrete type.
 
virtual void addMeshDivision (const std::string &type, const std::string &name, InputParameters &params)
 Add a MeshDivision.
 
MeshDivision & getMeshDivision (const std::string &name, const THREAD_ID tid=0) const
 Get a MeshDivision.
 
virtual void addConvergence (const std::string &type, const std::string &name, InputParameters &parameters)
 Adds a Convergence object.
 
virtual Convergence & getConvergence (const std::string &name, const THREAD_ID tid=0) const
 Gets a Convergence object.
 
virtual const std::vector< std::shared_ptr< Convergence > > & getConvergenceObjects (const THREAD_ID tid=0) const
 Gets the Convergence objects.
 
virtual bool hasConvergence (const std::string &name, const THREAD_ID tid=0) const
 Returns true if the problem has a Convergence object of the given name.
 
bool needToAddDefaultNonlinearConvergence () const
 Returns true if the problem needs to add the default nonlinear convergence.
 
bool needToAddDefaultMultiAppFixedPointConvergence () const
 Returns true if the problem needs to add the default fixed point convergence.
 
bool needToAddDefaultSteadyStateConvergence () const
 Returns true if the problem needs to add the default steady-state detection convergence.
 
void setNeedToAddDefaultNonlinearConvergence ()
 Sets _need_to_add_default_nonlinear_convergence to true.
 
void setNeedToAddDefaultMultiAppFixedPointConvergence ()
 Sets _need_to_add_default_multiapp_fixed_point_convergence to true.
 
void setNeedToAddDefaultSteadyStateConvergence ()
 Sets _need_to_add_default_steady_state_convergence to true.
 
bool hasSetMultiAppFixedPointConvergenceName () const
 Returns true if the problem has set the fixed point convergence name.
 
bool hasSetSteadyStateConvergenceName () const
 Returns true if the problem has set the steady-state detection convergence name.
 
virtual void addDefaultNonlinearConvergence (const InputParameters &params)
 Adds the default nonlinear Convergence associated with the problem.
 
virtual bool onlyAllowDefaultNonlinearConvergence () const
 Returns true if an error will result if the user supplies 'nonlinear_convergence'.
 
void addDefaultMultiAppFixedPointConvergence (const InputParameters &params)
 Adds the default fixed point Convergence associated with the problem.
 
void addDefaultSteadyStateConvergence (const InputParameters &params)
 Adds the default steady-state detection Convergence.
 
virtual void addLineSearch (const InputParameters &)
 add a MOOSE line search
 
virtual void lineSearch ()
 execute MOOSE line search
 
LineSearch * getLineSearch () override
 getter for the MOOSE line search
 
virtual void addDistribution (const std::string &type, const std::string &name, InputParameters &parameters)
 The following functions will enable MOOSE to have the capability to import distributions.
 
virtual bool hasDistribution (const std::string &name) const
 
virtual Distribution & getDistribution (const std::string &name)
 
virtual void addSampler (const std::string &type, const std::string &name, InputParameters &parameters)
 The following functions will enable MOOSE to have the capability to import Samplers.
 
virtual Sampler & getSampler (const std::string &name, const THREAD_ID tid=0)
 
NonlinearSystemBase & getNonlinearSystemBase (const unsigned int sys_num)
 
const NonlinearSystemBase & getNonlinearSystemBase (const unsigned int sys_num) const
 
void setCurrentNonlinearSystem (const unsigned int nl_sys_num)
 
NonlinearSystemBase & currentNonlinearSystem ()
 
const NonlinearSystemBase & currentNonlinearSystem () const
 
virtual const SystemBase & systemBaseNonlinear (const unsigned int sys_num) const override
 Return the nonlinear system object as a base class reference given the system number.
 
virtual SystemBase & systemBaseNonlinear (const unsigned int sys_num) override
 
virtual const SystemBase & systemBaseSolver (const unsigned int sys_num) const override
 Return the solver system object as a base class reference given the system number.
 
virtual SystemBase & systemBaseSolver (const unsigned int sys_num) override
 
virtual const SystemBase & systemBaseAuxiliary () const override
 Return the auxiliary system object as a base class reference.
 
virtual SystemBase & systemBaseAuxiliary () override
 
virtual NonlinearSystem & getNonlinearSystem (const unsigned int sys_num)
 
virtual const SystemBase & getSystemBase (const unsigned int sys_num) const
 Get constant reference to a system in this problem.
 
virtual SystemBase & getSystemBase (const unsigned int sys_num)
 Get non-constant reference to a system in this problem.
 
SystemBase & getSystemBase (const std::string &sys_name)
 Get non-constant reference to a system in this problem.
 
LinearSystem & getLinearSystem (unsigned int sys_num)
 Get non-constant reference to a linear system.
 
const LinearSystem & getLinearSystem (unsigned int sys_num) const
 Get a constant reference to a linear system.
 
SolverSystem & getSolverSystem (unsigned int sys_num)
 Get non-constant reference to a solver system.
 
const SolverSystem & getSolverSystem (unsigned int sys_num) const
 Get a constant reference to a solver system.
 
void setCurrentLinearSystem (unsigned int sys_num)
 Set the current linear system pointer.
 
LinearSystem & currentLinearSystem ()
 Get a non-constant reference to the current linear system.
 
const LinearSystem & currentLinearSystem () const
 Get a constant reference to the current linear system.
 
virtual const SystemBase & systemBaseLinear (unsigned int sys_num) const override
 Get a constant base class reference to a linear system.
 
virtual SystemBase & systemBaseLinear (unsigned int sys_num) override
 Get a non-constant base class reference to a linear system.
 
virtual void addVariable (const std::string &var_type, const std::string &var_name, InputParameters &params)
 Canonical method for adding a non-linear variable.
 
virtual void addKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addHDGKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addNodalKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addScalarKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addBoundaryCondition (const std::string &bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosNodalKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosBoundaryCondition (const std::string &bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosLinearFVKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosLinearFVBC (const std::string &bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addConstraint (const std::string &c_name, const std::string &name, InputParameters &parameters)
 
virtual void setInputParametersFEProblem (InputParameters &parameters)
 
virtual void addAuxVariable (const std::string &var_type, const std::string &var_name, InputParameters &params)
 Canonical method for adding an auxiliary variable.
 
virtual void addElementalFieldVariable (const std::string &var_type, const std::string &var_name, InputParameters &params)
 Add an elemental field variable for use in the adaptivity system.
 
virtual void addAuxVariable (const std::string &var_name, const libMesh::FEType &type, const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addAuxArrayVariable (const std::string &var_name, const libMesh::FEType &type, unsigned int components, const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addAuxScalarVariable (const std::string &var_name, libMesh::Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addAuxKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addAuxScalarKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosAuxKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
AuxiliarySystem & getAuxiliarySystem ()
 
virtual void addDiracKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addDGKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addLinearFVKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVBC (const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addLinearFVBC (const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVInterfaceKernel (const std::string &fv_ik_name, const std::string &name, InputParameters &parameters)
 
virtual void addInterfaceKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addInitialCondition (const std::string &ic_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVInitialCondition (const std::string &ic_name, const std::string &name, InputParameters &parameters)
 Add an initial condition for a finite volume variables.
 
void projectSolution ()
 
unsigned short getCurrentICState ()
 Retrieves the current initial condition state.
 
void projectInitialConditionOnCustomRange (libMesh::ConstElemRange &elem_range, ConstBndNodeRange &bnd_node_range, const std::optional< std::set< VariableName > > &target_vars=std::nullopt)
 Project initial conditions for custom elem_range and bnd_node_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step.
 
void projectFunctionOnCustomRange (ConstElemRange &elem_range, Number(*func)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &), Gradient(*func_grad)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &), const libMesh::Parameters &params, const std::vector< VariableName > &target_vars)
 Project a function onto a range of elements for a given variable.
 
virtual void addMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addMaterialHelper (std::vector< MaterialWarehouse * > warehouse, const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addInterfaceMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addFunctorMaterial (const std::string &functor_material_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
void prepareMaterials (const std::unordered_set< unsigned int > &consumer_needed_mat_props, const SubdomainID blk_id, const THREAD_ID tid)
 Add the MooseVariables and the material properties that the current materials depend on to the dependency list.
 
void reinitMaterials (SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true)
 
void reinitMaterialsFace (SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase * > *reinit_mats=nullptr)
 reinit materials on element faces
 
void reinitMaterialsFaceOnBoundary (const BoundaryID boundary_id, const SubdomainID blk_id, const THREAD_ID tid, const bool swap_stateful=true, const std::deque< MaterialBase * > *const reinit_mats=nullptr)
 reinit materials on element faces on a boundary (internal or external) This specific routine helps us not reinit when don't need to
 
void reinitMaterialsNeighborOnBoundary (const BoundaryID boundary_id, const SubdomainID blk_id, const THREAD_ID tid, const bool swap_stateful=true, const std::deque< MaterialBase * > *const reinit_mats=nullptr)
 reinit materials on neighbor element (usually faces) on a boundary (internal or external) This specific routine helps us not reinit when don't need to
 
void reinitMaterialsNeighbor (SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase * > *reinit_mats=nullptr)
 reinit materials on the neighboring element face
 
void reinitMaterialsBoundary (BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase * > *reinit_mats=nullptr)
 reinit materials on a boundary
 
void reinitMaterialsInterface (BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true)
 
void prepareKokkosMaterials (const std::unordered_set< unsigned int > &consumer_needed_mat_props)
 
void reinitKokkosMaterials ()
 
virtual void swapBackMaterials (const THREAD_ID tid)
 
virtual void swapBackMaterialsFace (const THREAD_ID tid)
 
virtual void swapBackMaterialsNeighbor (const THREAD_ID tid)
 
void setActiveMaterialProperties (const std::unordered_set< unsigned int > &mat_prop_ids, const THREAD_ID tid)
 Record and set the material properties required by the current computing thread.
 
bool hasActiveMaterialProperties (const THREAD_ID tid) const
 Method to check whether or not a list of active material roperties has been set.
 
void clearActiveMaterialProperties (const THREAD_ID tid)
 Clear the active material properties.
 
template<typename T >
std::vector< std::shared_ptr< T > > addObject (const std::string &type, const std::string &name, InputParameters &parameters, const bool threaded=true, const std::string &var_param_name="variable")
 Method for creating and adding an object to the warehouse.
 
virtual void addPostprocessor (const std::string &pp_name, const std::string &name, InputParameters &parameters)
 
virtual void addVectorPostprocessor (const std::string &pp_name, const std::string &name, InputParameters &parameters)
 
virtual void addReporter (const std::string &type, const std::string &name, InputParameters &parameters)
 Add a Reporter object to the simulation.
 
virtual void addKokkosPostprocessor (const std::string &pp_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosVectorPostprocessor (const std::string &pp_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosReporter (const std::string &type, const std::string &name, InputParameters &parameters)
 
const ReporterData & getReporterData () const
 Provides const access the ReporterData object.
 
ReporterData & getReporterData (ReporterData::WriteKey)
 Provides non-const access the ReporterData object that is used to store reporter values.
 
virtual std::vector< std::shared_ptr< UserObject > > addUserObject (const std::string &user_object_name, const std::string &name, InputParameters &parameters)
 
template<class T >
T & getUserObject (const std::string &name, unsigned int tid=0) const
 Get the user object by its name.
 
const UserObject & getUserObjectBase (const std::string &name, const THREAD_ID tid=0) const
 Get the user object by its name.
 
bool hasUserObject (const std::string &name) const
 Check if there if a user object of given name.
 
virtual void addKokkosUserObject (const std::string &user_object_name, const std::string &name, InputParameters &parameters)
 
template<class T >
const T & getKokkosUserObject (const std::string &name) const
 Get the Kokkos user object by its name.
 
bool hasKokkosUserObject (const std::string &name) const
 Check if there if a Kokkos user object of given name.
 
void checkUserObjectNameCollision (const std::string &name, const std::string &type) const
 Check for name collision between different user objects.
 
const Positions & getPositionsObject (const std::string &name) const
 Get the Positions object by its name.
 
virtual void addFVInterpolationMethod (const std::string &method_type, const std::string &name, InputParameters &parameters)
 Add an FV interpolation method.
 
virtual void addFVGradientMethod (const std::string &method_type, const std::string &name, InputParameters &parameters)
 Add an FV gradient method.
 
FVGradientMethod & getFVGradientMethod (const GradientMethodName &name, const THREAD_ID tid=0)
 Retrieve a writable FV gradient method owned by this problem.
 
const FVGradientMethod & getFVGradientMethod (const GradientMethodName &name, const THREAD_ID tid=0) const
 Retrieve a read-only FV gradient method owned by this problem.
 
bool hasFVGradientMethod (const GradientMethodName &name) const
 Check if an FV gradient method with a given name exists.
 
const FVInterpolationMethod & getFVInterpolationMethod (const InterpolationMethodName &name, const THREAD_ID tid=0) const
 Retrieve an FV interpolation method.
 
const FVFaceInterpolationMethod & getFVFaceInterpolationMethod (const InterpolationMethodName &name, const THREAD_ID tid=0) const
 Retrieve a scalar face interpolation method.
 
const FVAdvectedInterpolationMethod & getFVAdvectedInterpolationMethod (const InterpolationMethodName &name, const THREAD_ID tid=0) const
 Retrieve an advected interpolation method.
 
bool hasFVInterpolationMethod (const InterpolationMethodName &name) const
 Check if an FV interpolation method with a given name exists.
 
bool hasPostprocessorValueByName (const PostprocessorName &name) const
 Whether or not a Postprocessor value exists by a given name.
 
const Postprocessor & getPostprocessorObjectByName (const PostprocessorName &object_name, const THREAD_ID tid=0) const
 Return the Postprocessor object registered under the supplied object name.
 
const PostprocessorValue & getPostprocessorValueByName (const PostprocessorName &name, std::size_t t_index=0) const
 Get a read-only reference to the value associated with a Postprocessor that exists.
 
void setPostprocessorValueByName (const PostprocessorName &name, const PostprocessorValue &value, std::size_t t_index=0)
 Set the value of a PostprocessorValue.
 
bool hasPostprocessor (const std::string &name) const
 Deprecated.
 
const VectorPostprocessorValue & getVectorPostprocessorValueByName (const std::string &object_name, const std::string &vector_name, std::size_t t_index=0) const
 Get a read-only reference to the vector value associated with the VectorPostprocessor.
 
void setVectorPostprocessorValueByName (const std::string &object_name, const std::string &vector_name, const VectorPostprocessorValue &value, std::size_t t_index=0)
 Set the value of a VectorPostprocessor vector.
 
const VectorPostprocessor & getVectorPostprocessorObjectByName (const std::string &object_name, const THREAD_ID tid=0) const
 Return the VPP object given the name.
 
virtual void addDamper (const std::string &damper_name, const std::string &name, InputParameters &parameters)
 
void setupDampers ()
 
bool hasDampers ()
 Whether or not this system has dampers.
 
virtual void addIndicator (const std::string &indicator_name, const std::string &name, InputParameters &parameters)
 
virtual void addMarker (const std::string &marker_name, const std::string &name, InputParameters &parameters)
 
virtual void addMultiApp (const std::string &multi_app_name, const std::string &name, InputParameters &parameters)
 Add a MultiApp to the problem.
 
std::shared_ptr< MultiApp > getMultiApp (const std::string &multi_app_name) const
 Get a MultiApp object by name.
 
std::vector< std::shared_ptr< Transfer > > getTransfers (ExecFlagType type, Transfer::DIRECTION direction) const
 Get Transfers by ExecFlagType and direction.
 
std::vector< std::shared_ptr< Transfer > > getTransfers (Transfer::DIRECTION direction) const
 
const ExecuteMooseObjectWarehouse< Transfer > & getMultiAppTransferWarehouse (Transfer::DIRECTION direction) const
 Return the complete warehouse for MultiAppTransfer object for the given direction.
 
void execMultiAppTransfers (ExecFlagType type, Transfer::DIRECTION direction, const MultiAppName &source_app="")
 Execute MultiAppTransfers associated with execution flag and direction.
 
bool execMultiApps (ExecFlagType type, bool auto_advance=true)
 Execute the MultiApps associated with the ExecFlagType.
 
unsigned int numConcurrentMultiApps () const
 
void partitionConcurrentMultiApps ()
 Assign each multiapp that shares an 'execution_order_group' with others a disjoint subset of the ranks so that they can be solved concurrently (at most one child app per rank at a time).
 
void finalizeMultiApps ()
 
void incrementMultiAppTStep (ExecFlagType type)
 Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType.
 
void advanceMultiApps (ExecFlagType type)
 Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep depending on your purpose.
 
void finishMultiAppStep (ExecFlagType type, bool recurse_through_multiapp_levels=false)
 Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType.
 
void backupMultiApps (ExecFlagType type)
 Backup the MultiApps associated with the ExecFlagType.
 
void restoreMultiApps (ExecFlagType type, bool force=false)
 Restore the MultiApps associated with the ExecFlagType.
 
Real computeMultiAppsDT (ExecFlagType type)
 Find the smallest timestep over all MultiApps.
 
virtual void addTransfer (const std::string &transfer_name, const std::string &name, InputParameters &parameters)
 Add a Transfer to the problem.
 
Real computeResidualL2Norm (NonlinearSystemBase &sys)
 Computes the residual of a nonlinear system using whatever is sitting in the current solution vector then returns the L2 norm.
 
Real computeResidualL2Norm (LinearSystem &sys)
 Computes the residual of a linear system using whatever is sitting in the current solution vector then returns the L2 norm.
 
virtual Real computeResidualL2Norm ()
 Computes the residual using whatever is sitting in the current solution vector then returns the L2 norm.
 
virtual void computeResidualSys (libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual)
 This function is called by Libmesh to form a residual.
 
void computeResidual (libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual)
 This function is called by Libmesh to form a residual.
 
virtual void computeResidual (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, const unsigned int nl_sys_num)
 Form a residual with default tags (nontime, time, residual).
 
void computeResidualAndJacobian (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, libMesh::SparseMatrix< libMesh::Number > &jacobian)
 Form a residual and Jacobian with default tags.
 
virtual void computeResidualTag (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, TagID tag)
 Form a residual vector for a given tag.
 
virtual void computeResidualType (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, TagID tag)
 Form a residual vector for a given tag and "residual" tag.
 
virtual void computeResidualInternal (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, const std::set< TagID > &tags)
 Form a residual vector for a set of tags.
 
virtual void computeResidualTags (const std::set< TagID > &tags)
 Form multiple residual vectors and each is associated with one tag.
 
virtual void computeJacobianSys (libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian)
 Form a Jacobian matrix.
 
virtual void computeJacobian (const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, const unsigned int nl_sys_num)
 Form a Jacobian matrix with the default tag (system).
 
virtual void computeJacobianTag (const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, TagID tag)
 Form a Jacobian matrix for a given tag.
 
virtual void computeJacobianInternal (const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, const std::set< TagID > &tags)
 Form a Jacobian matrix for multiple tags.
 
virtual void computeJacobianTags (const std::set< TagID > &tags)
 Form multiple matrices, and each is associated with a tag.
 
virtual void computeJacobianBlocks (std::vector< JacobianBlock * > &blocks, const unsigned int nl_sys_num)
 Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditioning matrices.
 
virtual void computeJacobianBlock (libMesh::SparseMatrix< libMesh::Number > &jacobian, libMesh::System &precond_system, unsigned int ivar, unsigned int jvar)
 Really not a good idea to use this.
 
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.
 
void computeLinearSystemTags (const NumericVector< libMesh::Number > &soln, const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags, const bool compute_gradients=true)
 Assemble the current linear system given a set of vector and matrix tags.
 
virtual Real computeDamping (const NumericVector< libMesh::Number > &soln, const NumericVector< libMesh::Number > &update)
 
virtual bool shouldUpdateSolution ()
 Check to see whether the problem should update the solution.
 
virtual bool updateSolution (NumericVector< libMesh::Number > &vec_solution, NumericVector< libMesh::Number > &ghosted_solution)
 Update the solution.
 
virtual void predictorCleanup (NumericVector< libMesh::Number > &ghosted_solution)
 Perform cleanup tasks after application of predictor to solution vector.
 
virtual void computeBounds (libMesh::NonlinearImplicitSystem &sys, NumericVector< libMesh::Number > &lower, NumericVector< libMesh::Number > &upper)
 
virtual void computeNearNullSpace (libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > * > &sp)
 
virtual void computeNullSpace (libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > * > &sp)
 
virtual void computeTransposeNullSpace (libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > * > &sp)
 
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)
 
virtual void computeIndicatorsAndMarkers ()
 
virtual void computeIndicators ()
 
virtual void computeMarkers ()
 
virtual void addResidual (const THREAD_ID tid) override
 
virtual void addResidualNeighbor (const THREAD_ID tid) override
 
virtual void addResidualLower (const THREAD_ID tid) override
 
virtual void addResidualScalar (const THREAD_ID tid=0)
 
virtual void cacheResidual (const THREAD_ID tid) override
 
virtual void cacheResidualNeighbor (const THREAD_ID tid) override
 
virtual void addCachedResidual (const THREAD_ID tid) override
 
virtual void addCachedResidualDirectly (NumericVector< libMesh::Number > &residual, const THREAD_ID tid)
 Allows for all the residual contributions that are currently cached to be added directly into the vector passed in.
 
virtual void setResidual (NumericVector< libMesh::Number > &residual, const THREAD_ID tid) override
 
virtual void setResidualNeighbor (NumericVector< libMesh::Number > &residual, const THREAD_ID tid) override
 
virtual void addJacobian (const THREAD_ID tid) override
 
virtual void addJacobianNeighbor (const THREAD_ID tid) override
 
virtual void addJacobianNeighborLowerD (const THREAD_ID tid) override
 
virtual void addJacobianLowerD (const THREAD_ID tid) override
 
virtual void addJacobianBlockTags (libMesh::SparseMatrix< libMesh::Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, const std::set< TagID > &tags, const THREAD_ID tid)
 
virtual void addJacobianNeighbor (libMesh::SparseMatrix< libMesh::Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices, const std::set< TagID > &tags, const THREAD_ID tid) override
 
virtual void addJacobianScalar (const THREAD_ID tid=0)
 
virtual void addJacobianOffDiagScalar (unsigned int ivar, const THREAD_ID tid=0)
 
virtual void cacheJacobian (const THREAD_ID tid) override
 
virtual void cacheJacobianNeighbor (const THREAD_ID tid) override
 
virtual void addCachedJacobian (const THREAD_ID tid) override
 
virtual void prepareShapes (unsigned int var, const THREAD_ID tid) override
 
virtual void prepareFaceShapes (unsigned int var, const THREAD_ID tid) override
 
virtual void prepareNeighborShapes (unsigned int var, const THREAD_ID tid) override
 
virtual void addDisplacedProblem (std::shared_ptr< DisplacedProblem > displaced_problem)
 
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem () const
 
virtual std::shared_ptr< DisplacedProblem > getDisplacedProblem ()
 
virtual void updateGeomSearch (GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
 Update this object's geometric search data as well as the displaced problem's if it exists.
 
virtual void updateMortarMesh ()
 
void createMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced, bool periodic, const bool debug, const bool correct_edge_dropping, const Real minimum_projection_angle, const Mortar3DSubpatchPlane mortar_3d_subpatch_plane, const MooseEnum &triangulation, const bool triangulate_triangles, const Mortar3DQuadraturePointMapping mortar_3d_qp_mapping=Mortar3DQuadraturePointMapping::NORMAL_PROJECTION)
 
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, MortarInterfaceConfig > & getMortarInterfaces (bool on_displaced) const
 
virtual void possiblyRebuildGeomSearchPatches ()
 
virtual GeometricSearchData & geomSearchData () override
 
void setRestartFile (const std::string &file_name)
 Communicate to the Resurector the name of the restart filer.
 
const MaterialPropertyRegistry & getMaterialPropertyRegistry () const
 
const InitialConditionWarehouse & getInitialConditionWarehouse () const
 Return InitialCondition storage.
 
const FVInitialConditionWarehouse & getFVInitialConditionWarehouse () const
 Return FVInitialCondition storage.
 
SolverParams & solverParams (unsigned int solver_sys_num=0)
 Get the solver parameters.
 
const SolverParams & solverParams (unsigned int solver_sys_num=0) const
 const version
 
Adaptivity & adaptivity ()
 
virtual void initialAdaptMesh ()
 
virtual bool adaptMesh ()
 
unsigned int getNumCyclesCompleted ()
 
bool hasInitialAdaptivity () const
 Return a Boolean indicating whether initial AMR is turned on.
 
bool hasInitialAdaptivity () const
 Return a Boolean indicating whether initial AMR is turned on.
 
void initXFEM (std::shared_ptr< XFEMInterface > xfem)
 Create XFEM controller object.
 
std::shared_ptr< XFEMInterface > getXFEM ()
 Get a pointer to the XFEM controller object.
 
bool haveXFEM ()
 Find out whether the current analysis is using XFEM.
 
virtual bool updateMeshXFEM ()
 Update the mesh due to changing XFEM cuts.
 
virtual bool allowMeshContractionAfterMeshChanged () const
 Whether meshChanged() should allow the mesh to be contracted (deletes children of coarsened elements and renumbers nodes and elements).
 
virtual void meshChanged (bool intermediate_change, bool contract_mesh, bool clean_refinement_flags)
 Update data after a mesh change.
 
void notifyWhenMeshChanges (MeshChangedInterface *mci)
 Register an object that derives from MeshChangedInterface to be notified when the mesh changes.
 
void notifyWhenMeshDisplaces (MeshDisplacedInterface *mdi)
 Register an object that derives from MeshDisplacedInterface to be notified when the displaced mesh gets updated.
 
void initElementStatefulProps (const libMesh::ConstElemRange &elem_range, const bool threaded)
 Initialize stateful properties for elements in a specific elem_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step.
 
void initKokkosStatefulProps ()
 
virtual void checkProblemIntegrity ()
 Method called to perform a series of sanity checks before a simulation is run.
 
void registerRandomInterface (RandomInterface &random_interface, const std::string &name)
 
void setConstJacobian (bool state)
 Set flag that Jacobian is constant (for optimization purposes)
 
void setKernelCoverageCheck (CoverageCheckMode mode)
 Set flag to indicate whether kernel coverage checks should be performed.
 
void setKernelCoverageCheck (bool flag)
 Set flag to indicate whether kernel coverage checks should be performed.
 
void setMaterialCoverageCheck (CoverageCheckMode mode)
 Set flag to indicate whether material coverage checks should be performed.
 
void setMaterialCoverageCheck (bool flag)
 Set flag to indicate whether material coverage checks should be performed.
 
void setParallelBarrierMessaging (bool flag)
 Toggle parallel barrier messaging (defaults to on).
 
void setVerboseProblem (bool verbose)
 Make the problem be verbose.
 
bool verboseMultiApps () const
 Whether or not to use verbose printing for MultiApps.
 
void parentOutputPositionChanged ()
 Calls parentOutputPositionChanged() on all sub apps.
 
unsigned int subspaceDim (const std::string &prefix) const
 Dimension of the subspace spanned by vectors with a given prefix.
 
const MooseObjectWarehouse< Function > & getFunctionWarehouse ()
 
const MaterialWarehouse & getMaterialWarehouse () const
 
const MaterialWarehouse & getRegularMaterialsWarehouse () const
 
const MaterialWarehouse & getDiscreteMaterialWarehouse () const
 
const MaterialWarehouse & getInterfaceMaterialsWarehouse () const
 
const MaterialWarehouse & getKokkosMaterialsWarehouse () const
 
std::shared_ptr< MaterialBase > getMaterial (std::string name, Moose::MaterialDataType type, const THREAD_ID tid=0, bool no_warn=false)
 Return a pointer to a MaterialBase object.
 
MaterialData & getMaterialData (Moose::MaterialDataType type, const THREAD_ID tid=0, const MooseObject *object=nullptr) const
 
MaterialData & getKokkosMaterialData (Moose::MaterialDataType type, const MooseObject *object=nullptr) const
 
const std::set< const MooseObject * > & getMaterialPropertyStorageConsumers (Moose::MaterialDataType type) const
 
const std::set< const MooseObject * > & getKokkosMaterialPropertyStorageConsumers (Moose::MaterialDataType type) const
 
bool restoreOriginalNonzeroPattern () const
 
bool errorOnJacobianNonzeroReallocation () const
 Will return True if the user wants to get an error when a nonzero is reallocated in the Jacobian by PETSc.
 
void setErrorOnJacobianNonzeroReallocation (bool state)
 
bool preserveMatrixSparsityPattern () const
 Will return True if the executioner in use requires preserving the sparsity pattern of the matrices being formed during the solve.
 
void setPreserveMatrixSparsityPattern (bool preserve)
 Set whether the sparsity pattern of the matrices being formed during the solve (usually the Jacobian) should be preserved.
 
bool ignoreZerosInJacobian () const
 Will return true if zeros in the Jacobian are to be dropped from the sparsity pattern.
 
void setIgnoreZerosInJacobian (bool state)
 Set whether the zeros in the Jacobian should be dropped from the sparsity pattern.
 
bool acceptInvalidSolution () const
 Whether or not to accept the solution based on its invalidity.
 
bool allowInvalidSolution () const
 Whether to accept / allow an invalid solution.
 
bool showInvalidSolutionConsole () const
 Whether or not to print out the invalid solutions summary table in console.
 
bool immediatelyPrintInvalidSolution () const
 Whether or not the solution invalid warnings are printed out immediately.
 
bool hasTimeIntegrator () const
 Returns whether or not this Problem has a TimeIntegrator.
 
virtual void execute (const ExecFlagType &exec_type)
 Convenience function for performing execution of MOOSE systems.
 
virtual void executeAllObjects (const ExecFlagType &exec_type)
 
virtual Executor & getExecutor (const std::string &name)
 
virtual void computeUserObjects (const ExecFlagType &type, const Moose::AuxGroup &group)
 Call compute methods on UserObjects.
 
virtual void computeUserObjectByName (const ExecFlagType &type, const Moose::AuxGroup &group, const std::string &name)
 Compute an user object with the given name.
 
void needsPreviousNewtonIteration (bool state)
 Set a flag that indicated that user required values for the previous Newton iterate.
 
bool needsPreviousNewtonIteration () const
 Check to see whether we need to compute the variable values of the previous Newton iterate.
 
void needsPreviousMultiAppFixedPointIterationSolution (bool needed, const unsigned int solver_sys_num)
 Set a flag that indicated that user required values for the previous multiapp fixed point iterate for the solver systems (not auxiliary)
 
bool needsPreviousMultiAppFixedPointIterationSolution (const unsigned int solver_sys_num) const
 Check to see whether we need to compute the variable values of the previous multiapp fixed point iteration for the solver systems (not auxiliary)
 
void needsPreviousMultiAppFixedPointIterationAuxiliary (bool state)
 Set a flag that indicated that user required values for the previous multiapp fixed point iterate for the auxiliary system.
 
bool needsPreviousMultiAppFixedPointIterationAuxiliary () const
 Check to see whether we need to compute the variable values of the previous multiapp fixed point iteration for the auxiliary system.
 
void needsPreviousMultiSystemFixedPointIterationSolution (bool needed, const unsigned int solver_sys_num)
 Set a flag that indicates that user requires values for the previous multi-system fixed point iterate for the solver systems (not auxiliary)
 
bool needsPreviousMultiSystemFixedPointIterationSolution (const unsigned int solver_sys_num) const
 Check to see whether we need to compute the variable values of the previous multi-system fixed point iteration for the solver systems (not auxiliary)
 
void needsPreviousMultiSystemFixedPointIterationAuxiliary (bool state)
 Set a flag that indicates that user requires values for the previous multi-system fixed point iterate for the auxiliary system.
 
bool needsPreviousMultiSystemFixedPointIterationAuxiliary () const
 Check to see whether we need to compute the variable values of the previous multi-system fixed point iteration for the auxiliary system.
 
ExecuteMooseObjectWarehouse< Control > & getControlWarehouse ()
 Reference to the control logic warehouse.
 
void executeControls (const ExecFlagType &exec_type)
 Performs setup and execute calls for Control objects.
 
void executeSamplers (const ExecFlagType &exec_type)
 Performs setup and execute calls for Sampler objects.
 
virtual void updateActiveObjects ()
 Update the active objects in the warehouses.
 
void reportMooseObjectDependency (MooseObject *a, MooseObject *b)
 Register a MOOSE object dependency so we can either order operations properly or report when we cannot.
 
ExecuteMooseObjectWarehouse< MultiApp > & getMultiAppWarehouse ()
 
bool hasJacobian () const
 Returns _has_jacobian.
 
bool constJacobian () const
 Returns _const_jacobian (whether a MOOSE object has specified that the Jacobian is the same as the previous time it was computed)
 
void addOutput (const std::string &, const std::string &, InputParameters &)
 Adds an Output object.
 
TheWarehouse & theWarehouse () const
 
void setSNESMFReuseBase (bool reuse, bool set_by_user)
 If or not to reuse the base vector for matrix-free calculation.
 
bool useSNESMFReuseBase ()
 Return a flag that indicates if we are reusing the vector base.
 
void skipExceptionCheck (bool skip_exception_check)
 Set a flag that indicates if we want to skip exception and stop solve.
 
bool isSNESMFReuseBaseSetbyUser ()
 Return a flag to indicate if _snesmf_reuse_base is set by users.
 
bool & petscOptionsInserted ()
 If PETSc options are already inserted.
 
PetscOptions & petscOptionsDatabase ()
 
virtual void setUDotRequested (const bool u_dot_requested)
 Set boolean flag to true to store solution time derivative.
 
virtual void setUDotDotRequested (const bool u_dotdot_requested)
 Set boolean flag to true to store solution second time derivative.
 
virtual void setUDotOldRequested (const bool u_dot_old_requested)
 Set boolean flag to true to store old solution time derivative.
 
virtual void setUDotDotOldRequested (const bool u_dotdot_old_requested)
 Set boolean flag to true to store old solution second time derivative.
 
virtual bool uDotRequested ()
 Get boolean flag to check whether solution time derivative needs to be stored.
 
virtual bool uDotDotRequested ()
 Get boolean flag to check whether solution second time derivative needs to be stored.
 
virtual bool uDotOldRequested ()
 Get boolean flag to check whether old solution time derivative needs to be stored.
 
virtual bool uDotDotOldRequested ()
 Get boolean flag to check whether old solution second time derivative needs to be stored.
 
void haveADObjects (bool have_ad_objects) override
 Method for setting whether we have any ad objects.
 
bool shouldSolve () const
 
const MortarInterfaceWarehouse & mortarData () const
 Returns the mortar data object.
 
MortarInterfaceWarehouse & mortarData ()
 
virtual bool hasNeighborCoupling () const
 Whether the simulation has neighbor coupling.
 
virtual bool hasMortarCoupling () const
 Whether the simulation has mortar coupling.
 
void computingNonlinearResid (bool computing_nonlinear_residual) final
 Set whether or not the problem is in the process of computing the nonlinear residual.
 
void setCurrentlyComputingResidual (bool currently_computing_residual) final
 Set whether or not the problem is in the process of computing the residual.
 
void numGridSteps (unsigned int num_grid_steps)
 Set the number of steps in a grid sequences.
 
void uniformRefine ()
 uniformly refine the problem mesh(es).
 
void automaticScaling (bool automatic_scaling) override
 Automatic scaling setter.
 
virtual void reinitElemFaceRef (const Elem *elem, unsigned int side, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0) override
 reinitialize FE objects on a given element on a given side at a given set of reference points and then compute variable data.
 
virtual void reinitNeighborFaceRef (const Elem *neighbor_elem, unsigned int neighbor_side, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0) override
 reinitialize FE objects on a given neighbor element on a given side at a given set of reference points and then compute variable data.
 
bool fvBCsIntegrityCheck () const
 
bool sideUOInterfaceMatPropIntegrityCheck () const
 
void fvBCsIntegrityCheck (bool fv_bcs_integrity_check)
 
void getFVMatsAndDependencies (SubdomainID block_id, std::vector< std::shared_ptr< MaterialBase > > &face_materials, std::vector< std::shared_ptr< MaterialBase > > &neighbor_materials, std::set< MooseVariableFieldBase * > &variables, const THREAD_ID tid)
 Get the materials and variables potentially needed for FV.
 
void resizeMaterialData (Moose::MaterialDataType data_type, unsigned int nqp, const THREAD_ID tid)
 Resize material data.
 
bool haveDisplaced () const override final
 Whether we have a displaced problem in our simulation.
 
bool hasLinearConvergenceObjects () const
 Whether we have linear convergence objects.
 
void setNonlinearConvergenceNames (const std::vector< ConvergenceName > &convergence_names)
 Sets the nonlinear convergence object name(s) if there is one.
 
void setLinearConvergenceNames (const std::vector< ConvergenceName > &convergence_names)
 Sets the linear convergence object name(s) if there is one.
 
void setMultiAppFixedPointConvergenceName (const ConvergenceName &convergence_name)
 Sets the MultiApp fixed point convergence object name if there is one.
 
void setSteadyStateConvergenceName (const ConvergenceName &convergence_name)
 Sets the steady-state detection convergence object name if there is one.
 
const std::vector< ConvergenceName > & getNonlinearConvergenceNames () const
 Gets the nonlinear system convergence object name(s).
 
const std::vector< ConvergenceName > & getLinearConvergenceNames () const
 Gets the linear convergence object name(s).
 
const ConvergenceName & getMultiAppFixedPointConvergenceName () const
 Gets the MultiApp fixed point convergence object name.
 
const ConvergenceName & getSteadyStateConvergenceName () const
 Gets the steady-state detection convergence object name.
 
void computingScalingJacobian (bool computing_scaling_jacobian)
 Setter for whether we're computing the scaling jacobian.
 
bool computingScalingJacobian () const override final
 Getter for whether we're computing the scaling jacobian.
 
void computingScalingResidual (bool computing_scaling_residual)
 Setter for whether we're computing the scaling residual.
 
bool computingScalingResidual () const override final
 
MooseAppCoordTransform & coordTransform ()
 
virtual std::size_t numNonlinearSystems () const override
 
virtual std::size_t numLinearSystems () const override
 
virtual std::size_t numSolverSystems () const override
 
bool isSolverSystemNonlinear (const unsigned int sys_num)
 Check if the solver system is nonlinear.
 
virtual unsigned int currentNlSysNum () const override
 
virtual unsigned int currentLinearSysNum () const override
 
virtual unsigned int nlSysNum (const NonlinearSystemName &nl_sys_name) const override
 
unsigned int linearSysNum (const LinearSystemName &linear_sys_name) const override
 
unsigned int solverSysNum (const SolverSystemName &solver_sys_name) const override
 
unsigned int systemNumForVariable (const VariableName &variable_name) const
 
bool getFailNextNonlinearConvergenceCheck () const
 Whether it will skip further residual evaluations and fail the next nonlinear convergence check(s)
 
bool getFailNextSystemConvergenceCheck () const
 Whether it will fail the next system convergence check(s), triggering failed step behavior.
 
void setFailNextNonlinearConvergenceCheck ()
 Skip further residual evaluations and fail the next nonlinear convergence check(s)
 
void setFailNextSystemConvergenceCheck ()
 Tell the problem that the system(s) cannot be considered converged next time convergence is checked.
 
void resetFailNextNonlinearConvergenceCheck ()
 Tell the problem that the nonlinear convergence check(s) may proceed as normal.
 
void resetFailNextSystemConvergenceCheck ()
 Tell the problem that the system convergence check(s) may proceed as normal.
 
void setExecutionPrinting (const ExecFlagEnum &print_exec)
 
bool shouldPrintExecution (const THREAD_ID tid) const
 Check whether the problem should output execution orders at this time.
 
void reinitMortarUserObjects (BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced)
 Call reinit on mortar user objects with matching primary boundary ID, secondary boundary ID, and displacement characteristics.
 
virtual const std::vector< VectorTag > & currentResidualVectorTags () const override
 Return the residual vector tags we are currently computing.
 
void setCurrentResidualVectorTags (const std::set< TagID > &vector_tags)
 Set the current residual vector tag data structure based on the passed in tag IDs.
 
void clearCurrentResidualVectorTags ()
 Clear the current residual vector tag data structure.
 
void clearCurrentJacobianMatrixTags ()
 Clear the current Jacobian matrix tag data structure ... if someone creates it.
 
virtual void needFV () override
 marks this problem as including/needing finite volume functionality.
 
virtual bool haveFV () const override
 returns true if this problem includes/needs finite volume functionality.
 
virtual bool hasNonlocalCoupling () const override
 Whether the simulation has active nonlocal coupling which should be accounted for in the Jacobian.
 
bool identifyVariableGroupsInNL () const
 Whether to identify variable groups in nonlinear systems.
 
virtual void setCurrentLowerDElem (const Elem *const lower_d_elem, const THREAD_ID tid) override
 Set the current lower dimensional element.
 
virtual void setCurrentBoundaryID (BoundaryID bid, const THREAD_ID tid) override
 sets the current boundary ID in assembly
 
const std::vector< NonlinearSystemName > & getNonlinearSystemNames () const
 
const std::vector< LinearSystemName > & getLinearSystemNames () const
 
const std::vector< SolverSystemName > & getSolverSystemNames () const
 
virtual const libMesh::CouplingMatrix & nonlocalCouplingMatrix (const unsigned i) const override
 
virtual bool checkNonlocalCouplingRequirement () const override
 
virtual Moose::FEBackend feBackend () const
 
void createTagMatrices (CreateTaggedMatrixKey)
 
bool useHashTableMatrixAssembly () const
 
bool hasKokkosObjects () const
 
bool hasKokkosResidualObjects () const
 
void addKokkosMeshInitializationHook (std::function< void()> function)
 Add a function hook that needs to be called after Kokkos mesh initialization.
 
virtual const MooseVariableFieldBase & getVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const=0
 Returns the variable reference for requested variable which must be of the expected_var_type (Nonlinear vs.
 
virtual MooseVariableFieldBase & getVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY)
 
virtual void haveADObjects (bool have_ad_objects)
 Method for setting whether we have any ad objects.
 
bool haveADObjects () const
 Method for reading wehther we have any ad objects.
 
bool computingNonlinearResid () const
 Returns true if the problem is in the process of computing the nonlinear residual.
 
virtual void computingNonlinearResid (const bool computing_nonlinear_residual)
 Set whether or not the problem is in the process of computing the nonlinear residual.
 
const bool & currentlyComputingResidual () const
 Returns true if the problem is in the process of computing the residual.
 
virtual void automaticScaling (bool automatic_scaling)
 Automatic scaling setter.
 
bool automaticScaling () const
 Automatic scaling getter.
 
THREAD_ID numThreads () const
 
virtual bool nlConverged (const unsigned int nl_sys_num)
 
virtual bool converged (const unsigned int sys_num)
 Eventually we want to convert this virtual over to taking a solver system number argument.
 
bool defaultGhosting ()
 Whether or not the user has requested default ghosting ot be on.
 
virtual TagID addVectorTag (const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
 Create a Tag.
 
void addNotZeroedVectorTag (const TagID tag)
 Adds a vector tag to the list of vectors that will not be zeroed when other tagged vectors are.
 
bool vectorTagNotZeroed (const TagID tag) const
 Checks if a vector tag is in the list of vectors that will not be zeroed when other tagged vectors are.
 
virtual const VectorTag & getVectorTag (const TagID tag_id) const
 Get a VectorTag from a TagID.
 
std::vector< VectorTag > getVectorTags (const std::set< TagID > &tag_ids) const
 
virtual const std::vector< VectorTag > & getVectorTags (const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const
 Return all vector tags, where a tag is represented by a map from name to ID.
 
virtual TagID getVectorTagID (const TagName &tag_name) const
 Get a TagID from a TagName.
 
virtual TagName vectorTagName (const TagID tag) const
 Retrieve the name associated with a TagID.
 
virtual bool vectorTagExists (const TagID tag_id) const
 Check to see if a particular Tag exists.
 
virtual bool vectorTagExists (const TagName &tag_name) const
 Check to see if a particular Tag exists by using Tag name.
 
virtual unsigned int numVectorTags (const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const
 The total number of tags, which can be limited to the tag type.
 
virtual Moose::VectorTagType vectorTagType (const TagID tag_id) const
 
virtual TagID addMatrixTag (TagName tag_name)
 Create a Tag.
 
virtual TagID getMatrixTagID (const TagName &tag_name) const
 Get a TagID from a TagName.
 
virtual TagName matrixTagName (TagID tag)
 Retrieve the name associated with a TagID.
 
virtual bool matrixTagExists (const TagName &tag_name) const
 Check to see if a particular Tag exists.
 
virtual bool matrixTagExists (TagID tag_id) const
 Check to see if a particular Tag exists.
 
virtual unsigned int numMatrixTags () const
 The total number of tags.
 
virtual std::map< TagName, TagID > & getMatrixTags ()
 Return all matrix tags in the system, where a tag is represented by a map from name to ID.
 
virtual bool hasLinearVariable (const std::string &var_name) const
 Whether or not this problem has this linear variable.
 
virtual bool hasAuxiliaryVariable (const std::string &var_name) const
 Whether or not this problem has this auxiliary variable.
 
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables (const THREAD_ID tid) const
 Get the MOOSE variables to be reinited on each element.
 
virtual bool hasActiveElementalMooseVariables (const THREAD_ID tid) const
 Whether or not a list of active elemental moose variables has been set.
 
Moose::CoordinateSystemType getCoordSystem (SubdomainID sid) const
 
unsigned int getAxisymmetricRadialCoord () const
 Returns the desired radial direction for RZ coordinate transformation.
 
virtual DiracKernelInfo & diracKernelInfo ()
 
virtual void setResidual (libMesh::NumericVector< libMesh::Number > &residual, const THREAD_ID tid)=0
 
virtual void setResidualNeighbor (libMesh::NumericVector< libMesh::Number > &residual, const THREAD_ID tid)=0
 
virtual void addJacobianNeighbor (libMesh::SparseMatrix< libMesh::Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices, const std::set< TagID > &tags, const THREAD_ID tid)=0
 
void reinitNodes (const std::vector< dof_id_type > &nodes, const THREAD_ID tid)
 
void reinitNodesNeighbor (const std::vector< dof_id_type > &nodes, const THREAD_ID tid)
 
void reinitNeighborLowerDElem (const Elem *elem, const THREAD_ID tid=0)
 reinitialize a neighboring lower dimensional element
 
void reinitMortarElem (const Elem *elem, const THREAD_ID tid=0)
 Reinit a mortar element to obtain a valid JxW.
 
void reinitGeomSearch ()
 reinitialize this object's geometric search data, e.g.
 
virtual void storeSubdomainMatPropName (SubdomainID block_id, const std::string &name)
 Adds the given material property to a storage map based on block ids.
 
virtual void storeBoundaryMatPropName (BoundaryID boundary_id, const std::string &name)
 Adds the given material property to a storage map based on boundary ids.
 
virtual void storeSubdomainZeroMatProp (SubdomainID block_id, const MaterialPropertyName &name)
 Adds to a map based on block ids of material properties for which a zero value can be returned.
 
virtual void storeBoundaryZeroMatProp (BoundaryID boundary_id, const MaterialPropertyName &name)
 Adds to a map based on boundary ids of material properties for which a zero value can be returned.
 
virtual void storeSubdomainDelayedCheckMatProp (const std::string &requestor, SubdomainID block_id, const std::string &name)
 Adds to a map based on block ids of material properties to validate.
 
virtual void storeBoundaryDelayedCheckMatProp (const std::string &requestor, BoundaryID boundary_id, const std::string &name)
 Adds to a map based on boundary ids of material properties to validate.
 
virtual void checkBlockMatProps ()
 Checks block material properties integrity.
 
virtual void checkBoundaryMatProps ()
 Checks boundary material properties integrity.
 
virtual void markMatPropRequested (const std::string &)
 Helper method for adding a material property name to the _material_property_requested set.
 
virtual bool isMatPropRequested (const std::string &prop_name) const
 Find out if a material property has been requested by any object.
 
void addConsumedPropertyName (const MooseObjectName &obj_name, const std::string &prop_name)
 Helper for tracking the object that is consuming a property for MaterialPropertyDebugOutput.
 
const std::map< MooseObjectName, std::set< std::string > > & getConsumedPropertyMap () const
 Return the map that tracks the object with consumed material properties.
 
virtual std::set< SubdomainID > getMaterialPropertyBlocks (const std::string &prop_name)
 Get a vector containing the block ids the material property is defined on.
 
virtual std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &prop_name)
 Get a vector of block id equivalences that the material property is defined on.
 
virtual bool hasBlockMaterialProperty (SubdomainID block_id, const std::string &prop_name)
 Check if a material property is defined on a block.
 
virtual std::set< BoundaryID > getMaterialPropertyBoundaryIDs (const std::string &prop_name)
 Get a vector containing the block ids the material property is defined on.
 
virtual std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &prop_name)
 Get a vector of block id equivalences that the material property is defined on.
 
virtual bool hasBoundaryMaterialProperty (BoundaryID boundary_id, const std::string &prop_name)
 Check if a material property is defined on a block.
 
virtual std::set< dof_id_type > & ghostedElems ()
 Return the list of elements that should have their DoFs ghosted to this processor.
 
const bool & currentlyComputingJacobian () const
 Returns true if the problem is in the process of computing the Jacobian.
 
void setCurrentlyComputingJacobian (const bool currently_computing_jacobian)
 Set whether or not the problem is in the process of computing the Jacobian.
 
const bool & currentlyComputingResidualAndJacobian () const
 Returns true if the problem is in the process of computing the residual and the Jacobian.
 
void setCurrentlyComputingResidualAndJacobian (bool currently_computing_residual_and_jacobian)
 Set whether or not the problem is in the process of computing the Jacobian.
 
virtual bool safeAccessTaggedMatrices () const
 Is it safe to access the tagged matrices.
 
virtual bool safeAccessTaggedVectors () const
 Is it safe to access the tagged vectors.
 
const std::set< TagID > & getActiveScalarVariableCoupleableVectorTags (const THREAD_ID tid) const
 
const std::set< TagID > & getActiveScalarVariableCoupleableMatrixTags (const THREAD_ID tid) const
 
const std::set< TagID > & getActiveFEVariableCoupleableVectorTags (const THREAD_ID tid) const
 
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags (const THREAD_ID tid) const
 
void addAlgebraicGhostingFunctor (libMesh::GhostingFunctor &algebraic_gf, bool to_mesh=true)
 Add an algebraic ghosting functor to this problem's DofMaps.
 
void addCouplingGhostingFunctor (libMesh::GhostingFunctor &coupling_gf, bool to_mesh=true)
 Add a coupling functor to this problem's DofMaps.
 
void removeAlgebraicGhostingFunctor (libMesh::GhostingFunctor &algebraic_gf)
 Remove an algebraic ghosting functor from this problem's DofMaps.
 
void removeCouplingGhostingFunctor (libMesh::GhostingFunctor &coupling_gf)
 Remove a coupling ghosting functor from this problem's DofMaps.
 
void clearAllDofIndices ()
 Clear dof indices from variables in nl and aux systems.
 
template<typename T >
const Moose::Functor< T > & getFunctor (const std::string &name, const THREAD_ID tid, const std::string &requestor_name, bool requestor_is_ad)
 
bool hasFunctor (const std::string &name, const THREAD_ID tid) const
 checks whether we have a functor corresponding to name on the thread id tid
 
template<typename T >
bool hasFunctorWithType (const std::string &name, const THREAD_ID tid) const
 checks whether we have a functor of type T corresponding to name on the thread id tid
 
template<typename T >
void addFunctor (const std::string &name, const Moose::FunctorBase< T > &functor, const THREAD_ID tid)
 add a functor to the problem functor container
 
template<typename T , typename PolymorphicLambda >
const Moose::FunctorBase< T > & addPiecewiseByBlockLambdaFunctor (const std::string &name, PolymorphicLambda my_lammy, const std::set< ExecFlagType > &clearance_schedule, const MooseMesh &mesh, const std::set< SubdomainID > &block_ids, const THREAD_ID tid)
 Add a functor that has block-wise lambda definitions, e.g.
 
void setFunctorOutput (bool set_output)
 Setter for debug functor output.
 
void setChainControlDataOutput (bool set_output)
 Setter for debug chain control data output.
 
template<typename T >
void registerUnfilledFunctorRequest (T *functor_interface, const std::string &functor_name, const THREAD_ID tid)
 Register an unfulfilled functor request.
 
void reinitFVFace (const THREAD_ID tid, const FaceInfo &fi)
 reinitialize the finite volume assembly data for the provided face and thread
 
void preparePRefinement ()
 Prepare DofMap and Assembly classes with our p-refinement information.
 
bool doingPRefinement () const
 
template<typename T >
MooseVariableFEBase & getVariableHelper (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &systems, const SystemBase &aux) const
 
void _setCLIOption ()
 For Internal Use.
 
virtual void terminateSolve ()
 Allow objects to request clean termination of the solve.
 
virtual bool isSolveTerminationRequested () const
 Check of termination has been requested.
 
const ConsoleStream & console () const
 Return console handle.
 
virtual bool enabled () const
 Return the enabled status of the object.
 
std::shared_ptr< MooseObject > getSharedPtr ()
 Get another shared pointer to this object that has the same ownership group.
 
std::shared_ptr< const MooseObject > getSharedPtr () const
 
bool isKokkosObject () const
 Get whether this object is a Kokkos functor The parameter MooseBase::kokkos_object_param is set by the Kokkos base classes.
 
MooseApp & getMooseApp () const
 Get the MooseApp this class is associated with.
 
const std::string & type () const
 Get the type of this class.
 
const std::string & name () const
 Get the name of the class.
 
std::string typeAndName () const
 Get the class's combined type and name; useful in error handling.
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParameters & parameters () const
 Get the parameters of the object.
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object.
 
template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 Retrieve two parameters and provide pair of parameters for the object.
 
template<typename T >
const T * queryParam (const std::string &name) const
 Query a parameter for the object.
 
template<typename T >
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 Retrieve a renamed parameter for the object.
 
template<typename T >
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller.
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid.
 
bool isParamSetByUser (const std::string &name) const
 Test if the supplied parameter is set by a user, as opposed to not set or set to default.
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 Connect controllable parameter of this action with the controllable parameters of the objects added by this action.
 
template<typename... Args>
void paramError (const std::string &param, Args... args) const
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args) const
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args) const
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args) const
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 Deprecated message prefix; the error type is no longer used.
 
template<typename... Args>
void mooseError (Args &&... args) const
 Emits an error prefixed with object name and type and optionally a file path to the top-level block parameter if available.
 
template<typename... Args>
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
template<typename... Args>
void mooseErrorNonPrefixed (Args &&... args) const
 Emits an error without the prefixing included in mooseError().
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 Emits a warning prefixed with object name and type.
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 Emits a warning without the prefixing included in mooseWarning().
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 Emits a deprecation warning prefixed with the object name and type, and a stack trace.
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseDeprecatedNoTrace (Args &&... args) const
 Emits a deprecation warning prefixed with the object name and type, and no stack trace.
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 External method for calling moose error with added object context.
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
std::string getDataFileName (const std::string &param) const
 Deprecated method.
 
std::string getDataFileNameByName (const std::string &relative_path) const
 Deprecated method.
 
std::string getDataFilePath (const std::string &relative_path) const
 Returns the path of a data file for a given relative file path.
 
PerfGraph & perfGraph ()
 Get the PerfGraph.
 
const libMesh::ConstElemRange & getEvaluableElementRange ()
 In general, {evaluable elements} >= {local elements} U {algebraic ghosting elements}.
 
const libMesh::ConstElemRange & getNonlinearEvaluableElementRange ()
 
const libMesh::ConstElemRange & getCurrentAlgebraicElementRange ()
 These are the element and nodes that contribute to the jacobian and residual for this local processor.
 
const libMesh::ConstNodeRange & getCurrentAlgebraicNodeRange ()
 
const ConstBndNodeRange & getCurrentAlgebraicBndNodeRange ()
 
void setCurrentAlgebraicElementRange (libMesh::ConstElemRange *range)
 These functions allow setting custom ranges for the algebraic elements, nodes, and boundary nodes that contribute to the jacobian and residual for this local processor.
 
void setCurrentAlgebraicNodeRange (libMesh::ConstNodeRange *range)
 
void setCurrentAlgebraicBndNodeRange (ConstBndNodeRange *range)
 
void allowOutput (bool state)
 Ability to enable/disable all output calls.
 
template<typename T >
void allowOutput (bool state)
 
Moose::Kokkos::Array< Moose::Kokkos::System > & getKokkosSystems ()
 Get the Kokkos System array (always populated when any Kokkos object exists)
 
const Moose::Kokkos::Array< Moose::Kokkos::System > & getKokkosSystems () const
 
Moose::Kokkos::Array< Moose::Kokkos::FESystem > & getKokkosFESystems ()
 Get the Kokkos FESystem array (populated only when FE Kokkos objects exist)
 
const Moose::Kokkos::Array< Moose::Kokkos::FESystem > & getKokkosFESystems () const
 
Moose::Kokkos::System & getKokkosSystem (const unsigned int sys_num)
 Get the Kokkos System of a specified number.
 
const Moose::Kokkos::System & getKokkosSystem (const unsigned int sys_num) const
 
Moose::Kokkos::FESystem & getKokkosFESystem (const unsigned int sys_num)
 Get the Kokkos FESystem of a specified number.
 
const Moose::Kokkos::FESystem & getKokkosFESystem (const unsigned int sys_num) const
 
bool hasMultiApps () const
 Returns whether or not the current simulation has any multiapps.
 
bool hasMultiApps (ExecFlagType type) const
 
bool hasMultiApp (const std::string &name) const
 
const AutomaticMortarGeneration & getMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced) const
 Return the undisplaced or displaced mortar generation object associated with the provided boundaries and subdomains.
 
AutomaticMortarGeneration & getMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced)
 
const MaterialPropertyStorage & getMaterialPropertyStorage ()
 Return a reference to the material property storage.
 
const MaterialPropertyStorage & getBndMaterialPropertyStorage ()
 
const MaterialPropertyStorage & getNeighborMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStorage & getKokkosMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStorage & getKokkosBndMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStorage & getKokkosNeighborMaterialPropertyStorage ()
 
const MooseObjectWarehouse< Indicator > & getIndicatorWarehouse ()
 Return indicator/marker storage.
 
const MooseObjectWarehouse< InternalSideIndicatorBase > & getInternalSideIndicatorWarehouse ()
 
const MooseObjectWarehouse< Marker > & getMarkerWarehouse ()
 
bool needBoundaryMaterialOnSide (BoundaryID bnd_id, const THREAD_ID tid)
 These methods are used to determine whether stateful material properties need to be stored on internal sides.
 
bool needInterfaceMaterialOnSide (BoundaryID bnd_id, const THREAD_ID tid)
 
bool needInternalNeighborSideMaterial (SubdomainID subdomain_id, const THREAD_ID tid)
 
const ExecFlagType & getCurrentExecuteOnFlag () const
 Return/set the current execution flag.
 
void setCurrentExecuteOnFlag (const ExecFlagType &)
 

Static Public Member Functions

static InputParameters validParams ()
 
static void selectVectorTagsFromSystem (const SystemBase &system, const std::vector< VectorTag > &input_vector_tags, std::set< TagID > &selected_tags)
 Select the vector tags which belong to a specific system.
 
static void selectMatrixTagsFromSystem (const SystemBase &system, const std::map< TagName, TagID > &input_matrix_tags, std::set< TagID > &selected_tags)
 Select the matrix tags which belong to a specific system.
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 External method for calling moose error with added object context.
 
template<typename T >
static void objectSetupHelper (const std::vector< T * > &objects, const ExecFlagType &exec_flag)
 Helpers for calling the necessary setup/execute functions for the supplied objects.
 
template<typename T >
static void objectExecuteHelper (const std::vector< T * > &objects)
 

Public Attributes

std::map< std::string, std::vector< dof_id_type > > _var_dof_map
 
 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 An instance of helper class to write streams to the Console objects.
 
std::vector< Real > _real_zero
 Convenience zeros.
 
std::vector< VariableValue > _scalar_zero
 
std::vector< VariableValue > _zero
 
std::vector< VariablePhiValue > _phi_zero
 
std::vector< MooseArray< ADReal > > _ad_zero
 
std::vector< VariableGradient > _grad_zero
 
std::vector< MooseArray< ADRealVectorValue > > _ad_grad_zero
 
std::vector< VariablePhiGradient > _grad_phi_zero
 
std::vector< VariableSecond > _second_zero
 
std::vector< MooseArray< ADRealTensorValue > > _ad_second_zero
 
std::vector< VariablePhiSecond > _second_phi_zero
 
std::vector< Point > _point_zero
 
std::vector< VectorVariableValue > _vector_zero
 
std::vector< VectorVariableCurl > _vector_curl_zero
 

Static Public Attributes

static const std::string type_param = "_type"
 The name of the parameter that contains the object type.
 
static const std::string name_param = "_object_name"
 The name of the parameter that contains the object name.
 
static const std::string unique_name_param = "_unique_name"
 The name of the parameter that contains the unique object name.
 
static const std::string app_param = "_moose_app"
 The name of the parameter that contains the MooseApp.
 
static const std::string moose_base_param = "_moose_base"
 The name of the parameter that contains the moose system base.
 
static const std::string kokkos_object_param = "_kokkos_object"
 The name of the parameter that indicates an object is a Kokkos functor.
 

Protected Member Functions

virtual void meshChanged ()
 Deprecated.
 
void createTagVectors ()
 Create extra tagged vectors and matrices.
 
void createTagSolutions ()
 Create extra tagged solution vectors.
 
virtual void meshDisplaced ()
 Update data after a mesh displaced.
 
void computeSystems (const ExecFlagType &type)
 Do generic system computations.
 
bool duplicateVariableCheck (const std::string &var_name, const libMesh::FEType &type, bool is_aux, const std::set< SubdomainID > *const active_subdomains)
 Helper to check for duplicate variable names across systems or within a single system.
 
void computeUserObjectsInternal (const ExecFlagType &type, TheWarehouse::Query &query)
 
void computeKokkosUserObjectsInternal (const ExecFlagType &type, TheWarehouse::Query &query)
 
void checkDisplacementOrders ()
 Verify that SECOND order mesh uses SECOND order displacements.
 
void checkUserObjects ()
 
void checkGradientMethods ()
 Let every FVGradientMethod resolve its dependencies on other gradient methods.
 
void checkDependMaterialsHelper (const std::map< SubdomainID, std::vector< std::shared_ptr< MaterialBase > > > &materials_map)
 Helper method for checking Material object dependency.
 
void checkCoordinateSystems ()
 Verify that there are no element type/coordinate type conflicts.
 
void reinitBecauseOfGhostingOrNewGeomObjects (bool mortar_changed=false)
 Call when it is possible that the needs for ghosted elements has changed.
 
void addObjectParamsHelper (InputParameters &params, const std::string &object_name, const std::string &var_param_name="variable")
 Helper for setting the "_subproblem" and "_sys" parameters in addObject() and in addUserObject().
 
template<typename T >
MooseVariableFieldBase & getVariableHelper (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &nls, const SystemBase &aux) const
 Helper function called by getVariable that handles the logic for checking whether Variables of the requested type are available.
 
bool verifyVectorTags () const
 Verify the integrity of _vector_tags and _typed_vector_tags.
 
template<bool warning>
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 Set solution invalid mark for the given solution ID.
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 Call to register a named section for timing.
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 Call to register a named section for timing.
 
std::string timedSectionName (const std::string &section_name) const
 
template<typename T , typename... Args>
T & declareRestartableData (const std::string &data_name, Args &&... args)
 Declare a piece of data as "restartable" and initialize it.
 
template<typename T , typename... Args>
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 Declares a piece of "managed" restartable data and initialize it.
 
template<typename T , typename... Args>
const T & getRestartableData (const std::string &data_name) const
 Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData but returns a const reference to the object.
 
template<typename T , typename... Args>
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 Declare a piece of data as "restartable" and initialize it.
 
template<typename T , typename... Args>
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 Declare a piece of data as "recoverable" and initialize it.
 
template<typename T , typename... Args>
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 Declare a piece of data as "restartable".
 
template<typename T , typename... Args>
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 Declare a piece of data as "restartable".
 
std::string restartableName (const std::string &data_name) const
 Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix.
 

Protected Attributes

MooseMesh & _mesh
 
bool _initialized
 
std::optional< std::vector< ConvergenceName > > _nonlinear_convergence_names
 Nonlinear system(s) convergence name(s)
 
std::optional< std::vector< ConvergenceName > > _linear_convergence_names
 Linear system(s) convergence name(s) (if any)
 
std::optional< ConvergenceName > _multiapp_fixed_point_convergence_name
 MultiApp fixed point convergence name.
 
std::optional< ConvergenceName > _steady_state_convergence_name
 Steady-state detection convergence name.
 
std::set< TagID > _fe_vector_tags
 
std::set< TagID > _fe_matrix_tags
 
std::set< TagID > _linear_vector_tags
 Temporary storage for filtered vector tags for linear systems.
 
std::set< TagID > _linear_matrix_tags
 Temporary storage for filtered matrix tags for linear systems.
 
const bool & _solve
 Whether or not to actually solve the nonlinear system.
 
bool _transient
 
Real & _time
 
Real & _time_old
 
Real & _time_older
 
int & _t_step
 
Real & _dt
 
Real & _dt_old
 
bool _need_to_add_default_nonlinear_convergence
 Flag that the problem needs to add the default nonlinear convergence.
 
bool _need_to_add_default_multiapp_fixed_point_convergence
 Flag that the problem needs to add the default fixed point convergence.
 
bool _need_to_add_default_steady_state_convergence
 Flag that the problem needs to add the default steady convergence.
 
const std::vector< LinearSystemName > _linear_sys_names
 The linear system names.
 
const std::size_t _num_linear_sys
 The number of linear systems.
 
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
 The vector of linear systems.
 
std::map< LinearSystemName, unsigned int > _linear_sys_name_to_num
 Map from linear system name to number.
 
LinearSystem * _current_linear_sys
 The current linear system that we are solving.
 
const bool _using_default_nl
 Boolean to check if we have the default nonlinear system.
 
const std::vector< NonlinearSystemName > _nl_sys_names
 The nonlinear system names.
 
const std::size_t _num_nl_sys
 The number of nonlinear systems.
 
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
 The nonlinear systems.
 
std::map< NonlinearSystemName, unsigned int > _nl_sys_name_to_num
 Map from nonlinear system name to number.
 
NonlinearSystemBase * _current_nl_sys
 The current nonlinear system that we are solving.
 
SolverSystem * _current_solver_sys
 The current solver system.
 
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
 Combined container to base pointer of every solver system.
 
std::map< SolverVariableName, unsigned int > _solver_var_to_sys_num
 Map connecting variable names with their respective solver systems.
 
std::map< SolverSystemName, unsigned int > _solver_sys_name_to_num
 Map connecting solver system names with their respective systems.
 
std::vector< SolverSystemName > _solver_sys_names
 The union of nonlinear and linear system names.
 
std::shared_ptr< AuxiliarySystem > _aux
 The auxiliary system.
 
Moose::CouplingType _coupling
 Type of variable coupling.
 
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
 Coupling matrix for variables.
 
Moose::Kokkos::Array< Moose::Kokkos::System > _kokkos_systems
 System array - sparsely populated (only slots for systems needing a Kokkos::System)
 
Moose::Kokkos::Array< Moose::Kokkos::FESystem > _kokkos_fe_systems
 FESystem array - sparsely populated (only slots for systems needing a Kokkos::FESystem)
 
std::map< std::string, unsigned int > _subspace_dim
 Dimension of the subspace spanned by the vectors with a given prefix.
 
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
 The Assembly objects.
 
Moose::Kokkos::Assembly _kokkos_assembly
 
MooseObjectWarehouse< MeshDivision > _mesh_divisions
 Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the Problem Time (and people's uses) will tell where this fits best.
 
MooseObjectWarehouse< Function > _functions
 functions
 
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
 
MooseObjectWarehouse< Convergence > _convergences
 convergence warehouse
 
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
 nonlocal kernels
 
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
 nonlocal integrated_bcs
 
MaterialPropertyRegistry _material_prop_registry
 
MaterialPropertyStorage & _material_props
 
MaterialPropertyStorage & _bnd_material_props
 
MaterialPropertyStorage & _neighbor_material_props
 
Moose::Kokkos::MaterialPropertyStorage & _kokkos_material_props
 
Moose::Kokkos::MaterialPropertyStorage & _kokkos_bnd_material_props
 
Moose::Kokkos::MaterialPropertyStorage & _kokkos_neighbor_material_props
 
MooseObjectWarehouse< Marker > _markers
 
ReporterData _reporter_data
 
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
 MultiApp Warehouse.
 
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
 Storage for TransientMultiApps (only needed for calling 'computeDT')
 
ExecuteMooseObjectWarehouse< Transfer > _transfers
 Normal Transfers.
 
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
 Transfers executed just before MultiApps to transfer data to them.
 
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
 Transfers executed just after MultiApps to transfer data from them.
 
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
 Transfers executed just before MultiApps to transfer data between them.
 
const unsigned int _num_concurrent_multiapps
 Number of concurrent applications being solved at the same time.
 
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
 A map of objects that consume random numbers.
 
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
 Cache for calculating materials on side.
 
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
 Cache for calculating materials on side.
 
std::vector< std::unordered_map< BoundaryID, bool > > _interface_mat_side_cache
 Cache for calculating materials on interface.
 
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
 Objects to be notified when the mesh changes.
 
std::vector< MeshDisplacedInterface * > _notify_when_mesh_displaces
 Objects to be notified when the mesh displaces.
 
Adaptivity _adaptivity
 
unsigned int _cycles_completed
 
std::shared_ptr< XFEMInterface > _xfem
 Pointer to XFEM controller.
 
MooseMesh * _displaced_mesh
 
std::shared_ptr< DisplacedProblem > _displaced_problem
 
GeometricSearchData _geometric_search_data
 
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
 
bool _reinit_displaced_elem
 Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
 
bool _reinit_displaced_face
 Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
 
bool _reinit_displaced_neighbor
 Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
 
bool _input_file_saved
 whether input file has been written
 
bool _has_dampers
 Whether or not this system has any Dampers associated with it.
 
bool _has_constraints
 Whether or not this system has any Constraints.
 
bool _snesmf_reuse_base
 If or not to resuse the base vector for matrix-free calculation.
 
bool _skip_exception_check
 If or not skip 'exception and stop solve'.
 
bool _snesmf_reuse_base_set_by_user
 If or not _snesmf_reuse_base is set by user.
 
bool _has_initialized_stateful
 Whether nor not stateful materials have been initialized.
 
bool _const_jacobian
 true if the Jacobian is constant
 
bool _has_jacobian
 Indicates if the Jacobian was computed.
 
bool _needs_old_newton_iter
 Indicates that we need to compute variable values for previous Newton iteration.
 
bool _previous_nl_solution_required
 Indicates we need to save the previous NL iteration variable values.
 
std::vector< bool > _previous_multiapp_fp_nl_solution_required
 Indicates we need to save the previous multiapp fixed-point iteration solver variable values.
 
bool _previous_multiapp_fp_aux_solution_required
 Indicates we need to save the previous multiapp fixed-point iteration auxiliary variable values.
 
std::vector< bool > _previous_multisystem_fp_nl_solution_required
 Indicates we need to save the previous multi-system fixed-point iteration solver variable values.
 
bool _previous_multisystem_fp_aux_solution_required
 Indicates we need to save the previous multi-system fixed-point iteration auxiliary variable values.
 
bool _has_nonlocal_coupling
 Indicates if nonlocal coupling is required/exists.
 
bool _calculate_jacobian_in_uo
 
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
 
std::vector< unsigned char > _has_active_material_properties
 Whether there are active material properties on each thread.
 
std::vector< SolverParams > _solver_params
 
CoverageCheckMode _kernel_coverage_check
 Determines whether and which subdomains are to be checked to ensure that they have an active kernel.
 
std::vector< SubdomainName > _kernel_coverage_blocks
 
const bool _boundary_restricted_node_integrity_check
 whether to perform checking of boundary restricted nodal object variable dependencies, e.g.
 
const bool _boundary_restricted_elem_integrity_check
 whether to perform checking of boundary restricted elemental object variable dependencies, e.g.
 
const bool _side_uo_interface_mat_prop_integrity_check
 Whether to check that side user objects do not consume interface material properties.
 
CoverageCheckMode _material_coverage_check
 Determines whether and which subdomains are to be checked to ensure that they have an active material.
 
std::vector< SubdomainName > _material_coverage_blocks
 
bool _fv_bcs_integrity_check
 Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset.
 
const bool _fv_face_integrity_check
 Whether to check FV boundary and interface objects against the faces on which they execute.
 
const bool _material_dependency_check
 Determines whether a check to verify material dependencies on every subdomain.
 
const bool _uo_aux_state_check
 Whether or not checking the state of uo/aux evaluation.
 
bool _check_residual_for_nans
 Whether to check the residual for NaN or Inf values.
 
unsigned int _max_qps
 Maximum number of quadrature points used in the problem.
 
libMesh::Order _max_scalar_order
 Maximum scalar variable order.
 
bool _has_time_integrator
 Indicates whether or not this executioner has a time integrator (during setup)
 
bool _has_exception
 Whether or not an exception has occurred.
 
bool _parallel_barrier_messaging
 Whether or not information about how many transfers have completed is printed.
 
MooseEnum _verbose_setup
 Whether or not to be verbose during setup.
 
bool _verbose_multiapps
 Whether or not to be verbose with multiapps.
 
bool _verbose_restore
 Whether or not to be verbose on solution restoration post a failed time step.
 
std::string _exception_message
 The error message to go with an exception.
 
ExecFlagType _current_execute_on_flag
 Current execute_on flag.
 
ExecuteMooseObjectWarehouse< Control > _control_warehouse
 The control logic warehouse.
 
Moose::PetscSupport::PetscOptions _petsc_options
 PETSc option storage.
 
PetscOptions _petsc_option_data_base
 
bool _is_petsc_options_inserted
 If or not PETSc options have been added to database.
 
std::shared_ptr< LineSearch > _line_search
 
std::unique_ptr< libMesh::ConstElemRange > _evaluable_local_elem_range
 
std::unique_ptr< libMesh::ConstElemRange > _nl_evaluable_local_elem_range
 
std::unique_ptr< libMesh::ConstElemRange > _aux_evaluable_local_elem_range
 
std::unique_ptr< libMesh::ConstElemRange > _current_algebraic_elem_range
 
std::unique_ptr< libMesh::ConstNodeRange > _current_algebraic_node_range
 
std::unique_ptr< ConstBndNodeRange > _current_algebraic_bnd_node_range
 
bool _using_ad_mat_props
 Automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material property or whether any suppier has declared an AD material property.
 
unsigned short _current_ic_state
 
const bool _use_hash_table_matrix_assembly
 Whether to assemble matrices using hash tables instead of preallocating matrix memory.
 
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
 The currently declared tags.
 
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
 Reverse map.
 
Factory & _factory
 The Factory for building objects.
 
DiracKernelInfo _dirac_kernel_info
 
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
 Map of material properties (block_id -> list of properties)
 
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
 Map for boundary material properties (boundary_id -> list of properties)
 
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
 Set of properties returned as zero properties.
 
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
 
std::set< std::string > _material_property_requested
 set containing all material property names that have been requested by getMaterialProperty*
 
std::vector< std::set< MooseVariableFieldBase * > > _active_elemental_moose_variables
 This is the set of MooseVariableFieldBase that will actually get reinited by a call to reinit(elem)
 
std::vector< unsigned int > _has_active_elemental_moose_variables
 Whether or not there is currently a list of active elemental moose variables.
 
std::vector< std::set< TagID > > _active_fe_var_coupleable_matrix_tags
 
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags
 
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags
 
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
 
bool _default_ghosting
 Whether or not to use default libMesh coupling.
 
std::set< dof_id_type > _ghosted_elems
 Elements that should have Dofs ghosted to the local processor.
 
bool _currently_computing_jacobian
 Flag to determine whether the problem is currently computing Jacobian.
 
bool _currently_computing_residual_and_jacobian
 Flag to determine whether the problem is currently computing the residual and Jacobian.
 
bool _computing_nonlinear_residual
 Whether the non-linear residual is being evaluated.
 
bool _currently_computing_residual
 Whether the residual is being evaluated.
 
bool _safe_access_tagged_matrices
 Is it safe to retrieve data from tagged matrices.
 
bool _safe_access_tagged_vectors
 Is it safe to retrieve data from tagged vectors.
 
bool _have_ad_objects
 AD flag indicating whether any AD objects have been added.
 
std::unordered_set< TagID > _not_zeroed_tagged_vectors
 the list of vector tags that will not be zeroed when all other tags are
 
bool _cli_option_found
 True if the CLI option is found.
 
bool _color_output
 True if we're going to attempt to write color output.
 
bool _termination_requested
 True if termination of the solve has been requested.
 
const bool & _enabled
 Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects.
 
MooseApp & _app
 The MOOSE application this is associated with.
 
ActionFactory & _action_factory
 Builds Actions.
 
const std::string & _type
 The type of this class.
 
const std::string & _name
 The name of this class.
 
const InputParameters & _pars
 The object's parameters.
 
const Parallel::Communicator & _communicator
 
MooseApp & _pg_moose_app
 The MooseApp that owns the PerfGraph.
 
const std::string _prefix
 A prefix to use for all sections.
 
MooseApp & _restartable_app
 Reference to the application.
 
const std::string _restartable_system_name
 The system name this object is in.
 
const THREAD_ID _restartable_tid
 The thread ID for this object.
 
const bool _restartable_read_only
 Flag for toggling read only status (see ReporterData)
 
InitialConditionWarehouse _ics
 
FVInitialConditionWarehouse _fv_ics
 
ScalarInitialConditionWarehouse _scalar_ics
 
MaterialWarehouse _materials
 
MaterialWarehouse _interface_materials
 
MaterialWarehouse _discrete_materials
 
MaterialWarehouse _all_materials
 
MaterialWarehouse _kokkos_materials
 
MooseObjectWarehouse< Indicator > _indicators
 
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators
 
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
 Data structures of the requested material properties.
 
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
 

Private Types

enum class  TrueFunctorIs { UNSET , NONAD , AD }
 

Private Member Functions

void setResidualObjectParamsAndLog (const std::string &ro_name, const std::string &name, InputParameters &parameters, const unsigned int nl_sys_num, const std::string &base_name, bool &reinit_displaced)
 Set the subproblem and system parameters for residual objects and log their addition.
 
void setAuxKernelParamsAndLog (const std::string &ak_name, const std::string &name, InputParameters &parameters, const std::string &base_name)
 Set the subproblem and system parameters for auxiliary kernels and log their addition.
 
TheWarehouse::Query getUOQuery (const std::string &system, const ExecFlagType &type, const Moose::AuxGroup &group) const
 
void getUOExecutionGroups (TheWarehouse::Query &query, std::set< int > &execution_groups) const
 
void handleException (const std::string &calling_method)
 Handle exceptions.
 
std::vector< MortarUserObject * > getMortarUserObjects (BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced, const std::vector< MortarUserObject * > &mortar_uo_superset)
 Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID, and displaced parameters, given some initial set.
 
std::vector< MortarUserObject * > getMortarUserObjects (BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced)
 Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID, and displaced parameters from the entire active mortar user object set.
 
virtual std::pair< bool, unsigned int > determineSolverSystem (const std::string &var_name, bool error_if_not_found=false) const override
 Determine what solver system the provided variable name lies in.
 
void checkICRestartError (const std::string &ic_name, const std::string &name, const VariableName &var_name)
 Checks if the variable of the initial condition is getting restarted and errors for specific cases.
 
void addAnyRedistributers ()
 
void updateMaxQps ()
 
void joinAndFinalize (TheWarehouse::Query query, bool isgen=false)
 
void kokkosJoinAndFinalize (const std::vector< Moose::Kokkos::UserObject * > &userobjs)
 
virtual void resetState ()
 Reset state of this object in preparation for the next evaluation.
 
void cloneAlgebraicGhostingFunctor (libMesh::GhostingFunctor &algebraic_gf, bool to_mesh=true)
 Creates (n_sys - 1) clones of the provided algebraic ghosting functor (corresponding to the nonlinear system algebraic ghosting functor), initializes the clone with the appropriate DofMap, and then adds the clone to said DofMap.
 
void cloneCouplingGhostingFunctor (libMesh::GhostingFunctor &coupling_gf, bool to_mesh=true)
 Creates (n_sys - 1) clones of the provided coupling ghosting functor (corresponding to the nonlinear system coupling ghosting functor), initializes the clone with the appropriate DofMap, and then adds the clone to said DofMap.
 
void showFunctors () const
 Lists all functors in the problem.
 
void showFunctorRequestors () const
 Lists all functors and all the objects that requested them.
 
RestartableDataValue & registerRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
 Helper function for actually registering the restartable data.
 
void registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 Helper function for actually registering the restartable data.
 
template<typename T , typename... Args>
RestartableData< T > & declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const
 Helper function for declaring restartable data.
 
std::string restrictionSubdomainCheckName (SubdomainID check_id)
 Helper functions for checking MaterialProperties.
 
std::string restrictionBoundaryCheckName (BoundaryID check_id)
 

Static Private Member Functions

static SolverParams makeLinearSolverParams ()
 Make basic solver params for linear solves.
 
static const hit::Node * getHitNode (const InputParameters &params)
 Internal method for getting a hit node (if available) given a set of parameters.
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 Internal method for getting the message prefix for an object (object type, name, etc).
 

Private Attributes

Restartable::ManagedValue< RestartableEquationSystems > _req
 The EquationSystems object, wrapped for restart.
 
bool _error_on_jacobian_nonzero_reallocation
 Whether to error when the Jacobian is re-allocated, usually because the sparsity pattern changed.
 
const bool _restore_original_nonzero_pattern
 Whether we should restore the original nonzero pattern for every Jacobian evaluation.
 
bool _ignore_zeros_in_jacobian
 Whether to ignore zeros in the Jacobian, thereby leading to a reduced sparsity pattern.
 
bool _preserve_matrix_sparsity_pattern
 Whether to preserve the system matrix / Jacobian sparsity pattern, using 0-valued entries usually.
 
const bool _force_restart
 
const bool _allow_ics_during_restart
 
const bool _skip_nl_system_check
 
bool _fail_next_system_convergence_check
 
const bool _allow_invalid_solution
 
const bool _show_invalid_solution_console
 
const bool & _immediately_print_invalid_solution
 
bool _started_initial_setup
 At or beyond initialSteup stage.
 
bool _has_internal_edge_residual_objects
 Whether the problem has dgkernels or interface kernels.
 
bool _u_dot_requested
 Whether solution time derivative needs to be stored.
 
bool _u_dotdot_requested
 Whether solution second time derivative needs to be stored.
 
bool _u_dot_old_requested
 Whether old solution time derivative needs to be stored.
 
bool _u_dotdot_old_requested
 Whether old solution second time derivative needs to be stored.
 
bool _has_mortar
 Whether the simulation requires mortar coupling.
 
unsigned int _num_grid_steps
 Number of steps in a grid sequence.
 
bool _trust_user_coupling_matrix = false
 Whether to trust the user coupling matrix no matter what.
 
bool _computing_scaling_jacobian = false
 Flag used to indicate whether we are computing the scaling Jacobian.
 
bool _computing_scaling_residual = false
 Flag used to indicate whether we are computing the scaling Residual.
 
bool _checking_uo_aux_state = false
 Flag used to indicate whether we are doing the uo/aux state check in execute.
 
ExecFlagEnum _print_execution_on
 When to print the execution of loops.
 
const bool _identify_variable_groups_in_nl
 Whether to identify variable groups in nonlinear systems. This affects dof ordering.
 
std::vector< VectorTag > _current_residual_vector_tags
 A data member to store the residual vector tag(s) passed into computeResidualTag(s).
 
bool _have_fv = false
 Whether we are performing some calculations with finite volume discretizations.
 
const bool _regard_general_exceptions_as_errors
 If we catch an exception during residual/Jacobian evaluaton for which we don't have specific handling, immediately error instead of allowing the time step to be cut.
 
std::vector< libMesh::CouplingMatrix > _nonlocal_cm
 nonlocal coupling matrix
 
bool _requires_nonlocal_coupling
 nonlocal coupling requirement flag
 
bool _has_kokkos_objects = false
 Whether we have any Kokkos objects.
 
bool _has_kokkos_residual_objects = false
 Whether we have any Kokkos residual objects.
 
std::vector< std::function< void()> > _kokkos_mesh_initialization_hooks
 Container holding hooks for functions that need to be called after Kokkos mesh initialization.
 
std::vector< std::multimap< std::string, std::tuple< TrueFunctorIs, std::unique_ptr< Moose::FunctorEnvelopeBase >, std::unique_ptr< Moose::FunctorEnvelopeBase > > > > _functors
 A container holding pointers to all the functors in our problem.
 
std::vector< std::map< std::string, std::unique_ptr< Moose::FunctorAbstract > > > _pbblf_functors
 Container to hold PiecewiseByBlockLambdaFunctors.
 
std::map< std::string, std::set< std::string > > _functor_to_requestors
 The requestors of functors where the key is the prop name and the value is a set of names of requestors.
 
std::vector< std::multimap< std::string, std::pair< bool, bool > > > _functor_to_request_info
 A multimap (for each thread) from unfilled functor requests to whether the requests were for AD functors and whether the requestor was an AD object.
 
bool _show_functors
 Whether to output a list of the functors used and requested (currently only at initialSetup)
 
bool _show_chain_control_data
 Whether to output a list of all the chain control data.
 
std::vector< VectorTag > _vector_tags
 The declared vector tags.
 
std::vector< std::vector< VectorTag > > _typed_vector_tags
 The vector tags associated with each VectorTagType This is kept separate from _vector_tags for quick access into typed vector tags in places where we don't want to build a new vector every call (like in residual evaluation)
 
std::map< TagName, TagID > _vector_tags_name_map
 Map of vector tag TagName to TagID.
 
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
 
std::unordered_map< libMesh::GhostingFunctor *, std::vector< std::shared_ptr< libMesh::GhostingFunctor > > > _root_alg_gf_to_sys_clones
 A map from a root algebraic ghosting functor, e.g.
 
std::unordered_map< libMesh::GhostingFunctor *, std::vector< std::shared_ptr< libMesh::GhostingFunctor > > > _root_coupling_gf_to_sys_clones
 A map from a root coupling ghosting functor, e.g.
 
const ParallelParamObject & _parent
 
const MooseBase & _si_moose_base
 The MooseBase that owns this interface.
 
const FEProblemBase * _si_problem
 A pointer to FEProblem base.
 
const RestartableDataMapName _metaname
 Restartable metadata name.
 
std::string _restartable_name
 The name of the object.
 

Friends

class AuxiliarySystem
 
class NonlinearSystemBase
 
class MooseEigenSystem
 
class Resurrector
 
class Restartable
 
class DisplacedProblem
 
void Moose::PetscSupport::setSinglePetscOption (const std::string &name, const std::string &value, FEProblemBase *const problem)
 

Detailed Description

Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.

Definition at line 158 of file FEProblemBase.h.

Member Typedef Documentation

◆ DataFileParameterType

using DataFileInterface::DataFileParameterType = DataFileName
inherited

The parameter type this interface expects for a data file name.

Definition at line 27 of file DataFileInterface.h.

Member Enumeration Documentation

◆ CoverageCheckMode

◆ TrueFunctorIs

enum class SubProblem::TrueFunctorIs
strongprivateinherited
Enumerator
UNSET 
NONAD 
AD 

Definition at line 1130 of file SubProblem.h.

Constructor & Destructor Documentation

◆ FEProblemBase()

FEProblemBase::FEProblemBase ( const InputParameters &  parameters)

Definition at line 422 of file FEProblemBase.C.

424 Restartable(this, "FEProblemBase"),
425 _mesh(*getCheckedPointerParam<MooseMesh *>("mesh")),
426 _req(declareManagedRestartableDataWithContext<RestartableEquationSystems>(
427 "equation_systems", nullptr, _mesh)),
428 _initialized(false),
429 _solve(getParam<bool>("solve")),
430 _transient(false),
431 _time(declareRestartableData<Real>("time")),
432 _time_old(declareRestartableData<Real>("time_old")),
433 _time_older(declareRestartableData<Real>("time_older")),
434 _t_step(declareRecoverableData<int>("t_step")),
435 _dt(declareRestartableData<Real>("dt")),
436 _dt_old(declareRestartableData<Real>("dt_old")),
440 _linear_sys_names(getParam<std::vector<LinearSystemName>>("linear_sys_names")),
443 _current_linear_sys(nullptr),
444 _using_default_nl(!isParamSetByUser("nl_sys_names")),
446 ? getParam<std::vector<NonlinearSystemName>>("nl_sys_names")
447 : std::vector<NonlinearSystemName>()),
449 _nl(_num_nl_sys, nullptr),
450 _current_nl_sys(nullptr),
452 _aux(nullptr),
454#ifdef MOOSE_KOKKOS_ENABLED
455 _kokkos_assembly(*this),
456#endif
459#ifdef MOOSE_KOKKOS_ENABLED
461#endif
465 _ics(numThreads()),
468 "material_props", &_mesh, _material_prop_registry, *this)),
470 "bnd_material_props", &_mesh, _material_prop_registry, *this)),
472 "neighbor_material_props", &_mesh, _material_prop_registry, *this)),
473#ifdef MOOSE_KOKKOS_ENABLED
476 "kokkos_material_props", &_mesh, _material_prop_registry, *this)),
479 "kokkos_bnd_material_props", &_mesh, _material_prop_registry, *this)),
482 "kokkos_neighbor_material_props", &_mesh, _material_prop_registry, *this)),
483#endif
488#ifdef MOOSE_KOKKOS_ENABLED
490#endif
495 _multi_apps(_app.getExecuteOnEnum(), numThreads()),
496 _transient_multi_apps(_app.getExecuteOnEnum(), numThreads()),
497 _transfers(_app.getExecuteOnEnum(), /*num_threads=*/1),
498 _to_multi_app_transfers(_app.getExecuteOnEnum(), /*num_threads=*/1),
499 _from_multi_app_transfers(_app.getExecuteOnEnum(), /*num_threads=*/1),
500 _between_multi_app_transfers(_app.getExecuteOnEnum(), /*num_threads=*/1),
501 _num_concurrent_multiapps(getParam<unsigned int>("num_concurrent_multiapps")),
502#ifdef LIBMESH_ENABLE_AMR
503 _adaptivity(*this),
505#endif
506 _displaced_mesh(nullptr),
508 _mortar_data(std::make_unique<MortarInterfaceWarehouse>(*this)),
512 _input_file_saved(false),
513 _has_dampers(false),
514 _has_constraints(false),
515 _snesmf_reuse_base(true),
519 _const_jacobian(false),
520 _has_jacobian(false),
522 _previous_nl_solution_required(getParam<bool>("previous_nl_solution_required")),
530 getParam<MooseEnum>("kernel_coverage_check").getEnum<CoverageCheckMode>()),
531 _kernel_coverage_blocks(getParam<std::vector<SubdomainName>>("kernel_coverage_block_list")),
533 getParam<bool>("boundary_restricted_node_integrity_check")),
535 getParam<bool>("boundary_restricted_elem_integrity_check")),
537 getParam<bool>("side_uo_interface_mat_prop_integrity_check")),
539 getParam<MooseEnum>("material_coverage_check").getEnum<CoverageCheckMode>()),
540 _material_coverage_blocks(getParam<std::vector<SubdomainName>>("material_coverage_block_list")),
541 _fv_bcs_integrity_check(getParam<bool>("fv_bcs_integrity_check")),
542 _fv_face_integrity_check(getParam<bool>("fv_face_integrity_check")),
543 _material_dependency_check(getParam<bool>("material_dependency_check")),
544 _uo_aux_state_check(getParam<bool>("check_uo_aux_state")),
545#ifndef NDEBUG
547#endif
548 _max_qps(std::numeric_limits<unsigned int>::max()),
551 _has_exception(false),
552 _parallel_barrier_messaging(getParam<bool>("parallel_barrier_messaging")),
553 _verbose_setup(getParam<MooseEnum>("verbose_setup")),
554 _verbose_multiapps(getParam<bool>("verbose_multiapps")),
555 _verbose_restore(getParam<bool>("verbose_restore")),
557 _control_warehouse(_app.getExecuteOnEnum(), /*num_threads=*/1),
559 _line_search(nullptr),
560 _using_ad_mat_props(false),
562 _use_hash_table_matrix_assembly(getParam<bool>("use_hash_table_matrix_assembly")),
564 isParamValid("error_on_jacobian_nonzero_reallocation")
565 ? getParam<bool>("error_on_jacobian_nonzero_reallocation")
567 _restore_original_nonzero_pattern(isParamValid("restore_original_nonzero_pattern")
568 ? getParam<bool>("restore_original_nonzero_pattern")
570 _ignore_zeros_in_jacobian(getParam<bool>("ignore_zeros_in_jacobian")),
572 _force_restart(getParam<bool>("force_restart")),
573 _allow_ics_during_restart(getParam<bool>("allow_initial_conditions_with_restart")),
574 _skip_nl_system_check(getParam<bool>("skip_nl_system_check")),
576 _allow_invalid_solution(getParam<bool>("allow_invalid_solution")),
577 _show_invalid_solution_console(getParam<bool>("show_invalid_solution_console")),
578 _immediately_print_invalid_solution(getParam<bool>("immediately_print_invalid_solution")),
581 _u_dot_requested(false),
582 _u_dotdot_requested(false),
585 _has_mortar(false),
588 _identify_variable_groups_in_nl(getParam<bool>("identify_variable_groups_in_nl")),
589 _regard_general_exceptions_as_errors(getParam<bool>("regard_general_exceptions_as_errors")),
591{
592 auto checkCoverageCheckConflict =
593 [this](const std::string & coverage_check,
594 const CoverageCheckMode & coverage_check_mode,
595 const std::vector<SubdomainName> & coverage_blocks) -> void
596 {
597 if (coverage_check_mode != CoverageCheckMode::FALSE &&
598 coverage_check_mode != CoverageCheckMode::OFF)
599 if (coverage_blocks.size() > 1)
600 if (std::find(coverage_blocks.begin(), coverage_blocks.end(), "ANY_BLOCK_ID") !=
601 coverage_blocks.end())
602 paramError(coverage_check,
603 "The list of blocks used for ",
604 coverage_check,
605 " cannot contain 'ANY_BLOCK_ID' along with other blocks. ");
606 };
607
608 checkCoverageCheckConflict(
609 "kernel_coverage_check", _kernel_coverage_check, _kernel_coverage_blocks);
610 checkCoverageCheckConflict(
611 "material_coverage_check", _material_coverage_check, _material_coverage_blocks);
612
613 // Initialize static do_derivatives member. We initialize this to true so that all the
614 // default AD things that we setup early in the simulation actually get their derivative
615 // vectors initalized. We will toggle this to false when doing residual evaluations
616 ADReal::do_derivatives = true;
617
618 // Disable refinement/coarsening in EquationSystems::reinit because we already do this ourselves
620
622 // Default constructor fine for nonlinear because it will be populated later by framework
623 // executioner/solve object parameters
625 for (const auto i : index_range(_nl_sys_names))
626 {
627 const auto & name = _nl_sys_names[i];
630 _solver_sys_names.push_back(name);
631 }
632
633 for (const auto i : index_range(_linear_sys_names))
634 {
635 const auto & name = _linear_sys_names[i];
638 _solver_sys_names.push_back(name);
639 // Unlike for nonlinear these are basically dummy parameters
641 }
642
644 _cm.resize(numSolverSystems());
645
646 _time = 0.0;
647 _time_old = 0.0;
648 _time_older = 0.0;
649 _t_step = 0;
650 _dt = 0;
651 _dt_old = _dt;
652
653 unsigned int n_threads = numThreads();
654
655 _real_zero.resize(n_threads, 0.);
656 _scalar_zero.resize(n_threads);
657 _zero.resize(n_threads);
658 _phi_zero.resize(n_threads);
659 _ad_zero.resize(n_threads);
660 _grad_zero.resize(n_threads);
661 _ad_grad_zero.resize(n_threads);
662 _grad_phi_zero.resize(n_threads);
663 _second_zero.resize(n_threads);
664 _ad_second_zero.resize(n_threads);
665 _second_phi_zero.resize(n_threads);
666 _point_zero.resize(n_threads);
667 _vector_zero.resize(n_threads);
668 _vector_curl_zero.resize(n_threads);
669 _uo_jacobian_moose_vars.resize(n_threads);
670
671 _has_active_material_properties.resize(n_threads, 0);
672
673 _block_mat_side_cache.resize(n_threads);
674 _bnd_mat_side_cache.resize(n_threads);
675 _interface_mat_side_cache.resize(n_threads);
676
677 es().parameters.set<FEProblemBase *>("_fe_problem_base") = this;
678
679 if (isParamValid("restart_file_base"))
680 {
681 std::string restart_file_base = getParam<FileNameNoExtension>("restart_file_base");
682
683 // This check reverts to old behavior of providing "restart_file_base=" to mean
684 // don't restart... BISON currently relies on this. It could probably be removed.
685 // The new MooseUtils::convertLatestCheckpoint will error out if a checkpoint file
686 // is not found, which I think makes sense. Which means, without this, if you
687 // set "restart_file_base=", you'll get a "No checkpoint file found" error
688 if (restart_file_base.size())
689 {
690 restart_file_base = MooseUtils::convertLatestCheckpoint(restart_file_base);
691 setRestartFile(restart_file_base);
692 }
693 }
694
695 // // Generally speaking, the mesh is prepared for use, and consequently remote elements are deleted
696 // // well before our Problem(s) are constructed. Historically, in MooseMesh we have a bunch of
697 // // needs_prepare type flags that make it so we never call prepare_for_use (and consequently
698 // // delete_remote_elements) again. So the below line, historically, has had no impact. HOWEVER:
699 // // I've added some code in SetupMeshCompleteAction for deleting remote elements post
700 // // EquationSystems::init. If I execute that code without default ghosting, then I get > 40 MOOSE
701 // // test failures, so we clearly have some simulations that are not yet covered properly by
702 // // relationship managers. Until that is resolved, I am going to retain default geometric ghosting
703 // if (!_default_ghosting)
704 // _mesh.getMesh().remove_ghosting_functor(_mesh.getMesh().default_ghosting());
705
706#if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
707 // Main app should hold the default database to handle system petsc options
708 if (!_app.isUltimateMaster())
709 LibmeshPetscCall(PetscOptionsCreate(&_petsc_option_data_base));
710#endif
711
712 if (!_solve)
713 {
714 // If we are not solving, we do not care about seeing unused petsc options
715 Moose::PetscSupport::setSinglePetscOption("-options_left", "0");
716 // We don't want petscSetOptions being called in solve and clearing the option that was just set
718 }
719}
const ExecFlagType EXEC_NONE
Definition Moose.C:30
void ErrorVector unsigned int
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
bool _previous_nl_solution_required
Indicates we need to save the previous NL iteration variable values.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::vector< SubdomainName > _material_coverage_blocks
std::vector< VariablePhiSecond > _second_phi_zero
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
nonlocal integrated_bcs
MaterialWarehouse _materials
LinearSystem * _current_linear_sys
The current linear system that we are solving.
std::vector< VariablePhiGradient > _grad_phi_zero
const bool _using_default_nl
Boolean to check if we have the default nonlinear system.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
std::vector< MooseArray< ADRealVectorValue > > _ad_grad_zero
const bool _allow_invalid_solution
const bool _skip_nl_system_check
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
Cache for calculating materials on side.
std::vector< SolverParams > _solver_params
bool _verbose_multiapps
Whether or not to be verbose with multiapps.
const bool & _solve
Whether or not to actually solve the nonlinear system.
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
MaterialWarehouse _interface_materials
const bool _identify_variable_groups_in_nl
Whether to identify variable groups in nonlinear systems. This affects dof ordering.
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
bool _has_dampers
Whether or not this system has any Dampers associated with it.
Moose::Kokkos::MaterialPropertyStorage & _kokkos_neighbor_material_props
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
nonlocal kernels
ReporterData _reporter_data
std::vector< VariableGradient > _grad_zero
virtual libMesh::EquationSystems & es() override
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
std::vector< bool > _previous_multisystem_fp_nl_solution_required
Indicates we need to save the previous multi-system fixed-point iteration solver variable values.
bool _need_to_add_default_nonlinear_convergence
Flag that the problem needs to add the default nonlinear convergence.
const bool _boundary_restricted_node_integrity_check
whether to perform checking of boundary restricted nodal object variable dependencies,...
std::shared_ptr< LineSearch > _line_search
std::vector< VariableSecond > _second_zero
MaterialPropertyStorage & _material_props
virtual std::size_t numSolverSystems() const override
bool _needs_old_newton_iter
Indicates that we need to compute variable values for previous Newton iteration.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
std::vector< libMesh::CouplingMatrix > _nonlocal_cm
nonlocal coupling matrix
MaterialPropertyStorage & _neighbor_material_props
MooseMesh & _mesh
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
void setRestartFile(const std::string &file_name)
Communicate to the Resurector the name of the restart filer.
friend class Restartable
std::map< NonlinearSystemName, unsigned int > _nl_sys_name_to_num
Map from nonlinear system name to number.
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
Coupling matrix for variables.
std::vector< VectorVariableValue > _vector_zero
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.
bool _preserve_matrix_sparsity_pattern
Whether to preserve the system matrix / Jacobian sparsity pattern, using 0-valued entries usually.
bool _snesmf_reuse_base_set_by_user
If or not _snesmf_reuse_base is set by user.
std::vector< VariablePhiValue > _phi_zero
libMesh::Order _max_scalar_order
Maximum scalar variable order.
CoverageCheckMode _kernel_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active kernel.
GeometricSearchData _geometric_search_data
ExecFlagType _current_execute_on_flag
Current execute_on flag.
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling 'computeDT')
Moose::Kokkos::MaterialPropertyStorage & _kokkos_bnd_material_props
const bool _use_hash_table_matrix_assembly
Whether to assemble matrices using hash tables instead of preallocating matrix memory.
bool _ignore_zeros_in_jacobian
Whether to ignore zeros in the Jacobian, thereby leading to a reduced sparsity pattern.
unsigned int _num_grid_steps
Number of steps in a grid sequence.
bool _need_to_add_default_multiapp_fixed_point_convergence
Flag that the problem needs to add the default fixed point convergence.
MooseObjectWarehouse< Indicator > _indicators
std::map< SolverSystemName, unsigned int > _solver_sys_name_to_num
Map connecting solver system names with their respective systems.
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
Restartable::ManagedValue< RestartableEquationSystems > _req
The EquationSystems object, wrapped for restart.
const bool _force_restart
const bool _material_dependency_check
Determines whether a check to verify material dependencies on every subdomain.
const bool _regard_general_exceptions_as_errors
If we catch an exception during residual/Jacobian evaluaton for which we don't have specific handling...
const std::vector< LinearSystemName > _linear_sys_names
The linear system names.
MaterialWarehouse _discrete_materials
bool _skip_exception_check
If or not skip 'exception and stop solve'.
unsigned short _current_ic_state
std::map< LinearSystemName, unsigned int > _linear_sys_name_to_num
Map from linear system name to number.
const std::size_t _num_linear_sys
The number of linear systems.
bool _u_dotdot_old_requested
Whether old solution second time derivative needs to be stored.
Moose::Kokkos::MaterialPropertyStorage & _kokkos_material_props
const bool _side_uo_interface_mat_prop_integrity_check
Whether to check that side user objects do not consume interface material properties.
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
const bool _restore_original_nonzero_pattern
Whether we should restore the original nonzero pattern for every Jacobian evaluation.
bool _fail_next_system_convergence_check
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
std::vector< VariableValue > _scalar_zero
bool _fv_bcs_integrity_check
Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset.
bool _const_jacobian
true if the Jacobian is constant
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.
bool _error_on_jacobian_nonzero_reallocation
Whether to error when the Jacobian is re-allocated, usually because the sparsity pattern changed.
bool _u_dot_requested
Whether solution time derivative needs to be stored.
MaterialPropertyStorage & _bnd_material_props
unsigned int _max_qps
Maximum number of quadrature points used in the problem.
InitialConditionWarehouse _ics
MaterialWarehouse _all_materials
PetscOptions _petsc_option_data_base
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)
bool _input_file_saved
whether input file has been written
MaterialWarehouse _kokkos_materials
bool _previous_multiapp_fp_aux_solution_required
Indicates we need to save the previous multiapp fixed-point iteration auxiliary variable values.
std::vector< std::unordered_map< BoundaryID, bool > > _interface_mat_side_cache
Cache for calculating materials on interface.
MooseObjectWarehouse< MeshDivision > _mesh_divisions
Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the ...
Moose::Kokkos::Assembly _kokkos_assembly
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
MooseEnum _verbose_setup
Whether or not to be verbose during setup.
FVInitialConditionWarehouse _fv_ics
const bool _boundary_restricted_elem_integrity_check
whether to perform checking of boundary restricted elemental object variable dependencies,...
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
Cache for calculating materials on side.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
const bool _uo_aux_state_check
Whether or not checking the state of uo/aux evaluation.
bool _started_initial_setup
At or beyond initialSteup stage.
Adaptivity _adaptivity
std::vector< SolverSystemName > _solver_sys_names
The union of nonlinear and linear system names.
bool _verbose_restore
Whether or not to be verbose on solution restoration post a failed time step.
const std::size_t _num_nl_sys
The number of nonlinear systems.
std::vector< VectorVariableCurl > _vector_curl_zero
bool _has_mortar
Whether the simulation requires mortar coupling.
std::vector< bool > _previous_multiapp_fp_nl_solution_required
Indicates we need to save the previous multiapp fixed-point iteration solver variable values.
const unsigned int _num_concurrent_multiapps
Number of concurrent applications being solved at the same time.
bool _need_to_add_default_steady_state_convergence
Flag that the problem needs to add the default steady convergence.
bool _calculate_jacobian_in_uo
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
bool _has_initialized_stateful
Whether nor not stateful materials have been initialized.
bool _has_constraints
Whether or not this system has any Constraints.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool _snesmf_reuse_base
If or not to resuse the base vector for matrix-free calculation.
bool errorOnJacobianNonzeroReallocation() const
Will return True if the user wants to get an error when a nonzero is reallocated in the Jacobian by P...
MooseObjectWarehouse< Convergence > _convergences
convergence warehouse
bool _has_jacobian
Indicates if the Jacobian was computed.
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
std::vector< unsigned char > _has_active_material_properties
Whether there are active material properties on each thread.
Moose::CouplingType _coupling
Type of variable coupling.
bool _has_exception
Whether or not an exception has occurred.
std::vector< Real > _real_zero
Convenience zeros.
const bool & _immediately_print_invalid_solution
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.
std::vector< MooseArray< ADRealTensorValue > > _ad_second_zero
bool _using_ad_mat_props
Automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material ...
static SolverParams makeLinearSolverParams()
Make basic solver params for linear solves.
unsigned int _cycles_completed
ExecFlagEnum _print_execution_on
When to print the execution of loops.
std::vector< Point > _point_zero
std::vector< MooseArray< ADReal > > _ad_zero
MooseObjectWarehouse< Function > _functions
functions
CoverageCheckMode _material_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active material...
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.
bool _previous_multisystem_fp_aux_solution_required
Indicates we need to save the previous multi-system fixed-point iteration auxiliary variable values.
std::vector< VariableValue > _zero
MooseObjectWarehouse< Marker > _markers
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.
bool _check_residual_for_nans
Whether to check the residual for NaN or Inf values.
const std::vector< NonlinearSystemName > _nl_sys_names
The nonlinear system names.
const bool _fv_face_integrity_check
Whether to check FV boundary and interface objects against the faces on which they execute.
MooseMesh * _displaced_mesh
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
std::vector< SubdomainName > _kernel_coverage_blocks
MaterialPropertyRegistry _material_prop_registry
const bool _show_invalid_solution_console
const bool _allow_ics_during_restart
Stores the stateful material properties computed by materials.
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition MooseApp.h:870
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition MooseBase.h:457
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
Definition MooseBase.h:205
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition MooseBase.h:406
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition MooseBase.h:199
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:375
T & declareRestartableDataWithContext(const std::string &data_name, void *context, Args &&... args)
Declare a piece of data as "restartable" and initialize it.
Generic class for solving transient nonlinear problems.
Definition SubProblem.h:79
THREAD_ID numThreads() const
Definition SubProblem.C:81
T & set(const std::string &)
auto max(const L &left, const R &right)
std::string convertLatestCheckpoint(std::string orig)
Definition MooseUtils.C:220
void setSinglePetscOption(const std::string &name, const std::string &value="", FEProblemBase *const problem=nullptr)
A wrapper function for dealing with different versions of PetscOptionsSetValue.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
@ COUPLING_DIAG
Definition MooseTypes.h:786
auto index_range(const T &sizable)
unsigned int n_threads()

◆ ~FEProblemBase()

FEProblemBase::~FEProblemBase ( )
virtual

Definition at line 878 of file FEProblemBase.C.

879{
880 // Flush the Console stream, the underlying call to Console::mooseConsole
881 // relies on a call to Output::checkInterval that has references to
882 // _time, etc. If it is not flushed here memory problems arise if you have
883 // an unflushed stream and start destructing things.
884 _console << std::flush;
885
886 unsigned int n_threads = numThreads();
887 for (unsigned int i = 0; i < n_threads; i++)
888 {
889 _zero[i].release();
890 _phi_zero[i].release();
891 _scalar_zero[i].release();
892 _grad_zero[i].release();
893 _grad_phi_zero[i].release();
894 _second_zero[i].release();
895 _second_phi_zero[i].release();
896 _vector_zero[i].release();
897 _vector_curl_zero[i].release();
898 _ad_zero[i].release();
899 _ad_grad_zero[i].release();
900 _ad_second_zero[i].release();
901 }
902
903#if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
904 if (!_app.isUltimateMaster())
905 {
906 auto ierr = PetscOptionsDestroy(&_petsc_option_data_base);
907 // Don't throw on destruction
908 CHKERRABORT(this->comm().get(), ierr);
909 }
910#endif
911}
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
const Parallel::Communicator & comm() const
const Elem & get(const ElemType type_in)

Member Function Documentation

◆ _setCLIOption()

void Problem::_setCLIOption ( )
inlineinherited

For Internal Use.

Definition at line 32 of file Problem.h.

32{ _cli_option_found = true; }
bool _cli_option_found
True if the CLI option is found.
Definition Problem.h:52

◆ acceptInvalidSolution()

bool FEProblemBase::acceptInvalidSolution ( ) const

Whether or not to accept the solution based on its invalidity.

If this returns false, it means that an invalid solution was encountered (an error) that was not allowed.

Definition at line 4143 of file FEProblemBase.C.

4144{
4145 return allowInvalidSolution() || // invalid solutions are always allowed
4146 !_app.solutionInvalidity().hasInvalidSolutionError(); // if not allowed, check for errors
4147}
bool allowInvalidSolution() const
Whether to accept / allow an invalid solution.
SolutionInvalidity & solutionInvalidity()
Get the SolutionInvalidity for this app.
Definition MooseApp.h:182
bool hasInvalidSolutionError() const
Whether or not an invalid solution was encountered that was an error.

Referenced by SolverSystem::checkInvalidSolution(), and NonlinearSystem::converged().

◆ adaptivity()

Adaptivity & FEProblemBase::adaptivity ( )
inline

Definition at line 2178 of file FEProblemBase.h.

2178{ return _adaptivity; }

Referenced by Eigenvalue::execute(), SteadyBase::execute(), and initialAdaptMesh().

◆ adaptMesh()

bool FEProblemBase::adaptMesh ( )
virtual
Returns
Whether or not the mesh was changed

Reimplemented in DumpObjectsProblem.

Definition at line 8923 of file FEProblemBase.C.

8924{
8925 // reset cycle counter
8927
8929 return false;
8930
8931 TIME_SECTION("adaptMesh", 3, "Adapting Mesh");
8932
8933 unsigned int cycles_per_step = _adaptivity.getCyclesPerStep();
8934
8935 bool mesh_changed = false;
8936
8937 for (unsigned int i = 0; i < cycles_per_step; ++i)
8938 {
8939 if (!_mesh.interiorLowerDBlocks().empty() || !_mesh.boundaryLowerDBlocks().empty())
8940 mooseError("HFEM does not support mesh adaptivity currently.");
8941
8942 // Markers were already computed once by Executioner
8943 if (_adaptivity.getRecomputeMarkersFlag() && i > 0)
8945
8946 bool mesh_changed_this_step;
8947 mesh_changed_this_step = _adaptivity.adaptMesh();
8948
8949 if (mesh_changed_this_step)
8950 {
8951 mesh_changed = true;
8952
8954 /*intermediate_change=*/true, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
8956 }
8957 else
8958 {
8959 // If the mesh didn't change, we still need to update the displaced mesh
8960 // to undo the undisplacement performed in Adaptivity::adaptMesh
8962 _displaced_problem->updateMesh();
8963
8964 _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
8965 break;
8966 }
8967
8968 // Show adaptivity progress
8969 _console << std::flush;
8970 }
8971
8972 // We're done with all intermediate changes; now get systems ready
8973 // for real if necessary.
8974 if (mesh_changed)
8975 es().reinit_systems();
8976
8977 // Execute multi-apps that need to run after adaptivity, but before the next timestep.
8979
8980 return mesh_changed;
8981}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
const ExecFlagType EXEC_POST_ADAPTIVITY
Definition Moose.C:61
unsigned int getCyclesPerStep() const
Pull out the number of cycles_per_step previously set through the AdaptivityAction.
Definition Adaptivity.h:126
bool getRecomputeMarkersFlag() const
Pull out the _recompute_markers_during_cycles flag previously set through the AdaptivityAction.
Definition Adaptivity.h:139
bool adaptMesh(std::string marker_name=std::string())
Adapts the mesh based on the error estimator used.
Definition Adaptivity.C:145
bool isAdaptivityDue()
Query if an adaptivity step should be performed at the current time / time step.
Definition Adaptivity.C:428
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void computeMarkers()
virtual void meshChanged()
Deprecated.
const std::set< SubdomainID > & interiorLowerDBlocks() const
Definition MooseMesh.h:1550
const std::set< SubdomainID > & boundaryLowerDBlocks() const
Definition MooseMesh.h:1554
virtual void reinit_systems()

Referenced by Eigenvalue::execute(), SteadyBase::execute(), and TransientBase::incrementStepOrReject().

◆ addAlgebraicGhostingFunctor()

void SubProblem::addAlgebraicGhostingFunctor ( libMesh::GhostingFunctor &  algebraic_gf,
bool  to_mesh = true 
)
inherited

Add an algebraic ghosting functor to this problem's DofMaps.

Definition at line 1031 of file SubProblem.C.

1032{
1033 EquationSystems & eq = es();
1034 const auto n_sys = eq.n_systems();
1035 if (!n_sys)
1036 return;
1037
1038 eq.get_system(0).get_dof_map().add_algebraic_ghosting_functor(algebraic_gf, to_mesh);
1039 cloneAlgebraicGhostingFunctor(algebraic_gf, to_mesh);
1040}
void cloneAlgebraicGhostingFunctor(libMesh::GhostingFunctor &algebraic_gf, bool to_mesh=true)
Creates (n_sys - 1) clones of the provided algebraic ghosting functor (corresponding to the nonlinear...
virtual libMesh::EquationSystems & es()=0

◆ addAnyRedistributers()

void FEProblemBase::addAnyRedistributers ( )
private

Definition at line 6779 of file FEProblemBase.C.

6780{
6781#ifdef LIBMESH_ENABLE_AMR
6782 if ((_adaptivity.isOn() || _num_grid_steps) &&
6785 {
6786 // Even on a serialized Mesh, we don't keep our material
6787 // properties serialized, so we'll rely on the callback to
6788 // redistribute() to redistribute properties at the same time
6789 // libMesh is redistributing elements.
6790 auto add_redistributer = [this](MooseMesh & mesh,
6791 const std::string & redistributer_name,
6792 const bool use_displaced_mesh)
6793 {
6795 redistribute_params.set<MooseApp *>(MooseBase::app_param) = &_app;
6796 redistribute_params.set<std::string>("for_whom") = this->name();
6797 redistribute_params.set<MooseMesh *>("mesh") = &mesh;
6798 redistribute_params.set<Moose::RelationshipManagerType>("rm_type") =
6800 redistribute_params.set<bool>("use_displaced_mesh") = use_displaced_mesh;
6801 redistribute_params.setHitNode(*parameters().getHitNode(), {});
6802
6803 std::shared_ptr<RedistributeProperties> redistributer =
6805 "RedistributeProperties", redistributer_name, redistribute_params);
6806
6809
6811 redistributer->addMaterialPropertyStorage(_bnd_material_props);
6812
6814 redistributer->addMaterialPropertyStorage(_neighbor_material_props);
6815
6816 mesh.getMesh().add_ghosting_functor(redistributer);
6817 };
6818
6819 add_redistributer(_mesh, "mesh_property_redistributer", false);
6821 add_redistributer(_displaced_problem->mesh(), "displaced_mesh_property_redistributer", true);
6822 }
6823#endif // LIBMESH_ENABLE_AMR
6824}
bool isOn()
Is adaptivity on?
Definition Adaptivity.h:193
virtual MooseMesh & mesh() override
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Definition Factory.C:142
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void setHitNode(const std::string &param, const hit::Node &node, const SetParamHitNodeKey)
Sets the hit node associated with the parameter param to node.
const hit::Node * getHitNode(const std::string &param) const
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for MOOSE-based applications.
Definition MooseApp.h:110
static const std::string app_param
The name of the parameter that contains the MooseApp.
Definition MooseBase.h:59
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition MooseMesh.C:3512
RedistributeProperties is used for its redistribute() callback, which ensures that any stateful prope...
static InputParameters validParams()
void addMaterialPropertyStorage(MaterialPropertyStorage &mat_props)
Pushes the given pair ( mat_data , mat_props ) onto our list of _materials data to redistribute each ...
Factory & _factory
The Factory for building objects.
RelationshipManagerType
Main types of Relationship Managers.

◆ addAuxArrayVariable()

void FEProblemBase::addAuxArrayVariable ( const std::string &  var_name,
const libMesh::FEType &  type,
unsigned int  components,
const std::set< SubdomainID > *const  active_subdomains = NULL 
)
virtual

Definition at line 3471 of file FEProblemBase.C.

3475{
3476 parallel_object_only();
3477
3478 mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
3479
3480 if (duplicateVariableCheck(var_name, type, /* is_aux = */ true, active_subdomains))
3481 return;
3482
3483 InputParameters params = _factory.getValidParams("ArrayMooseVariable");
3484 params.set<FEProblemBase *>("_fe_problem_base") = this;
3486 params.set<MooseEnum>("order") = type.order.get_order();
3487 params.set<MooseEnum>("family") = Moose::stringify(type.family);
3488 params.set<bool>("p_refinement") = type.p_refinement;
3489 params.set<unsigned int>("components") = components;
3490
3491 if (active_subdomains)
3492 for (const SubdomainID & id : *active_subdomains)
3493 params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
3494
3495 logAdd("Variable", var_name, "ArrayMooseVariable", params);
3496 _aux->addVariable("ArrayMooseVariable", var_name, params);
3498 _displaced_problem->addAuxVariable("ArrayMooseVariable", var_name, params);
3499}
subdomain_id_type SubdomainID
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition MooseError.h:363
void logAdd(const std::string &system, const std::string &name, const std::string &type, const InputParameters &params) const
Output information about the object just added to the problem.
bool duplicateVariableCheck(const std::string &var_name, const libMesh::FEType &type, bool is_aux, const std::set< SubdomainID > *const active_subdomains)
Helper to check for duplicate variable names across systems or within a single system.
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Definition Factory.C:68
const std::string & type() const
Get the type of this class.
Definition MooseBase.h:93
std::string stringify(const T &t)
conversion to string
Definition Conversion.h:65
VarKindType
Framework-wide stuff.
Definition MooseTypes.h:769
@ VAR_AUXILIARY
Definition MooseTypes.h:771
std::string stringify(MOOSEIOType type)
Definition NEML2Utils.C:18

◆ addAuxKernel()

void FEProblemBase::addAuxKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 3536 of file FEProblemBase.C.

3539{
3540 parallel_object_only();
3541
3542 setAuxKernelParamsAndLog(kernel_name, name, parameters, "AuxKernel");
3543
3544 _aux->addKernel(kernel_name, name, parameters);
3545}
void setAuxKernelParamsAndLog(const std::string &ak_name, const std::string &name, InputParameters &parameters, const std::string &base_name)
Set the subproblem and system parameters for auxiliary kernels and log their addition.

◆ addAuxScalarKernel()

void FEProblemBase::addAuxScalarKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3548 of file FEProblemBase.C.

3551{
3552 parallel_object_only();
3553
3554 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3555 {
3556 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3557 parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3558 }
3559 else
3560 {
3561 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3562 {
3563 // We allow AuxScalarKernels to request that they use_displaced_mesh,
3564 // but then be overridden when no displacements variables are
3565 // provided in the Mesh block. If that happened, update the value
3566 // of use_displaced_mesh appropriately for this AuxScalarKernel.
3567 if (parameters.have_parameter<bool>("use_displaced_mesh"))
3568 parameters.set<bool>("use_displaced_mesh") = false;
3569 }
3570
3571 parameters.set<SubProblem *>("_subproblem") = this;
3572 parameters.set<SystemBase *>("_sys") = _aux.get();
3573 }
3574
3575 logAdd("AuxScalarKernel", name, kernel_name, parameters);
3576 _aux->addScalarKernel(kernel_name, name, parameters);
3577}
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
Base class for a system (of equations)
Definition SystemBase.h:87

◆ addAuxScalarVariable()

void FEProblemBase::addAuxScalarVariable ( const std::string &  var_name,
libMesh::Order  order,
Real  scale_factor = 1.,
const std::set< SubdomainID > *const  active_subdomains = NULL 
)
virtual

Definition at line 3502 of file FEProblemBase.C.

3506{
3507 parallel_object_only();
3508
3509 mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
3510
3511 if (order > _max_scalar_order)
3512 _max_scalar_order = order;
3513
3514 FEType type(order, SCALAR);
3515 if (duplicateVariableCheck(var_name, type, /* is_aux = */ true, active_subdomains))
3516 return;
3517
3518 InputParameters params = _factory.getValidParams("MooseVariableScalar");
3519 params.set<FEProblemBase *>("_fe_problem_base") = this;
3521
3522 params.set<MooseEnum>("order") = type.order.get_order();
3523 params.set<MooseEnum>("family") = "SCALAR";
3524 params.set<std::vector<Real>>("scaling") = std::vector<Real>{1};
3525 if (active_subdomains)
3526 for (const SubdomainID & id : *active_subdomains)
3527 params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
3528
3529 logAdd("ScalarVariable", var_name, "MooseVariableScalar", params);
3530 _aux->addVariable("MooseVariableScalar", var_name, params);
3532 _displaced_problem->addAuxVariable("MooseVariableScalar", var_name, params);
3533}

◆ addAuxVariable() [1/2]

virtual void FEProblemBase::addAuxVariable ( const std::string &  var_name,
const libMesh::FEType &  type,
const std::set< SubdomainID > *const  active_subdomains = NULL 
)
virtual

Reimplemented in DumpObjectsProblem.

◆ addAuxVariable() [2/2]

void FEProblemBase::addAuxVariable ( const std::string &  var_type,
const std::string &  var_name,
InputParameters &  params 
)
virtual

Canonical method for adding an auxiliary variable.

Parameters
var_typethe type of the variable, e.g. MooseVariableScalar
var_namethe variable name, e.g. 'u'
paramsthe InputParameters from which to construct the variable

Reimplemented in MFEMProblem, and DumpObjectsProblem.

Definition at line 3397 of file FEProblemBase.C.

3400{
3401 parallel_object_only();
3402
3403 const auto fe_type = MooseUtils::variableFEType(params);
3404
3405 const auto active_subdomains_vector =
3406 _mesh.getSubdomainIDs(params.get<std::vector<SubdomainName>>("block"));
3407 const std::set<SubdomainID> active_subdomains(active_subdomains_vector.begin(),
3408 active_subdomains_vector.end());
3409
3410 if (duplicateVariableCheck(var_name, fe_type, /* is_aux = */ true, &active_subdomains))
3411 return;
3412
3413 params.set<FEProblemBase *>("_fe_problem_base") = this;
3415
3416 logAdd("AuxVariable", var_name, var_type, params);
3417 _aux->addVariable(var_type, var_name, params);
3419 // MooseObjects need to be unique so change the name here
3420 _displaced_problem->addAuxVariable(var_type, var_name, params);
3421}
std::vector< SubdomainID > getSubdomainIDs(const std::vector< SubdomainName > &subdomain_names) const
Get the associated subdomainIDs for the subdomain names that are passed in.
Definition MooseMesh.C:1684
libMesh::FEType variableFEType(const InputParameters &params)
Definition MooseUtils.C:98

Referenced by addElementalFieldVariable(), and AddAuxVariableAction::init().

◆ addBoundaryCondition()

void FEProblemBase::addBoundaryCondition ( const std::string &  bc_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 3326 of file FEProblemBase.C.

3329{
3330 parallel_object_only();
3331
3332 const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3333 if (!isSolverSystemNonlinear(nl_sys_num))
3334 mooseError(
3335 "You are trying to add a BoundaryCondition to a linear variable/system, which is not "
3336 "supported at the moment!");
3337
3339 bc_name, name, parameters, nl_sys_num, "BoundaryCondition", _reinit_displaced_face);
3340 _nl[nl_sys_num]->addBoundaryCondition(bc_name, name, parameters);
3341}
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
void setResidualObjectParamsAndLog(const std::string &ro_name, const std::string &name, InputParameters &parameters, const unsigned int nl_sys_num, const std::string &base_name, bool &reinit_displaced)
Set the subproblem and system parameters for residual objects and log their addition.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable \emph parameter name.

Referenced by DiffusionCG::addBoundaryConditionsFromComponents(), and DiffusionCG::addFEBCs().

◆ addCachedJacobian()

void FEProblemBase::addCachedJacobian ( const THREAD_ID  tid)
overridevirtual

◆ addCachedResidual()

void FEProblemBase::addCachedResidual ( const THREAD_ID  tid)
overridevirtual

◆ addCachedResidualDirectly()

void FEProblemBase::addCachedResidualDirectly ( NumericVector< libMesh::Number > &  residual,
const THREAD_ID  tid 
)
virtual

Allows for all the residual contributions that are currently cached to be added directly into the vector passed in.

Parameters
residualThe vector to add the cached contributions to.
tidThe thread id.

Definition at line 2118 of file FEProblemBase.C.

2119{
2121 _assembly[tid][_current_nl_sys->number()]->addCachedResidualDirectly(
2123
2125 _assembly[tid][_current_nl_sys->number()]->addCachedResidualDirectly(
2127
2128 std::vector<VectorTag> extra_residual_vector_tags;
2129 extra_residual_vector_tags.reserve(currentResidualVectorTags().size());
2130 const auto time_tag = _current_nl_sys->timeVectorTag();
2131 const auto non_time_tag = _current_nl_sys->nonTimeVectorTag();
2132 for (const auto & vector_tag : currentResidualVectorTags())
2133 if (vector_tag._id != time_tag && vector_tag._id != non_time_tag)
2134 extra_residual_vector_tags.push_back(vector_tag);
2135
2136 // Flush extra vector tag caches (e.g. from extra_vector_tags on NodalConstraints)
2137 // to their respective system vectors after the standard TIME/NONTIME caches above.
2138 // Without this, NodalConstraint contributions to extra vector tags are silently
2139 // discarded by the blanket clearCachedResiduals.
2140 _assembly[tid][_current_nl_sys->number()]->addCachedResiduals(Assembly::GlobalDataKey{},
2141 extra_residual_vector_tags);
2142
2143 // We do this because by adding the cached residual directly, we cannot ensure that all of the
2144 // cached residuals are emptied after only the two add calls above
2145 _assembly[tid][_current_nl_sys->number()]->clearCachedResiduals(Assembly::GlobalDataKey{});
2146
2148 _displaced_problem->addCachedResidualDirectly(residual, tid);
2149}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
Key structure for APIs manipulating global vectors/matrices.
Definition Assembly.h:836
virtual const std::vector< VectorTag > & currentResidualVectorTags() const override
Return the residual vector tags we are currently computing.
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
TagID timeVectorTag() const override
Ideally, we should not need this API.
TagID nonTimeVectorTag() const override
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition SubProblem.C:153
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition SystemBase.C:924
unsigned int number() const
Gets the number of this system.

Referenced by NonlinearSystemBase::constraintResiduals(), and NonlinearSystemBase::enforceNodalConstraintsResidual().

◆ addConstraint()

void FEProblemBase::addConstraint ( const std::string &  c_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3344 of file FEProblemBase.C.

3347{
3348 parallel_object_only();
3349
3350 _has_constraints = true;
3351
3352 auto determine_var_param_name = [&parameters, this]()
3353 {
3354 if (parameters.isParamValid("variable"))
3355 return "variable";
3356 else
3357 {
3358 // must be a mortar constraint
3359 const bool has_secondary_var = parameters.isParamValid("secondary_variable");
3360 const bool has_primary_var = parameters.isParamValid("primary_variable");
3361 if (!has_secondary_var && !has_primary_var)
3362 mooseError(
3363 "Either a 'secondary_variable' or 'primary_variable' parameter must be supplied for '",
3365 "'");
3366 return has_secondary_var ? "secondary_variable" : "primary_variable";
3367 }
3368 };
3369
3370 const auto nl_sys_num =
3371 determineSolverSystem(parameters.varName(determine_var_param_name(), name), true).second;
3372 if (!isSolverSystemNonlinear(nl_sys_num))
3373 mooseError("You are trying to add a Constraint to a linear variable/system, which is not "
3374 "supported at the moment!");
3375
3376 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3377 {
3378 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3379 parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3381 }
3382 else
3383 {
3384 // It might _want_ to use a displaced mesh... but we're not so set it to false
3385 if (parameters.have_parameter<bool>("use_displaced_mesh"))
3386 parameters.set<bool>("use_displaced_mesh") = false;
3387
3388 parameters.set<SubProblem *>("_subproblem") = this;
3389 parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3390 }
3391
3392 logAdd("Constraint", name, c_name, parameters);
3393 _nl[nl_sys_num]->addConstraint(c_name, name, parameters);
3394}
const std::string & getObjectName() const
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...

◆ addConsumedPropertyName()

void SubProblem::addConsumedPropertyName ( const MooseObjectName &  obj_name,
const std::string &  prop_name 
)
inherited

Helper for tracking the object that is consuming a property for MaterialPropertyDebugOutput.

Definition at line 728 of file SubProblem.C.

729{
730 _consumed_material_properties[obj_name].insert(prop_name);
731}
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties

Referenced by MaterialPropertyInterface::addConsumedPropertyName().

◆ addConvergence()

void FEProblemBase::addConvergence ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Adds a Convergence object.

Definition at line 2742 of file FEProblemBase.C.

2745{
2746 parallel_object_only();
2747
2748 for (THREAD_ID tid = 0; tid < numThreads(); tid++)
2749 {
2750 std::shared_ptr<Convergence> conv = _factory.create<Convergence>(type, name, parameters, tid);
2751 _convergences.addObject(conv, tid);
2752 }
2753}
unsigned int THREAD_ID
Definition MooseTypes.h:237
Base class for convergence criteria.
Definition Convergence.h:26
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.

Referenced by addDefaultMultiAppFixedPointConvergence(), addDefaultNonlinearConvergence(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), and addDefaultSteadyStateConvergence().

◆ addCouplingGhostingFunctor()

void SubProblem::addCouplingGhostingFunctor ( libMesh::GhostingFunctor &  coupling_gf,
bool  to_mesh = true 
)
inherited

Add a coupling functor to this problem's DofMaps.

Definition at line 1064 of file SubProblem.C.

1065{
1066 const auto num_nl_sys = numNonlinearSystems();
1067 if (!num_nl_sys)
1068 return;
1069
1070 systemBaseNonlinear(0).system().get_dof_map().add_coupling_functor(coupling_gf, to_mesh);
1071 cloneCouplingGhostingFunctor(coupling_gf, to_mesh);
1072}
virtual std::size_t numNonlinearSystems() const =0
virtual const SystemBase & systemBaseNonlinear(const unsigned int sys_num) const =0
Return the nonlinear system object as a base class reference given the system number.
void cloneCouplingGhostingFunctor(libMesh::GhostingFunctor &coupling_gf, bool to_mesh=true)
Creates (n_sys - 1) clones of the provided coupling ghosting functor (corresponding to the nonlinear ...
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
void add_coupling_functor(GhostingFunctor &coupling_functor, bool to_mesh=true)
const DofMap & get_dof_map() const

◆ addDamper()

void FEProblemBase::addDamper ( const std::string &  damper_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 5809 of file FEProblemBase.C.

5812{
5813 parallel_object_only();
5814
5815 const auto nl_sys_num =
5816 parameters.isParamValid("variable")
5817 ? determineSolverSystem(parameters.varName("variable", name), true).second
5818 : (unsigned int)0;
5819
5820 if (!isSolverSystemNonlinear(nl_sys_num))
5821 mooseError("You are trying to add a DGKernel to a linear variable/system, which is not "
5822 "supported at the moment!");
5823
5824 parameters.set<SubProblem *>("_subproblem") = this;
5825 parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
5826
5827 _has_dampers = true;
5828 logAdd("Damper", name, damper_name, parameters);
5829 _nl[nl_sys_num]->addDamper(damper_name, name, parameters);
5830}

◆ addDefaultMultiAppFixedPointConvergence()

void FEProblemBase::addDefaultMultiAppFixedPointConvergence ( const InputParameters &  params)

Adds the default fixed point Convergence associated with the problem.

This is called if the user does not supply 'multiapp_fixed_point_convergence'.

Parameters
[in]paramsParameters to apply to Convergence parameters

Definition at line 2768 of file FEProblemBase.C.

2769{
2770 const std::string class_name = "DefaultMultiAppFixedPointConvergence";
2771 InputParameters params = _factory.getValidParams(class_name);
2772 params.applyParameters(params_to_apply);
2773 params.applyParameters(parameters());
2774 params.set<bool>("added_as_default") = true;
2776}
virtual void addConvergence(const std::string &type, const std::string &name, InputParameters &parameters)
Adds a Convergence object.
const ConvergenceName & getMultiAppFixedPointConvergenceName() const
Gets the MultiApp fixed point convergence object name.
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
Method for applying common parameters.

◆ addDefaultNonlinearConvergence()

void FEProblemBase::addDefaultNonlinearConvergence ( const InputParameters &  params)
virtual

Adds the default nonlinear Convergence associated with the problem.

This is called if the user does not supply 'nonlinear_convergence'.

Parameters
[in]paramsParameters to apply to Convergence parameters

Reimplemented in ReferenceResidualProblem.

Definition at line 2756 of file FEProblemBase.C.

2757{
2758 const std::string class_name = "DefaultNonlinearConvergence";
2759 InputParameters params = _factory.getValidParams(class_name);
2760 params.applyParameters(params_to_apply);
2761 params.applyParameters(parameters());
2762 params.set<bool>("added_as_default") = true;
2763 for (const auto & conv_name : getNonlinearConvergenceNames())
2764 addConvergence(class_name, conv_name, params);
2765}
const std::vector< ConvergenceName > & getNonlinearConvergenceNames() const
Gets the nonlinear system convergence object name(s).

◆ addDefaultSteadyStateConvergence()

void FEProblemBase::addDefaultSteadyStateConvergence ( const InputParameters &  params)

Adds the default steady-state detection Convergence.

This is called if the user does not supply 'steady_state_convergence'.

Parameters
[in]paramsParameters to apply to Convergence parameters

Definition at line 2779 of file FEProblemBase.C.

2780{
2781 const std::string class_name = "DefaultSteadyStateConvergence";
2782 InputParameters params = _factory.getValidParams(class_name);
2783 params.applyParameters(params_to_apply);
2784 params.applyParameters(parameters());
2785 params.set<bool>("added_as_default") = true;
2786 addConvergence(class_name, getSteadyStateConvergenceName(), params);
2787}
const ConvergenceName & getSteadyStateConvergenceName() const
Gets the steady-state detection convergence object name.

◆ addDGKernel()

void FEProblemBase::addDGKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3620 of file FEProblemBase.C.

3623{
3624 parallel_object_only();
3625
3626 const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3627 if (!isSolverSystemNonlinear(nl_sys_num))
3628 mooseError("You are trying to add a DGKernel to a linear variable/system, which is not "
3629 "supported at the moment!");
3630
3631 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3632 {
3633 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3634 parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3636 }
3637 else
3638 {
3639 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3640 {
3641 // We allow DGKernels to request that they use_displaced_mesh,
3642 // but then be overridden when no displacements variables are
3643 // provided in the Mesh block. If that happened, update the value
3644 // of use_displaced_mesh appropriately for this DGKernel.
3645 if (parameters.have_parameter<bool>("use_displaced_mesh"))
3646 parameters.set<bool>("use_displaced_mesh") = false;
3647 }
3648
3649 parameters.set<SubProblem *>("_subproblem") = this;
3650 parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3651 }
3652
3653 logAdd("DGKernel", name, dg_kernel_name, parameters);
3654 _nl[nl_sys_num]->addDGKernel(dg_kernel_name, name, parameters);
3655
3657}

◆ addDiracKernel()

void FEProblemBase::addDiracKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3580 of file FEProblemBase.C.

3583{
3584 parallel_object_only();
3585
3586 const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3587 if (!isSolverSystemNonlinear(nl_sys_num))
3588 mooseError("You are trying to add a DiracKernel to a linear variable/system, which is not "
3589 "supported at the moment!");
3590
3591 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3592 {
3593 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3594 parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3596 }
3597 else
3598 {
3599 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3600 {
3601 // We allow DiracKernels to request that they use_displaced_mesh,
3602 // but then be overridden when no displacements variables are
3603 // provided in the Mesh block. If that happened, update the value
3604 // of use_displaced_mesh appropriately for this DiracKernel.
3605 if (parameters.have_parameter<bool>("use_displaced_mesh"))
3606 parameters.set<bool>("use_displaced_mesh") = false;
3607 }
3608
3609 parameters.set<SubProblem *>("_subproblem") = this;
3610 parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3611 }
3612
3613 logAdd("DiracKernel", name, kernel_name, parameters);
3614 _nl[nl_sys_num]->addDiracKernel(kernel_name, name, parameters);
3615}

◆ addDisplacedProblem()

void FEProblemBase::addDisplacedProblem ( std::shared_ptr< DisplacedProblem >  displaced_problem)
virtual

Definition at line 8722 of file FEProblemBase.C.

8723{
8724 parallel_object_only();
8725
8728}
std::shared_ptr< DisplacedProblem > displaced_problem

◆ addDistribution()

void FEProblemBase::addDistribution ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

The following functions will enable MOOSE to have the capability to import distributions.

Definition at line 2915 of file FEProblemBase.C.

2918{
2919 parameters.set<std::string>("type") = type;
2920 addObject<Distribution>(type, name, parameters, /* threaded = */ false);
2921}

◆ addElementalFieldVariable()

void FEProblemBase::addElementalFieldVariable ( const std::string &  var_type,
const std::string &  var_name,
InputParameters &  params 
)
virtual

Add an elemental field variable for use in the adaptivity system.

Reimplemented in MFEMProblem.

Definition at line 3424 of file FEProblemBase.C.

3427{
3428 addAuxVariable(var_type, var_name, params);
3429}
virtual void addAuxVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
Canonical method for adding an auxiliary variable.

Referenced by AddElementalFieldAction::init().

◆ addFunction()

void FEProblemBase::addFunction ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 2716 of file FEProblemBase.C.

2719{
2720 parallel_object_only();
2721
2722 parameters.set<SubProblem *>("_subproblem") = this;
2723
2724 for (THREAD_ID tid = 0; tid < numThreads(); tid++)
2725 {
2726 std::shared_ptr<Function> func = _factory.create<Function>(type, name, parameters, tid);
2727 logAdd("Function", name, type, parameters);
2728 _functions.addObject(func, tid);
2729
2730 if (auto * const functor = dynamic_cast<Moose::FunctorBase<Real> *>(func.get()))
2731 {
2732 this->addFunctor(name, *functor, tid);
2734 _displaced_problem->addFunctor(name, *functor, tid);
2735 }
2736 else
2737 mooseError("Unrecognized function functor type");
2738 }
2739}
Base class for function objects.
Definition Function.h:30
Base class template for functor objects.
void addFunctor(const std::string &name, const Moose::FunctorBase< T > &functor, const THREAD_ID tid)
add a functor to the problem functor container

Referenced by getFunction().

◆ addFunctor()

template<typename T >
void SubProblem::addFunctor ( const std::string &  name,
const Moose::FunctorBase< T > &  functor,
const THREAD_ID  tid 
)
inherited

add a functor to the problem functor container

Definition at line 1371 of file SubProblem.h.

1374{
1375 constexpr bool added_functor_is_ad =
1376 !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1377
1378 mooseAssert(tid < _functors.size(), "Too large a thread ID");
1379
1380 auto & functor_to_request_info = _functor_to_request_info[tid];
1381 auto & functors = _functors[tid];
1382 auto it = functors.find("wraps_" + name);
1383 if (it != functors.end())
1384 {
1385 // We have this functor already. If it's a null functor, we want to replace it with the valid
1386 // functor we have now. If it's not then we'll add a new entry into the multimap and then we'll
1387 // error later if a user requests a functor because their request is ambiguous. This is the
1388 // reason that the functors container is a multimap: for nice error messages
1389 auto * const existing_wrapper_base =
1390 added_functor_is_ad ? std::get<2>(it->second).get() : std::get<1>(it->second).get();
1391 auto * const existing_wrapper = dynamic_cast<Moose::Functor<T> *>(existing_wrapper_base);
1392 if (existing_wrapper && existing_wrapper->template wrapsType<Moose::NullFunctor<T>>())
1393 {
1394 // Sanity check
1395 auto [request_info_it, request_info_end_it] = functor_to_request_info.equal_range(name);
1396 if (request_info_it == request_info_end_it)
1397 mooseError("We are wrapping a NullFunctor but we don't have any unfilled functor request "
1398 "info. This doesn't make sense.");
1399
1400 // Check for valid requests
1401 while (request_info_it != request_info_end_it)
1402 {
1403 auto & [requested_functor_is_ad, requestor_is_ad] = request_info_it->second;
1404 if (!requested_functor_is_ad && requestor_is_ad && added_functor_is_ad)
1405 mooseError("We are requesting a non-AD functor '" + name +
1406 "' from an AD object, but the true functor is AD. This means we could be "
1407 "dropping important derivatives. We will not allow this");
1408 // We're going to eventually check whether we've fulfilled all functor requests and our
1409 // check will be that the multimap is empty. This request is fulfilled, so erase it from the
1410 // map now
1411 request_info_it = functor_to_request_info.erase(request_info_it);
1412 }
1413
1414 // Ok we didn't have the functor before, so we will add it now
1415 std::get<0>(it->second) =
1417 existing_wrapper->assign(functor);
1418 // Finally we create the non-AD or AD complement of the just added functor
1419 if constexpr (added_functor_is_ad)
1420 {
1421 typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1422 auto * const existing_non_ad_wrapper_base = std::get<1>(it->second).get();
1423 auto * const existing_non_ad_wrapper =
1424 dynamic_cast<Moose::Functor<NonADType> *>(existing_non_ad_wrapper_base);
1425 mooseAssert(existing_non_ad_wrapper->template wrapsType<Moose::NullFunctor<NonADType>>(),
1426 "Both members of pair should have been wrapping a NullFunctor");
1427 existing_non_ad_wrapper->assign(
1428 std::make_unique<Moose::RawValueFunctor<NonADType>>(functor));
1429 }
1430 else
1431 {
1432 typedef typename Moose::ADType<T>::type ADType;
1433 auto * const existing_ad_wrapper_base = std::get<2>(it->second).get();
1434 auto * const existing_ad_wrapper =
1435 dynamic_cast<Moose::Functor<ADType> *>(existing_ad_wrapper_base);
1436 mooseAssert(existing_ad_wrapper->template wrapsType<Moose::NullFunctor<ADType>>(),
1437 "Both members of pair should have been wrapping a NullFunctor");
1438 existing_ad_wrapper->assign(std::make_unique<Moose::ADWrapperFunctor<ADType>>(functor));
1439 }
1440 return;
1441 }
1442 else if (!existing_wrapper)
1443 {
1444 // Functor was emplaced but the cast failed. This could be a double definition with
1445 // different types, or it could be a request with one type then a definition with another
1446 // type. Either way it is going to error later, but it is cleaner to catch it now
1447 mooseError("Functor '",
1448 name,
1449 "' is being added with return type '",
1450 MooseUtils::prettyCppType<T>(),
1451 "' but it has already been defined or requested with return type '",
1452 existing_wrapper_base->returnType(),
1453 "'.");
1454 }
1455 }
1456
1457 // We are a new functor, create the opposite ADType one and store it with other functors
1458 if constexpr (added_functor_is_ad)
1459 {
1460 typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1461 auto new_non_ad_wrapper = std::make_unique<Moose::Functor<NonADType>>(
1462 std::make_unique<Moose::RawValueFunctor<NonADType>>(functor));
1463 auto new_ad_wrapper = std::make_unique<Moose::Functor<T>>(functor);
1464 _functors[tid].emplace("wraps_" + name,
1465 std::make_tuple(SubProblem::TrueFunctorIs::AD,
1466 std::move(new_non_ad_wrapper),
1467 std::move(new_ad_wrapper)));
1468 }
1469 else
1470 {
1471 typedef typename Moose::ADType<T>::type ADType;
1472 auto new_non_ad_wrapper = std::make_unique<Moose::Functor<T>>((functor));
1473 auto new_ad_wrapper = std::make_unique<Moose::Functor<ADType>>(
1474 std::make_unique<Moose::ADWrapperFunctor<ADType>>(functor));
1475 _functors[tid].emplace("wraps_" + name,
1476 std::make_tuple(SubProblem::TrueFunctorIs::NONAD,
1477 std::move(new_non_ad_wrapper),
1478 std::move(new_ad_wrapper)));
1479 }
1480}
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition MooseBase.h:271
Wraps non-AD functors such that they can be used in objects that have requested the functor as AD.
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
A functor that serves as a placeholder during the simulation setup phase if a functor consumer reques...
std::vector< std::multimap< std::string, std::tuple< TrueFunctorIs, std::unique_ptr< Moose::FunctorEnvelopeBase >, std::unique_ptr< Moose::FunctorEnvelopeBase > > > > _functors
A container holding pointers to all the functors in our problem.
std::vector< std::multimap< std::string, std::pair< bool, bool > > > _functor_to_request_info
A multimap (for each thread) from unfilled functor requests to whether the requests were for AD funct...

Referenced by addFunction(), SubProblem::addPiecewiseByBlockLambdaFunctor(), and addUserObject().

◆ addFunctorMaterial()

void FEProblemBase::addFunctorMaterial ( const std::string &  functor_material_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 4150 of file FEProblemBase.C.

4153{
4154 parallel_object_only();
4155
4156 auto add_functor_materials = [&](const auto & parameters, const auto & name)
4157 {
4158 for (THREAD_ID tid = 0; tid < numThreads(); tid++)
4159 {
4160 // Create the general Block/Boundary MaterialBase object
4161 std::shared_ptr<MaterialBase> material =
4162 _factory.create<MaterialBase>(functor_material_name, name, parameters, tid);
4163 logAdd("FunctorMaterial", name, functor_material_name, parameters);
4164 _all_materials.addObject(material, tid);
4165 _materials.addObject(material, tid);
4166 }
4167 };
4168
4169 parameters.set<SubProblem *>("_subproblem") = this;
4170 add_functor_materials(parameters, name);
4172 {
4173 auto disp_params = parameters;
4174 disp_params.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4175 add_functor_materials(disp_params, name + "_displaced");
4176 }
4177}
MaterialBases compute MaterialProperties.

◆ addFVBC()

void FEProblemBase::addFVBC ( const std::string &  fv_bc_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3674 of file FEProblemBase.C.

3677{
3678 addObject<FVBoundaryCondition>(fv_bc_name, name, parameters);
3679}

Referenced by DiffusionFV::addFVBCs().

◆ addFVGradientMethod()

void FEProblemBase::addFVGradientMethod ( const std::string &  method_type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Add an FV gradient method.

Parameters
method_typeThe type of the method.
nameThe name of the method.
parametersThe input parameters of the method.

Definition at line 4794 of file FEProblemBase.C.

4797{
4798 parallel_object_only();
4799
4801
4802 for (const auto tid : make_range(libMesh::n_threads()))
4803 {
4804 auto method = _factory.create<FVGradientMethod>(method_type, name, parameters, tid);
4805 logAdd("FVGradientMethod", name, method_type, parameters);
4806 theWarehouse().add(method);
4807 }
4808}
void addObjectParamsHelper(InputParameters &params, const std::string &object_name, const std::string &var_param_name="variable")
Helper for setting the "_subproblem" and "_sys" parameters in addObject() and in addUserObject().
TheWarehouse & theWarehouse() const
Base class for linear finite-volume cell-gradient methods.
void add(std::shared_ptr< MooseObject > obj)
add adds a new object to the warehouse and stores attributes/metadata about it for running queries/fi...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
IntRange< T > make_range(T beg, T end)

◆ addFVInitialCondition()

void FEProblemBase::addFVInitialCondition ( const std::string &  ic_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Add an initial condition for a finite volume variables.

Parameters
ic_nameThe name of the boundary condition object
nameThe user-defined name from the input file
parametersThe input parameters for construction

Definition at line 3843 of file FEProblemBase.C.

3846{
3847 parallel_object_only();
3848
3849 // before we start to mess with the initial condition, we need to check parameters for errors.
3851 const std::string & var_name = parameters.get<VariableName>("variable");
3852
3853 // Forbid initial conditions on a restarted problem, as they would override the restart
3854 checkICRestartError(ic_name, name, var_name);
3855
3856 parameters.set<SubProblem *>("_subproblem") = this;
3857
3858 // field IC
3859 if (hasVariable(var_name))
3860 {
3861 for (THREAD_ID tid = 0; tid < numThreads(); ++tid)
3862 {
3863 auto & var = getVariable(
3865 parameters.set<SystemBase *>("_sys") = &var.sys();
3866 std::shared_ptr<FVInitialConditionBase> ic;
3867 if (var.isFV())
3868 ic = _factory.create<FVInitialCondition>(ic_name, name, parameters, tid);
3869 else
3870 mooseError(
3871 "Your variable for an FVInitialCondition needs to be an a finite volume variable!");
3872 _fv_ics.addObject(ic, tid);
3873 }
3874 }
3875 else
3876 mooseError("Variable '",
3877 var_name,
3878 "' requested in finite volume initial condition '",
3879 name,
3880 "' does not exist.");
3881}
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
void checkICRestartError(const std::string &ic_name, const std::string &name, const VariableName &var_name)
Checks if the variable of the initial condition is getting restarted and errors for specific cases.
This is a template class that implements the workhorse compute and computeNodal methods.
void addObject(std::shared_ptr< FVInitialConditionBase > object, THREAD_ID tid, bool recurse=true)
Add object to the warehouse.
void checkParams(const std::string &parsing_syntax)
This function checks parameters stored in the object to make sure they are in the correct state as th...
@ VAR_FIELD_ANY
Definition MooseTypes.h:781
@ VAR_ANY
Definition MooseTypes.h:772

◆ addFVInterfaceKernel()

void FEProblemBase::addFVInterfaceKernel ( const std::string &  fv_ik_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

We assume that variable1 and variable2 can live on different systems, in this case the user needs to create two interface kernels with flipped variables and parameters

Definition at line 3682 of file FEProblemBase.C.

3685{
3688 addObject<FVInterfaceKernel>(
3689 fv_ik_name, name, parameters, /*threaded=*/true, /*variable_param_name=*/"variable1");
3690}

◆ addFVInterpolationMethod()

void FEProblemBase::addFVInterpolationMethod ( const std::string &  method_type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Add an FV interpolation method.

Parameters
method_typeThe type of the method.
nameThe name of the method.
parametersThe input parameters of the method.

Definition at line 4777 of file FEProblemBase.C.

4780{
4781 parallel_object_only();
4782
4784
4785 for (const auto tid : make_range(numThreads()))
4786 {
4787 auto method = _factory.create<FVInterpolationMethod>(method_type, name, parameters, tid);
4788 logAdd("FVInterpolationMethod", name, method_type, parameters);
4789 theWarehouse().add(method);
4790 }
4791}
Registered base class for linear FV interpolation objects.

◆ addFVKernel()

void FEProblemBase::addFVKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3660 of file FEProblemBase.C.

3663{
3664 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3665 // FVElementalKernels are computed in the historically finite element threaded loops. They rely
3666 // on Assembly data like _current_elem. When we call reinit on the FEProblemBase we will only
3667 // reinit the DisplacedProblem and its associated Assembly objects if we mark this boolean as
3668 // true
3670 addObject<FVKernel>(fv_kernel_name, name, parameters);
3671}

Referenced by DiffusionFV::addFVKernels().

◆ addGhostedBoundary()

void FEProblemBase::addGhostedBoundary ( BoundaryID  boundary_id)
overridevirtual

Will make sure that all necessary elements from boundary_id are ghosted to this processor.

Implements SubProblem.

Definition at line 2335 of file FEProblemBase.C.

2336{
2337 _mesh.addGhostedBoundary(boundary_id);
2339 _displaced_mesh->addGhostedBoundary(boundary_id);
2340}
void addGhostedBoundary(BoundaryID boundary_id)
This will add the boundary ids to be ghosted to this processor.
Definition MooseMesh.C:3293

Referenced by DisplacedProblem::addGhostedBoundary().

◆ addGhostedElem()

void FEProblemBase::addGhostedElem ( dof_id_type  elem_id)
overridevirtual

Will make sure that all dofs connected to elem_id are ghosted to this processor.

Implements SubProblem.

Definition at line 2328 of file FEProblemBase.C.

2329{
2330 if (_mesh.elemPtr(elem_id)->processor_id() != processor_id())
2331 _ghosted_elems.insert(elem_id);
2332}
virtual Elem * elemPtr(const dof_id_type i)
Definition MooseMesh.C:3177
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
processor_id_type processor_id() const

Referenced by DisplacedProblem::addGhostedElem(), and NodalPatchRecovery::NodalPatchRecovery().

◆ addHDGKernel()

void FEProblemBase::addHDGKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3240 of file FEProblemBase.C.

3243{
3244 parallel_object_only();
3245 const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3246 if (!isSolverSystemNonlinear(nl_sys_num))
3247 mooseError("You are trying to add a HDGKernel to a linear variable/system, which is not "
3248 "supported at the moment!");
3250 kernel_name, name, parameters, nl_sys_num, "HDGKernel", _reinit_displaced_elem);
3251
3252 _nl[nl_sys_num]->addHDGKernel(kernel_name, name, parameters);
3253}

◆ addIndicator()

void FEProblemBase::addIndicator ( const std::string &  indicator_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 5840 of file FEProblemBase.C.

5843{
5844 parallel_object_only();
5845
5846 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5847 {
5848 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5849 parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5851 }
5852 else
5853 {
5854 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5855 {
5856 // We allow Indicators to request that they use_displaced_mesh,
5857 // but then be overridden when no displacements variables are
5858 // provided in the Mesh block. If that happened, update the value
5859 // of use_displaced_mesh appropriately for this Indicator.
5860 if (parameters.have_parameter<bool>("use_displaced_mesh"))
5861 parameters.set<bool>("use_displaced_mesh") = false;
5862 }
5863
5864 parameters.set<SubProblem *>("_subproblem") = this;
5865 parameters.set<SystemBase *>("_sys") = _aux.get();
5866 }
5867
5868 for (THREAD_ID tid = 0; tid < numThreads(); tid++)
5869 {
5870 std::shared_ptr<Indicator> indicator =
5871 _factory.create<Indicator>(indicator_name, name, parameters, tid);
5872 logAdd("Indicator", name, indicator_name, parameters);
5873 std::shared_ptr<InternalSideIndicatorBase> isi =
5874 std::dynamic_pointer_cast<InternalSideIndicatorBase>(indicator);
5875 if (isi)
5877 else
5878 _indicators.addObject(indicator, tid);
5879 }
5880}

◆ addInitialCondition()

void FEProblemBase::addInitialCondition ( const std::string &  ic_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 3783 of file FEProblemBase.C.

3786{
3787 parallel_object_only();
3788
3789 // before we start to mess with the initial condition, we need to check parameters for errors.
3791 const std::string & var_name = parameters.get<VariableName>("variable");
3792
3793 // Forbid initial conditions on a restarted problem, as they would override the restart
3794 checkICRestartError(ic_name, name, var_name);
3795
3796 parameters.set<SubProblem *>("_subproblem") = this;
3797
3798 // field IC
3799 if (hasVariable(var_name))
3800 {
3801 for (THREAD_ID tid = 0; tid < numThreads(); ++tid)
3802 {
3805 parameters.set<SystemBase *>("_sys") = &var.sys();
3806 std::shared_ptr<InitialConditionBase> ic;
3807 if (dynamic_cast<MooseVariable *>(&var))
3808 ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3809 else if (dynamic_cast<VectorMooseVariable *>(&var))
3811 else if (dynamic_cast<ArrayMooseVariable *>(&var))
3812 ic = _factory.create<ArrayInitialCondition>(ic_name, name, parameters, tid);
3813 else if (dynamic_cast<MooseVariableFVReal *>(&var))
3814 ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3815 else if (dynamic_cast<MooseLinearVariableFVReal *>(&var))
3816 ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3817 else
3818 mooseError("Your FE variable in initial condition ",
3819 name,
3820 " must be either of scalar or vector type");
3821 logAdd("IC", name, ic_name, parameters);
3822 _ics.addObject(ic, tid);
3823 }
3824 }
3825
3826 // scalar IC
3827 else if (hasScalarVariable(var_name))
3828 {
3829 MooseVariableScalar & var = getScalarVariable(0, var_name);
3830 parameters.set<SystemBase *>("_sys") = &var.sys();
3831 std::shared_ptr<ScalarInitialCondition> ic =
3833 logAdd("ScalarIC", name, ic_name, parameters);
3835 }
3836
3837 else
3838 mooseError(
3839 "Variable '", var_name, "' requested in initial condition '", name, "' does not exist.");
3840}
ScalarInitialConditionWarehouse _scalar_ics
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided.
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the scalar variable reference from whichever system contains it.
This is a template class that implements the workhorse compute and computeNodal methods.
void addObject(std::shared_ptr< InitialConditionBase > object, THREAD_ID tid, bool recurse=true)
Add object to the warehouse.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
SystemBase & sys()
Get the system this variable is part of.
This class provides an interface for common operations on field variables of both FE and FV types wit...
Class for scalar variables (they are different).
InitialConditions are objects that set the initial value of variables.

Referenced by DiffusionPhysicsBase::addInitialConditions(), and DiffusionPhysicsBase::addInitialConditionsFromComponents().

◆ addInterfaceKernel()

void FEProblemBase::addInterfaceKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3711 of file FEProblemBase.C.

3714{
3715 parallel_object_only();
3716
3717 const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3718 if (!isSolverSystemNonlinear(nl_sys_num))
3719 mooseError("You are trying to add a InterfaceKernel to a linear variable/system, which is not "
3720 "supported at the moment!");
3721
3722 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3723 {
3724 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3725 parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3727 }
3728 else
3729 {
3730 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3731 {
3732 // We allow InterfaceKernels to request that they use_displaced_mesh,
3733 // but then be overridden when no displacements variables are
3734 // provided in the Mesh block. If that happened, update the value
3735 // of use_displaced_mesh appropriately for this InterfaceKernel.
3736 if (parameters.have_parameter<bool>("use_displaced_mesh"))
3737 parameters.set<bool>("use_displaced_mesh") = false;
3738 }
3739
3740 parameters.set<SubProblem *>("_subproblem") = this;
3741 parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3742 }
3743
3744 logAdd("InterfaceKernel", name, interface_kernel_name, parameters);
3745 _nl[nl_sys_num]->addInterfaceKernel(interface_kernel_name, name, parameters);
3746
3748}

◆ addInterfaceMaterial()

void FEProblemBase::addInterfaceMaterial ( const std::string &  material_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 4188 of file FEProblemBase.C.

4191{
4193}
virtual void addMaterialHelper(std::vector< MaterialWarehouse * > warehouse, const std::string &material_name, const std::string &name, InputParameters &parameters)

◆ addJacobian()

void FEProblemBase::addJacobian ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 2172 of file FEProblemBase.C.

2173{
2176 _assembly[tid][_current_nl_sys->number()]->addJacobianNonlocal(Assembly::GlobalDataKey{});
2178 {
2179 _displaced_problem->addJacobian(tid);
2181 _displaced_problem->addJacobianNonlocal(tid);
2182 }
2183}

Referenced by ComputeDiracThread::postElement().

◆ addJacobianBlockTags()

void FEProblemBase::addJacobianBlockTags ( libMesh::SparseMatrix< libMesh::Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const DofMap &  dof_map,
std::vector< dof_id_type > &  dof_indices,
const std::set< TagID > &  tags,
const THREAD_ID  tid 
)
virtual

Definition at line 2247 of file FEProblemBase.C.

2254{
2255 _assembly[tid][_current_nl_sys->number()]->addJacobianBlockTags(
2256 jacobian, ivar, jvar, dof_map, dof_indices, Assembly::GlobalDataKey{}, tags);
2257
2259 if (_nonlocal_cm[_current_nl_sys->number()](ivar, jvar) != 0)
2260 {
2262 _assembly[tid][_current_nl_sys->number()]->addJacobianBlockNonlocalTags(
2263 jacobian,
2264 ivar,
2265 jvar,
2266 dof_map,
2267 dof_indices,
2268 jv.allDofIndices(),
2270 tags);
2271 }
2272
2274 {
2275 _displaced_problem->addJacobianBlockTags(jacobian, ivar, jvar, dof_map, dof_indices, tags, tid);
2277 if (_nonlocal_cm[_current_nl_sys->number()](ivar, jvar) != 0)
2278 {
2280 _displaced_problem->addJacobianBlockNonlocal(
2281 jacobian, ivar, jvar, dof_map, dof_indices, jv.allDofIndices(), tags, tid);
2282 }
2283 }
2284}
const std::vector< dof_id_type > & allDofIndices() const
Get all global dofindices for the variable.
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition SystemBase.C:92

Referenced by ComputeJacobianBlocksThread::postElement().

◆ addJacobianLowerD()

void FEProblemBase::addJacobianLowerD ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 2202 of file FEProblemBase.C.

2203{
2204 _assembly[tid][_current_nl_sys->number()]->addJacobianLowerD(Assembly::GlobalDataKey{});
2206 _displaced_problem->addJacobianLowerD(tid);
2207}

Referenced by ComputeJacobianThread::accumulateLower(), and ComputeResidualAndJacobianThread::accumulateLower().

◆ addJacobianNeighbor() [1/3]

void FEProblemBase::addJacobianNeighbor ( const THREAD_ID  tid)
overridevirtual

◆ addJacobianNeighbor() [2/3]

virtual void FEProblemBase::addJacobianNeighbor ( libMesh::SparseMatrix< libMesh::Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const DofMap &  dof_map,
std::vector< dof_id_type > &  dof_indices,
std::vector< dof_id_type > &  neighbor_dof_indices,
const std::set< TagID > &  tags,
const THREAD_ID  tid 
)
overridevirtual

◆ addJacobianNeighbor() [3/3]

virtual void SubProblem::addJacobianNeighbor ( libMesh::SparseMatrix< libMesh::Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const libMesh::DofMap &  dof_map,
std::vector< dof_id_type > &  dof_indices,
std::vector< dof_id_type > &  neighbor_dof_indices,
const std::set< TagID > &  tags,
const THREAD_ID  tid 
)
pure virtualinherited

◆ addJacobianNeighborLowerD()

void FEProblemBase::addJacobianNeighborLowerD ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 2194 of file FEProblemBase.C.

2195{
2196 _assembly[tid][_current_nl_sys->number()]->addJacobianNeighborLowerD(Assembly::GlobalDataKey{});
2198 _displaced_problem->addJacobianNeighborLowerD(tid);
2199}

Referenced by ComputeJacobianThread::accumulateNeighborLower(), and ComputeResidualAndJacobianThread::accumulateNeighborLower().

◆ addJacobianOffDiagScalar()

void FEProblemBase::addJacobianOffDiagScalar ( unsigned int  ivar,
const THREAD_ID  tid = 0 
)
virtual

Definition at line 2216 of file FEProblemBase.C.

2217{
2218 _assembly[tid][_current_nl_sys->number()]->addJacobianOffDiagScalar(ivar,
2220}

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

◆ addJacobianScalar()

void FEProblemBase::addJacobianScalar ( const THREAD_ID  tid = 0)
virtual

Definition at line 2210 of file FEProblemBase.C.

2211{
2212 _assembly[tid][_current_nl_sys->number()]->addJacobianScalar(Assembly::GlobalDataKey{});
2213}

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

◆ addKernel()

void FEProblemBase::addKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 3224 of file FEProblemBase.C.

3227{
3228 parallel_object_only();
3229 const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3230 if (!isSolverSystemNonlinear(nl_sys_num))
3231 mooseError("You are trying to add a Kernel to a linear variable/system, which is not "
3232 "supported at the moment!");
3234 kernel_name, name, parameters, nl_sys_num, "Kernel", _reinit_displaced_elem);
3235
3236 _nl[nl_sys_num]->addKernel(kernel_name, name, parameters);
3237}

Referenced by DiffusionCG::addFEKernels().

◆ addKokkosAuxKernel()

virtual void FEProblemBase::addKokkosAuxKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addKokkosBoundaryCondition()

virtual void FEProblemBase::addKokkosBoundaryCondition ( const std::string &  bc_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addKokkosFunction()

virtual void FEProblemBase::addKokkosFunction ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Add a Kokkos function to the problem.

Parameters
typeThe Kokkos function type
nameThe Kokkos function name
parametersThe Kokkos function input parameters

Referenced by getKokkosFunction().

◆ addKokkosKernel()

virtual void FEProblemBase::addKokkosKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addKokkosLinearFVBC()

virtual void FEProblemBase::addKokkosLinearFVBC ( const std::string &  bc_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addKokkosLinearFVKernel()

virtual void FEProblemBase::addKokkosLinearFVKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addKokkosMaterial()

virtual void FEProblemBase::addKokkosMaterial ( const std::string &  material_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addKokkosMeshInitializationHook()

void FEProblemBase::addKokkosMeshInitializationHook ( std::function< void()>  function)
inline

Add a function hook that needs to be called after Kokkos mesh initialization.

Parameters
functionThe function to be called

Definition at line 3087 of file FEProblemBase.h.

3088 {
3089 _kokkos_mesh_initialization_hooks.push_back(function);
3090 }
std::vector< std::function< void()> > _kokkos_mesh_initialization_hooks
Container holding hooks for functions that need to be called after Kokkos mesh initialization.

Referenced by BlockRestrictable::initializeBlockRestrictable(), and BoundaryRestrictable::initializeBoundaryRestrictable().

◆ addKokkosNodalKernel()

virtual void FEProblemBase::addKokkosNodalKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addKokkosPostprocessor()

virtual void FEProblemBase::addKokkosPostprocessor ( const std::string &  pp_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addKokkosReporter()

virtual void FEProblemBase::addKokkosReporter ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addKokkosUserObject()

virtual void FEProblemBase::addKokkosUserObject ( const std::string &  user_object_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addKokkosVectorPostprocessor()

virtual void FEProblemBase::addKokkosVectorPostprocessor ( const std::string &  pp_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

◆ addLinearFVBC()

void FEProblemBase::addLinearFVBC ( const std::string &  fv_bc_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3701 of file FEProblemBase.C.

3704{
3705 addObject<LinearFVBoundaryCondition>(bc_name, name, parameters);
3706}

◆ addLinearFVKernel()

void FEProblemBase::addLinearFVKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3693 of file FEProblemBase.C.

3696{
3697 addObject<LinearFVKernel>(kernel_name, name, parameters);
3698}

◆ addLineSearch()

virtual void FEProblemBase::addLineSearch ( const InputParameters &  )
inlinevirtual

add a MOOSE line search

Reimplemented in DumpObjectsProblem, and FEProblem.

Definition at line 838 of file FEProblemBase.h.

839 {
840 mooseError("Line search not implemented for this problem type yet.");
841 }

Referenced by FEProblemSolve::FEProblemSolve().

◆ addMarker()

void FEProblemBase::addMarker ( const std::string &  marker_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 5883 of file FEProblemBase.C.

5886{
5887 parallel_object_only();
5888
5889 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5890 {
5891 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5892 parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5894 }
5895 else
5896 {
5897 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5898 {
5899 // We allow Markers to request that they use_displaced_mesh,
5900 // but then be overridden when no displacements variables are
5901 // provided in the Mesh block. If that happened, update the value
5902 // of use_displaced_mesh appropriately for this Marker.
5903 if (parameters.have_parameter<bool>("use_displaced_mesh"))
5904 parameters.set<bool>("use_displaced_mesh") = false;
5905 }
5906
5907 parameters.set<SubProblem *>("_subproblem") = this;
5908 parameters.set<SystemBase *>("_sys") = _aux.get();
5909 }
5910
5911 for (THREAD_ID tid = 0; tid < numThreads(); tid++)
5912 {
5913 std::shared_ptr<Marker> marker = _factory.create<Marker>(marker_name, name, parameters, tid);
5914 logAdd("Marker", name, marker_name, parameters);
5915 _markers.addObject(marker, tid);
5916 }
5917}

◆ addMaterial()

void FEProblemBase::addMaterial ( const std::string &  material_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 4180 of file FEProblemBase.C.

4183{
4185}

Referenced by ComponentMaterialPropertyInterface::addMaterials().

◆ addMaterialHelper()

void FEProblemBase::addMaterialHelper ( std::vector< MaterialWarehouse * >  warehouse,
const std::string &  material_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 4196 of file FEProblemBase.C.

4200{
4201 parallel_object_only();
4202
4203 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4204 {
4205 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4207 }
4208 else
4209 {
4210 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
4211 {
4212 // We allow Materials to request that they use_displaced_mesh,
4213 // but then be overridden when no displacements variables are
4214 // provided in the Mesh block. If that happened, update the value
4215 // of use_displaced_mesh appropriately for this Material.
4216 if (parameters.have_parameter<bool>("use_displaced_mesh"))
4217 parameters.set<bool>("use_displaced_mesh") = false;
4218 }
4219
4220 parameters.set<SubProblem *>("_subproblem") = this;
4221 }
4222
4223 unsigned int n_threads = numThreads();
4224
4225#ifdef MOOSE_KOKKOS_ENABLED
4227 n_threads = 1;
4228#endif
4229
4230 for (THREAD_ID tid = 0; tid < n_threads; tid++)
4231 {
4232 // Create the general Block/Boundary MaterialBase object
4233 std::shared_ptr<MaterialBase> material =
4234 _factory.create<MaterialBase>(mat_name, name, parameters, tid);
4235 logAdd("Material", name, mat_name, parameters);
4236 bool discrete = !material->getParam<bool>("compute");
4237
4238 // If the object is boundary restricted or if it is a functor material we do not create the
4239 // neighbor and face objects
4240 if (material->boundaryRestricted() || dynamic_cast<FunctorMaterial *>(material.get()))
4241 {
4242 _all_materials.addObject(material, tid);
4243 if (discrete)
4244 _discrete_materials.addObject(material, tid);
4245 else
4246 for (auto && warehouse : warehouses)
4247 warehouse->addObject(material, tid);
4248 }
4249
4250 // Non-boundary restricted require face and neighbor objects
4251 else
4252 {
4253 // TODO: we only need to do this if we have needs for face materials (e.g.
4254 // FV, DG, etc.) - but currently we always do it. Figure out how to fix
4255 // this.
4256
4257 // The name of the object being created, this is changed multiple times as objects are
4258 // created below
4259 std::string object_name;
4260
4261 // Create a copy of the supplied parameters to the setting for "_material_data_type" isn't
4262 // used from a previous tid loop
4263 InputParameters current_parameters = parameters;
4264
4265 // face material
4266 current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
4268 object_name = name + "_face";
4269 std::shared_ptr<MaterialBase> face_material =
4270 _factory.create<MaterialBase>(mat_name, object_name, current_parameters, tid);
4271
4272 // neighbor material
4273 current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
4275 current_parameters.set<bool>("_neighbor") = true;
4276 object_name = name + "_neighbor";
4277 std::shared_ptr<MaterialBase> neighbor_material =
4278 _factory.create<MaterialBase>(mat_name, object_name, current_parameters, tid);
4279
4280 // Store the material objects
4281 _all_materials.addObjects(material, neighbor_material, face_material, tid);
4282
4283 if (discrete)
4284 _discrete_materials.addObjects(material, neighbor_material, face_material, tid);
4285 else
4286 for (auto && warehouse : warehouses)
4287 warehouse->addObjects(material, neighbor_material, face_material, tid);
4288
4289 // Names of all controllable parameters for this Material object
4290 const std::string & base = parameters.getBase();
4291 MooseObjectParameterName name(MooseObjectName(base, material->name()), "*");
4292 const auto param_names =
4294
4295 // Connect parameters of the primary Material object to those on the face and neighbor
4296 // objects
4297 for (const auto & p_name : param_names)
4298 {
4299 MooseObjectParameterName primary_name(MooseObjectName(base, material->name()),
4300 p_name.parameter());
4301 MooseObjectParameterName face_name(MooseObjectName(base, face_material->name()),
4302 p_name.parameter());
4303 MooseObjectParameterName neighbor_name(MooseObjectName(base, neighbor_material->name()),
4304 p_name.parameter());
4306 primary_name, face_name, false);
4308 primary_name, neighbor_name, false);
4309 }
4310 }
4311 }
4312}
std::vector< std::shared_ptr< T > > addObject(const std::string &type, const std::string &name, InputParameters &parameters, const bool threaded=true, const std::string &var_param_name="variable")
Method for creating and adding an object to the warehouse.
FunctorMaterials compute functor material properties.
std::vector< MooseObjectParameterName > getControllableParameterNames(const MooseObjectParameterName &input) const
Return a vector of parameters names matching the supplied name.
void addControllableParameterConnection(const MooseObjectParameterName &primary, const MooseObjectParameterName &secondary, bool error_on_empty=true)
Method for linking control parameters of different names.
bool isKokkosObject() const
Returns whether this InputParameters belongs to a Kokkos object Checks whether MooseBase::kokkos_obje...
const std::string & getBase() const
void addObjects(std::shared_ptr< MaterialBase > block, std::shared_ptr< MaterialBase > neighbor, std::shared_ptr< MaterialBase > face, THREAD_ID tid=0)
A special method unique to this class for adding Block, Neighbor, and Face material objects.
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition MooseApp.C:2876
A class for storing the names of MooseObject by tag and object name.
A class for storing an input parameter name.
MaterialDataType
MaterialData types.
Definition MooseTypes.h:746
@ NEIGHBOR_MATERIAL_DATA
Definition MooseTypes.h:750
@ FACE_MATERIAL_DATA
Definition MooseTypes.h:749

Referenced by addInterfaceMaterial(), and addMaterial().

◆ addMatrixTag()

TagID SubProblem::addMatrixTag ( TagName  tag_name)
virtualinherited

Create a Tag.

Tags can be associated with Vectors and Matrices and allow objects (such as Kernels) to arbitrarily contribute values to any set of vectors/matrics

Note: If the tag is already present then this will simply return the TagID of that Tag

Parameters
tag_nameThe name of the tag to create, the TagID will get automatically generated

Reimplemented in DisplacedProblem.

Definition at line 303 of file SubProblem.C.

304{
305 auto tag_name_upper = MooseUtils::toUpper(tag_name);
306 auto existing_tag = _matrix_tag_name_to_tag_id.find(tag_name_upper);
307 if (existing_tag == _matrix_tag_name_to_tag_id.end())
308 {
309 auto tag_id = _matrix_tag_name_to_tag_id.size();
310
311 _matrix_tag_name_to_tag_id[tag_name_upper] = tag_id;
312
313 _matrix_tag_id_to_tag_name[tag_id] = tag_name_upper;
314 }
315
316 return _matrix_tag_name_to_tag_id.at(tag_name_upper);
317}
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
std::string toUpper(std::string name)
Convert supplied string to upper case.

Referenced by DisplacedProblem::addMatrixTag(), createTagMatrices(), LinearSystem::LinearSystem(), NonlinearEigenSystem::NonlinearEigenSystem(), and NonlinearSystemBase::NonlinearSystemBase().

◆ addMeshDivision()

void FEProblemBase::addMeshDivision ( const std::string &  type,
const std::string &  name,
InputParameters &  params 
)
virtual

Add a MeshDivision.

Definition at line 2870 of file FEProblemBase.C.

2873{
2874 parallel_object_only();
2875 parameters.set<FEProblemBase *>("_fe_problem_base") = this;
2876 parameters.set<SubProblem *>("_subproblem") = this;
2877 for (THREAD_ID tid = 0; tid < numThreads(); tid++)
2878 {
2879 std::shared_ptr<MeshDivision> func = _factory.create<MeshDivision>(type, name, parameters, tid);
2880 _mesh_divisions.addObject(func, tid);
2881 }
2882}
Base class for MeshDivision objects.

◆ addMultiApp()

void FEProblemBase::addMultiApp ( const std::string &  multi_app_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Add a MultiApp to the problem.

Definition at line 5920 of file FEProblemBase.C.

5923{
5924 parallel_object_only();
5925
5926 parameters.set<MPI_Comm>("_mpi_comm") = _communicator.get();
5927
5928 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5929 {
5930 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5931 parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5933 }
5934 else
5935 {
5936 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5937 {
5938 // We allow MultiApps to request that they use_displaced_mesh,
5939 // but then be overridden when no displacements variables are
5940 // provided in the Mesh block. If that happened, update the value
5941 // of use_displaced_mesh appropriately for this MultiApp.
5942 if (parameters.have_parameter<bool>("use_displaced_mesh"))
5943 parameters.set<bool>("use_displaced_mesh") = false;
5944 }
5945
5946 parameters.set<SubProblem *>("_subproblem") = this;
5947 parameters.set<SystemBase *>("_sys") = _aux.get();
5948 }
5949
5950 std::shared_ptr<MultiApp> multi_app = _factory.create<MultiApp>(multi_app_name, name, parameters);
5951 logAdd("MultiApp", name, multi_app_name, parameters);
5952 multi_app->possiblyCreateChildApplications();
5953
5954 _multi_apps.addObject(multi_app);
5955
5956 // Store TransientMultiApp objects in another container, this is needed for calling computeDT
5957 std::shared_ptr<TransientMultiApp> trans_multi_app =
5958 std::dynamic_pointer_cast<TransientMultiApp>(multi_app);
5959 if (trans_multi_app)
5960 _transient_multi_apps.addObject(trans_multi_app);
5961}
void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
A MultiApp represents one or more MOOSE applications that are running simultaneously.
Definition MultiApp.h:140
const Parallel::Communicator & _communicator

◆ addNodalKernel()

void FEProblemBase::addNodalKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3256 of file FEProblemBase.C.

3259{
3260 parallel_object_only();
3261
3262 const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3263 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3264 {
3265 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3266 parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3268 }
3269 else
3270 {
3271 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3272 {
3273 // We allow NodalKernels to request that they use_displaced_mesh,
3274 // but then be overridden when no displacements variables are
3275 // provided in the Mesh block. If that happened, update the value
3276 // of use_displaced_mesh appropriately for this NodalKernel.
3277 if (parameters.have_parameter<bool>("use_displaced_mesh"))
3278 parameters.set<bool>("use_displaced_mesh") = false;
3279 }
3280
3281 parameters.set<SubProblem *>("_subproblem") = this;
3282 parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3283 }
3284 logAdd("NodalKernel", name, kernel_name, parameters);
3285 _nl[nl_sys_num]->addNodalKernel(kernel_name, name, parameters);
3286}

◆ addNotZeroedVectorTag()

void SubProblem::addNotZeroedVectorTag ( const TagID  tag)
inherited

Adds a vector tag to the list of vectors that will not be zeroed when other tagged vectors are.

Parameters
tagthe TagID of the vector that will be manually managed

Definition at line 141 of file SubProblem.C.

142{
143 _not_zeroed_tagged_vectors.insert(tag);
144}
std::unordered_set< TagID > _not_zeroed_tagged_vectors
the list of vector tags that will not be zeroed when all other tags are

Referenced by createTagVectors().

◆ addObject()

template<typename T >
std::vector< std::shared_ptr< T > > FEProblemBase::addObject ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters,
const bool  threaded = true,
const std::string &  var_param_name = "variable" 
)

Method for creating and adding an object to the warehouse.

Template Parameters
TThe base object type (registered in the Factory)
Parameters
typeString type of the object (registered in the Factory)
nameName for the object to be created
parametersInputParameters for the object
threadedWhether or not to create n_threads copies of the object
var_param_nameThe name of the parameter on the object which holds the primary variable.
Returns
A vector of shared_ptrs to the added objects

Definition at line 3821 of file FEProblemBase.h.

3826{
3827 parallel_object_only();
3828
3829 logAdd(MooseUtils::prettyCppType<T>(), name, type, parameters);
3830 // Add the _subproblem and _sys parameters depending on use_displaced_mesh
3831 addObjectParamsHelper(parameters, name, var_param_name);
3832
3833 const auto n_threads = threaded ? this->numThreads() : 1;
3834 std::vector<std::shared_ptr<T>> objects(n_threads);
3835 for (THREAD_ID tid = 0; tid < n_threads; ++tid)
3836 {
3837 std::shared_ptr<T> obj = _factory.create<T>(type, name, parameters, tid);
3838 theWarehouse().add(obj);
3839 objects[tid] = std::move(obj);
3840 }
3841
3842 return objects;
3843}

◆ addObjectParamsHelper()

void FEProblemBase::addObjectParamsHelper ( InputParameters &  params,
const std::string &  object_name,
const std::string &  var_param_name = "variable" 
)
protected

Helper for setting the "_subproblem" and "_sys" parameters in addObject() and in addUserObject().

This is needed due to header includes/forward declaration issues

Definition at line 4597 of file FEProblemBase.C.

4600{
4601 // Due to objects like SolutionUserObject which manipulate libmesh objects
4602 // and variables directly at the back end, we need a default option here
4603 // which is going to be the pointer to the first solver system within this
4604 // problem
4605 unsigned int sys_num = 0;
4606 if (parameters.isParamValid(var_param_name))
4607 {
4608 const auto variable_name = parameters.varName(var_param_name, object_name);
4609 if (this->hasVariable(variable_name) || this->hasScalarVariable(variable_name))
4610 sys_num = getSystem(variable_name).number();
4611 }
4612 if (parameters.isParamValid("solver_sys"))
4613 {
4614 const auto var_sys_num = sys_num;
4615 sys_num = getSystemBase(parameters.get<SolverSystemName>("solver_sys")).number();
4616 if (sys_num != var_sys_num && parameters.isParamValid(var_param_name))
4617 mooseError("We dont support setting 'variable' to a variable that is not set to the same "
4618 "system as the 'solver_sys' parameter");
4619 }
4620
4621 if (_displaced_problem && parameters.have_parameter<bool>("use_displaced_mesh") &&
4622 parameters.get<bool>("use_displaced_mesh"))
4623 {
4624 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4625 if (sys_num == _aux->number())
4626 parameters.set<SystemBase *>("_sys") = &_displaced_problem->systemBaseAuxiliary();
4627 else
4628 parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(sys_num);
4629 }
4630 else
4631 {
4632 // The object requested use_displaced_mesh, but it was overridden
4633 // due to there being no displacements variables in the [Mesh] block.
4634 // If that happened, update the value of use_displaced_mesh appropriately.
4635 if (!_displaced_problem && parameters.have_parameter<bool>("use_displaced_mesh") &&
4636 parameters.get<bool>("use_displaced_mesh"))
4637 parameters.set<bool>("use_displaced_mesh") = false;
4638
4639 parameters.set<SubProblem *>("_subproblem") = this;
4640
4641 if (sys_num == _aux->number())
4642 parameters.set<SystemBase *>("_sys") = _aux.get();
4643 else
4644 parameters.set<SystemBase *>("_sys") = _solver_systems[sys_num].get();
4645 }
4646}
virtual const SystemBase & getSystemBase(const unsigned int sys_num) const
Get constant reference to a system in this problem.
virtual libMesh::System & getSystem(const std::string &var_name) override
Returns the equation system containing the variable provided.
unsigned int number() const

Referenced by addFVGradientMethod(), addFVInterpolationMethod(), addObject(), and addUserObject().

◆ addOutput()

void FEProblemBase::addOutput ( const std::string &  object_type,
const std::string &  object_name,
InputParameters &  parameters 
)

Adds an Output object.

Definition at line 9871 of file FEProblemBase.C.

9874{
9875 parallel_object_only();
9876
9877 // Get a reference to the OutputWarehouse
9878 OutputWarehouse & output_warehouse = _app.getOutputWarehouse();
9879
9880 // Reject the reserved names for objects not built by MOOSE
9881 if (!parameters.get<bool>("_built_by_moose") && output_warehouse.isReservedName(object_name))
9882 mooseError("The name '", object_name, "' is a reserved name for output objects");
9883
9884 // Check that an object by the same name does not already exist; this must be done before the
9885 // object is created to avoid getting misleading errors from the Parser
9886 if (output_warehouse.hasOutput(object_name))
9887 mooseError("An output object named '", object_name, "' already exists");
9888
9889 // Add a pointer to the FEProblemBase class
9890 parameters.addPrivateParam<FEProblemBase *>("_fe_problem_base", this);
9891
9892 // --show-input should enable the display of the input file on the screen
9893 if (object_type == "Console" && _app.getParam<bool>("show_input") &&
9894 parameters.get<bool>("output_screen"))
9895 parameters.set<ExecFlagEnum>("execute_input_on") = EXEC_INITIAL;
9896
9897 // Record whether this object's own block set 'file_base' itself before a common 'file_base'
9898 // from the [Outputs] block, if any, is copied down onto it below -- that copy makes
9899 // 'file_base' look valid and user-set on this object even when only the common block set it
9900 // (see #4215), so this must be captured first.
9901 if (parameters.isParamDefined("_file_base_set_by_own_block"))
9902 parameters.set<bool>("_file_base_set_by_own_block") = parameters.isParamSetByUser("file_base");
9903
9904 // Apply only user-set parameters from the common [Outputs] block so that
9905 // each output type's own defaults are not overridden by common defaults.
9906 const InputParameters * common = output_warehouse.getCommonParameters();
9907 if (common)
9909
9910 // Set the correct value for the binary flag for XDA/XDR output
9911 if (object_type == "XDR")
9912 parameters.set<bool>("_binary") = true;
9913 else if (object_type == "XDA")
9914 parameters.set<bool>("_binary") = false;
9915
9916 // Adjust the checkpoint suffix if auto recovery was enabled
9917 if (object_name == "auto_recovery_checkpoint")
9918 parameters.set<std::string>("suffix") = "auto_recovery";
9919
9920 // Create the object and add it to the warehouse
9921 std::shared_ptr<Output> output = _factory.create<Output>(object_type, object_name, parameters);
9922 logAdd("Output", object_name, object_type, parameters);
9923 output_warehouse.addOutput(output);
9924}
const ExecFlagType EXEC_INITIAL
Definition Moose.C:31
A MultiMooseEnum object to hold "execute_on" flags.
bool isParamDefined(const std::string &name) const
Method returns true if the parameter is defined for any type.
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was set by the user.
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
void applyCommonUserSetParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
Variant of applyParameters that only applies parameters explicitly set by the user in common (i....
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition MooseApp.C:2418
Class for storing and utilizing output objects.
const InputParameters * getCommonParameters() const
Get a reference to the common output parameters.
bool isReservedName(const std::string &name)
Test if the given name is reserved.
bool hasOutput(const std::string &name) const
Returns true if the output object exists.
void addOutput(std::shared_ptr< Output > output)
Adds an existing output object to the warehouse.
Based class for output objects.
Definition Output.h:52

◆ addPiecewiseByBlockLambdaFunctor()

template<typename T , typename PolymorphicLambda >
const Moose::FunctorBase< T > & SubProblem::addPiecewiseByBlockLambdaFunctor ( const std::string &  name,
PolymorphicLambda  my_lammy,
const std::set< ExecFlagType > &  clearance_schedule,
const MooseMesh &  mesh,
const std::set< SubdomainID > &  block_ids,
const THREAD_ID  tid 
)
inherited

Add a functor that has block-wise lambda definitions, e.g.

the evaluations of the functor are based on a user-provided lambda expression.

Parameters
nameThe name of the functor to add
my_lammyThe lambda expression that will be called when the functor is evaluated
clearance_scheduleHow often to clear functor evaluations. The default value is always, which means that the functor will be re-evaluated every time it is called. If it is something other than always, than cached values may be returned
meshThe mesh on which this functor operates
block_idsThe blocks on which the lambda expression is defined
tidThe thread on which the functor we are adding will run
Returns
The added functor

Definition at line 1334 of file SubProblem.h.

1340{
1341 auto & pbblf_functors = _pbblf_functors[tid];
1342
1343 auto [it, first_time_added] =
1344 pbblf_functors.emplace(name,
1345 std::make_unique<PiecewiseByBlockLambdaFunctor<T>>(
1346 name, my_lammy, clearance_schedule, mesh, block_ids));
1347
1348 auto * functor = dynamic_cast<PiecewiseByBlockLambdaFunctor<T> *>(it->second.get());
1349 if (!functor)
1350 {
1351 if (first_time_added)
1352 mooseError("This should be impossible. If this was the first time we added the functor, then "
1353 "the dynamic cast absolutely should have succeeded");
1354 else
1355 mooseError("Attempted to add a lambda functor with the name '",
1356 name,
1357 "' but another lambda functor of that name returns a different type");
1358 }
1359
1360 if (first_time_added)
1361 addFunctor(name, *functor, tid);
1362 else
1363 // The functor already exists
1364 functor->setFunctor(mesh, block_ids, my_lammy);
1365
1366 return *functor;
1367}
A material property that is evaluated on-the-fly via calls to various overloads of operator()
std::vector< std::map< std::string, std::unique_ptr< Moose::FunctorAbstract > > > _pbblf_functors
Container to hold PiecewiseByBlockLambdaFunctors.
virtual MooseMesh & mesh()=0

Referenced by FunctorMaterial::addFunctorPropertyByBlocks().

◆ addPostprocessor()

void FEProblemBase::addPostprocessor ( const std::string &  pp_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 4670 of file FEProblemBase.C.

4673{
4674 checkUserObjectNameCollision(name, "Postprocessor");
4675
4676 addUserObject(pp_name, name, parameters);
4677}
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
void checkUserObjectNameCollision(const std::string &name, const std::string &type) const
Check for name collision between different user objects.

Referenced by MFEMProblem::addPostprocessor(), and DiffusionPhysicsBase::addPostprocessors().

◆ addPredictor()

void FEProblemBase::addPredictor ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 7713 of file FEProblemBase.C.

7716{
7717 parallel_object_only();
7718
7720 mooseError("Vector bounds cannot be used with LinearSystems!");
7721
7722 parameters.set<SubProblem *>("_subproblem") = this;
7723 std::shared_ptr<Predictor> predictor = _factory.create<Predictor>(type, name, parameters);
7724 logAdd("Predictor", name, type, parameters);
7725
7726 for (auto & nl : _nl)
7727 nl->setPredictor(predictor);
7728}
virtual std::size_t numLinearSystems() const override
virtual std::size_t numNonlinearSystems() const override
Base class for predictors.
Definition Predictor.h:29

Referenced by AB2PredictorCorrector::AB2PredictorCorrector().

◆ addReporter()

void FEProblemBase::addReporter ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Add a Reporter object to the simulation.

Parameters
typeC++ object type to construct
nameA uniquely identifying object name
parametersComplete parameters for the object to be created.

For an example use, refer to AddReporterAction.C/h

Definition at line 4690 of file FEProblemBase.C.

4693{
4695
4697}

Referenced by MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer().

◆ addResidual()

void FEProblemBase::addResidual ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 2057 of file FEProblemBase.C.

2058{
2061
2063 _displaced_problem->addResidual(tid);
2064}

Referenced by ComputeDiracThread::postElement().

◆ addResidualLower()

void FEProblemBase::addResidualLower ( const THREAD_ID  tid)
overridevirtual

◆ addResidualNeighbor()

void FEProblemBase::addResidualNeighbor ( const THREAD_ID  tid)
overridevirtual

◆ addResidualScalar()

void FEProblemBase::addResidualScalar ( const THREAD_ID  tid = 0)
virtual

Definition at line 2087 of file FEProblemBase.C.

2088{
2089 _assembly[tid][_current_nl_sys->number()]->addResidualScalar(Assembly::GlobalDataKey{},
2091}

Referenced by NonlinearSystemBase::computeResidualInternal().

◆ addSampler()

void FEProblemBase::addSampler ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

The following functions will enable MOOSE to have the capability to import Samplers.

Definition at line 2956 of file FEProblemBase.C.

2959{
2960 const auto samplers = addObject<Sampler>(type, name, parameters);
2961 for (auto & sampler : samplers)
2962 sampler->init();
2963}
virtual void init() override

◆ addScalarKernel()

void FEProblemBase::addScalarKernel ( const std::string &  kernel_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 3289 of file FEProblemBase.C.

3292{
3293 parallel_object_only();
3294
3295 const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3296 if (!isSolverSystemNonlinear(nl_sys_num))
3297 mooseError("You are trying to add a ScalarKernel to a linear variable/system, which is not "
3298 "supported at the moment!");
3299
3300 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3301 {
3302 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3303 parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3304 }
3305 else
3306 {
3307 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3308 {
3309 // We allow ScalarKernels to request that they use_displaced_mesh,
3310 // but then be overridden when no displacements variables are
3311 // provided in the Mesh block. If that happened, update the value
3312 // of use_displaced_mesh appropriately for this ScalarKernel.
3313 if (parameters.have_parameter<bool>("use_displaced_mesh"))
3314 parameters.set<bool>("use_displaced_mesh") = false;
3315 }
3316
3317 parameters.set<SubProblem *>("_subproblem") = this;
3318 parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3319 }
3320
3321 logAdd("ScalarKernel", name, kernel_name, parameters);
3322 _nl[nl_sys_num]->addScalarKernel(kernel_name, name, parameters);
3323}

◆ addTimeIntegrator()

void FEProblemBase::addTimeIntegrator ( const std::string &  type,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 7678 of file FEProblemBase.C.

7681{
7682 parallel_object_only();
7683
7684 parameters.set<SubProblem *>("_subproblem") = this;
7685 logAdd("TimeIntegrator", name, type, parameters);
7686 _aux->addTimeIntegrator(type, name + ":aux", parameters);
7687 for (auto & sys : _solver_systems)
7688 sys->addTimeIntegrator(type, name + ":" + sys->name(), parameters);
7689 _has_time_integrator = true;
7690
7691 // add vectors to store u_dot, u_dotdot, udot_old, u_dotdot_old and
7692 // solution vectors older than 2 time steps, if requested by the time
7693 // integrator
7694 _aux->addDotVectors();
7695 for (auto & nl : _nl)
7696 {
7697 nl->addDotVectors();
7698
7699 auto tag_udot = nl->getTimeIntegrators()[0]->uDotFactorTag();
7700 if (!nl->hasVector(tag_udot))
7701 nl->associateVectorToTag(*nl->solutionUDot(), tag_udot);
7702 auto tag_udotdot = nl->getTimeIntegrators()[0]->uDotDotFactorTag();
7703 if (!nl->hasVector(tag_udotdot) && uDotDotRequested())
7704 nl->associateVectorToTag(*nl->solutionUDotDot(), tag_udotdot);
7705 }
7706
7708 // Time integrator does not exist when displaced problem is created.
7709 _displaced_problem->addTimeIntegrator();
7710}
virtual void addTimeIntegrator(const std::string &type, const std::string &name, InputParameters &parameters)
virtual bool uDotDotRequested()
Get boolean flag to check whether solution second time derivative needs to be stored.

Referenced by TransientBase::setupTimeIntegrator().

◆ addTransfer()

void FEProblemBase::addTransfer ( const std::string &  transfer_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Add a Transfer to the problem.

Reimplemented in MFEMProblem.

Definition at line 6465 of file FEProblemBase.C.

6468{
6469 parallel_object_only();
6470
6471 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
6472 {
6473 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
6474 parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
6476 }
6477 else
6478 {
6479 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
6480 {
6481 // We allow Transfers to request that they use_displaced_mesh,
6482 // but then be overridden when no displacements variables are
6483 // provided in the Mesh block. If that happened, update the value
6484 // of use_displaced_mesh appropriately for this Transfer.
6485 if (parameters.have_parameter<bool>("use_displaced_mesh"))
6486 parameters.set<bool>("use_displaced_mesh") = false;
6487 }
6488
6489 parameters.set<SubProblem *>("_subproblem") = this;
6490 parameters.set<SystemBase *>("_sys") = _aux.get();
6491 }
6492
6493 // Handle the "SAME_AS_MULTIAPP" execute option. The get method is used to test for the
6494 // flag so the set by user flag is not reset, calling set with the true flag causes the set
6495 // by user status to be reset, which should only be done if the EXEC_SAME_AS_MULTIAPP is
6496 // being applied to the object.
6498 {
6499 ExecFlagEnum & exec_enum = parameters.set<ExecFlagEnum>("execute_on", true);
6500 std::shared_ptr<MultiApp> multiapp;
6501 if (parameters.isParamValid("multi_app"))
6502 multiapp = getMultiApp(parameters.get<MultiAppName>("multi_app"));
6503 // This catches the sibling transfer case, where we want to be executing only as often as the
6504 // receiving application. A transfer 'to' a multiapp is executed before that multiapp
6505 else if (parameters.isParamValid("to_multi_app"))
6506 multiapp = getMultiApp(parameters.get<MultiAppName>("to_multi_app"));
6507 else if (parameters.isParamValid("from_multi_app"))
6508 multiapp = getMultiApp(parameters.get<MultiAppName>("from_multi_app"));
6509 // else do nothing because the user has provided invalid input. They should get a nice error
6510 // about this during transfer construction. This necessitates checking for null in this next
6511 // line, however
6512 if (multiapp)
6513 exec_enum = multiapp->getParam<ExecFlagEnum>("execute_on");
6514 }
6515
6516 // Create the Transfer objects
6517 std::shared_ptr<Transfer> transfer = _factory.create<Transfer>(transfer_name, name, parameters);
6518 logAdd("Transfer", name, transfer_name, parameters);
6519
6520 // Add MultiAppTransfer object
6521 std::shared_ptr<MultiAppTransfer> multi_app_transfer =
6522 std::dynamic_pointer_cast<MultiAppTransfer>(transfer);
6523 if (multi_app_transfer)
6524 {
6525 if (multi_app_transfer->directions().isValueSet(MultiAppTransfer::TO_MULTIAPP))
6526 _to_multi_app_transfers.addObject(multi_app_transfer);
6527 if (multi_app_transfer->directions().isValueSet(MultiAppTransfer::FROM_MULTIAPP))
6528 _from_multi_app_transfers.addObject(multi_app_transfer);
6529 if (multi_app_transfer->directions().isValueSet(MultiAppTransfer::BETWEEN_MULTIAPP))
6530 _between_multi_app_transfers.addObject(multi_app_transfer);
6531 }
6532 else
6533 _transfers.addObject(transfer);
6534}
const ExecFlagType EXEC_SAME_AS_MULTIAPP
Definition Moose.C:56
std::shared_ptr< MultiApp > getMultiApp(const std::string &multi_app_name) const
Get a MultiApp object by name.
bool isValueSet(const std::string &value) const
Methods for seeing if a value is set in the MultiMooseEnum.
Base class for all Transfer objects.
Definition Transfer.h:40
@ FROM_MULTIAPP
Definition Transfer.h:71
@ TO_MULTIAPP
Definition Transfer.h:70
@ BETWEEN_MULTIAPP
Definition Transfer.h:72

Referenced by MFEMProblem::addTransfer().

◆ addUserObject()

std::vector< std::shared_ptr< UserObject > > FEProblemBase::addUserObject ( const std::string &  user_object_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Definition at line 4700 of file FEProblemBase.C.

4703{
4704 parallel_object_only();
4705
4706 std::vector<std::shared_ptr<UserObject>> uos;
4707
4708 // Add the _subproblem and _sys parameters depending on use_displaced_mesh
4710
4711 for (const auto tid : make_range(numThreads()))
4712 {
4713 // Create the UserObject
4714 std::shared_ptr<UserObject> user_object =
4715 _factory.create<UserObject>(user_object_name, name, parameters, tid);
4716 logAdd("UserObject", name, user_object_name, parameters);
4717 uos.push_back(user_object);
4718
4719 if (tid != 0)
4720 user_object->setPrimaryThreadCopy(uos[0].get());
4721
4722 theWarehouse().add(user_object);
4723
4724 // Attempt to create all the possible UserObject types
4725 auto euo = std::dynamic_pointer_cast<ElementUserObject>(user_object);
4726 auto suo = std::dynamic_pointer_cast<SideUserObject>(user_object);
4727 auto isuo = std::dynamic_pointer_cast<InternalSideUserObject>(user_object);
4728 auto iuo = std::dynamic_pointer_cast<InterfaceUserObjectBase>(user_object);
4729 auto nuo = std::dynamic_pointer_cast<NodalUserObject>(user_object);
4730 auto duo = std::dynamic_pointer_cast<DomainUserObject>(user_object);
4731 auto guo = std::dynamic_pointer_cast<GeneralUserObject>(user_object);
4732 auto tguo = std::dynamic_pointer_cast<ThreadedGeneralUserObject>(user_object);
4733 auto muo = std::dynamic_pointer_cast<MortarUserObject>(user_object);
4734
4735 // Account for displaced mesh use
4736 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4737 {
4738 // Whether to re-init or not depends on the attributes of the base classes.
4739 // For example, InterfaceUOBase has "_current_side_elem" and "_neighbor_elem"
4740 // so it needs to reinit on displaced neighbors and faces
4741 // _reinit_displaced_elem -> _current_elem will be reinited
4742 // _reinit_displaced_face -> _current_elem, lowerD if any and _current_side_elem to be
4743 // reinited _reinit_displaced_neighbor -> _current_elem, lowerD if any and _current_neighbor
4744 // to be reinited Note that as soon as you use materials on the displaced mesh, all three get
4745 // turned on.
4746 if (euo || nuo || duo)
4748 if (suo || duo || isuo || iuo)
4750 if (iuo || duo || isuo)
4752 }
4753
4754 // These objects only require one thread
4755 if ((guo && !tguo) || muo)
4756 break;
4757 }
4758
4759 // Add as a Functor if it is one. We usually need to add the user object from thread 0 as the
4760 // registered functor for all threads because when user objects are thread joined, generally only
4761 // the primary thread copy ends up with all the data
4762 for (const auto tid : make_range(numThreads()))
4763 {
4764 const decltype(uos)::size_type uo_index = uos.front()->needThreadedCopy() ? tid : 0;
4765 if (const auto functor = dynamic_cast<Moose::FunctorBase<Real> *>(uos[uo_index].get()))
4766 {
4767 this->addFunctor(name, *functor, tid);
4769 _displaced_problem->addFunctor(name, *functor, tid);
4770 }
4771 }
4772
4773 return uos;
4774}
Base class for user-specific data.
Definition UserObject.h:20

Referenced by addPostprocessor(), addReporter(), PhysicsBase::addUserObject(), and addVectorPostprocessor().

◆ addVariable()

void FEProblemBase::addVariable ( const std::string &  var_type,
const std::string &  var_name,
InputParameters &  params 
)
virtual

Canonical method for adding a non-linear variable.

Parameters
var_typethe type of the variable, e.g. MooseVariableScalar
var_namethe variable name, e.g. 'u'
paramsthe InputParameters from which to construct the variable

Reimplemented in MFEMEigenproblem, MFEMProblem, and DumpObjectsProblem.

Definition at line 3097 of file FEProblemBase.C.

3100{
3101 parallel_object_only();
3102
3103 const auto fe_type = MooseUtils::variableFEType(params);
3104
3105 const auto active_subdomains_vector =
3106 _mesh.getSubdomainIDs(params.get<std::vector<SubdomainName>>("block"));
3107 const std::set<SubdomainID> active_subdomains(active_subdomains_vector.begin(),
3108 active_subdomains_vector.end());
3109
3110 if (duplicateVariableCheck(var_name, fe_type, /* is_aux = */ false, &active_subdomains))
3111 return;
3112
3113 params.set<FEProblemBase *>("_fe_problem_base") = this;
3115 SolverSystemName sys_name = params.get<SolverSystemName>("solver_sys");
3116
3117 const auto solver_system_number = solverSysNum(sys_name);
3118 logAdd("Variable", var_name, var_type, params);
3119 _solver_systems[solver_system_number]->addVariable(var_type, var_name, params);
3121 // MooseObjects need to be unique so change the name here
3122 _displaced_problem->addVariable(var_type, var_name, params, solver_system_number);
3123
3124 _solver_var_to_sys_num[var_name] = solver_system_number;
3125}
unsigned int solverSysNum(const SolverSystemName &solver_sys_name) const override
std::map< SolverVariableName, unsigned int > _solver_var_to_sys_num
Map connecting variable names with their respective solver systems.
@ VAR_SOLVER
Definition MooseTypes.h:770

Referenced by MFEMProblem::addGridFunction(), DiffusionCG::addSolverVariables(), DiffusionFV::addSolverVariables(), and AddVariableAction::init().

◆ addVectorPostprocessor()

void FEProblemBase::addVectorPostprocessor ( const std::string &  pp_name,
const std::string &  name,
InputParameters &  parameters 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 4680 of file FEProblemBase.C.

4683{
4684 checkUserObjectNameCollision(name, "VectorPostprocessor");
4685
4686 addUserObject(pp_name, name, parameters);
4687}

Referenced by MFEMProblem::addVectorPostprocessor(), and ExtraIDIntegralReporter::ExtraIDIntegralReporter().

◆ addVectorTag()

TagID SubProblem::addVectorTag ( const TagName &  tag_name,
const Moose::VectorTagType  type = Moose::VECTOR_TAG_RESIDUAL 
)
virtualinherited

Create a Tag.

Tags can be associated with Vectors and Matrices and allow objects (such as Kernels) to arbitrarily contribute values to any set of vectors/matrics

Note: If the tag is already present then this will simply return the TagID of that Tag, but the type must be the same.

Parameters
tag_nameThe name of the tag to create, the TagID will get automatically generated
typeThe type of the tag

Reimplemented in DisplacedProblem.

Definition at line 84 of file SubProblem.C.

86{
88 mooseError("Vector tag type cannot be VECTOR_TAG_ANY");
89
90 const auto tag_name_upper = MooseUtils::toUpper(tag_name);
91
92 // First, see if the tag exists already
93 for (const auto & vector_tag : _vector_tags)
94 {
95 mooseAssert(_vector_tags[vector_tag._id] == vector_tag, "Vector tags index mismatch");
96 if (vector_tag._name == tag_name_upper)
97 {
98 if (vector_tag._type != type)
99 mooseError("While attempting to add vector tag with name '",
100 tag_name_upper,
101 "' and type ",
102 type,
103 ",\na tag with the same name but type ",
104 vector_tag._type,
105 " was found.\n\nA tag can only exist with one type.");
106
107 return vector_tag._id;
108 }
109 }
110
111 // Doesn't exist - create it
112 const TagID new_tag_id = _vector_tags.size();
113 const TagTypeID new_tag_type_id = _typed_vector_tags[type].size();
114 // Primary storage for all tags where the index in the vector == the tag ID
115 _vector_tags.emplace_back(new_tag_id, new_tag_type_id, tag_name_upper, type);
116 // Secondary storage for each type so that we can have quick access to all tags of a type
117 _typed_vector_tags[type].emplace_back(new_tag_id, new_tag_type_id, tag_name_upper, type);
118 // Name map storage for quick name access
119 _vector_tags_name_map.emplace(tag_name_upper, new_tag_id);
120
121 // Make sure that _vector_tags, _typed_vector_tags, and _vector_tags_name_map are sane
123
124 return new_tag_id;
125}
unsigned int TagID
Definition MooseTypes.h:238
unsigned int TagTypeID
Definition MooseTypes.h:239
std::vector< VectorTag > _vector_tags
The declared vector tags.
std::vector< std::vector< VectorTag > > _typed_vector_tags
The vector tags associated with each VectorTagType This is kept separate from _vector_tags for quick ...
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition SubProblem.C:233
@ VECTOR_TAG_ANY

Referenced by DisplacedProblem::addVectorTag(), PicardSolve::allocateStorage(), SecantSolve::allocateStorage(), SteffensenSolve::allocateStorage(), createTagSolutions(), createTagVectors(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), LinearSystem::LinearSystem(), SystemBase::needSolutionState(), NonlinearEigenSystem::NonlinearEigenSystem(), and NonlinearSystemBase::NonlinearSystemBase().

◆ advanceMultiApps()

void FEProblemBase::advanceMultiApps ( ExecFlagType  type)
inline

Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep depending on your purpose.

Definition at line 1755 of file FEProblemBase.h.

1756 {
1757 mooseDeprecated("Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep "
1758 "depending on your purpose");
1760 }
void finishMultiAppStep(ExecFlagType type, bool recurse_through_multiapp_levels=false)
Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType.

◆ advanceState()

void FEProblemBase::advanceState ( )
virtual

Advance all of the state holding vectors / datastructures so that we can move to the next timestep.

Reimplemented in DumpObjectsProblem.

Definition at line 7494 of file FEProblemBase.C.

7495{
7496 TIME_SECTION("advanceState", 5, "Advancing State");
7497
7498 for (auto & sys : _solver_systems)
7499 sys->advanceStateHistory(Moose::SolutionIterationType::Time);
7500 _aux->advanceStateHistory(Moose::SolutionIterationType::Time);
7501
7503 {
7504 for (const auto i : index_range(_solver_systems))
7505 _displaced_problem->solverSys(i).advanceStateHistory(Moose::SolutionIterationType::Time);
7506 _displaced_problem->auxSys().advanceStateHistory(Moose::SolutionIterationType::Time);
7507 }
7508
7510
7512
7515
7518
7521
7522#ifdef MOOSE_KOKKOS_ENABLED
7525
7528
7531#endif
7532
7534}
void copyValuesBack()
Copies current chain control data values into old values.
void backupGeometricSearchState()
Snapshot geometric search state (both on the regular and, if present, the displaced mesh) so it can b...
void shift()
Shift the material properties in time.
ChainControlDataSystem & getChainControlDataSystem()
Gets the system that manages the ChainControls.
Definition MooseApp.h:895
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition MooseBase.h:87
void shift()
Shift current, old, and older material property data storages.
void copyValuesBack()
At the end of a timestep this method is called to copy the values back in time in preparation for the...
SolutionIterationType
Definition MooseTypes.h:270

Referenced by Eigenvalue::execute(), SteadyBase::execute(), MFEMSteady::execute(), TransientBase::incrementStepOrReject(), NonlinearEigen::init(), TransientMultiApp::setupApp(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), TransientMultiApp::solveStep(), InversePowerMethod::takeStep(), and NonlinearEigen::takeStep().

◆ allowInvalidSolution()

bool FEProblemBase::allowInvalidSolution ( ) const
inline

Whether to accept / allow an invalid solution.

Definition at line 2478 of file FEProblemBase.h.

2478{ return _allow_invalid_solution; }

Referenced by acceptInvalidSolution().

◆ allowMeshContractionAfterMeshChanged()

virtual bool FEProblemBase::allowMeshContractionAfterMeshChanged ( ) const
inlinevirtual

Whether meshChanged() should allow the mesh to be contracted (deletes children of coarsened elements and renumbers nodes and elements).

This should be overriden with care as disabling contraction may result in a substantial increase in the memory footprint of the mesh.

Definition at line 2219 of file FEProblemBase.h.

2219{ return true; }

Referenced by meshChanged().

◆ allowOutput() [1/2]

void FEProblemBase::allowOutput ( bool  state)

Ability to enable/disable all output calls.

This is needed by Multiapps and applications to disable output for cases when executioners call other executions and when Multiapps are sub cycling.

Definition at line 7621 of file FEProblemBase.C.

7622{
7624}
void allowOutput(bool state)
Ability to enable/disable output calls This is private, users should utilize FEProblemBase::allowOutp...

Referenced by TransientMultiApp::resetApp(), and TransientMultiApp::solveStep().

◆ allowOutput() [2/2]

template<typename T >
void FEProblemBase::allowOutput ( bool  state)

Definition at line 3772 of file FEProblemBase.h.

3773{
3775}

◆ areCoupled()

bool FEProblemBase::areCoupled ( const unsigned int  ivar,
const unsigned int  jvar,
const unsigned int  nl_sys_num 
) const

◆ assembly() [1/2]

const Assembly & FEProblemBase::assembly ( const THREAD_ID  tid,
const unsigned int  sys_num 
) const
inlineoverridevirtual

Implements SubProblem.

Definition at line 3929 of file FEProblemBase.h.

3930{
3931 mooseAssert(tid < _assembly.size(), "Assembly objects not initialized");
3932 mooseAssert(sys_num < _assembly[tid].size(),
3933 "System number larger than the assembly container size");
3934 return *_assembly[tid][sys_num];
3935}

◆ assembly() [2/2]

Assembly & FEProblemBase::assembly ( const THREAD_ID  tid,
const unsigned int  sys_num 
)
inlineoverridevirtual

◆ automaticScaling() [1/3]

bool SubProblem::automaticScaling ( ) const

Automatic scaling getter.

Returns
A boolean representing whether we are performing automatic scaling

Definition at line 845 of file SubProblem.C.

1171{
1172 // Currently going to assume that we are applying or not applying automatic scaling consistently
1173 // across nonlinear systems
1175}
virtual const SystemBase & systemBaseNonlinear(const unsigned int sys_num) const override
Return the nonlinear system object as a base class reference given the system number.
bool automaticScaling() const
Getter for whether we are performing automatic scaling.
Definition SystemBase.h:126

◆ automaticScaling() [2/3]

void SubProblem::automaticScaling ( bool  automatic_scaling)
virtual

Automatic scaling setter.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Reimplemented from SubProblem.

Definition at line 839 of file SubProblem.C.

1164{
1165 for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1166 systemBaseNonlinear(nl_sys_num).automaticScaling(automatic_scaling);
1167}
bool automaticScaling() const
Automatic scaling getter.

◆ automaticScaling() [3/3]

void FEProblemBase::automaticScaling ( bool  automatic_scaling)
overridevirtual

Automatic scaling setter.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Reimplemented from SubProblem.

Definition at line 10057 of file FEProblemBase.C.

10058{
10060 _displaced_problem->automaticScaling(automatic_scaling);
10061
10062 SubProblem::automaticScaling(automatic_scaling);
10063}
bool automaticScaling() const
Automatic scaling getter.

Referenced by DisplacedProblem::DisplacedProblem(), and FEProblemSolve::FEProblemSolve().

◆ backupGeometricSearchState()

void FEProblemBase::backupGeometricSearchState ( )

Snapshot geometric search state (both on the regular and, if present, the displaced mesh) so it can be restored with restoreGeometricSearchState() if this step is later rejected.

Called from advanceState(), i.e. before this step's timestepSetup() has run.

Definition at line 7537 of file FEProblemBase.C.

7538{
7540
7542 _displaced_problem->geomSearchData().backup();
7543}
void backup()
Snapshot the PenetrationLocators' restartable state (the same state used for restart/recover),...

Referenced by advanceState().

◆ backupMultiApps()

void FEProblemBase::backupMultiApps ( ExecFlagType  type)

Backup the MultiApps associated with the ExecFlagType.

Definition at line 6400 of file FEProblemBase.C.

6401{
6402 const auto & multi_apps = _multi_apps[type].getActiveObjects();
6403
6404 if (multi_apps.size())
6405 {
6406 TIME_SECTION("backupMultiApps", 5, "Backing Up MultiApp");
6407
6409 _console << COLOR_CYAN << "\nBacking Up MultiApps on " << type.name() << COLOR_DEFAULT
6410 << std::endl;
6411
6412 for (const auto & multi_app : multi_apps)
6413 multi_app->backup();
6414
6416
6418 _console << COLOR_CYAN << "Finished Backing Up MultiApps on " << type.name() << "\n"
6419 << COLOR_DEFAULT << std::endl;
6420 }
6421}
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread.
void parallelBarrierNotify(const Parallel::Communicator &comm, bool messaging)
Definition MooseUtils.C:390

Referenced by FixedPointSolve::solve().

◆ bumpAllQRuleOrder()

void FEProblemBase::bumpAllQRuleOrder ( libMesh::Order  order,
SubdomainID  block 
)

Definition at line 6878 of file FEProblemBase.C.

6879{
6880 for (unsigned int tid = 0; tid < numThreads(); ++tid)
6881 for (const auto i : index_range(_nl))
6882 _assembly[tid][i]->bumpAllQRuleOrder(order, block);
6883
6885 _displaced_problem->bumpAllQRuleOrder(order, block);
6886
6887 updateMaxQps();
6888}
void bumpAllQRuleOrder(libMesh::Order order, SubdomainID block)

Referenced by bumpAllQRuleOrder().

◆ bumpVolumeQRuleOrder()

void FEProblemBase::bumpVolumeQRuleOrder ( libMesh::Order  order,
SubdomainID  block 
)

Increases the element/volume quadrature order for the specified mesh block if and only if the current volume quadrature order is lower.

This can only cause the quadrature level to increase. If volume_order is lower than or equal to the current volume/elem quadrature rule order, then nothing is done (i.e. this function is idempotent).

Definition at line 6865 of file FEProblemBase.C.

6866{
6867 for (unsigned int tid = 0; tid < numThreads(); ++tid)
6868 for (const auto i : index_range(_nl))
6869 _assembly[tid][i]->bumpVolumeQRuleOrder(order, block);
6870
6872 _displaced_problem->bumpVolumeQRuleOrder(order, block);
6873
6874 updateMaxQps();
6875}
void bumpVolumeQRuleOrder(libMesh::Order order, SubdomainID block)
Increases the element/volume quadrature order for the specified mesh block if and only if the current...

Referenced by bumpVolumeQRuleOrder().

◆ cacheJacobian()

void FEProblemBase::cacheJacobian ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 2223 of file FEProblemBase.C.

2224{
2227 _displaced_problem->cacheJacobian(tid);
2228}
virtual void cacheJacobian(const THREAD_ID tid)

Referenced by ComputeResidualAndJacobianThread::accumulate(), NonlinearSystemBase::constraintJacobians(), and ComputeJacobianThread::postElement().

◆ cacheJacobianNeighbor()

void FEProblemBase::cacheJacobianNeighbor ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 2231 of file FEProblemBase.C.

2232{
2235 _displaced_problem->cacheJacobianNeighbor(tid);
2236}
virtual void cacheJacobianNeighbor(const THREAD_ID tid)

Referenced by NonlinearSystemBase::constraintJacobians().

◆ cacheResidual()

void FEProblemBase::cacheResidual ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 2094 of file FEProblemBase.C.

2095{
2098 _displaced_problem->cacheResidual(tid);
2099}
virtual void cacheResidual(const THREAD_ID tid)

Referenced by ComputeResidualAndJacobianThread::accumulate(), ComputeResidualThread::accumulate(), and NonlinearSystemBase::constraintResiduals().

◆ cacheResidualNeighbor()

void FEProblemBase::cacheResidualNeighbor ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 2102 of file FEProblemBase.C.

2103{
2106 _displaced_problem->cacheResidualNeighbor(tid);
2107}
virtual void cacheResidualNeighbor(const THREAD_ID tid)

Referenced by NonlinearSystemBase::constraintResiduals().

◆ callMooseError() [1/2]

void MooseBase::callMooseError ( MooseApp *const  app,
const InputParameters &  params,
std::string  msg,
const bool  with_prefix,
const hit::Node *  node,
const bool  show_trace = true 
)
staticinherited

External method for calling moose error with added object context.

Needed so that objects without the MooseBase context (InputParameters) can call errors with context

Parameters
appThe app pointer (if available); adds multiapp context and clears the console
paramsThe parameters, needed to obtain object information
msgThe message
with_prefixIf true, add the prefix from messagePrefix(), which is the object information (type, name, etc)
nodeOptional hit node to add file path context as a prefix
show_traceWhether or not to show a stack trace, defaults to true

Definition at line 114 of file MooseBase.C.

120{
121 if (!node)
122 node = MooseBase::getHitNode(params);
123
124 std::string multiapp_prefix = "";
125 if (app)
126 {
127 if (!app->isUltimateMaster())
128 multiapp_prefix = app->name();
130 }
131
132 if (with_prefix)
133 // False here because the hit context will get processed by the node
134 msg = messagePrefix(params, false) + msg;
135
136 moose::internal::mooseErrorRaw(msg, multiapp_prefix, node, show_trace);
137}
const hit::Node * getHitNode() const
Definition MooseBase.h:136
std::string messagePrefix(const bool hit_prefix=true) const
Definition MooseBase.h:256
void mooseConsole()
Send current output buffer to Console output objects.
void mooseErrorRaw(std::string msg, const std::string &prefix="", const hit::Node *node=nullptr, const bool show_trace=true)
Main callback for emitting a moose error.
Definition MooseError.C:51

◆ callMooseError() [2/2]

void MooseBase::callMooseError ( std::string  msg,
const bool  with_prefix,
const hit::Node *  node = nullptr,
const bool  show_trace = true 
) const
inherited

External method for calling moose error with added object context.

Parameters
msgThe message
with_prefixIf true, add the prefix from messagePrefix(), which is the object information (type, name, etc)
nodeOptional hit node to add file path context as a prefix
show_traceWhether or not to show a stack trace, defaults to true

Definition at line 105 of file MooseBase.C.

109{
110 callMooseError(&_app, _pars, msg, with_prefix, node, show_trace);
111}
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:375
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
External method for calling moose error with added object context.
Definition MooseBase.C:105
const InputParameters & _pars
The object's parameters.
Definition MooseBase.h:384

Referenced by MooseBase::callMooseError(), InputParameters::callMooseError(), MooseBase::mooseDocumentedError(), MooseBase::mooseError(), and MooseBase::mooseErrorNonPrefixed().

◆ checkBlockMatProps()

void SubProblem::checkBlockMatProps ( )
virtualinherited

Checks block material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 615 of file SubProblem.C.

616{
617 // Variable for storing all available blocks/boundaries from the mesh
618 std::set<SubdomainID> all_ids(mesh().meshSubdomains());
619
620 std::stringstream errors;
621
622 // Loop through the properties to check
623 for (const auto & check_it : _map_block_material_props_check)
624 {
625 // The current id for the property being checked (BoundaryID || BlockID)
626 SubdomainID check_id = check_it.first;
627
628 std::set<SubdomainID> check_ids = {check_id};
629
630 // Loop through all the block/boundary ids
631 for (const auto & id : check_ids)
632 {
633 // Loop through all the stored properties
634 for (const auto & prop_it : check_it.second)
635 {
636 // Produce an error if the material property is not defined on the current block/boundary
637 // and any block/boundary
638 // and not is not a zero material property.
639 if (_map_block_material_props[id].count(prop_it.second) == 0 &&
640 _zero_block_material_props[id].count(prop_it.second) == 0)
641 {
642 std::string check_name = restrictionSubdomainCheckName(id);
643 if (check_name.empty())
644 check_name = std::to_string(id);
645 errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
646 << "' is not defined on block " << check_name << "\n";
647 }
648 }
649 }
650 }
651
652 if (!errors.str().empty())
653 mooseError(errors.str());
654}
unsigned int count
Definition MortarUtils.C:53
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
std::string restrictionSubdomainCheckName(SubdomainID check_id)
Helper functions for checking MaterialProperties.
Definition SubProblem.C:764
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)

Referenced by checkProblemIntegrity().

◆ checkBoundaryMatProps()

void SubProblem::checkBoundaryMatProps ( )
virtualinherited

Checks boundary material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 657 of file SubProblem.C.

658{
659 // Variable for storing the value for ANY_BOUNDARY_ID
661
662 // Variable for storing all available blocks/boundaries from the mesh
663 std::set<BoundaryID> all_ids(mesh().getBoundaryIDs());
664
665 std::stringstream errors;
666
667 // Loop through the properties to check
668 for (const auto & check_it : _map_boundary_material_props_check)
669 {
670 // The current id for the property being checked (BoundaryID || BlockID)
671 BoundaryID check_id = check_it.first;
672
673 // In the case when the material being checked has an ID is set to ANY, then loop through all
674 // the possible ids and verify that the material property is defined.
675 std::set<BoundaryID> check_ids{check_id};
676 if (check_id == any_id)
677 check_ids = all_ids;
678
679 // Loop through all the block/boundary ids
680 for (const auto & id : check_ids)
681 {
682 // Loop through all the stored properties
683 for (const auto & prop_it : check_it.second)
684 {
685 // Produce an error if the material property is not defined on the current block/boundary
686 // and any block/boundary
687 // and not is not a zero material property.
688 if (_map_boundary_material_props[id].count(prop_it.second) == 0 &&
689 _map_boundary_material_props[any_id].count(prop_it.second) == 0 &&
690 _zero_boundary_material_props[id].count(prop_it.second) == 0 &&
691 _zero_boundary_material_props[any_id].count(prop_it.second) == 0)
692 {
693 std::string check_name = restrictionBoundaryCheckName(id);
694 if (check_name.empty())
695 check_name = std::to_string(id);
696 errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
697 << "' is not defined on boundary " << check_name << "\n";
698 }
699 }
700 }
701 }
702
703 if (!errors.str().empty())
704 mooseError(errors.str());
705}
boundary_id_type BoundaryID
std::string restrictionBoundaryCheckName(BoundaryID check_id)
Definition SubProblem.C:775
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
std::vector< BoundaryID > getBoundaryIDs(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown, const std::set< BoundaryID > &mesh_boundary_ids)
Gets the boundary IDs with their names.
const BoundaryID ANY_BOUNDARY_ID
Definition MooseTypes.C:21

Referenced by checkProblemIntegrity().

◆ checkCoordinateSystems()

void FEProblemBase::checkCoordinateSystems ( )
protected

Verify that there are no element type/coordinate type conflicts.

Definition at line 9623 of file FEProblemBase.C.

9624{
9626}
void checkCoordinateSystems()
Performs a sanity check for every element in the mesh.
Definition MooseMesh.C:4391

Referenced by checkProblemIntegrity().

◆ checkDependMaterialsHelper()

void FEProblemBase::checkDependMaterialsHelper ( const std::map< SubdomainID, std::vector< std::shared_ptr< MaterialBase > > > &  materials_map)
protected

Helper method for checking Material object dependency.

See also
checkProblemIntegrity

These two sets are used to make sure that all dependent props on a block are actually supplied

Definition at line 9502 of file FEProblemBase.C.

9504{
9505 for (const auto & it : materials_map)
9506 {
9508 std::set<std::string> block_depend_props, block_supplied_props;
9509
9510 for (const auto & mat1 : it.second)
9511 {
9512 auto & alldeps = mat1->getMatPropDependencies(); // includes requested stateful props
9513 for (auto & dep : alldeps)
9514 block_depend_props.insert(_material_prop_registry.getName(dep));
9515
9516 // See if any of the active materials supply this property
9517 for (const auto & mat2 : it.second)
9518 {
9519 const std::set<std::string> & supplied_props = mat2->MaterialBase::getSuppliedItems();
9520 block_supplied_props.insert(supplied_props.begin(), supplied_props.end());
9521 }
9522 }
9523
9524 // Add zero material properties specific to this block and unrestricted
9525 block_supplied_props.insert(_zero_block_material_props[it.first].begin(),
9526 _zero_block_material_props[it.first].end());
9527
9528 // Error check to make sure all properties consumed by materials are supplied on this block
9529 std::set<std::string> difference;
9530 std::set_difference(block_depend_props.begin(),
9531 block_depend_props.end(),
9532 block_supplied_props.begin(),
9533 block_supplied_props.end(),
9534 std::inserter(difference, difference.end()));
9535
9536 if (!difference.empty())
9537 {
9538 std::ostringstream oss;
9539 oss << "One or more Material Properties were not supplied on block ";
9540 const std::string & subdomain_name = _mesh.getSubdomainName(it.first);
9541 if (subdomain_name.length() > 0)
9542 oss << subdomain_name << " (" << it.first << ")";
9543 else
9544 oss << it.first;
9545 oss << ":\n";
9546 for (const auto & name : difference)
9547 oss << name << "\n";
9548 mooseError(oss.str());
9549 }
9550 }
9551
9552 // This loop checks that materials are not supplied by multiple Material objects
9553 for (const auto & it : materials_map)
9554 {
9555 const auto & materials = it.second;
9556 std::set<std::string> inner_supplied, outer_supplied;
9557
9558 for (const auto & outer_mat : materials)
9559 {
9560 // Storage for properties for this material (outer) and all other materials (inner)
9561 outer_supplied = outer_mat->getSuppliedItems();
9562 inner_supplied.clear();
9563
9564 // Property to material map for error reporting
9565 std::map<std::string, std::set<std::string>> prop_to_mat;
9566 for (const auto & name : outer_supplied)
9567 prop_to_mat[name].insert(outer_mat->name());
9568
9569 for (const auto & inner_mat : materials)
9570 {
9571 if (outer_mat == inner_mat)
9572 continue;
9573
9574 // Check whether these materials are an AD pair
9575 auto outer_mat_type = outer_mat->type();
9576 auto inner_mat_type = inner_mat->type();
9577 removeSubstring(outer_mat_type, "<RESIDUAL>");
9578 removeSubstring(outer_mat_type, "<JACOBIAN>");
9579 removeSubstring(inner_mat_type, "<RESIDUAL>");
9580 removeSubstring(inner_mat_type, "<JACOBIAN>");
9581 if (outer_mat_type == inner_mat_type && outer_mat_type != outer_mat->type() &&
9582 inner_mat_type != inner_mat->type())
9583 continue;
9584
9585 inner_supplied.insert(inner_mat->getSuppliedItems().begin(),
9586 inner_mat->getSuppliedItems().end());
9587
9588 for (const auto & inner_supplied_name : inner_supplied)
9589 prop_to_mat[inner_supplied_name].insert(inner_mat->name());
9590 }
9591
9592 // Test that a property isn't supplied on multiple blocks
9593 std::set<std::string> intersection;
9594 std::set_intersection(outer_supplied.begin(),
9595 outer_supplied.end(),
9596 inner_supplied.begin(),
9597 inner_supplied.end(),
9598 std::inserter(intersection, intersection.end()));
9599
9600 if (!intersection.empty())
9601 {
9602 std::ostringstream oss;
9603 oss << "The following material properties are declared on block " << it.first
9604 << " by multiple materials:\n";
9605 oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << "Material Property"
9606 << "Material Objects\n";
9607 for (const auto & outer_name : intersection)
9608 {
9609 oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << outer_name;
9610 for (const auto & inner_name : prop_to_mat[outer_name])
9611 oss << inner_name << " ";
9612 oss << '\n';
9613 }
9614
9615 mooseError(oss.str());
9616 break;
9617 }
9618 }
9619 }
9620}
void removeSubstring(std::string &main, const std::string &sub)
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition MooseMesh.C:1714
std::string indent(unsigned int spaces)
Create empty string for indenting.

Referenced by checkProblemIntegrity().

◆ checkDisplacementOrders()

void FEProblemBase::checkDisplacementOrders ( )
protected

Verify that SECOND order mesh uses SECOND order displacements.

Definition at line 9417 of file FEProblemBase.C.

9418{
9420 {
9421 bool mesh_has_second_order_elements = false;
9422 for (const auto & elem : as_range(_displaced_mesh->activeLocalElementsBegin(),
9423 _displaced_mesh->activeLocalElementsEnd()))
9424 {
9425 if (elem->default_order() == SECOND)
9426 {
9427 mesh_has_second_order_elements = true;
9428 break;
9429 }
9430 }
9431
9432 // We checked our local elements, so take the max over all processors.
9433 _displaced_mesh->comm().max(mesh_has_second_order_elements);
9434
9435 // If the Mesh has second order elements, make sure the
9436 // displacement variables are second-order.
9437 if (mesh_has_second_order_elements)
9438 {
9439 const std::vector<std::string> & displacement_variables =
9440 _displaced_problem->getDisplacementVarNames();
9441
9442 for (const auto & var_name : displacement_variables)
9443 {
9444 MooseVariableFEBase & mv =
9445 _displaced_problem->getVariable(/*tid=*/0,
9446 var_name,
9449 if (mv.order() != SECOND)
9450 mooseError("Error: mesh has SECOND order elements, so all displacement variables must be "
9451 "SECOND order.");
9452 }
9453 }
9454 }
9455}
libMesh::Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int.
void max(const T &r, T &o, Request &req) const
@ VAR_FIELD_STANDARD
Definition MooseTypes.h:777
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)

Referenced by checkProblemIntegrity().

◆ checkDuplicatePostprocessorVariableNames()

void FEProblemBase::checkDuplicatePostprocessorVariableNames ( )

Definition at line 1685 of file FEProblemBase.C.

1686{
1687 for (const auto & pp : _reporter_data.getPostprocessorNames())
1688 if (hasScalarVariable(pp))
1689 mooseError("Postprocessor \"" + pp +
1690 "\" has the same name as a scalar variable in the system.");
1691}

Referenced by checkProblemIntegrity().

◆ checkExceptionAndStopSolve()

void FEProblemBase::checkExceptionAndStopSolve ( bool  print_message = true)
virtual

Check to see if an exception has occurred on any processor and, if possible, force the solve to fail, which will result in the time step being cut.

Notes:

  • The exception have be registered by calling setException() prior to calling this.
  • This is collective on MPI, and must be called simultaneously by all processors!
  • If called when the solve can be interruped, it will do so and also throw a MooseException, which must be handled.
  • If called at a stage in the execution when the solve cannot be interupted (i.e., there is no solve active), it will generate an error and terminate the application.
  • DO NOT CALL THIS IN A THREADED REGION! This is meant to be called just after a threaded section.
Parameters
print_messagewhether to print a message with exception information

Definition at line 7315 of file FEProblemBase.C.

7316{
7318 return;
7319
7320 TIME_SECTION("checkExceptionAndStopSolve", 5);
7321
7322 // See if any processor had an exception. If it did, get back the
7323 // processor that the exception occurred on.
7324 unsigned int processor_id;
7325
7327
7328 if (_has_exception)
7329 {
7331
7333 {
7334 // Print the message
7335 if (_communicator.rank() == 0 && print_message)
7336 {
7337 _console << "\n" << _exception_message << "\n";
7338 if (isTransient())
7339 _console
7340 << "To recover, the solution will fail and then be re-attempted with a reduced time "
7341 "step.\n"
7342 << std::endl;
7343 }
7344
7345 // Stop the solve -- this entails setting
7346 // SNESSetFunctionDomainError() or directly inserting NaNs in the
7347 // residual vector to let PETSc >= 3.6 return DIVERGED_NANORINF.
7348 if (_current_nl_sys)
7350
7353
7354 // and close Aux system (we MUST do this here; see #11525)
7355 _aux->solution().close();
7356
7357 // We've handled this exception, so we no longer have one.
7358 _has_exception = false;
7359
7360 // Force the next non-linear convergence check to fail (and all further residual evaluation
7361 // to be skipped).
7363
7364 // Repropagate the exception, so it can be caught at a higher level, typically
7365 // this is NonlinearSystem::computeResidual().
7367 }
7368 else
7369 mooseError("The following parallel-communicated exception was detected during " +
7370 Moose::stringify(_current_execute_on_flag) + " evaluation:\n" +
7372 "\nBecause this did not occur during residual evaluation, there"
7373 " is no way to handle this, so the solution is aborting.\n");
7374 }
7375}
std::set< TagID > _fe_vector_tags
std::string _exception_message
The error message to go with an exception.
virtual bool isTransient() const override
virtual void stopSolve(const ExecFlagType &exec_flag, const std::set< TagID > &vector_tags_to_close) override
Quit the current solve as soon as possible.
Provides a way for users to bail out of the current solve.
virtual void stopSolve(const ExecFlagType &exec_flag, const std::set< TagID > &vector_tags_to_close)=0
Quit the current solve as soon as possible.
void maxloc(T &r, unsigned int &max_id) const
processor_id_type rank() const
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
bool isSolverExecFlag(const ExecFlagType &exec_flag)
Definition Moose.C:68

Referenced by NonlinearSystemBase::computeJacobianInternal(), computeUserObjects(), handleException(), DisplacedProblem::updateMesh(), and DisplacedProblem::updateMesh().

◆ checkGradientMethods()

void FEProblemBase::checkGradientMethods ( )
protected

Let every FVGradientMethod resolve its dependencies on other gradient methods.

Definition at line 9493 of file FEProblemBase.C.

9494{
9495 std::vector<FVGradientMethod *> methods;
9496 theWarehouse().query().condition<AttribSystem>("FVGradientMethod").queryInto(methods);
9497 for (auto * method : methods)
9498 method->resolveGradientMethodDependencies(*this);
9499}
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse.

Referenced by checkProblemIntegrity().

◆ checkICRestartError()

void FEProblemBase::checkICRestartError ( const std::string &  ic_name,
const std::string &  name,
const VariableName &  var_name 
)
private

Checks if the variable of the initial condition is getting restarted and errors for specific cases.

Parameters
ic_nameThe name of the initial condition
var_nameThe name of the variable

Definition at line 3751 of file FEProblemBase.C.

3754{
3756 {
3757 std::string restart_method = "";
3758 if (_app.isRestarting())
3759 restart_method =
3760 "a checkpoint restart, by IC object '" + ic_name + "' for variable '" + name + "'";
3761 else if (_app.getExReaderForRestart())
3762 {
3763 std::vector<std::string> restarted_vars = _app.getExReaderForRestart()->get_elem_var_names();
3764 const auto nodal_vars = _app.getExReaderForRestart()->get_nodal_var_names();
3765 const auto global_vars = _app.getExReaderForRestart()->get_global_var_names();
3766 restarted_vars.insert(restarted_vars.end(), nodal_vars.begin(), nodal_vars.end());
3767 restarted_vars.insert(restarted_vars.end(), global_vars.begin(), global_vars.end());
3768
3769 if (std::find(restarted_vars.begin(), restarted_vars.end(), var_name) != restarted_vars.end())
3770 restart_method = "an Exodus restart, by IC object '" + ic_name + "' for variable '" + name +
3771 "' that is also being restarted";
3772 }
3773 if (!restart_method.empty())
3774 mooseError(
3775 "Initial conditions have been specified during ",
3776 restart_method,
3777 ".\nThis is only allowed if you specify 'allow_initial_conditions_with_restart' to "
3778 "the [Problem], as initial conditions can override restarted fields");
3779 }
3780}
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition MooseApp.C:1684
libMesh::ExodusII_IO * getExReaderForRestart() const
Get the Exodus reader to restart variables from an Exodus mesh file.
Definition MooseApp.h:453
const std::vector< std::string > & get_global_var_names()
const std::vector< std::string > & get_elem_var_names()
const std::vector< std::string > & get_nodal_var_names()

Referenced by addFVInitialCondition(), and addInitialCondition().

◆ checkingUOAuxState()

bool FEProblemBase::checkingUOAuxState ( ) const
inline

Return a flag to indicate whether we are executing user objects and auxliary kernels for state check Note: This function can return true only when hasUOAuxStateCheck() returns true, i.e.

the check has been activated by users through Problem/check_uo_aux_state input parameter.

Definition at line 229 of file FEProblemBase.h.

229{ return _checking_uo_aux_state; }
bool _checking_uo_aux_state
Flag used to indicate whether we are doing the uo/aux state check in execute.

Referenced by MemoryUsage::execute(), VectorMemoryUsage::execute(), MemoryUsage::finalize(), PerfGraphData::finalize(), and VectorMemoryUsage::finalize().

◆ checkNonlocalCoupling()

void FEProblemBase::checkNonlocalCoupling ( )
Returns
Flag indicating nonlocal coupling exists or not.

Definition at line 1824 of file FEProblemBase.C.

1825{
1826 TIME_SECTION("checkNonlocalCoupling", 5, "Checking Nonlocal Coupling");
1827
1828 for (THREAD_ID tid = 0; tid < numThreads(); tid++)
1829 for (auto & nl : _nl)
1830 {
1831 const auto & all_kernels = nl->getKernelWarehouse();
1832 const auto & kernels = all_kernels.getObjects(tid);
1833 for (const auto & kernel : kernels)
1834 {
1835 std::shared_ptr<NonlocalKernel> nonlocal_kernel =
1836 std::dynamic_pointer_cast<NonlocalKernel>(kernel);
1837 if (nonlocal_kernel)
1838 {
1841 _nonlocal_kernels.addObject(kernel, tid);
1842 }
1843 }
1844 const MooseObjectWarehouse<IntegratedBCBase> & all_integrated_bcs =
1845 nl->getIntegratedBCWarehouse();
1846 const auto & integrated_bcs = all_integrated_bcs.getObjects(tid);
1847 for (const auto & integrated_bc : integrated_bcs)
1848 {
1849 std::shared_ptr<NonlocalIntegratedBC> nonlocal_integrated_bc =
1850 std::dynamic_pointer_cast<NonlocalIntegratedBC>(integrated_bc);
1851 if (nonlocal_integrated_bc)
1852 {
1855 _nonlocal_integrated_bcs.addObject(integrated_bc, tid);
1856 }
1857 }
1858 }
1859}
const std::vector< std::shared_ptr< T > > & getObjects(THREAD_ID tid=0) const
Retrieve complete vector to the all/block/boundary restricted objects for a given thread.
A storage container for MooseObjects that inherit from SetupInterface.

◆ checkNonlocalCouplingRequirement()

bool FEProblemBase::checkNonlocalCouplingRequirement ( ) const
overridevirtual
Returns
whether there will be nonlocal coupling at any point in the simulation, e.g. whether there are any active \emph or inactive nonlocal kernels or boundary conditions

Implements SubProblem.

Definition at line 10491 of file FEProblemBase.C.

10492{
10494}

Referenced by DisplacedProblem::checkNonlocalCouplingRequirement(), ComputeJacobianThread::compute(), ComputeJacobianThread::compute(), ComputeFullJacobianThread::computeOnBoundary(), and ComputeFullJacobianThread::computeOnElement().

◆ checkProblemIntegrity()

void FEProblemBase::checkProblemIntegrity ( )
virtual

Method called to perform a series of sanity checks before a simulation is run.

This method doesn't return when errors are found, instead it generally calls mooseError() directly.

If a material is specified for any block in the simulation, then all blocks must have a material specified.

unsigned int is necessary to print SubdomainIDs in the statement below

vector is necessary to get the subdomain names

Reimplemented in EigenProblem.

Definition at line 9243 of file FEProblemBase.C.

9244{
9245 TIME_SECTION("checkProblemIntegrity", 5);
9246
9247 // Subdomains specified by the "Problem/block" parameter
9248 const auto & subdomain_names = getParam<std::vector<SubdomainName>>("block");
9249 auto mesh_subdomains_vec = MooseMeshUtils::getSubdomainIDs(_mesh, subdomain_names);
9250 std::set<SubdomainID> mesh_subdomains(mesh_subdomains_vec.begin(), mesh_subdomains_vec.end());
9251
9252 // Check kernel coverage of subdomains (blocks) in the mesh
9255 {
9256 std::set<SubdomainID> blocks;
9259 blocks = mesh_subdomains;
9261 {
9262 blocks = mesh_subdomains;
9263 for (const auto & subdomain_name : _kernel_coverage_blocks)
9264 {
9265 const auto id = _mesh.getSubdomainID(subdomain_name);
9266 if (id == Moose::INVALID_BLOCK_ID)
9267 paramError("kernel_coverage_block_list",
9268 "Subdomain \"",
9269 subdomain_name,
9270 "\" not found in mesh.");
9271 blocks.erase(id);
9272 }
9273 }
9275 for (const auto & subdomain_name : _kernel_coverage_blocks)
9276 {
9277 const auto id = _mesh.getSubdomainID(subdomain_name);
9278 if (id == Moose::INVALID_BLOCK_ID)
9279 paramError("kernel_coverage_block_list",
9280 "Subdomain \"",
9281 subdomain_name,
9282 "\" not found in mesh.");
9283 blocks.insert(id);
9284 }
9285 if (!blocks.empty())
9286 for (auto & nl : _nl)
9287 nl->checkKernelCoverage(blocks);
9288 }
9289
9290 // Check materials
9291 {
9292#ifdef LIBMESH_ENABLE_AMR
9293 if ((_adaptivity.isOn() || _num_grid_steps) &&
9296 {
9297 _console << "Using EXPERIMENTAL Stateful Material Property projection with Adaptivity!\n"
9298 << std::flush;
9299 }
9300#endif
9301
9302 std::set<SubdomainID> local_mesh_subs(mesh_subdomains);
9303
9306 {
9311 bool check_material_coverage = false;
9312 std::set<SubdomainID> ids = _all_materials.getActiveBlocks();
9313 for (const auto & id : ids)
9314 {
9315 local_mesh_subs.erase(id);
9316 check_material_coverage = true;
9317 }
9318
9319 // did the user limit the subdomains to be checked?
9321 {
9322 for (const auto & subdomain_name : _material_coverage_blocks)
9323 {
9324 const auto id = _mesh.getSubdomainID(subdomain_name);
9325 if (id == Moose::INVALID_BLOCK_ID)
9326 paramError("material_coverage_block_list",
9327 "Subdomain \"" + subdomain_name + "\" not found in mesh.");
9328 local_mesh_subs.erase(id);
9329 }
9330 }
9332 {
9333 std::set<SubdomainID> blocks(local_mesh_subs);
9334 for (const auto & subdomain_name : _material_coverage_blocks)
9335 {
9336 const auto id = _mesh.getSubdomainID(subdomain_name);
9337 if (id == Moose::INVALID_BLOCK_ID)
9338 paramError("material_coverage_block_list",
9339 "Subdomain \"" + subdomain_name + "\" not found in mesh.");
9340 blocks.erase(id);
9341 }
9342 for (const auto id : blocks)
9343 local_mesh_subs.erase(id);
9344 }
9345
9346 // also exclude mortar spaces from the material check
9347 auto && mortar_subdomain_ids = _mortar_data->getMortarSubdomainIDs();
9348 for (auto subdomain_id : mortar_subdomain_ids)
9349 local_mesh_subs.erase(subdomain_id);
9350
9351 // Check Material Coverage
9352 if (check_material_coverage && !local_mesh_subs.empty())
9353 {
9354 std::stringstream extra_subdomain_ids;
9356 std::copy(local_mesh_subs.begin(),
9357 local_mesh_subs.end(),
9358 std::ostream_iterator<unsigned int>(extra_subdomain_ids, " "));
9360 std::vector<SubdomainID> local_mesh_subs_vec(local_mesh_subs.begin(),
9361 local_mesh_subs.end());
9362
9363 mooseError("The following blocks from your input mesh do not contain an active material: " +
9364 extra_subdomain_ids.str() +
9365 "(names: " + Moose::stringify(_mesh.getSubdomainNames(local_mesh_subs_vec)) +
9366 ")\nWhen ANY mesh block contains a Material object, "
9367 "all blocks must contain a Material object.\n");
9368 }
9369 }
9370
9371 // Check material properties on blocks and boundaries
9374
9375 // Check that material properties exist when requested by other properties on a given block
9376 const auto & materials = _all_materials.getActiveObjects();
9377 for (const auto & material : materials)
9378 material->checkStatefulSanity();
9379
9380 // auto mats_to_check = _materials.getActiveBlockObjects();
9381 // const auto & discrete_materials = _discrete_materials.getActiveBlockObjects();
9382 // for (const auto & map_it : discrete_materials)
9383 // for (const auto & container_element : map_it.second)
9384 // mats_to_check[map_it.first].push_back(container_element);
9387 }
9388
9390
9392
9393 // Verify that we don't have any Element type/Coordinate Type conflicts
9395
9396 // Coordinate transforms are only intended for use with MultiApps at this time. If you are not
9397 // using multiapps but still require these, contact a moose developer
9399 !hasMultiApps())
9400 mooseError("Coordinate transformation parameters, listed below, are only to be used in the "
9401 "context of application to application field transfers at this time. The mesh is "
9402 "not modified by these parameters within an application.\n"
9403 "You should likely use a 'TransformGenerator' in the [Mesh] block to achieve the "
9404 "desired mesh modification.\n\n",
9406
9407 // If using displacements, verify that the order of the displacement
9408 // variables matches the order of the elements in the displaced
9409 // mesh.
9411
9412 // Check for postprocessor names with same name as a scalar variable
9414}
char ** blocks
void checkDependMaterialsHelper(const std::map< SubdomainID, std::vector< std::shared_ptr< MaterialBase > > > &materials_map)
Helper method for checking Material object dependency.
void checkDisplacementOrders()
Verify that SECOND order mesh uses SECOND order displacements.
void checkUserObjects()
bool hasMultiApps() const
Returns whether or not the current simulation has any multiapps.
void checkCoordinateSystems()
Verify that there are no element type/coordinate type conflicts.
void checkDuplicatePostprocessorVariableNames()
void checkGradientMethods()
Let every FVGradientMethod resolve its dependencies on other gradient methods.
bool hasScalingOrRotationTransformation() const
Returns true if the app has scaling and/or rotation transformation.
static InputParameters validParams()
Describes the parameters this object can take to setup transformations.
std::vector< SubdomainName > getSubdomainNames(const std::vector< SubdomainID > &subdomain_ids) const
Get the associated subdomainNames for the subdomain ids that are passed in.
Definition MooseMesh.C:1720
MooseAppCoordTransform & coordTransform()
Definition MooseMesh.h:2062
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition MooseMesh.C:1678
std::set< SubdomainID > getActiveBlocks(THREAD_ID tid=0) const
Return a set of active SubdomainsIDs.
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
virtual void checkBoundaryMatProps()
Checks boundary material properties integrity.
Definition SubProblem.C:657
virtual void checkBlockMatProps()
Checks block material properties integrity.
Definition SubProblem.C:615
std::vector< subdomain_id_type > getSubdomainIDs(const libMesh::MeshBase &mesh, const std::vector< SubdomainName > &subdomain_name)
Get the associated subdomainIDs for the subdomain names that are passed in.
const SubdomainID INVALID_BLOCK_ID
Definition MooseTypes.C:20

Referenced by EigenProblem::checkProblemIntegrity().

◆ checkResidualForNans()

virtual bool FEProblemBase::checkResidualForNans ( ) const
inlineoverridevirtual

Whether to check residual for NaN/Inf values.

Implements SubProblem.

Definition at line 232 of file FEProblemBase.h.

232{ return _check_residual_for_nans; }

Referenced by DisplacedProblem::checkResidualForNans().

◆ checkUserObjectJacobianRequirement()

void FEProblemBase::checkUserObjectJacobianRequirement ( THREAD_ID  tid)

Definition at line 1862 of file FEProblemBase.C.

1863{
1864 std::set<const MooseVariableFEBase *> uo_jacobian_moose_vars;
1865 {
1866 std::vector<ShapeElementUserObject *> objs;
1867 theWarehouse()
1868 .query()
1870 .condition<AttribThread>(tid)
1871 .queryInto(objs);
1872
1873 for (const auto & uo : objs)
1874 {
1875 _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1876 const auto & mv_deps = uo->jacobianMooseVariables();
1877 uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1878 }
1879 }
1880 {
1881 std::vector<ShapeSideUserObject *> objs;
1882 theWarehouse()
1883 .query()
1885 .condition<AttribThread>(tid)
1886 .queryInto(objs);
1887 for (const auto & uo : objs)
1888 {
1889 _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1890 const auto & mv_deps = uo->jacobianMooseVariables();
1891 uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1892 }
1893 }
1894
1895 _uo_jacobian_moose_vars[tid].assign(uo_jacobian_moose_vars.begin(), uo_jacobian_moose_vars.end());
1896 std::sort(
1897 _uo_jacobian_moose_vars[tid].begin(), _uo_jacobian_moose_vars[tid].end(), sortMooseVariables);
1898}
@ ShapeSideUserObject
@ ShapeElementUserObject

◆ checkUserObjectNameCollision()

void FEProblemBase::checkUserObjectNameCollision ( const std::string &  name,
const std::string &  type 
) const

Check for name collision between different user objects.

Parameters
nameThe object name being added
typeThe object type being added

Definition at line 4649 of file FEProblemBase.C.

4651{
4652 if (hasUserObject(name))
4653 mooseError("A ",
4655 " already exists. You may not add a ",
4656 type,
4657 " by the same name.");
4658
4659#ifdef MOOSE_KOKKOS_ENABLED
4661 mooseError("A ",
4662 getKokkosUserObject<UserObjectBase>(name).typeAndName(),
4663 " already exists. You may not add a ",
4664 type,
4665 " by the same name.");
4666#endif
4667}
bool hasKokkosUserObject(const std::string &name) const
Check if there if a Kokkos user object of given name.
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
Get the user object by its name.
std::string typeAndName() const
Get the class's combined type and name; useful in error handling.
Definition MooseBase.C:57

Referenced by addPostprocessor(), MFEMProblem::addPostprocessor(), addReporter(), addVectorPostprocessor(), and MFEMProblem::addVectorPostprocessor().

◆ checkUserObjects()

void FEProblemBase::checkUserObjects ( )
protected

Definition at line 9458 of file FEProblemBase.C.

9459{
9460 // Check user_objects block coverage
9461 std::set<SubdomainID> mesh_subdomains = _mesh.meshSubdomains();
9462 std::set<SubdomainID> user_objects_blocks;
9463
9464 // gather names of all user_objects that were defined in the input file
9465 // and the blocks that they are defined on
9466 std::set<std::string> names;
9467
9468 std::vector<UserObjectBase *> objects;
9470
9471 for (const auto & obj : objects)
9472 names.insert(obj->name());
9473
9474 // See if all referenced blocks are covered
9475 std::set<SubdomainID> difference;
9476 std::set_difference(user_objects_blocks.begin(),
9477 user_objects_blocks.end(),
9478 mesh_subdomains.begin(),
9479 mesh_subdomains.end(),
9480 std::inserter(difference, difference.end()));
9481
9482 if (!difference.empty())
9483 {
9484 std::ostringstream oss;
9485 oss << "One or more UserObjects is referencing a nonexistent block:\n";
9486 for (const auto & id : difference)
9487 oss << id << "\n";
9488 mooseError(oss.str());
9489 }
9490}
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition MooseMesh.C:3235

Referenced by checkProblemIntegrity().

◆ clearActiveElementalMooseVariables()

void FEProblemBase::clearActiveElementalMooseVariables ( const THREAD_ID  tid)
overridevirtual

Clear the active elemental MooseVariableFEBase.

If there are no active variables then they will all be reinited. Call this after finishing the computation that was using a restricted set of MooseVariableFEBases

Parameters
tidThe thread id

Reimplemented from SubProblem.

Definition at line 6707 of file FEProblemBase.C.

6708{
6710
6712 _displaced_problem->clearActiveElementalMooseVariables(tid);
6713}
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid)
Clear the active elemental MooseVariableFieldBase.
Definition SubProblem.C:458

Referenced by ComputeDiracThread::post(), ComputeIndicatorThread::post(), ComputeMarkerThread::post(), ComputeMaterialsObjectThread::post(), and ComputeUserObjectsThread::post().

◆ clearActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveFEVariableCoupleableMatrixTags ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6716 of file FEProblemBase.C.

6717{
6719
6721 _displaced_problem->clearActiveFEVariableCoupleableMatrixTags(tid);
6722}
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition SubProblem.C:376

◆ clearActiveFEVariableCoupleableVectorTags()

void FEProblemBase::clearActiveFEVariableCoupleableVectorTags ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6725 of file FEProblemBase.C.

6726{
6728
6730 _displaced_problem->clearActiveFEVariableCoupleableVectorTags(tid);
6731}
virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid)
Definition SubProblem.C:370

◆ clearActiveMaterialProperties()

void FEProblemBase::clearActiveMaterialProperties ( const THREAD_ID  tid)

Clear the active material properties.

Should be called at the end of every computing thread

Parameters
tidThe thread id

Definition at line 6773 of file FEProblemBase.C.

6774{
6776}

Referenced by NodalPatchRecovery::compute(), ComputeDiracThread::post(), ComputeIndicatorThread::post(), ComputeUserObjectsThread::post(), ComputeIndicatorThread::subdomainChanged(), and ComputeMarkerThread::subdomainChanged().

◆ clearActiveScalarVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveScalarVariableCoupleableMatrixTags ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6734 of file FEProblemBase.C.

6735{
6737
6739 _displaced_problem->clearActiveScalarVariableCoupleableMatrixTags(tid);
6740}
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition SubProblem.C:417

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

◆ clearActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::clearActiveScalarVariableCoupleableVectorTags ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6743 of file FEProblemBase.C.

6744{
6746
6748 _displaced_problem->clearActiveScalarVariableCoupleableVectorTags(tid);
6749}
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid)
Definition SubProblem.C:411

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

◆ clearAllDofIndices()

void SubProblem::clearAllDofIndices ( )
inherited

Clear dof indices from variables in nl and aux systems.

Definition at line 1178 of file SubProblem.C.

1179{
1180 for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1183}
void clearAllDofIndices()
Clear dof indices from variables in nl and aux systems.
virtual const SystemBase & systemBaseAuxiliary() const =0
Return the auxiliary system object as a base class reference.
void clearAllDofIndices()
Clear all dof indices from moose variables.

Referenced by solve().

◆ clearCurrentJacobianMatrixTags()

void FEProblemBase::clearCurrentJacobianMatrixTags ( )
inline

Clear the current Jacobian matrix tag data structure ... if someone creates it.

Definition at line 3028 of file FEProblemBase.h.

3028{}

Referenced by resetState().

◆ clearCurrentResidualVectorTags()

void FEProblemBase::clearCurrentResidualVectorTags ( )
inline

Clear the current residual vector tag data structure.

Definition at line 3966 of file FEProblemBase.h.

3967{
3969}
std::vector< VectorTag > _current_residual_vector_tags
A data member to store the residual vector tag(s) passed into computeResidualTag(s).

Referenced by CrankNicolson::init(), and resetState().

◆ clearDiracInfo()

void FEProblemBase::clearDiracInfo ( )
overridevirtual

Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in.

Implements SubProblem.

Definition at line 2686 of file FEProblemBase.C.

2687{
2689
2691 _displaced_problem->clearDiracInfo();
2692}
void clearPoints()
Remove all of the current points and elements.
DiracKernelInfo _dirac_kernel_info

Referenced by NonlinearSystemBase::computeDiracContributions().

◆ cloneAlgebraicGhostingFunctor()

void SubProblem::cloneAlgebraicGhostingFunctor ( libMesh::GhostingFunctor &  algebraic_gf,
bool  to_mesh = true 
)
privateinherited

Creates (n_sys - 1) clones of the provided algebraic ghosting functor (corresponding to the nonlinear system algebraic ghosting functor), initializes the clone with the appropriate DofMap, and then adds the clone to said DofMap.

Parameters
algebraic_gfthe (nonlinear system's) algebraic ghosting functor to clone
to_meshwhether the clone should be added to the corresponding DofMap's underlying MeshBase (the underlying MeshBase will be the same for every system held by this object's EquationSystems object)

Definition at line 1009 of file SubProblem.C.

1010{
1011 EquationSystems & eq = es();
1012 const auto n_sys = eq.n_systems();
1013
1014 auto pr = _root_alg_gf_to_sys_clones.emplace(
1015 &algebraic_gf, std::vector<std::shared_ptr<libMesh::GhostingFunctor>>(n_sys - 1));
1016 mooseAssert(pr.second, "We are adding a duplicate algebraic ghosting functor");
1017 auto & clones_vec = pr.first->second;
1018
1019 for (MooseIndex(n_sys) i = 1; i < n_sys; ++i)
1020 {
1021 DofMap & dof_map = eq.get_system(i).get_dof_map();
1022 std::shared_ptr<libMesh::GhostingFunctor> clone_alg_gf = algebraic_gf.clone();
1023 std::dynamic_pointer_cast<RelationshipManager>(clone_alg_gf)
1024 ->init(mesh(), *algebraic_gf.get_mesh(), &dof_map);
1025 dof_map.add_algebraic_ghosting_functor(clone_alg_gf, to_mesh);
1026 clones_vec[i - 1] = clone_alg_gf;
1027 }
1028}
std::unordered_map< libMesh::GhostingFunctor *, std::vector< std::shared_ptr< libMesh::GhostingFunctor > > > _root_alg_gf_to_sys_clones
A map from a root algebraic ghosting functor, e.g.
virtual std::unique_ptr< GhostingFunctor > clone() const=0
const MeshBase * get_mesh() const

Referenced by SubProblem::addAlgebraicGhostingFunctor().

◆ cloneCouplingGhostingFunctor()

void SubProblem::cloneCouplingGhostingFunctor ( libMesh::GhostingFunctor &  coupling_gf,
bool  to_mesh = true 
)
privateinherited

Creates (n_sys - 1) clones of the provided coupling ghosting functor (corresponding to the nonlinear system coupling ghosting functor), initializes the clone with the appropriate DofMap, and then adds the clone to said DofMap.

Parameters
coupling_gfthe (nonlinear system's) coupling ghosting functor to clone
to_meshwhether the clone should be added to the corresponding DofMap's underlying MeshBase (the underlying MeshBase will be the same for every system held by this object's EquationSystems object)

Definition at line 1043 of file SubProblem.C.

1044{
1045 const std::size_t num_nl_sys = numNonlinearSystems();
1046
1047 auto pr = _root_coupling_gf_to_sys_clones.emplace(
1048 &coupling_gf, std::vector<std::shared_ptr<libMesh::GhostingFunctor>>(num_nl_sys - 1));
1049 mooseAssert(pr.second, "We are adding a duplicate coupling functor");
1050 auto & clones_vec = pr.first->second;
1051
1052 for (const auto i : make_range(std::size_t(1), num_nl_sys))
1053 {
1054 DofMap & dof_map = systemBaseNonlinear(i).system().get_dof_map();
1055 std::shared_ptr<libMesh::GhostingFunctor> clone_coupling_gf = coupling_gf.clone();
1056 std::dynamic_pointer_cast<RelationshipManager>(clone_coupling_gf)
1057 ->init(mesh(), *coupling_gf.get_mesh(), &dof_map);
1058 dof_map.add_coupling_functor(clone_coupling_gf, to_mesh);
1059 clones_vec[i - 1] = clone_coupling_gf;
1060 }
1061}
std::unordered_map< libMesh::GhostingFunctor *, std::vector< std::shared_ptr< libMesh::GhostingFunctor > > > _root_coupling_gf_to_sys_clones
A map from a root coupling ghosting functor, e.g.

Referenced by SubProblem::addCouplingGhostingFunctor().

◆ computeBounds()

void FEProblemBase::computeBounds ( libMesh::NonlinearImplicitSystem &  sys,
NumericVector< libMesh::Number > &  lower,
NumericVector< libMesh::Number > &  upper 
)
virtual

Definition at line 8393 of file FEProblemBase.C.

8396{
8397 try
8398 {
8399 try
8400 {
8401 mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
8402 "I expect these system numbers to be the same");
8403
8404 if (!_current_nl_sys->hasVector("lower_bound") || !_current_nl_sys->hasVector("upper_bound"))
8405 return;
8406
8407 TIME_SECTION("computeBounds", 1, "Computing Bounds");
8408
8409 NumericVector<Number> & _lower = _current_nl_sys->getVector("lower_bound");
8410 NumericVector<Number> & _upper = _current_nl_sys->getVector("upper_bound");
8411 _lower.swap(lower);
8412 _upper.swap(upper);
8413 for (THREAD_ID tid = 0; tid < numThreads(); tid++)
8415
8416 _aux->residualSetup();
8418 _lower.swap(lower);
8419 _upper.swap(upper);
8420 }
8421 catch (...)
8422 {
8423 handleException("computeBounds");
8424 }
8425 }
8426 catch (MooseException & e)
8427 {
8428 mooseError("Irrecoverable exception: " + std::string(e.what()));
8429 }
8430 catch (...)
8431 {
8432 mooseError("Unexpected exception type");
8433 }
8434}
const ExecFlagType EXEC_LINEAR
Definition Moose.C:32
void computeSystems(const ExecFlagType &type)
Do generic system computations.
void handleException(const std::string &calling_method)
Handle exceptions.
virtual void residualSetup(THREAD_ID tid=0) const override
virtual const char * what() const
Get out the error message.
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition SystemBase.C:933
virtual void swap(NumericVector< T > &v)

Referenced by Moose::compute_bounds().

◆ computeDamping()

Real FEProblemBase::computeDamping ( const NumericVector< libMesh::Number > &  soln,
const NumericVector< libMesh::Number > &  update 
)
virtual

Definition at line 8675 of file FEProblemBase.C.

8677{
8678 // Default to no damping
8679 Real damping = 1.0;
8680
8681 if (_has_dampers)
8682 {
8683 TIME_SECTION("computeDamping", 1, "Computing Damping");
8684
8685 // Save pointer to the current solution
8686 const NumericVector<Number> * _saved_current_solution = _current_nl_sys->currentSolution();
8687
8689 // For now, do not re-compute auxiliary variables. Doing so allows a wild solution increment
8690 // to get to the material models, which may not be able to cope with drastically different
8691 // values. Once more complete dependency checking is in place, auxiliary variables (and
8692 // material properties) will be computed as needed by dampers.
8693 // _aux.compute();
8694 damping = _current_nl_sys->computeDamping(soln, update);
8695
8696 // restore saved solution
8697 _current_nl_sys->setSolution(*_saved_current_solution);
8698 }
8699
8700 return damping;
8701}
Real computeDamping(const NumericVector< Number > &solution, const NumericVector< Number > &update)
Compute damping.
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
virtual const NumericVector< Number > *const & currentSolution() const override final
The solution vector that is currently being operated on.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by computePostCheck().

◆ computeIndicators()

void FEProblemBase::computeIndicators ( )
virtual

Reimplemented in DumpObjectsProblem.

Definition at line 5089 of file FEProblemBase.C.

5090{
5091 // Initialize indicator aux variable fields
5093 {
5094 TIME_SECTION("computeIndicators", 1, "Computing Indicators");
5095
5096 // Internal side indicators may lead to creating a much larger sparsity pattern than dictated by
5097 // the actual finite element scheme (e.g. CFEM)
5098 const auto old_do_derivatives = ADReal::do_derivatives;
5099 ADReal::do_derivatives = false;
5100
5101 std::vector<std::string> fields;
5102
5103 // Indicator Fields
5104 const auto & indicators = _indicators.getActiveObjects();
5105 for (const auto & indicator : indicators)
5106 fields.push_back(indicator->name());
5107
5108 // InternalSideIndicator Fields
5109 const auto & internal_indicators = _internal_side_indicators.getActiveObjects();
5110 for (const auto & internal_indicator : internal_indicators)
5111 fields.push_back(internal_indicator->name());
5112
5113 _aux->zeroVariables(fields);
5114
5115 // compute Indicators
5116 ComputeIndicatorThread cit(*this);
5118 _aux->solution().close();
5119 _aux->update();
5120
5121 ComputeIndicatorThread finalize_cit(*this, true);
5123 _aux->solution().close();
5124 _aux->update();
5125
5126 ADReal::do_derivatives = old_do_derivatives;
5127 }
5128}
const libMesh::ConstElemRange & getCurrentAlgebraicElementRange()
These are the element and nodes that contribute to the jacobian and residual for this local processor...
bool hasActiveObjects(THREAD_ID tid=0) const
void parallel_reduce(const Range &range, Body &body, unsigned int n_threads=libMesh::n_threads())
PetscErrorCode PetscInt const PetscInt fields[]

Referenced by computeIndicatorsAndMarkers(), TransientBase::endStep(), Eigenvalue::execute(), SteadyBase::execute(), MFEMSteady::execute(), and initialAdaptMesh().

◆ computeIndicatorsAndMarkers()

void FEProblemBase::computeIndicatorsAndMarkers ( )
virtual

Definition at line 5082 of file FEProblemBase.C.

5083{
5086}
virtual void computeIndicators()

◆ computeJacobian()

void FEProblemBase::computeJacobian ( const NumericVector< libMesh::Number > &  soln,
libMesh::SparseMatrix< libMesh::Number > &  jacobian,
const unsigned int  nl_sys_num 
)
virtual

Form a Jacobian matrix with the default tag (system).

Reimplemented in EigenProblem.

Definition at line 8218 of file FEProblemBase.C.

8221{
8222 setCurrentNonlinearSystem(nl_sys_num);
8223
8224 _fe_matrix_tags.clear();
8225
8226 auto & tags = getMatrixTags();
8227 for (auto & tag : tags)
8228 _fe_matrix_tags.insert(tag.second);
8229
8231}
std::set< TagID > _fe_matrix_tags
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
virtual void computeJacobianInternal(const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, const std::set< TagID > &tags)
Form a Jacobian matrix for multiple tags.
virtual std::map< TagName, TagID > & getMatrixTags()
Return all matrix tags in the system, where a tag is represented by a map from name to ID.
Definition SubProblem.h:256

Referenced by computeJacobianSys().

◆ computeJacobianBlock()

void FEProblemBase::computeJacobianBlock ( libMesh::SparseMatrix< libMesh::Number > &  jacobian,
libMesh::System &  precond_system,
unsigned int  ivar,
unsigned int  jvar 
)
virtual

Really not a good idea to use this.

It computes just one block of the Jacobian into a smaller matrix. Calling this in a loop is EXTREMELY ineffecient! Try to use computeJacobianBlocks() instead!

Parameters
jacobianThe matrix you want to fill
precond_systemThe libMesh::system of the preconditioning system
ivarthe block-row of the Jacobian
jvarthe block-column of the Jacobian

Definition at line 8381 of file FEProblemBase.C.

8385{
8386 JacobianBlock jac_block(precond_system, jacobian, ivar, jvar);
8387 std::vector<JacobianBlock *> blocks = {&jac_block};
8388 mooseAssert(_current_nl_sys, "This should be non-null");
8390}
virtual void computeJacobianBlocks(std::vector< JacobianBlock * > &blocks, const unsigned int nl_sys_num)
Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditio...
Helper class for holding the preconditioning blocks to fill.

◆ computeJacobianBlocks()

void FEProblemBase::computeJacobianBlocks ( std::vector< JacobianBlock * > &  blocks,
const unsigned int  nl_sys_num 
)
virtual

Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditioning matrices.

Used by Physics-based preconditioning

Parameters
blocksThe blocks to fill in (JacobianBlock is defined in ComputeJacobianBlocksThread)

Reimplemented in EigenProblem.

Definition at line 8361 of file FEProblemBase.C.

8363{
8364 TIME_SECTION("computeTransientImplicitJacobian", 2);
8365 setCurrentNonlinearSystem(nl_sys_num);
8366
8368 {
8370 _displaced_problem->updateMesh();
8371 }
8372
8374
8378}
const ExecFlagType EXEC_NONLINEAR
Definition Moose.C:34
const ExecFlagType EXEC_PRE_DISPLACE
Definition Moose.C:55
void computeJacobianBlocks(std::vector< JacobianBlock * > &blocks)
Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditio...
bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.

Referenced by computeJacobianBlock(), and PhysicsBasedPreconditioner::setup().

◆ computeJacobianInternal()

void FEProblemBase::computeJacobianInternal ( const NumericVector< libMesh::Number > &  soln,
libMesh::SparseMatrix< libMesh::Number > &  jacobian,
const std::set< TagID > &  tags 
)
virtual

Form a Jacobian matrix for multiple tags.

It should not be called directly by users.

Definition at line 8234 of file FEProblemBase.C.

8237{
8238 TIME_SECTION("computeJacobianInternal", 1);
8239
8241
8243
8244 computeJacobianTags(tags);
8245
8247}
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.
TagID systemMatrixTag() const override
Return the Matrix Tag ID for System.
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
virtual void associateMatrixToTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.

Referenced by computeJacobian().

◆ computeJacobianSys()

void FEProblemBase::computeJacobianSys ( libMesh::NonlinearImplicitSystem &  sys,
const NumericVector< libMesh::Number > &  soln,
libMesh::SparseMatrix< libMesh::Number > &  jacobian 
)
virtual

Form a Jacobian matrix.

It is called by Libmesh.

Definition at line 8194 of file FEProblemBase.C.

8197{
8198 // Reset before Jacobian setup, calculation & execution
8200 computeJacobian(soln, jacobian, sys.number());
8201}
virtual void computeJacobian(const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, const unsigned int nl_sys_num)
Form a Jacobian matrix with the default tag (system).
void resetIterationOccurences()
Reset the number of solution invalid occurrences back to zero.

Referenced by Moose::compute_jacobian(), and NonlinearSystem::computeScalingJacobian().

◆ computeJacobianTag()

void FEProblemBase::computeJacobianTag ( const NumericVector< libMesh::Number > &  soln,
libMesh::SparseMatrix< libMesh::Number > &  jacobian,
TagID  tag 
)
virtual

Form a Jacobian matrix for a given tag.

Definition at line 8204 of file FEProblemBase.C.

8207{
8209
8210 _current_nl_sys->associateMatrixToTag(jacobian, tag);
8211
8212 computeJacobianTags({tag});
8213
8215}

Referenced by ActuallyExplicitEuler::solve(), and ExplicitSSPRungeKutta::solveStage().

◆ computeJacobianTags()

void FEProblemBase::computeJacobianTags ( const std::set< TagID > &  tags)
virtual

Form multiple matrices, and each is associated with a tag.

Definition at line 8250 of file FEProblemBase.C.

8251{
8252 try
8253 {
8254 try
8255 {
8257 {
8258 TIME_SECTION("computeJacobianTags", 5, "Computing Jacobian");
8259
8260 for (auto tag : tags)
8261 if (_current_nl_sys->hasMatrix(tag))
8262 {
8263 auto & matrix = _current_nl_sys->getMatrix(tag);
8266 else
8267 matrix.zero();
8269 // PETSc algorithms require diagonal allocations regardless of whether there is
8270 // non-zero diagonal dependence. With global AD indexing we only add non-zero
8271 // dependence, so PETSc will scream at us unless we artificially add the diagonals.
8272 for (auto index : make_range(matrix.row_start(), matrix.row_stop()))
8273 matrix.add(index, index, 0);
8274 }
8275
8276 _aux->zeroVariablesForJacobian();
8277
8278 unsigned int n_threads = numThreads();
8279
8280 // Random interface objects
8281 for (const auto & it : _random_data_objects)
8282 it.second->updateSeeds(EXEC_NONLINEAR);
8283
8287 _displaced_problem->setCurrentlyComputingJacobian(true);
8288
8290
8291 for (unsigned int tid = 0; tid < n_threads; tid++)
8292 reinitScalars(tid);
8293
8295
8296 _aux->jacobianSetup();
8297
8299 {
8301 _displaced_problem->updateMesh();
8302 // A standalone scaling Jacobian is assembled without a preceding residual evaluation, so
8303 // the displaced mortar segment mesh can be stale relative to the just-updated displaced
8304 // parent mesh. Every other Jacobian evaluation is preceded by a residual (or combined
8305 // residual/Jacobian) evaluation that already rebuilt the mortar mesh, so doing it here in
8306 // the general case would be duplicative.
8307 if (_current_nl_sys->computingScalingJacobian() && _mortar_data->hasDisplacedObjects())
8309 }
8310
8311 for (unsigned int tid = 0; tid < n_threads; tid++)
8312 {
8315 }
8316
8317#ifdef MOOSE_KOKKOS_ENABLED
8319#endif
8320
8322
8324
8326
8328
8330
8332
8333 // For explicit Euler calculations for example we often compute the Jacobian one time and
8334 // then re-use it over and over. If we're performing automatic scaling, we don't want to
8335 // use that kernel, diagonal-block only Jacobian for our actual matrix when performing
8336 // solves!
8338 _has_jacobian = true;
8339 }
8340 }
8341 catch (...)
8342 {
8343 handleException("computeJacobianTags");
8344 }
8345 }
8346 catch (const MooseException &)
8347 {
8348 // The buck stops here, we have already handled the exception by
8349 // calling the system's stopSolve() method, it is now up to PETSc to return a
8350 // "diverged" reason during the next solve.
8351 }
8352 catch (...)
8353 {
8354 mooseError("Unexpected exception type");
8355 }
8356
8357 resetState();
8358}
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
virtual void resetState()
Reset state of this object in preparation for the next evaluation.
virtual void reinitScalars(const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
fills the VariableValue arrays for scalar variables from the solution vector
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
virtual void updateMortarMesh()
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition SubProblem.h:782
virtual void jacobianSetup(THREAD_ID tid=0) const override
virtual void jacobianSetup(THREAD_ID tid=0) const
void computeJacobianTags(const std::set< TagID > &tags)
Computes multiple (tag associated) Jacobian matricese.
virtual libMesh::System & system() override
Get the reference to the libMesh system.
void jacobianSetup()
Calls the jacobianSetup function for each of the output objects.
bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
virtual void restore_original_nonzero_pattern()
bool has_static_condensation() const
@ POST_AUX
Definition MooseTypes.h:761
@ PRE_AUX
Definition MooseTypes.h:760

Referenced by EigenProblem::computeJacobianAB(), computeJacobianInternal(), computeJacobianTag(), EigenProblem::computeJacobianTag(), and EigenProblem::computeMatricesTags().

◆ computeKokkosUserObjectsInternal()

void FEProblemBase::computeKokkosUserObjectsInternal ( const ExecFlagType &  type,
TheWarehouse::Query &  query 
)
protected

◆ computeLinearSystemSys()

void FEProblemBase::computeLinearSystemSys ( libMesh::LinearImplicitSystem &  sys,
libMesh::SparseMatrix< libMesh::Number > &  system_matrix,
NumericVector< libMesh::Number > &  rhs,
const bool  compute_gradients = true 
)
virtual

Assemble both the right hand side and the system matrix of a given linear system.

Parameters
sysThe linear system which should be assembled
system_matrixThe sparse matrix which should hold the system matrix
rhsThe vector which should hold the right hand side
compute_gradientsA flag to disable the computation of new gradients during the assembly, can be used to lag gradients

Definition at line 8437 of file FEProblemBase.C.

8441{
8442 TIME_SECTION("computeLinearSystemSys", 5);
8443
8445
8448
8449 // We are using the residual tag system for right hand sides so we fetch everything
8450 const auto & vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
8451
8452 // We filter out tags which do not have associated vectors in the current
8453 // system. This is essential to be able to use system-dependent vector tags.
8456
8460 compute_gradients);
8461
8466 // We reset the tags to the default containers for further operations
8471}
std::set< TagID > _linear_vector_tags
Temporary storage for filtered vector tags for linear systems.
void setCurrentLinearSystem(unsigned int sys_num)
Set the current linear system pointer.
void computeLinearSystemTags(const NumericVector< libMesh::Number > &soln, const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags, const bool compute_gradients=true)
Assemble the current linear system given a set of vector and matrix tags.
unsigned int linearSysNum(const LinearSystemName &linear_sys_name) const override
std::set< TagID > _linear_matrix_tags
Temporary storage for filtered matrix tags for linear systems.
TagID rightHandSideVectorTag() const
virtual TagID systemMatrixTag() const override
Return the Matrix Tag ID for System.
NumericVector< Number > & getRightHandSideVector()
Fetching the right hand side vector from the libmesh system.
SparseMatrix< Number > & getSystemMatrix()
Fetching the system matrix from the libmesh system.
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition SubProblem.C:164
static void selectVectorTagsFromSystem(const SystemBase &system, const std::vector< VectorTag > &input_vector_tags, std::set< TagID > &selected_tags)
Select the vector tags which belong to a specific system.
Definition SubProblem.C:281
static void selectMatrixTagsFromSystem(const SystemBase &system, const std::map< TagName, TagID > &input_matrix_tags, std::set< TagID > &selected_tags)
Select the matrix tags which belong to a specific system.
Definition SubProblem.C:292
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition SystemBase.C:981
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
Definition SystemBase.C:993
const std::string & name() const
@ VECTOR_TAG_RESIDUAL

Referenced by Moose::compute_linear_system(), and computeResidualL2Norm().

◆ computeLinearSystemTags()

void FEProblemBase::computeLinearSystemTags ( const NumericVector< libMesh::Number > &  soln,
const std::set< TagID > &  vector_tags,
const std::set< TagID > &  matrix_tags,
const bool  compute_gradients = true 
)

Assemble the current linear system given a set of vector and matrix tags.

Parameters
solnThe solution which should be used for the system assembly
vector_tagsThe vector tags for the right hand side
matrix_tagsThe matrix tags for the matrix
compute_gradientsA flag to disable the computation of new gradients during the assembly, can be used to lag gradients

Definition at line 8474 of file FEProblemBase.C.

8478{
8479 TIME_SECTION("computeLinearSystemTags", 5, "Computing Linear System");
8480
8482
8483 for (auto tag : matrix_tags)
8484 {
8485 auto & matrix = _current_linear_sys->getMatrix(tag);
8486 matrix.zero();
8487 }
8488
8489 unsigned int n_threads = numThreads();
8490
8492
8493 // Random interface objects
8494 for (const auto & it : _random_data_objects)
8495 it.second->updateSeeds(EXEC_NONLINEAR);
8496
8498
8500
8501 _aux->jacobianSetup();
8502
8503 for (THREAD_ID tid = 0; tid < n_threads; tid++)
8504 {
8506 }
8507
8508#ifdef MOOSE_KOKKOS_ENABLED
8510#endif
8511
8512 try
8513 {
8515 }
8516 catch (MooseException & e)
8517 {
8518 _console << "\nA MooseException was raised during Auxiliary variable computation.\n"
8519 << "The next solve will fail, the timestep will be reduced, and we will try again.\n"
8520 << std::endl;
8521
8522 // We know the next solve is going to fail, so there's no point in
8523 // computing anything else after this. Plus, using incompletely
8524 // computed AuxVariables in subsequent calculations could lead to
8525 // other errors or unhandled exceptions being thrown.
8526 return;
8527 }
8528
8531
8533
8534 _current_linear_sys->computeLinearSystemTags(vector_tags, matrix_tags, compute_gradients);
8535
8536 // Reset execution flag as after this point we are no longer on LINEAR
8538
8539 // These are the relevant parts of resetState()
8542}
void computeLinearSystemTags(const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags, const bool compute_gradients=true)
Compute the right hand side and the system matrix of the system for given tags.
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
virtual void zero()=0

Referenced by computeLinearSystemSys().

◆ computeMarkers()

void FEProblemBase::computeMarkers ( )
virtual

Reimplemented in DumpObjectsProblem.

Definition at line 5131 of file FEProblemBase.C.

5132{
5134 {
5135 TIME_SECTION("computeMarkers", 1, "Computing Markers");
5136
5137 std::vector<std::string> fields;
5138
5139 // Marker Fields
5140 const auto & markers = _markers.getActiveObjects();
5141 for (const auto & marker : markers)
5142 fields.push_back(marker->name());
5143
5144 _aux->zeroVariables(fields);
5145
5147
5148 for (THREAD_ID tid = 0; tid < numThreads(); ++tid)
5149 {
5150 const auto & markers = _markers.getActiveObjects(tid);
5151 for (const auto & marker : markers)
5152 marker->markerSetup();
5153 }
5154
5155 ComputeMarkerThread cmt(*this);
5157
5158 _aux->solution().close();
5159 _aux->update();
5160 }
5161}
void updateErrorVectors()
Update the ErrorVectors that have been requested through calls to getErrorVector().
Definition Adaptivity.C:407

Referenced by adaptMesh(), computeIndicatorsAndMarkers(), TransientBase::endStep(), Eigenvalue::execute(), SteadyBase::execute(), MFEMSteady::execute(), and initialAdaptMesh().

◆ computeMultiAppsDT()

Real FEProblemBase::computeMultiAppsDT ( ExecFlagType  type)

Find the smallest timestep over all MultiApps.

Definition at line 6452 of file FEProblemBase.C.

6453{
6454 const auto & multi_apps = _transient_multi_apps[type].getActiveObjects();
6455
6456 Real smallest_dt = std::numeric_limits<Real>::max();
6457
6458 for (const auto & multi_app : multi_apps)
6459 smallest_dt = std::min(smallest_dt, multi_app->computeDT());
6460
6461 return smallest_dt;
6462}
auto min(const L &left, const R &right)

Referenced by TransientBase::constrainDTFromMultiApp().

◆ computeNearNullSpace()

void FEProblemBase::computeNearNullSpace ( libMesh::NonlinearImplicitSystem &  sys,
std::vector< NumericVector< libMesh::Number > * > &  sp 
)
virtual

Definition at line 8545 of file FEProblemBase.C.

8547{
8548 mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
8549 "I expect these system numbers to be the same");
8550
8551 sp.clear();
8552 for (unsigned int i = 0; i < subspaceDim("NearNullSpace"); ++i)
8553 {
8554 std::stringstream postfix;
8555 postfix << "_" << i;
8556 std::string modename = "NearNullSpace" + postfix.str();
8557 sp.push_back(&_current_nl_sys->getVector(modename));
8558 }
8559}
unsigned int subspaceDim(const std::string &prefix) const
Dimension of the subspace spanned by vectors with a given prefix.

Referenced by Moose::compute_nearnullspace().

◆ computeNullSpace()

void FEProblemBase::computeNullSpace ( libMesh::NonlinearImplicitSystem &  sys,
std::vector< NumericVector< libMesh::Number > * > &  sp 
)
virtual

Definition at line 8562 of file FEProblemBase.C.

8564{
8565 mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
8566 "I expect these system numbers to be the same");
8567 sp.clear();
8568 for (unsigned int i = 0; i < subspaceDim("NullSpace"); ++i)
8569 {
8570 std::stringstream postfix;
8571 postfix << "_" << i;
8572 sp.push_back(&_current_nl_sys->getVector("NullSpace" + postfix.str()));
8573 }
8574}

Referenced by Moose::compute_nullspace().

◆ computePostCheck()

void FEProblemBase::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 
)
virtual

Definition at line 8592 of file FEProblemBase.C.

8598{
8599 mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
8600 "I expect these system numbers to be the same");
8601
8602 // This function replaces the old PetscSupport::dampedCheck() function.
8603 //
8604 // 1.) Recreate code in PetscSupport::dampedCheck() for constructing
8605 // ghosted "soln" and "update" vectors.
8606 // 2.) Call FEProblemBase::computeDamping() with these ghost vectors.
8607 // 3.) Recreate the code in PetscSupport::dampedCheck() to actually update
8608 // the solution vector based on the damping, and set the "changed" flags
8609 // appropriately.
8610
8611 TIME_SECTION("computePostCheck", 2, "Computing Post Check");
8612
8614
8615 // MOOSE's FEProblemBase doesn't update the solution during the
8616 // postcheck, but FEProblemBase-derived classes might.
8618 {
8619 // We need ghosted versions of new_soln and search_direction (the
8620 // ones we get from libmesh/PETSc are PARALLEL vectors. To make
8621 // our lives simpler, we use the same ghosting pattern as the
8622 // system's current_local_solution to create new ghosted vectors.
8623
8624 // Construct zeroed-out clones with the same ghosted dofs as the
8625 // System's current_local_solution.
8626 std::unique_ptr<NumericVector<Number>> ghosted_solution =
8627 sys.current_local_solution->zero_clone(),
8628 ghosted_search_direction =
8629 sys.current_local_solution->zero_clone();
8630
8631 // Copy values from input vectors into clones with ghosted values.
8632 *ghosted_solution = new_soln;
8633 *ghosted_search_direction = search_direction;
8634
8635 if (_has_dampers)
8636 {
8637 // Compute the damping coefficient using the ghosted vectors
8638 Real damping = computeDamping(*ghosted_solution, *ghosted_search_direction);
8639
8640 // If some non-trivial damping was computed, update the new_soln
8641 // vector accordingly.
8642 if (damping < 1.0)
8643 {
8644 new_soln = old_soln;
8645 new_soln.add(-damping, search_direction);
8646 changed_new_soln = true;
8647 }
8648 }
8649
8651 {
8652 // Update the ghosted copy of the new solution, if necessary.
8653 if (changed_new_soln)
8654 *ghosted_solution = new_soln;
8655
8656 bool updated_solution = updateSolution(new_soln, *ghosted_solution);
8657 if (updated_solution)
8658 changed_new_soln = true;
8659 }
8660 }
8661
8663 {
8665 _aux->copyCurrentIntoPreviousNL();
8666 }
8667
8668 // MOOSE doesn't change the search_direction
8669 changed_search_direction = false;
8670
8672}
const ExecFlagType EXEC_POSTCHECK
Definition Moose.C:36
virtual bool shouldUpdateSolution()
Check to see whether the problem should update the solution.
virtual Real computeDamping(const NumericVector< libMesh::Number > &soln, const NumericVector< libMesh::Number > &update)
virtual bool updateSolution(NumericVector< libMesh::Number > &vec_solution, NumericVector< libMesh::Number > &ghosted_solution)
Update the solution.
virtual void setPreviousNewtonSolution(const NumericVector< Number > &soln)
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition SubProblem.h:204
virtual void add(const numeric_index_type i, const T value)=0
std::unique_ptr< NumericVector< Number > > current_local_solution
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition MooseTypes.C:28

Referenced by Moose::compute_postcheck().

◆ computeResidual() [1/2]

virtual void FEProblemBase::computeResidual ( const NumericVector< libMesh::Number > &  soln,
NumericVector< libMesh::Number > &  residual,
const unsigned int  nl_sys_num 
)
virtual

Form a residual with default tags (nontime, time, residual).

◆ computeResidual() [2/2]

void FEProblemBase::computeResidual ( libMesh::NonlinearImplicitSystem &  sys,
const NumericVector< libMesh::Number > &  soln,
NumericVector< libMesh::Number > &  residual 
)

This function is called by Libmesh to form a residual.

This is deprecated. We should remove this as soon as RattleSnake is fixed.

Referenced by computeResidualL2Norm(), computeResidualSys(), ActuallyExplicitEuler::solve(), and ExplicitSSPRungeKutta::solveStage().

◆ computeResidualAndJacobian()

void FEProblemBase::computeResidualAndJacobian ( const NumericVector< libMesh::Number > &  soln,
NumericVector< libMesh::Number > &  residual,
libMesh::SparseMatrix< libMesh::Number > &  jacobian 
)

Form a residual and Jacobian with default tags.

Definition at line 7824 of file FEProblemBase.C.

7827{
7828 try
7829 {
7830 try
7831 {
7832 // vector tags
7834 const auto & residual_vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
7835
7836 mooseAssert(_fe_vector_tags.empty(),
7837 "This should be empty indicating a clean starting state");
7838 // We filter out tags which do not have associated vectors in the current nonlinear
7839 // system. This is essential to be able to use system-dependent residual tags.
7841
7843
7844 // matrix tags
7845 {
7846 _fe_matrix_tags.clear();
7847
7848 auto & tags = getMatrixTags();
7849 for (auto & tag : tags)
7850 _fe_matrix_tags.insert(tag.second);
7851 }
7852
7854
7857
7858 for (const auto tag : _fe_matrix_tags)
7859 if (_current_nl_sys->hasMatrix(tag))
7860 {
7861 auto & matrix = _current_nl_sys->getMatrix(tag);
7862 matrix.zero();
7864 // PETSc algorithms require diagonal allocations regardless of whether there is non-zero
7865 // diagonal dependence. With global AD indexing we only add non-zero
7866 // dependence, so PETSc will scream at us unless we artificially add the diagonals.
7867 for (auto index : make_range(matrix.row_start(), matrix.row_stop()))
7868 matrix.add(index, index, 0);
7869 }
7870
7871 _aux->zeroVariablesForResidual();
7872
7873 unsigned int n_threads = numThreads();
7874
7876
7877 // Random interface objects
7878 for (const auto & it : _random_data_objects)
7879 it.second->updateSeeds(EXEC_LINEAR);
7880
7885 {
7886 _displaced_problem->setCurrentlyComputingResidual(true);
7887 _displaced_problem->setCurrentlyComputingJacobian(true);
7888 _displaced_problem->setCurrentlyComputingResidualAndJacobian(true);
7889 }
7890
7892
7893 for (unsigned int tid = 0; tid < n_threads; tid++)
7894 reinitScalars(tid);
7895
7897
7898 _aux->residualSetup();
7899
7901 {
7903 _displaced_problem->updateMesh();
7904 if (_mortar_data->hasDisplacedObjects())
7906 }
7907
7908 for (THREAD_ID tid = 0; tid < n_threads; tid++)
7909 {
7912 }
7913
7914#ifdef MOOSE_KOKKOS_ENABLED
7916#endif
7917
7919
7921
7923
7925
7928
7930
7933 }
7934 catch (...)
7935 {
7936 handleException("computeResidualAndJacobian");
7937 }
7938 }
7939 catch (const MooseException &)
7940 {
7941 // The buck stops here, we have already handled the exception by
7942 // calling the system's stopSolve() method, it is now up to PETSc to return a
7943 // "diverged" reason during the next solve.
7944 }
7945 catch (...)
7946 {
7947 mooseError("Unexpected exception type");
7948 }
7949
7950 resetState();
7951 _fe_vector_tags.clear();
7952 _fe_matrix_tags.clear();
7953}
void setCurrentResidualVectorTags(const std::set< TagID > &vector_tags)
Set the current residual vector tag data structure based on the passed in tag IDs.
void setCurrentlyComputingResidual(bool currently_computing_residual) final
Set whether or not the problem is in the process of computing the residual.
virtual void residualSetup(THREAD_ID tid=0) const
void computeResidualAndJacobianTags(const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
Form possibly multiple tag-associated vectors and matrices.
TagID residualVectorTag() const override
void residualSetup()
Calls the residualSetup function for each of the output objects.
void setCurrentlyComputingJacobian(const bool currently_computing_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.
Definition SubProblem.h:700
void setCurrentlyComputingResidualAndJacobian(bool currently_computing_residual_and_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.

Referenced by ComputeResidualAndJacobian::residual_and_jacobian().

◆ computeResidualInternal()

void FEProblemBase::computeResidualInternal ( const NumericVector< libMesh::Number > &  soln,
NumericVector< libMesh::Number > &  residual,
const std::set< TagID > &  tags 
)
virtual

Form a residual vector for a set of tags.

It should not be called directly by users.

Definition at line 7985 of file FEProblemBase.C.

7988{
7989 parallel_object_only();
7990
7991 TIME_SECTION("computeResidualInternal", 1);
7992
7993 try
7994 {
7996
7998
7999 computeResidualTags(tags);
8000
8002 }
8003 catch (MooseException & e)
8004 {
8005 // If a MooseException propagates all the way to here, it means
8006 // that it was thrown from a MOOSE system where we do not
8007 // (currently) properly support the throwing of exceptions, and
8008 // therefore we have no choice but to error out. It may be
8009 // *possible* to handle exceptions from other systems, but in the
8010 // meantime, we don't want to silently swallow any unhandled
8011 // exceptions here.
8012 mooseError("An unhandled MooseException was raised during residual computation. Please "
8013 "contact the MOOSE team for assistance.");
8014 }
8015}
virtual void computeResidualTags(const std::set< TagID > &tags)
Form multiple residual vectors and each is associated with one tag.

◆ computeResidualL2Norm() [1/3]

Real FEProblemBase::computeResidualL2Norm ( )
virtual

Computes the residual using whatever is sitting in the current solution vector then returns the L2 norm.

Returns
The L2 norm of the residual

Reimplemented in EigenProblem.

Definition at line 7757 of file FEProblemBase.C.

7758{
7759 TIME_SECTION("computeResidualL2Norm", 2, "Computing L2 Norm of Residual");
7760
7761 // We use sum the squared norms of the individual systems and then take the square root of it
7762 Real l2_norm = 0.0;
7763 for (auto sys : _nl)
7764 {
7765 const auto norm = computeResidualL2Norm(*sys);
7766 l2_norm += norm * norm;
7767 }
7768
7769 for (auto sys : _linear_systems)
7770 {
7771 const auto norm = computeResidualL2Norm(*sys);
7772 l2_norm += norm * norm;
7773 }
7774
7775 return std::sqrt(l2_norm);
7776}
virtual Real computeResidualL2Norm()
Computes the residual using whatever is sitting in the current solution vector then returns the L2 no...
auto norm(const T &a)

Referenced by computeResidualL2Norm().

◆ computeResidualL2Norm() [2/3]

Real FEProblemBase::computeResidualL2Norm ( LinearSystem &  sys)

Computes the residual of a linear system using whatever is sitting in the current solution vector then returns the L2 norm.

Definition at line 7739 of file FEProblemBase.C.

7740{
7741 _current_linear_sys = &sys;
7742
7743 // We assemble the current system to check the current residual
7747 /*compute fresh gradients*/ true);
7748
7749 // Unfortunate, but we have to allocate a new vector for the residual
7750 auto residual = sys.linearImplicitSystem().rhs->clone();
7751 residual->scale(-1.0);
7752 residual->add_vector(*sys.currentSolution(), *sys.linearImplicitSystem().matrix);
7753 return residual->l2_norm();
7754}
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.
libMesh::LinearImplicitSystem & linearImplicitSystem()
Return a reference to the stored linear implicit system.
NumericVector< Number > * rhs
SparseMatrix< Number > * matrix
virtual std::unique_ptr< NumericVector< T > > clone() const=0

◆ computeResidualL2Norm() [3/3]

Real FEProblemBase::computeResidualL2Norm ( NonlinearSystemBase &  sys)

Computes the residual of a nonlinear system using whatever is sitting in the current solution vector then returns the L2 norm.

Definition at line 7731 of file FEProblemBase.C.

7732{
7733 _current_nl_sys = &sys;
7734 computeResidual(*sys.currentSolution(), sys.RHS(), sys.number());
7735 return sys.RHS().l2_norm();
7736}
void computeResidual(libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual)
This function is called by Libmesh to form a residual.
virtual NumericVector< Number > & RHS()=0
virtual Real l2_norm() const=0

Referenced by DefaultMultiAppFixedPointConvergence::checkConvergence(), Residual::getValue(), DefaultMultiAppFixedPointConvergence::preIteration(), and DefaultMultiAppFixedPointConvergence::preLoop().

◆ computeResidualSys()

void FEProblemBase::computeResidualSys ( libMesh::NonlinearImplicitSystem &  sys,
const NumericVector< libMesh::Number > &  soln,
NumericVector< libMesh::Number > &  residual 
)
virtual

This function is called by Libmesh to form a residual.

Definition at line 7779 of file FEProblemBase.C.

7782{
7783 parallel_object_only();
7784
7785 TIME_SECTION("computeResidualSys", 5);
7786 // Reset before residual setup, calculation & execution
7788
7789 computeResidual(soln, residual, sys.number());
7790}

Referenced by NonlinearSystem::computeScalingResidual(), ComputeFDResidualFunctor::residual(), ComputeResidualFunctor::residual(), and NonlinearSystem::solve().

◆ computeResidualTag()

void FEProblemBase::computeResidualTag ( const NumericVector< libMesh::Number > &  soln,
NumericVector< libMesh::Number > &  residual,
TagID  tag 
)
virtual

Form a residual vector for a given tag.

Definition at line 7956 of file FEProblemBase.C.

7959{
7960 try
7961 {
7963
7964 _current_nl_sys->associateVectorToTag(residual, tag);
7965
7966 computeResidualTags({tag});
7967
7969 }
7970 catch (MooseException & e)
7971 {
7972 // If a MooseException propagates all the way to here, it means
7973 // that it was thrown from a MOOSE system where we do not
7974 // (currently) properly support the throwing of exceptions, and
7975 // therefore we have no choice but to error out. It may be
7976 // *possible* to handle exceptions from other systems, but in the
7977 // meantime, we don't want to silently swallow any unhandled
7978 // exceptions here.
7979 mooseError("An unhandled MooseException was raised during residual computation. Please "
7980 "contact the MOOSE team for assistance.");
7981 }
7982}

◆ computeResidualTags()

void FEProblemBase::computeResidualTags ( const std::set< TagID > &  tags)
virtual

Form multiple residual vectors and each is associated with one tag.

Definition at line 8104 of file FEProblemBase.C.

8105{
8106 parallel_object_only();
8107
8108 try
8109 {
8110 try
8111 {
8112 TIME_SECTION("computeResidualTags", 5, "Computing Residual");
8113
8114 ADReal::do_derivatives = false;
8115
8117
8118 _aux->zeroVariablesForResidual();
8119
8120 unsigned int n_threads = numThreads();
8121
8123
8124 // Random interface objects
8125 for (const auto & it : _random_data_objects)
8126 it.second->updateSeeds(EXEC_LINEAR);
8127
8128 // This is itself a residual evaluation (distinct from the combined residual/Jacobian path
8129 // above, which sets this before its own updateMortarMesh() call): mark it so that
8130 // updateMortarMesh() below knows not to reinit the equation systems mid-evaluation. Reset by
8131 // resetState() at the bottom of this function.
8134 _displaced_problem->setCurrentlyComputingResidual(true);
8135
8137
8138 for (unsigned int tid = 0; tid < n_threads; tid++)
8139 reinitScalars(tid);
8140
8142
8143 _aux->residualSetup();
8144
8146 {
8148 _displaced_problem->updateMesh();
8149 if (_mortar_data->hasDisplacedObjects())
8151 }
8152
8153 for (THREAD_ID tid = 0; tid < n_threads; tid++)
8154 {
8157 }
8158
8159#ifdef MOOSE_KOKKOS_ENABLED
8161#endif
8162
8164
8166
8168
8170
8173 }
8174 catch (...)
8175 {
8176 handleException("computeResidualTags");
8177 }
8178 }
8179 catch (const MooseException &)
8180 {
8181 // The buck stops here, we have already handled the exception by
8182 // calling the system's stopSolve() method, it is now up to PETSc to return a
8183 // "diverged" reason during the next solve.
8184 }
8185 catch (...)
8186 {
8187 mooseError("Unexpected exception type");
8188 }
8189
8190 resetState();
8191}
void computeResidualTags(const std::set< TagID > &tags)
Form multiple tag-associated residual vectors for all the given tags.

Referenced by EigenProblem::computeResidualAB(), computeResidualInternal(), computeResidualTag(), EigenProblem::computeResidualTag(), and computeResidualType().

◆ computeResidualType()

void FEProblemBase::computeResidualType ( const NumericVector< libMesh::Number > &  soln,
NumericVector< libMesh::Number > &  residual,
TagID  tag 
)
virtual

Form a residual vector for a given tag and "residual" tag.

Definition at line 8018 of file FEProblemBase.C.

8021{
8022 TIME_SECTION("computeResidualType", 5);
8023
8024 try
8025 {
8027
8029
8031
8033 }
8034 catch (MooseException & e)
8035 {
8036 // If a MooseException propagates all the way to here, it means
8037 // that it was thrown from a MOOSE system where we do not
8038 // (currently) properly support the throwing of exceptions, and
8039 // therefore we have no choice but to error out. It may be
8040 // *possible* to handle exceptions from other systems, but in the
8041 // meantime, we don't want to silently swallow any unhandled
8042 // exceptions here.
8043 mooseError("An unhandled MooseException was raised during residual computation. Please "
8044 "contact the MOOSE team for assistance.");
8045 }
8046}

◆ computeSystems()

void FEProblemBase::computeSystems ( const ExecFlagType &  type)
protected

Do generic system computations.

Definition at line 10392 of file FEProblemBase.C.

10393{
10394 // When performing an adjoint solve in the optimization module, the current solver system is the
10395 // adjoint. However, the adjoint solve requires having accurate time derivative calculations for
10396 // the forward system. The cleanest way to handle such uses is just to compute the time
10397 // derivatives for all solver systems instead of trying to guess which ones we need and don't need
10398 for (auto & solver_sys : _solver_systems)
10399 solver_sys->compute(type);
10400
10401 _aux->compute(type);
10402}

Referenced by computeBounds(), computeJacobianBlocks(), EigenProblem::computeJacobianBlocks(), computeJacobianTags(), computeLinearSystemTags(), computeResidualAndJacobian(), computeResidualTags(), and execute().

◆ computeTransposeNullSpace()

void FEProblemBase::computeTransposeNullSpace ( libMesh::NonlinearImplicitSystem &  sys,
std::vector< NumericVector< libMesh::Number > * > &  sp 
)
virtual

Definition at line 8577 of file FEProblemBase.C.

8579{
8580 mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
8581 "I expect these system numbers to be the same");
8582 sp.clear();
8583 for (unsigned int i = 0; i < subspaceDim("TransposeNullSpace"); ++i)
8584 {
8585 std::stringstream postfix;
8586 postfix << "_" << i;
8587 sp.push_back(&_current_nl_sys->getVector("TransposeNullSpace" + postfix.str()));
8588 }
8589}

Referenced by Moose::compute_transpose_nullspace().

◆ computeUserObjectByName()

void FEProblemBase::computeUserObjectByName ( const ExecFlagType &  type,
const Moose::AuxGroup &  group,
const std::string &  name 
)
virtual

Compute an user object with the given name.

Definition at line 5416 of file FEProblemBase.C.

5419{
5420 const auto old_exec_flag = _current_execute_on_flag;
5422
5423 std::set<int> execution_groups;
5424
5425#ifdef MOOSE_KOKKOS_ENABLED
5426 TheWarehouse::Query kokkos_query =
5427 getUOQuery("KokkosUserObject", type, group).condition<AttribName>(name);
5428 getUOExecutionGroups(kokkos_query, execution_groups);
5429#endif
5430
5432 getUOExecutionGroups(query, execution_groups);
5433
5434 for (const auto execution_group : execution_groups)
5435 {
5436#ifdef MOOSE_KOKKOS_ENABLED
5438 type, kokkos_query.clone().condition<AttribExecutionOrderGroup>(execution_group));
5439#endif
5440
5442 query.clone().condition<AttribExecutionOrderGroup>(execution_group));
5443 }
5444
5445 _current_execute_on_flag = old_exec_flag;
5446}
TheWarehouse::Query getUOQuery(const std::string &system, const ExecFlagType &type, const Moose::AuxGroup &group) const
void computeUserObjectsInternal(const ExecFlagType &type, TheWarehouse::Query &query)
void computeKokkosUserObjectsInternal(const ExecFlagType &type, TheWarehouse::Query &query)
void getUOExecutionGroups(TheWarehouse::Query &query, std::set< int > &execution_groups) const
QueryCache is a convenient way to construct and pass around (possible partially constructed) warehous...
QueryCache clone() const
clone creates and returns an independent copy of the query in its current state.
query_obj query

Referenced by MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), MultiAppGeneralFieldFunctorTransfer::execute(), MultiAppGeneralFieldUserObjectTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppPostprocessorTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppVectorPostprocessorTransfer::executeToMultiapp(), and MultiAppConservativeTransfer::postExecute().

◆ computeUserObjects()

void FEProblemBase::computeUserObjects ( const ExecFlagType &  type,
const Moose::AuxGroup &  group 
)
virtual

Call compute methods on UserObjects.

Definition at line 5449 of file FEProblemBase.C.

5450{
5451 std::set<int> execution_groups;
5452
5453#ifdef MOOSE_KOKKOS_ENABLED
5454 TheWarehouse::Query kokkos_query = getUOQuery("KokkosUserObject", type, group);
5455 getUOExecutionGroups(kokkos_query, execution_groups);
5456#endif
5457
5458 TheWarehouse::Query query = getUOQuery("UserObject", type, group);
5459 getUOExecutionGroups(query, execution_groups);
5460
5461 for (const auto execution_group : execution_groups)
5462 {
5463#ifdef MOOSE_KOKKOS_ENABLED
5465 type, kokkos_query.clone().condition<AttribExecutionOrderGroup>(execution_group));
5466#endif
5467
5469 query.clone().condition<AttribExecutionOrderGroup>(execution_group));
5470 }
5471
5472 // Exceptions raised on solver execution flags are communicated and handled by the PARALLEL_CATCH
5473 // surrounding the assembly loops of the residual, Jacobian and linear systems. On all other
5474 // execution flags there is no solve left to fail, so the exception is communicated here in order
5475 // to report it at the point of the simulation where it was raised
5478}
virtual void checkExceptionAndStopSolve(bool print_message=true)
Check to see if an exception has occurred on any processor and, if possible, force the solve to fail,...

Referenced by computeJacobianTags(), computeLinearSystemTags(), computeResidualAndJacobian(), computeResidualTags(), and execute().

◆ computeUserObjectsInternal()

void FEProblemBase::computeUserObjectsInternal ( const ExecFlagType &  type,
TheWarehouse::Query &  query 
)
protected

Definition at line 5481 of file FEProblemBase.C.

5482{
5483 try
5484 {
5485 TIME_SECTION("computeUserObjects", 1, "Computing User Objects");
5486
5487 std::vector<GeneralUserObject *> genobjs;
5488 query.clone().condition<AttribInterfaces>(Interfaces::GeneralUserObject).queryInto(genobjs);
5489
5490 std::vector<UserObject *> userobjs;
5491 query.clone()
5495 .queryInto(userobjs);
5496
5497 std::vector<UserObject *> tgobjs;
5498 query.clone()
5500 .queryInto(tgobjs);
5501
5502 std::vector<UserObject *> nodal;
5503 query.clone().condition<AttribInterfaces>(Interfaces::NodalUserObject).queryInto(nodal);
5504
5505 std::vector<MortarUserObject *> mortar;
5506 query.clone().condition<AttribInterfaces>(Interfaces::MortarUserObject).queryInto(mortar);
5507
5508 if (userobjs.empty() && genobjs.empty() && tgobjs.empty() && nodal.empty() && mortar.empty())
5509 return;
5510
5511 // Start the timer here since we have at least one active user object
5512 std::string compute_uo_tag = "computeUserObjects(" + Moose::stringify(type) + ")";
5513
5514 // Perform Residual/Jacobian setups
5515 if (type == EXEC_LINEAR)
5516 {
5517 for (auto obj : userobjs)
5518 obj->residualSetup();
5519 for (auto obj : nodal)
5520 obj->residualSetup();
5521 for (auto obj : mortar)
5522 obj->residualSetup();
5523 for (auto obj : tgobjs)
5524 obj->residualSetup();
5525 for (auto obj : genobjs)
5526 obj->residualSetup();
5527 }
5528 else if (type == EXEC_NONLINEAR)
5529 {
5530 for (auto obj : userobjs)
5531 obj->jacobianSetup();
5532 for (auto obj : nodal)
5533 obj->jacobianSetup();
5534 for (auto obj : mortar)
5535 obj->jacobianSetup();
5536 for (auto obj : tgobjs)
5537 obj->jacobianSetup();
5538 for (auto obj : genobjs)
5539 obj->jacobianSetup();
5540 }
5541
5542 for (auto obj : userobjs)
5543 obj->initialize();
5544
5545 // Execute Side/InternalSide/Interface/Elemental/DomainUserObjects
5546 if (!userobjs.empty())
5547 {
5548 // non-nodal user objects have to be run separately before the nodal user objects run
5549 // because some nodal user objects (NodalNormal related) depend on elemental user objects
5550 // :-(
5551 ComputeUserObjectsThread cppt(*this, query);
5553
5554 // There is one instance in rattlesnake where an elemental user object's finalize depends
5555 // on a side user object having been finalized first :-(
5562 }
5563
5564 // if any elemental user object may have written to variables we need to close the aux solution
5565 for (const auto & uo : userobjs)
5566 if (auto euo = dynamic_cast<const ElementUserObject *>(uo);
5567 euo && euo->hasWritableCoupledVariables())
5568 {
5569 _aux->solution().close();
5570 _aux->system().update();
5571 break;
5572 }
5573
5574 // Execute NodalUserObjects
5575 // BISON has an axial reloc elemental user object that has a finalize func that depends on a
5576 // nodal user object's prev value. So we can't initialize this until after elemental objects
5577 // have been finalized :-(
5578 for (auto obj : nodal)
5579 obj->initialize();
5580 if (query.clone().condition<AttribInterfaces>(Interfaces::NodalUserObject).count() > 0)
5581 {
5582 ComputeNodalUserObjectsThread cnppt(*this, query);
5585 }
5586
5587 // if any nodal user object may have written to variables we need to close the aux solution
5588 for (const auto & uo : nodal)
5589 if (auto nuo = dynamic_cast<const NodalUserObject *>(uo);
5590 nuo && nuo->hasWritableCoupledVariables())
5591 {
5592 _aux->solution().close();
5593 _aux->system().update();
5594 break;
5595 }
5596
5597 // Execute MortarUserObjects
5598 {
5599 for (auto obj : mortar)
5600 obj->initialize();
5601 if (!mortar.empty())
5602 {
5603 auto create_and_run_mortar_functors = [this, type, &mortar](const bool displaced)
5604 {
5605 // go over mortar interfaces and construct functors
5606 const auto & mortar_interfaces = getMortarInterfaces(displaced);
5607 for (const auto & [primary_secondary_boundary_pair, interface_config] : mortar_interfaces)
5608 {
5609 auto mortar_uos_to_execute =
5610 getMortarUserObjects(primary_secondary_boundary_pair.first,
5611 primary_secondary_boundary_pair.second,
5612 displaced,
5613 mortar);
5614
5615 auto * const subproblem = displaced ? cast_ptr<SubProblem *>(_displaced_problem.get())
5616 : cast_ptr<SubProblem *>(this);
5617 MortarUserObjectThread muot(mortar_uos_to_execute,
5618 *interface_config.amg,
5619 *subproblem,
5620 *this,
5621 displaced,
5622 subproblem->assembly(0, 0));
5623
5624 muot();
5625 }
5626 };
5627
5628 create_and_run_mortar_functors(false);
5630 create_and_run_mortar_functors(true);
5631 }
5632 for (auto obj : mortar)
5633 obj->finalize();
5634 }
5635
5636 // Execute threaded general user objects
5637 for (auto obj : tgobjs)
5638 obj->initialize();
5639 std::vector<GeneralUserObject *> tguos_zero;
5640 query.clone()
5641 .condition<AttribThread>(0)
5642 .condition<AttribInterfaces>(Interfaces::ThreadedGeneralUserObject)
5643 .queryInto(tguos_zero);
5644 for (auto obj : tguos_zero)
5645 {
5646 std::vector<GeneralUserObject *> tguos;
5647 auto q = query.clone()
5648 .condition<AttribName>(obj->name())
5649 .condition<AttribInterfaces>(Interfaces::ThreadedGeneralUserObject);
5650 q.queryInto(tguos);
5651
5653
5654 // Force one thread per ThreadedGeneralUserObject via grainsize
5656 tguos.end(),
5657 /*grainsize=*/1),
5658 ctguot,
5659 numThreads());
5660 joinAndFinalize(q);
5661 }
5662
5663 // Execute general user objects
5665 }
5666 catch (...)
5667 {
5668 handleException("computeUserObjectsInternal");
5669 }
5670}
@ InternalSideUserObject
@ ThreadedGeneralUserObject
@ InterfaceUserObject
StoredRange< std::vector< GeneralUserObject * >::iterator, GeneralUserObject * > GeneralUserObjectRange
Thread to compute threaded general user objects.
Class for threaded computation of UserObjects.
bool hasWritableCoupledVariables() const
Checks whether the object has any writable coupled variables.
Definition Coupleable.h:142
void jacobianSetup() override
void joinAndFinalize(TheWarehouse::Query query, bool isgen=false)
void residualSetup() override
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, MortarInterfaceConfig > & getMortarInterfaces(bool on_displaced) const
std::vector< MortarUserObject * > getMortarUserObjects(BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced, const std::vector< MortarUserObject * > &mortar_uo_superset)
Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID,...
const libMesh::ConstNodeRange & getCurrentAlgebraicNodeRange()
A user object that runs over all the nodes and does an aggregation step to compute a single value.
void initialize(EquationSystems &es, const std::string &system_name)
Tnew cast_ptr(Told *oldvar)

Referenced by computeUserObjectByName(), and computeUserObjects().

◆ computingNonlinearResid() [1/3]

bool SubProblem::computingNonlinearResid ( ) const
inline

Returns true if the problem is in the process of computing the nonlinear residual.

Definition at line 718 of file SubProblem.h.

bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.

◆ computingNonlinearResid() [2/3]

void FEProblemBase::computingNonlinearResid ( bool  computing_nonlinear_residual)
finalvirtual

Set whether or not the problem is in the process of computing the nonlinear residual.

Reimplemented from SubProblem.

Definition at line 10023 of file FEProblemBase.C.

10024{
10025 parallel_object_only();
10026
10028 _displaced_problem->computingNonlinearResid(computing_nonlinear_residual);
10029 _computing_nonlinear_residual = computing_nonlinear_residual;
10030}

Referenced by NonlinearSystemBase::computeResidualInternal(), NonlinearSystemBase::computeScaling(), ComputeFDResidualFunctor::residual(), ComputeResidualFunctor::residual(), and ComputeResidualAndJacobian::residual_and_jacobian().

◆ computingNonlinearResid() [3/3]

virtual void SubProblem::computingNonlinearResid ( const bool  computing_nonlinear_residual)
inlinevirtual

Set whether or not the problem is in the process of computing the nonlinear residual.

Reimplemented from SubProblem.

Definition at line 723 of file SubProblem.h.

724 {
725 _computing_nonlinear_residual = computing_nonlinear_residual;
726 }

◆ computingPreSMOResidual()

bool FEProblemBase::computingPreSMOResidual ( const unsigned int  nl_sys_num) const
overridevirtual

Returns true if the problem is in the process of computing it's initial residual.

Returns
Whether or not the problem is currently computing the initial residual.

Implements SubProblem.

Definition at line 7470 of file FEProblemBase.C.

7471{
7472 return _nl[nl_sys_num]->computingPreSMOResidual();
7473}

Referenced by DisplacedProblem::computingPreSMOResidual().

◆ computingScalingJacobian() [1/2]

bool FEProblemBase::computingScalingJacobian ( ) const
inlinefinaloverridevirtual

Getter for whether we're computing the scaling jacobian.

Implements SubProblem.

Definition at line 2913 of file FEProblemBase.h.

bool _computing_scaling_jacobian
Flag used to indicate whether we are computing the scaling Jacobian.

◆ computingScalingJacobian() [2/2]

void FEProblemBase::computingScalingJacobian ( bool  computing_scaling_jacobian)
inline

◆ computingScalingResidual() [1/2]

bool FEProblemBase::computingScalingResidual ( ) const
inlinefinaloverridevirtual
Returns
whether we are currently computing a residual for automatic scaling purposes

Implements SubProblem.

Definition at line 2926 of file FEProblemBase.h.

bool _computing_scaling_residual
Flag used to indicate whether we are computing the scaling Residual.

◆ computingScalingResidual() [2/2]

void FEProblemBase::computingScalingResidual ( bool  computing_scaling_residual)
inline

Setter for whether we're computing the scaling residual.

Definition at line 2918 of file FEProblemBase.h.

2919 {
2920 _computing_scaling_residual = computing_scaling_residual;
2921 }

Referenced by NonlinearSystemBase::computeResidualInternal(), NonlinearSystemBase::computeResidualTags(), NonlinearSystemBase::computeScaling(), and DisplacedProblem::computingScalingResidual().

◆ connectControllableParams()

void MooseBase::connectControllableParams ( const std::string &  parameter,
const std::string &  object_type,
const std::string &  object_name,
const std::string &  object_parameter 
) const
inherited

Connect controllable parameter of this action with the controllable parameters of the objects added by this action.

Parameters
parameterName of the controllable parameter of this action
object_typeType of the object added by this action.
object_nameName of the object added by this action.
object_parameterName of the parameter of the object.

Definition at line 77 of file MooseBase.C.

81{
82 auto & factory = _app.getFactory();
83 auto & ip_warehouse = _app.getInputParameterWarehouse();
84
85 MooseObjectParameterName primary_name(uniqueName(), parameter);
86 const auto base_type = factory.getValidParams(object_type).getBase();
87 MooseObjectParameterName secondary_name(base_type, object_name, object_parameter);
88 ip_warehouse.addControllableParameterConnection(primary_name, secondary_name);
89
90 const auto & tags = _pars.get<std::vector<std::string>>("control_tags");
91 for (const auto & tag : tags)
92 {
93 if (!tag.empty())
94 {
95 // Only adds the parameter with the different control tags if the derived class
96 // properly registers the parameter to its own syntax
97 MooseObjectParameterName tagged_name(tag, name(), parameter);
98 ip_warehouse.addControllableParameterConnection(
99 tagged_name, secondary_name, /*error_on_empty=*/false);
100 }
101 }
102}
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
Definition MooseApp.h:404
MooseObjectName uniqueName() const
Definition MooseBase.C:69

◆ console()

const ConsoleStream & Problem::console ( ) const
inlineinherited

Return console handle.

Definition at line 48 of file Problem.h.

48{ return _console; }

Referenced by Moose::SlepcSupport::mooseSlepcEPSMonitor(), ComputeLinearFVElementalThread::printBlockExecutionInformation(), ComputeLinearFVFaceThread::printBlockExecutionInformation(), ComputeDiracThread::printBlockExecutionInformation(), ComputeIndicatorThread::printBlockExecutionInformation(), ComputeMarkerThread::printBlockExecutionInformation(), ComputeUserObjectsThread::printBlockExecutionInformation(), NonlinearThread::printBlockExecutionInformation(), NonlinearThread::printBoundaryExecutionInformation(), ComputeFVInitialConditionThread::printGeneralExecutionInformation(), ComputeInitialConditionThread::printGeneralExecutionInformation(), ComputeLinearFVElementalThread::printGeneralExecutionInformation(), ComputeLinearFVFaceThread::printGeneralExecutionInformation(), ComputeDiracThread::printGeneralExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeIndicatorThread::printGeneralExecutionInformation(), ComputeMarkerThread::printGeneralExecutionInformation(), ComputeNodalDampingThread::printGeneralExecutionInformation(), ComputeNodalKernelBCJacobiansThread::printGeneralExecutionInformation(), ComputeNodalKernelBcsThread::printGeneralExecutionInformation(), ComputeNodalKernelJacobiansThread::printGeneralExecutionInformation(), ComputeNodalKernelsThread::printGeneralExecutionInformation(), ComputeNodalUserObjectsThread::printGeneralExecutionInformation(), ComputeUserObjectsThread::printGeneralExecutionInformation(), NonlinearThread::printGeneralExecutionInformation(), and ComputeThreadedGeneralUserObjectsThread::printGeneralExecutionInformation().

◆ constJacobian()

bool FEProblemBase::constJacobian ( ) const

Returns _const_jacobian (whether a MOOSE object has specified that the Jacobian is the same as the previous time it was computed)

Definition at line 9865 of file FEProblemBase.C.

9866{
9867 return _const_jacobian;
9868}

Referenced by Moose::SlepcSupport::moosePetscSNESFormMatricesTags(), Moose::SlepcSupport::moosePetscSNESFormMatrixTag(), and DisplacedProblem::prepare().

◆ converged()

virtual bool SubProblem::converged ( const unsigned int  sys_num)
inlinevirtualinherited

Eventually we want to convert this virtual over to taking a solver system number argument.

We will have to first convert apps to use solverSystemConverged, and then once that is done, we can change this signature. Then we can go through the apps again and convert back to this changed API

Definition at line 116 of file SubProblem.h.

116{ return solverSystemConverged(sys_num); }
virtual bool solverSystemConverged(const unsigned int sys_num)
Definition SubProblem.h:103

Referenced by EigenExecutionerBase::inversePowerIteration(), EigenExecutionerBase::nonlinearSolve(), FEProblemSolve::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), ImplicitMidpoint::solve(), LStableDirk2::solve(), LStableDirk3::solve(), LStableDirk4::solve(), DisplacedProblem::solverSystemConverged(), SubProblem::solverSystemConverged(), and AB2PredictorCorrector::step().

◆ coordTransform()

MooseAppCoordTransform & FEProblemBase::coordTransform ( )
Returns
the coordinate transformation object that describes how to transform this problem's coordinate system into the canonical/reference coordinate system

Definition at line 10263 of file FEProblemBase.C.

10264{
10265 return mesh().coordTransform();
10266}

◆ copySolutionsBackwards()

void FEProblemBase::copySolutionsBackwards ( )
virtual

Definition at line 7476 of file FEProblemBase.C.

7477{
7478 TIME_SECTION("copySolutionsBackwards", 3, "Copying Solutions Backward");
7479
7480 for (auto & sys : _solver_systems)
7481 sys->copyStateHistoryBackwards();
7482 _aux->copyStateHistoryBackwards();
7483}

◆ coupling()

Moose::CouplingType FEProblemBase::coupling ( ) const
inline

◆ couplingEntries()

std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & FEProblemBase::couplingEntries ( const THREAD_ID  tid,
const unsigned int  nl_sys_num 
)

◆ couplingMatrix()

const libMesh::CouplingMatrix * FEProblemBase::couplingMatrix ( const unsigned int  nl_sys_num) const
inlineoverridevirtual

The coupling matrix defining what blocks exist in the preconditioning matrix.

Implements SubProblem.

Definition at line 3938 of file FEProblemBase.h.

3939{
3940 return _cm[i].get();
3941}

Referenced by DiffusionLHDGAssemblyHelper::checkCoupling(), DisplacedProblem::couplingMatrix(), and DisplacedProblem::init().

◆ createMortarInterface()

void FEProblemBase::createMortarInterface ( const std::pair< BoundaryID, BoundaryID > &  primary_secondary_boundary_pair,
const std::pair< SubdomainID, SubdomainID > &  primary_secondary_subdomain_pair,
bool  on_displaced,
bool  periodic,
const bool  debug,
const bool  correct_edge_dropping,
const Real  minimum_projection_angle,
const Mortar3DSubpatchPlane  mortar_3d_subpatch_plane,
const MooseEnum &  triangulation,
const bool  triangulate_triangles,
const Mortar3DQuadraturePointMapping  mortar_3d_qp_mapping = Mortar3DQuadraturePointMapping::NORMAL_PROJECTION 
)

Definition at line 8761 of file FEProblemBase.C.

8773{
8774 _has_mortar = true;
8775
8776 if (on_displaced)
8777 return _mortar_data->createMortarInterface(primary_secondary_boundary_pair,
8778 primary_secondary_subdomain_pair,
8780 on_displaced,
8781 periodic,
8782 debug,
8783 correct_edge_dropping,
8784 minimum_projection_angle,
8785 mortar_3d_subpatch_plane,
8786 triangulation,
8787 triangulate_triangles,
8788 mortar_3d_qp_mapping);
8789 else
8790 return _mortar_data->createMortarInterface(primary_secondary_boundary_pair,
8791 primary_secondary_subdomain_pair,
8792 *this,
8793 on_displaced,
8794 periodic,
8795 debug,
8796 correct_edge_dropping,
8797 minimum_projection_angle,
8798 mortar_3d_subpatch_plane,
8799 triangulation,
8800 triangulate_triangles,
8801 mortar_3d_qp_mapping);
8802}

◆ createQRules()

void FEProblemBase::createQRules ( libMesh::QuadratureType  type,
libMesh::Order  order,
libMesh::Order  volume_order = libMesh::INVALID_ORDER,
libMesh::Order  face_order = libMesh::INVALID_ORDER,
SubdomainID  block = Moose::ANY_BLOCK_ID,
bool  allow_negative_qweights = true 
)
virtual

Definition at line 6891 of file FEProblemBase.C.

6897{
6898 if (order == INVALID_ORDER)
6899 {
6900 // automatically determine the integration order
6901 order = _solver_systems[0]->getMinQuadratureOrder();
6902 for (const auto i : make_range(std::size_t(1), _solver_systems.size()))
6903 if (order < _solver_systems[i]->getMinQuadratureOrder())
6904 order = _solver_systems[i]->getMinQuadratureOrder();
6905 if (order < _aux->getMinQuadratureOrder())
6906 order = _aux->getMinQuadratureOrder();
6907 }
6908
6909 if (volume_order == INVALID_ORDER)
6910 volume_order = order;
6911
6912 if (face_order == INVALID_ORDER)
6913 face_order = order;
6914
6915 for (unsigned int tid = 0; tid < numThreads(); ++tid)
6916 for (const auto i : index_range(_solver_systems))
6917 _assembly[tid][i]->createQRules(
6918 type, order, volume_order, face_order, block, allow_negative_qweights);
6919
6921 _displaced_problem->createQRules(
6922 type, order, volume_order, face_order, block, allow_negative_qweights);
6923
6924 updateMaxQps();
6925}
virtual void createQRules(libMesh::QuadratureType type, libMesh::Order order, libMesh::Order volume_order=libMesh::INVALID_ORDER, libMesh::Order face_order=libMesh::INVALID_ORDER, SubdomainID block=Moose::ANY_BLOCK_ID, bool allow_negative_qweights=true)

Referenced by ActionUnitTest::buildMinimalObjects(), MooseObjectUnitTest::buildObjects(), and createQRules().

◆ createTagMatrices()

void FEProblemBase::createTagMatrices ( CreateTaggedMatrixKey  )

Definition at line 762 of file FEProblemBase.C.

763{
764 auto & matrices = getParam<std::vector<std::vector<TagName>>>("extra_tag_matrices");
765 for (const auto sys_num : index_range(matrices))
766 for (auto & matrix : matrices[sys_num])
767 {
768 auto tag = addMatrixTag(matrix);
769 _solver_systems[sys_num]->addMatrix(tag);
770 }
771
772 for (auto & sys : _solver_systems)
773 sys->sizeVariableMatrixData();
774 _aux->sizeVariableMatrixData();
775}
for(PetscInt i=0;i< nvars;++i)
virtual TagID addMatrixTag(TagName tag_name)
Create a Tag.
Definition SubProblem.C:303

◆ createTagSolutions()

void FEProblemBase::createTagSolutions ( )
protected

Create extra tagged solution vectors.

Definition at line 778 of file FEProblemBase.C.

779{
780 for (auto & vector : getParam<std::vector<TagName>>("extra_tag_solutions"))
781 {
782 auto tag = addVectorTag(vector, Moose::VECTOR_TAG_SOLUTION);
783 for (auto & sys : _solver_systems)
784 sys->addVector(tag, false, libMesh::GHOSTED);
785 _aux->addVector(tag, false, libMesh::GHOSTED);
786 }
787
789 {
790 // We'll populate the zeroth state of the nonlinear iterations with the current solution for
791 // ease of use in doing things like copying solutions backwards. We're just storing pointers in
792 // the solution states containers so populating the zeroth state does not cost us the memory of
793 // a new vector
795 }
796
798 for (auto & sys : _solver_systems)
799 sys->associateVectorToTag(*sys->system().current_local_solution.get(), tag);
800 _aux->associateVectorToTag(*_aux->system().current_local_solution.get(), tag);
801}
void needSolutionState(unsigned int oldest_needed, Moose::SolutionIterationType iteration_type)
Declare that we need up to old (1) or older (2) solution states for a given type of iteration.
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition SubProblem.C:84
@ VECTOR_TAG_SOLUTION
const TagName SOLUTION_TAG
Definition MooseTypes.C:25

Referenced by DumpObjectsProblem::DumpObjectsProblem(), EigenProblem::EigenProblem(), ExternalProblem::ExternalProblem(), and FEProblem::FEProblem().

◆ createTagVectors()

void FEProblemBase::createTagVectors ( )
protected

Create extra tagged vectors and matrices.

Definition at line 740 of file FEProblemBase.C.

741{
742 // add vectors and their tags to system
743 auto & vectors = getParam<std::vector<std::vector<TagName>>>("extra_tag_vectors");
744 for (const auto sys_num : index_range(vectors))
745 for (auto & vector : vectors[sys_num])
746 {
747 auto tag = addVectorTag(vector);
748 _solver_systems[sys_num]->addVector(tag, false, libMesh::GHOSTED);
749 }
750
751 auto & not_zeroed_vectors = getParam<std::vector<std::vector<TagName>>>("not_zeroed_tag_vectors");
752 for (const auto sys_num : index_range(not_zeroed_vectors))
753 for (auto & vector : not_zeroed_vectors[sys_num])
754 {
755 auto tag = addVectorTag(vector);
756 _solver_systems[sys_num]->addVector(tag, false, GHOSTED);
758 }
759}
void addNotZeroedVectorTag(const TagID tag)
Adds a vector tag to the list of vectors that will not be zeroed when other tagged vectors are.
Definition SubProblem.C:141

Referenced by DumpObjectsProblem::DumpObjectsProblem(), EigenProblem::EigenProblem(), ExternalProblem::ExternalProblem(), and FEProblem::FEProblem().

◆ currentLinearSysNum()

unsigned int FEProblemBase::currentLinearSysNum ( ) const
overridevirtual
Returns
the current linear system number

Implements SubProblem.

Definition at line 10280 of file FEProblemBase.C.

10281{
10282 // If we don't have linear systems this should be an invalid number
10283 unsigned int current_linear_sys_num = libMesh::invalid_uint;
10284 if (_linear_systems.size())
10285 current_linear_sys_num = currentLinearSystem().number();
10286
10287 return current_linear_sys_num;
10288}
LinearSystem & currentLinearSystem()
Get a non-constant reference to the current linear system.
const unsigned int invalid_uint

Referenced by DisplacedProblem::currentLinearSysNum().

◆ currentLinearSystem() [1/2]

LinearSystem & FEProblemBase::currentLinearSystem ( )
inline

Get a non-constant reference to the current linear system.

Definition at line 3906 of file FEProblemBase.h.

3907{
3908 mooseAssert(_current_linear_sys, "The linear system is not currently set");
3909 return *_current_linear_sys;
3910}

Referenced by currentLinearSysNum(), and Moose::PetscSupport::petscLinearConverged().

◆ currentLinearSystem() [2/2]

const LinearSystem & FEProblemBase::currentLinearSystem ( ) const
inline

Get a constant reference to the current linear system.

Definition at line 3913 of file FEProblemBase.h.

3914{
3915 mooseAssert(_current_linear_sys, "The linear system is not currently set");
3916 return *_current_linear_sys;
3917}

◆ currentlyComputingJacobian()

const bool & SubProblem::currentlyComputingJacobian ( ) const
inlineinherited

◆ currentlyComputingResidual()

const bool & SubProblem::currentlyComputingResidual ( ) const
inline

Returns true if the problem is in the process of computing the residual.

Definition at line 731 of file SubProblem.h.

bool _currently_computing_residual
Whether the residual is being evaluated.

Referenced by updateMortarMesh().

◆ currentlyComputingResidualAndJacobian()

const bool & SubProblem::currentlyComputingResidualAndJacobian ( ) const
inlineinherited

Returns true if the problem is in the process of computing the residual and the Jacobian.

Definition at line 1483 of file SubProblem.h.

1484{
1486}
bool _currently_computing_residual_and_jacobian
Flag to determine whether the problem is currently computing the residual and Jacobian.

Referenced by SubProblem::reinitElemFaceRef(), and NEML2Utils::shouldCompute().

◆ currentNlSysNum()

unsigned int FEProblemBase::currentNlSysNum ( ) const
overridevirtual
Returns
the current nonlinear system number

Implements SubProblem.

Definition at line 10269 of file FEProblemBase.C.

10270{
10271 // If we don't have nonlinear systems this should be an invalid number
10272 unsigned int current_nl_sys_num = libMesh::invalid_uint;
10273 if (_nl.size())
10274 current_nl_sys_num = currentNonlinearSystem().number();
10275
10276 return current_nl_sys_num;
10277}
NonlinearSystemBase & currentNonlinearSystem()

Referenced by DisplacedProblem::currentNlSysNum(), jacobianSetup(), and residualSetup().

◆ currentNonlinearSystem() [1/2]

NonlinearSystemBase & FEProblemBase::currentNonlinearSystem ( )
inline

◆ currentNonlinearSystem() [2/2]

const NonlinearSystemBase & FEProblemBase::currentNonlinearSystem ( ) const
inline

Definition at line 3883 of file FEProblemBase.h.

3884{
3885 mooseAssert(_current_nl_sys, "The nonlinear system is not currently set");
3886 return *_current_nl_sys;
3887}

◆ currentResidualVectorTags()

const std::vector< VectorTag > & FEProblemBase::currentResidualVectorTags ( ) const
inlineoverridevirtual

Return the residual vector tags we are currently computing.

Implements SubProblem.

Definition at line 3954 of file FEProblemBase.h.

3955{
3957}

Referenced by addCachedResidualDirectly(), addResidual(), addResidualLower(), addResidualNeighbor(), addResidualScalar(), and DisplacedProblem::currentResidualVectorTags().

◆ customSetup()

void FEProblemBase::customSetup ( const ExecFlagType &  exec_type)
overridevirtual

Reimplemented from SubProblem.

Definition at line 5181 of file FEProblemBase.C.

5182{
5183 SubProblem::customSetup(exec_type);
5184
5185 if (_line_search)
5186 _line_search->customSetup(exec_type);
5187
5188 unsigned int n_threads = numThreads();
5189 for (THREAD_ID tid = 0; tid < n_threads; tid++)
5190 {
5191 _all_materials.customSetup(exec_type, tid);
5192 _functions.customSetup(exec_type, tid);
5193 }
5194
5195#ifdef MOOSE_KOKKOS_ENABLED
5196 _kokkos_functions.customSetup(exec_type);
5197#endif
5198
5199 _aux->customSetup(exec_type);
5200 for (auto & nl : _nl)
5201 nl->customSetup(exec_type);
5202
5204 _displaced_problem->customSetup(exec_type);
5205
5206 for (THREAD_ID tid = 0; tid < n_threads; tid++)
5207 {
5208 _internal_side_indicators.customSetup(exec_type, tid);
5209 _indicators.customSetup(exec_type, tid);
5210 _markers.customSetup(exec_type, tid);
5211 }
5212
5213 std::vector<UserObject *> userobjs;
5214 theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(userobjs);
5215 for (auto obj : userobjs)
5216 obj->customSetup(exec_type);
5217
5218#ifdef MOOSE_KOKKOS_ENABLED
5219 {
5220 std::vector<UserObjectBase *> userobjs;
5221 theWarehouse().query().condition<AttribSystem>("KokkosUserObject").queryIntoUnsorted(userobjs);
5222 for (auto obj : userobjs)
5223 obj->customSetup(exec_type);
5224 }
5225#endif
5226
5227 _app.getOutputWarehouse().customSetup(exec_type);
5228}
void customSetup(const ExecFlagType &exec_type) override
virtual void customSetup(const ExecFlagType &exec_type, THREAD_ID tid=0) const
void customSetup(const ExecFlagType &exec_type)
Calls the setup function for each of the output objects.
virtual void customSetup(const ExecFlagType &exec_type)

Referenced by execute().

◆ declareManagedRestartableDataWithContext()

template<typename T , typename... Args>
Restartable::ManagedValue< T > Restartable::declareManagedRestartableDataWithContext ( const std::string &  data_name,
void *  context,
Args &&...  args 
)
protectedinherited

Declares a piece of "managed" restartable data and initialize it.

Here, "managed" restartable data means that the caller can destruct this data upon destruction of the return value of this method. Therefore, this ManagedValue<T> wrapper should survive after the final calls to dataStore() for it. That is... at the very end.

This is needed for objects whose destruction ordering is important, and enables natural c++ destruction in reverse construction order of the object that declares it.

See delcareRestartableData and declareRestartableDataWithContext for more information.

Definition at line 283 of file Restartable.h.

286{
287 auto & data_ptr =
288 declareRestartableDataHelper<T>(data_name, context, std::forward<Args>(args)...);
289 return Restartable::ManagedValue<T>(data_ptr);
290}
Wrapper class for restartable data that is "managed.
Definition Restartable.h:43

◆ declareRecoverableData()

template<typename T , typename... Args>
T & Restartable::declareRecoverableData ( const std::string &  data_name,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "recoverable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

Note - this data will NOT be restored on Restart!

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
argsArguments to forward to the constructor of the data

Definition at line 358 of file Restartable.h.

359{
360 const auto full_name = restartableName(data_name);
361
363
364 return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
365}
std::string restartableName(const std::string &data_name) const
Gets the name of a piece of restartable data given a data name, adding the system name and object nam...
Definition Restartable.C:78
void registerRestartableNameWithFilterOnApp(const std::string &name, Moose::RESTARTABLE_FILTER filter)
Helper function for actually registering the restartable data.
Definition Restartable.C:71

◆ declareRestartableData()

template<typename T , typename... Args>
T & Restartable::declareRestartableData ( const std::string &  data_name,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
argsArguments to forward to the constructor of the data

Definition at line 276 of file Restartable.h.

277{
278 return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
279}

◆ declareRestartableDataHelper()

template<typename T , typename... Args>
RestartableData< T > & Restartable::declareRestartableDataHelper ( const std::string &  data_name,
void *  context,
Args &&...  args 
) const
privateinherited

Helper function for declaring restartable data.

We use this function to reduce code duplication when returning const/nonconst references to the data.

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
contextContext pointer that will be passed to the load and store functions
argsArguments to forward to the constructor of the data

Definition at line 310 of file Restartable.h.

313{
314 const auto full_name = restartableName(data_name);
315
316 // Here we will create the RestartableData even though we may not use this instance.
317 // If it's already in use, the App will return a reference to the existing instance and we'll
318 // return that one instead. We might refactor this to have the app create the RestartableData
319 // at a later date.
320 auto data_ptr =
321 std::make_unique<RestartableData<T>>(full_name, context, std::forward<Args>(args)...);
322 auto & restartable_data_ref = cast_ref<RestartableData<T> &>(
323 registerRestartableDataOnApp(std::move(data_ptr), _restartable_tid));
324
325 return restartable_data_ref;
326}
const THREAD_ID _restartable_tid
The thread ID for this object.
RestartableDataValue & registerRestartableDataOnApp(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
Helper function for actually registering the restartable data.
Definition Restartable.C:63

◆ declareRestartableDataWithContext()

template<typename T , typename... Args>
T & Restartable::declareRestartableDataWithContext ( const std::string &  data_name,
void *  context,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
contextContext pointer that will be passed to the load and store functions
argsArguments to forward to the constructor of the data

Definition at line 301 of file Restartable.h.

304{
305 return declareRestartableDataHelper<T>(data_name, context, std::forward<Args>(args)...).set();
306}

◆ declareRestartableDataWithObjectName()

template<typename T , typename... Args>
T & Restartable::declareRestartableDataWithObjectName ( const std::string &  data_name,
const std::string &  object_name,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.
argsArguments to forward to the constructor of the data

Definition at line 330 of file Restartable.h.

333{
334 return declareRestartableDataWithObjectNameWithContext<T>(
335 data_name, object_name, nullptr, std::forward<Args>(args)...);
336}

◆ declareRestartableDataWithObjectNameWithContext()

template<typename T , typename... Args>
T & Restartable::declareRestartableDataWithObjectNameWithContext ( const std::string &  data_name,
const std::string &  object_name,
void *  context,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.
contextContext pointer that will be passed to the load and store functions
argsArguments to forward to the constructor of the data

Definition at line 340 of file Restartable.h.

344{
345 std::string old_name = _restartable_name;
346
347 _restartable_name = object_name;
348
349 T & value = declareRestartableDataWithContext<T>(data_name, context, std::forward<Args>(args)...);
350
351 _restartable_name = old_name;
352
353 return value;
354}
std::string _restartable_name
The name of the object.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ defaultGhosting()

bool SubProblem::defaultGhosting ( )
inlineinherited

Whether or not the user has requested default ghosting ot be on.

Definition at line 147 of file SubProblem.h.

147{ return _default_ghosting; }
bool _default_ghosting
Whether or not to use default libMesh coupling.

Referenced by DisplacedSystem::DisplacedSystem(), and NonlinearSystemBase::NonlinearSystemBase().

◆ determineSolverSystem()

std::pair< bool, unsigned int > FEProblemBase::determineSolverSystem ( const std::string &  var_name,
bool  error_if_not_found = false 
) const
overrideprivatevirtual

Determine what solver system the provided variable name lies in.

Parameters
var_nameThe name of the variable we are doing solver system lookups for
error_if_not_foundWhether to error if the variable name isn't found in any of the solver systems
Returns
A pair in which the first member indicates whether the variable was found in the solver systems and the second member indicates the solver system number in which the variable was found (or an invalid unsigned integer if not found)

Implements SubProblem.

Definition at line 3128 of file FEProblemBase.C.

3130{
3131 auto map_it = _solver_var_to_sys_num.find(var_name);
3132 const bool var_in_sys = map_it != _solver_var_to_sys_num.end();
3133 if (var_in_sys)
3134 mooseAssert(_solver_systems[map_it->second]->hasVariable(var_name) ||
3135 _solver_systems[map_it->second]->hasScalarVariable(var_name),
3136 "If the variable is in our FEProblem solver system map, then it must be in the "
3137 "solver system we expect");
3138 else if (error_if_not_found)
3139 {
3140 if (_aux->hasVariable(var_name) || _aux->hasScalarVariable(var_name))
3141 mooseError("No solver variable named ",
3142 var_name,
3143 " found. Did you specify an auxiliary variable when you meant to specify a "
3144 "solver variable?");
3145 else
3146 mooseError("Unknown variable '",
3147 var_name,
3148 "'. It does not exist in the solver system(s) or auxiliary system");
3149 }
3150
3151 return std::make_pair(var_in_sys, var_in_sys ? map_it->second : libMesh::invalid_uint);
3152}

Referenced by addBoundaryCondition(), addConstraint(), addDamper(), addDGKernel(), addDiracKernel(), addHDGKernel(), addInterfaceKernel(), addKernel(), addNodalKernel(), addScalarKernel(), DisplacedProblem::determineSolverSystem(), and getSystem().

◆ diracKernelInfo()

DiracKernelInfo & SubProblem::diracKernelInfo ( )
virtualinherited

Definition at line 740 of file SubProblem.C.

741{
742 return _dirac_kernel_info;
743}

◆ doingPRefinement()

bool SubProblem::doingPRefinement ( ) const
inherited
Returns
whether we're doing p-refinement

Definition at line 1345 of file SubProblem.C.

1346{
1347 return mesh().doingPRefinement();
1348}
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we're doing includes p-refinement.
Definition MooseMesh.h:1502

Referenced by ElementAdaptivityLevelAux::ElementAdaptivityLevelAux(), ElementLpNormAux::ElementLpNormAux(), InternalSideIndicatorBase::InternalSideIndicatorBase(), meshChanged(), and VolumeAux::VolumeAux().

◆ dt()

virtual Real & FEProblemBase::dt ( ) const
inlinevirtual

◆ dtOld()

virtual Real & FEProblemBase::dtOld ( ) const
inlinevirtual

Definition at line 585 of file FEProblemBase.h.

585{ return _dt_old; }

Referenced by IterationAdaptiveDT::acceptStep().

◆ duplicateVariableCheck()

bool FEProblemBase::duplicateVariableCheck ( const std::string &  var_name,
const libMesh::FEType &  type,
bool  is_aux,
const std::set< SubdomainID > *const  active_subdomains 
)
protected

Helper to check for duplicate variable names across systems or within a single system.

Definition at line 2991 of file FEProblemBase.C.

2995{
2996 std::set<SubdomainID> subdomainIDs;
2997 if (active_subdomains->size() == 0)
2998 {
2999 const auto subdomains = _mesh.meshSubdomains();
3000 subdomainIDs.insert(subdomains.begin(), subdomains.end());
3001 }
3002 else
3003 subdomainIDs.insert(active_subdomains->begin(), active_subdomains->end());
3004
3005 for (auto & sys : _solver_systems)
3006 {
3007 SystemBase * curr_sys_ptr = sys.get();
3008 SystemBase * other_sys_ptr = _aux.get();
3009 std::string error_prefix = "";
3010 if (is_aux)
3011 {
3012 curr_sys_ptr = _aux.get();
3013 other_sys_ptr = sys.get();
3014 error_prefix = "aux";
3015 }
3016
3017 if (other_sys_ptr->hasVariable(var_name))
3018 mooseError("Cannot have an auxiliary variable and a solver variable with the same name: ",
3019 var_name);
3020
3021 if (curr_sys_ptr->hasVariable(var_name))
3022 {
3023 const libMesh::Variable & var =
3024 curr_sys_ptr->system().variable(curr_sys_ptr->system().variable_number(var_name));
3025
3026 // variable type
3027 if (var.type() != type)
3028 mooseError("Mismatching types are specified for ",
3029 error_prefix,
3030 "variable with name '",
3031 var_name,
3032 "': '",
3033 Moose::stringify(var.type()),
3034 "' and '",
3036 "'");
3037
3038 // block-restriction
3039 if (!(active_subdomains->size() == 0 && var.active_subdomains().size() == 0))
3040 {
3041 const auto varActiveSubdomains = var.active_subdomains();
3042 std::set<SubdomainID> varSubdomainIDs;
3043 if (varActiveSubdomains.size() == 0)
3044 {
3045 const auto subdomains = _mesh.meshSubdomains();
3046 varSubdomainIDs.insert(subdomains.begin(), subdomains.end());
3047 }
3048 else
3049 varSubdomainIDs.insert(varActiveSubdomains.begin(), varActiveSubdomains.end());
3050
3051 // Is subdomainIDs a subset of varSubdomainIDs? With this we allow the case that the newly
3052 // requested block restriction is only a subset of the existing one.
3053 const auto isSubset = std::includes(varSubdomainIDs.begin(),
3054 varSubdomainIDs.end(),
3055 subdomainIDs.begin(),
3056 subdomainIDs.end());
3057
3058 if (!isSubset)
3059 {
3060 // helper function: make a string from a set of subdomain ids
3061 const auto stringifySubdomains = [this](std::set<SubdomainID> subdomainIDs)
3062 {
3063 std::stringstream s;
3064 for (auto const i : subdomainIDs)
3065 {
3066 // do we need to insert a comma?
3067 if (s.tellp() != 0)
3068 s << ", ";
3069
3070 // insert subdomain name and id -or- only the id (if no name is given)
3071 const auto subdomainName = _mesh.getSubdomainName(i);
3072 if (subdomainName.empty())
3073 s << i;
3074 else
3075 s << subdomainName << " (" << i << ")";
3076 }
3077 return s.str();
3078 };
3079
3080 const std::string msg = "Mismatching block-restrictions are specified for " +
3081 error_prefix + "variable with name '" + var_name + "': {" +
3082 stringifySubdomains(varSubdomainIDs) + "} and {" +
3083 stringifySubdomains(subdomainIDs) + "}";
3084
3085 mooseError(msg);
3086 }
3087 }
3088
3089 return true;
3090 }
3091 }
3092
3093 return false;
3094}
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition SystemBase.C:851
const Variable & variable(unsigned int var) const
unsigned int variable_number(std::string_view var) const
const std::set< subdomain_id_type > & active_subdomains() const
const FEType & type() const

Referenced by addAuxArrayVariable(), addAuxScalarVariable(), addAuxVariable(), and addVariable().

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 49 of file MooseObject.h.

49{ return _enabled; }
const bool & _enabled
Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects.
Definition MooseObject.h:71

Referenced by EigenKernel::enabled(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), and NodeFaceConstraint::validParams().

◆ errorOnJacobianNonzeroReallocation()

bool FEProblemBase::errorOnJacobianNonzeroReallocation ( ) const
inline

Will return True if the user wants to get an error when a nonzero is reallocated in the Jacobian by PETSc.

Definition at line 2438 of file FEProblemBase.h.

2439 {
2441 }

Referenced by NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), and NonlinearSystemBase::constraintJacobians().

◆ errorPrefix()

std::string MooseBase::errorPrefix ( const std::string &  ) const
inlineinherited

Deprecated message prefix; the error type is no longer used.

Definition at line 264 of file MooseBase.h.

264{ return messagePrefix(); }

◆ es()

virtual libMesh::EquationSystems & FEProblemBase::es ( )
inlineoverridevirtual

◆ execMultiApps()

bool FEProblemBase::execMultiApps ( ExecFlagType  type,
bool  auto_advance = true 
)

Execute the MultiApps associated with the ExecFlagType.

Definition at line 6235 of file FEProblemBase.C.

6236{
6237 // Active MultiApps
6238 const std::vector<MooseSharedPointer<MultiApp>> & multi_apps =
6239 _multi_apps[exec_on].getActiveObjects();
6240
6241 // Do anything that needs to be done to Apps before transfers
6242 for (const auto & multi_app : multi_apps)
6243 multi_app->preTransfer(_dt, _time);
6244
6245 // Execute Transfers _to_ MultiApps
6247
6248 // Execute Transfers _beween_ MultiApps for the multiapps that don't execute on this flag
6249 // NOTE: there is usually no need to execute a transfer unless the multiapp providing its
6250 // data also executed. But we need to obey what the user requested for the execution schedule,
6251 // hence the two executions
6253
6254 // Order the multiapps based on their execution group
6255 // Build the ordered multiapp groups
6256 std::map<unsigned int, std::vector<MooseSharedPointer<MultiApp>>> ordered_multi_apps;
6257
6258 for (const auto & multi_app : multi_apps)
6259 ordered_multi_apps[multi_app->getParam<unsigned int>("execution_order_group")].push_back(
6260 multi_app);
6261
6262 // Check that concurrent multiapps will even be used
6263 if (multi_apps.size() && _num_concurrent_multiapps > 1)
6264 {
6265 bool has_concurrent_apps = false;
6266 for (const auto & [group, multi_app_group] : ordered_multi_apps)
6267 if (multi_app_group.size() > 1)
6268 has_concurrent_apps = true;
6269 if (!has_concurrent_apps)
6270 paramInfo(
6271 "num_concurrent_multiapps",
6272 "Due to the specified multiapp execution groups, or differences in execution schedules, "
6273 "concurrent multiapps are not actually used on " +
6274 Moose::stringify(exec_on));
6275 }
6276
6277 // Execute MultiApps
6278 if (multi_apps.size())
6279 {
6280 TIME_SECTION("execMultiApps", 1, "Executing MultiApps", false);
6281
6283 _console << COLOR_CYAN << "\nExecuting MultiApps on " << Moose::stringify(exec_on)
6284 << COLOR_DEFAULT << std::endl;
6285
6286 bool success = true;
6287
6288 for (const auto & [group_id, multi_app_group] : ordered_multi_apps)
6289 {
6290 bool group_success = true;
6291 if (_verbose_multiapps && ordered_multi_apps.size() > 1)
6292 _console << COLOR_CYAN << "\nExecuting MultiApps group " << Moose::stringify(group_id)
6293 << COLOR_DEFAULT << std::endl;
6294
6295 if (_verbose_multiapps && multi_app_group.size() > 1)
6296 {
6297 // Let the user know about concurrent multiapp use (new option: help them set it up)
6298 _console << COLOR_CYAN << "\nConcurrent MultiApps: " << std::endl;
6299 for (const auto & multi_app : multi_app_group)
6300 _console << multi_app->name() << " ";
6301 _console << COLOR_DEFAULT << std::endl;
6302 }
6303
6304 // With concurrent multiapps, the multiapps in a group have each been assigned a disjoint
6305 // subset of the ranks (see partitionConcurrentMultiApps()), so solveStep() does real work
6306 // only on those ranks and returns early on the others. Looping here therefore lets different
6307 // ranks advance different multiapps at the same time - the concurrency comes from the rank
6308 // partition. This notably avoids racing PETSc's process-global state (communicator and
6309 // options database).
6310 for (const auto & multi_app : multi_app_group)
6311 if (!multi_app->solveStep(_dt, _time, auto_advance))
6312 group_success = false;
6313
6314 // Whether to move on to the next group must be a collective decision so that every rank
6315 // leaves the group loop together and stays aligned for the following collectives.
6316 _communicator.min(group_success);
6317
6318 // No need to solve the other groups if this group failed
6319 if (!group_success)
6320 {
6321 success = false;
6322 break;
6323 }
6324
6325 // Execute Transfers _between_ MultiApps after each app executes
6326 for (const auto & multi_app : multi_app_group)
6327 execMultiAppTransfers(exec_on, MultiAppTransfer::BETWEEN_MULTIAPP, multi_app->name());
6328 }
6329
6331 _communicator.min(success);
6332
6333 if (!success)
6334 return false;
6335
6337 _console << COLOR_CYAN << "Finished Executing MultiApps on " << Moose::stringify(exec_on)
6338 << "\n"
6339 << COLOR_DEFAULT << std::endl;
6340 }
6341
6342 // Execute Transfers _from_ MultiApps (to the parent app)
6344
6345 // If we made it here then everything passed
6346 return true;
6347}
void execMultiAppTransfers(ExecFlagType type, Transfer::DIRECTION direction, const MultiAppName &source_app="")
Execute MultiAppTransfers associated with execution flag and direction.
void paramInfo(const std::string &param, Args... args) const
Emits an informational message prefixed with the file and line number of the given param (from the in...
Definition MooseBase.h:471
Base class for all MultiAppTransfer objects.
void min(const T &r, T &o, Request &req) const

Referenced by adaptMesh(), computeJacobianTags(), computeLinearSystemTags(), computeResidualAndJacobian(), computeResidualTags(), Eigenvalue::execute(), SteadyBase::execute(), TransientBase::execute(), MFEMSteady::execute(), EigenExecutionerBase::postExecute(), FixedPointSolve::solve(), FixedPointSolve::solveStep(), and MFEMTransient::takeStep().

◆ execMultiAppTransfers()

void FEProblemBase::execMultiAppTransfers ( ExecFlagType  type,
Transfer::DIRECTION  direction,
const MultiAppName &  source_app = "" 
)

Execute MultiAppTransfers associated with execution flag and direction.

Parameters
typeThe execution flag to execute.
directionThe direction (to or from) to transfer.
source_appThe source application to execute transfers from. Defaults to all sources

Definition at line 5988 of file FEProblemBase.C.

5991{
5992 // Keep track of whether a transfer is actually executed to avoid extraneous console output
5993 bool is_executing_a_transfer = false;
5994 bool to_multiapp = direction == MultiAppTransfer::TO_MULTIAPP;
5995 bool from_multiapp = direction == MultiAppTransfer::FROM_MULTIAPP;
5996
5997 // Build console output
5998 std::string string_direction;
5999 std::string additional_source_info = "";
6000 if (to_multiapp)
6001 string_direction = " To ";
6002 else if (from_multiapp)
6003 string_direction = " From ";
6004 else
6005 string_direction = " Between ";
6006 if (!source_app.empty())
6007 additional_source_info = " from app '" + source_app + "'";
6008
6009 // This lambda only checks the source app, since the exec_type selection is done in the warehouse
6010 auto executeThisTransfer = [this, &direction, &source_app, &type](auto & transfer)
6011 {
6012 mooseAssert(transfer->getExecuteOnEnum().contains(type), "Should execute on this schedule");
6013 // no restriction / ordering groups on transfers from parent to child at this time
6014 if (direction != MultiAppTransfer::BETWEEN_MULTIAPP)
6015 return true;
6016 // on sibling transfers, we can delay until the app has been executed if the transfer is set
6017 // that way.
6018 if (transfer->getFromName() == source_app && transfer->executeAfterSiblingSourceApp())
6019 {
6020 libmesh_ignore(this);
6021 mooseAssert(this->getMultiApp(transfer->getFromName())->getExecuteOnEnum().contains(type),
6022 "from_multiapp should also execute on this schedule");
6023 }
6024 // Execute if:
6025 // - transfer is set execute before from_multiapp, and we are calling this before source apps
6026 // - from_multiapp app is not executing on this execute_on
6027 // - from_multiapp just executed (set to source app)
6028 if ((source_app.empty() && (!transfer->executeAfterSiblingSourceApp() ||
6029 !transfer->getFromMultiApp()->getExecuteOnEnum().contains(type))) ||
6030 (transfer->getFromName() == source_app && transfer->executeAfterSiblingSourceApp()))
6031 return true;
6032 return false;
6033 };
6034
6036 : from_multiapp ? _from_multi_app_transfers[type]
6038
6039 if (wh.hasActiveObjects())
6040 {
6041 TIME_SECTION("execMultiAppTransfers", 1, "Executing Transfers");
6042
6043 const auto & transfers = wh.getActiveObjects();
6044
6046 {
6048 {"Name", "Type", "From", "To"});
6049
6050 // Build Table of Transfer Info
6051 for (const auto & transfer : transfers)
6052 {
6053 auto multiapp_transfer = dynamic_cast<MultiAppTransfer *>(transfer.get());
6054
6055 // Don't add transfer to table if it won't execute
6056 if (!executeThisTransfer(multiapp_transfer))
6057 continue;
6058
6059 is_executing_a_transfer = true;
6060 table.addRow(multiapp_transfer->name(),
6061 multiapp_transfer->type(),
6062 multiapp_transfer->getFromName(),
6063 multiapp_transfer->getToName());
6064 }
6065
6066 // Print it
6067 if (is_executing_a_transfer)
6068 {
6069 _console << COLOR_CYAN << "\nTransfers on " << Moose::stringify(type) << string_direction
6070 << "MultiApps" << additional_source_info << COLOR_DEFAULT << ":" << std::endl;
6071
6072 table.print(_console);
6073 }
6074 }
6075
6076 for (const auto & transfer : transfers)
6077 {
6078 auto multiapp_transfer = libMesh::cast_ptr<MultiAppTransfer *>(transfer.get());
6079 if (!executeThisTransfer(multiapp_transfer))
6080 continue;
6081
6082 transfer->setCurrentDirection(direction);
6083 transfer->execute();
6084 }
6085
6087
6088 if (_verbose_multiapps && is_executing_a_transfer)
6089 _console << COLOR_CYAN << "Transfers on " << Moose::stringify(type) << " Are Finished\n"
6090 << COLOR_DEFAULT << std::endl;
6091 }
6092
6093 if (_multi_apps[type].getActiveObjects().size() && !is_executing_a_transfer && _verbose_multiapps)
6094 _console << COLOR_CYAN << "\nNo Transfers on " << Moose::stringify(type) << string_direction
6095 << "MultiApps\n"
6096 << COLOR_DEFAULT << std::endl;
6097}
A class for "pretty printing" a table of data.
void libmesh_ignore(const Args &...)

Referenced by execMultiApps().

◆ execute()

void FEProblemBase::execute ( const ExecFlagType &  exec_type)
virtual

Convenience function for performing execution of MOOSE systems.

Reimplemented in DumpObjectsProblem, MFEMProblem, and EigenProblem.

Definition at line 5231 of file FEProblemBase.C.

5232{
5233 // Set the current flag
5234 setCurrentExecuteOnFlag(exec_type);
5235
5236 if (exec_type != EXEC_INITIAL)
5237 executeControls(exec_type);
5238
5239 // intentially call this after executing controls because the setups may rely on the controls
5240 // FIXME: we skip the following flags because they have dedicated setup functions in
5241 // SetupInterface and it may not be appropriate to call them here.
5242 if (!(exec_type == EXEC_INITIAL || exec_type == EXEC_TIMESTEP_BEGIN ||
5243 exec_type == EXEC_SUBDOMAIN || exec_type == EXEC_NONLINEAR || exec_type == EXEC_LINEAR))
5244 customSetup(exec_type);
5245
5246 executeSamplers(exec_type);
5247
5248 // Pre-aux UserObjects
5250
5251 // Systems (includes system time derivative and aux kernel calculations)
5252 computeSystems(exec_type);
5253 // With the auxiliary system solution computed, sync the displaced problem auxiliary solution
5254 // before computation of post-aux user objects. The undisplaced auxiliary system current local
5255 // solution is updated (via System::update) within the AuxiliarySystem class's variable
5256 // computation methods (e.g. computeElementalVarsHelper, computeNodalVarsHelper), so it is safe to
5257 // use it here
5259 _displaced_problem->syncAuxSolution(*getAuxiliarySystem().currentSolution());
5260
5261 // Post-aux UserObjects
5263
5264 // Return the current flag to None
5266
5268 {
5269 // we will only check aux variables and postprocessors
5270 // checking more reporter data can be added in the future if needed
5271 std::unique_ptr<NumericVector<Number>> x = _aux->currentSolution()->clone();
5272 DenseVector<Real> pp_values = getReporterData().getAllRealReporterValues();
5273
5274 // call THIS execute one more time for checking the possible states
5276 FEProblemBase::execute(exec_type);
5277 _checking_uo_aux_state = false;
5278
5279 const Real check_tol = 1e-8;
5280
5281 const Real xnorm = x->l2_norm();
5282 *x -= *_aux->currentSolution();
5283 if (x->l2_norm() > check_tol * xnorm)
5284 {
5285 const auto & sys = _aux->system();
5286 const unsigned int n_vars = sys.n_vars();
5287 std::multimap<Real, std::string, std::greater<Real>> ordered_map;
5288 for (const auto i : make_range(n_vars))
5289 {
5290 const Real vnorm = sys.calculate_norm(*x, i, DISCRETE_L2);
5291 ordered_map.emplace(vnorm, sys.variable_name(i));
5292 }
5293
5294 std::ostringstream oss;
5295 for (const auto & [error_norm, var_name] : ordered_map)
5296 oss << " {" << var_name << ", " << error_norm << "},\n";
5297
5298 mooseError("Aux kernels, user objects appear to have states for aux variables on ",
5299 exec_type,
5300 ".\nVariable error norms in descending order:\n",
5301 oss.str());
5302 }
5303
5304 const DenseVector<Real> new_pp_values = getReporterData().getAllRealReporterValues();
5305 if (pp_values.size() != new_pp_values.size())
5306 mooseError("Second execution for uo/aux state check should not change the number of "
5307 "real reporter values");
5308
5309 const Real ppnorm = pp_values.l2_norm();
5310 pp_values -= new_pp_values;
5311 if (pp_values.l2_norm() > check_tol * ppnorm)
5312 {
5313 const auto pp_names = getReporterData().getAllRealReporterFullNames();
5314 std::multimap<Real, std::string, std::greater<Real>> ordered_map;
5315 for (const auto i : index_range(pp_names))
5316 ordered_map.emplace(std::abs(pp_values(i)), pp_names[i]);
5317
5318 std::ostringstream oss;
5319 for (const auto & [error_norm, pp_name] : ordered_map)
5320 oss << " {" << pp_name << ", " << error_norm << "},\n";
5321
5322 mooseError("Aux kernels, user objects appear to have states for real reporter values on ",
5323 exec_type,
5324 ".\nErrors of real reporter values in descending order:\n",
5325 oss.str());
5326 }
5327 }
5328}
const ExecFlagType EXEC_SUBDOMAIN
Definition Moose.C:53
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition Moose.C:38
unsigned int n_vars
AuxiliarySystem & getAuxiliarySystem()
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
void executeSamplers(const ExecFlagType &exec_type)
Performs setup and execute calls for Sampler objects.
void setCurrentExecuteOnFlag(const ExecFlagType &)
virtual void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
std::vector< std::string > getAllRealReporterFullNames() const
Get full names of all real reporter values Note: For a postprocessor, the full name is the postproces...
DenseVector< Real > getAllRealReporterValues() const
Get all real reporter values including postprocessor and vector postprocessor values into a dense vec...
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
Definition EigenADReal.h:50

Referenced by EigenExecutionerBase::chebyshev(), FixedPointSolve::examineFixedPointConvergence(), SteadyBase::execute(), TransientBase::execute(), execute(), MFEMProblem::execute(), EigenProblem::execute(), EigenExecutionerBase::init(), NonlinearEigen::init(), Steady::init(), TransientBase::init(), EigenExecutionerBase::makeBXConsistent(), EigenExecutionerBase::normalizeSolution(), Moose::PetscSupport::petscLinearConverged(), Moose::PetscSupport::petscNonlinearConverged(), EigenExecutionerBase::postExecute(), FEProblemSolve::solve(), FixedPointSolve::solve(), FixedPointSolve::solveStep(), InversePowerMethod::takeStep(), NonlinearEigen::takeStep(), and MFEMTransient::takeStep().

◆ executeAllObjects()

void FEProblemBase::executeAllObjects ( const ExecFlagType &  exec_type)
virtual

Definition at line 5176 of file FEProblemBase.C.

5177{
5178}

Referenced by Executor::exec().

◆ executeControls()

void FEProblemBase::executeControls ( const ExecFlagType &  exec_type)

Performs setup and execute calls for Control objects.

Definition at line 5673 of file FEProblemBase.C.

5674{
5675 if (_control_warehouse[exec_type].hasActiveObjects())
5676 {
5677 TIME_SECTION("executeControls", 1, "Executing Controls");
5678
5680
5681 auto controls_wh = _control_warehouse[exec_type];
5682 // Add all of the dependencies into the resolver and sort them
5683 for (const auto & it : controls_wh.getActiveObjects())
5684 {
5685 // Make sure an item with no dependencies comes out too!
5686 resolver.addItem(it);
5687
5688 std::vector<std::string> & dependent_controls = it->getDependencies();
5689 for (const auto & depend_name : dependent_controls)
5690 {
5691 if (controls_wh.hasActiveObject(depend_name))
5692 {
5693 auto dep_control = controls_wh.getActiveObject(depend_name);
5694 resolver.addEdge(dep_control, it);
5695 }
5696 else
5697 mooseError("The Control \"",
5698 depend_name,
5699 "\" was not created, did you make a "
5700 "spelling mistake or forget to include it "
5701 "in your input file?");
5702 }
5703 }
5704
5705 const auto & ordered_controls = resolver.getSortedValues();
5706
5707 if (!ordered_controls.empty())
5708 {
5709 // already called by initialSetup when exec_type == EXEC_INITIAL
5710 if (exec_type != EXEC_INITIAL)
5711 _control_warehouse.setup(exec_type);
5712
5713 // Run the controls in the proper order
5714 for (const auto & control : ordered_controls)
5715 control->execute();
5716 }
5717 }
5718}
Class that represents the dependecy as a graph.
void addItem(const T &value)
Add an independent item to the set.
const std::vector< T > & getSortedValues()
This function also returns dependency resolved values but with a simpler single vector interface.
void addEdge(const T &a, const T &b)
Add an edge between nodes 'a' and 'b'.
void setup(const ExecFlagType &exec_flag, THREAD_ID tid=0) const

Referenced by computeJacobianTags(), computeLinearSystemTags(), computeResidualAndJacobian(), computeResidualTags(), and execute().

◆ executeSamplers()

void FEProblemBase::executeSamplers ( const ExecFlagType &  exec_type)

Performs setup and execute calls for Sampler objects.

Definition at line 5721 of file FEProblemBase.C.

5722{
5723 // TODO: This should be done in a threaded loop, but this should be super quick so for now
5724 // do a serial loop.
5725 for (THREAD_ID tid = 0; tid < numThreads(); ++tid)
5726 {
5727 std::vector<Sampler *> objects;
5728 theWarehouse()
5729 .query()
5730 .condition<AttribSystem>("Sampler")
5731 .condition<AttribThread>(tid)
5732 .condition<AttribExecOns>(exec_type)
5733 .queryInto(objects);
5734
5735 if (!objects.empty())
5736 {
5737 TIME_SECTION("executeSamplers", 1, "Executing Samplers");
5738 FEProblemBase::objectSetupHelper<Sampler>(objects, exec_type);
5739 FEProblemBase::objectExecuteHelper<Sampler>(objects);
5740 }
5741 }
5742}

Referenced by execute().

◆ feBackend()

virtual Moose::FEBackend FEProblemBase::feBackend ( ) const
inlinevirtual

◆ fieldScalarCouplingEntries()

const std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > & FEProblemBase::fieldScalarCouplingEntries ( const THREAD_ID  tid,
const unsigned int  nl_sys_num 
) const

Definition at line 7041 of file FEProblemBase.C.

7042{
7043 return _assembly[tid][nl_sys]->fieldScalarCouplingEntries();
7044}

◆ finalizeMultiApps()

void FEProblemBase::finalizeMultiApps ( )

Definition at line 6350 of file FEProblemBase.C.

6351{
6352 const auto & multi_apps = _multi_apps.getActiveObjects();
6353
6354 for (const auto & multi_app : multi_apps)
6355 multi_app->finalize();
6356}

Referenced by Eigenvalue::execute(), SteadyBase::execute(), TransientBase::execute(), and MFEMSteady::execute().

◆ finalNonlinearResidual()

Real FEProblemBase::finalNonlinearResidual ( const unsigned int  nl_sys_num) const
overridevirtual

Reimplemented from SubProblem.

Definition at line 7464 of file FEProblemBase.C.

7465{
7466 return _nl[nl_sys_num]->finalNonlinearResidual();
7467}

◆ finishMultiAppStep()

void FEProblemBase::finishMultiAppStep ( ExecFlagType  type,
bool  recurse_through_multiapp_levels = false 
)

Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType.

Optionally recurse through all multi-app levels

Definition at line 6378 of file FEProblemBase.C.

6379{
6380 const auto & multi_apps = _multi_apps[type].getActiveObjects();
6381
6382 if (multi_apps.size())
6383 {
6385 _console << COLOR_CYAN << "\nAdvancing MultiApps on " << type.name() << COLOR_DEFAULT
6386 << std::endl;
6387
6388 for (const auto & multi_app : multi_apps)
6389 multi_app->finishStep(recurse_through_multiapp_levels);
6390
6392
6394 _console << COLOR_CYAN << "Finished Advancing MultiApps on " << type.name() << "\n"
6395 << COLOR_DEFAULT << std::endl;
6396 }
6397}

Referenced by advanceMultiApps(), TransientBase::execute(), TransientMultiApp::finishStep(), and TransientBase::incrementStepOrReject().

◆ flagInvalidSolutionInternal()

template<bool warning>
template void SolutionInvalidInterface::flagInvalidSolutionInternal< false > ( const InvalidSolutionID  invalid_solution_id) const
protectedinherited

Set solution invalid mark for the given solution ID.

Definition at line 41 of file SolutionInvalidInterface.C.

43{
44 mooseAssert(
45 warning == moose::internal::getSolutionInvalidityRegistry().item(invalid_solution_id).warning,
46 "Inconsistent warning flag");
47 auto & solution_invalidity = _si_moose_base.getMooseApp().solutionInvalidity();
48 if constexpr (!warning)
50 solution_invalidity.printDebug(invalid_solution_id);
51 return solution_invalidity.flagInvalidSolutionInternal(invalid_solution_id);
52}
bool immediatelyPrintInvalidSolution() const
Whether or not the solution invalid warnings are printed out immediately.
const FEProblemBase * _si_problem
A pointer to FEProblem base.
const MooseBase & _si_moose_base
The MooseBase that owns this interface.
void printDebug(InvalidSolutionID _invalid_solution_id) const
Immediately print the section and message for debug purpose.
SolutionInvalidityRegistry & getSolutionInvalidityRegistry()
Get the global SolutionInvalidityRegistry singleton.

◆ forceOutput()

void FEProblemBase::forceOutput ( )

Indicates that the next call to outputStep should be forced.

This is needed by the MultiApp system, if forceOutput is called the next call to outputStep, regardless of the type supplied to the call, will be executed with EXEC_FORCED.

Forced output will NOT override the allowOutput flag.

Definition at line 7627 of file FEProblemBase.C.

7628{
7630}
void forceOutput()
Indicates that the next call to outputStep should be forced This is private, users should utilize FEP...

Referenced by TransientMultiApp::solveStep().

◆ fvBCsIntegrityCheck() [1/2]

bool FEProblemBase::fvBCsIntegrityCheck ( ) const
inline
Returns
whether to perform a boundary condition integrity check for finite volume

Definition at line 2828 of file FEProblemBase.h.

2828{ return _fv_bcs_integrity_check; }

◆ fvBCsIntegrityCheck() [2/2]

void FEProblemBase::fvBCsIntegrityCheck ( bool  fv_bcs_integrity_check)
inline
Parameters
fv_bcs_integrity_checkWhether to perform a boundary condition integrity check for finite volume

Definition at line 3944 of file FEProblemBase.h.

3945{
3947 // the user has requested that we don't check integrity so we will honor that
3948 return;
3949
3950 _fv_bcs_integrity_check = fv_bcs_integrity_check;
3951}

◆ geomSearchData()

virtual GeometricSearchData & FEProblemBase::geomSearchData ( )
inlineoverridevirtual

◆ getActiveElementalMooseVariables()

const std::set< MooseVariableFEBase * > & SubProblem::getActiveElementalMooseVariables ( const THREAD_ID  tid) const
virtualinherited

Get the MOOSE variables to be reinited on each element.

Parameters
tidThe thread id

Definition at line 446 of file SubProblem.C.

447{
449}
std::vector< std::set< MooseVariableFieldBase * > > _active_elemental_moose_variables
This is the set of MooseVariableFieldBase that will actually get reinited by a call to reinit(elem)

Referenced by SystemBase::prepare(), SystemBase::prepareFace(), prepareMaterials(), and SystemBase::reinitElem().

◆ getActiveFEVariableCoupleableMatrixTags()

const std::set< TagID > & SubProblem::getActiveFEVariableCoupleableMatrixTags ( const THREAD_ID  tid) const
inherited

Definition at line 382 of file SubProblem.C.

383{
385}
std::vector< std::set< TagID > > _active_fe_var_coupleable_matrix_tags

◆ getActiveFEVariableCoupleableVectorTags()

const std::set< TagID > & SubProblem::getActiveFEVariableCoupleableVectorTags ( const THREAD_ID  tid) const
inherited

Definition at line 388 of file SubProblem.C.

389{
391}
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute().

◆ getActiveScalarVariableCoupleableMatrixTags()

const std::set< TagID > & SubProblem::getActiveScalarVariableCoupleableMatrixTags ( const THREAD_ID  tid) const
inherited

Definition at line 423 of file SubProblem.C.

424{
426}
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags

Referenced by MooseVariableScalar::reinit().

◆ getActiveScalarVariableCoupleableVectorTags()

const std::set< TagID > & SubProblem::getActiveScalarVariableCoupleableVectorTags ( const THREAD_ID  tid) const
inherited

Definition at line 429 of file SubProblem.C.

430{
432}
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags

◆ getActualFieldVariable()

MooseVariableFieldBase & FEProblemBase::getActualFieldVariable ( const THREAD_ID  tid,
const std::string &  var_name 
)
overridevirtual

Returns the variable reference for requested MooseVariableField which may be in any system.

Implements SubProblem.

Definition at line 6581 of file FEProblemBase.C.

6582{
6583 for (auto & sys : _solver_systems)
6584 if (sys->hasVariable(var_name))
6585 return sys->getActualFieldVariable<Real>(tid, var_name);
6586 if (_aux->hasVariable(var_name))
6587 return _aux->getActualFieldVariable<Real>(tid, var_name);
6588
6589 mooseError("Unknown variable " + var_name);
6590}
MooseVariableFieldBase & getActualFieldVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariableField which may be in any system.

Referenced by MultiAppVariableValueSampleTransfer::execute().

◆ getArrayVariable()

ArrayMooseVariable & FEProblemBase::getArrayVariable ( const THREAD_ID  tid,
const std::string &  var_name 
)
overridevirtual

Returns the variable reference for requested ArrayMooseVariable which may be in any system.

Implements SubProblem.

Definition at line 6605 of file FEProblemBase.C.

6606{
6607 for (auto & sys : _solver_systems)
6608 if (sys->hasVariable(var_name))
6609 return sys->getFieldVariable<RealEigenVector>(tid, var_name);
6610 if (_aux->hasVariable(var_name))
6611 return _aux->getFieldVariable<RealEigenVector>(tid, var_name);
6612
6613 mooseError("Unknown variable " + var_name);
6614}
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition MooseTypes.h:147

Referenced by CoupleableMooseVariableDependencyIntermediateInterface::coupledArrayValueByName(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), and PointwiseRenormalizeVector::PointwiseRenormalizeVector().

◆ getAuxiliarySystem()

AuxiliarySystem & FEProblemBase::getAuxiliarySystem ( )
inline

Definition at line 1094 of file FEProblemBase.h.

1094{ return *_aux; }

Referenced by Adaptivity::adaptMesh(), DisplacedProblem::addTimeIntegrator(), ElementSubdomainModifierBase::applyIC(), TransientMultiApp::appTransferVector(), MooseMesh::cacheFaceInfoVariableOwnership(), MooseMesh::cacheFVElementalDoFs(), PNGOutput::calculateRescalingValues(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeNodalBCsJacobian(), NonlinearSystemBase::computeNodalBCsResidual(), NonlinearSystemBase::computeResidualTags(), NonlinearSystemBase::constraintResiduals(), DisplacedProblem::DisplacedProblem(), EigenExecutionerBase::EigenExecutionerBase(), execute(), ActivateElementsUserObjectBase::initSolutions(), EigenExecutionerBase::inversePowerIteration(), PNGOutput::makeMeshFunc(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), ConsoleUtils::outputAuxiliarySystemInformation(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), MultiApp::restore(), NonlinearSystemBase::setConstraintSecondaryValues(), TransientMultiApp::setupApp(), TransientMultiApp::solveStep(), AB2PredictorCorrector::step(), DisplacedProblem::syncSolutions(), Coupleable::writableCoupledValue(), and MoveNodesByParsedExpressionModifier::writeOutputs().

◆ getAxisymmetricRadialCoord()

unsigned int SubProblem::getAxisymmetricRadialCoord ( ) const
inherited

Returns the desired radial direction for RZ coordinate transformation.

Returns
The coordinate direction for the radial direction

Definition at line 788 of file SubProblem.C.

789{
791}
unsigned int getAxisymmetricRadialCoord() const
Returns the desired radial direction for RZ coordinate transformation.
Definition MooseMesh.C:4378

◆ getBase()

const std::string & MooseBase::getBase ( ) const
inlineinherited
Returns
The registered base for this object (set via InputParameters::registerBase())

Definition at line 147 of file MooseBase.h.

147{ return _pars.getBase(); }

Referenced by MooseBase::uniqueParameterName().

◆ getBndMaterialPropertyStorage()

const MaterialPropertyStorage & FEProblemBase::getBndMaterialPropertyStorage ( )
inline

Definition at line 2122 of file FEProblemBase.h.

2122{ return _bnd_material_props; }

◆ getCheckedPointerParam()

template<typename T >
T MooseBase::getCheckedPointerParam ( const std::string &  name,
const std::string &  error_string = "" 
) const
inherited

Verifies that the requested parameter exists and is not NULL and returns it to the caller.

The template parameter must be a pointer or an error will be thrown.

Definition at line 450 of file MooseBase.h.

451{
452 return _pars.getCheckedPointerParam<T>(name, error_string);
453}
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller.

◆ getConsumedPropertyMap()

const std::map< MooseObjectName, std::set< std::string > > & SubProblem::getConsumedPropertyMap ( ) const
inherited

Return the map that tracks the object with consumed material properties.

Definition at line 734 of file SubProblem.C.

735{
737}

Referenced by MaterialPropertyDebugOutput::output().

◆ getControlWarehouse()

ExecuteMooseObjectWarehouse< Control > & FEProblemBase::getControlWarehouse ( )
inline

Reference to the control logic warehouse.

Definition at line 2620 of file FEProblemBase.h.

2620{ return _control_warehouse; }

Referenced by LibtorchControlValuePostprocessor::initialSetup(), and LibtorchArtificialNeuralNetParameters::initialSetup().

◆ getConvergence()

Convergence & FEProblemBase::getConvergence ( const std::string &  name,
const THREAD_ID  tid = 0 
) const
virtual

◆ getConvergenceObjects()

const std::vector< std::shared_ptr< Convergence > > & FEProblemBase::getConvergenceObjects ( const THREAD_ID  tid = 0) const
virtual

Gets the Convergence objects.

Definition at line 2864 of file FEProblemBase.C.

2865{
2866 return _convergences.getActiveObjects(tid);
2867}

◆ getCoordSystem()

Moose::CoordinateSystemType SubProblem::getCoordSystem ( SubdomainID  sid) const
inherited

Definition at line 1283 of file SubProblem.C.

1284{
1285 return mesh().getCoordSystem(sid);
1286}
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Get the coordinate system type, e.g.
Definition MooseMesh.C:4259

Referenced by BlockRestrictable::getBlockCoordSystem(), MultiApp::getBoundingBox(), Assembly::reinitLowerDElem(), Assembly::reinitNeighborLowerDElem(), and Assembly::setCoordinateTransformation().

◆ getCurrentAlgebraicBndNodeRange()

const ConstBndNodeRange & FEProblemBase::getCurrentAlgebraicBndNodeRange ( )

◆ getCurrentAlgebraicElementRange()

const ConstElemRange & FEProblemBase::getCurrentAlgebraicElementRange ( )

These are the element and nodes that contribute to the jacobian and residual for this local processor.

getCurrentAlgebraicElementRange() returns the element range that contributes to the system getCurrentAlgebraicNodeRange() returns the node range that contributes to the system getCurrentAlgebraicBndNodeRange returns the boundary node ranges that contributes to the system

Definition at line 10405 of file FEProblemBase.C.

10406{
10409
10411}
std::unique_ptr< libMesh::ConstElemRange > _current_algebraic_elem_range
const libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems,...
Definition MooseMesh.C:1247

Referenced by NonlinearSystemBase::computeDamping(), computeIndicators(), NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), computeMarkers(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), NonlinearSystemBase::computeScaling(), computeUserObjectsInternal(), initialSetup(), projectSolution(), and updateMaxQps().

◆ getCurrentAlgebraicNodeRange()

const ConstNodeRange & FEProblemBase::getCurrentAlgebraicNodeRange ( )

Definition at line 10413 of file FEProblemBase.C.

10414{
10416 return *_mesh.getLocalNodeRange();
10417
10419}
std::unique_ptr< libMesh::ConstNodeRange > _current_algebraic_node_range
libMesh::ConstNodeRange * getLocalNodeRange()
Definition MooseMesh.C:1276

Referenced by NonlinearSystemBase::computeDamping(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), and computeUserObjectsInternal().

◆ getCurrentExecuteOnFlag()

const ExecFlagType & FEProblemBase::getCurrentExecuteOnFlag ( ) const

Return/set the current execution flag.

Returns EXEC_NONE when not being executed.

See also
FEProblemBase::execute

Definition at line 5164 of file FEProblemBase.C.

5165{
5167}

Referenced by MultiAppGeneralFieldTransfer::acceptPointInOriginMesh(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), MultiAppGeneralFieldTransfer::closestToPosition(), MultiAppGeneralFieldKDTreeTransferBase::computeNumSources(), NearestPositionsDivision::divisionIndex(), CartesianGridDivision::divisionIndex(), CylindricalGridDivision::divisionIndex(), NearestPositionsDivision::divisionIndex(), SphericalGridDivision::divisionIndex(), PIDTransientControl::execute(), Terminator::execute(), PositionsFunctorValueSampler::execute(), Control::getControllableParameterByName(), Material::getMaterialByName(), MultiAppGeneralFieldKDTreeTransferBase::getNumDivisions(), NumPositions::getValue(), DistributedPositions::initialize(), ParsedDownSelectionPositions::initialize(), TransformedPositions::initialize(), PositionsFunctorValueSampler::initialize(), MultiAppGeneralFieldTransfer::locatePointReceivers(), ComputeUserObjectsThread::printBlockExecutionInformation(), ComputeFVInitialConditionThread::printGeneralExecutionInformation(), ComputeInitialConditionThread::printGeneralExecutionInformation(), ComputeLinearFVElementalThread::printGeneralExecutionInformation(), ComputeLinearFVFaceThread::printGeneralExecutionInformation(), ComputeDiracThread::printGeneralExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeIndicatorThread::printGeneralExecutionInformation(), ComputeMarkerThread::printGeneralExecutionInformation(), ComputeNodalDampingThread::printGeneralExecutionInformation(), ComputeNodalKernelBCJacobiansThread::printGeneralExecutionInformation(), ComputeNodalKernelBcsThread::printGeneralExecutionInformation(), ComputeNodalKernelJacobiansThread::printGeneralExecutionInformation(), ComputeNodalKernelsThread::printGeneralExecutionInformation(), ComputeNodalUserObjectsThread::printGeneralExecutionInformation(), ComputeUserObjectsThread::printGeneralExecutionInformation(), NonlinearThread::printGeneralExecutionInformation(), ComputeThreadedGeneralUserObjectsThread::printGeneralExecutionInformation(), MultiApp::restore(), SolutionInvalidityOutput::shouldOutput(), ElementReporter::shouldStore(), GeneralReporter::shouldStore(), and NodalReporter::shouldStore().

◆ getCurrentICState()

unsigned short FEProblemBase::getCurrentICState ( )

Retrieves the current initial condition state.

Returns
current initial condition state

Definition at line 10464 of file FEProblemBase.C.

10465{
10466 return _current_ic_state;
10467}

Referenced by ComputeInitialConditionThread::operator()().

◆ getDataFileName()

std::string DataFileInterface::getDataFileName ( const std::string &  param) const
inherited

Deprecated method.

The data file paths are now automatically set within the InputParameters object, so using getParam<DataFileName>("param_name") is now sufficient.

Definition at line 21 of file DataFileInterface.C.

22{
23 _parent.mooseDeprecated("getDataFileName() is deprecated. The file path is now directly set "
24 "within the InputParameters.\nUse getParam<DataFileName>(\"",
25 param,
26 "\") instead.");
27 return _parent.getParam<DataFileName>(param);
28}
const ParallelParamObject & _parent
void mooseDeprecated(Args &&... args) const
Emits a deprecation warning prefixed with the object name and type, and a stack trace.
Definition MooseBase.h:317

◆ getDataFileNameByName()

std::string DataFileInterface::getDataFileNameByName ( const std::string &  relative_path) const
inherited

Deprecated method.

Use getDataFilePath() instead.

Definition at line 31 of file DataFileInterface.C.

32{
33 _parent.mooseDeprecated("getDataFileNameByName() is deprecated. Use getDataFilePath(\"",
34 relative_path,
35 "\") instead.");
36 return getDataFilePath(relative_path);
37}
std::string getDataFilePath(const std::string &relative_path) const
Returns the path of a data file for a given relative file path.

◆ getDataFilePath()

std::string DataFileInterface::getDataFilePath ( const std::string &  relative_path) const
inherited

Returns the path of a data file for a given relative file path.

This can be used for hardcoded datafile names and will search the same locations as getDataFileName

Definition at line 40 of file DataFileInterface.C.

41{
42 // This should only ever be used with relative paths. There is no point to
43 // use this search path with an absolute path.
44 if (std::filesystem::path(relative_path).is_absolute())
45 _parent.mooseWarning("While using getDataFilePath(\"",
46 relative_path,
47 "\"): This API should not be used for absolute paths.");
48
49 // This will search the data paths for this relative path
50 std::optional<std::string> error;
52 {
53 // Throw on error so that if getPath() fails, we can throw an error
54 // with the context of _parent.mooseError()
55 Moose::ScopedThrowOnError scoped_throw_on_error;
56
57 try
58 {
59 found_path = Moose::DataFileUtils::getPath(relative_path);
60 }
61 catch (std::exception & e)
62 {
63 error = e.what();
64 }
65 }
66
67 if (error)
68 _parent.mooseError(*error);
69
70 mooseAssert(found_path.context == Moose::DataFileUtils::Context::DATA,
71 "Should only ever obtain data");
72 mooseAssert(found_path.data_name, "Should be set");
73
74 const std::string msg =
75 "Using data file '" + found_path.path + "' from " + *found_path.data_name + " data";
76 _parent.mooseInfo(msg);
77
78 return found_path.path;
79}
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Definition MooseBase.h:299
void mooseInfo(Args &&... args) const
Definition MooseBase.h:334
Scoped helper for setting Moose::_throw_on_error during this scope.
Definition Moose.h:308
@ DATA
From installed/in-tree data.
Path getPath(std::string path, const GetPathOptions &options={})
Get the data path for a given path, searching the registered data.
Representation of a data file path.
std::optional< std::string > data_name
The name of the data registry the file came from (with context == DATA)
Context context
Context for the file (where it came from)

Referenced by DataFileInterface::getDataFileNameByName().

◆ getDiracElements()

void FEProblemBase::getDiracElements ( std::set< const Elem * > &  elems)
overridevirtual

Fills "elems" with the elements that should be looped over for Dirac Kernels.

Implements SubProblem.

Definition at line 2667 of file FEProblemBase.C.

2668{
2669 // First add in the undisplaced elements
2671
2673 {
2674 std::set<const Elem *> displaced_elements;
2675 _displaced_problem->getDiracElements(displaced_elements);
2676
2677 { // Use the ids from the displaced elements to get the undisplaced elements
2678 // and add them to the list
2679 for (const auto & elem : displaced_elements)
2680 elems.insert(_mesh.elemPtr(elem->id()));
2681 }
2682 }
2683}
std::set< const Elem * > & getElements()
Returns a writeable reference to the _elements container.

Referenced by NonlinearSystemBase::computeDiracContributions().

◆ getDiscreteMaterialWarehouse()

const MaterialWarehouse & FEProblemBase::getDiscreteMaterialWarehouse ( ) const
inline

Definition at line 2378 of file FEProblemBase.h.

2378{ return _discrete_materials; }

◆ getDisplacedProblem() [1/2]

virtual std::shared_ptr< DisplacedProblem > FEProblemBase::getDisplacedProblem ( )
inlinevirtual

Definition at line 2056 of file FEProblemBase.h.

2056{ return _displaced_problem; }

◆ getDisplacedProblem() [2/2]

virtual std::shared_ptr< const DisplacedProblem > FEProblemBase::getDisplacedProblem ( ) const
inlinevirtual

◆ getDistribution()

Distribution & FEProblemBase::getDistribution ( const std::string &  name)
virtual

Definition at line 2936 of file FEProblemBase.C.

2937{
2938 std::vector<Distribution *> objs;
2939 theWarehouse()
2940 .query()
2941 .condition<AttribSystem>("Distribution")
2942 .condition<AttribName>(name)
2943 .queryInto(objs);
2944 if (objs.empty())
2945 {
2946 mooseAssert(getMooseApp().actionWarehouse().isTaskComplete("add_distribution"),
2947 "A Distribution getter was called before Distributions have been constructed. "
2948 "If you are attempting to access this object in the constructor of another object "
2949 "then make sure that the Distribution is constructed before the object using it.");
2950 mooseError("Unable to find Distribution with name '" + name + "'");
2951 }
2952 return *(objs[0]);
2953}

Referenced by MooseServer::buildDistPlotResponses(), DistributionInterface::getDistribution(), and DistributionInterface::getDistributionByName().

◆ getEvaluableElementRange()

const ConstElemRange & FEProblemBase::getEvaluableElementRange ( )

In general, {evaluable elements} >= {local elements} U {algebraic ghosting elements}.

That is, the number of evaluable elements does NOT necessarily equal to the number of local and algebraic ghosting elements. For example, if using a Lagrange basis for all variables, if a non-local, non-algebraically-ghosted element is surrounded by neighbors which are local or algebraically ghosted, then all the nodal (Lagrange) degrees of freedom associated with the non-local, non-algebraically-ghosted element will be evaluable, and hence that element will be considered evaluable.

getNonlinearEvaluableElementRange() returns the evaluable element range based on the nonlinear system dofmap; getAuxliaryEvaluableElementRange() returns the evaluable element range based on the auxiliary system dofmap; getEvaluableElementRange() returns the element range that is evaluable based on both the nonlinear dofmap and the auxliary dofmap.

Definition at line 928 of file FEProblemBase.C.

929{
931 {
932 std::vector<const DofMap *> dof_maps(es().n_systems());
933 for (const auto i : make_range(es().n_systems()))
934 {
935 const auto & sys = es().get_system(i);
936 dof_maps[i] = &sys.get_dof_map();
937 }
939 std::make_unique<ConstElemRange>(_mesh.getMesh().multi_evaluable_elements_begin(dof_maps),
940 _mesh.getMesh().multi_evaluable_elements_end(dof_maps));
941 }
943}
std::unique_ptr< libMesh::ConstElemRange > _evaluable_local_elem_range
const T_sys & get_system(std::string_view name) const

Referenced by NodalPatchRecoveryBase::gatherRequestList().

◆ getExecutor()

virtual Executor & FEProblemBase::getExecutor ( const std::string &  name)
inlinevirtual

Definition at line 2510 of file FEProblemBase.h.

2510{ return _app.getExecutor(name); }
Executor * getExecutor() const
Definition MooseApp.h:338

◆ getFailNextNonlinearConvergenceCheck()

bool FEProblemBase::getFailNextNonlinearConvergenceCheck ( ) const
inline

Whether it will skip further residual evaluations and fail the next nonlinear convergence check(s)

Definition at line 2969 of file FEProblemBase.h.

bool getFailNextSystemConvergenceCheck() const
Whether it will fail the next system convergence check(s), triggering failed step behavior.

Referenced by NonlinearSystemBase::computeScaling(), NonlinearSystem::converged(), Moose::PetscSupport::petscNonlinearConverged(), and ComputeResidualFunctor::residual().

◆ getFailNextSystemConvergenceCheck()

bool FEProblemBase::getFailNextSystemConvergenceCheck ( ) const
inline

Whether it will fail the next system convergence check(s), triggering failed step behavior.

Definition at line 2971 of file FEProblemBase.h.

Referenced by getFailNextNonlinearConvergenceCheck(), and Moose::PetscSupport::petscLinearConverged().

◆ getFunction()

Function & FEProblemBase::getFunction ( const std::string &  name,
const THREAD_ID  tid = 0 
)
virtual

Definition at line 2796 of file FEProblemBase.C.

2797{
2798 // This thread lock is necessary since this method will create functions
2799 // for all threads if one is missing.
2800 Threads::spin_mutex::scoped_lock lock(get_function_mutex);
2801
2802 if (!hasFunction(name, tid))
2803 {
2804 // If we didn't find a function, it might be a default function, attempt to construct one now
2805 std::istringstream ss(name);
2806 Real real_value;
2807
2808 // First see if it's just a constant. If it is, build a ConstantFunction
2809 if (ss >> real_value && ss.eof())
2810 {
2811 InputParameters params = _factory.getValidParams("ConstantFunction");
2812 params.set<Real>("value") = real_value;
2813 addFunction("ConstantFunction", ss.str(), params);
2814 }
2815 else
2816 {
2818 std::string vars = "x,y,z,t,NaN,pi,e";
2819 if (fp.Parse(name, vars) == -1) // -1 for success
2820 {
2821 // It parsed ok, so build a MooseParsedFunction
2822 InputParameters params = _factory.getValidParams("ParsedFunction");
2823 params.set<std::string>("expression") = name;
2824 addFunction("ParsedFunction", name, params);
2825 }
2826 }
2827
2828 // Try once more
2829 if (!hasFunction(name, tid))
2830 {
2831 mooseAssert(getMooseApp().actionWarehouse().isTaskComplete("add_function"),
2832 "getFunction() was called before Functions have been constructed. The requested "
2833 "Function '" +
2834 name + "' may exist in the input file, but Functions are not available yet.");
2835
2836 mooseError("Unable to find function " + name);
2837 }
2838 }
2839
2840 auto * const ret = dynamic_cast<Function *>(_functions.getActiveObject(name, tid).get());
2841 if (!ret)
2842 mooseError("No function named ", name, " of appropriate type");
2843
2844 return *ret;
2845}
Threads::spin_mutex get_function_mutex
char ** vars
virtual void addFunction(const std::string &type, const std::string &name, InputParameters &parameters)
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)

Referenced by MFEMProblem::addFunction(), MooseServer::buildFuncPlotResponse(), FunctionInterface::getFunctionByName(), FunctionPeriodicBoundary::getFunctions(), IterationAdaptiveDT::init(), MooseParsedFunctionWrapper::initialize(), ChainControlParsedFunctionWrapper::initializeFunctionInputs(), and ParsedConvergence::initializeFunctionSymbol().

◆ getFunctionWarehouse()

const MooseObjectWarehouse< Function > & FEProblemBase::getFunctionWarehouse ( )
inline

Definition at line 2367 of file FEProblemBase.h.

2367{ return _functions; }

◆ getFunctor()

template<typename T >
const Moose::Functor< T > & SubProblem::getFunctor ( const std::string &  name,
const THREAD_ID  tid,
const std::string &  requestor_name,
bool  requestor_is_ad 
)
inherited
Template Parameters
TThe type that the functor will return when evaluated, e.g. ADReal or Real
Parameters
nameThe name of the functor to retrieve
tidThe thread ID that we are retrieving the functor property for
requestor_nameThe name of the object that is requesting this functor property
requestor_is_adWhether the requesting object is an AD object
Returns
a constant reference to the functor

Definition at line 1210 of file SubProblem.h.

1214{
1215 mooseAssert(tid < _functors.size(), "Too large a thread ID");
1216
1217 // Log the requestor
1218 _functor_to_requestors["wraps_" + name].insert(requestor_name);
1219
1220 constexpr bool requested_functor_is_ad =
1221 !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1222
1223 auto & functor_to_request_info = _functor_to_request_info[tid];
1224
1225 // Get the requested functor if we already have it
1226 auto & functors = _functors[tid];
1227 if (auto find_ret = functors.find("wraps_" + name); find_ret != functors.end())
1228 {
1229 if (functors.count("wraps_" + name) > 1)
1230 mooseError("Attempted to get a functor with the name '",
1231 name,
1232 "' but multiple (" + std::to_string(functors.count("wraps_" + name)) +
1233 ") functors match. Make sure that you do not have functor material "
1234 "properties, functions, postprocessors or variables with the same names.");
1235
1236 auto & [true_functor_is, non_ad_functor, ad_functor] = find_ret->second;
1237 auto & functor_wrapper = requested_functor_is_ad ? *ad_functor : *non_ad_functor;
1238
1239 auto * const functor = dynamic_cast<Moose::Functor<T> *>(&functor_wrapper);
1240 if (!functor)
1241 mooseError("A call to SubProblem::getFunctor requested a functor named '",
1242 name,
1243 "' that returns the type: '",
1244 libMesh::demangle(typeid(T).name()),
1245 "'. However, that functor already exists and returns a different type: '",
1246 functor_wrapper.returnType(),
1247 "'");
1248
1249 if (functor->template wrapsType<Moose::NullFunctor<T>>())
1250 // Store for future checking when the actual functor gets added
1251 functor_to_request_info.emplace(name,
1252 std::make_pair(requested_functor_is_ad, requestor_is_ad));
1253 else
1254 {
1255 // We already have the actual functor
1256 if (true_functor_is == SubProblem::TrueFunctorIs::UNSET)
1257 mooseError("We already have the functor; it should not be unset");
1258
1259 // Check for whether this is a valid request
1260 // We allow auxiliary variables and linear variables to be retrieved as non AD
1261 if (!requested_functor_is_ad && requestor_is_ad &&
1262 true_functor_is == SubProblem::TrueFunctorIs::AD &&
1264 mooseError("The AD object '",
1265 requestor_name,
1266 "' is requesting the functor '",
1267 name,
1268 "' as a non-AD functor even though it is truly an AD functor, which is not "
1269 "allowed, since this may unintentionally drop derivatives.");
1270 }
1271
1272 return *functor;
1273 }
1274
1275 // We don't have the functor yet but we could have it in the future. We'll create null functors
1276 // for now
1277 functor_to_request_info.emplace(name, std::make_pair(requested_functor_is_ad, requestor_is_ad));
1278 if constexpr (requested_functor_is_ad)
1279 {
1280 typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1281 typedef T ADType;
1282
1283 auto emplace_ret =
1284 functors.emplace("wraps_" + name,
1285 std::make_tuple(SubProblem::TrueFunctorIs::UNSET,
1286 std::make_unique<Moose::Functor<NonADType>>(
1287 std::make_unique<Moose::NullFunctor<NonADType>>()),
1288 std::make_unique<Moose::Functor<ADType>>(
1289 std::make_unique<Moose::NullFunctor<ADType>>())));
1290
1291 return cast_ref<Moose::Functor<T> &>(*(requested_functor_is_ad
1292 ? std::get<2>(emplace_ret->second)
1293 : std::get<1>(emplace_ret->second)));
1294 }
1295 else
1296 {
1297 typedef T NonADType;
1298 typedef typename Moose::ADType<T>::type ADType;
1299
1300 auto emplace_ret =
1301 functors.emplace("wraps_" + name,
1302 std::make_tuple(SubProblem::TrueFunctorIs::UNSET,
1303 std::make_unique<Moose::Functor<NonADType>>(
1304 std::make_unique<Moose::NullFunctor<NonADType>>()),
1305 std::make_unique<Moose::Functor<ADType>>(
1306 std::make_unique<Moose::NullFunctor<ADType>>())));
1307
1308 return cast_ref<Moose::Functor<T> &>(*(requested_functor_is_ad
1309 ? std::get<2>(emplace_ret->second)
1310 : std::get<1>(emplace_ret->second)));
1311 }
1312}
virtual bool hasLinearVariable(const std::string &var_name) const
Whether or not this problem has this linear variable.
Definition SubProblem.C:794
std::map< std::string, std::set< std::string > > _functor_to_requestors
The requestors of functors where the key is the prop name and the value is a set of names of requesto...
virtual bool hasAuxiliaryVariable(const std::string &var_name) const
Whether or not this problem has this auxiliary variable.
Definition SubProblem.C:803
std::string demangle(const char *name)

Referenced by FunctorInterface::getFunctorByName().

◆ getFVAdvectedInterpolationMethod()

const FVAdvectedInterpolationMethod & FEProblemBase::getFVAdvectedInterpolationMethod ( const InterpolationMethodName &  name,
const THREAD_ID  tid = 0 
) const

Retrieve an advected interpolation method.

Parameters
nameThe name of the method.
tidThe thread ID.

Definition at line 4944 of file FEProblemBase.C.

4946{
4947 const auto & method = getFVInterpolationMethod(name, tid);
4948 const auto * advected_method = dynamic_cast<const FVAdvectedInterpolationMethod *>(&method);
4949
4950 if (!advected_method)
4951 mooseError("FVInterpolationMethod '",
4952 name,
4953 "' (",
4954 method.type(),
4955 ") is not an advected interpolation method.");
4956
4957 return *advected_method;
4958}
const FVInterpolationMethod & getFVInterpolationMethod(const InterpolationMethodName &name, const THREAD_ID tid=0) const
Retrieve an FV interpolation method.
Interface for interpolation methods that provide matrix and RHS contributions for advected face value...

Referenced by FVInterpolationMethodInterface::getFVAdvectedInterpolationMethod().

◆ getFVFaceInterpolationMethod()

const FVFaceInterpolationMethod & FEProblemBase::getFVFaceInterpolationMethod ( const InterpolationMethodName &  name,
const THREAD_ID  tid = 0 
) const

Retrieve a scalar face interpolation method.

Parameters
nameThe name of the method.
tidThe thread ID.

Definition at line 4927 of file FEProblemBase.C.

4929{
4930 const auto & method = getFVInterpolationMethod(name, tid);
4931 const auto * face_method = dynamic_cast<const FVFaceInterpolationMethod *>(&method);
4932
4933 if (!face_method)
4934 mooseError("FVInterpolationMethod '",
4935 name,
4936 "' (",
4937 method.type(),
4938 ") is not a scalar face interpolation method.");
4939
4940 return *face_method;
4941}
Abstract base class for interpolation methods that produce a scalar face value from adjacent cell val...

Referenced by FVInterpolationMethodInterface::getFVFaceInterpolationMethod().

◆ getFVGradientMethod() [1/2]

FVGradientMethod & FEProblemBase::getFVGradientMethod ( const GradientMethodName &  name,
const THREAD_ID  tid = 0 
)

Retrieve a writable FV gradient method owned by this problem.

Parameters
nameThe name of the method.
tidThe thread ID.

Definition at line 4880 of file FEProblemBase.C.

4881{
4882 return const_cast<FVGradientMethod &>(
4883 static_cast<const FEProblemBase &>(*this).getFVGradientMethod(name, tid));
4884}
FVGradientMethod & getFVGradientMethod(const GradientMethodName &name, const THREAD_ID tid=0)
Retrieve a writable FV gradient method owned by this problem.

Referenced by getFVGradientMethod().

◆ getFVGradientMethod() [2/2]

const FVGradientMethod & FEProblemBase::getFVGradientMethod ( const GradientMethodName &  name,
const THREAD_ID  tid = 0 
) const

Retrieve a read-only FV gradient method owned by this problem.

Parameters
nameThe name of the method.
tidThe thread ID.

Definition at line 4862 of file FEProblemBase.C.

4863{
4864 std::vector<FVGradientMethod *> methods;
4865 theWarehouse()
4866 .query()
4867 .condition<AttribSystem>("FVGradientMethod")
4868 .condition<AttribThread>(tid)
4869 .condition<AttribName>(name)
4870 .queryInto(methods);
4871
4872 if (methods.empty())
4873 mooseError("Unable to find FVGradientMethod with name '", name, "'");
4874
4875 mooseAssert(methods.size() == 1, "Expected a single FVGradientMethod per thread");
4876 return *(methods[0]);
4877}

◆ getFVInitialConditionWarehouse()

const FVInitialConditionWarehouse & FEProblemBase::getFVInitialConditionWarehouse ( ) const
inline

◆ getFVInterpolationMethod()

const FVInterpolationMethod & FEProblemBase::getFVInterpolationMethod ( const InterpolationMethodName &  name,
const THREAD_ID  tid = 0 
) const

Retrieve an FV interpolation method.

Parameters
nameThe name of the method.
tidThe thread ID.

Definition at line 4900 of file FEProblemBase.C.

4902{
4903 std::vector<FVInterpolationMethod *> methods;
4904 theWarehouse()
4905 .query()
4906 .condition<AttribSystem>("FVInterpolationMethod")
4907 .condition<AttribThread>(tid)
4908 .condition<AttribName>(name)
4909 .queryInto(methods);
4910
4911 if (methods.empty())
4912 {
4913 mooseAssert(getMooseApp().actionWarehouse().isTaskComplete("add_interpolation_method"),
4914 "An FVInterpolationMethod getter was called before FVInterpolationMethods have "
4915 "been constructed. If you are attempting to access this object in the constructor "
4916 "of another object then make sure that the FVInterpolationMethod is constructed "
4917 "before the object using it.");
4918
4919 mooseError("Unable to find FVInterpolationMethod with name '", name, "'");
4920 }
4921
4922 mooseAssert(methods.size() == 1, "Expected a single FVInterpolationMethod per thread");
4923 return *(methods[0]);
4924}

Referenced by getFVAdvectedInterpolationMethod(), and getFVFaceInterpolationMethod().

◆ getFVMatsAndDependencies()

void FEProblemBase::getFVMatsAndDependencies ( SubdomainID  block_id,
std::vector< std::shared_ptr< MaterialBase > > &  face_materials,
std::vector< std::shared_ptr< MaterialBase > > &  neighbor_materials,
std::set< MooseVariableFieldBase * > &  variables,
const THREAD_ID  tid 
)

Get the materials and variables potentially needed for FV.

Parameters
block_idSubdomainID The subdomain id that we want to retrieve materials for
face_materialsThe face materials container that we will fill
neighbor_materialsThe neighbor materials container that we will fill
variablesThe variables container that we will fill that our materials depend on
tidThe thread id

Definition at line 10096 of file FEProblemBase.C.

10102{
10103 if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
10104 {
10105 auto & this_face_mats =
10107 for (std::shared_ptr<MaterialBase> face_mat : this_face_mats)
10108 if (face_mat->ghostable())
10109 {
10110 face_materials.push_back(face_mat);
10111 auto & var_deps = face_mat->getMooseVariableDependencies();
10112 for (auto * var : var_deps)
10113 {
10114 if (!var->isFV())
10115 mooseError(
10116 "Ghostable materials should only have finite volume variables coupled into them.");
10117 else if (face_mat->hasStatefulProperties())
10118 mooseError("Finite volume materials do not currently support stateful properties.");
10119 variables.insert(var);
10120 }
10121 }
10122 }
10123
10124 if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
10125 {
10126 auto & this_neighbor_mats =
10128 for (std::shared_ptr<MaterialBase> neighbor_mat : this_neighbor_mats)
10129 if (neighbor_mat->ghostable())
10130 {
10131 neighbor_materials.push_back(neighbor_mat);
10132#ifndef NDEBUG
10133 auto & var_deps = neighbor_mat->getMooseVariableDependencies();
10134 for (auto * var : var_deps)
10135 {
10136 if (!var->isFV())
10137 mooseError(
10138 "Ghostable materials should only have finite volume variables coupled into them.");
10139 else if (neighbor_mat->hasStatefulProperties())
10140 mooseError("Finite volume materials do not currently support stateful properties.");
10141 auto pr = variables.insert(var);
10142 mooseAssert(!pr.second,
10143 "We should not have inserted any new variables dependencies from our "
10144 "neighbor materials that didn't exist for our face materials");
10145 }
10146#endif
10147 }
10148 }
10149}

◆ getHitNode() [1/2]

const hit::Node * MooseBase::getHitNode ( ) const
inlineinherited
Returns
The block-level hit node for this object, if any

Definition at line 136 of file MooseBase.h.

136{ return getHitNode(_pars); }

Referenced by MooseBase::callMooseError(), MooseBase::getHitNode(), and MooseBase::messagePrefix().

◆ getHitNode() [2/2]

const hit::Node * MooseBase::getHitNode ( const InputParameters &  params)
staticprivateinherited

Internal method for getting a hit node (if available) given a set of parameters.

Needs to be static so that we can call it externally from InputParameters for errors that do not have context of the MooseBase

Definition at line 167 of file MooseBase.C.

168{
169 if (const auto hit_node = params.getHitNode())
170 if (!hit_node->isRoot())
171 return hit_node;
172 return nullptr;
173}

◆ getIndicatorWarehouse()

const MooseObjectWarehouse< Indicator > & FEProblemBase::getIndicatorWarehouse ( )
inline

Return indicator/marker storage.

Definition at line 2148 of file FEProblemBase.h.

2148{ return _indicators; }

◆ getInitialConditionWarehouse()

const InitialConditionWarehouse & FEProblemBase::getInitialConditionWarehouse ( ) const
inline

◆ getInterfaceMaterialsWarehouse()

const MaterialWarehouse & FEProblemBase::getInterfaceMaterialsWarehouse ( ) const
inline

◆ getInternalSideIndicatorWarehouse()

const MooseObjectWarehouse< InternalSideIndicatorBase > & FEProblemBase::getInternalSideIndicatorWarehouse ( )
inline

Definition at line 2149 of file FEProblemBase.h.

2150 {
2152 }

◆ getKokkosBndMaterialPropertyStorage()

Moose::Kokkos::MaterialPropertyStorage & FEProblemBase::getKokkosBndMaterialPropertyStorage ( )
inline

Definition at line 2133 of file FEProblemBase.h.

2134 {
2136 }

◆ getKokkosFESystem() [1/2]

Moose::Kokkos::FESystem & FEProblemBase::getKokkosFESystem ( const unsigned int  sys_num)

Get the Kokkos FESystem of a specified number.

Parameters
sys_numThe system number
Returns
The Kokkos FESystem

◆ getKokkosFESystem() [2/2]

const Moose::Kokkos::FESystem & FEProblemBase::getKokkosFESystem ( const unsigned int  sys_num) const

◆ getKokkosFESystems() [1/2]

Moose::Kokkos::Array< Moose::Kokkos::FESystem > & FEProblemBase::getKokkosFESystems ( )
inline

Get the Kokkos FESystem array (populated only when FE Kokkos objects exist)

Returns
The array of Kokkos FESystem objects

Definition at line 904 of file FEProblemBase.h.

905 {
906 return _kokkos_fe_systems;
907 }
Moose::Kokkos::Array< Moose::Kokkos::FESystem > _kokkos_fe_systems
FESystem array - sparsely populated (only slots for systems needing a Kokkos::FESystem)

◆ getKokkosFESystems() [2/2]

const Moose::Kokkos::Array< Moose::Kokkos::FESystem > & FEProblemBase::getKokkosFESystems ( ) const
inline

Definition at line 908 of file FEProblemBase.h.

909 {
910 return _kokkos_fe_systems;
911 }

◆ getKokkosFunction() [1/2]

virtual Moose::Kokkos::Function FEProblemBase::getKokkosFunction ( const std::string &  name)
virtual

Get a Kokkos function in an abstract type.

Parameters
nameThe Kokkos function name
Returns
The copy of the Kokkos function in the abstract type

◆ getKokkosFunction() [2/2]

template<typename T >
T & FEProblemBase::getKokkosFunction ( const std::string &  name)

Get a Kokkos function in a concrete type.

Template Parameters
TThe Kokkos function type
Parameters
nameThe Kokkos function name
Returns
The reference of the Kokkos function in the concrete type

Definition at line 3974 of file FEProblemBase.h.

3975{
3976 if (!hasKokkosFunction(name))
3977 {
3978 // If we didn't find a function, it might be a default function, attempt to construct one now
3979 std::istringstream ss(name);
3980 Real real_value;
3981
3982 // First see if it's just a constant. If it is, build a ConstantFunction
3983 if (ss >> real_value && ss.eof())
3984 {
3985 InputParameters params = _factory.getValidParams("KokkosConstantFunction");
3986 params.set<Real>("value") = real_value;
3987 addKokkosFunction("KokkosConstantFunction", ss.str(), params);
3988 }
3989
3990 // Try once more
3991 if (!hasKokkosFunction(name))
3992 mooseError("Unable to find Kokkos function '" + name, "'");
3993 }
3994
3995 auto * const ret = dynamic_cast<T *>(_kokkos_functions.getActiveObject(name).get());
3996 if (!ret)
3997 mooseError("No Kokkos function named '", name, "' of appropriate type");
3998
3999 return *ret;
4000}
virtual bool hasKokkosFunction(const std::string &name) const
Get whether a Kokkos function exists.
virtual void addKokkosFunction(const std::string &type, const std::string &name, InputParameters &parameters)
Add a Kokkos function to the problem.

◆ getKokkosMaterialData()

MaterialData & FEProblemBase::getKokkosMaterialData ( Moose::MaterialDataType  type,
const MooseObject *  object = nullptr 
) const
Returns
The Kokkos MaterialData for the type type for thread tid

Referenced by BlockRestrictable::initializeBlockRestrictable().

◆ getKokkosMaterialPropertyStorage()

Moose::Kokkos::MaterialPropertyStorage & FEProblemBase::getKokkosMaterialPropertyStorage ( )
inline

Definition at line 2129 of file FEProblemBase.h.

2130 {
2132 }

◆ getKokkosMaterialPropertyStorageConsumers()

const std::set< const MooseObject * > & FEProblemBase::getKokkosMaterialPropertyStorageConsumers ( Moose::MaterialDataType  type) const
Returns
The consumers of the Kokkos MaterialPropertyStorage for the type type

◆ getKokkosMaterialsWarehouse()

const MaterialWarehouse & FEProblemBase::getKokkosMaterialsWarehouse ( ) const
inline

Definition at line 2385 of file FEProblemBase.h.

2385{ return _kokkos_materials; }

◆ getKokkosNeighborMaterialPropertyStorage()

Moose::Kokkos::MaterialPropertyStorage & FEProblemBase::getKokkosNeighborMaterialPropertyStorage ( )
inline

Definition at line 2137 of file FEProblemBase.h.

2138 {
2140 }

◆ getKokkosSystem() [1/2]

Moose::Kokkos::System & FEProblemBase::getKokkosSystem ( const unsigned int  sys_num)

Get the Kokkos System of a specified number.

Parameters
sys_numThe system number
Returns
The Kokkos System

◆ getKokkosSystem() [2/2]

const Moose::Kokkos::System & FEProblemBase::getKokkosSystem ( const unsigned int  sys_num) const

◆ getKokkosSystems() [1/2]

Moose::Kokkos::Array< Moose::Kokkos::System > & FEProblemBase::getKokkosSystems ( )
inline

Get the Kokkos System array (always populated when any Kokkos object exists)

Returns
The array of Kokkos System objects

Definition at line 892 of file FEProblemBase.h.

892{ return _kokkos_systems; }
Moose::Kokkos::Array< Moose::Kokkos::System > _kokkos_systems
System array - sparsely populated (only slots for systems needing a Kokkos::System)

◆ getKokkosSystems() [2/2]

const Moose::Kokkos::Array< Moose::Kokkos::System > & FEProblemBase::getKokkosSystems ( ) const
inline

Definition at line 893 of file FEProblemBase.h.

894 {
895 return _kokkos_systems;
896 }

◆ getKokkosUserObject()

template<class T >
const T & FEProblemBase::getKokkosUserObject ( const std::string &  name) const
inline

Get the Kokkos user object by its name.

Parameters
nameThe name of the Kokkos user object being retrieved
Returns
const reference to the Kokkos user object

Definition at line 1461 of file FEProblemBase.h.

1462 {
1463 std::vector<T *> objs;
1464 theWarehouse()
1465 .query()
1466 .condition<AttribSystem>("KokkosUserObject")
1467 .condition<AttribName>(name)
1468 .queryInto(objs);
1469 if (objs.empty())
1470 mooseError("Unable to find Kokkos user object with name '" + name + "'");
1471 return *(objs[0]);
1472 }

Referenced by UserObjectInterface::getUserObjectFromFEProblem().

◆ getLinearConvergenceNames()

const std::vector< ConvergenceName > & FEProblemBase::getLinearConvergenceNames ( ) const

Gets the linear convergence object name(s).

Definition at line 10209 of file FEProblemBase.C.

10210{
10213 mooseError("The linear convergence name(s) have not been set.");
10214}
std::optional< std::vector< ConvergenceName > > _linear_convergence_names
Linear system(s) convergence name(s) (if any)

Referenced by Moose::PetscSupport::petscLinearConverged().

◆ getLinearSystem() [1/2]

LinearSystem & FEProblemBase::getLinearSystem ( unsigned int  sys_num)
inline

Get non-constant reference to a linear system.

Parameters
sys_numThe number of the linear system

Definition at line 3890 of file FEProblemBase.h.

3891{
3892 mooseAssert(sys_num < _linear_systems.size(),
3893 "System number greater than the number of linear systems");
3894 return *_linear_systems[sys_num];
3895}

Referenced by IterationAdaptiveDT::acceptStep(), Moose::compute_linear_system(), Moose::PetscSupport::petscSetDefaults(), and FEProblemSolve::solve().

◆ getLinearSystem() [2/2]

const LinearSystem & FEProblemBase::getLinearSystem ( unsigned int  sys_num) const
inline

Get a constant reference to a linear system.

Parameters
sys_numThe number of the linear system

Definition at line 3898 of file FEProblemBase.h.

3899{
3900 mooseAssert(sys_num < _linear_systems.size(),
3901 "System number greater than the number of linear systems");
3902 return *_linear_systems[sys_num];
3903}

◆ getLinearSystemNames()

const std::vector< LinearSystemName > & FEProblemBase::getLinearSystemNames ( ) const
inline
Returns
the linear system names in the problem

Definition at line 3050 of file FEProblemBase.h.

3050{ return _linear_sys_names; }

Referenced by PhysicsBase::initializePhysics(), and MultiSystemSolveObject::MultiSystemSolveObject().

◆ getLineSearch()

LineSearch * FEProblemBase::getLineSearch ( )
inlineoverridevirtual

getter for the MOOSE line search

Implements SubProblem.

Definition at line 851 of file FEProblemBase.h.

851{ return _line_search.get(); }

Referenced by DisplacedProblem::getLineSearch().

◆ getMarkerWarehouse()

const MooseObjectWarehouse< Marker > & FEProblemBase::getMarkerWarehouse ( )
inline

Definition at line 2153 of file FEProblemBase.h.

2153{ return _markers; }

◆ getMaterial()

std::shared_ptr< MaterialBase > FEProblemBase::getMaterial ( std::string  name,
Moose::MaterialDataType  type,
const THREAD_ID  tid = 0,
bool  no_warn = false 
)

Return a pointer to a MaterialBase object.

If no_warn is true, suppress warning about retrieving a material reference potentially during the material's calculation.

This will return enabled or disabled objects, the main purpose is for iterative materials.

Definition at line 4058 of file FEProblemBase.C.

4062{
4063 switch (type)
4064 {
4066 name += "_neighbor";
4067 break;
4069 name += "_face";
4070 break;
4071 default:
4072 break;
4073 }
4074
4075 std::shared_ptr<MaterialBase> material = _all_materials[type].getActiveObject(name, tid);
4076 if (!no_warn && material->getParam<bool>("compute") && type == Moose::BLOCK_MATERIAL_DATA)
4077 mooseWarning("You are retrieving a Material object (",
4078 material->name(),
4079 "), but its compute flag is set to true. This indicates that MOOSE is "
4080 "computing this property which may not be desired and produce un-expected "
4081 "results.");
4082
4083 return material;
4084}
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition MooseError.h:345
@ BLOCK_MATERIAL_DATA
Definition MooseTypes.h:747

Referenced by MaterialPropertyInterface::getMaterialByName().

◆ getMaterialData()

MaterialData & FEProblemBase::getMaterialData ( Moose::MaterialDataType  type,
const THREAD_ID  tid = 0,
const MooseObject *  object = nullptr 
) const
Returns
The MaterialData for the type type for thread tid

Definition at line 4087 of file FEProblemBase.C.

4090{
4091 switch (type)
4092 {
4094 if (object)
4096 return _material_props.getMaterialData(tid);
4098 if (object)
4104 if (object)
4107 }
4108
4109 mooseError("FEProblemBase::getMaterialData(): Invalid MaterialDataType ", type);
4110}
void addConsumer(Moose::MaterialDataType type, const MooseObject *object)
Add object as the consumer of storage of type type.
const MaterialData & getMaterialData(const THREAD_ID tid) const
@ BOUNDARY_MATERIAL_DATA
Definition MooseTypes.h:748
@ INTERFACE_MATERIAL_DATA
Definition MooseTypes.h:751

Referenced by BlockRestrictable::initializeBlockRestrictable(), and resizeMaterialData().

◆ getMaterialPropertyBlockNames()

std::vector< SubdomainName > SubProblem::getMaterialPropertyBlockNames ( const std::string &  prop_name)
virtualinherited

Get a vector of block id equivalences that the material property is defined on.

Definition at line 481 of file SubProblem.C.

482{
483 std::set<SubdomainID> blocks = getMaterialPropertyBlocks(prop_name);
484 std::vector<SubdomainName> block_names;
485 block_names.reserve(blocks.size());
486 for (const auto & block_id : blocks)
487 {
488 SubdomainName name;
489 name = mesh().getMesh().subdomain_name(block_id);
490 if (name.empty())
491 {
492 std::ostringstream oss;
493 oss << block_id;
494 name = oss.str();
495 }
496 block_names.push_back(name);
497 }
498
499 return block_names;
500}
virtual std::set< SubdomainID > getMaterialPropertyBlocks(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition SubProblem.C:465

Referenced by MaterialPropertyInterface::getMaterialPropertyBlockNames().

◆ getMaterialPropertyBlocks()

std::set< SubdomainID > SubProblem::getMaterialPropertyBlocks ( const std::string &  prop_name)
virtualinherited

Get a vector containing the block ids the material property is defined on.

Definition at line 465 of file SubProblem.C.

466{
467 std::set<SubdomainID> blocks;
468
469 for (const auto & it : _map_block_material_props)
470 {
471 const std::set<std::string> & prop_names = it.second;
472 std::set<std::string>::iterator name_it = prop_names.find(prop_name);
473 if (name_it != prop_names.end())
474 blocks.insert(it.first);
475 }
476
477 return blocks;
478}

Referenced by SubProblem::getMaterialPropertyBlockNames(), and MaterialPropertyInterface::getMaterialPropertyBlocks().

◆ getMaterialPropertyBoundaryIDs()

std::set< BoundaryID > SubProblem::getMaterialPropertyBoundaryIDs ( const std::string &  prop_name)
virtualinherited

Get a vector containing the block ids the material property is defined on.

Definition at line 517 of file SubProblem.C.

518{
519 std::set<BoundaryID> boundaries;
520
521 for (const auto & it : _map_boundary_material_props)
522 {
523 const std::set<std::string> & prop_names = it.second;
524 std::set<std::string>::iterator name_it = prop_names.find(prop_name);
525 if (name_it != prop_names.end())
526 boundaries.insert(it.first);
527 }
528
529 return boundaries;
530}

Referenced by MaterialPropertyInterface::getMaterialPropertyBoundaryIDs(), and SubProblem::getMaterialPropertyBoundaryNames().

◆ getMaterialPropertyBoundaryNames()

std::vector< BoundaryName > SubProblem::getMaterialPropertyBoundaryNames ( const std::string &  prop_name)
virtualinherited

Get a vector of block id equivalences that the material property is defined on.

Definition at line 533 of file SubProblem.C.

534{
535 std::set<BoundaryID> boundaries = getMaterialPropertyBoundaryIDs(prop_name);
536 std::vector<BoundaryName> boundary_names;
537 boundary_names.reserve(boundaries.size());
538 const BoundaryInfo & boundary_info = mesh().getMesh().get_boundary_info();
539
540 for (const auto & bnd_id : boundaries)
541 {
542 BoundaryName name;
543 if (bnd_id == Moose::ANY_BOUNDARY_ID)
544 name = "ANY_BOUNDARY_ID";
545 else
546 {
547 name = boundary_info.get_sideset_name(bnd_id);
548 if (name.empty())
549 {
550 std::ostringstream oss;
551 oss << bnd_id;
552 name = oss.str();
553 }
554 }
555 boundary_names.push_back(name);
556 }
557
558 return boundary_names;
559}
virtual std::set< BoundaryID > getMaterialPropertyBoundaryIDs(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition SubProblem.C:517

Referenced by MaterialPropertyInterface::getMaterialPropertyBoundaryNames().

◆ getMaterialPropertyRegistry()

const MaterialPropertyRegistry & FEProblemBase::getMaterialPropertyRegistry ( ) const
inline
Returns
A reference to the material property registry

Definition at line 2111 of file FEProblemBase.h.

2112 {
2114 }

Referenced by DiffusionCG::addFEKernels(), SideUserObject::checkNoInterfaceMaterialPropertyDependencies(), and MaterialBase::checkStatefulSanity().

◆ getMaterialPropertyStorage()

const MaterialPropertyStorage & FEProblemBase::getMaterialPropertyStorage ( )
inline

Return a reference to the material property storage.

Returns
A const reference to the material property storage

Definition at line 2121 of file FEProblemBase.h.

2121{ return _material_props; }

◆ getMaterialPropertyStorageConsumers()

const std::set< const MooseObject * > & FEProblemBase::getMaterialPropertyStorageConsumers ( Moose::MaterialDataType  type) const
Returns
The consumers of the MaterialPropertyStorage for the type type

Definition at line 4113 of file FEProblemBase.C.

4114{
4115 switch (type)
4116 {
4125 }
4126
4127 mooseError("FEProblemBase::getMaterialPropertyStorageConsumers(): Invalid MaterialDataType ",
4128 type);
4129}
const std::set< const MooseObject * > & getConsumers(Moose::MaterialDataType type) const

◆ getMaterialWarehouse()

const MaterialWarehouse & FEProblemBase::getMaterialWarehouse ( ) const
inline

◆ getMatrixTagID()

TagID SubProblem::getMatrixTagID ( const TagName &  tag_name) const
virtualinherited

Get a TagID from a TagName.

Reimplemented in DisplacedProblem.

Definition at line 334 of file SubProblem.C.

335{
336 auto tag_name_upper = MooseUtils::toUpper(tag_name);
337
338 if (!matrixTagExists(tag_name))
339 mooseError("Matrix tag: ",
340 tag_name,
341 " does not exist. ",
342 "If this is a TimeKernel then this may have happened because you didn't "
343 "specify a Transient Executioner.");
344
345 return _matrix_tag_name_to_tag_id.at(tag_name_upper);
346}
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition SubProblem.C:320

Referenced by ScalarCoupleable::coupledMatrixTagScalarValue(), Coupleable::coupledMatrixTagValue(), Coupleable::coupledMatrixTagValues(), ExplicitTimeIntegrator::ExplicitTimeIntegrator(), DisplacedProblem::getMatrixTagID(), TaggingInterface::TaggingInterface(), and TaggingInterface::useMatrixTag().

◆ getMatrixTags()

virtual std::map< TagName, TagID > & SubProblem::getMatrixTags ( )
inlinevirtualinherited

◆ getMaxQps()

unsigned int FEProblemBase::getMaxQps ( ) const
Returns
The maximum number of quadrature points in use on any element in this problem.

Definition at line 1810 of file FEProblemBase.C.

1811{
1812 if (_max_qps == std::numeric_limits<unsigned int>::max())
1813 mooseError("Max QPS uninitialized");
1814 return _max_qps;
1815}

Referenced by MaterialBase::getMaxQps(), MaterialPropertyInterface::getMaxQps(), reinitDirac(), Material::subdomainSetup(), and updateMaxQps().

◆ getMaxScalarOrder()

Order FEProblemBase::getMaxScalarOrder ( ) const
Returns
The maximum order for all scalar variables in this problem's systems.

Definition at line 1818 of file FEProblemBase.C.

1819{
1820 return _max_scalar_order;
1821}

Referenced by ScalarCoupleable::coupledScalarOrder(), ScalarCoupleable::getADDefaultValue(), and ScalarCoupleable::getDefaultValue().

◆ getMeshDivision()

MeshDivision & FEProblemBase::getMeshDivision ( const std::string &  name,
const THREAD_ID  tid = 0 
) const

Get a MeshDivision.

Definition at line 2885 of file FEProblemBase.C.

2886{
2887 auto * const ret = dynamic_cast<MeshDivision *>(_mesh_divisions.getActiveObject(name, tid).get());
2888 if (!ret)
2889 mooseError("No MeshDivision object named ", name, " of appropriate type");
2890 return *ret;
2891}

Referenced by NestedDivision::NestedDivision().

◆ getMooseApp()

MooseApp & MooseBase::getMooseApp ( ) const
inlineinherited

Get the MooseApp this class is associated with.

Definition at line 87 of file MooseBase.h.

87{ return _app; }

Referenced by ChainControlSetupAction::act(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), advanceState(), ParsedChainControl::buildFunction(), MooseMesh::cacheChangedLists(), ReporterTransferInterface::checkHasReporterValue(), LinearFVGradientManager::checkRestartedGradientHistory(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), Coupleable::checkWritableVar(), ComponentPhysicsInterface::ComponentPhysicsInterface(), Coupleable::Coupleable(), MortarInterfaceWarehouse::createMortarInterface(), EigenProblem::doFreeNonlinearPowerIterations(), GreaterThanLessThanPostprocessor::execute(), Terminator::execute(), WorkBalance::execute(), FEProblemSolve::FEProblemSolve(), RadialAverage::finalize(), SolutionInvalidInterface::flagInvalidSolutionInternal(), ChainControl::getChainControlDataSystem(), getDistribution(), getFunction(), getFVInterpolationMethod(), getMultiApp(), getSampler(), DefaultConvergenceBase::getSharedExecutionerParam(), getUserObjectBase(), getVectorPostprocessorObjectByName(), ChainControlDataPostprocessor::initialSetup(), MaterialPropertyInterface::MaterialPropertyInterface(), MooseLinearVariableFV< OutputType >::MooseLinearVariableFV(), MooseVariableDataFV< OutputType >::MooseVariableDataFV(), SubProblem::numThreads(), ProgressOutput::output(), PetscOutputInterface::petscLinearOutput(), PetscOutputInterface::petscNonlinearOutput(), Moose::PetscSupport::PetscOptionsScope::PetscOptionsScope(), PetscOutputInterface::PetscOutputInterface(), PostprocessorInterface::postprocessorsAdded(), MultiApp::preTransfer(), AuxiliarySystem::registerFVGradient(), Reporter::Reporter(), ReporterInterface::reportersAdded(), MultiApp::restore(), and VectorPostprocessorInterface::vectorPostprocessorsAdded().

◆ getMortarInterface() [1/2]

AutomaticMortarGeneration & FEProblemBase::getMortarInterface ( const std::pair< BoundaryID, BoundaryID > &  primary_secondary_boundary_pair,
const std::pair< SubdomainID, SubdomainID > &  primary_secondary_subdomain_pair,
bool  on_displaced 
)

Definition at line 8815 of file FEProblemBase.C.

8819{
8820 return _mortar_data->getMortarInterface(
8821 primary_secondary_boundary_pair, primary_secondary_subdomain_pair, on_displaced);
8822}

◆ getMortarInterface() [2/2]

const AutomaticMortarGeneration & FEProblemBase::getMortarInterface ( const std::pair< BoundaryID, BoundaryID > &  primary_secondary_boundary_pair,
const std::pair< SubdomainID, SubdomainID > &  primary_secondary_subdomain_pair,
bool  on_displaced 
) const

Return the undisplaced or displaced mortar generation object associated with the provided boundaries and subdomains.

Definition at line 8805 of file FEProblemBase.C.

8809{
8810 return _mortar_data->getMortarInterface(
8811 primary_secondary_boundary_pair, primary_secondary_subdomain_pair, on_displaced);
8812}

◆ getMortarInterfaces()

const std::unordered_map< std::pair< BoundaryID, BoundaryID >, MortarInterfaceConfig > & FEProblemBase::getMortarInterfaces ( bool  on_displaced) const

Definition at line 10497 of file FEProblemBase.C.

10498{
10499 return _mortar_data->getMortarInterfaces(on_displaced);
10500}

Referenced by computeUserObjectsInternal(), MortarSegmentMeshReporter::execute(), and NonlinearSystemBase::initialSetup().

◆ getMortarUserObjects() [1/2]

std::vector< MortarUserObject * > FEProblemBase::getMortarUserObjects ( BoundaryID  primary_boundary_id,
BoundaryID  secondary_boundary_id,
bool  displaced 
)
private

Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID, and displaced parameters from the entire active mortar user object set.

Definition at line 10322 of file FEProblemBase.C.

10325{
10326 std::vector<MortarUserObject *> mortar_uos;
10327 theWarehouse()
10328 .query()
10330 .queryInto(mortar_uos);
10331 return getMortarUserObjects(primary_boundary_id, secondary_boundary_id, displaced, mortar_uos);
10332}

◆ getMortarUserObjects() [2/2]

std::vector< MortarUserObject * > FEProblemBase::getMortarUserObjects ( BoundaryID  primary_boundary_id,
BoundaryID  secondary_boundary_id,
bool  displaced,
const std::vector< MortarUserObject * > &  mortar_uo_superset 
)
private

Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID, and displaced parameters, given some initial set.

Definition at line 10305 of file FEProblemBase.C.

10309{
10310 std::vector<MortarUserObject *> mortar_uos;
10311 auto * const subproblem =
10312 displaced ? cast_ptr<SubProblem *>(_displaced_problem.get()) : cast_ptr<SubProblem *>(this);
10313 for (auto * const obj : mortar_uo_superset)
10314 if (obj->onInterface(primary_boundary_id, secondary_boundary_id) &&
10315 (&obj->getSubProblem() == subproblem))
10316 mortar_uos.push_back(obj);
10317
10318 return mortar_uos;
10319}

Referenced by computeUserObjectsInternal(), getMortarUserObjects(), and reinitMortarUserObjects().

◆ getMultiApp()

std::shared_ptr< MultiApp > FEProblemBase::getMultiApp ( const std::string &  multi_app_name) const

Get a MultiApp object by name.

Definition at line 5976 of file FEProblemBase.C.

5977{
5978 if (!hasMultiApp(multi_app_name))
5979 mooseAssert(getMooseApp().actionWarehouse().isTaskComplete("add_multi_app"),
5980 "A MultiApp getter was called before MultiApps have been constructed. "
5981 "If you are attempting to access this object in the constructor of another object "
5982 "then make sure that the MultiApp is constructed before the object using it.");
5983
5984 return _multi_apps.getObject(multi_app_name);
5985}
bool hasMultiApp(const std::string &name) const
std::shared_ptr< T > getObject(const std::string &name, THREAD_ID tid=0) const

Referenced by addTransfer(), execMultiAppTransfers(), MultiAppPositions::initialize(), and MultiAppTransfer::MultiAppTransfer().

◆ getMultiAppFixedPointConvergenceName()

const ConvergenceName & FEProblemBase::getMultiAppFixedPointConvergenceName ( ) const

Gets the MultiApp fixed point convergence object name.

Definition at line 10217 of file FEProblemBase.C.

10218{
10221 else
10222 mooseError("The fixed point convergence name has not been set.");
10223}
std::optional< ConvergenceName > _multiapp_fixed_point_convergence_name
MultiApp fixed point convergence name.

Referenced by addDefaultMultiAppFixedPointConvergence(), FixedPointSolve::examineFixedPointConvergence(), FixedPointIterationAdaptiveDT::init(), FixedPointSolve::initialSetup(), SteffensenSolve::initialSetup(), FixedPointSolve::solve(), and FixedPointSolve::solveStep().

◆ getMultiAppTransferWarehouse()

const ExecuteMooseObjectWarehouse< Transfer > & FEProblemBase::getMultiAppTransferWarehouse ( Transfer::DIRECTION  direction) const

Return the complete warehouse for MultiAppTransfer object for the given direction.

Definition at line 6122 of file FEProblemBase.C.

6123{
6124 if (direction == MultiAppTransfer::TO_MULTIAPP)
6126 else if (direction == MultiAppTransfer::FROM_MULTIAPP)
6128 else
6130}

◆ getMultiAppWarehouse()

ExecuteMooseObjectWarehouse< MultiApp > & FEProblemBase::getMultiAppWarehouse ( )
inline

◆ getNeighborMaterialPropertyStorage()

const MaterialPropertyStorage & FEProblemBase::getNeighborMaterialPropertyStorage ( )
inline

Definition at line 2123 of file FEProblemBase.h.

2124 {
2126 }

◆ getNonlinearConvergenceNames()

const std::vector< ConvergenceName > & FEProblemBase::getNonlinearConvergenceNames ( ) const

Gets the nonlinear system convergence object name(s).

Definition at line 10185 of file FEProblemBase.C.

10186{
10189 mooseError("The nonlinear system convergence name(s) have not been set.");
10190}
std::optional< std::vector< ConvergenceName > > _nonlinear_convergence_names
Nonlinear system(s) convergence name(s)

Referenced by addDefaultNonlinearConvergence(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), and FEProblemSolve::convergenceSetup().

◆ getNonlinearEvaluableElementRange()

const ConstElemRange & FEProblemBase::getNonlinearEvaluableElementRange ( )

Definition at line 946 of file FEProblemBase.C.

947{
949 {
950 std::vector<const DofMap *> dof_maps(_nl.size());
951 for (const auto i : index_range(dof_maps))
952 dof_maps[i] = &_nl[i]->dofMap();
954 std::make_unique<ConstElemRange>(_mesh.getMesh().multi_evaluable_elements_begin(dof_maps),
955 _mesh.getMesh().multi_evaluable_elements_end(dof_maps));
956 }
957
959}
std::unique_ptr< libMesh::ConstElemRange > _nl_evaluable_local_elem_range

Referenced by ElemSideNeighborLayersTester::execute().

◆ getNonlinearSystem()

NonlinearSystem & FEProblemBase::getNonlinearSystem ( const unsigned int  sys_num)
virtual

Reimplemented in FEProblem.

Definition at line 2900 of file FEProblemBase.C.

2901{
2902 mooseDeprecated("FEProblemBase::getNonlinearSystem() is deprecated, please use "
2903 "FEProblemBase::getNonlinearSystemBase() \n");
2904
2905 mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
2906 auto nl_sys = std::dynamic_pointer_cast<NonlinearSystem>(_nl[sys_num]);
2907
2908 if (!nl_sys)
2909 mooseError("This is not a NonlinearSystem");
2910
2911 return *nl_sys;
2912}

Referenced by PNGOutput::calculateRescalingValues(), and PNGOutput::makeMeshFunc().

◆ getNonlinearSystemBase() [1/2]

NonlinearSystemBase & FEProblemBase::getNonlinearSystemBase ( const unsigned int  sys_num)
inline

◆ getNonlinearSystemBase() [2/2]

const NonlinearSystemBase & FEProblemBase::getNonlinearSystemBase ( const unsigned int  sys_num) const
inline

Definition at line 3853 of file FEProblemBase.h.

3854{
3855 mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
3856 return *_nl[sys_num];
3857}

◆ getNonlinearSystemNames()

const std::vector< NonlinearSystemName > & FEProblemBase::getNonlinearSystemNames ( ) const
inline

◆ getNumCyclesCompleted()

unsigned int FEProblemBase::getNumCyclesCompleted ( )
inline
Returns
The number of adaptivity cycles completed.

Definition at line 2189 of file FEProblemBase.h.

2189{ return _cycles_completed; }

◆ getParam() [1/2]

template<typename T >
const T & MooseBase::getParam ( const std::string &  name) const
inherited

Retrieve a parameter for the object.

Parameters
nameThe name of the parameter
Returns
The value of the parameter

Definition at line 406 of file MooseBase.h.

407{
408 return InputParameters::getParamHelper<T>(name, _pars);
409}

Referenced by CommonOutputAction::act(), CreateDisplacedProblemAction::act(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), CylinderComponent::addMeshGenerators(), addOutput(), ArrayParsedAux::ArrayParsedAux(), BicubicSplineFunction::BicubicSplineFunction(), SurfaceDelaunayGeneratorBase::checkBoundaryAndHolesParams(), Console::Console(), CutMeshByLevelSetGenerator::CutMeshByLevelSetGenerator(), DebugResidualAux::DebugResidualAux(), DerivativeParsedMaterialTempl< is_ad >::DerivativeParsedMaterialTempl(), DiffusionPhysicsBase::DiffusionPhysicsBase(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenKernel::EigenKernel(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), MFEMEigenvaluesPostprocessor::execute(), FEProblemSolve::FEProblemSolve(), SurfaceDelaunayGeneratorBase::fillDelaunayOptions(), ParsedVectorReporter::finalize(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), ParsedSubdomainGeneratorBase::functionInitialize(), BlockDeletionGenerator::generate(), BoundaryLayerSubdomainGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), FileMeshGenerator::generate(), MeshExtruderGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), SubdomainsFromPartitionerGenerator::generate(), GenericConstantRankTwoTensorTempl< is_ad >::GenericConstantRankTwoTensorTempl(), GenericConstantSymmetricRankTwoTensorTempl< is_ad >::GenericConstantSymmetricRankTwoTensorTempl(), GeometricSearchInterface::GeometricSearchInterface(), MooseApp::getCheckpointDirectories(), DataFileInterface::getDataFileName(), ExecutorInterface::getExecutor(), DefaultConvergenceBase::getSharedExecutionerParam(), AddVariableAction::init(), AdvancedOutput::init(), FixedPointIterationAdaptiveDT::init(), TimeSequenceStepper::init(), AdvancedOutput::initAvailableLists(), AttribThread::initFrom(), AttribExecutionOrderGroup::initFrom(), AttribSysNum::initFrom(), AttribResidualObject::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), SampledOutput::initSample(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MooseMesh::MooseMesh(), MooseVariableBase::MooseVariableBase(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), MultiPostprocessorConvergence::MultiPostprocessorConvergence(), PerfGraphOutput::output(), Console::outputSystemInformation(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedGenerateNodeset::ParsedGenerateNodeset(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterialTempl< is_ad >::ParsedMaterialTempl(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), ParsedReporterBase::ParsedReporterBase(), ParsedVectorReporter::ParsedVectorReporter(), ProjectSideSetOntoLevelSetGenerator::ProjectSideSetOntoLevelSetGenerator(), ReferenceResidualInterface::ReferenceResidualInterface(), Moose::FV::setInterpolationMethod(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), Output::setWallTimeIntervalFromCommandLineParam(), PetscOutput::solveSetup(), TimePeriod::TimePeriod(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorOfPostprocessors::VectorOfPostprocessors(), and XYQuadrilateralMeshFromBoundaryCurve::XYQuadrilateralMeshFromBoundaryCurve().

◆ getParam() [2/2]

template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > MooseBase::getParam ( const std::string &  param1,
const std::string &  param2 
) const
inherited

Retrieve two parameters and provide pair of parameters for the object.

Parameters
param1The name of first parameter
param2The name of second parameter
Returns
Vector of pairs of first and second parameters

Definition at line 443 of file MooseBase.h.

444{
445 return _pars.get<T1, T2>(param1, param2);
446}

◆ getPetscOptions()

Moose::PetscSupport::PetscOptions & FEProblemBase::getPetscOptions ( )
inline

◆ getPositionsObject()

const Positions & FEProblemBase::getPositionsObject ( const std::string &  name) const

Get the Positions object by its name.

Parameters
nameThe name of the Positions object being retrieved
Returns
Const reference to the Positions object

Definition at line 4834 of file FEProblemBase.C.

4835{
4836 std::vector<Positions *> objs;
4837 theWarehouse()
4838 .query()
4839 .condition<AttribSystem>("UserObject")
4840 .condition<AttribName>(name)
4841 .queryInto(objs);
4842 if (objs.empty())
4843 mooseError("Unable to find Positions object with name '" + name + "'");
4844 mooseAssert(objs.size() == 1, "Should only find one Positions");
4845 return *(objs[0]);
4846}

Referenced by DistributedPositions::DistributedPositions(), MultiApp::fillPositions(), ParsedDownSelectionPositions::initialize(), Positions::initialized(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), and TransformedPositions::TransformedPositions().

◆ getPostprocessorObjectByName()

const Postprocessor & FEProblemBase::getPostprocessorObjectByName ( const PostprocessorName &  object_name,
const THREAD_ID  tid = 0 
) const

Return the Postprocessor object registered under the supplied object name.

Parameters
object_nameThe name of the Postprocessor object
tidThe thread identifier for thread-local object lookup

Definition at line 4980 of file FEProblemBase.C.

4982{
4983 std::vector<Postprocessor *> objs;
4984 theWarehouse()
4985 .query()
4987 .condition<AttribThread>(tid)
4988 .condition<AttribName>(object_name)
4989 .queryInto(objs);
4990
4991 if (objs.empty())
4992 mooseError("Unable to find Postprocessor with name '", object_name, "'");
4993 mooseAssert(objs.size() == 1,
4994 "We shouldn't find more than one postprocessor object for a given name");
4995 return *(objs[0]);
4996}

◆ getPostprocessorValueByName()

const PostprocessorValue & FEProblemBase::getPostprocessorValueByName ( const PostprocessorName &  name,
std::size_t  t_index = 0 
) const

Get a read-only reference to the value associated with a Postprocessor that exists.

Parameters
nameThe name of the post-processor
t_indexFlag for getting current (0), old (1), or older (2) values
Returns
The reference to the value at the given time index

Note: This method is only for retrieving values that already exist, the Postprocessor and PostprocessorInterface objects should be used rather than this method for creating and getting values within objects.

Definition at line 4999 of file FEProblemBase.C.

5001{
5003 t_index);
5004}
Real PostprocessorValue
various MOOSE typedefs
Definition MooseTypes.h:230
A ReporterName that represents a Postprocessor.
const T & getReporterValue(const ReporterName &reporter_name, const MooseObject &consumer, const ReporterMode &mode, const std::size_t time_index=0) const
Method for returning read only references to Reporter values.

Referenced by MFEMProblem::addPostprocessor(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), MultiApp::appPostprocessorValue(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppPostprocessorTransfer::execute(), EigenProblem::formNorm(), MooseParsedFunctionWrapper::initialize(), ParsedConvergence::initializePostprocessorSymbol(), EigenExecutionerBase::inversePowerIteration(), Exodus::outputPostprocessors(), Nemesis::outputPostprocessors(), TableOutput::outputPostprocessorsRow(), EigenProblem::postScaleEigenVector(), and TableOutput::shouldOutputPostprocessorsRow().

◆ getRegularMaterialsWarehouse()

const MaterialWarehouse & FEProblemBase::getRegularMaterialsWarehouse ( ) const
inline

◆ getRenamedParam()

template<typename T >
const T & MooseBase::getRenamedParam ( const std::string &  old_name,
const std::string &  new_name 
) const
inherited

Retrieve a renamed parameter for the object.

This helper makes sure we check both names before erroring, and that only one parameter is passed to avoid silent errors

Parameters
old_namethe old name for the parameter
new_namethe new name for the parameter

Definition at line 420 of file MooseBase.h.

421{
422 // Most important: accept new parameter
423 if (isParamSetByUser(new_name) && !isParamValid(old_name))
424 return getParam<T>(new_name);
425 // Second most: accept old parameter
426 if (isParamValid(old_name) && !isParamSetByUser(new_name))
427 return getParam<T>(old_name);
428 // Third most: accept default for new parameter
429 if (isParamValid(new_name) && !isParamValid(old_name))
430 return getParam<T>(new_name);
431 // Refuse: no default, no value passed
432 if (!isParamValid(old_name) && !isParamValid(new_name))
433 mooseError("parameter '" + new_name +
434 "' is being retrieved without being set.\nDid you misspell it?");
435 // Refuse: both old and new parameters set by user
436 else
437 mooseError("Parameter '" + new_name + "' may not be provided alongside former parameter '" +
438 old_name + "'");
439}

◆ getReporterData() [1/2]

const ReporterData & FEProblemBase::getReporterData ( ) const
inline

Provides const access the ReporterData object.

NOTE: There is a private non-const version of this function that uses a key object only constructable by the correct interfaces. This was done by design to encourage the use of the Reporter and ReporterInterface classes.

Definition at line 1402 of file FEProblemBase.h.

1402{ return _reporter_data; }

Referenced by ReporterTransferInterface::addReporterTransferMode(), ReporterTransferInterface::broadcastReporter(), ReporterTransferInterface::checkHasReporterValue(), ReporterTransferInterface::clearVectorReporter(), ConstantPostprocessor::ConstantPostprocessor(), AccumulateReporter::declareAccumulateHelper(), ReporterTransferInterface::declareClone(), ReporterTransferInterface::declareClone(), AccumulateReporter::declareLateValues(), VectorPostprocessor::declareVector(), ReporterTransferInterface::declareVectorClone(), ReporterTransferInterface::declareVectorClone(), execute(), PostprocessorInterface::getPostprocessorValueByNameInternal(), VectorPostprocessorInterface::getVectorPostprocessorByNameHelper(), VectorPostprocessorInterface::getVectorPostprocessorContextByNameHelper(), PostprocessorInterface::hasPostprocessorByName(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), MooseParsedFunctionWrapper::initialize(), ReporterPositions::initialize(), ReporterTimes::initialize(), ParsedConvergence::initializeSymbols(), JSONOutput::initialSetup(), PostprocessorInterface::isDefaultPostprocessorValueByName(), ReporterDebugOutput::output(), Receiver::Receiver(), ReporterTransferInterface::resizeReporter(), ReporterTransferInterface::sumVectorReporter(), ReporterTransferInterface::transferFromVectorReporter(), ReporterTransferInterface::transferReporter(), and ReporterTransferInterface::transferToVectorReporter().

◆ getReporterData() [2/2]

ReporterData & FEProblemBase::getReporterData ( ReporterData::WriteKey  )
inline

Provides non-const access the ReporterData object that is used to store reporter values.

see ReporterData.h

Definition at line 1409 of file FEProblemBase.h.

1409{ return _reporter_data; }

◆ getRestartableData()

template<typename T , typename... Args>
const T & Restartable::getRestartableData ( const std::string &  data_name) const
protectedinherited

Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData but returns a const reference to the object.

Forwarded arguments are not allowed in this case because we assume that the object is restarted and we won't need different constructors to initialize it.

NOTE: This returns a const reference! Make sure you store it in a const reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)

Definition at line 294 of file Restartable.h.

295{
296 return declareRestartableDataHelper<T>(data_name, nullptr).get();
297}

◆ getRestartableEquationSystems()

const RestartableEquationSystems & FEProblemBase::getRestartableEquationSystems ( ) const

Get the RestartableEquationSystems object.

Definition at line 6653 of file FEProblemBase.C.

6654{
6655 return _req.get();
6656}
const T & get() const
Get the restartable value.
Definition Restartable.h:58

Referenced by LinearFVGradientManager::checkRestartedGradientHistory().

◆ getSampler()

Sampler & FEProblemBase::getSampler ( const std::string &  name,
const THREAD_ID  tid = 0 
)
virtual

Definition at line 2966 of file FEProblemBase.C.

2967{
2968 std::vector<Sampler *> objs;
2969 theWarehouse()
2970 .query()
2971 .condition<AttribSystem>("Sampler")
2972 .condition<AttribThread>(tid)
2973 .condition<AttribName>(name)
2974 .queryInto(objs);
2975 if (objs.empty())
2976 {
2977 mooseAssert(getMooseApp().actionWarehouse().isTaskComplete("add_sampler"),
2978 "A Sampler getter was called before Samplers have been constructed. "
2979 "If you are attempting to access this object in the constructor of another object "
2980 "then make sure that the Sampler is constructed before the object using it.");
2981
2982 mooseError(
2983 "Unable to find Sampler with name '" + name +
2984 "', if you are attempting to access this object in the constructor of another object then "
2985 "make sure that the Sampler is constructed before the object using it.");
2986 }
2987 return *(objs[0]);
2988}

Referenced by SamplerInterface::getSampler(), and SamplerInterface::getSamplerByName().

◆ getScalarVariable()

MooseVariableScalar & FEProblemBase::getScalarVariable ( const THREAD_ID  tid,
const std::string &  var_name 
)
overridevirtual

Returns the scalar variable reference from whichever system contains it.

Implements SubProblem.

Definition at line 6629 of file FEProblemBase.C.

6630{
6631 for (auto & sys : _solver_systems)
6632 if (sys->hasScalarVariable(var_name))
6633 return sys->getScalarVariable(tid, var_name);
6634 if (_aux->hasScalarVariable(var_name))
6635 return _aux->getScalarVariable(tid, var_name);
6636
6637 mooseError("Unknown variable " + var_name);
6638}

Referenced by addInitialCondition(), EigenProblem::adjustEigenVector(), MultiAppScalarToAuxScalarTransfer::execute(), MooseParsedFunctionWrapper::initialize(), ChainControlParsedFunctionWrapper::initializeFunctionInputs(), Exodus::outputScalarVariables(), Nemesis::outputScalarVariables(), and TableOutput::outputScalarVariables().

◆ getSharedPtr() [1/2]

std::shared_ptr< MooseObject > MooseObject::getSharedPtr ( )
inherited

Get another shared pointer to this object that has the same ownership group.

Wrapper around shared_from_this().

Definition at line 70 of file MooseObject.C.

71{
72 try
73 {
74 return shared_from_this();
75 }
76 catch (std::bad_weak_ptr &)
77 {
78 mooseError(not_shared_error);
79 }
80}

Referenced by MFEMProblem::addImagComponentToBC(), MFEMProblem::addImagComponentToKernel(), MFEMProblem::addRealComponentToBC(), MFEMProblem::addRealComponentToKernel(), and WebServerControl::addServerAction().

◆ getSharedPtr() [2/2]

std::shared_ptr< const MooseObject > MooseObject::getSharedPtr ( ) const
inherited

Definition at line 83 of file MooseObject.C.

84{
85 try
86 {
87 return shared_from_this();
88 }
89 catch (std::bad_weak_ptr &)
90 {
91 mooseError(not_shared_error);
92 }
93}

◆ getSolverSystem() [1/2]

SolverSystem & FEProblemBase::getSolverSystem ( unsigned int  sys_num)
inline

◆ getSolverSystem() [2/2]

const SolverSystem & FEProblemBase::getSolverSystem ( unsigned int  sys_num) const
inline

Get a constant reference to a solver system.

Parameters
sys_numThe number of the solver system

Definition at line 3868 of file FEProblemBase.h.

3869{
3870 mooseAssert(sys_num < _solver_systems.size(),
3871 "System number greater than the number of solver systems");
3872 return *_solver_systems[sys_num];
3873}

◆ getSolverSystemNames()

const std::vector< SolverSystemName > & FEProblemBase::getSolverSystemNames ( ) const
inline
Returns
the solver system names in the problem

Definition at line 3054 of file FEProblemBase.h.

3054{ return _solver_sys_names; }

Referenced by ConsoleUtils::outputExecutionInformation().

◆ getStandardVariable()

MooseVariable & FEProblemBase::getStandardVariable ( const THREAD_ID  tid,
const std::string &  var_name 
)
overridevirtual

Returns the variable reference for requested MooseVariable which may be in any system.

Implements SubProblem.

Definition at line 6569 of file FEProblemBase.C.

6570{
6571 for (auto & sys : _solver_systems)
6572 if (sys->hasVariable(var_name))
6573 return sys->getFieldVariable<Real>(tid, var_name);
6574 if (_aux->hasVariable(var_name))
6575 return _aux->getFieldVariable<Real>(tid, var_name);
6576
6577 mooseError("Unknown variable " + var_name);
6578}

Referenced by CoupleableMooseVariableDependencyIntermediateInterface::coupledValueByName(), projectFunctionOnCustomRange(), LinearFVKernel::requestVariableCellGradient(), and ElementSubdomainModifierBase::storeOverriddenDofValues().

◆ getSteadyStateConvergenceName()

const ConvergenceName & FEProblemBase::getSteadyStateConvergenceName ( ) const

Gets the steady-state detection convergence object name.

Definition at line 10226 of file FEProblemBase.C.

10227{
10229 return _steady_state_convergence_name.value();
10230 else
10231 mooseError("The steady convergence name has not been set.");
10232}
std::optional< ConvergenceName > _steady_state_convergence_name
Steady-state detection convergence name.

Referenced by addDefaultSteadyStateConvergence(), TransientBase::convergedToSteadyState(), and TransientBase::init().

◆ getSystem()

System & FEProblemBase::getSystem ( const std::string &  var_name)
overridevirtual

Returns the equation system containing the variable provided.

Implements SubProblem.

Definition at line 6641 of file FEProblemBase.C.

6642{
6643 const auto [var_in_sys, sys_num] = determineSolverSystem(var_name);
6644 if (var_in_sys)
6645 return _solver_systems[sys_num]->system();
6646 else if (_aux->hasVariable(var_name) || _aux->hasScalarVariable(var_name))
6647 return _aux->system();
6648 else
6649 mooseError("Unable to find a system containing the variable " + var_name);
6650}

Referenced by addObjectParamsHelper(), MultiApp::appTransferVector(), FunctorChangeFunctorMaterialTempl< is_ad >::FunctorChangeFunctorMaterialTempl(), ElementSubdomainModifierBase::gatherPatchElements(), and ElementSubdomainModifierBase::storeOverriddenDofValues().

◆ getSystemBase() [1/3]

SystemBase & FEProblemBase::getSystemBase ( const std::string &  sys_name)

Get non-constant reference to a system in this problem.

Parameters
sys_nameThe name of the system

Definition at line 9944 of file FEProblemBase.C.

9945{
9946 if (std::find(_solver_sys_names.begin(), _solver_sys_names.end(), sys_name) !=
9947 _solver_sys_names.end())
9948 return getSystemBase(solverSysNum(sys_name));
9949 else if (sys_name == "aux0")
9950 return *_aux;
9951 else
9952 mooseError("System '" + sys_name + "' was requested from problem but does not exist.");
9953}

◆ getSystemBase() [2/3]

SystemBase & FEProblemBase::getSystemBase ( const unsigned int  sys_num)
virtual

Get non-constant reference to a system in this problem.

Parameters
sys_numThe number of the system

Definition at line 9956 of file FEProblemBase.C.

9957{
9958 if (sys_num < _solver_systems.size())
9959 return *_solver_systems[sys_num];
9960
9961 return *_aux;
9962}

◆ getSystemBase() [3/3]

const SystemBase & FEProblemBase::getSystemBase ( const unsigned int  sys_num) const
virtual

Get constant reference to a system in this problem.

Parameters
sys_numThe number of the system

Definition at line 9935 of file FEProblemBase.C.

9936{
9937 if (sys_num < _solver_systems.size())
9938 return *_solver_systems[sys_num];
9939
9940 return *_aux;
9941}

Referenced by addObjectParamsHelper(), PhysicsBase::copyVariablesFromMesh(), getSystemBase(), projectFunctionOnCustomRange(), and ElementSubdomainModifierBase::restoreOverriddenDofValues().

◆ getTimeFromStateArg()

Real FEProblemBase::getTimeFromStateArg ( const Moose::StateArg &  state) const

Returns the time associated with the requested state.

Definition at line 7654 of file FEProblemBase.C.

7655{
7657 // If we are any iteration type other than time (e.g. nonlinear), then temporally we are still
7658 // in the present time
7659 return time();
7660
7661 switch (state.state)
7662 {
7663 case 0:
7664 return time();
7665
7666 case 1:
7667 return timeOld();
7668
7669 case 2:
7670 return timeOlder();
7671
7672 default:
7673 mooseError("Unhandled state ", state.state, " in FEProblemBase::getTimeFromStateArg");
7674 }
7675}
virtual Real & timeOld() const
virtual Real & time() const
virtual Real & timeOlder() const
The time two steps back.
SolutionIterationType iteration_type
The solution iteration type, e.g. time or nonlinear.
unsigned int state
The state.

Referenced by Function::evaluate(), Function::evaluateDotHelper(), Function::evaluateGradientHelper(), Function::evaluateHelper(), and ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl().

◆ getTransfers() [1/2]

std::vector< std::shared_ptr< Transfer > > FEProblemBase::getTransfers ( ExecFlagType  type,
Transfer::DIRECTION  direction 
) const

Get Transfers by ExecFlagType and direction.

Definition at line 6100 of file FEProblemBase.C.

6101{
6102 if (direction == MultiAppTransfer::TO_MULTIAPP)
6104 else if (direction == MultiAppTransfer::FROM_MULTIAPP)
6106 else
6108}

◆ getTransfers() [2/2]

std::vector< std::shared_ptr< Transfer > > FEProblemBase::getTransfers ( Transfer::DIRECTION  direction) const

Definition at line 6111 of file FEProblemBase.C.

6112{
6113 if (direction == MultiAppTransfer::TO_MULTIAPP)
6115 else if (direction == MultiAppTransfer::FROM_MULTIAPP)
6117 else
6119}

◆ getUOExecutionGroups()

void FEProblemBase::getUOExecutionGroups ( TheWarehouse::Query &  query,
std::set< int > &  execution_groups 
) const
private

Definition at line 5406 of file FEProblemBase.C.

5408{
5409 std::vector<UserObjectBase *> uos;
5410 query.queryIntoUnsorted(uos);
5411 for (const auto & uo : uos)
5412 execution_groups.insert(uo->getParam<int>("execution_order_group"));
5413}

Referenced by computeUserObjectByName(), and computeUserObjects().

◆ getUOQuery()

TheWarehouse::Query FEProblemBase::getUOQuery ( const std::string &  system,
const ExecFlagType &  type,
const Moose::AuxGroup &  group 
) const
private

Definition at line 5388 of file FEProblemBase.C.

5391{
5393 theWarehouse().query().condition<AttribSystem>(system).condition<AttribExecOns>(type);
5394
5395 if (group == Moose::PRE_IC)
5396 query.condition<AttribPreIC>(true);
5397 else if (group == Moose::PRE_AUX)
5398 query.condition<AttribPreAux>(type);
5399 else if (group == Moose::POST_AUX)
5400 query.condition<AttribPostAux>(type);
5401
5402 return query;
5403}
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition Attributes.h:346
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition Attributes.h:315
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition Attributes.h:296

Referenced by computeUserObjectByName(), and computeUserObjects().

◆ getUserObject()

template<class T >
T & FEProblemBase::getUserObject ( const std::string &  name,
unsigned int  tid = 0 
) const
inline

Get the user object by its name.

Parameters
nameThe name of the user object being retrieved
Returns
Reference to the user object

Definition at line 1421 of file FEProblemBase.h.

1422 {
1423 std::vector<T *> objs;
1424 theWarehouse()
1425 .query()
1426 .condition<AttribSystem>("UserObject")
1427 .condition<AttribThread>(tid)
1428 .condition<AttribName>(name)
1429 .queryInto(objs);
1430 if (objs.empty())
1431 mooseError("Unable to find user object with name '" + name + "'");
1432 return *(objs[0]);
1433 }

Referenced by ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), ReporterTransferInterface::hideVariableHelper(), EigenExecutionerBase::init(), EigenProblemSolve::initialSetup(), IntegralPreservingFunctionIC::initialSetup(), ElementSubdomainModifierBase::initialSetup(), EigenExecutionerBase::inversePowerIteration(), and NEML2FEInterpolation::syncWithMainThread().

◆ getUserObjectBase()

const UserObject & FEProblemBase::getUserObjectBase ( const std::string &  name,
const THREAD_ID  tid = 0 
) const

Get the user object by its name.

Parameters
nameThe name of the user object being retrieved
tidThe thread of the user object (defaults to 0)
Returns
Const reference to the user object

Definition at line 4811 of file FEProblemBase.C.

4812{
4813 std::vector<UserObject *> objs;
4814 theWarehouse()
4815 .query()
4816 .condition<AttribSystem>("UserObject")
4817 .condition<AttribThread>(tid)
4818 .condition<AttribName>(name)
4819 .queryInto(objs);
4820 if (objs.empty())
4821 {
4822 mooseAssert(getMooseApp().actionWarehouse().isTaskComplete("add_user_object"),
4823 "A UserObject getter was called before UserObjects have been constructed. The "
4824 "requested UserObject '" +
4825 name + "' may exist in the input file, but UserObjects are not available yet.");
4826
4827 mooseError("Unable to find user object with name '" + name + "'");
4828 }
4829 mooseAssert(objs.size() == 1, "Should only find one UO");
4830 return *(objs[0]);
4831}

Referenced by MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), MultiApp::appUserObjectBase(), EigenProblem::checkProblemIntegrity(), checkUserObjectNameCollision(), UserObjectInterface::getUserObjectFromFEProblem(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppConservativeTransfer::initialSetup(), and Terminator::initialSetup().

◆ getUserObjectJacobianVariables()

const std::vector< const MooseVariableFEBase * > & FEProblemBase::getUserObjectJacobianVariables ( const THREAD_ID  tid) const
inline

Definition at line 356 of file FEProblemBase.h.

357 {
358 return _uo_jacobian_moose_vars[tid];
359 }

Referenced by ComputeUserObjectsThread::onBoundary(), and ComputeUserObjectsThread::onElement().

◆ getVariable() [1/3]

virtual MooseVariableFieldBase & SubProblem::getVariable ( const THREAD_ID  tid,
const std::string &  var_name,
Moose::VarKindType  expected_var_type = Moose::VarKindType::VAR_ANY,
Moose::VarFieldType  expected_var_field_type = Moose::VarFieldType::VAR_FIELD_ANY 
)
inlinevirtual

Reimplemented from SubProblem.

Definition at line 282 of file SubProblem.h.

286 {
287 return const_cast<MooseVariableFieldBase &>(const_cast<const SubProblem *>(this)->getVariable(
288 tid, var_name, expected_var_type, expected_var_field_type));
289 }

◆ getVariable() [2/3]

const MooseVariableFieldBase & FEProblemBase::getVariable ( const THREAD_ID  tid,
const std::string &  var_name,
Moose::VarKindType  expected_var_type = Moose::VarKindType::VAR_ANY,
Moose::VarFieldType  expected_var_field_type = Moose::VarFieldType::VAR_FIELD_ANY 
) const
overridevirtual

Returns the variable reference for requested variable which must be of the expected_var_type (Nonlinear vs.

Auxiliary) and expected_var_field_type (standard, scalar, vector). The default values of VAR_ANY and VAR_FIELD_ANY should be used when "any" type of variable is acceptable. Throws an error if the variable in question is not in the expected System or of the expected type.

Implements SubProblem.

Definition at line 6559 of file FEProblemBase.C.

6563{
6564 return getVariableHelper(
6565 tid, var_name, expected_var_type, expected_var_field_type, _solver_systems, *_aux);
6566}
MooseVariableFieldBase & getVariableHelper(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &nls, const SystemBase &aux) const
Helper function called by getVariable that handles the logic for checking whether Variables of the re...

Referenced by addFVInitialCondition(), addInitialCondition(), EigenProblem::adjustEigenVector(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), MultiAppGeneralFieldNearestLocationTransfer::buildKDTrees(), MultiAppGeneralFieldShapeEvaluationTransfer::buildMeshFunctions(), CoupleableMooseVariableDependencyIntermediateInterface::coupledArrayValueByName(), CoupleableMooseVariableDependencyIntermediateInterface::coupledValueByName(), MultiAppGeometricInterpolationTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppUserObjectTransfer::execute(), NodalNormalsCorner::execute(), NodalNormalsEvaluator::execute(), NodalNormalsPreprocessor::execute(), FunctorNodalCorrector::FunctorNodalCorrector(), NEML2FEInterpolation::getMOOSEVariable(), LazyCoupleable::init(), AdvancedOutput::initAvailableLists(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppProjectionTransfer::initialSetup(), AdvancedOutput::initShowHideLists(), MultiApplibMeshToMFEMShapeEvaluationTransfer::interpolatelibMeshVariable(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), MultiAppProjectionTransfer::projectSolution(), MultiAppDofCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), and MultiAppMFEMTolibMeshShapeEvaluationTransfer::transferVariables().

◆ getVariable() [3/3]

virtual const MooseVariableFieldBase & SubProblem::getVariable ( const THREAD_ID  tid,
const std::string &  var_name,
Moose::VarKindType  expected_var_type = Moose::VarKindType::VAR_ANY,
Moose::VarFieldType  expected_var_field_type = Moose::VarFieldType::VAR_FIELD_ANY 
) const
virtual

Returns the variable reference for requested variable which must be of the expected_var_type (Nonlinear vs.

Auxiliary) and expected_var_field_type (standard, scalar, vector). The default values of VAR_ANY and VAR_FIELD_ANY should be used when "any" type of variable is acceptable. Throws an error if the variable in question is not in the expected System or of the expected type.

Implements SubProblem.

◆ getVariableHelper() [1/2]

template<typename T >
MooseVariableFieldBase & SubProblem::getVariableHelper ( const THREAD_ID  tid,
const std::string &  var_name,
Moose::VarKindType  expected_var_type,
Moose::VarFieldType  expected_var_field_type,
const std::vector< T > &  nls,
const SystemBase &  aux 
) const
protectedinherited

Helper function called by getVariable that handles the logic for checking whether Variables of the requested type are available.

Referenced by DisplacedProblem::getVariable(), and getVariable().

◆ getVariableHelper() [2/2]

template<typename T >
MooseVariableFEBase & SubProblem::getVariableHelper ( const THREAD_ID  tid,
const std::string &  var_name,
Moose::VarKindType  expected_var_type,
Moose::VarFieldType  expected_var_field_type,
const std::vector< T > &  systems,
const SystemBase &  aux 
) const
inherited

Definition at line 810 of file SubProblem.C.

816{
817 // Eventual return value
818 MooseVariableFEBase * var = nullptr;
819
820 const auto [var_in_sys, sys_num] = determineSolverSystem(var_name);
821
822 // First check that the variable is found on the expected system.
823 if (expected_var_type == Moose::VarKindType::VAR_ANY)
824 {
825 if (var_in_sys)
826 var = &(systems[sys_num]->getVariable(tid, var_name));
827 else if (aux.hasVariable(var_name))
828 var = &(aux.getVariable(tid, var_name));
829 else
830 mooseError("Unknown variable " + var_name);
831 }
832 else if (expected_var_type == Moose::VarKindType::VAR_SOLVER && var_in_sys &&
833 systems[sys_num]->hasVariable(var_name))
834 var = &(systems[sys_num]->getVariable(tid, var_name));
835 else if (expected_var_type == Moose::VarKindType::VAR_AUXILIARY && aux.hasVariable(var_name))
836 var = &(aux.getVariable(tid, var_name));
837 else
838 {
839 std::string expected_var_type_string =
840 (expected_var_type == Moose::VarKindType::VAR_SOLVER ? "nonlinear" : "auxiliary");
841 mooseError("No ",
842 expected_var_type_string,
843 " variable named ",
844 var_name,
845 " found. "
846 "Did you specify an auxiliary variable when you meant to specify a nonlinear "
847 "variable (or vice-versa)?");
848 }
849
850 // Now make sure the var found has the expected field type.
851 if ((expected_var_field_type == Moose::VarFieldType::VAR_FIELD_ANY) ||
852 (expected_var_field_type == var->fieldType()))
853 return *var;
854 else
855 {
856 std::string expected_var_field_type_string =
857 MooseUtils::toLower(Moose::stringify(expected_var_field_type));
858 std::string var_field_type_string = MooseUtils::toLower(Moose::stringify(var->fieldType()));
859
860 mooseError("No ",
861 expected_var_field_type_string,
862 " variable named ",
863 var_name,
864 " found. "
865 "Did you specify a ",
866 var_field_type_string,
867 " variable when you meant to specify a ",
868 expected_var_field_type_string,
869 " variable?");
870 }
871}
virtual Moose::VarFieldType fieldType() const =0
Field type of this variable.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const =0
virtual bool hasVariable(const std::string &var_name) const =0
Whether or not this problem has the variable.
std::string toLower(std::string name)
Convert supplied string to lower case.

◆ getVariableNames()

std::vector< VariableName > FEProblemBase::getVariableNames ( )
virtual

Returns a list of all the variables in the problem (both from the NL and Aux systems.

Definition at line 9644 of file FEProblemBase.C.

9645{
9646 std::vector<VariableName> names;
9647
9648 for (auto & sys : _solver_systems)
9649 {
9650 const std::vector<VariableName> & var_names = sys->getVariableNames();
9651 names.insert(names.end(), var_names.begin(), var_names.end());
9652 }
9653
9654 const std::vector<VariableName> & aux_var_names = _aux->getVariableNames();
9655 names.insert(names.end(), aux_var_names.begin(), aux_var_names.end());
9656
9657 return names;
9658}

Referenced by EigenProblem::adjustEigenVector(), AdvancedOutput::initAvailableLists(), and ElementSubdomainModifierBase::initialSetup().

◆ getVectorPostprocessorObjectByName()

const VectorPostprocessor & FEProblemBase::getVectorPostprocessorObjectByName ( const std::string &  object_name,
const THREAD_ID  tid = 0 
) const

Return the VPP object given the name.

Parameters
object_nameThe name of the VPP object
Returns
Desired VPP object

This is used by various output objects as well as the scatter value handling.

See also
CSV.C, XMLOutput.C, VectorPostprocessorInterface.C

Definition at line 5043 of file FEProblemBase.C.

5045{
5046 std::vector<VectorPostprocessor *> objs;
5047 theWarehouse()
5048 .query()
5050 .condition<AttribThread>(tid)
5051 .condition<AttribName>(object_name)
5052 .queryInto(objs);
5053
5054 if (objs.empty())
5055 {
5056 mooseAssert(
5057 getMooseApp().actionWarehouse().isTaskComplete("add_vector_postprocessor"),
5058 "A VectorPostprocessor getter was called before VectorPostprocessors have been "
5059 "constructed. The requested VectorPostprocessor '" +
5060 object_name +
5061 "' may exist in the input file, but VectorPostprocessors are not available yet.");
5062
5063 mooseError("Unable to find VectorPostprocessor with name '", object_name, "'");
5064 }
5065 mooseAssert(objs.size() == 1,
5066 "We shouldn't find more than one vector postprocessor object for a given name");
5067 return *(objs[0]);
5068}
@ VectorPostprocessor

Referenced by CombinedVectorPostprocessor::CombinedVectorPostprocessor(), VectorPostprocessorInterface::isVectorPostprocessorDistributedByName(), CSV::output(), and XMLOutput::outputVectorPostprocessors().

◆ getVectorPostprocessorValueByName()

const VectorPostprocessorValue & FEProblemBase::getVectorPostprocessorValueByName ( const std::string &  object_name,
const std::string &  vector_name,
std::size_t  t_index = 0 
) const

Get a read-only reference to the vector value associated with the VectorPostprocessor.

Parameters
object_nameThe name of the VPP object.
vector_nameThe namve of the decalred vector within the object.
Returns
Referent to the vector of data.

Note: This method is only for retrieving values that already exist, the VectorPostprocessor and VectorPostprocessorInterface objects should be used rather than this method for creating and getting values within objects.

Definition at line 5024 of file FEProblemBase.C.

5027{
5029 VectorPostprocessorReporterName(object_name, vector_name), t_index);
5030}
std::vector< Real > VectorPostprocessorValue
Definition MooseTypes.h:231
A ReporterName that represents a VectorPostprocessor.

Referenced by HistogramVectorPostprocessor::execute().

◆ getVectorTag()

const VectorTag & SubProblem::getVectorTag ( const TagID  tag_id) const
virtualinherited

Get a VectorTag from a TagID.

Reimplemented in DisplacedProblem.

Definition at line 153 of file SubProblem.C.

154{
155 mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
156
157 if (!vectorTagExists(tag_id))
158 mooseError("Vector tag with ID ", tag_id, " does not exist");
159
160 return _vector_tags[tag_id];
161}

Referenced by addCachedResidualDirectly(), Assembly::cacheResidual(), Assembly::cacheResidualNodes(), DisplacedProblem::getVectorTag(), SubProblem::getVectorTags(), TaggingInterface::prepareVectorTagInternal(), TaggingInterface::prepareVectorTagLower(), TaggingInterface::prepareVectorTagNeighbor(), setResidual(), and setResidualNeighbor().

◆ getVectorTagID()

TagID SubProblem::getVectorTagID ( const TagName &  tag_name) const
virtualinherited

Get a TagID from a TagName.

Reimplemented in DisplacedProblem.

Definition at line 195 of file SubProblem.C.

196{
197 mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
198
199 const auto tag_name_upper = MooseUtils::toUpper(tag_name);
200 const auto search = _vector_tags_name_map.find(tag_name_upper);
201 if (search != _vector_tags_name_map.end())
202 return search->second;
203
204 std::string message =
205 tag_name_upper == "TIME"
206 ? ".\n\nThis may occur if "
207 "you have a TimeKernel in your problem but did not specify a transient executioner."
208 : "";
209 mooseError("Vector tag '", tag_name_upper, "' does not exist", message);
210}

Referenced by Coupleable::coupledVectorTagArrayGradient(), Coupleable::coupledVectorTagArrayGradients(), Coupleable::coupledVectorTagArrayValues(), Coupleable::coupledVectorTagDofValues(), Coupleable::coupledVectorTagGradient(), Coupleable::coupledVectorTagGradients(), ScalarCoupleable::coupledVectorTagScalarValue(), Coupleable::coupledVectorTagValues(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), DisplacedProblem::getVectorTagID(), MooseVariableDataBase< OutputType >::MooseVariableDataBase(), ReferenceResidualConvergence::ReferenceResidualConvergence(), SolverSystem::setSolution(), TaggingInterface::TaggingInterface(), TagVectorAux::TagVectorAux(), MultiAppDofCopyTransfer::transfer(), TaggingInterface::useVectorTag(), Coupleable::vectorTagDofValueHelper(), and Coupleable::vectorTagValueHelper().

◆ getVectorTags() [1/2]

const std::vector< VectorTag > & SubProblem::getVectorTags ( const Moose::VectorTagType  type = Moose::VECTOR_TAG_ANY) const
virtualinherited

Return all vector tags, where a tag is represented by a map from name to ID.

Can optionally be limited to a vector tag type.

Reimplemented in DisplacedProblem.

Definition at line 176 of file SubProblem.C.

177{
178 mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
179
181 return _vector_tags;
182 else
183 return _typed_vector_tags[type];
184}

◆ getVectorTags() [2/2]

std::vector< VectorTag > SubProblem::getVectorTags ( const std::set< TagID > &  tag_ids) const
inherited

Definition at line 164 of file SubProblem.C.

165{
166 mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
167
168 std::vector<VectorTag> tags;
169 tags.reserve(tag_ids.size());
170 for (const auto & tag_id : tag_ids)
171 tags.push_back(getVectorTag(tag_id));
172 return tags;
173}

Referenced by computeLinearSystemSys(), NonlinearSystemBase::computeNodalBCsResidual(), EigenProblem::computeResidualAB(), computeResidualAndJacobian(), EigenProblem::computeResidualTag(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), DisplacedProblem::getVectorTags(), SubProblem::numVectorTags(), ComputeMortarFunctor::operator()(), and setCurrentResidualVectorTags().

◆ getVectorVariable()

VectorMooseVariable & FEProblemBase::getVectorVariable ( const THREAD_ID  tid,
const std::string &  var_name 
)
overridevirtual

Returns the variable reference for requested VectorMooseVariable which may be in any system.

Implements SubProblem.

Definition at line 6593 of file FEProblemBase.C.

6594{
6595 for (auto & sys : _solver_systems)
6596 if (sys->hasVariable(var_name))
6597 return sys->getFieldVariable<RealVectorValue>(tid, var_name);
6598 if (_aux->hasVariable(var_name))
6599 return _aux->getFieldVariable<RealVectorValue>(tid, var_name);
6600
6601 mooseError("Unknown variable " + var_name);
6602}
VectorValue< Real > RealVectorValue
Definition SubProblem.h:34

◆ getXFEM()

std::shared_ptr< XFEMInterface > FEProblemBase::getXFEM ( )
inline

Get a pointer to the XFEM controller object.

Definition at line 2206 of file FEProblemBase.h.

2206{ return _xfem; }
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.

◆ ghostedElems()

virtual std::set< dof_id_type > & SubProblem::ghostedElems ( )
inlinevirtualinherited

Return the list of elements that should have their DoFs ghosted to this processor.

Returns
The list

Reimplemented in DisplacedProblem.

Definition at line 683 of file SubProblem.h.

683{ return _ghosted_elems; }

Referenced by SystemBase::augmentSendList(), NearestNodeLocator::findNodes(), DisplacedProblem::ghostedElems(), and NearestNodeLocator::updatePatch().

◆ ghostGhostedBoundaries()

void FEProblemBase::ghostGhostedBoundaries ( )
overridevirtual

Causes the boundaries added using addGhostedBoundary to actually be ghosted.

Implements SubProblem.

Definition at line 2343 of file FEProblemBase.C.

2344{
2345 TIME_SECTION("ghostGhostedBoundaries", 3, "Ghosting Ghosted Boundaries");
2346
2348
2351}
void ghostGhostedBoundaries()
Actually do the ghosting of boundaries that need to be ghosted to this processor.
Definition MooseMesh.C:3378

Referenced by DisplacedProblem::ghostGhostedBoundaries(), init(), and meshChanged().

◆ handleException()

void FEProblemBase::handleException ( const std::string &  calling_method)
private

Handle exceptions.

Note that the result of this call will be a thrown MooseException. The caller of this method must determine how to handle the thrown exception

Definition at line 8049 of file FEProblemBase.C.

8050{
8051 auto create_exception_message =
8052 [&calling_method](const std::string & exception_type, const auto & exception)
8053 {
8054 return std::string("A " + exception_type + " was raised during FEProblemBase::" +
8055 calling_method + "\n" + std::string(exception.what()));
8056 };
8057
8058 try
8059 {
8060 throw;
8061 }
8062 catch (const MooseException & e)
8063 {
8064 setException(create_exception_message("MooseException", e));
8065 }
8066 catch (const MetaPhysicL::LogicError & e)
8067 {
8069 }
8070 catch (const libMesh::PetscSolverException & e)
8071 {
8072 // One PETSc solver exception that we cannot currently recover from are new nonzero errors. In
8073 // particular I have observed the following scenario in a parallel test:
8074 // - Both processes throw because of a new nonzero during MOOSE's computeJacobianTags
8075 // - We potentially handle the exceptions nicely here
8076 // - When the matrix is closed in libMesh's libmesh_petsc_snes_solver, there is a new nonzero
8077 // throw which we do not catch here in MOOSE and the simulation terminates. This only appears
8078 // in parallel (and not all the time; a test I was examining threw with distributed mesh, but
8079 // not with replicated). In serial there are no new throws from libmesh_petsc_snes_solver.
8080 // So for uniformity of behavior across serial/parallel, we will choose to abort here and always
8081 // produce a non-zero exit code
8082 mooseError(create_exception_message("libMesh::PetscSolverException", e));
8083 }
8084 catch (const std::exception & e)
8085 {
8086 // This might be libMesh detecting a degenerate Jacobian or matrix
8087 if (strstr(e.what(), "Jacobian") || strstr(e.what(), "singular") ||
8088 strstr(e.what(), "det != 0"))
8089 setException(create_exception_message("libMesh DegenerateMap", e));
8090 else
8091 {
8092 const auto message = create_exception_message("std::exception", e);
8094 mooseError(message);
8095 else
8096 setException(message);
8097 }
8098 }
8099
8101}
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class,...
void translateMetaPhysicLError(const MetaPhysicL::LogicError &)
emit a relatively clear error message when we catch a MetaPhysicL logic error
Definition MooseError.C:153

Referenced by computeBounds(), computeJacobianTags(), computeResidualAndJacobian(), computeResidualTags(), and computeUserObjectsInternal().

◆ hasActiveElementalMooseVariables()

bool SubProblem::hasActiveElementalMooseVariables ( const THREAD_ID  tid) const
virtualinherited

Whether or not a list of active elemental moose variables has been set.

Returns
True if there has been a list of active elemental moose variables set, False otherwise

Definition at line 452 of file SubProblem.C.

453{
455}
std::vector< unsigned int > _has_active_elemental_moose_variables
Whether or not there is currently a list of active elemental moose variables.

Referenced by SystemBase::prepare(), SystemBase::prepareFace(), and SystemBase::reinitElem().

◆ hasActiveMaterialProperties()

bool FEProblemBase::hasActiveMaterialProperties ( const THREAD_ID  tid) const

Method to check whether or not a list of active material roperties has been set.

This method is called by reinitMaterials to determine whether Material computeProperties methods need to be called. If the return is False, this check prevents unnecessary material property computation

Parameters
tidThe thread id
Returns
True if there has been a list of active material properties set, False otherwise

Definition at line 6767 of file FEProblemBase.C.

6768{
6770}

Referenced by ComputeMarkerThread::onElement(), reinitMaterials(), reinitMaterialsBoundary(), reinitMaterialsFace(), reinitMaterialsFaceOnBoundary(), reinitMaterialsInterface(), reinitMaterialsNeighbor(), and reinitMaterialsNeighborOnBoundary().

◆ hasAuxiliaryVariable()

bool SubProblem::hasAuxiliaryVariable ( const std::string &  var_name) const
virtualinherited

◆ hasBase()

bool MooseBase::hasBase ( ) const
inlineinherited
Returns
Whether or not this object has a registered base (set via InputParameters::registerBase())

Definition at line 142 of file MooseBase.h.

142{ return _pars.hasBase(); }
bool hasBase() const

◆ hasBlockMaterialProperty()

bool SubProblem::hasBlockMaterialProperty ( SubdomainID  block_id,
const std::string &  prop_name 
)
virtualinherited

Check if a material property is defined on a block.

Definition at line 503 of file SubProblem.C.

504{
505 auto it = _map_block_material_props.find(bid);
506 if (it == _map_block_material_props.end())
507 return false;
508
509 if (it->second.count(prop_name) > 0)
510 return true;
511 else
512 return false;
513}

◆ hasBoundaryMaterialProperty()

bool SubProblem::hasBoundaryMaterialProperty ( BoundaryID  boundary_id,
const std::string &  prop_name 
)
virtualinherited

Check if a material property is defined on a block.

Definition at line 562 of file SubProblem.C.

563{
564 auto it = _map_boundary_material_props.find(bid);
565 if (it == _map_boundary_material_props.end())
566 return false;
567
568 if (it->second.count(prop_name) > 0)
569 return true;
570 else
571 return false;
572}

◆ hasConvergence()

bool FEProblemBase::hasConvergence ( const std::string &  name,
const THREAD_ID  tid = 0 
) const
virtual

Returns true if the problem has a Convergence object of the given name.

Definition at line 2848 of file FEProblemBase.C.

2849{
2850 return _convergences.hasActiveObject(name, tid);
2851}
bool hasActiveObject(const std::string &name, THREAD_ID tid=0) const
Convenience functions for checking/getting specific objects.

Referenced by ParsedConvergence::initializeSymbols().

◆ hasDampers()

bool FEProblemBase::hasDampers ( )
inline

Whether or not this system has dampers.

Definition at line 1676 of file FEProblemBase.h.

1676{ return _has_dampers; }

Referenced by NonlinearSystemBase::preInit(), and NonlinearSystem::solve().

◆ hasDistribution()

bool FEProblemBase::hasDistribution ( const std::string &  name) const
virtual

Definition at line 2924 of file FEProblemBase.C.

2925{
2926 std::vector<Distribution *> objs;
2927 theWarehouse()
2928 .query()
2929 .condition<AttribSystem>("Distribution")
2930 .condition<AttribName>(name)
2931 .queryInto(objs);
2932 return !objs.empty();
2933}

◆ hasException()

virtual bool FEProblemBase::hasException ( )
inlinevirtual

Whether or not an exception has occurred.

Definition at line 535 of file FEProblemBase.h.

535{ return _has_exception; }

Referenced by NonlinearSystem::converged(), ThreadedNodeLoop< RangeType, IteratorType >::keepGoing(), and ThreadedElementLoop< RangeType >::keepGoing().

◆ hasFunction()

bool FEProblemBase::hasFunction ( const std::string &  name,
const THREAD_ID  tid = 0 
)
virtual

◆ hasFunctor()

bool SubProblem::hasFunctor ( const std::string &  name,
const THREAD_ID  tid 
) const
inherited

checks whether we have a functor corresponding to name on the thread id tid

Definition at line 1275 of file SubProblem.C.

1276{
1277 mooseAssert(tid < _functors.size(), "Too large a thread ID");
1278 auto & functors = _functors[tid];
1279 return (functors.find("wraps_" + name) != functors.end());
1280}

Referenced by DiffusionCG::addFEKernels(), and FunctorInterface::isFunctor().

◆ hasFunctorWithType()

template<typename T >
bool SubProblem::hasFunctorWithType ( const std::string &  name,
const THREAD_ID  tid 
) const
inherited

checks whether we have a functor of type T corresponding to name on the thread id tid

Definition at line 1316 of file SubProblem.h.

1317{
1318 mooseAssert(tid < _functors.size(), "Too large a thread ID");
1319 auto & functors = _functors[tid];
1320
1321 const auto & it = functors.find("wraps_" + name);
1322 constexpr bool requested_functor_is_ad =
1323 !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1324
1325 if (it == functors.end())
1326 return false;
1327 else
1328 return dynamic_cast<Moose::Functor<T> *>(
1329 requested_functor_is_ad ? std::get<2>(it->second).get() : std::get<1>(it->second).get());
1330}

◆ hasFVGradientMethod()

bool FEProblemBase::hasFVGradientMethod ( const GradientMethodName &  name) const

Check if an FV gradient method with a given name exists.

Definition at line 4887 of file FEProblemBase.C.

4888{
4889 std::vector<FVGradientMethod *> methods;
4890 theWarehouse()
4891 .query()
4892 .condition<AttribSystem>("FVGradientMethod")
4893 .condition<AttribThread>(0)
4894 .condition<AttribName>(name)
4895 .queryInto(methods);
4896 return !methods.empty();
4897}

◆ hasFVInterpolationMethod()

bool FEProblemBase::hasFVInterpolationMethod ( const InterpolationMethodName &  name) const

Check if an FV interpolation method with a given name exists.

Definition at line 4961 of file FEProblemBase.C.

4962{
4963 std::vector<FVInterpolationMethod *> methods;
4964 theWarehouse()
4965 .query()
4966 .condition<AttribSystem>("FVInterpolationMethod")
4967 .condition<AttribThread>(0)
4968 .condition<AttribName>(name)
4969 .queryInto(methods);
4970 return !methods.empty();
4971}

Referenced by FVInterpolationMethodInterface::hasFVInterpolationMethod().

◆ hasInitialAdaptivity() [1/2]

bool FEProblemBase::hasInitialAdaptivity ( ) const
inline

Return a Boolean indicating whether initial AMR is turned on.

Definition at line 2194 of file FEProblemBase.h.

2194{ return _adaptivity.getInitialSteps() > 0; }
unsigned int getInitialSteps() const
Pull out the number of initial steps previously set by calling init()
Definition Adaptivity.h:112

◆ hasInitialAdaptivity() [2/2]

bool FEProblemBase::hasInitialAdaptivity ( ) const
inline

Return a Boolean indicating whether initial AMR is turned on.

Definition at line 2199 of file FEProblemBase.h.

2199{ return false; }

◆ hasJacobian()

bool FEProblemBase::hasJacobian ( ) const

Returns _has_jacobian.

Definition at line 9859 of file FEProblemBase.C.

9860{
9861 return _has_jacobian;
9862}

Referenced by DisplacedProblem::prepare().

◆ hasKokkosFunction()

virtual bool FEProblemBase::hasKokkosFunction ( const std::string &  name) const
virtual

Get whether a Kokkos function exists.

Parameters
nameThe Kokkos function name
Returns
Whether a Kokkos function exists

Referenced by getKokkosFunction().

◆ hasKokkosObjects()

bool FEProblemBase::hasKokkosObjects ( ) const
inline
Returns
whether any Kokkos object was added in the problem

Definition at line 3078 of file FEProblemBase.h.

3078{ return _has_kokkos_objects; }
bool _has_kokkos_objects
Whether we have any Kokkos objects.

Referenced by MooseMesh::update().

◆ hasKokkosResidualObjects()

bool FEProblemBase::hasKokkosResidualObjects ( ) const
inline

◆ hasKokkosUserObject()

bool FEProblemBase::hasKokkosUserObject ( const std::string &  name) const

Check if there if a Kokkos user object of given name.

Parameters
nameThe name of the Kokkos user object being checked for
Returns
true if the Kokkos user object exists, false otherwise

Referenced by checkUserObjectNameCollision(), UserObjectInterface::getUserObjectFromFEProblem(), and UserObjectInterface::hasUserObjectByName().

◆ hasLinearConvergenceObjects()

bool FEProblemBase::hasLinearConvergenceObjects ( ) const

Whether we have linear convergence objects.

Definition at line 10193 of file FEProblemBase.C.

10194{
10195 // If false,this means we have not set one, not that we are querying this too early
10196 // TODO: once there is a default linear CV object, error on the 'not set' case
10197 return _linear_convergence_names.has_value();
10198}

Referenced by Moose::PetscSupport::petscSetDefaults().

◆ hasLinearVariable()

bool SubProblem::hasLinearVariable ( const std::string &  var_name) const
virtualinherited

Whether or not this problem has this linear variable.

Definition at line 794 of file SubProblem.C.

795{
796 for (const auto i : make_range(numLinearSystems()))
797 if (systemBaseLinear(i).hasVariable(var_name))
798 return true;
799 return false;
800}
virtual std::size_t numLinearSystems() const =0
virtual const SystemBase & systemBaseLinear(const unsigned int sys_num) const =0
Return the linear system object as a base class reference given the system number.

Referenced by SubProblem::getFunctor().

◆ hasMortarCoupling()

virtual bool FEProblemBase::hasMortarCoupling ( ) const
inlinevirtual

Whether the simulation has mortar coupling.

Definition at line 2767 of file FEProblemBase.h.

2767{ return _has_mortar; }

◆ hasMultiApp()

bool FEProblemBase::hasMultiApp ( const std::string &  name) const

Definition at line 5970 of file FEProblemBase.C.

5971{
5972 return _multi_apps.hasActiveObject(multi_app_name);
5973}

Referenced by getMultiApp().

◆ hasMultiApps() [1/2]

bool FEProblemBase::hasMultiApps ( ) const
inline

◆ hasMultiApps() [2/2]

bool FEProblemBase::hasMultiApps ( ExecFlagType  type) const

Definition at line 5964 of file FEProblemBase.C.

5965{
5967}

◆ hasNeighborCoupling()

virtual bool FEProblemBase::hasNeighborCoupling ( ) const
inlinevirtual

Whether the simulation has neighbor coupling.

Definition at line 2762 of file FEProblemBase.h.

◆ hasNonlocalCoupling()

virtual bool FEProblemBase::hasNonlocalCoupling ( ) const
inlineoverridevirtual

Whether the simulation has active nonlocal coupling which should be accounted for in the Jacobian.

For this to return true, there must be at least one active nonlocal kernel or boundary condition

Implements SubProblem.

Definition at line 3033 of file FEProblemBase.h.

3033{ return _has_nonlocal_coupling; }

Referenced by DisplacedProblem::hasNonlocalCoupling().

◆ hasPostprocessor()

bool FEProblemBase::hasPostprocessor ( const std::string &  name) const

Deprecated.

Use hasPostprocessorValueByName

Definition at line 5016 of file FEProblemBase.C.

5017{
5018 mooseDeprecated("FEProblemBase::hasPostprocssor is being removed; use "
5019 "hasPostprocessorValueByName instead.");
5021}
bool hasPostprocessorValueByName(const PostprocessorName &name) const
Whether or not a Postprocessor value exists by a given name.

Referenced by GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl().

◆ hasPostprocessorValueByName()

bool FEProblemBase::hasPostprocessorValueByName ( const PostprocessorName &  name) const

Whether or not a Postprocessor value exists by a given name.

Parameters
nameThe name of the Postprocessor
Returns
True if a Postprocessor value exists

Note: You should prioritize the use of PostprocessorInterface::hasPostprocessor and PostprocessorInterface::hasPostprocessorByName over this method when possible.

Definition at line 4974 of file FEProblemBase.C.

4975{
4977}
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.

Referenced by DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), FunctorExtremaPositions::FunctorExtremaPositions(), hasPostprocessor(), MooseParsedFunction::initialSetup(), and FunctorIC::value().

◆ hasScalarVariable()

bool FEProblemBase::hasScalarVariable ( const std::string &  var_name) const
overridevirtual

Returns a Boolean indicating whether any system contains a variable with the name provided.

Implements SubProblem.

Definition at line 6617 of file FEProblemBase.C.

6618{
6619 for (auto & sys : _solver_systems)
6620 if (sys->hasScalarVariable(var_name))
6621 return true;
6622 if (_aux->hasScalarVariable(var_name))
6623 return true;
6624
6625 return false;
6626}

Referenced by addInitialCondition(), addObjectParamsHelper(), EigenProblem::adjustEigenVector(), checkDuplicatePostprocessorVariableNames(), AdvancedOutput::initAvailableLists(), MooseParsedFunctionWrapper::initialize(), ChainControlParsedFunctionWrapper::initializeFunctionInputs(), MooseParsedFunction::initialSetup(), AdvancedOutput::initShowHideLists(), and Split::setup().

◆ hasSetMultiAppFixedPointConvergenceName()

bool FEProblemBase::hasSetMultiAppFixedPointConvergenceName ( ) const
inline

Returns true if the problem has set the fixed point convergence name.

Definition at line 793 of file FEProblemBase.h.

794 {
796 }

◆ hasSetSteadyStateConvergenceName()

bool FEProblemBase::hasSetSteadyStateConvergenceName ( ) const
inline

Returns true if the problem has set the steady-state detection convergence name.

Definition at line 798 of file FEProblemBase.h.

799 {
800 return _steady_state_convergence_name.has_value();
801 }

◆ hasSolutionState()

bool FEProblemBase::hasSolutionState ( unsigned int  state,
Moose::SolutionIterationType  iteration_type 
) const

Whether we need up to old (1) or older (2) solution states for a given type of iteration.

Parameters
oldest_neededoldest solution state needed
iteration_typethe type of iteration for which old/older states are needed

Definition at line 812 of file FEProblemBase.C.

814{
815 bool has_solution_state = false;
816 for (auto & sys : _solver_systems)
817 has_solution_state |= sys->hasSolutionState(state, iteration_type);
818 has_solution_state |= _aux->hasSolutionState(state, iteration_type);
819 return has_solution_state;
820}
bool hasSolutionState(unsigned int state, Moose::SolutionIterationType iteration_type) const
Whether we need up to old (1) or older (2) solution states for a given type of iteration.

◆ hasSolverVariable()

bool FEProblemBase::hasSolverVariable ( const std::string &  var_name) const

Definition at line 6549 of file FEProblemBase.C.

6550{
6551 for (auto & sys : _solver_systems)
6552 if (sys->hasVariable(var_name))
6553 return true;
6554
6555 return false;
6556}

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

◆ hasTimeIntegrator()

bool FEProblemBase::hasTimeIntegrator ( ) const
inline

Returns whether or not this Problem has a TimeIntegrator.

Definition at line 2491 of file FEProblemBase.h.

2491{ return _has_time_integrator; }

Referenced by TransientBase::setupTimeIntegrator().

◆ hasUOAuxStateCheck()

bool FEProblemBase::hasUOAuxStateCheck ( ) const
inline

Whether or not MOOSE will perform a user object/auxiliary kernel state check.

Definition at line 221 of file FEProblemBase.h.

221{ return _uo_aux_state_check; }

◆ hasUserObject()

bool FEProblemBase::hasUserObject ( const std::string &  name) const

Check if there if a user object of given name.

Parameters
nameThe name of the user object being checked for
Returns
true if the user object exists, false otherwise

Definition at line 4849 of file FEProblemBase.C.

4850{
4851 std::vector<UserObject *> objs;
4852 theWarehouse()
4853 .query()
4854 .condition<AttribSystem>("UserObject")
4855 .condition<AttribThread>(0)
4856 .condition<AttribName>(name)
4857 .queryInto(objs);
4858 return !objs.empty();
4859}

Referenced by checkUserObjectNameCollision(), DistributedPositions::DistributedPositions(), MultiAppGeneralFieldFunctorTransfer::execute(), UserObjectInterface::getUserObjectFromFEProblem(), UserObjectInterface::hasUserObjectByName(), ReporterTransferInterface::hideVariableHelper(), ParsedDownSelectionPositions::initialize(), and TransformedPositions::TransformedPositions().

◆ hasVariable()

bool FEProblemBase::hasVariable ( const std::string &  var_name) const
overridevirtual

◆ haveADObjects() [1/3]

bool SubProblem::haveADObjects ( ) const
inline

Method for reading wehther we have any ad objects.

Definition at line 782 of file SubProblem.h.

782{ return _have_ad_objects; }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.

Referenced by computeJacobianTags(), computeResidualAndJacobian(), and init().

◆ haveADObjects() [2/3]

virtual void SubProblem::haveADObjects ( bool  have_ad_objects)
inlinevirtual

Method for setting whether we have any ad objects.

Reimplemented from SubProblem.

Definition at line 778 of file SubProblem.h.

778{ _have_ad_objects = have_ad_objects; }

◆ haveADObjects() [3/3]

void FEProblemBase::haveADObjects ( bool  have_ad_objects)
overridevirtual

Method for setting whether we have any ad objects.

Reimplemented from SubProblem.

Definition at line 9927 of file FEProblemBase.C.

9928{
9929 _have_ad_objects = have_ad_objects;
9931 _displaced_problem->SubProblem::haveADObjects(have_ad_objects);
9932}

◆ haveDisplaced()

bool FEProblemBase::haveDisplaced ( ) const
inlinefinaloverridevirtual

Whether we have a displaced problem in our simulation.

Implements SubProblem.

Definition at line 2867 of file FEProblemBase.h.

2867{ return _displaced_problem.get(); }

◆ haveFV()

virtual bool FEProblemBase::haveFV ( ) const
inlineoverridevirtual

◆ haveXFEM()

bool FEProblemBase::haveXFEM ( )
inline

Find out whether the current analysis is using XFEM.

Definition at line 2209 of file FEProblemBase.h.

2209{ return _xfem != nullptr; }

Referenced by FixedPointSolve::solveStep(), TransientBase::takeStep(), and updateMeshXFEM().

◆ identifyVariableGroupsInNL()

bool FEProblemBase::identifyVariableGroupsInNL ( ) const
inline

Whether to identify variable groups in nonlinear systems.

This affects dof ordering

Definition at line 3038 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::NonlinearSystemBase().

◆ ignoreZerosInJacobian()

bool FEProblemBase::ignoreZerosInJacobian ( ) const
inline

Will return true if zeros in the Jacobian are to be dropped from the sparsity pattern.

Note that this can make preserving the matrix sparsity pattern impossible.

Definition at line 2463 of file FEProblemBase.h.

2463{ return _ignore_zeros_in_jacobian; }

Referenced by NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), and NonlinearSystemBase::constraintJacobians().

◆ immediatelyPrintInvalidSolution()

bool FEProblemBase::immediatelyPrintInvalidSolution ( ) const
inline

Whether or not the solution invalid warnings are printed out immediately.

Definition at line 2488 of file FEProblemBase.h.

Referenced by SolutionInvalidInterface::flagInvalidSolutionInternal().

◆ incrementMultiAppTStep()

void FEProblemBase::incrementMultiAppTStep ( ExecFlagType  type)

Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType.

Definition at line 6368 of file FEProblemBase.C.

6369{
6370 const auto & multi_apps = _multi_apps[type].getActiveObjects();
6371
6372 if (multi_apps.size())
6373 for (const auto & multi_app : multi_apps)
6374 multi_app->incrementTStep(_time);
6375}

Referenced by TransientBase::incrementStepOrReject().

◆ init()

void FEProblemBase::init ( )
overridevirtual

Implements Problem.

Reimplemented in EigenProblem, and FEProblem.

Definition at line 7047 of file FEProblemBase.C.

7048{
7049 if (_initialized)
7050 return;
7051
7052 TIME_SECTION("init", 2, "Initializing");
7053
7054 // call executioner's preProblemInit so that it can do some setups before problem init
7056
7057 // If we have AD and we are doing global AD indexing, then we should by default set the matrix
7058 // coupling to full. If the user has told us to trust their coupling matrix, then this call will
7059 // not do anything
7062
7063 for (const auto i : index_range(_nl))
7064 {
7065 auto & nl = _nl[i];
7066 auto & cm = _cm[i];
7067
7068 unsigned int n_vars = nl->nVariables();
7069 {
7070 TIME_SECTION("fillCouplingMatrix", 3, "Filling Coupling Matrix");
7071
7072 switch (_coupling)
7073 {
7075 cm = std::make_unique<CouplingMatrix>(n_vars);
7076 for (unsigned int i = 0; i < n_vars; i++)
7077 (*cm)(i, i) = 1;
7078 break;
7079
7080 // for full jacobian
7082 cm = std::make_unique<CouplingMatrix>(n_vars);
7083 for (unsigned int i = 0; i < n_vars; i++)
7084 for (unsigned int j = 0; j < n_vars; j++)
7085 (*cm)(i, j) = 1;
7086 break;
7087
7089 // do nothing, _cm was already set through couplingMatrix() call
7090 break;
7091 }
7092 }
7093
7094 nl->dofMap()._dof_coupling = cm.get();
7095
7096 // If there are no variables, make sure to pass a nullptr coupling
7097 // matrix, to avoid warnings about non-nullptr yet empty
7098 // CouplingMatrices.
7099 if (n_vars == 0)
7100 nl->dofMap()._dof_coupling = nullptr;
7101
7102 nl->dofMap().attach_extra_sparsity_function(&extraSparsity, nl.get());
7103 nl->dofMap().attach_extra_send_list_function(&extraSendList, nl.get());
7104 _aux->dofMap().attach_extra_send_list_function(&extraSendList, _aux.get());
7105
7106 if (!_skip_nl_system_check && _solve && n_vars == 0)
7107 mooseError("No variables specified in nonlinear system '", nl->name(), "'.");
7108 }
7109
7110 ghostGhostedBoundaries(); // We do this again right here in case new boundaries have been added
7111
7112 // We may have added element/nodes to the mesh in ghostGhostedBoundaries so we need to update
7113 // all of our mesh information. We need to make sure that mesh information is up-to-date before
7114 // EquationSystems::init because that will call through to updateGeomSearch (for sparsity
7115 // augmentation) and if we haven't added back boundary node information before that latter call,
7116 // then we're screwed. We'll get things like "Unable to find closest node!"
7120
7121 if (_mesh.doingPRefinement())
7122 {
7125 _displaced_problem->preparePRefinement();
7126 }
7127
7128 // do not assemble system matrix for JFNK solve
7129 for (auto & nl : _nl)
7130 if (solverParams(nl->number())._type == Moose::ST_JFNK)
7131 nl->turnOffJacobian();
7132
7133 for (auto & sys : _solver_systems)
7134 sys->preInit();
7135 _aux->preInit();
7136
7137 // Build the mortar segment meshes, if they haven't been already, for a couple reasons:
7138 // 1) Get the ghosting correct for both static and dynamic meshes
7139 // 2) Make sure the mortar mesh is built for mortar constraints that live on the static mesh
7140 //
7141 // It is worth-while to note that mortar meshes that live on a dynamic mesh will be built
7142 // during residual and Jacobian evaluation because when displacements are solution variables
7143 // the mortar mesh will move and change during the course of a non-linear solve. We DO NOT
7144 // redo ghosting during non-linear solve, so for purpose 1) the below call has to be made
7145 if (!_mortar_data->initialized())
7147
7148 {
7149 TIME_SECTION("EquationSystems::Init", 2, "Initializing Equation Systems");
7150 es().init();
7151 }
7152
7153 for (auto & sys : _solver_systems)
7154 sys->postInit();
7155 _aux->postInit();
7156
7157 // Now that the equation system and the dof distribution is done, we can generate the
7158 // finite volume-related parts if needed.
7159 if (haveFV())
7161
7162 for (auto & sys : _solver_systems)
7163 sys->update();
7164 _aux->update();
7165
7166 for (THREAD_ID tid = 0; tid < numThreads(); ++tid)
7167 for (const auto i : index_range(_nl))
7168 {
7169 mooseAssert(
7170 _cm[i],
7171 "Coupling matrix not set for system "
7172 << i
7173 << ". This should only happen if a preconditioner was not setup for this system");
7174 _assembly[tid][i]->init(_cm[i].get());
7175 }
7176
7178 _displaced_problem->init();
7179
7180#ifdef MOOSE_KOKKOS_ENABLED
7182 initKokkos();
7183#endif
7184
7185 _initialized = true;
7186}
void extraSendList(std::vector< dof_id_type > &send_list, void *context)
///< Type of coordinate system
Definition SystemBase.C:38
void extraSparsity(libMesh::SparsityPattern::Graph &sparsity, std::vector< dof_id_type > &n_nz, std::vector< dof_id_type > &n_oz, void *context)
Free function used for a libMesh callback.
Definition SystemBase.C:46
virtual void preProblemInit()
Perform initializations during executing actions right before init_problem task.
Definition Executioner.h:57
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
void setCoupling(Moose::CouplingType type)
Set the coupling between variables TODO: allow user-defined coupling.
SolverParams & solverParams(unsigned int solver_sys_num=0)
Get the solver parameters.
void initKokkos()
Construct Kokkos assembly and systems and allocate Kokkos material property storages.
virtual void ghostGhostedBoundaries() override
Causes the boundaries added using addGhostedBoundary to actually be ghosted.
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition MooseApp.C:2024
const std::string & _type
The type of this class.
Definition MooseBase.h:378
void setupFiniteVolumeMeshData() const
Sets up the additional data needed for finite volume computations.
Definition MooseMesh.C:4156
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
Definition MooseMesh.C:894
void preparePRefinement()
Prepare DofMap and Assembly classes with our p-refinement information.
@ ST_JFNK
Jacobian-Free Newton Krylov.
Definition MooseTypes.h:899
@ COUPLING_FULL
Definition MooseTypes.h:787
@ COUPLING_CUSTOM
Definition MooseTypes.h:788
bool globalADIndexing()
Whether we are using global AD indexing.
Definition ADUtils.h:28

Referenced by EigenProblem::init(), and FEProblem::init().

◆ initElementStatefulProps()

void FEProblemBase::initElementStatefulProps ( const libMesh::ConstElemRange &  elem_range,
const bool  threaded 
)

Initialize stateful properties for elements in a specific elem_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step.

Definition at line 9227 of file FEProblemBase.C.

9228{
9231 if (threaded)
9232 Threads::parallel_reduce(elem_range, cmt, numThreads());
9233 else
9234 cmt(elem_range, true);
9235
9236#ifdef MOOSE_KOKKOS_ENABLED
9239#endif
9240}
void initKokkosStatefulProps()

Referenced by ActivateElementsUserObjectBase::finalize(), and ElementSubdomainModifierBase::initElementStatefulProps().

◆ initialAdaptMesh()

void FEProblemBase::initialAdaptMesh ( )
virtual

Definition at line 8887 of file FEProblemBase.C.

8888{
8889 unsigned int n = adaptivity().getInitialSteps();
8891 if (n)
8892 {
8893 if (!_mesh.interiorLowerDBlocks().empty() || !_mesh.boundaryLowerDBlocks().empty())
8894 mooseError("HFEM does not support mesh adaptivity currently.");
8895
8896 TIME_SECTION("initialAdaptMesh", 2, "Performing Initial Adaptivity");
8897
8898 for (unsigned int i = 0; i < n; i++)
8899 {
8902
8904 {
8906 /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
8907
8908 // reproject the initial condition
8910
8912 }
8913 else
8914 {
8915 _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
8916 return;
8917 }
8918 }
8919 }
8920}
bool initialAdaptMesh()
Used during initial adaptivity.
Definition Adaptivity.C:295
Adaptivity & adaptivity()

◆ initialized()

bool FEProblemBase::initialized ( ) const
inline
Returns
Whether the problem was initialized, i.e. whether init() has executed

Definition at line 169 of file FEProblemBase.h.

169{ return _initialized; }

Referenced by MooseMesh::update().

◆ initialSetup()

void FEProblemBase::initialSetup ( )
overridevirtual

If this is a restart run, the user may want to override the start time, which we already set in the constructor. "_time" however will have been "restored" from the restart file. We need to honor the original request of the developer now that the restore has been completed.

If we are not recovering but we are doing restart (_app.getExodusFileRestart() == true) with additional uniform refinements. We have to delay the refinement until this point in time so that the equation systems are initialized and projections can be performed.

Reimplemented from SubProblem.

Reimplemented in MFEMProblem.

Definition at line 962 of file FEProblemBase.C.

963{
964 TIME_SECTION("initialSetup", 2, "Performing Initial Setup");
965
967
969 mooseError("Checkpoint recovery and restart and exodus restart are all mutually exclusive.");
970
972 mooseWarning("MOOSE may fail to catch an exception when the \"skip_exception_check\" parameter "
973 "is used. If you receive a terse MPI error during execution, remove this "
974 "parameter and rerun your simulation");
975
976 // set state flag indicating that we are in or beyond initialSetup.
977 // This can be used to throw errors in methods that _must_ be called at construction time.
980
981 // Setup the solution states (current, old, etc) in each system based on
982 // its default and the states requested of each of its variables
983 for (const auto i : index_range(_solver_systems))
984 {
985 _solver_systems[i]->initSolutionState();
987 getDisplacedProblem()->solverSys(i).initSolutionState();
988 }
989 _aux->initSolutionState();
991 getDisplacedProblem()->auxSys().initSolutionState();
992
993 // always execute to get the max number of DoF per element and node needed to initialize phi_zero
994 // variables
995 dof_id_type global_max_var_n_dofs_per_elem = 0;
996 for (const auto i : index_range(_solver_systems))
997 {
998 auto & sys = *_solver_systems[i];
999 dof_id_type max_var_n_dofs_per_elem;
1000 dof_id_type max_var_n_dofs_per_node;
1001 {
1002 TIME_SECTION("computingMaxDofs", 3, "Computing Max Dofs Per Element");
1003
1004 MaxVarNDofsPerElem mvndpe(*this, sys);
1006 max_var_n_dofs_per_elem = mvndpe.max();
1007 _communicator.max(max_var_n_dofs_per_elem);
1008
1009 MaxVarNDofsPerNode mvndpn(*this, sys);
1011 max_var_n_dofs_per_node = mvndpn.max();
1012 _communicator.max(max_var_n_dofs_per_node);
1013 global_max_var_n_dofs_per_elem =
1014 std::max(global_max_var_n_dofs_per_elem, max_var_n_dofs_per_elem);
1015 }
1016
1017 {
1018 TIME_SECTION("assignMaxDofs", 5, "Assigning Maximum Dofs Per Elem");
1019
1020 sys.assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
1023 displaced_problem->solverSys(i).assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
1024
1025 sys.assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
1027 displaced_problem->solverSys(i).assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
1028 }
1029 }
1030
1031 {
1032 TIME_SECTION("resizingVarValues", 5, "Resizing Variable Values");
1033
1034 for (unsigned int tid = 0; tid < numThreads(); ++tid)
1035 {
1036 _phi_zero[tid].resize(global_max_var_n_dofs_per_elem, std::vector<Real>(getMaxQps(), 0.));
1037 _grad_phi_zero[tid].resize(global_max_var_n_dofs_per_elem,
1038 std::vector<RealGradient>(getMaxQps(), RealGradient(0.)));
1039 _second_phi_zero[tid].resize(global_max_var_n_dofs_per_elem,
1040 std::vector<RealTensor>(getMaxQps(), RealTensor(0.)));
1041 }
1042 }
1043
1044 // Set up stateful material property redistribution, if we suspect
1045 // it may be necessary later.
1047
1049 {
1050 // Only load all of the vectors if we're recovering
1052
1053 // This forces stateful material property loading to be an exact one-to-one match
1054 if (_app.isRecovering())
1055 {
1057 props->setRecovering();
1058
1059#ifdef MOOSE_KOKKOS_ENABLED
1060 for (auto props :
1062 props->setRecovering();
1063#endif
1064 }
1065
1066 TIME_SECTION("restore", 3, "Restoring from backup");
1067
1068 // We could have a cached backup when this app is a sub-app and has been given a Backup
1069 if (!_app.hasInitialBackup())
1071 else
1073
1079 if (_app.isRestarting())
1080 {
1081 if (_app.hasStartTime())
1083 else
1084 {
1086 _time_old = _time;
1087 }
1088 }
1089 }
1090 else
1091 {
1093
1094 if (reader)
1095 {
1096 TIME_SECTION("copyingFromExodus", 3, "Copying Variables From Exodus");
1097
1098 for (auto & sys : _solver_systems)
1099 sys->copyVars(*reader);
1100 _aux->copyVars(*reader);
1101 }
1102 else
1103 {
1104 if (_solver_systems[0]->hasVarCopy() || _aux->hasVarCopy())
1105 mooseError("Need Exodus reader to restart variables but the reader is not available\n"
1106 "Use either FileMesh with an Exodus mesh file or FileMeshGenerator with an "
1107 "Exodus mesh file and with use_for_exodus_restart equal to true");
1108 }
1109 }
1110
1111 // Perform output related setups
1113
1114 // Flush all output to _console that occur during construction and initialization of objects
1116
1117 // Build Refinement and Coarsening maps for stateful material projections if necessary
1118 if ((_adaptivity.isOn() || _num_grid_steps) &&
1121 {
1123 mooseError("Stateful neighbor material properties do not work with mesh adaptivity");
1124
1126 }
1127
1128 if (!_app.isRecovering())
1129 {
1136 {
1137 if (!_app.isUltimateMaster())
1138 mooseError(
1139 "Doing extra refinements when restarting is NOT supported for sub-apps of a MultiApp");
1140
1142 }
1143 }
1144
1145 unsigned int n_threads = numThreads();
1146
1147 // Convergence initial setup
1148 {
1149 TIME_SECTION("convergenceInitialSetup", 5, "Initializing Convergence objects");
1150
1151 for (THREAD_ID tid = 0; tid < n_threads; tid++)
1153 }
1154
1155 // UserObject initialSetup
1156 std::set<std::string> depend_objects_ic = _ics.getDependObjects();
1157 std::set<std::string> depend_objects_aux = _aux->getDependObjects();
1158
1159 std::map<int, std::vector<UserObjectBase *>> group_userobjs;
1160
1161 // This replaces all prior updateDependObjects calls on the old user object warehouses.
1162 TheWarehouse::Query uo_query = theWarehouse().query().condition<AttribSystem>("UserObject");
1163 std::vector<UserObjectBase *> userobjs;
1164 uo_query.queryInto(userobjs);
1166 theWarehouse(), getAuxiliarySystem(), _app.getExecuteOnEnum(), userobjs, depend_objects_ic);
1167
1168 for (auto obj : userobjs)
1169 group_userobjs[obj->getParam<int>("execution_order_group")].push_back(obj);
1170
1171#ifdef MOOSE_KOKKOS_ENABLED
1172 {
1173 TheWarehouse::Query uo_query =
1174 theWarehouse().query().condition<AttribSystem>("KokkosUserObject");
1175 std::vector<UserObjectBase *> userobjs;
1176 uo_query.queryInto(userobjs);
1178 theWarehouse(), getAuxiliarySystem(), _app.getExecuteOnEnum(), userobjs, depend_objects_ic);
1179
1180 for (auto obj : userobjs)
1181 group_userobjs[obj->getParam<int>("execution_order_group")].push_back(obj);
1182 }
1183#endif
1184
1185 for (auto & [group, objs] : group_userobjs)
1186 for (auto obj : objs)
1187 obj->initialSetup();
1188
1189 // check if jacobian calculation is done in userobject
1190 for (THREAD_ID tid = 0; tid < n_threads; ++tid)
1192
1193 // Check whether nonlocal coupling is required or not
1197
1198 {
1199 TIME_SECTION("initializingFunctions", 5, "Initializing Functions");
1200
1201 // Call the initialSetup methods for functions
1202 for (THREAD_ID tid = 0; tid < n_threads; tid++)
1203 {
1204 reinitScalars(tid); // initialize scalars so they are properly sized for use as input into
1205 // ParsedFunctions
1207 }
1208
1209#ifdef MOOSE_KOKKOS_ENABLED
1211#endif
1212 }
1213
1214 {
1215 TIME_SECTION("initializingRandomObjects", 5, "Initializing Random Objects");
1216
1217 // Random interface objects
1218 for (const auto & it : _random_data_objects)
1219 it.second->updateSeeds(EXEC_INITIAL);
1220 }
1221
1222 if (!_app.isRecovering())
1223 {
1225
1226 {
1227 TIME_SECTION("ICinitialSetup", 5, "Setting Up Initial Conditions");
1228
1229 for (THREAD_ID tid = 0; tid < n_threads; tid++)
1230 {
1231 _ics.initialSetup(tid);
1232 _fv_ics.initialSetup(tid);
1233 }
1234
1236 }
1237
1239 }
1240
1241 // Materials
1243 {
1244 TIME_SECTION("materialInitialSetup", 3, "Setting Up Materials");
1245
1246 for (THREAD_ID tid = 0; tid < n_threads; tid++)
1247 {
1248 // Sort the Material objects, these will be actually computed by MOOSE in reinit methods.
1249 _materials.sort(tid);
1251
1252 // Call initialSetup on all material objects
1254
1255 // Discrete materials may insert additional dependencies on materials during the initial
1256 // setup. Therefore we resolve the dependencies once more, now with the additional
1257 // dependencies due to discrete materials.
1259 {
1260 _materials.sort(tid);
1262 }
1263 }
1264
1265#ifdef MOOSE_KOKKOS_ENABLED
1266 _kokkos_materials.sort(0, true);
1267#endif
1268
1269 {
1270 TIME_SECTION("computingInitialStatefulProps", 3, "Computing Initial Material Values");
1271
1273
1277#ifdef MOOSE_KOKKOS_ENABLED
1282#endif
1283 }
1284 }
1285
1286 // setRestartInPlace() is set because the property maps have now been setup and we can
1287 // dataLoad() them directly in place
1288 // setRecovering() is set because from now on we require a one-to-one mapping of
1289 // stateful properties because we shouldn't be declaring any more
1291 {
1292 props->setRestartInPlace();
1293 props->setRecovering();
1294 }
1295
1296 for (THREAD_ID tid = 0; tid < n_threads; tid++)
1297 {
1300 _markers.sort(tid);
1302 }
1303
1304#ifdef LIBMESH_ENABLE_AMR
1305
1307 {
1308 unsigned int n = adaptivity().getInitialSteps();
1309 if (n && !_app.isUltimateMaster() && _app.isRestarting())
1310 mooseError("Cannot perform initial adaptivity during restart on sub-apps of a MultiApp!");
1311
1313 }
1314
1315#endif // LIBMESH_ENABLE_AMR
1316
1317 if (!_app.isRecovering() && !_app.isRestarting())
1318 {
1319 // During initial setup the solution is copied to the older solution states (old, older, etc)
1321
1322 // Check if there are old state initial conditions
1323 auto ics = _ics.getActiveObjects();
1324 auto fv_ics = _fv_ics.getActiveObjects();
1325 auto scalar_ics = _scalar_ics.getActiveObjects();
1326 unsigned short ic_state_max = 0;
1327
1328 auto findMax = [&ic_state_max](const auto & obj_list)
1329 {
1330 for (auto ic : obj_list.getActiveObjects())
1331 ic_state_max = std::max(ic_state_max, ic->getState());
1332 };
1333 findMax(_ics);
1334 findMax(_fv_ics);
1335 findMax(_scalar_ics);
1336
1337 // if there are old state ICs, compute them and write to old states accordingly
1338 if (ic_state_max > 0)
1339 {
1340 // state 0 copy (we'll overwrite current state when evaluating ICs and need to restore it once
1341 // we're done with the old/older state ICs)
1342 std::vector<std::unique_ptr<NumericVector<Real>>> state0_sys_buffers(_solver_systems.size());
1343 std::unique_ptr<NumericVector<Real>> state0_aux_buffer;
1344
1345 // save state 0
1346 for (const auto i : index_range(_solver_systems))
1347 state0_sys_buffers[i] = _solver_systems[i]->solutionState(0).clone();
1348
1349 state0_aux_buffer = _aux->solutionState(0).clone();
1350
1351 // compute old state ICs
1352 for (_current_ic_state = 1; _current_ic_state <= ic_state_max; _current_ic_state++)
1353 {
1355
1356 for (auto & sys : _solver_systems)
1357 sys->solutionState(_current_ic_state) = sys->solutionState(0);
1358
1359 _aux->solutionState(_current_ic_state) = _aux->solutionState(0);
1360 }
1362
1363 // recover state 0
1364 for (const auto i : index_range(_solver_systems))
1365 {
1366 _solver_systems[i]->solutionState(0) = *state0_sys_buffers[i];
1367 _solver_systems[i]->solutionState(0).close();
1368 _solver_systems[i]->update();
1369 }
1370 _aux->solutionState(0) = *state0_aux_buffer;
1371 _aux->solutionState(0).close();
1372 _aux->update();
1373 }
1374 }
1375
1376 if (!_app.isRecovering())
1377 {
1378 if (haveXFEM())
1380 }
1381
1382 // Call initialSetup on the solver systems
1383 for (auto & sys : _solver_systems)
1384 sys->initialSetup();
1385
1386 // Auxilary variable initialSetup calls
1387 _aux->initialSetup();
1388
1390 // initialSetup for displaced systems
1391 _displaced_problem->initialSetup();
1392
1393 for (auto & sys : _solver_systems)
1394 sys->setSolution(*(sys->system().current_local_solution.get()));
1395
1396 // Update the nearest node searches (has to be called after the problem is all set up)
1397 // We do this here because this sets up the Element's DoFs to ghost
1399
1401 if (_displaced_mesh)
1403
1404 // We need to move the mesh in order to build a map between mortar secondary and primary
1405 // interfaces. This map will then be used by the AgumentSparsityOnInterface ghosting functor to
1406 // know which dofs we need ghosted when we call EquationSystems::reinit
1407 if (_displaced_problem && _mortar_data->hasDisplacedObjects())
1408 {
1409 _displaced_problem->updateMesh();
1410 // if displacements were applied to the mesh, the mortar mesh should be updated too
1412 }
1413
1414 // Possibly reinit one more time to get ghosting correct
1416
1417 if (_displaced_mesh)
1418 _displaced_problem->updateMesh();
1419
1420 updateGeomSearch(); // Call all of the rest of the geometric searches
1421
1422 for (auto & sys : _solver_systems)
1423 {
1424 const auto & tis = sys->getTimeIntegrators();
1425
1426 {
1427 TIME_SECTION("timeIntegratorInitialSetup", 5, "Initializing Time Integrator");
1428 for (auto & ti : tis)
1429 ti->initialSetup();
1430 }
1431 }
1432
1433 // HUGE NOTE: MultiApp initialSetup() MUST... I repeat MUST be _after_ main-app restartable data
1434 // has been restored
1435
1436 // Call initialSetup on the MultiApps
1437 if (_multi_apps.hasObjects())
1438 {
1439 TIME_SECTION("initialSetupMultiApps", 2, "Initializing MultiApps", false);
1440 // Assign concurrent multiapps their disjoint rank partitions before the sub-apps are created
1441 // so that each is created on the communicator it will actually run on
1444 }
1445
1446 // Call initialSetup on the transfers
1447 {
1448 TIME_SECTION("initialSetupTransfers", 2, "Initializing Transfers");
1449
1451
1452 // Call initialSetup on the MultiAppTransfers to be executed on TO_MULTIAPP
1453 const auto & to_multi_app_objects = _to_multi_app_transfers.getActiveObjects();
1454 for (const auto & transfer : to_multi_app_objects)
1455 {
1456 transfer->setCurrentDirection(Transfer::DIRECTION::TO_MULTIAPP);
1457 transfer->initialSetup();
1458 }
1459
1460 // Call initialSetup on the MultiAppTransfers to be executed on FROM_MULTIAPP
1461 const auto & from_multi_app_objects = _from_multi_app_transfers.getActiveObjects();
1462 for (const auto & transfer : from_multi_app_objects)
1463 {
1464 transfer->setCurrentDirection(Transfer::DIRECTION::FROM_MULTIAPP);
1465 transfer->initialSetup();
1466 }
1467
1468 // Call initialSetup on the MultiAppTransfers to be executed on BETWEEN_MULTIAPP
1469 const auto & between_multi_app_objects = _between_multi_app_transfers.getActiveObjects();
1470 for (const auto & transfer : between_multi_app_objects)
1471 {
1472 transfer->setCurrentDirection(Transfer::DIRECTION::BETWEEN_MULTIAPP);
1473 transfer->initialSetup();
1474 }
1475 }
1476
1478 {
1479 TIME_SECTION("BoundaryRestrictedNodeIntegrityCheck", 5);
1480
1481 // check that variables are defined along boundaries of boundary restricted nodal objects
1482 const auto & bnd_nodes = getCurrentAlgebraicBndNodeRange();
1483 BoundaryNodeIntegrityCheckThread bnict(*this, uo_query);
1484 Threads::parallel_reduce(bnd_nodes, bnict, numThreads());
1485
1486 // Nodal bcs aren't threaded
1487 for (auto & nl : _nl)
1488 {
1489 const auto & nodal_bcs = nl->getNodalBCWarehouse();
1490 if (!nodal_bcs.hasBoundaryObjects())
1491 continue;
1492
1493 for (const auto & bnode : bnd_nodes)
1494 {
1495 const auto boundary_id = bnode->_bnd_id;
1496 const Node * const node = bnode->_node;
1497
1498 if (node->processor_id() != this->processor_id())
1499 continue;
1500
1501 const auto & bnd_name = _mesh.getBoundaryName(boundary_id);
1502
1503 // Avoid assertion in getBoundaryObjects that we have boundary objects for this boundary ID
1504 if (!nodal_bcs.hasBoundaryObjects(boundary_id))
1505 continue;
1506
1507 const auto & bnd_objects = nodal_bcs.getBoundaryObjects(boundary_id);
1508 for (const auto & bnd_object : bnd_objects)
1509 {
1510 const auto & bnd_variable = bnd_object->variable();
1511 // Skip if this object uses geometric search because coupled variables may be defined on
1512 // paired boundaries instead of the boundary this node is on. Also skip if this boundary
1513 // condition isn't applicable to the current node, e.g. if the node doesn't have any
1514 // degrees of freedom for the boundary condition's variable
1515 if (!bnd_object->requiresGeometricSearch() &&
1516 bnd_object->checkVariableBoundaryIntegrity() &&
1517 node->n_dofs(nl->number(), bnd_variable.number()))
1518 {
1519 std::set<MooseVariableFieldBase *> vars_to_omit = {
1520 &cast_ref<MooseVariableFieldBase &>(const_cast<MooseVariableBase &>(bnd_variable))};
1521
1523 *bnd_object, bnd_object->checkAllVariables(*node, vars_to_omit), bnd_name);
1524 }
1525 }
1526 }
1527 }
1528 }
1529
1531 {
1532 TIME_SECTION("BoundaryRestrictedElemIntegrityCheck", 5);
1533
1534 // check that variables are defined along boundaries of boundary restricted elemental objects
1536 BoundaryElemIntegrityCheckThread beict(*this, uo_query);
1537 Threads::parallel_reduce(bnd_elems, beict, numThreads());
1538 }
1539
1541 {
1542 TIME_SECTION("FVFaceIntegrityCheck", 5);
1543
1544 auto check_fv_face_integrity = [this](MooseMesh & fv_mesh, const bool on_displaced)
1545 {
1546 auto flux_bc_base_query = theWarehouse()
1547 .query()
1548 .condition<AttribSystem>("FVFluxBC")
1549 .condition<AttribDisplaced>(on_displaced)
1550 .condition<AttribThread>(0);
1551 TheWarehouse::QueryCache<AttribBoundaries> flux_bc_query(flux_bc_base_query);
1552
1553 auto interface_kernel_base_query = theWarehouse()
1554 .query()
1555 .condition<AttribSystem>("FVInterfaceKernel")
1556 .condition<AttribDisplaced>(on_displaced)
1557 .condition<AttribThread>(0);
1558 TheWarehouse::QueryCache<AttribBoundaries> interface_kernel_query(
1559 interface_kernel_base_query);
1560
1561 std::vector<FVFluxBC *> flux_bcs;
1562 std::vector<FVInterfaceKernel *> interface_kernels;
1563
1564 for (auto face_it = fv_mesh.ownedFaceInfoBegin(); face_it != fv_mesh.ownedFaceInfoEnd();
1565 ++face_it)
1566 {
1567 const FaceInfo & fi = **face_it;
1568
1569 for (const auto boundary_id : fi.boundaryIDs())
1570 {
1571 auto boundary_key = std::make_tuple(boundary_id, false);
1572
1573 flux_bc_query.queryInto(flux_bcs, boundary_key);
1574 for (const auto * const flux_bc : flux_bcs)
1575 if (flux_bc->checkVariableBoundaryIntegrity())
1576 flux_bc->checkFaceIntegrity(fi);
1577
1578 interface_kernel_query.queryInto(interface_kernels, boundary_key);
1579 for (const auto * const interface_kernel : interface_kernels)
1580 interface_kernel->checkFaceIntegrity(fi);
1581 }
1582 }
1583 };
1584
1585 if (haveFV())
1586 check_fv_face_integrity(mesh(), false);
1587
1588 if (_displaced_problem && _displaced_problem->haveFV())
1589 check_fv_face_integrity(_displaced_problem->mesh(), true);
1590 }
1591
1592 if (!_app.isRecovering())
1593 {
1595 if (!converged)
1596 mooseError("failed to converge initial MultiApp");
1597
1598 // We'll backup the Multiapp here
1600
1601 for (THREAD_ID tid = 0; tid < n_threads; tid++)
1602 reinitScalars(tid);
1603
1605
1606 // The FEProblemBase::execute method doesn't call all the systems on EXEC_INITIAL, but it does
1607 // set/unset the current flag. Therefore, this resets the current flag to EXEC_INITIAL so that
1608 // subsequent calls (e.g., executeControls) have the proper flag.
1610 }
1611
1612 // Here we will initialize the stateful properties once more since they may have been updated
1613 // during initialSetup by calls to computeProperties.
1614 //
1615 // It's really bad that we don't allow this during restart. It means that we can't add new
1616 // stateful materials
1617 // during restart. This is only happening because this _has_ to be below initial userobject
1618 // execution.
1619 // Otherwise this could be done up above... _before_ restoring restartable data... which would
1620 // allow you to have
1621 // this happen during restart. I honestly have no idea why this has to happen after initial user
1622 // object computation.
1623 // THAT is something we should fix... so I've opened this ticket: #5804
1624 if (!_app.isRecovering() && !_app.isRestarting())
1625 {
1628 {
1629 TIME_SECTION("computeMaterials", 2, "Computing Initial Material Properties");
1630
1632 }
1633#ifdef MOOSE_KOKKOS_ENABLED
1637 {
1638 TIME_SECTION("computeMaterials", 2, "Computing Initial Material Properties");
1639
1641 }
1642#endif
1643 }
1644
1645 // Control Logic
1648
1649 // Scalar variables need to reinited for the initial conditions to be available for output
1650 for (unsigned int tid = 0; tid < n_threads; tid++)
1651 reinitScalars(tid);
1652
1653 if (_displaced_mesh)
1654 _displaced_problem->syncSolutions();
1655
1656 // Writes all calls to _console from initialSetup() methods
1658
1660 {
1662 for (THREAD_ID tid = 0; tid < n_threads; ++tid)
1663 for (auto & assembly : _assembly[tid])
1664 assembly->initNonlocalCoupling();
1665 }
1666
1667 {
1668 TIME_SECTION("lineSearchInitialSetup", 5, "Initializing Line Search");
1669
1670 if (_line_search)
1671 _line_search->initialSetup();
1672 }
1673
1674 // Perform Reporter get/declare check
1676
1677 // We do this late to allow objects to get late restartable data
1680
1682}
void boundaryIntegrityCheckError(const MooseObject &object, const std::set< MooseVariableFieldBase * > &variables, const BoundaryName &boundary_name)
Compose boundary restricted error message for the provided object, variables, and boundary_name if th...
void groupUserObjects(TheWarehouse &w, AuxiliarySystem &aux, const ExecFlagEnum &execute_flags, const std::vector< T * > &objs, const std::set< std::string > &ic_deps)
void uniformRefineWithProjection()
Performs uniform refinement on the meshes in the current object.
Definition Adaptivity.C:328
unsigned int getMaxQps() const
virtual bool updateMeshXFEM()
Update the mesh due to changing XFEM cuts.
bool haveXFEM()
Find out whether the current analysis is using XFEM.
void addAnyRedistributers()
void initElementStatefulProps(const libMesh::ConstElemRange &elem_range, const bool threaded)
Initialize stateful properties for elements in a specific elem_range This is needed when elements/bou...
void checkNonlocalCoupling()
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
void reinitBecauseOfGhostingOrNewGeomObjects(bool mortar_changed=false)
Call when it is possible that the needs for ghosted elements has changed.
const ConstBndNodeRange & getCurrentAlgebraicBndNodeRange()
void setNonlocalCouplingMatrix()
Set custom coupling matrix for variables requiring nonlocal contribution.
void setVariableAllDoFMap(const std::vector< const MooseVariableFEBase * > &moose_vars)
void checkUserObjectJacobianRequirement(THREAD_ID tid)
virtual void initialAdaptMesh()
void backupMultiApps(ExecFlagType type)
Backup the MultiApps associated with the ExecFlagType.
virtual void updateGeomSearch(GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
Update this object's geometric search data as well as the displaced problem's if it exists.
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
void partitionConcurrentMultiApps()
Assign each multiapp that shares an 'execution_order_group' with others a disjoint subset of the rank...
virtual void copySolutionsBackwards()
void initialSetup() override
void initialSetup(THREAD_ID tid)
Initial setup.
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition FaceInfo.h:38
std::set< std::string > getDependObjects() const
Get a list of dependent UserObjects for this exec type.
void initialSetup(THREAD_ID tid)
Initial setup.
void sort(THREAD_ID tid=0, bool sort_all_objects=false)
By default, this method only sorts block and boundary-wise object storages that are used by the MOOSE...
virtual void initialSetup(THREAD_ID tid=0) const override
Convenience methods for calling object setup methods that handle the extra neighbor and face objects.
bool restoredInitialBackupMesh() const
Whether this app has restored mesh topology from its initial Backup object.
Definition MooseApp.h:754
void restoreFromInitialBackup(const bool for_restart)
Restores from a "initial" backup, that is, one set in _initial_backup.
Definition MooseApp.C:1809
bool hasStartTime() const
Definition MooseApp.h:298
std::unique_ptr< Backup > finalizeRestore()
Finalizes (closes) the restoration process done in restore().
Definition MooseApp.C:1816
void restore(const std::filesystem::path &folder_base, const bool for_restart)
Restore an application from file.
Definition MooseApp.C:1765
std::string getRestartRecoverFileBase() const
The file_base for the recovery file.
Definition MooseApp.h:504
const ExecFlagEnum & getExecuteOnEnum() const
Return the app level ExecFlagEnum, this contains all the available flags for the app.
Definition MooseApp.h:1044
bool getExodusFileRestart() const
Whether or not we need to use a separate Exodus reader to read the mesh BEFORE we create the mesh.
Definition MooseApp.h:440
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition MooseApp.C:1678
bool hasInitialBackup() const
Definition MooseApp.h:1051
Real getStartTime() const
Definition MooseApp.h:303
std::filesystem::path restartFolderBase(const std::filesystem::path &folder_base) const
The file suffix for restartable data.
Definition MooseApp.C:3063
face_info_iterator ownedFaceInfoEnd()
Definition MooseMesh.C:1467
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition MooseMesh.C:3280
void buildRefinementAndCoarseningMaps(Assembly *assembly)
Create the refinement and coarsening maps necessary for projection of stateful material properties wh...
Definition MooseMesh.C:2476
const std::string & getBoundaryName(const BoundaryID boundary_id) const
Return the name of the boundary given the id.
Definition MooseMesh.C:1743
face_info_iterator ownedFaceInfoBegin()
Iterators to owned faceInfo objects.
Definition MooseMesh.C:1458
void updateActiveSemiLocalNodeRange(std::set< dof_id_type > &ghosted_elems)
Clears the "semi-local" node list and rebuilds it.
Definition MooseMesh.C:962
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition MooseMesh.C:1303
void sort(THREAD_ID tid=0)
Sort the objects using the DependencyResolver.
bool hasObjects(THREAD_ID tid=0) const
Convenience functions for determining if objects exist.
virtual void initialSetup(THREAD_ID tid=0) const
Convenience methods for calling object setup methods.
Base variable class.
void initialSetup()
Calls the initialSetup function for each of the output objects.
void check() const
Perform integrity check for get/declare calls.
void setLoadAllVectors(const bool load_all_vectors)
Sets whether or not all vectors are to be loaded.
virtual void initialSetup()
virtual bool converged(const unsigned int sys_num)
Eventually we want to convert this virtual over to taking a solver system number argument.
Definition SubProblem.h:116
std::vector< T * > & queryInto(std::vector< T * > &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
RealTensorValue RealTensor
uint8_t dof_id_type
RealVectorValue RealGradient

Referenced by EigenExecutionerBase::init(), Eigenvalue::init(), Steady::init(), TransientBase::init(), and MFEMProblem::initialSetup().

◆ initKokkos()

void FEProblemBase::initKokkos ( )

Construct Kokkos assembly and systems and allocate Kokkos material property storages.

Referenced by init().

◆ initKokkosStatefulProps()

void FEProblemBase::initKokkosStatefulProps ( )

◆ initNullSpaceVectors()

void FEProblemBase::initNullSpaceVectors ( const InputParameters &  parameters,
std::vector< std::shared_ptr< NonlinearSystemBase > > &  nl 
)
virtual

Definition at line 837 of file FEProblemBase.C.

839{
840 TIME_SECTION("initNullSpaceVectors", 5, "Initializing Null Space Vectors");
841
842 unsigned int dimNullSpace = parameters.get<unsigned int>("null_space_dimension");
843 unsigned int dimTransposeNullSpace =
844 parameters.get<unsigned int>("transpose_null_space_dimension");
845 unsigned int dimNearNullSpace = parameters.get<unsigned int>("near_null_space_dimension");
846 for (unsigned int i = 0; i < dimNullSpace; ++i)
847 {
848 std::ostringstream oss;
849 oss << "_" << i;
850 // do not project, since this will be recomputed, but make it ghosted, since the near nullspace
851 // builder might march over all nodes
852 for (auto & nl : nls)
853 nl->addVector("NullSpace" + oss.str(), false, libMesh::GHOSTED);
854 }
855 _subspace_dim["NullSpace"] = dimNullSpace;
856 for (unsigned int i = 0; i < dimTransposeNullSpace; ++i)
857 {
858 std::ostringstream oss;
859 oss << "_" << i;
860 // do not project, since this will be recomputed, but make it ghosted, since the near nullspace
861 // builder might march over all nodes
862 for (auto & nl : nls)
863 nl->addVector("TransposeNullSpace" + oss.str(), false, libMesh::GHOSTED);
864 }
865 _subspace_dim["TransposeNullSpace"] = dimTransposeNullSpace;
866 for (unsigned int i = 0; i < dimNearNullSpace; ++i)
867 {
868 std::ostringstream oss;
869 oss << "_" << i;
870 // do not project, since this will be recomputed, but make it ghosted, since the near-nullspace
871 // builder might march over all semilocal nodes
872 for (auto & nl : nls)
873 nl->addVector("NearNullSpace" + oss.str(), false, libMesh::GHOSTED);
874 }
875 _subspace_dim["NearNullSpace"] = dimNearNullSpace;
876}
std::map< std::string, unsigned int > _subspace_dim
Dimension of the subspace spanned by the vectors with a given prefix.

Referenced by EigenProblem::EigenProblem(), and FEProblem::FEProblem().

◆ initPetscOutputAndSomeSolverSettings()

void FEProblemBase::initPetscOutputAndSomeSolverSettings ( )
virtual

Reinitialize PETSc output for proper linear/nonlinear iteration display.

This also may be used for some PETSc-related solver settings

Reimplemented in EigenProblem.

Definition at line 7633 of file FEProblemBase.C.

7634{
7637}
void solveSetup()
Calls the timestepSetup function for each of the output objects.
void petscSetDefaults(FEProblemBase &problem)
Sets the default options for PETSc.

Referenced by possiblyRebuildGeomSearchPatches(), AStableDirk4::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), ImplicitMidpoint::solve(), LStableDirk2::solve(), LStableDirk3::solve(), LStableDirk4::solve(), and solve().

◆ initXFEM()

void FEProblemBase::initXFEM ( std::shared_ptr< XFEMInterface >  xfem)

Create XFEM controller object.

Definition at line 8985 of file FEProblemBase.C.

8986{
8987 _xfem = xfem;
8988 _xfem->setMesh(&_mesh);
8989 if (_displaced_mesh)
8990 _xfem->setDisplacedMesh(_displaced_mesh);
8991
8992 auto fill_data = [this](auto & storage)
8993 {
8994 std::vector<MaterialData *> data(numThreads());
8995 for (const auto tid : make_range(numThreads()))
8996 data[tid] = &storage.getMaterialData(tid);
8997 return data;
8998 };
8999 _xfem->setMaterialData(fill_data(_material_props));
9000 _xfem->setBoundaryMaterialData(fill_data(_bnd_material_props));
9001
9002 unsigned int n_threads = numThreads();
9003 for (unsigned int i = 0; i < n_threads; ++i)
9004 for (const auto nl_sys_num : index_range(_nl))
9005 {
9006 _assembly[i][nl_sys_num]->setXFEM(_xfem);
9008 _displaced_problem->assembly(i, nl_sys_num).setXFEM(_xfem);
9009 }
9010}
MaterialData & getMaterialData(Moose::MaterialDataType type, const THREAD_ID tid=0, const MooseObject *object=nullptr) const
void fill_data(std::map< processor_id_type, std::vector< std::set< unsigned int > > > &data, int M)

◆ isKokkosObject()

bool MooseObject::isKokkosObject ( ) const
inlineinherited

Get whether this object is a Kokkos functor The parameter MooseBase::kokkos_object_param is set by the Kokkos base classes.

Definition at line 63 of file MooseObject.h.

63{ return parameters().isKokkosObject(); }

Referenced by AttribKokkos::initFrom(), BlockRestrictable::initializeBlockRestrictable(), and BoundaryRestrictable::initializeBoundaryRestrictable().

◆ isMatPropRequested()

bool SubProblem::isMatPropRequested ( const std::string &  prop_name) const
virtualinherited

Find out if a material property has been requested by any object.

Definition at line 722 of file SubProblem.C.

723{
724 return _material_property_requested.find(prop_name) != _material_property_requested.end();
725}
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty*

◆ isParamSetByUser()

bool MooseBase::isParamSetByUser ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is set by a user, as opposed to not set or set to default.

Parameters
nameThe name of the parameter to test

Definition at line 205 of file MooseBase.h.

206 {
208 }

Referenced by DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), DiffusionPhysicsBase::addInitialConditions(), CylinderComponent::addMeshGenerators(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), MFEMMesh::buildMesh(), MFEMBoundarySubMesh::buildSubMesh(), MFEMDomainSubMesh::buildSubMesh(), SurfaceDelaunayGeneratorBase::checkBoundaryAndHolesParams(), LibtorchNeuralNetControl::conditionalParameterError(), ConservativeAdvectionBCTempl< is_ad >::ConservativeAdvectionBCTempl(), MFEMNewtonNonlinearSolver::ConstructSolver(), MooseApp::copyInputs(), DiffusionPhysicsBase::DiffusionPhysicsBase(), MooseApp::errorCheck(), FileMesh::FileMesh(), FullSolveMultiApp::FullSolveMultiApp(), MeshDiagnosticsGenerator::generate(), OrientSurfaceMeshGenerator::generate(), SurfaceSubdomainsFromAllNormalsGenerator::generate(), MFEMVectorFESpace::getFECName(), MooseBase::getRenamedParam(), MFEMEigenproblem::getRHSCoefficient(), DefaultConvergenceBase::getSharedExecutionerParam(), AddVariableAction::init(), MFEMMesh::init(), PhysicsBase::initializePhysics(), ElementSubdomainModifierBase::initialSetup(), MatrixSymmetryCheck::MatrixSymmetryCheck(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MFEMEigenproblem::MFEMEigenproblem(), MFEMGeneratedMeshGenerator::MFEMGeneratedMeshGenerator(), MFEMVariable::MFEMVariable(), MooseApp::MooseApp(), MortarConstraintBase::MortarConstraintBase(), MoveNodesByParsedExpressionModifier::moveNodes(), MultiAppGeneralFieldFunctorTransfer::MultiAppGeneralFieldFunctorTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), OrientSurfaceMeshGenerator::OrientSurfaceMeshGenerator(), SolutionInvalidityOutput::output(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PetscExternalPartitioner::partition(), PolyLineMeshFollowingNodeSetGenerator::PolyLineMeshFollowingNodeSetGenerator(), MooseMesh::prepare(), SolutionUserObjectBase::readXda(), ReferenceResidualConvergence::ReferenceResidualConvergence(), PhysicsBase::reportPotentiallyMissedParameters(), MooseApp::run(), MooseApp::runInputFile(), MooseApp::runInputs(), MooseApp::setMFEMDevice(), Moose::MFEM::LinearSolverBase::SetPreconditioner(), MFEMHypreBoomerAMG::SetSolverParameters(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SmoothMeshGenerator::SmoothMeshGenerator(), SurfaceSubdomainsDelaunayRemesher::SurfaceSubdomainsDelaunayRemesher(), SurfaceSubdomainsFromAllNormalsGenerator::SurfaceSubdomainsFromAllNormalsGenerator(), TagVectorAux::TagVectorAux(), TimedSubdomainModifier::TimedSubdomainModifier(), TimeIntegratedPostprocessor::TimeIntegratedPostprocessor(), TriToQuadConverter::TriToQuadConverter(), XYFrontalDelaunayGenerator::XYFrontalDelaunayGenerator(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

◆ isParamValid()

bool MooseBase::isParamValid ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 199 of file MooseBase.h.

199{ return _pars.isParamValid(name); }

Referenced by GridPartitioner::_do_partition(), HierarchicalGridPartitioner::_do_partition(), AddVariableAction::act(), AutoCheckpointAction::act(), CommonOutputAction::act(), ComposeTimeStepperAction::act(), CopyNodalVarsAction::act(), CreateDisplacedProblemAction::act(), SetAdaptivityOptionsAction::act(), SetupDebugAction::act(), SetupMeshCompleteAction::act(), DiffusionCG::addFEKernels(), DiffusionFV::addFVBCs(), DiffusionFV::addFVKernels(), DiffusionPhysicsBase::addInitialConditions(), ComponentJunction::addMeshGenerators(), CylinderComponent::addMeshGenerators(), DiffusionPhysicsBase::addPostprocessors(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), AdvectiveFluxAux::AdvectiveFluxAux(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayVarReductionAux::ArrayVarReductionAux(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), BSplineCurveGenerator::BSplineCurveGenerator(), TimedSubdomainModifier::buildFromFile(), ParsedChainControl::buildFunction(), GeneratedMesh::buildMesh(), MooseMesh::buildTypedMesh(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), SurfaceDelaunayGeneratorBase::checkBoundaryAndHolesParams(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), LibmeshPartitioner::clone(), SampledOutput::cloneMesh(), CombinedVectorPostprocessor::CombinedVectorPostprocessor(), CombinerGenerator::CombinerGenerator(), ComponentJunction::ComponentJunction(), ConservativeAdvectionBCTempl< is_ad >::ConservativeAdvectionBCTempl(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), FEProblemSolve::convergenceSetup(), CopyMeshPartitioner::CopyMeshPartitioner(), CSVReaderVectorPostprocessor::CSVReaderVectorPostprocessor(), CutMeshByLevelSetGeneratorBase::CutMeshByLevelSetGeneratorBase(), ConstantReporter::declareConstantReporterValue(), ConstantReporter::declareConstantReporterValues(), DGKernelBase::DGKernelBase(), DiffusionFluxAux::DiffusionFluxAux(), DiffusionPhysicsBase::DiffusionPhysicsBase(), DomainUserObject::DomainUserObject(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenProblemSolve::EigenProblemSolve(), ElementGenerator::ElementGenerator(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), PIDTransientControl::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), Exodus::Exodus(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase(), FEProblemSolve::FEProblemSolve(), FileOutput::FileOutput(), SurfaceDelaunayGeneratorBase::fillDelaunayOptions(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), FunctionDT::FunctionDT(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FVInterfaceKernel::FVInterfaceKernel(), FVMassMatrix::FVMassMatrix(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), AddMetaDataGenerator::generate(), BlockDeletionGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), BSplineCurveGenerator::generate(), ConcentricCircleMeshGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), ElementGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), GeneratedMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), ManifoldSubdomainGenerator::generate(), MeshExtruderGenerator::generate(), OrientSurfaceMeshGenerator::generate(), ParsedExtraElementIDGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), RenumberBySubdomainGenerator::generate(), SideSetsFromNodeSetsGenerator::generate(), SphereMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainPerElementGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), XYZDelaunayGenerator::generate(), PropertyReadFile::getFileNames(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBase::getRenamedParam(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), AddPeriodicBCAction::getVariables(), Terminator::handleMessage(), HFEMDirichletBC::HFEMDirichletBC(), EigenExecutionerBase::init(), IterationAdaptiveDT::init(), AdvancedOutput::initAvailableLists(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), SolutionAux::initialSetup(), SolutionScalarAux::initialSetup(), PIDTransientControl::initialSetup(), ParsedConvergence::initialSetup(), EigenProblemSolve::initialSetup(), MooseParsedFunction::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedVectorFunction::initialSetup(), PiecewiseTabularBase::initialSetup(), SolutionIC::initialSetup(), Console::initialSetup(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MultiAppVariableValueSampleTransfer::initialSetup(), SampledOutput::initSample(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), PNGOutput::makePNG(), MassMatrix::MassMatrix(), MatCoupledForce::MatCoupledForce(), MeshGeneratorComponent::MeshGeneratorComponent(), MooseApp::MooseApp(), MooseMesh::MooseMesh(), MoosePreconditioner::MoosePreconditioner(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MooseVariableFV< RealEigenVector >::MooseVariableFV(), MortarConstraintBase::MortarConstraintBase(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldKDTreeTransferBase::MultiAppGeneralFieldKDTreeTransferBase(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiPostprocessorConvergence::MultiPostprocessorConvergence(), MultiSystemSolveObject::MultiSystemSolveObject(), NodeSetsGeneratorBase::NodeSetsGeneratorBase(), EigenExecutionerBase::normalizeSolution(), OrientSurfaceMeshGenerator::OrientSurfaceMeshGenerator(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedSubdomainGeneratorBase::ParsedSubdomainGeneratorBase(), PetscOutput::PetscOutput(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), EqualValueBoundaryConstraint::pickPrimaryNode(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularBase::PiecewiseTabularBase(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), EqualValueBoundaryConstraint::populateSecondaryNodes(), MooseMesh::prepare(), MultiApp::readCommandLineArguments(), SolutionUserObjectBase::readExodusIIOrNemesis(), ReferenceResidualInterface::ReferenceResidualInterface(), RenameBlockGenerator::RenameBlockGenerator(), ReporterPointSource::ReporterPointSource(), PhysicsBase::reportPotentiallyMissedParameters(), ParsedSubdomainMeshGenerator::setBlockName(), MooseMesh::setCoordSystem(), FileOutput::setFileBaseInternal(), SideSetsGeneratorBase::setup(), SurfaceMeshGeneratorBase::setup(), Split::setup(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), Output::setWallTimeIntervalFromCommandLineParam(), SideDiffusiveFluxIntegralTempl< is_ad, T >::SideDiffusiveFluxIntegralTempl(), SideSetsGeneratorBase::SideSetsGeneratorBase(), SolutionUserObjectBase::SolutionUserObjectBase(), Terminator::Terminator(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), PIDTransientControl::timestepSetup(), MultiAppDofCopyTransfer::transfer(), TransformGenerator::TransformGenerator(), TransientBase::TransientBase(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), XYQuadrilateralMeshFromBoundaryCurve::XYQuadrilateralMeshFromBoundaryCurve(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

◆ isSNESMFReuseBaseSetbyUser()

bool FEProblemBase::isSNESMFReuseBaseSetbyUser ( )
inline

Return a flag to indicate if _snesmf_reuse_base is set by users.

Definition at line 2688 of file FEProblemBase.h.

◆ isSolverSystemNonlinear()

bool FEProblemBase::isSolverSystemNonlinear ( const unsigned int  sys_num)
inline

◆ isSolveTerminationRequested()

virtual bool Problem::isSolveTerminationRequested ( ) const
inlinevirtualinherited

Check of termination has been requested.

This should be called by transient Executioners in the keepGoing() member.

Definition at line 43 of file Problem.h.

43{ return _termination_requested; };
bool _termination_requested
True if termination of the solve has been requested.
Definition Problem.h:58

Referenced by WebServerControl::execute(), and TransientBase::keepGoing().

◆ isTransient()

virtual bool FEProblemBase::isTransient ( ) const
inlineoverridevirtual

◆ jacobianSetup()

void FEProblemBase::jacobianSetup ( )
overridevirtual

Reimplemented from SubProblem.

Definition at line 10249 of file FEProblemBase.C.

10250{
10252 // We need to setup all the nonlinear systems other than our current one which actually called
10253 // this method (so we have to make sure we don't go in a circle)
10254 for (const auto i : make_range(numNonlinearSystems()))
10255 if (i != currentNlSysNum())
10256 _nl[i]->jacobianSetup();
10257 // We don't setup the aux sys because that's been done elsewhere
10259 _displaced_problem->jacobianSetup();
10260}
virtual unsigned int currentNlSysNum() const override
virtual void jacobianSetup()

Referenced by jacobianSetup(), and NonlinearSystemBase::jacobianSetup().

◆ joinAndFinalize()

void FEProblemBase::joinAndFinalize ( TheWarehouse::Query  query,
bool  isgen = false 
)
private

Definition at line 5332 of file FEProblemBase.C.

5333{
5334 std::vector<UserObject *> objs;
5335 query.queryInto(objs);
5336 if (!isgen)
5337 {
5338 // join all threaded user objects (i.e. not regular general user objects) to the primary
5339 // thread
5340 for (auto obj : objs)
5341 if (obj->primaryThreadCopy())
5342 obj->primaryThreadCopy()->threadJoin(*obj);
5343 }
5344
5345 query.condition<AttribThread>(0).queryInto(objs);
5346
5347 // finalize objects and retrieve/store any postprocessor values
5348 for (auto obj : objs)
5349 {
5350 if (isgen && dynamic_cast<ThreadedGeneralUserObject *>(obj))
5351 continue;
5352 if (isgen)
5353 {
5354 // general user objects are not run in their own threaded loop object - so run them here
5355 if (shouldPrintExecution(0))
5356 _console << "[DBG] Initializing, executing & finalizing general UO '" << obj->name()
5357 << "' on " << _current_execute_on_flag.name() << std::endl;
5358 obj->initialize();
5359 obj->execute();
5360 }
5361
5362 obj->finalize();
5363
5364 // These have to be stored piecemeal (with every call to this function) because general
5365 // postprocessors (which run last after other userobjects have been completed) might depend on
5366 // them being stored. This wouldn't be a problem if all userobjects satisfied the dependency
5367 // resolver interface and could be sorted appropriately with the general userobjects, but they
5368 // don't.
5369 auto pp = dynamic_cast<const Postprocessor *>(obj);
5370 if (pp)
5371 {
5372 _reporter_data.finalize(obj->name());
5373 setPostprocessorValueByName(obj->name(), pp->getValue());
5374 }
5375
5376 auto vpp = dynamic_cast<VectorPostprocessor *>(obj);
5377 if (vpp)
5378 _reporter_data.finalize(obj->name());
5379
5380 // Update Reporter data
5381 auto reporter = dynamic_cast<Reporter *>(obj);
5382 if (reporter)
5383 _reporter_data.finalize(obj->name());
5384 }
5385}
void setPostprocessorValueByName(const PostprocessorName &name, const PostprocessorValue &value, std::size_t t_index=0)
Set the value of a PostprocessorValue.
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
const std::string & name() const
Base class for all Postprocessors.
void finalize(const std::string &object_name)
Helper function for performing post calculation actions via the ReporterContext objects.
Reporter objects allow for the declaration of arbitrary data types that are aggregate values for a si...
Definition Reporter.h:48
An instance of this object type has one copy per thread that runs on each thread.
Base class for Postprocessors that produce a vector of values.

Referenced by computeUserObjectsInternal().

◆ kokkosAssembly() [1/2]

Moose::Kokkos::Assembly & FEProblemBase::kokkosAssembly ( )
inline

Definition at line 365 of file FEProblemBase.h.

365{ return _kokkos_assembly; }

◆ kokkosAssembly() [2/2]

const Moose::Kokkos::Assembly & FEProblemBase::kokkosAssembly ( ) const
inline

Definition at line 366 of file FEProblemBase.h.

366{ return _kokkos_assembly; }

◆ kokkosJoinAndFinalize()

void FEProblemBase::kokkosJoinAndFinalize ( const std::vector< Moose::Kokkos::UserObject * > &  userobjs)
private

◆ linearSysNum()

unsigned int FEProblemBase::linearSysNum ( const LinearSystemName &  linear_sys_name) const
overridevirtual
Returns
the linear system number corresponding to the provided linear_sys_name

Implements SubProblem.

Definition at line 7200 of file FEProblemBase.C.

7201{
7202 std::istringstream ss(linear_sys_name);
7203 unsigned int linear_sys_num;
7204 if (!(ss >> linear_sys_num) || !ss.eof())
7205 linear_sys_num = libmesh_map_find(_linear_sys_name_to_num, linear_sys_name);
7206
7207 return linear_sys_num;
7208}

Referenced by Moose::compute_linear_system(), computeLinearSystemSys(), LinearSystem::computeLinearSystemTags(), and DisplacedProblem::linearSysNum().

◆ lineSearch()

void FEProblemBase::lineSearch ( )
virtual

execute MOOSE line search

Definition at line 2894 of file FEProblemBase.C.

2895{
2896 _line_search->lineSearch();
2897}

Referenced by ComputeLineSearchObjectWrapper::linesearch().

◆ logAdd()

void FEProblemBase::logAdd ( const std::string &  system,
const std::string &  name,
const std::string &  type,
const InputParameters &  params 
) const

◆ makeLinearSolverParams()

SolverParams FEProblemBase::makeLinearSolverParams ( )
staticprivate

Make basic solver params for linear solves.

Definition at line 10476 of file FEProblemBase.C.

10477{
10478 SolverParams solver_params;
10479 solver_params._type = Moose::SolveType::ST_LINEAR;
10481 return solver_params;
10482}
Moose::LineSearchType _line_search
Moose::SolveType _type
@ ST_LINEAR
Solving a linear problem.
Definition MooseTypes.h:902
@ LS_NONE
Definition MooseTypes.h:983

Referenced by FEProblemBase().

◆ markMatPropRequested()

void SubProblem::markMatPropRequested ( const std::string &  prop_name)
virtualinherited

Helper method for adding a material property name to the _material_property_requested set.

Definition at line 716 of file SubProblem.C.

717{
718 _material_property_requested.insert(prop_name);
719}

Referenced by MaterialPropertyInterface::markMatPropRequested(), and MaterialBase::markMatPropRequested().

◆ matrixTagExists() [1/2]

bool SubProblem::matrixTagExists ( const TagName &  tag_name) const
virtualinherited

◆ matrixTagExists() [2/2]

bool SubProblem::matrixTagExists ( TagID  tag_id) const
virtualinherited

Check to see if a particular Tag exists.

Reimplemented in DisplacedProblem.

Definition at line 328 of file SubProblem.C.

329{
330 return _matrix_tag_id_to_tag_name.find(tag_id) != _matrix_tag_id_to_tag_name.end();
331}

◆ matrixTagName()

TagName SubProblem::matrixTagName ( TagID  tag)
virtualinherited

Retrieve the name associated with a TagID.

Reimplemented in DisplacedProblem.

Definition at line 349 of file SubProblem.C.

350{
351 return _matrix_tag_id_to_tag_name[tag];
352}

Referenced by SystemBase::addMatrix(), DisplacedProblem::matrixTagName(), and SystemBase::removeMatrix().

◆ mesh() [1/4]

virtual const MooseMesh & FEProblemBase::mesh ( ) const
inlineoverridevirtual

Implements SubProblem.

Reimplemented in MFEMProblem.

Definition at line 183 of file FEProblemBase.h.

183{ return _mesh; }

◆ mesh() [2/4]

virtual MooseMesh & FEProblemBase::mesh ( )
inlineoverridevirtual

Implements SubProblem.

Reimplemented in MFEMProblem.

Definition at line 182 of file FEProblemBase.h.

182{ return _mesh; }

Referenced by Adaptivity::adaptMesh(), addAnyRedistributers(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), PhysicsBasedPreconditioner::apply(), MultiAppGeneralFieldFunctorTransfer::buildKDTrees(), MultiAppGeneralFieldNearestLocationTransfer::buildKDTrees(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), SampledOutput::cloneMesh(), NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), ComputeFullJacobianThread::computeOnInternalFace(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), coordTransform(), MultiApp::createApp(), DMMooseGetEmbedding_Private(), ElementsAlongLine::ElementsAlongLine(), ElementsAlongPlane::ElementsAlongPlane(), MultiAppUserObjectTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), ElementsAlongLine::execute(), ElementsAlongPlane::execute(), IntersectionPointsAlongLine::execute(), WorkBalance::execute(), MultiAppMFEMTolibMeshShapeEvaluationTransfer::extractlibMeshNodePositions(), CentroidMultiApp::fillPositions(), QuadraturePointMultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), FunctionPeriodicBoundary::FunctionPeriodicBoundary(), MultiApp::getBoundingBox(), EqualValueBoundaryConstraint::ghostPrimary(), Exodus::handleExodusIOMeshRenumbering(), FunctorPositions::initialize(), ParsedDownSelectionPositions::initialize(), FunctorTimes::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), ImageFunction::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), SolutionUserObjectBase::initialSetup(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), IntersectionPointsAlongLine::IntersectionPointsAlongLine(), Moose::Mortar::loopOverMortarSegments(), ReporterPointMarker::markerSetup(), mesh(), mesh(), MultiAppGeometricInterpolationTransfer::MultiAppGeometricInterpolationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), BoundaryNodeIntegrityCheckThread::onNode(), ComputeNodalUserObjectsThread::onNode(), BoundaryElemIntegrityCheckThread::operator()(), ComputeLinearFVGreenGaussGradientVolumeThread::operator()(), ComputeLinearFVLimitedGradientThread::operator()(), ComputeInitialConditionThread::operator()(), Checkpoint::output(), Output::Output(), Exodus::outputEmptyTimestep(), ConsoleUtils::outputMeshInformation(), Exodus::outputNodalVariables(), Exodus::outputSetup(), Nemesis::outputSetup(), PiecewiseConstantFromCSV::PiecewiseConstantFromCSV(), MeshInfo::possiblyAddDomainInfo(), ComputeLinearFVElementalThread::printBlockExecutionInformation(), ComputeLinearFVFaceThread::printBlockExecutionInformation(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), MaterialPropertyDebugOutput::printMaterialMap(), TopResidualDebugOutput::printTopResiduals(), MultiAppMFEMTolibMeshShapeEvaluationTransfer::projectlibMeshNodalValues(), SolutionUserObjectBase::readExodusIIOrNemesis(), MooseApp::restore(), TransientMultiApp::setupApp(), Moose::PeriodicBCHelper::setupManualPeriodicBoundaries(), Moose::PeriodicBCHelper::setupPeriodicBoundaries(), SolutionUserObjectBase::SolutionUserObjectBase(), FixedPointSolve::solve(), TransientMultiApp::solveStep(), Moose::PetscSupport::storePetscOptions(), MultiAppDofCopyTransfer::transfer(), MultiAppMFEMTolibMeshShapeEvaluationTransfer::transferVariables(), Checkpoint::updateCheckpointFiles(), and SampledOutput::updateSample().

◆ mesh() [3/4]

MooseMesh & FEProblemBase::mesh ( bool  use_displaced)

Definition at line 731 of file FEProblemBase.C.

732{
733 if (use_displaced && !_displaced_problem)
734 mooseWarning("Displaced mesh was requested but the displaced problem does not exist. "
735 "Regular mesh will be returned");
736 return ((use_displaced && _displaced_problem) ? _displaced_problem->mesh() : mesh());
737}

◆ mesh() [4/4]

const MooseMesh & FEProblemBase::mesh ( bool  use_displaced) const
overridevirtual

Implements SubProblem.

Definition at line 722 of file FEProblemBase.C.

723{
724 if (use_displaced && !_displaced_problem)
725 mooseWarning("Displaced mesh was requested but the displaced problem does not exist. "
726 "Regular mesh will be returned");
727 return ((use_displaced && _displaced_problem) ? _displaced_problem->mesh() : mesh());
728}

◆ meshChanged() [1/2]

virtual void FEProblemBase::meshChanged ( )
inlineprotectedvirtual

Deprecated.

Users should switch to overriding the meshChanged which takes arguments

Definition at line 3097 of file FEProblemBase.h.

3097{}

Referenced by adaptMesh(), initialAdaptMesh(), meshChanged(), timestepSetup(), uniformRefine(), and updateMeshXFEM().

◆ meshChanged() [2/2]

void FEProblemBase::meshChanged ( bool  intermediate_change,
bool  contract_mesh,
bool  clean_refinement_flags 
)
virtual

Update data after a mesh change.

Iff intermediate_change is true, only perform updates as necessary to prepare for another mesh change immediately-subsequent. An example of data that is not updated during an intermediate change is libMesh System matrix data. An example of data that \emph is updated during an intermediate change is libMesh System vectors. These vectors are projected or restricted based off of adaptive mesh refinement or the changing of element subdomain IDs. The flags contract_mesh and clean_refinement_flags should generally only be set to true when the mesh has changed due to mesh refinement. contract_mesh deletes children of coarsened elements and renumbers nodes and elements. clean_refinement_flags resets refinement flags such that any subsequent calls to System::restrict_vectors or System::prolong_vectors before another AMR step do not mistakenly attempt to re-do the restriction/prolongation which occurred in this method. The value of contract_mesh is ignored when FEProblemBase::allowMeshContractionAfterMeshChanged is set to false.

Definition at line 9043 of file FEProblemBase.C.

9046{
9047 TIME_SECTION("meshChanged", 3, "Handling Mesh Changes");
9048
9049 const bool should_contract = contract_mesh && allowMeshContractionAfterMeshChanged();
9050
9052
9055 _mesh.cacheChangedLists(); // Currently only used with adaptivity and stateful material
9056 // properties
9057
9058 // Clear these out because they corresponded to the old mesh
9059 _ghosted_elems.clear();
9061
9062 // The mesh changed. We notify the MooseMesh first, because
9063 // callbacks (e.g. for sparsity calculations) triggered by the
9064 // EquationSystems reinit may require up-to-date MooseMesh caches.
9066
9067 // If we're just going to alter the mesh again, all we need to
9068 // handle here is AMR and projections, not full system reinit
9069 if (intermediate_change)
9070 es().reinit_solutions();
9071 else
9072 es().reinit();
9073
9074 if (should_contract)
9075 // Once vectors are restricted, we can delete children of coarsened elements
9076 _mesh.getMesh().contract();
9077 if (clean_refinement_flags)
9078 {
9079 // Finally clear refinement flags so that if someone tries to project vectors again without
9080 // an intervening mesh refinement to clear flags they won't run into trouble
9082 refinement.clean_refinement_flags();
9083 }
9084
9085 if (!intermediate_change)
9086 {
9087 // Since the mesh has changed, we need to make sure that we update any of our
9088 // MOOSE-system specific data.
9089 for (auto & sys : _solver_systems)
9090 sys->reinit();
9091 _aux->reinit();
9092 }
9093
9094 // Updating MooseMesh first breaks other adaptivity code, unless we
9095 // then *again* update the MooseMesh caches. E.g. the definition of
9096 // "active" and "local" may have been *changed* by refinement and
9097 // repartitioning done in EquationSystems::reinit().
9099
9100 // If we have finite volume variables, we will need to recompute additional elemental/face
9101 // quantities
9104
9105 // Let the meshChangedInterface notify the mesh changed event before we update the active
9106 // semilocal nodes, because the set of ghosted elements may potentially be updated during a mesh
9107 // changed event.
9108 for (const auto & mci : _notify_when_mesh_changes)
9109 mci->meshChanged();
9110
9111 // Since the Mesh changed, update the PointLocator object used by DiracKernels.
9113
9114 // Need to redo ghosting
9116
9118 {
9119 // Mesh contraction is necessary when a displaced problem is used.
9121 mooseError("Disabling mesh contraction is not implemented when a displaced problem is used. "
9122 "Please contact a "
9123 "developer of this application to discuss the combination of these features.");
9124
9125 _displaced_problem->meshChanged(should_contract, clean_refinement_flags);
9127 }
9128
9130
9133
9134 // Just like we reinitialized our geometric search objects, we also need to reinitialize our
9135 // mortar meshes. Note that this needs to happen after DisplacedProblem::meshChanged because the
9136 // mortar mesh discretization will depend necessarily on the displaced mesh being re-displaced
9137 _mortar_data->meshChanged();
9138
9139 // Nonlinear systems hold the mortar mesh functors. The domains of definition of the mortar
9140 // functors might have changed when the mesh changed.
9141 for (auto & nl_sys : _nl)
9142 nl_sys->reinitMortarFunctors();
9143
9144 reinitBecauseOfGhostingOrNewGeomObjects(/*mortar_changed=*/true);
9145
9146 // We need to create new storage for newly active elements, and copy
9147 // stateful properties from the old elements.
9150 {
9151 if (doingPRefinement())
9153
9154 // Prolong properties onto newly refined elements' children
9155 {
9157 /* refine = */ true, *this, _material_props, _bnd_material_props, _assembly);
9158 const auto & range = *_mesh.refinedElementRange();
9159 Threads::parallel_reduce(range, pmp, numThreads());
9160
9161 // Concurrent erasure from the shared hash map is not safe while we are reading from it in
9162 // ProjectMaterialProperties, so we handle erasure here. Moreover, erasure based on key is
9163 // not thread safe in and of itself because it is a read-write operation. Note that we do not
9164 // do the erasure for p-refinement because the coarse level element is the same as our active
9165 // refined level element
9166 if (!doingPRefinement())
9167 for (const auto & elem : range)
9168 {
9172 }
9173 }
9174
9175 // Restrict properties onto newly coarsened elements
9176 {
9178 /* refine = */ false, *this, _material_props, _bnd_material_props, _assembly);
9179 const auto & range = *_mesh.coarsenedElementRange();
9180 Threads::parallel_reduce(range, pmp, numThreads());
9181 // Note that we do not do the erasure for p-refinement because the coarse level element is the
9182 // same as our active refined level element
9183 if (!doingPRefinement())
9184 for (const auto & elem : range)
9185 {
9186 auto && coarsened_children = _mesh.coarsenedElementChildren(elem);
9187 for (auto && child : coarsened_children)
9188 {
9192 }
9193 }
9194 }
9195 }
9196
9199
9200 _has_jacobian = false; // we have to recompute jacobian when mesh changed
9201
9202 // Now for backwards compatibility with user code that overrode the old no-arg meshChanged we must
9203 // call it here
9204 meshChanged();
9205}
void updatePointLocator(const MooseMesh &mesh)
Called during FEProblemBase::meshChanged() to update the PointLocator object used by the DiracKernels...
virtual bool allowMeshContractionAfterMeshChanged() const
Whether meshChanged() should allow the mesh to be contracted (deletes children of coarsened elements ...
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
Objects to be notified when the mesh changes.
void reinit()
Completely redo all geometric search objects.
void eraseProperty(const Elem *elem)
Remove the property storage and element pointer from internal data structures Use this when elements ...
void markMeshChangedForBackup()
Mark this app as requiring mesh topology data in its next Backup object.
Definition MooseApp.h:759
const std::vector< const Elem * > & coarsenedElementChildren(const Elem *elem) const
Get the newly removed children element ids for an element that was just coarsened.
Definition MooseMesh.C:954
ConstElemPointerRange * refinedElementRange() const
Return a range that is suitable for threaded execution over elements that were just refined.
Definition MooseMesh.C:942
bool isFiniteVolumeInfoDirty() const
Definition MooseMesh.h:1459
void cacheChangedLists()
Cache information about what elements were refined and coarsened in the previous step.
Definition MooseMesh.C:924
ConstElemPointerRange * coarsenedElementRange() const
Return a range that is suitable for threaded execution over elements that were just coarsened.
Definition MooseMesh.C:948
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
Definition MooseMesh.C:2382
bool doingPRefinement() const

Referenced by MoveNodesByParsedExpressionModifier::execute(), ActivateElementsUserObjectBase::finalize(), SidesetAroundSubdomainUpdater::finalize(), Exodus::handleExodusIOMeshRenumbering(), ElementSubdomainModifierBase::modify(), MooseApp::restore(), TransientMultiApp::setupApp(), and Adaptivity::uniformRefineWithProjection().

◆ meshDisplaced()

void FEProblemBase::meshDisplaced ( )
protectedvirtual

Update data after a mesh displaced.

Definition at line 9220 of file FEProblemBase.C.

9221{
9222 for (const auto & mdi : _notify_when_mesh_displaces)
9223 mdi->meshDisplaced();
9224}
std::vector< MeshDisplacedInterface * > _notify_when_mesh_displaces
Objects to be notified when the mesh displaces.
virtual void meshDisplaced()
Update data after a mesh displaced.

Referenced by DisplacedProblem::updateMesh(), and DisplacedProblem::updateMesh().

◆ messagePrefix() [1/2]

std::string MooseBase::messagePrefix ( const bool  hit_prefix = true) const
inlineinherited
Returns
A prefix to be used in messages that contain the input file location associated with this object (if any) and the name and type of the object.

Definition at line 256 of file MooseBase.h.

257 {
258 return messagePrefix(_pars, hit_prefix);
259 }

Referenced by MooseBase::callMooseError(), MooseBase::errorPrefix(), MooseBase::messagePrefix(), MooseBase::mooseDeprecated(), MooseBase::mooseDeprecatedNoTrace(), MooseBase::mooseInfo(), and MooseBase::mooseWarning().

◆ messagePrefix() [2/2]

std::string MooseBase::messagePrefix ( const InputParameters &  params,
const bool  hit_prefix 
)
staticprivateinherited

Internal method for getting the message prefix for an object (object type, name, etc).

Needs to be static so that we can call it externally from InputParameters for errors that do not have context of the MooseBase

Definition at line 140 of file MooseBase.C.

141{
142 std::string prefix = "";
143
144 if (hit_prefix)
145 if (const auto node = MooseBase::getHitNode(params))
146 prefix += Moose::hitMessagePrefix(*node);
147
148 // Don't have context without type and name
149 if (!params.isMooseBaseObject())
150 return prefix;
151
152 const auto & name = params.getObjectName();
153 const std::string base = params.hasBase() ? params.getBase() : "object";
154 const bool is_main_app = base == "Application" && name == AppFactory::main_app_name;
155 prefix += "The following occurred in the ";
156 if (is_main_app)
157 prefix += "main " + base;
158 else
159 prefix += base;
160 if (base != params.getObjectName() && name.size() && !is_main_app)
161 prefix += " '" + name + "'";
162 prefix += " of type " + params.getObjectType() + ".";
163 return prefix + "\n\n";
164}
static const std::string main_app_name
The name for the "main" moose application.
Definition AppFactory.h:68
bool isMooseBaseObject() const
const std::string & getObjectType() const
std::string hitMessagePrefix(const hit::Node &node)
Get the prefix to be associated with a hit node for a message.
Definition Moose.C:898

◆ mooseDeprecated() [1/2]

template<typename... Args>
void MooseBase::mooseDeprecated ( Args &&...  args) const
inlineinherited

Emits a deprecation warning prefixed with the object name and type, and a stack trace.

Definition at line 317 of file MooseBase.h.

318 {
320 _console, false, true, true, messagePrefix(true), std::forward<Args>(args)...);
321 }
void mooseDeprecatedStream(S &oss, const bool expired, const bool print_title, const bool show_trace, Args &&... args)
Definition MooseError.h:252

Referenced by MooseApp::addCapability(), DataFileInterface::getDataFileName(), DataFileInterface::getDataFileNameByName(), MooseApp::getRecoverFileBase(), MooseApp::hasRecoverFileBase(), MooseApp::MooseApp(), and MooseApp::setupOptions().

◆ mooseDeprecated() [2/2]

template<typename... Args>
void SolutionInvalidInterface::mooseDeprecated ( Args &&...  args) const
inlineinherited

◆ mooseDeprecatedNoTrace()

template<typename... Args>
void MooseBase::mooseDeprecatedNoTrace ( Args &&...  args) const
inlineinherited

Emits a deprecation warning prefixed with the object name and type, and no stack trace.

Definition at line 327 of file MooseBase.h.

328 {
330 _console, false, true, false, messagePrefix(true), std::forward<Args>(args)...);
331 }

Referenced by MooseApp::MooseApp().

◆ mooseDocumentedError()

template<typename... Args>
void MooseBase::mooseDocumentedError ( const std::string &  repo_name,
const unsigned int  issue_num,
Args &&...  args 
) const
inlineinherited

Definition at line 277 of file MooseBase.h.

280 {
282 repo_name, issue_num, argumentsToString(std::forward<Args>(args)...)),
283 /* with_prefix = */ true);
284 }
std::string formatMooseDocumentedError(const std::string &repo_name, const unsigned int issue_num, const std::string &msg)
Formats a documented error.
Definition MooseError.C:140

Referenced by ManifoldSubdomainGenerator::ManifoldSubdomainGenerator().

◆ mooseError()

template<typename... Args>
void MooseBase::mooseError ( Args &&...  args) const
inlineinherited

Emits an error prefixed with object name and type and optionally a file path to the top-level block parameter if available.

Definition at line 271 of file MooseBase.h.

272 {
273 callMooseError(argumentsToString(std::forward<Args>(args)...), /* with_prefix = */ true);
274 }

Referenced by CopyMeshPartitioner::_do_partition(), GridPartitioner::_do_partition(), HierarchicalGridPartitioner::_do_partition(), PetscExternalPartitioner::_do_partition(), AdaptivityAction::act(), AddBoundsVectorsAction::act(), AddFVICAction::act(), AddICAction::act(), AddMeshGeneratorAction::act(), AddPeriodicBCAction::act(), AddTimeStepperAction::act(), AddVectorPostprocessorAction::act(), ChainControlSetupAction::act(), CheckFVBCAction::act(), CheckIntegrityAction::act(), CombineComponentsMeshes::act(), CommonOutputAction::act(), CreateDisplacedProblemAction::act(), CreateExecutionerAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), CSGOnlyAction::act(), DeprecatedBlockAction::act(), InitProblemAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), SetAdaptivityOptionsAction::act(), SetupDebugAction::act(), SetupMeshAction::act(), SetupMeshCompleteAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), SplitMeshAction::act(), Action::Action(), AddActionComponentAction::AddActionComponentAction(), PhysicsComponentInterface::addBoundaryConditionsFromComponents(), MooseApp::addCapabilityInternal(), DistributedRectilinearMeshGenerator::addElement(), MooseApp::addExecutor(), SubProblem::addFunctor(), PhysicsComponentInterface::addInitialConditionsFromComponents(), ComponentJunction::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), SubProblem::addPiecewiseByBlockLambdaFunctor(), DistributedRectilinearMeshGenerator::addPoint(), DiracKernelBase::addPointWithValidId(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MooseMesh::addQuadratureNode(), AddActionComponentAction::addRelationshipManagers(), WebServerControl::addServerAction(), AddVariableAction::addVariable(), SubProblem::addVectorTag(), MooseVariableScalar::adUDot(), Output::advancedExecuteOn(), MooseVariableBase::allDofIndices(), MooseApp::appNameToLibName(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), MooseApp::attachRelationshipManagers(), MooseApp::attachRelationshipManagers(), Function::average(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), MooseMesh::buildCoarseningMap(), MultiApp::buildComm(), DistributedRectilinearMeshGenerator::buildCube(), PiecewiseTabularInterface::buildFromFile(), PiecewiseTabularInterface::buildFromJSON(), PiecewiseTabularInterface::buildFromXY(), MooseMesh::buildLowerDMesh(), GeneratedMesh::buildMesh(), MeshGeneratorMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), TiledMesh::buildMesh(), MooseMesh::buildRefinementMap(), MaterialBase::buildRequiredMaterials(), MooseMesh::buildTypedMesh(), MooseMesh::cacheFaceInfoVariableOwnership(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), PhysicsBase::checkBlockRestrictionIdentical(), ComponentBoundaryConditionInterface::checkBoundaryConditionsAllRequested(), SubProblem::checkBoundaryMatProps(), PhysicsBase::checkComponentType(), IterationCountConvergence::checkConvergence(), MooseMesh::checkCoordinateSystems(), DiffusionLHDGAssemblyHelper::checkCoupling(), DefaultConvergenceBase::checkDuplicateSetSharedExecutionerParams(), MooseMesh::checkDuplicateSubdomainNames(), MaterialBase::checkExecutionStage(), FVFluxBC::checkFaceIntegrity(), FVInterfaceKernel::checkFaceIntegrity(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), EigenExecutionerBase::checkIntegrity(), Eigenvalue::checkIntegrity(), ExplicitTimeIntegrator::checkLinearConvergence(), MooseApp::checkMetaDataIntegrity(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), PostprocessorInterface::checkParam(), Moose::PeriodicBCHelper::checkPeriodicParams(), Sampler::checkReinitStatus(), MultiAppTransfer::checkSiblingsTransferSupported(), MaterialBase::checkStatefulSanity(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), Moose::PetscSupport::checkUserProvidedPetscOption(), MultiAppTransfer::checkVariable(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), MooseMesh::clone(), LibmeshPartitioner::clone(), CombinerGenerator::CombinerGenerator(), MooseVariableFieldBase::componentName(), VariableCondensationPreconditioner::computeDInverseDiag(), CompositionDT::computeDT(), MooseVariableFieldBase::computeFaceValues(), TimeStepper::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), MooseMesh::computeFiniteVolumeCoords(), Moose::Kokkos::ResidualObject::computeOffDiagJacobian(), MaterialBase::computeProperties(), ResidualObject::computeResidualAndJacobian(), TimeStepper::computeStep(), AStableDirk4::computeTimeDerivatives(), BDF2::computeTimeDerivatives(), CrankNicolson::computeTimeDerivatives(), ExplicitEuler::computeTimeDerivatives(), ExplicitRK2::computeTimeDerivatives(), ExplicitTVDRK2::computeTimeDerivatives(), ImplicitEuler::computeTimeDerivatives(), ImplicitMidpoint::computeTimeDerivatives(), LStableDirk2::computeTimeDerivatives(), LStableDirk3::computeTimeDerivatives(), LStableDirk4::computeTimeDerivatives(), NewmarkBeta::computeTimeDerivatives(), ConcentricCircleMesh::ConcentricCircleMesh(), ConditionalEnableControl::ConditionalEnableControl(), TimeStepper::constrainStep(), LibtorchNeuralNetControl::controlNeuralNet(), TransientBase::convergedToSteadyState(), ParsedConvergence::convertRealToBool(), MooseApp::copyInputs(), CopyMeshPartitioner::CopyMeshPartitioner(), MultiApp::createApp(), MooseApp::createExecutors(), AddVariableAction::createInitialConditionAction(), MooseApp::createRMFromTemplateAndInit(), Function::curl(), ReporterTransferInterface::declareClone(), Moose::Kokkos::MaterialBase::declareKokkosPropertyInternal(), MeshGenerator::declareMeshProperty(), ReporterTransferInterface::declareVectorClone(), FunctorRelationshipManager::delete_remote_elements(), MooseMesh::deleteRemoteElements(), MooseApp::determineLibtorchDeviceType(), MeshDiagnosticsGenerator::diagnosticsLog(), Function::div(), FunctorBinnedValuesDivision::divisionIndex(), FunctorRelationshipManager::dofmap_reinit(), MooseApp::dynamicAllRegistration(), MooseApp::dynamicAppRegistration(), DistributedRectilinearMeshGenerator::elemId(), MooseApp::errorCheck(), MooseMesh::errorIfDistributedMesh(), MultiAppTransfer::errorIfObjectExecutesOnTransferInSourceApp(), FixedPointSolve::examineFixedPointConvergence(), Eigenvalue::execute(), TransientBase::execute(), WebServerControl::execute(), MooseApp::executeExecutioner(), FVInterfaceKernel::faceArg1(), FVInterfaceKernel::faceArg2(), MultiApp::fillPositions(), MooseApp::finalizeRestore(), Transfer::find_sys(), DiracKernelInfo::findPoint(), FixedPointSolve::findTransformedSystem(), FixedPointSolve::FixedPointSolve(), FunctionDT::FunctionDT(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), LinearFVBoundaryCondition::functorFaceArg(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), AdvancedExtruderGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), CoarsenBlockGenerator::generate(), CombinerGenerator::generate(), CutMeshByLevelSetGeneratorBase::generate(), DistributedRectilinearMeshGenerator::generate(), ElementOrderConversionGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), MeshCollectionGenerator::generate(), MeshDiagnosticsGenerator::generate(), MeshExtruderGenerator::generate(), MeshRepairGenerator::generate(), MoveNodeGenerator::generate(), PlaneIDMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), ProjectSideSetOntoLevelSetGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), RenumberBySubdomainGenerator::generate(), SmoothMeshGenerator::generate(), SpiralAnnularMeshGenerator::generate(), StackGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainPerElementGenerator::generate(), TiledMeshGenerator::generate(), XYMeshLineCutter::generate(), XYZDelaunayGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateCSG(), MeshGenerator::generateData(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), CircularBoundaryCorrectionGenerator::generateRadialCorrectionFactor(), MooseMesh::getAxisymmetricRadialCoord(), MooseMesh::getBlockConnectedBlocks(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), ChainControl::getChainControlDataByName(), WebServerControl::getClientInfo(), MooseMesh::getCoarseningMap(), MultiApp::getCommandLineArgs(), MooseVariableBase::getContinuity(), Control::getControllableParameterByName(), MooseMesh::getCoordSystem(), PhysicsBase::getCoupledPhysics(), PhysicsBase::getCoupledPhysics(), DataFileInterface::getDataFilePath(), TransfiniteMeshGenerator::getDiscreteEdge(), MooseVariableBase::getDofIndices(), VariableCondensationPreconditioner::getDofToCondense(), TransfiniteMeshGenerator::getEdge(), EigenExecutionerBase::getEigenSystemConvergence(), MooseMesh::getElementIDIndex(), Material::getElementIDNeighbor(), Material::getElementIDNeighborByName(), MooseMesh::getElemIDMapping(), MooseMesh::getElemIDsOnBlocks(), WebServerControl::Response::getError(), MultiApp::getExecutioner(), MooseApp::getExecutor(), MultiAppTransfer::getFromMultiApp(), MultiAppTransfer::getFromMultiAppInfo(), SubProblem::getFunctor(), MooseMesh::getGeneralAxisymmetricCoordAxis(), MaterialPropertyInterface::getGenericMaterialPropertyByName(), DistributedRectilinearMeshGenerator::getGhostNeighbors(), DistributedRectilinearMeshGenerator::getIndices(), MaterialPropertyInterface::getKokkosBlockMaterialProperty(), FunctionInterface::getKokkosFunctionByName(), MaterialPropertyInterface::getKokkosMaterialPropertyByName(), Material::getMaterialByName(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), AnnularMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MultiAppTransfer::getMultiApp(), DistributedRectilinearMeshGenerator::getNeighbors(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), MooseMesh::getPairedBoundaryMapping(), MaterialOutputAction::getParams(), PlaneIDMeshGenerator::getPlaneID(), PostprocessorInterface::getPostprocessorValueByNameInternal(), ComponentMaterialPropertyInterface::getPropertyValue(), MooseMesh::getRefinementMap(), MooseBase::getRenamedParam(), ReporterInterface::getReporterContextBaseByName(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), MooseApp::getRestartableDataMap(), MooseApp::getRestartableDataMapName(), MooseApp::getRestartableMetaData(), MooseApp::getRMClone(), MooseObject::getSharedPtr(), MooseObject::getSharedPtr(), PhysicsBase::getSolverSystem(), MooseMesh::getSubdomainBoundaryIds(), TransientBase::getTimeIntegratorNames(), MultiAppTransfer::getToMultiApp(), MultiAppTransfer::getToMultiAppInfo(), MooseMesh::getUniqueCoordSystem(), UserObjectInterface::getUserObjectBaseByName(), UserObjectInterface::getUserObjectName(), SubProblem::getVariableHelper(), AddPeriodicBCAction::getVariables(), VectorPostprocessorInterface::getVectorPostprocessorName(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), MultiApp::globalAppToLocal(), Function::gradient(), MooseVariableBase::hasDoFsOnNodes(), PostprocessorInterface::hasPostprocessor(), PostprocessorInterface::hasPostprocessorByName(), ReporterInterface::hasReporterValue(), ReporterInterface::hasReporterValueByName(), VectorPostprocessorInterface::hasVectorPostprocessor(), VectorPostprocessorInterface::hasVectorPostprocessor(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), TransientBase::incrementStepOrReject(), NEML2Action::inferMOOSEIOType(), AddVariableAction::init(), MooseMesh::init(), Sampler::init(), EigenExecutionerBase::init(), TransientBase::init(), MFEMMesh::init(), CrankNicolson::init(), ExplicitTimeIntegrator::init(), FixedPointIterationAdaptiveDT::init(), IterationAdaptiveDT::init(), MultiApp::init(), NestedDivision::initialize(), ParsedConvergence::initializeConstantSymbol(), PhysicsBase::initializePhysics(), SubProblem::initialSetup(), AuxKernelBase::initialSetup(), SolutionScalarAux::initialSetup(), FullSolveMultiApp::initialSetup(), ExplicitTimeIntegrator::initialSetup(), Function::integral(), InternalSideIndicatorBase::InternalSideIndicatorBase(), EigenExecutionerBase::inversePowerIteration(), Sampler::isAdaptiveSamplingCompleted(), MooseMesh::isBoundaryFullyExternalToSubdomains(), MooseVariableBase::isNodal(), IterationAdaptiveDT::IterationAdaptiveDT(), IterationCountConvergence::IterationCountConvergence(), LibmeshPartitioner::LibmeshPartitioner(), MooseApp::libNameToAppName(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LineSearch::lineSearch(), MooseApp::loadLibraryAndDependencies(), ReporterPointMarker::markerSetup(), Material::Material(), Distribution::median(), FunctorRelationshipManager::mesh_reinit(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshRepairGenerator::MeshRepairGenerator(), SetupMeshAction::modifyParamsForUseSplit(), MooseApp::MooseApp(), MeshMetaDataInterface::mooseErrorInternal(), MooseMesh::MooseMesh(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseVariableBase::MooseVariableBase(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppTransfer::MultiAppTransfer(), NewmarkBeta::NewmarkBeta(), DistributedRectilinearMeshGenerator::nodeId(), DistributedRectilinearMeshGenerator::numNeighbors(), Output::onInterval(), FunctorRelationshipManager::operator()(), RelationshipManager::operator==(), ActionComponent::outerSurfaceArea(), ActionComponent::outerSurfaceBoundaries(), MortarNodalGeometryOutput::output(), Output::Output(), MooseApp::outputMachineReadableData(), DistributedRectilinearMeshGenerator::paritionSquarely(), ParsedConvergence::ParsedConvergence(), ParsedCurveGenerator::ParsedCurveGenerator(), ExplicitTimeIntegrator::performExplicitSolve(), PetscExternalPartitioner::PetscExternalPartitioner(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularInterface::PiecewiseTabularInterface(), CutMeshByLevelSetGeneratorBase::pointPairLevelSetInterception(), ProjectSideSetOntoLevelSetGenerator::pointPairLevelSetInterception(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessorByName(), AStableDirk4::postResidual(), ExplicitRK2::postResidual(), ExplicitTVDRK2::postResidual(), ImplicitMidpoint::postResidual(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), LStableDirk4::postResidual(), VariableCondensationPreconditioner::preallocateCondensedJacobian(), Predictor::Predictor(), TransientBase::preExecute(), MooseMesh::prepare(), MooseMesh::prepared(), FixedPointSolve::printFixedPointConvergenceReason(), MFEMFunctorMaterial::processLiterals(), MultiApp::readCommandLineArguments(), CoarsenBlockGenerator::recursiveCoarsen(), MooseApp::recursivelyCreateExecutors(), FunctorRelationshipManager::redistribute(), MooseApp::registerRestartableData(), MooseApp::registerRestartableNameWithFilter(), Sampler::reinit(), MooseApp::removeRelationshipManager(), PhysicsBase::reportPotentiallyMissedParameters(), MooseApp::restore(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), MooseApp::run(), MooseApp::runInputs(), ScalarComponentIC::ScalarComponentIC(), DistributedRectilinearMeshGenerator::scaleNodalPositions(), FunctorRelationshipManager::set_mesh(), MooseVariableBase::setActiveTags(), DistributedRectilinearMeshGenerator::setBoundaryNames(), MooseMesh::setCoordSystem(), MooseMesh::setGeneralAxisymmetricCoordAxes(), MeshGenerator::setMeshProperty(), MooseApp::setMFEMDevice(), Sampler::setNumberOfCols(), Sampler::setNumberOfRandomSeeds(), Sampler::setNumberOfRows(), Moose::MFEM::LinearSolverBase::SetPreconditioner(), Split::setup(), TransientMultiApp::setupApp(), Moose::PeriodicBCHelper::setupAutoPeriodicBoundaries(), Moose::PeriodicBCHelper::setupManualPeriodicBoundaries(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), TimeSequenceStepperBase::setupSequence(), TransientBase::setupTimeIntegrator(), PhysicsBase::shouldCreateIC(), PhysicsBase::shouldCreateTimeDerivative(), PhysicsBase::shouldCreateVariable(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), MooseVariableBase::sizeMatrixTagData(), SmoothMeshGenerator::SmoothMeshGenerator(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), Moose::MFEM::LinearSolverBase::Solve(), TimeIntegrator::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), FullSolveMultiApp::solveStep(), UserObject::spatialPoints(), UserObject::spatialValue(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), MeshRepairGenerator::splitNonConvexPolygons(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), MaterialBase::subdomainSetup(), CutMeshByLevelSetGeneratorBase::tet4ElemCutter(), Action::timedAct(), Function::timeDerivative(), Function::timeIntegral(), ParsedCurveGenerator::tSectionSpaceDefiner(), MooseVariableScalar::uDot(), MooseVariableScalar::uDotDot(), MooseVariableScalar::uDotDotOld(), MooseVariableScalar::uDotOld(), MooseBase::uniqueName(), AuxScalarKernel::uOld(), ScalarKernelBase::uOld(), Function::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), AddVariableAction::variableType(), SubProblem::vectorTagName(), SubProblem::vectorTagType(), Function::vectorValue(), SubProblem::verifyVectorTags(), ActionComponent::volume(), WebServerControl::WebServerControl(), WebServerControl::writePortFile(), MFEMMesh::writeRecoveryFiles(), and MooseApp::writeRestartableMetaData().

◆ mooseErrorNonPrefixed()

template<typename... Args>
void MooseBase::mooseErrorNonPrefixed ( Args &&...  args) const
inlineinherited

Emits an error without the prefixing included in mooseError().

Definition at line 290 of file MooseBase.h.

291 {
292 callMooseError(argumentsToString(std::forward<Args>(args)...), /* with_prefix = */ false);
293 }

◆ mooseInfo()

template<typename... Args>
void MooseBase::mooseInfo ( Args &&...  args) const
inlineinherited

◆ mooseWarning() [1/2]

template<typename... Args>
void MooseBase::mooseWarning ( Args &&...  args) const
inlineinherited

Emits a warning prefixed with object name and type.

Definition at line 299 of file MooseBase.h.

300 {
301 moose::internal::mooseWarningStream(_console, messagePrefix(true), std::forward<Args>(args)...);
302 }
void mooseWarningStream(S &oss, Args &&... args)
Definition MooseError.h:197

Referenced by DiracKernelInfo::findPoint(), DataFileInterface::getDataFilePath(), MooseApp::loadLibraryAndDependencies(), MooseBase::paramWarning(), and MooseApp::setupOptions().

◆ mooseWarning() [2/2]

template<typename... Args>
void SolutionInvalidInterface::mooseWarning ( Args &&...  args) const
inlineinherited

Definition at line 73 of file SolutionInvalidInterface.h.

74 {
75 _si_moose_base.MooseBase::mooseWarning(std::forward<Args>(args)...);
76 flagSolutionWarningMultipleRegistration(_si_moose_base.name() + ": warning");
77 }

Referenced by CopyMeshPartitioner::_do_partition(), AddFunctionAction::act(), AddKernelAction::act(), CommonOutputAction::act(), MaterialOutputAction::act(), MeshOnlyAction::act(), MooseMesh::addPeriodicVariable(), BoundaryMarker::BoundaryMarker(), DistributedRectilinearMeshGenerator::buildCube(), CartesianMeshGenerator::CartesianMeshGenerator(), CheckOutputAction::checkConsoleOutput(), MultiAppTransfer::checkMultiAppExecuteOn(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkPolygons(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), MultiApp::createApp(), MeshDiagnosticsGenerator::diagnosticsLog(), CartesianGridDivision::divisionIndex(), CylindricalGridDivision::divisionIndex(), SphericalGridDivision::divisionIndex(), Postprocessor::evaluateDotWarning(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), BSplineCurveGenerator::generate(), RenumberBySubdomainGenerator::generate(), SubdomainPerElementGenerator::generate(), SurfaceMeshGeneratorBase::get2DElemNormal(), MultiAppTransfer::getAppInfo(), FunctorBinnedValuesDivision::getBinIndex(), IndicatorMarker::IndicatorMarker(), CartesianGridDivision::initialize(), CylindricalGridDivision::initialize(), SphericalGridDivision::initialize(), MaterialBase::initStatefulProperties(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MFEMRefinementMarker::MFEMRefinementMarker(), NewmarkBeta::NewmarkBeta(), Output::Output(), MaterialOutputAction::outputHelper(), Executioner::problem(), TestSourceStepper::rejectStep(), PhysicsBase::reportPotentiallyMissedParameters(), MaterialBase::resetQpProperties(), MooseMesh::setCoordSystem(), TransientMultiApp::solveStep(), MeshRepairGenerator::splitNonConvexPolygons(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

◆ mooseWarningNonPrefixed() [1/2]

template<typename... Args>
void MooseBase::mooseWarningNonPrefixed ( Args &&...  args) const
inlineinherited

Emits a warning without the prefixing included in mooseWarning().

Definition at line 308 of file MooseBase.h.

309 {
310 moose::internal::mooseWarningStream(_console, std::forward<Args>(args)...);
311 }

◆ mooseWarningNonPrefixed() [2/2]

template<typename... Args>
void SolutionInvalidInterface::mooseWarningNonPrefixed ( Args &&...  args) const
inlineinherited

Definition at line 80 of file SolutionInvalidInterface.h.

81 {
82 _si_moose_base.MooseBase::mooseWarningNonPrefixed(std::forward<Args>(args)...);
83 flagSolutionWarningMultipleRegistration(_si_moose_base.name() + ": warning");
84 }

◆ mortarData() [1/2]

MortarInterfaceWarehouse & FEProblemBase::mortarData ( )
inline

Definition at line 2757 of file FEProblemBase.h.

2757{ return *_mortar_data; }

◆ mortarData() [2/2]

const MortarInterfaceWarehouse & FEProblemBase::mortarData ( ) const
inline

Returns the mortar data object.

Definition at line 2756 of file FEProblemBase.h.

2756{ return *_mortar_data; }

◆ name()

const std::string & MooseBase::name ( ) const
inlineinherited

Get the name of the class.

Returns
The name of the class

Definition at line 103 of file MooseBase.h.

104 {
105 mooseAssert(_name.size(), "Empty name");
106 return _name;
107 }
const std::string & _name
The name of this class.
Definition MooseBase.h:381

Referenced by AdaptivityAction::act(), AddActionComponentAction::act(), AddElementalFieldAction::act(), AddPeriodicBCAction::act(), AddTimeStepperAction::act(), CommonOutputAction::act(), CopyNodalVarsAction::act(), CSGOnlyAction::act(), DeprecatedBlockAction::act(), DisplayGhostingAction::act(), MaterialOutputAction::act(), SetupResidualDebugAction::act(), SetupTimeIntegratorAction::act(), addAnyRedistributers(), Executioner::addAttributeReporter(), addAuxKernel(), MFEMProblem::addAuxKernel(), addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), addBoundaryCondition(), MFEMProblem::addBoundaryCondition(), PhysicsComponentInterface::addComponent(), addConstraint(), addConvergence(), addDamper(), addDGKernel(), addDiracKernel(), addDistribution(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), MFEMProblem::addFESpace(), MFEMProblem::addFESpaceHierarchy(), addFunction(), MFEMProblem::addFunction(), SubProblem::addFunctor(), addFunctorMaterial(), MFEMProblem::addFunctorMaterial(), FunctorMaterial::addFunctorProperty(), FunctorMaterial::addFunctorPropertyByBlocks(), addFVBC(), addFVGradientMethod(), addFVInitialCondition(), addFVInterfaceKernel(), addFVInterpolationMethod(), addFVKernel(), ADDGKernel::ADDGKernel(), addHDGKernel(), MFEMProblem::addImagComponentToBC(), MFEMProblem::addImagComponentToKernel(), addIndicator(), MFEMProblem::addIndicator(), addInitialCondition(), MFEMProblem::addInitialCondition(), addInterfaceKernel(), addInterfaceMaterial(), ElementAndTraceScalarHDGAssemblyHelper::additionalROVariables(), BoundaryIntegralValueConstraint::additionalROVariables(), DiffusionLHDGKernel::additionalROVariables(), ADKernelScalarBase::additionalROVariables(), addKernel(), MFEMProblem::addKernel(), addLinearFVBC(), addLinearFVKernel(), addMarker(), MFEMProblem::addMarker(), addMaterial(), addMaterialHelper(), ComponentMaterialPropertyInterface::addMaterials(), addMeshDivision(), MooseApp::addMeshGenerator(), ComponentJunction::addMeshGenerators(), ComponentMeshTransformHelper::addMeshGenerators(), CylinderComponent::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMProblemComposer(), MFEMProblem::addMFEMSolver(), addMultiApp(), addNodalKernel(), MFEMProblem::addObject(), addObject(), InitialConditionWarehouse::addObject(), ComponentPhysicsInterface::addPhysics(), SubProblem::addPiecewiseByBlockLambdaFunctor(), addPostprocessor(), MFEMProblem::addPostprocessor(), UserObjectBase::addPostprocessorDependencyHelper(), AuxKernelBase::addPostprocessorDependencyHelper(), InitialConditionBase::addPostprocessorDependencyHelper(), addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MFEMProblem::addRealComponentToBC(), MFEMProblem::addRealComponentToKernel(), AddActionComponentAction::addRelationshipManagers(), addReporter(), addSampler(), addScalarKernel(), WebServerControl::addServerActionsInternal(), addTimeIntegrator(), addTransfer(), MFEMProblem::addTransfer(), PhysicsBase::addUserObject(), addUserObject(), UserObjectBase::addUserObjectDependencyHelper(), AuxKernelBase::addUserObjectDependencyHelper(), InitialConditionBase::addUserObjectDependencyHelper(), DisplacedProblem::addVariable(), addVectorPostprocessor(), MFEMProblem::addVectorPostprocessor(), UserObjectBase::addVectorPostprocessorDependencyHelper(), AuxKernelBase::addVectorPostprocessorDependencyHelper(), MooseLinearVariableFV< OutputType >::adError(), Output::advancedExecuteOn(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), NEML2ModelExecutor::advanceState(), MooseVariableBase::allDofIndices(), MooseApp::appBinaryName(), MooseApp::appendMeshGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayDGKernel::ArrayDGKernel(), ArrayParsedAux::ArrayParsedAux(), PhysicsBase::assignBlocks(), AStableDirk4::AStableDirk4(), Function::average(), MultiApp::backup(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), PiecewiseTabularInterface::buildFromFile(), PiecewiseTabularInterface::buildFromXY(), MFEMGeometricMultigridSolver::BuildMultigrid(), MooseMesh::buildNodeListFromSideList(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), MooseBase::callMooseError(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), PhysicsBase::checkBlockRestrictionIdentical(), PhysicsBase::checkComponentType(), DefaultNonlinearConvergence::checkConvergence(), ParsedConvergence::checkConvergence(), checkCoupledScalarVariableBlocks(), checkDependMaterialsHelper(), FVFluxBC::checkFaceIntegrity(), FVInterfaceKernel::checkFaceIntegrity(), TaggingInterface::checkForNans(), SamplerBase::checkForStandardFieldVariableType(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), checkICRestartError(), NonlinearSystemBase::checkKernelCoverage(), Moose::Kokkos::Material::checkMaterialProperty(), Material::checkMaterialProperty(), MooseApp::checkMetaDataIntegrity(), Damper::checkMinDamping(), SideUserObject::checkNoInterfaceMaterialPropertyDependencies(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), Checkpoint::checkpointInfo(), LinearFVGradientManager::checkRestartedGradientHistory(), checkUserObjectNameCollision(), BlockRestrictable::checkVariable(), DomainUserObject::checkVariable(), Coupleable::checkWritableVar(), CoarsenSurfaceMeshAlongSidesetGenerator::coarsenAlongSidesets(), MooseVariableFieldBase::componentName(), CompositeFunction::CompositeFunction(), MaterialBase::computeProperties(), computeUserObjectByName(), VectorPostprocessorVisualizationAux::computeValue(), MooseBase::connectControllableParams(), ConstantPostprocessor::ConstantPostprocessor(), Coupleable::coupledName(), CommonOutputAction::create(), MultiApp::createApp(), MooseApp::createExecutors(), MeshGeneratorSystem::createMeshGeneratorOrder(), MooseApp::createRecoverablePerfGraph(), MoveBoundaryNodesToCurveGenerator::curveGenerator(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), DebugResidualAux::DebugResidualAux(), MaterialBase::declareADProperty(), MFEMComplexVariable::declareCoefficients(), MFEMVariable::declareCoefficients(), MeshInfo::declareHelper(), Moose::Kokkos::MaterialBase::declareKokkosOnDemandProperty(), Moose::Kokkos::MaterialBase::declareKokkosProperty(), MeshGenerator::declareMeshesForSubByName(), MeshGenerator::declareNullMeshName(), MaterialBase::declareProperty(), MFEMCoordinateTransformations::declareRZCoefficients(), DOFMapOutput::demangle(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), MooseMesh::detectPairedSidesets(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DomainUserObject::DomainUserObject(), DumpObjectsProblem::dumpObjectHelper(), ElementDamper::ElementDamper(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementMaterialSampler::ElementMaterialSampler(), ElementValueSampler::ElementValueSampler(), EigenKernel::enabled(), MooseMesh::errorIfDistributedMesh(), SolutionUserObjectBase::evalMeshFunction(), SolutionUserObjectBase::evalMeshFunctionGradient(), SolutionUserObjectBase::evalMultiValuedMeshFunction(), SolutionUserObjectBase::evalMultiValuedMeshFunctionGradient(), GreaterThanLessThanPostprocessor::execute(), PointValue::execute(), RestartableDataReporter::execute(), MultiAppGeneralFieldTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppUserObjectTransfer::execute(), SideValueSampler::execute(), WebServerControl::execute(), ActionWarehouse::executeActionsWithAction(), Exodus::Exodus(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FVInterfaceKernel::faceArg1(), FVInterfaceKernel::faceArg2(), FEProblemBase(), NEML2ModelExecutor::fillInputs(), MultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), PointSamplerBase::finalize(), ChainControl::fullControlDataName(), FunctionArrayAux::FunctionArrayAux(), FunctionDT::FunctionDT(), FVFunctionIC::functionName(), FunctionIC::functionName(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), GapValueAux::GapValueAux(), BoundaryDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), ManifoldSubdomainGenerator::generate(), ParsedExtraElementIDGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), RenumberBySubdomainGenerator::generate(), SideSetsFromNodeSetsGenerator::generate(), StitchBoundaryMeshGenerator::generate(), StitchMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainsFromPartitionerGenerator::generate(), UniqueExtraIDMeshGenerator::generate(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), InterfaceMaterial::getADMaterialProperty(), Material::getADMaterialProperty(), MultiAppTransfer::getAppInfo(), MooseMesh::getBoundaryString(), MultiApp::getBoundingBox(), MooseBase::getCheckedPointerParam(), MooseApp::getCheckpointDirectories(), MFEMProblem::getComplexGridFunction(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), getConvergence(), MeshGenerator::getCSGBase(), MeshGenerator::getCSGBasesByName(), UserObjectBase::getDependObjects(), getDistribution(), DistributionInterface::getDistribution(), DistributionInterface::getDistributionByName(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), MultiApp::getExecutioner(), getExecutor(), MooseApp::getExecutor(), OutputWarehouse::getFileNumbers(), getFunction(), SubProblem::getFunctor(), getFVAdvectedInterpolationMethod(), getFVFaceInterpolationMethod(), getFVGradientMethod(), getFVGradientMethod(), getFVInterpolationMethod(), AuxKernelTempl< ComputeValueType >::getGenericMaterialProperty(), NodalPatchRecovery::getGenericMaterialProperty(), InterfaceMaterial::getGenericMaterialProperty(), Material::getGenericMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialPropertyByName(), Material::getGenericOptionalMaterialProperty(), MaterialBase::getGenericZeroMaterialProperty(), MFEMProblem::getGridFunction(), getKokkosFunction(), getKokkosUserObject(), SolutionUserObjectBase::getLocalVarIndex(), Marker::getMarkerValue(), Material::getMaterial(), getMaterial(), Material::getMaterialByName(), AuxKernelTempl< ComputeValueType >::getMaterialProperty(), NodalPatchRecovery::getMaterialProperty(), InterfaceMaterial::getMaterialProperty(), Material::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), AuxKernelTempl< ComputeValueType >::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOld(), InterfaceMaterial::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), AuxKernelTempl< ComputeValueType >::getMaterialPropertyOlder(), NodalPatchRecovery::getMaterialPropertyOlder(), InterfaceMaterial::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), MFEMObject::getMatrixCoefficient(), MFEMObject::getMatrixCoefficientByName(), MeshGenerator::getMesh(), getMeshDivision(), MeshGenerator::getMeshesByName(), MooseApp::getMeshGenerator(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MFEMProblem::getMFEMObject(), ActionWarehouse::getMooseAppName(), NEML2FEInterpolation::getMOOSEVariable(), MultiAppTransfer::getMultiApp(), InterfaceMaterial::getNeighborADMaterialProperty(), InterfaceMaterial::getNeighborMaterialProperty(), InterfaceMaterial::getNeighborMaterialPropertyOld(), InterfaceMaterial::getNeighborMaterialPropertyOlder(), Material::getOptionalADMaterialProperty(), Material::getOptionalMaterialProperty(), Material::getOptionalMaterialPropertyOld(), Material::getOptionalMaterialPropertyOlder(), MooseBase::getParam(), getPositionsObject(), getPostprocessorValueByName(), ComponentMaterialPropertyInterface::getPropertyValue(), ReporterData::getReporterInfo(), MFEMExecutedObject::getRequestedItems(), MooseApp::getRestartableDataMap(), MooseApp::getRestartableDataMapName(), MooseApp::getRestartableMetaData(), getSampler(), MFEMObject::getScalarCoefficient(), MFEMObject::getScalarCoefficientByName(), TimedSubdomainModifier::getSubdomainIDAndCheck(), MFEMExecutedObject::getSuppliedItems(), TransientBase::getTimeStepperName(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), getUserObject(), getUserObjectBase(), MFEMObject::getVectorCoefficient(), MFEMObject::getVectorCoefficientByName(), LinearFVGradientManager::gradientStateVectorName(), Terminator::handleMessage(), Control::hasControllableParameterByName(), hasConvergence(), hasDistribution(), hasFunction(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), hasFVGradientMethod(), hasFVInterpolationMethod(), MeshInfo::hasItem(), MooseApp::hasMeshGenerator(), MFEMProblem::hasMFEMObject(), AdvancedOutput::hasOutputHelper(), hasPostprocessor(), hasPostprocessorValueByName(), MooseApp::hasRelationshipManager(), MooseApp::hasRestartableDataMap(), MooseApp::hasRestartableMetaData(), hasUserObject(), NEML2Action::inferMOOSEIOType(), AddVariableAction::init(), AdvancedOutput::init(), IterationAdaptiveDT::init(), AdvancedOutput::initAvailableLists(), MeshInfo::initCombinedInfos(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), NestedDivision::initialize(), TransformedPositions::initialize(), BoundaryRestrictable::initializeBoundaryRestrictable(), AuxKernelBase::initialSetup(), SolutionScalarAux::initialSetup(), MFEMScalarQuadratureFunction::initialSetup(), MFEMVectorQuadratureFunction::initialSetup(), Console::initialSetup(), JSONOutput::initialSetup(), BoundaryLinearFVFluxIntegral::initialSetup(), NodalVariableValue::initialSetup(), SideFVFluxBCIntegral::initialSetup(), MultiAppGeneralFieldFunctorTransfer::initialSetup(), MultiAppProjectionTransfer::initialSetup(), BoundaryMeshBuilder::initialSetup(), SolutionUserObjectBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), Function::integral(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), MeshGenerator::isChildMeshGenerator(), DerivativeMaterialInterface< T >::isNotObjectVariable(), MeshGenerator::isNullMeshName(), MooseBase::isParamSetByUser(), MooseBase::isParamValid(), MeshGenerator::isParentMeshGenerator(), LinearCombinationFunction::LinearCombinationFunction(), logAdd(), MooseLinearVariableFV< OutputType >::lowerDError(), Marker::Marker(), MaterialBase::markMatPropRequested(), Material::Material(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), NEML2ModelExecutor::meshChanged(), MeshGenerator::meshPropertyPrefix(), MooseBase::messagePrefix(), MFEMGeometricMultigridSolver::MFEMGeometricMultigridSolver(), MFEMScalarQuadratureFunction::MFEMScalarQuadratureFunction(), MFEMTransient::MFEMTransient(), MFEMVectorQuadratureFunction::MFEMVectorQuadratureFunction(), MooseApp::MooseApp(), OutputWarehouse::mooseConsole(), SolutionInvalidInterface::mooseDeprecated(), MooseVariableBase::MooseVariableBase(), MooseVariableInterface< T >::MooseVariableInterface(), SolutionInvalidInterface::mooseWarning(), SolutionInvalidInterface::mooseWarningNonPrefixed(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NEML2PreKernel::NEML2PreKernel(), NodalDamper::NodalDamper(), MooseLinearVariableFV< OutputType >::nodalError(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalValueSampler::NodalValueSampler(), MeshGenerator::Comparator::operator()(), DOFMapOutput::output(), ProgressOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), ConsoleUtils::outputExecutionInformation(), MaterialOutputAction::outputHelper(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), Exodus::outputPostprocessors(), Nemesis::outputPostprocessors(), TableOutput::outputReporter(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), SolutionInvalidInterface::paramWarning(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedODEKernel::ParsedODEKernel(), ComponentPhysicsInterface::physicsExists(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseFunction::PiecewiseFunction(), PointInUnionCheckUO::PointInUnionCheckUO(), MooseApp::possiblyLoadRestartableMetaData(), MFEMExecutedObject::postprocessorDependencyKey(), PhysicsBase::prefix(), MooseMesh::prepare(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), PerfGraphLivePrint::printStats(), projectInitialConditionOnCustomRange(), MooseBase::queryParam(), MultiApp::readCommandLineArguments(), Receiver::Receiver(), Executor::Result::record(), registerRandomInterface(), MooseApp::registerRestartableDataMapName(), MooseApp::registerRestartableNameWithFilter(), MaterialBase::resetQpProperties(), MultiApp::restore(), ScalarComponentIC::ScalarComponentIC(), MultiApp::setAppOutputFileBase(), setAuxKernelParamsAndLog(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), OutputWarehouse::setFileNumbers(), setPostprocessorValueByName(), setResidualObjectParamsAndLog(), MooseMesh::setSubdomainName(), MooseMesh::setSubdomainName(), NodeSetsGeneratorBase::setup(), SideSetsGeneratorBase::setup(), SurfaceMeshGeneratorBase::setup(), Split::setup(), TransientMultiApp::setupApp(), MoveNodesByParsedExpressionModifier::setupNodalOutputVariables(), NEML2Action::setupOutputMappings(), SideSetExtruderGenerator::SideSetExtruderGenerator(), TransientMultiApp::solveStep(), UserObject::spatialValue(), LinearFVGradientReader::stateComponents(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), MaterialBase::storeBoundaryZeroMatProp(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), MaterialBase::storeSubdomainZeroMatProp(), SubProblem::storeSubdomainZeroMatProp(), ConstraintWarehouse::subdomainsCovered(), MaterialBase::subdomainSetup(), SumPostprocessor::SumPostprocessor(), MFEMPostprocessor::suppliedPostprocessorName(), MFEMVectorPostprocessor::suppliedVectorPostprocessorName(), BoundaryMeshBuilder::surfaceElementSet(), NEML2FEInterpolation::syncWithMainThread(), TaggingInterface::TaggingInterface(), MooseLinearVariableFV< OutputType >::timeIntegratorError(), VectorPostprocessorVisualizationAux::timestepSetup(), ElementSubdomainModifierBase::timestepSetup(), to_json(), MultiAppDofCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), MultiAppMFEMCopyTransfer::transferVariables(), MultiAppMFEMShapeEvaluationTransfer::transferVariables(), TransientMultiApp::TransientMultiApp(), MooseBase::typeAndName(), MooseBase::uniqueParameterName(), FVQpFluxBC::uOnGhost(), FVQpFluxBC::uOnUSub(), UserObjectBase::UserObjectBase(), UserObjectInterface::userObjectName(), ParsedAux::validateGenericVectorNames(), MeshInfo::validParams(), MFEMExecutedObject::variableDependencyKey(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), MFEMExecutedObject::vectorPostprocessorDependencyKey(), Convergence::verboseOutput(), AdvancedOutput::wantOutput(), Coupleable::writableCoupledValue(), Coupleable::writableVariable(), Console::write(), MooseApp::writeRestartableMetaData(), and XYQuadrilateralMeshFromBoundaryCurve::XYQuadrilateralMeshFromBoundaryCurve().

◆ needBoundaryMaterialOnSide()

bool FEProblemBase::needBoundaryMaterialOnSide ( BoundaryID  bnd_id,
const THREAD_ID  tid 
)

These methods are used to determine whether stateful material properties need to be stored on internal sides.

There are five situations where this may be the case: 1) DGKernels 2) IntegratedBCs 3)InternalSideUserObjects 4)ElementalAuxBCs 5)InterfaceUserObjects

Method 1:

Parameters
bnd_idthe boundary id for which to see if stateful material properties need to be stored
tidthe THREAD_ID of the caller
Returns
Boolean indicating whether material properties need to be stored

Method 2:

Parameters
subdomain_idthe subdomain id for which to see if stateful material properties need to be stored
tidthe THREAD_ID of the caller
Returns
Boolean indicating whether material properties need to be stored

Definition at line 9686 of file FEProblemBase.C.

9687{
9688 if (_bnd_mat_side_cache[tid].find(bnd_id) == _bnd_mat_side_cache[tid].end())
9689 {
9690 auto & bnd_mat_side_cache = _bnd_mat_side_cache[tid][bnd_id];
9691 bnd_mat_side_cache = false;
9692
9693 // Check systems
9694 if (_aux->needMaterialOnSide(bnd_id))
9695 {
9696 bnd_mat_side_cache = true;
9697 return true;
9698 }
9699 for (auto & nl : _nl)
9700 if (nl->needBoundaryMaterialOnSide(bnd_id, tid))
9701 {
9702 bnd_mat_side_cache = true;
9703 return true;
9704 }
9705
9706 // TODO: these objects should be checked for whether they actually consume materials
9707 // NOTE: InterfaceUO can use use boundary properties too
9708 if (theWarehouse()
9709 .query()
9710 .condition<AttribThread>(tid)
9711 .condition<AttribInterfaces>(Interfaces::SideUserObject | Interfaces::DomainUserObject |
9713 .condition<AttribBoundaries>(bnd_id)
9714 .count() > 0)
9715 {
9716 bnd_mat_side_cache = true;
9717 return true;
9718 }
9719 }
9720
9721 return _bnd_mat_side_cache[tid][bnd_id];
9722}
bool needBoundaryMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
These methods are used to determine whether stateful material properties need to be stored on interna...
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition KokkosUtils.h:40

Referenced by ComputeMaterialsObjectThread::onBoundary(), ProjectMaterialProperties::onBoundary(), reinitMaterialsBoundary(), reinitMaterialsFaceOnBoundary(), and reinitMaterialsNeighborOnBoundary().

◆ needFV()

virtual void FEProblemBase::needFV ( )
inlineoverridevirtual

marks this problem as including/needing finite volume functionality.

Implements SubProblem.

Definition at line 3030 of file FEProblemBase.h.

3030{ _have_fv = true; }

Referenced by DiffusionFV::initializePhysicsAdditional(), and DisplacedProblem::needFV().

◆ needInterfaceMaterialOnSide()

bool FEProblemBase::needInterfaceMaterialOnSide ( BoundaryID  bnd_id,
const THREAD_ID  tid 
)

Definition at line 9725 of file FEProblemBase.C.

9726{
9727 if (_interface_mat_side_cache[tid].find(bnd_id) == _interface_mat_side_cache[tid].end())
9728 {
9729 auto & interface_mat_side_cache = _interface_mat_side_cache[tid][bnd_id];
9730 interface_mat_side_cache = false;
9731
9732 // Aux-system has not needed interface materials so far
9733 for (auto & nl : _nl)
9734 if (nl->needInterfaceMaterialOnSide(bnd_id, tid))
9735 {
9736 interface_mat_side_cache = true;
9737 return true;
9738 }
9739
9740 // TODO: these objects should be checked for whether they actually consume materials
9741 if (theWarehouse()
9742 .query()
9743 .condition<AttribThread>(tid)
9744 .condition<AttribInterfaces>(Interfaces::InterfaceUserObject |
9746 .condition<AttribBoundaries>(bnd_id)
9747 .count() > 0)
9748 {
9749 interface_mat_side_cache = true;
9750 return true;
9751 }
9752 else if (_interface_materials.hasActiveBoundaryObjects(bnd_id, tid))
9753 {
9754 interface_mat_side_cache = true;
9755 return true;
9756 }
9757 }
9758 return _interface_mat_side_cache[tid][bnd_id];
9759}
bool needInterfaceMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const

Referenced by ComputeMaterialsObjectThread::onInterface(), reinitMaterialsFaceOnBoundary(), reinitMaterialsInterface(), and reinitMaterialsNeighborOnBoundary().

◆ needInternalNeighborSideMaterial()

bool FEProblemBase::needInternalNeighborSideMaterial ( SubdomainID  subdomain_id,
const THREAD_ID  tid 
)

Definition at line 9762 of file FEProblemBase.C.

9763{
9764 if (_block_mat_side_cache[tid].find(subdomain_id) == _block_mat_side_cache[tid].end())
9765 {
9766 _block_mat_side_cache[tid][subdomain_id] = false;
9767
9768 for (auto & nl : _nl)
9769 if (nl->needInternalNeighborSideMaterial(subdomain_id, tid))
9770 {
9771 _block_mat_side_cache[tid][subdomain_id] = true;
9772 return true;
9773 }
9774
9775 // TODO: these objects should be checked for whether they actually consume materials
9776 if (theWarehouse()
9777 .query()
9778 .condition<AttribThread>(tid)
9779 .condition<AttribInterfaces>(Interfaces::InternalSideUserObject |
9781 .condition<AttribSubdomains>(subdomain_id)
9782 .count() > 0)
9783 {
9784 _block_mat_side_cache[tid][subdomain_id] = true;
9785 return true;
9786 }
9787 }
9788
9789 return _block_mat_side_cache[tid][subdomain_id];
9790}
bool needInternalNeighborSideMaterial(SubdomainID subdomain_id, const THREAD_ID tid)

Referenced by reinitMaterialsFaceOnBoundary(), reinitMaterialsNeighborOnBoundary(), ComputeMaterialsObjectThread::subdomainChanged(), and ProjectMaterialProperties::subdomainChanged().

◆ needSolutionState()

void FEProblemBase::needSolutionState ( unsigned int  oldest_needed,
Moose::SolutionIterationType  iteration_type 
)

Declare that we need up to old (1) or older (2) solution states for a given type of iteration.

Parameters
oldest_neededoldest solution state needed
iteration_typethe type of iteration for which old/older states are needed

Definition at line 804 of file FEProblemBase.C.

805{
806 for (auto & sys : _solver_systems)
807 sys->needSolutionState(state, iteration_type);
808 _aux->needSolutionState(state, iteration_type);
809}

Referenced by createTagSolutions().

◆ needsPreviousMultiAppFixedPointIterationAuxiliary() [1/2]

bool FEProblemBase::needsPreviousMultiAppFixedPointIterationAuxiliary ( ) const

Check to see whether we need to compute the variable values of the previous multiapp fixed point iteration for the auxiliary system.

Returns
true if the user required values of the previous multiapp fixed point iteration from the auxiliary system

Definition at line 9827 of file FEProblemBase.C.

◆ needsPreviousMultiAppFixedPointIterationAuxiliary() [2/2]

void FEProblemBase::needsPreviousMultiAppFixedPointIterationAuxiliary ( bool  state)

Set a flag that indicated that user required values for the previous multiapp fixed point iterate for the auxiliary system.

Definition at line 9821 of file FEProblemBase.C.

Referenced by FunctorChangeFunctorMaterialTempl< is_ad >::FunctorChangeFunctorMaterialTempl(), and FixedPointSolve::initialSetup().

◆ needsPreviousMultiAppFixedPointIterationSolution() [1/2]

void FEProblemBase::needsPreviousMultiAppFixedPointIterationSolution ( bool  needed,
const unsigned int  solver_sys_num 
)

Set a flag that indicated that user required values for the previous multiapp fixed point iterate for the solver systems (not auxiliary)

Parameters
neededthe value that should be set to the flag
solver_sys_numthe index of the solver system for which the previous iteration is needed

Definition at line 9807 of file FEProblemBase.C.

9809{
9810 _previous_multiapp_fp_nl_solution_required[solver_sys_num] = needed;
9811}

Referenced by FunctorChangeFunctorMaterialTempl< is_ad >::FunctorChangeFunctorMaterialTempl(), and FixedPointSolve::initialSetup().

◆ needsPreviousMultiAppFixedPointIterationSolution() [2/2]

bool FEProblemBase::needsPreviousMultiAppFixedPointIterationSolution ( const unsigned int  solver_sys_num) const

Check to see whether we need to compute the variable values of the previous multiapp fixed point iteration for the solver systems (not auxiliary)

Parameters
solver_sys_numthe index of the solver system for which the previous iteration is needed
Returns
true if the user required values of the previous multiapp fixed point iteration

Definition at line 9814 of file FEProblemBase.C.

9816{
9817 return _previous_multiapp_fp_nl_solution_required[solver_sys_num];
9818}

◆ needsPreviousMultiSystemFixedPointIterationAuxiliary() [1/2]

bool FEProblemBase::needsPreviousMultiSystemFixedPointIterationAuxiliary ( ) const

Check to see whether we need to compute the variable values of the previous multi-system fixed point iteration for the auxiliary system.

Returns
true if the user required values of the previous multi-system fixed point iteration from the auxiliary system

Definition at line 9853 of file FEProblemBase.C.

◆ needsPreviousMultiSystemFixedPointIterationAuxiliary() [2/2]

void FEProblemBase::needsPreviousMultiSystemFixedPointIterationAuxiliary ( bool  state)

Set a flag that indicates that user requires values for the previous multi-system fixed point iterate for the auxiliary system.

Definition at line 9847 of file FEProblemBase.C.

Referenced by FunctorChangeFunctorMaterialTempl< is_ad >::FunctorChangeFunctorMaterialTempl(), and FEProblemSolve::initialSetup().

◆ needsPreviousMultiSystemFixedPointIterationSolution() [1/2]

void FEProblemBase::needsPreviousMultiSystemFixedPointIterationSolution ( bool  needed,
const unsigned int  solver_sys_num 
)

Set a flag that indicates that user requires values for the previous multi-system fixed point iterate for the solver systems (not auxiliary)

Parameters
neededthe value that should be set to the flag
solver_sys_numthe index of the solver system for which the previous iteration is needed

Definition at line 9833 of file FEProblemBase.C.

9835{
9836 _previous_multisystem_fp_nl_solution_required[solver_sys_num] = needed;
9837}

Referenced by FunctorChangeFunctorMaterialTempl< is_ad >::FunctorChangeFunctorMaterialTempl(), and FEProblemSolve::initialSetup().

◆ needsPreviousMultiSystemFixedPointIterationSolution() [2/2]

bool FEProblemBase::needsPreviousMultiSystemFixedPointIterationSolution ( const unsigned int  solver_sys_num) const

Check to see whether we need to compute the variable values of the previous multi-system fixed point iteration for the solver systems (not auxiliary)

Parameters
solver_sys_numthe index of the solver system for which the previous iteration is needed
Returns
true if the user required values of the previous multi-system fixed point iteration

Definition at line 9840 of file FEProblemBase.C.

9842{
9843 return _previous_multisystem_fp_nl_solution_required[solver_sys_num];
9844}

◆ needsPreviousNewtonIteration() [1/2]

bool FEProblemBase::needsPreviousNewtonIteration ( ) const

Check to see whether we need to compute the variable values of the previous Newton iterate.

Returns
true if the user required values of the previous Newton iterate

Definition at line 9793 of file FEProblemBase.C.

◆ needsPreviousNewtonIteration() [2/2]

void FEProblemBase::needsPreviousNewtonIteration ( bool  state)

Set a flag that indicated that user required values for the previous Newton iterate.

Definition at line 9799 of file FEProblemBase.C.

9800{
9802 mooseError("Previous nonlinear solution is required but not added through "
9803 "Problem/previous_nl_solution_required=true");
9804}

Referenced by Coupleable::coupledGradientPreviousNL(), Coupleable::coupledNodalValuePreviousNL(), Coupleable::coupledSecondPreviousNL(), Coupleable::coupledValuePreviousNL(), and NonlinearSystem::solve().

◆ needToAddDefaultMultiAppFixedPointConvergence()

bool FEProblemBase::needToAddDefaultMultiAppFixedPointConvergence ( ) const
inline

Returns true if the problem needs to add the default fixed point convergence.

Definition at line 768 of file FEProblemBase.h.

◆ needToAddDefaultNonlinearConvergence()

bool FEProblemBase::needToAddDefaultNonlinearConvergence ( ) const
inline

Returns true if the problem needs to add the default nonlinear convergence.

Definition at line 763 of file FEProblemBase.h.

◆ needToAddDefaultSteadyStateConvergence()

bool FEProblemBase::needToAddDefaultSteadyStateConvergence ( ) const
inline

Returns true if the problem needs to add the default steady-state detection convergence.

Definition at line 773 of file FEProblemBase.h.

◆ neighborSubdomainSetup()

void FEProblemBase::neighborSubdomainSetup ( SubdomainID  subdomain,
const THREAD_ID  tid 
)
virtual

Definition at line 2710 of file FEProblemBase.C.

2711{
2712 _all_materials.neighborSubdomainSetup(subdomain, tid);
2713}
virtual void neighborSubdomainSetup(THREAD_ID tid=0) const

Referenced by ThreadedFaceLoop< RangeType >::neighborSubdomainChanged().

◆ newAssemblyArray()

void FEProblemBase::newAssemblyArray ( std::vector< std::shared_ptr< SolverSystem > > &  solver_systems)
virtual

Definition at line 823 of file FEProblemBase.C.

824{
825 unsigned int n_threads = numThreads();
826
827 _assembly.resize(n_threads);
828 for (const auto i : make_range(n_threads))
829 {
830 _assembly[i].resize(solver_systems.size());
831 for (const auto j : index_range(solver_systems))
832 _assembly[i][j] = std::make_unique<Assembly>(*solver_systems[j], i);
833 }
834}
Keeps track of stuff related to assembling.
Definition Assembly.h:101

Referenced by DumpObjectsProblem::DumpObjectsProblem(), EigenProblem::EigenProblem(), ExternalProblem::ExternalProblem(), and FEProblem::FEProblem().

◆ nlConverged()

bool SubProblem::nlConverged ( const unsigned int  nl_sys_num)
virtualinherited
Returns
whether the given nonlinear system nl_sys_num is converged.

Definition at line 708 of file SubProblem.C.

709{
710 mooseAssert(nl_sys_num < numNonlinearSystems(),
711 "The nonlinear system number is higher than the number of systems we have!");
712 return solverSystemConverged(nl_sys_num);
713}

◆ nLinearIterations()

unsigned int FEProblemBase::nLinearIterations ( const unsigned int  nl_sys_num) const
overridevirtual

Reimplemented from SubProblem.

Definition at line 7458 of file FEProblemBase.C.

7459{
7460 return _nl[nl_sys_num]->nLinearIterations();
7461}

Referenced by PiecewiseLinearFromVectorPostprocessor::valueInternal().

◆ nlSysNum()

unsigned int FEProblemBase::nlSysNum ( const NonlinearSystemName &  nl_sys_name) const
overridevirtual
Returns
the nonlinear system number corresponding to the provided nl_sys_name

Implements SubProblem.

Definition at line 7189 of file FEProblemBase.C.

7190{
7191 std::istringstream ss(nl_sys_name);
7192 unsigned int nl_sys_num;
7193 if (!(ss >> nl_sys_num) || !ss.eof())
7194 nl_sys_num = libmesh_map_find(_nl_sys_name_to_num, nl_sys_name);
7195
7196 return nl_sys_num;
7197}

Referenced by DisplacedProblem::nlSysNum().

◆ nNonlinearIterations()

unsigned int FEProblemBase::nNonlinearIterations ( const unsigned int  nl_sys_num) const
overridevirtual

Reimplemented from SubProblem.

Definition at line 7452 of file FEProblemBase.C.

7453{
7454 return _nl[nl_sys_num]->nNonlinearIterations();
7455}

Referenced by PiecewiseLinearFromVectorPostprocessor::valueInternal().

◆ nonlocalCouplingEntries()

std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & FEProblemBase::nonlocalCouplingEntries ( const THREAD_ID  tid,
const unsigned int  nl_sys_num 
)

Definition at line 7035 of file FEProblemBase.C.

7036{
7037 return _assembly[tid][nl_sys]->nonlocalCouplingEntries();
7038}

Referenced by ComputeFullJacobianThread::computeOnBoundary(), and ComputeFullJacobianThread::computeOnElement().

◆ nonlocalCouplingMatrix()

const libMesh::CouplingMatrix & FEProblemBase::nonlocalCouplingMatrix ( const unsigned  i) const
overridevirtual
Returns
the nonlocal coupling matrix for the i'th nonlinear system

Implements SubProblem.

Definition at line 10485 of file FEProblemBase.C.

10486{
10487 return _nonlocal_cm[i];
10488}

Referenced by DisplacedProblem::nonlocalCouplingMatrix().

◆ notifyWhenMeshChanges()

void FEProblemBase::notifyWhenMeshChanges ( MeshChangedInterface *  mci)

Register an object that derives from MeshChangedInterface to be notified when the mesh changes.

Definition at line 9208 of file FEProblemBase.C.

9209{
9210 _notify_when_mesh_changes.push_back(mci);
9211}

Referenced by MeshChangedInterface::MeshChangedInterface().

◆ notifyWhenMeshDisplaces()

void FEProblemBase::notifyWhenMeshDisplaces ( MeshDisplacedInterface *  mdi)

Register an object that derives from MeshDisplacedInterface to be notified when the displaced mesh gets updated.

Definition at line 9214 of file FEProblemBase.C.

9215{
9216 _notify_when_mesh_displaces.push_back(mdi);
9217}

Referenced by MeshDisplacedInterface::MeshDisplacedInterface().

◆ numConcurrentMultiApps()

unsigned int FEProblemBase::numConcurrentMultiApps ( ) const
inline
Returns
the number set for concurrent multiapp execution; greater than 1 enables running the multiapps of an 'execution_order_group' concurrently, each on its own subset of ranks

Definition at line 1732 of file FEProblemBase.h.

1732{ return _num_concurrent_multiapps; }

◆ numGridSteps()

void FEProblemBase::numGridSteps ( unsigned int  num_grid_steps)
inline

Set the number of steps in a grid sequences.

Definition at line 2778 of file FEProblemBase.h.

2778{ _num_grid_steps = num_grid_steps; }

Referenced by FEProblemSolve::FEProblemSolve().

◆ numLinearSystems()

virtual std::size_t FEProblemBase::numLinearSystems ( ) const
inlineoverridevirtual

◆ numMatrixTags()

virtual unsigned int SubProblem::numMatrixTags ( ) const
inlinevirtualinherited

◆ numNonlinearSystems()

virtual std::size_t FEProblemBase::numNonlinearSystems ( ) const
inlineoverridevirtual

◆ numSolverSystems()

virtual std::size_t FEProblemBase::numSolverSystems ( ) const
inlineoverridevirtual

◆ numThreads()

THREAD_ID SubProblem::numThreads ( ) const
inherited
Returns
the number of threads the associated application uses (see MooseApp::numThreads())

Definition at line 81 of file SubProblem.C.

81{ return getMooseApp().numThreads(); }
THREAD_ID numThreads() const
Returns the number of threads this application uses.
Definition MooseApp.h:421

Referenced by Adaptivity::adaptMesh(), addConvergence(), addFunction(), addFunctorMaterial(), addFVInitialCondition(), addFVInterpolationMethod(), addIndicator(), addInitialCondition(), addMarker(), addMaterialHelper(), addMeshDivision(), addObject(), addUserObject(), bumpAllQRuleOrder(), DisplacedProblem::bumpAllQRuleOrder(), bumpVolumeQRuleOrder(), DisplacedProblem::bumpVolumeQRuleOrder(), checkNonlocalCoupling(), computeBounds(), computeIndicators(), computeJacobianTags(), computeLinearSystemTags(), computeMarkers(), computeResidualAndJacobian(), computeResidualTags(), computeUserObjectsInternal(), createQRules(), DisplacedProblem::createQRules(), customSetup(), PenetrationLocator::detectPenetration(), DisplacedProblem::DisplacedProblem(), executeSamplers(), FEProblemBase(), NearestNodeLocator::findNodes(), DisplacedProblem::init(), FEProblem::init(), init(), initElementStatefulProps(), DumpObjectsProblem::initialSetup(), initialSetup(), initXFEM(), MaterialPropertyStorage::MaterialPropertyStorage(), meshChanged(), newAssemblyArray(), PenetrationLocator::PenetrationLocator(), SubProblem::preparePRefinement(), projectInitialConditionOnCustomRange(), projectSolution(), reinitDirac(), FixedPointSolve::solve(), TransientMultiApp::solveStep(), SubProblem::SubProblem(), timestepSetup(), DisplacedProblem::undisplaceMesh(), updateActiveObjects(), Adaptivity::updateErrorVectors(), updateMaxQps(), DisplacedProblem::updateMesh(), DisplacedProblem::updateMesh(), NearestNodeLocator::updatePatch(), ~FEProblemBase(), and PenetrationLocator::~PenetrationLocator().

◆ numVectorTags()

unsigned int SubProblem::numVectorTags ( const Moose::VectorTagType  type = Moose::VECTOR_TAG_ANY) const
virtualinherited

◆ objectExecuteHelper()

template<typename T >
void FEProblemBase::objectExecuteHelper ( const std::vector< T * > &  objects)
static

Definition at line 3813 of file FEProblemBase.h.

3814{
3815 for (T * obj_ptr : objects)
3816 obj_ptr->execute();
3817}

◆ objectSetupHelper()

template<typename T >
void FEProblemBase::objectSetupHelper ( const std::vector< T * > &  objects,
const ExecFlagType &  exec_flag 
)
static

Helpers for calling the necessary setup/execute functions for the supplied objects.

Definition at line 3779 of file FEProblemBase.h.

3780{
3781 if (exec_flag == EXEC_INITIAL)
3782 {
3783 for (T * obj_ptr : objects)
3784 obj_ptr->initialSetup();
3785 }
3786
3787 else if (exec_flag == EXEC_TIMESTEP_BEGIN)
3788 {
3789 for (const auto obj_ptr : objects)
3790 obj_ptr->timestepSetup();
3791 }
3792 else if (exec_flag == EXEC_SUBDOMAIN)
3793 {
3794 for (const auto obj_ptr : objects)
3795 obj_ptr->subdomainSetup();
3796 }
3797
3798 else if (exec_flag == EXEC_NONLINEAR)
3799 {
3800 for (const auto obj_ptr : objects)
3801 obj_ptr->jacobianSetup();
3802 }
3803
3804 else if (exec_flag == EXEC_LINEAR)
3805 {
3806 for (const auto obj_ptr : objects)
3807 obj_ptr->residualSetup();
3808 }
3809}
void timestepSetup() override
virtual void subdomainSetup(SubdomainID subdomain, const THREAD_ID tid)

◆ onlyAllowDefaultNonlinearConvergence()

virtual bool FEProblemBase::onlyAllowDefaultNonlinearConvergence ( ) const
inlinevirtual

Returns true if an error will result if the user supplies 'nonlinear_convergence'.

Some problems are strongly tied to their convergence, and it does not make sense to use any convergence other than their default and additionally would be error-prone.

Reimplemented in ReferenceResidualProblem.

Definition at line 817 of file FEProblemBase.h.

817{ return false; }

Referenced by FEProblemSolve::FEProblemSolve().

◆ onTimestepBegin()

void FEProblemBase::onTimestepBegin ( )
overridevirtual

Implements SubProblem.

Definition at line 7640 of file FEProblemBase.C.

7641{
7642 TIME_SECTION("onTimestepBegin", 2);
7643
7644 for (auto & nl : _nl)
7645 nl->onTimestepBegin();
7646}
virtual void onTimestepBegin() override

Referenced by TransientBase::takeStep(), and MFEMTransient::takeStep().

◆ onTimestepEnd()

void FEProblemBase::onTimestepEnd ( )
overridevirtual

◆ outputStep()

void FEProblemBase::outputStep ( ExecFlagType  type)
virtual

Output the current step.

Will ensure that everything is in the proper state to be outputted. Then tell the OutputWarehouse to do its thing

Parameters
typeThe type execution flag (see Moose.h)

Reimplemented in DumpObjectsProblem.

Definition at line 7603 of file FEProblemBase.C.

7604{
7605 TIME_SECTION("outputStep", 1, "Outputting");
7606
7608
7609 for (auto & sys : _solver_systems)
7610 sys->update();
7611 _aux->update();
7612
7614 _displaced_problem->syncSolutions();
7616
7618}
void outputStep(ExecFlagType type)
Calls the outputStep method for each output object.

Referenced by TransientBase::endStep(), Eigenvalue::execute(), SteadyBase::execute(), TransientBase::execute(), MFEMSteady::execute(), InversePowerMethod::init(), NonlinearEigen::init(), EigenExecutionerBase::postExecute(), TransientBase::preExecute(), FEProblemSolve::solve(), FixedPointSolve::solve(), FixedPointSolve::solveStep(), and TransientMultiApp::solveStep().

◆ paramError()

template<typename... Args>
void MooseBase::paramError ( const std::string &  param,
Args...  args 
) const
inherited

Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseError - only printing a message using the given args.

Definition at line 457 of file MooseBase.h.

458{
459 _pars.paramError(param, std::forward<Args>(args)...);
460}
void paramError(const std::string &param, Args... args) const
Emits a parameter error prefixed with the parameter location and object information if available.

Referenced by HierarchicalGridPartitioner::_do_partition(), AutoCheckpointAction::act(), CommonOutputAction::act(), SetupDebugAction::act(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), NEML2ModelExecutor::addGatheredParameter(), NEML2ModelExecutor::addGatheredVariable(), ADDGKernel::ADDGKernel(), ComponentJunction::addMeshGenerators(), CylinderComponent::addMeshGenerators(), ReporterPointSource::addPoints(), DiffusionPhysicsBase::addPostprocessors(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADKernelTempl< T >::ADKernelTempl(), ADPenaltyPeriodicSegmentalConstraint::ADPenaltyPeriodicSegmentalConstraint(), ADPeriodicSegmentalConstraint::ADPeriodicSegmentalConstraint(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), AdvectiveFluxAux::AdvectiveFluxAux(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), ArrayBodyForce::ArrayBodyForce(), ArrayCoupledForce::ArrayCoupledForce(), ArrayDGKernel::ArrayDGKernel(), ArrayDGLowerDKernel::ArrayDGLowerDKernel(), ArrayDirichletBC::ArrayDirichletBC(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayIntegratedBC::ArrayIntegratedBC(), ArrayKernel::ArrayKernel(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), ArrayParsedAux::ArrayParsedAux(), ArrayPenaltyDirichletBC::ArrayPenaltyDirichletBC(), ArrayReactionNodalKernelTempl< is_ad >::ArrayReactionNodalKernelTempl(), ArrayVacuumBC::ArrayVacuumBC(), ArrayVarReductionAux::ArrayVarReductionAux(), ParsedSubdomainIDsGenerator::assignElemSubdomainID(), AuxKernelBase::AuxKernelBase(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BlockDeletionGenerator::BlockDeletionGenerator(), BlockWeightedPartitioner::BlockWeightedPartitioner(), BoundaryIntegralValueConstraint::BoundaryIntegralValueConstraint(), BoundaryLinearFVFluxIntegral::BoundaryLinearFVFluxIntegral(), BoundsBase::BoundsBase(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BSplineCurveGenerator::BSplineCurveGenerator(), BuildArrayVariableAux::BuildArrayVariableAux(), MFEMFESpaceHierarchy::buildHierarchy(), MFEMMesh::buildMesh(), MFEMGeometricMultigridSolver::BuildMultigrid(), TimeSequenceStepperBase::buildSequence(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), SurfaceDelaunayGeneratorBase::checkBoundaryAndHolesParams(), checkComponent(), Moose::Kokkos::ParsedObjectBase::checkDuplicateSymbols(), SamplerBase::checkForStandardFieldVariableType(), MeshGenerator::checkGetMesh(), ComponentInitialConditionInterface::checkInitialConditionsAllRequested(), BatchMeshGeneratorAction::checkInputParameterType(), PhysicsBase::checkIntegrityEarly(), SurfaceDelaunayGeneratorBase::checkInteriorPoints(), SideUserObject::checkNoInterfaceMaterialPropertyDependencies(), PostprocessorInterface::checkParam(), checkProblemIntegrity(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), MFEMMultiAppTransfer::checkValidTransferProblemTypes(), Coupleable::checkVar(), MultiAppTransfer::checkVariable(), CircularBoundaryCorrectionGenerator::CircularBoundaryCorrectionGenerator(), CircularBoundaryCorrectionGenerator::circularCenterCalculator(), MultiAppGeneralFieldTransfer::closestToPosition(), CoarsenBlockGenerator::CoarsenBlockGenerator(), CombinedVectorPostprocessor::CombinedVectorPostprocessor(), CombinerGenerator::CombinerGenerator(), ComponentInitialConditionInterface::ComponentInitialConditionInterface(), ComponentJunction::ComponentJunction(), ComponentMaterialPropertyInterface::ComponentMaterialPropertyInterface(), CompositionDT::CompositionDT(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), LibtorchNeuralNetControl::conditionalParameterError(), ConservativeAdvectionBCTempl< is_ad >::ConservativeAdvectionBCTempl(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), ConstantVectorPostprocessor::ConstantVectorPostprocessor(), MFEMNewtonNonlinearSolver::ConstructSolver(), ContainsPointAux::ContainsPointAux(), CopyValueAux::CopyValueAux(), MultiAppGeneralFieldTransfer::correctSolutionVectorValues(), Coupleable::Coupleable(), CoupledForceTempl< is_ad >::CoupledForceTempl(), CoupledValueFunctionMaterialTempl< is_ad >::CoupledValueFunctionMaterialTempl(), MultiApp::createApp(), MeshGeneratorSystem::createMeshGenerator(), MoveBoundaryNodesToCurveGenerator::curveGenerator(), CylindricalGridDivision::CylindricalGridDivision(), DebugResidualAux::DebugResidualAux(), ConstantReporter::declareConstantReporterValue(), ConstantReporter::declareConstantReporterValues(), AccumulateReporter::declareLateValues(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DGLowerDKernel::DGLowerDKernel(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), EigenProblem::EigenProblem(), EigenProblemSolve::EigenProblemSolve(), ElementAdaptivityLevelAux::ElementAdaptivityLevelAux(), ElementGenerator::ElementGenerator(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementLengthAux::ElementLengthAux(), ElementLpNormAux::ElementLpNormAux(), ElementNormalAux::ElementNormalAux(), ExtraIDIntegralVectorPostprocessor::elementValue(), ElementValueSampler::ElementValueSampler(), ElementVectorL2Error::ElementVectorL2Error(), EqualValueEmbeddedConstraintTempl< is_ad >::EqualValueEmbeddedConstraintTempl(), ReporterPointSource::errorCheck(), StitchMeshGeneratorBase::errorMissingBoundary(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), FunctorNodalCorrector::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), ExtraElementIDAux::ExtraElementIDAux(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::FileMeshGenerator(), FillBetweenCurvesGenerator::FillBetweenCurvesGenerator(), FillBetweenSidesetsGenerator::FillBetweenSidesetsGenerator(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), InternalSideIndicatorBase::finalize(), MeshTriangulationUtils::finalizeTriangulation(), FixedPointSolve::findTransformedSystem(), FixedPointSolve::FixedPointSolve(), ForcingFunctionAux::ForcingFunctionAux(), FullSolveMultiApp::FullSolveMultiApp(), FunctionArrayAux::FunctionArrayAux(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FunctorADConverterTempl< T >::FunctorADConverterTempl(), FunctorAux::FunctorAux(), FunctorBinnedValuesDivision::FunctorBinnedValuesDivision(), FunctorCoordinatesFunctionAux::FunctorCoordinatesFunctionAux(), FunctorElementalGradientAuxTempl< is_ad >::FunctorElementalGradientAuxTempl(), FunctorExtremaPositions::FunctorExtremaPositions(), FunctorIC::FunctorIC(), FunctorNodalCorrector::FunctorNodalCorrector(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FunctorVectorElementalAuxTempl< is_ad >::FunctorVectorElementalAuxTempl(), FVAdvection::FVAdvection(), FVFluxBC::FVFluxBC(), FVInterfaceKernel::FVInterfaceKernel(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), FVTwoVarContinuityConstraint::FVTwoVarContinuityConstraint(), Boundary2DDelaunayGenerator::General2DDelaunay(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), AddMetaDataGenerator::generate(), AdvancedExtruderGenerator::generate(), BlockDeletionGenerator::generate(), BlockToMeshConverterGenerator::generate(), Boundary2DDelaunayGenerator::generate(), BoundaryDeletionGenerator::generate(), BoundaryElementConversionGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), BreakMeshByBlockGenerator::generate(), BreakMeshByElementGenerator::generate(), CircularBoundaryCorrectionGenerator::generate(), CoarsenBlockGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), CombinerGenerator::generate(), CutMeshByLevelSetGeneratorBase::generate(), ElementsToTetrahedronsConverter::generate(), ExtraNodesetGenerator::generate(), FillBetweenCurvesGenerator::generate(), FillBetweenSidesetsGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), ManifoldSubdomainGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), MoveBoundaryNodesToCurveGenerator::generate(), ParsedCurveGenerator::generate(), ParsedExtraElementIDGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), PlaneIDMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), ProjectSideSetOntoLevelSetGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), RenumberBySubdomainGenerator::generate(), SideSetsFromNodeSetsGenerator::generate(), StackGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainsFromPartitionerGenerator::generate(), SurfaceSubdomainsDelaunayRemesher::generate(), TriToQuadConverter::generate(), UniqueExtraIDMeshGenerator::generate(), XYFrontalDelaunayGenerator::generate(), XYMeshLineCutter::generate(), XYZDelaunayGenerator::generate(), PatternedMeshGenerator::generate(), GeneratedMeshGenerator::GeneratedMeshGenerator(), BoundaryLayerUtils::generateOffsetPolyline(), GenericConstantStdVectorMaterialTempl< is_ad >::GenericConstantStdVectorMaterialTempl(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), PropertyReadFile::getBlockData(), ComponentBoundaryConditionInterface::getBoundaryCondition(), MultiApp::getCommandLineArgs(), PropertyReadFile::getData(), PropertyReadFile::getFileNames(), Sampler::getGlobalSamples(), ComponentInitialConditionInterface::getInitialCondition(), NEML2Action::getInputParameterMapping(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), Sampler::getLocalSamples(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), FEProblemSolve::getParamFromNonlinearSystemVectorParam(), PostprocessorInterface::getPostprocessorNameInternal(), PostprocessorInterface::getPostprocessorValueInternal(), Sampler::getSampleRow(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), UserObjectInterface::getUserObjectBase(), UserObjectInterface::getUserObjectName(), AddPeriodicBCAction::getVariables(), HFEMDirichletBC::HFEMDirichletBC(), AddVariableAction::init(), MFEMTransient::init(), MultiApp::init(), DistributedPositions::initialize(), BlockWeightedPartitioner::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), PhysicsBase::initializePhysics(), ReferenceResidualConvergence::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), SolutionIC::initialSetup(), LibtorchControlValuePostprocessor::initialSetup(), ElementSubdomainModifierBase::initialSetup(), MFEMScalarCoefficientPointValueSampler::initialSetup(), FullSolveMultiApp::initialSetup(), JSONOutput::initialSetup(), BoundaryLinearFVFluxIntegral::initialSetup(), SideFVFluxBCIntegral::initialSetup(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), MultiAppGeneralFieldKDTreeTransferBase::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MultiAppVariableValueSamplePostprocessorTransfer::initialSetup(), PointInPolyhedronCheckUO::initialSetup(), HistogramVectorPostprocessor::initialSetup(), SampledOutput::initSample(), AddMetaDataGenerator::inputChecker(), IntegratedBC::IntegratedBC(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceValueUserObjectAux::InterfaceValueUserObjectAux(), InternalSideIndicatorBase::InternalSideIndicatorBase(), InterpolatedStatefulMaterialTempl< T >::InterpolatedStatefulMaterialTempl(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), MultiApp::keepSolutionDuringRestore(), Kernel::Kernel(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationFunction::LinearCombinationFunction(), LinearFVAdvectionDiffusionFunctorRobinBC::LinearFVAdvectionDiffusionFunctorRobinBC(), LowerDIntegratedBC::LowerDIntegratedBC(), PNGOutput::makeMeshFunc(), MatCoupledForce::MatCoupledForce(), MaterialADConverterTempl< T >::MaterialADConverterTempl(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MatReactionTempl< is_ad >::MatReactionTempl(), MatrixSymmetryCheck::MatrixSymmetryCheck(), PatternedMeshGenerator::mergeSubdomainNameMaps(), MeshCollectionGenerator::MeshCollectionGenerator(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshDivisionAux::MeshDivisionAux(), MeshGenerator::MeshGenerator(), MeshGeneratorComponent::MeshGeneratorComponent(), MeshInfo::MeshInfo(), MFEMComplexSumAux::MFEMComplexSumAux(), MFEMEigenproblem::MFEMEigenproblem(), MFEMFunctorMaterial::MFEMFunctorMaterial(), MFEMGeneratedMeshGenerator::MFEMGeneratedMeshGenerator(), MFEMGenericFunctorMaterial::MFEMGenericFunctorMaterial(), MFEMGenericFunctorMatrixMaterial::MFEMGenericFunctorMatrixMaterial(), MFEMGenericFunctorVectorMaterial::MFEMGenericFunctorVectorMaterial(), MFEMGeometricMultigridSolver::MFEMGeometricMultigridSolver(), MFEMHypreBoomerAMG::MFEMHypreBoomerAMG(), MFEMMultiAppTransfer::MFEMMultiAppTransfer(), MFEMNDtoRTAux::MFEMNDtoRTAux(), MFEMSumAux::MFEMSumAux(), MFEMVariable::MFEMVariable(), MooseLinearVariableFV< OutputType >::MooseLinearVariableFV(), UserObjectInterface::mooseObjectError(), MoosePreconditioner::MoosePreconditioner(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MortarConstraintBase::MortarConstraintBase(), MortarNodalAuxKernelTempl< ComputeValueType >::MortarNodalAuxKernelTempl(), MultiApp::moveApp(), MoveBoundaryNodesToCurveGenerator::MoveBoundaryNodesToCurveGenerator(), MoveNodeGenerator::MoveNodeGenerator(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), TriToQuadConverter::moveSurvivingTriangles(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldFunctorTransfer::MultiAppGeneralFieldFunctorTransfer(), MultiAppGeneralFieldKDTreeTransferBase::MultiAppGeneralFieldKDTreeTransferBase(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppGeometricInterpolationTransfer::MultiAppGeometricInterpolationTransfer(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorToAuxScalarTransfer::MultiAppPostprocessorToAuxScalarTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppProjectionTransfer::MultiAppProjectionTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppScalarToAuxScalarTransfer::MultiAppScalarToAuxScalarTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiAppVectorPostprocessorTransfer::MultiAppVectorPostprocessorTransfer(), MultiSystemSolveObject::MultiSystemSolveObject(), NearestNodeValueAux::NearestNodeValueAux(), NEML2Action::NEML2Action(), NEML2PreKernel::NEML2PreKernel(), NestedDivision::NestedDivision(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), NodalValueSampler::NodalValueSampler(), NumDOFs::NumDOFs(), OrientSurfaceMeshGenerator::OrientSurfaceMeshGenerator(), MeshTriangulationUtils::outerBoundaryIds(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), ParsedPostprocessor::ParsedPostprocessor(), ParsedReporterBase::ParsedReporterBase(), ParsedScalarReporter::ParsedScalarReporter(), ParsedSubdomainGeneratorBase::ParsedSubdomainGeneratorBase(), ParsedVectorRealReductionReporter::ParsedVectorRealReductionReporter(), ParsedVectorReporter::ParsedVectorReporter(), ParsedVectorVectorRealReductionReporter::ParsedVectorVectorRealReductionReporter(), PatternedMeshGenerator::PatternedMeshGenerator(), PenaltyPeriodicSegmentalConstraint::PenaltyPeriodicSegmentalConstraint(), PeriodicSegmentalConstraint::PeriodicSegmentalConstraint(), PIDTransientControl::PIDTransientControl(), PlaneDeletionGenerator::PlaneDeletionGenerator(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), PointInPolyhedronBaseUO::PointInPolyhedronBaseUO(), PointInSignedFunctionCheckUO::PointInSignedFunctionCheckUO(), PointInUnionCheckUO::PointInUnionCheckUO(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), PolyLineMeshFollowingNodeSetGenerator::PolyLineMeshFollowingNodeSetGenerator(), EqualValueBoundaryConstraint::populateSecondaryNodes(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessor(), LibmeshPartitioner::prepareBlocksForSubdomainPartitioner(), ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux(), ProjectSideSetOntoLevelSetGenerator::ProjectSideSetOntoLevelSetGenerator(), PropertyReadFile::PropertyReadFile(), RandomIC::RandomIC(), RankTwoTensorFromComponentProperties::RankTwoTensorFromComponentProperties(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObjectBase::readExodusIIOrNemesis(), SolutionUserObjectBase::readXda(), ReferenceResidualConvergence::ReferenceResidualConvergence(), RefineBlockGenerator::RefineBlockGenerator(), RefineSidesetGenerator::RefineSidesetGenerator(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), restoreSolutions(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), setLinearConvergenceNames(), setNonlinearConvergenceNames(), MooseMesh::setPartitioner(), NodeSetsGeneratorBase::setup(), SideSetsGeneratorBase::setup(), SurfaceMeshGeneratorBase::setup(), CylinderComponent::setupComponent(), NEML2Action::setupDerivativeMappings(), NEML2Action::setupInputMappings(), MultiSystemSolveObject::setupMultiSystemFixedPointRelaxationFactors(), MoveNodesByParsedExpressionModifier::setupNodalOutputVariables(), NEML2Action::setupParameterDerivativeMappings(), NEML2Action::setupParameterMappings(), SetupQuadratureAction::SetupQuadratureAction(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideValueSampler::SideValueSampler(), SingleRankPartitioner::SingleRankPartitioner(), SphericalGridDivision::SphericalGridDivision(), StitchBoundaryMeshGenerator::StitchBoundaryMeshGenerator(), StitchMeshGenerator::StitchMeshGenerator(), SurfaceSubdomainsDelaunayRemesher::SurfaceSubdomainsDelaunayRemesher(), SymmetryTransformGenerator::SymmetryTransformGenerator(), TagVectorAux::TagVectorAux(), XYFrontalDelaunayGenerator::targetArea(), Terminator::Terminator(), TimeDerivativeAux::TimeDerivativeAux(), Transfer::Transfer(), TransformGenerator::TransformGenerator(), TransientMultiApp::TransientMultiApp(), CylinderComponent::translation(), MeshTriangulationUtils::triangulateWithDelaunay(), TriToQuadConverter::TriToQuadConverter(), ParsedCurveGenerator::tSectionSpaceDefiner(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), UserObjectBase::UserObjectBase(), Checkpoint::validateExecuteOn(), ParsedAux::validateGenericVectorNames(), SolutionAux::validateVariable(), MFEMProblem::validateVariableNumericType(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), VolumeAux::VolumeAux(), WebServerControl::WebServerControl(), XYDelaunayGenerator::XYDelaunayGenerator(), XYFrontalDelaunayGenerator::XYFrontalDelaunayGenerator(), XYMeshLineCutter::XYMeshLineCutter(), XYQuadrilateralMeshFromBoundaryCurve::XYQuadrilateralMeshFromBoundaryCurve(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

◆ parameters()

const InputParameters & MooseBase::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 131 of file MooseBase.h.

131{ return _pars; }

Referenced by AddActionComponentAction::act(), CommonOutputAction::act(), CSGOnlyAction::act(), MeshOnlyAction::act(), SetupDebugAction::act(), SplitMeshAction::act(), Action::Action(), addAnyRedistributers(), addAuxKernel(), MFEMProblem::addAuxKernel(), addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), MFEMProblem::addAuxVariable(), addBoundaryCondition(), MFEMProblem::addBoundaryCondition(), addConstraint(), addConvergence(), addDamper(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), addDefaultMultiAppFixedPointConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), addDefaultNonlinearConvergence(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), addDefaultSteadyStateConvergence(), addDGKernel(), addDiracKernel(), addDistribution(), MFEMProblem::addFESpace(), MFEMProblem::addFESpaceHierarchy(), addFunction(), MFEMProblem::addFunction(), addFunctorMaterial(), MFEMProblem::addFunctorMaterial(), addFVBC(), addFVGradientMethod(), addFVInitialCondition(), addFVInterfaceKernel(), addFVInterpolationMethod(), addFVKernel(), MFEMProblem::addGridFunction(), addHDGKernel(), MFEMProblem::addImagComponentToBC(), MFEMProblem::addImagComponentToKernel(), addIndicator(), MFEMProblem::addIndicator(), addInitialCondition(), MFEMProblem::addInitialCondition(), DiffusionPhysicsBase::addInitialConditions(), addInterfaceKernel(), addInterfaceMaterial(), addKernel(), MFEMProblem::addKernel(), addLinearFVBC(), addLinearFVKernel(), FEProblem::addLineSearch(), addMarker(), MFEMProblem::addMarker(), addMaterial(), addMaterialHelper(), addMeshDivision(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), MFEMProblem::addMFEMProblemComposer(), MFEMProblem::addMFEMSolver(), addMultiApp(), addNodalKernel(), MFEMProblem::addObject(), addObject(), addObjectParamsHelper(), addOutput(), addPostprocessor(), MFEMProblem::addPostprocessor(), addPredictor(), MFEMProblem::addRealComponentToBC(), MFEMProblem::addRealComponentToKernel(), addReporter(), addSampler(), addScalarKernel(), MFEMProblem::addSubMesh(), addTimeIntegrator(), addTransfer(), MFEMProblem::addTransfer(), addUserObject(), DisplacedProblem::addVariable(), MFEMEigenproblem::addVariable(), MFEMProblem::addVariable(), addVectorPostprocessor(), MFEMProblem::addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), assemble_l2(), Moose::assemble_matrix(), Action::associateWithParameter(), AuxKernelBase::AuxKernelBase(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), MooseMesh::buildTypedMesh(), MeshGenerator::checkGetMesh(), PostprocessorInterface::checkParam(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), SampledOutput::cloneMesh(), Moose::compute_bounds(), Moose::compute_jacobian(), Moose::compute_nearnullspace(), Moose::compute_nullspace(), Moose::compute_postcheck(), Moose::compute_transpose_nullspace(), LibtorchNeuralNetControl::conditionalParameterError(), Console::Console(), MooseMeshUtils::copyIntoMesh(), CommonOutputAction::create(), MultiApp::createApp(), Postprocessor::declareValue(), DumpObjectsProblem::deduceNecessaryParameters(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::DumpObjectsProblem(), EigenProblem::EigenProblem(), EigenProblemSolve::EigenProblemSolve(), ElementMaterialSampler::ElementMaterialSampler(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), Executor::Executor(), Exodus::Exodus(), ElementSubdomainModifierBase::extrapolatePolynomial(), FEProblem::FEProblem(), FixedPointSolve::FixedPointSolve(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GapValueAux::GapValueAux(), ParsedSubdomainGeneratorBase::generate(), ActionWarehouse::getCurrentActionName(), ExecutorInterface::getExecutor(), Material::getMaterial(), Moose::PeriodicBCHelper::getParams(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), UserObjectInterface::getUserObjectName(), AuxKernelBase::getVariableHelper(), VectorPostprocessorInterface::getVectorPostprocessorName(), GhostingUserObject::GhostingUserObject(), MeshGeneratorSystem::hasDataDrivenAllowed(), AttribSystem::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), FullSolveMultiApp::initialSetup(), initNullSpaceVectors(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MooseObject::isKokkosObject(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MooseApp::MooseApp(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseVariableInterface< T >::MooseVariableInterface(), MultiApp::MultiApp(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NodeFaceConstraint::NodeFaceConstraint(), ConsoleUtils::outputLegacyInformation(), OverlayMeshGenerator::OverlayMeshGenerator(), ParsedReporterBase::ParsedReporterBase(), ParsedScalarReporter::ParsedScalarReporter(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), NEML2Action::printSummary(), ProjectedStatefulMaterialStorageAction::processProperty(), PropertyReadFile::PropertyReadFile(), PseudoTimestep::PseudoTimestep(), RandomIC::RandomIC(), ReferenceResidualConvergence::ReferenceResidualConvergence(), InputParameterWarehouse::removeInputParameters(), setAuxKernelParamsAndLog(), setInputParametersFEProblem(), FEProblem::setInputParametersFEProblem(), setResidualObjectParamsAndLog(), SideSetsGeneratorBase::setup(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), Moose::PetscSupport::storePetscOptions(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), Transfer::Transfer(), TransientBase::TransientBase(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

◆ paramInfo()

template<typename... Args>
void MooseBase::paramInfo ( const std::string &  param,
Args...  args 
) const
inherited

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 471 of file MooseBase.h.

472{
473 mooseInfo(_pars.paramMessage(param, std::forward<Args>(args)...));
474}
std::string paramMessage(const std::string &param, Args... args) const

Referenced by GridPartitioner::_do_partition(), ComboMarker::ComboMarker(), Control::Control(), execMultiApps(), FunctorIC::FunctorIC(), and TransientMultiApp::TransientMultiApp().

◆ paramWarning() [1/2]

template<typename... Args>
void MooseBase::paramWarning ( const std::string &  param,
Args...  args 
) const
inherited

Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseWarning - only printing a message using the given args.

Definition at line 464 of file MooseBase.h.

465{
466 mooseWarning(_pars.paramMessage(param, std::forward<Args>(args)...));
467}

◆ paramWarning() [2/2]

template<typename... Args>
void SolutionInvalidInterface::paramWarning ( const std::string &  param,
Args...  args 
) const
inlineinherited

◆ parentOutputPositionChanged()

void FEProblemBase::parentOutputPositionChanged ( )

Calls parentOutputPositionChanged() on all sub apps.

Definition at line 5071 of file FEProblemBase.C.

5072{
5073 for (const auto & it : _multi_apps)
5074 {
5075 const auto & objects = it.second.getActiveObjects();
5076 for (const auto & obj : objects)
5078 }
5079}
void parentOutputPositionChanged()
Calls parentOutputPositionChanged() on all sub apps.

Referenced by TransientBase::parentOutputPositionChanged().

◆ partitionConcurrentMultiApps()

void FEProblemBase::partitionConcurrentMultiApps ( )

Assign each multiapp that shares an 'execution_order_group' with others a disjoint subset of the ranks so that they can be solved concurrently (at most one child app per rank at a time).

Note that each MultiApp may have multiple child applications, and each child app may use more than one rank.

  • Only does anything when 'num_concurrent_multiapps' > 1.
  • Must be called before the sub-apps are created.

Definition at line 6133 of file FEProblemBase.C.

6134{
6136 return;
6137
6138 // Group the multiapps by execution order group. Only position-based multiapps are partitioned
6139 // here; sampler-style (non-positions) multiapps assign their own rank configuration.
6140 std::map<unsigned int, std::vector<std::shared_ptr<MultiApp>>> groups;
6141 for (const auto & multi_app : _multi_apps.getActiveObjects())
6142 if (multi_app->usingPositions())
6143 groups[multi_app->getParam<unsigned int>("execution_order_group")].push_back(multi_app);
6144
6145 // For the MultiApps that are using samplers, their partitioning is already handled there
6146 // so we just skipped them. But if they were to share an execution_order_group, we would crash
6147 // if using concurrent multiapps. So let's error.
6148 // For any other MultiApps that are not using positions, we would just need them to know
6149 // numGlobalApps() to benefit from this concurrent partitioning. We can allow them here in the
6150 // future.
6151 std::map<unsigned int, std::vector<std::shared_ptr<MultiApp>>> check_groups;
6152 for (const auto & multi_app : _multi_apps.getActiveObjects())
6153 check_groups[multi_app->getParam<unsigned int>("execution_order_group")].push_back(multi_app);
6154 for (const auto & [group_id, group] : check_groups)
6155 for (const auto & multi_app : group)
6156 if (group.size() > 1 && !multi_app->usingPositions())
6157 multi_app->paramError(
6158 "execution_order_group",
6159 "This MultiApp must be placed in its own execution order group as concurrent execution "
6160 "has not been implemented for this type of app at this time");
6161
6162 const auto n_procs = n_processors();
6163 const auto my_rank = processor_id();
6164
6165 for (const auto & [group_id, group] : groups)
6166 {
6167 // Nothing to run concurrently unless the group has more than one multiapp
6168 if (group.size() < 2)
6169 continue;
6170
6171 // Number of ranks handed to each multiapp. Start each at its per-app minimum (at least one
6172 // rank), then distribute the rest; caps prevent giving a multiapp more ranks than it could
6173 // spread its apps over at 'max_procs_per_app'. With the defaults (min 1, max unbounded) this
6174 // is just an even split.
6175 std::vector<processor_id_type> count(group.size());
6176 std::vector<processor_id_type> caps(group.size());
6177 std::vector<processor_id_type> mins(group.size());
6178 std::vector<processor_id_type> maxs(group.size());
6179 processor_id_type min_total = 0;
6180 for (const auto m : index_range(group))
6181 {
6182 // Each multiapp needs at least one rank, so a 'min_procs_per_app' of 0 is treated as 1
6183 mins[m] = group[m]->getParam<processor_id_type>("min_procs_per_app");
6184 maxs[m] = group[m]->getParam<processor_id_type>("max_procs_per_app");
6185 const auto n_apps_m = cast_int<processor_id_type>(group[m]->numGlobalApps());
6186 caps[m] = (maxs[m] >= n_procs) ? n_procs : std::min(n_procs, n_apps_m * maxs[m]);
6187 count[m] = mins[m];
6188 min_total += mins[m];
6189 }
6190
6191 if (min_total > n_procs)
6192 mooseError("Not enough MPI ranks to run the ",
6193 group.size(),
6194 " multiapps of 'execution_order_group' ",
6195 group_id,
6196 " concurrently: they need at least ",
6197 min_total,
6198 " ranks (from 'min_procs_per_app') but only ",
6199 n_procs,
6200 " are available. Reduce the number of concurrent multiapps, lower "
6201 "'min_procs_per_app', or run with more processors.");
6202
6203 // Hand out the remaining ranks round-robin to multiapps still below their cap
6204 processor_id_type remaining = n_procs - min_total;
6205 bool progress = true;
6206 while (remaining > 0 && progress)
6207 {
6208 progress = false;
6209 for (const auto m : index_range(group))
6210 if (remaining > 0 && count[m] < caps[m])
6211 {
6212 count[m]++;
6213 remaining--;
6214 progress = true;
6215 }
6216 }
6217 // Any leftover ranks (all multiapps already at their cap) simply run no app in this group.
6218
6219 // Assign each multiapp a contiguous, disjoint rank range and (re)initialize it on that range.
6220 // This is collective: every rank calls init() (hence buildComm's split) for every multiapp.
6221 processor_id_type offset = 0;
6222 for (const auto m : index_range(group))
6223 {
6224 LocalRankConfig cfg{0, 0, 0, 0, false, 0};
6225 if (my_rank >= offset && my_rank < offset + count[m])
6226 cfg = rankConfig(
6227 my_rank - offset, count[m], group[m]->numGlobalApps(), mins[m], maxs[m], false);
6228 group[m]->init(group[m]->numGlobalApps(), cfg);
6229 offset += count[m];
6230 }
6231 }
6232}
LocalRankConfig rankConfig(processor_id_type rank, processor_id_type nprocs, dof_id_type napps, processor_id_type min_app_procs, processor_id_type max_app_procs, bool batch_mode=false)
Returns app partitioning information relevant to the given rank for a multiapp scenario with the give...
Definition MultiApp.C:1369
processor_id_type n_processors() const
uint8_t processor_id_type
Holds app partitioning information relevant to the a particular rank for a multiapp scenario.
Definition MultiApp.h:47

◆ perfGraph()

PerfGraph & PerfGraphInterface::perfGraph ( )
inherited

Get the PerfGraph.

Definition at line 86 of file PerfGraphInterface.C.

87{
88 return _pg_moose_app.perfGraph();
89}
PerfGraph & perfGraph()
Get the PerfGraph for this app.
Definition MooseApp.h:176
MooseApp & _pg_moose_app
The MooseApp that owns the PerfGraph.

Referenced by CommonOutputAction::act(), PerfGraphData::finalize(), PerfGraphReporter::finalize(), and PerfGraphOutput::output().

◆ petscOptionsDatabase()

PetscOptions & FEProblemBase::petscOptionsDatabase ( )
inline

◆ petscOptionsInserted()

bool & FEProblemBase::petscOptionsInserted ( )
inline

If PETSc options are already inserted.

Definition at line 2693 of file FEProblemBase.h.

Referenced by EigenProblemSolve::initialSetup().

◆ possiblyRebuildGeomSearchPatches()

void FEProblemBase::possiblyRebuildGeomSearchPatches ( )
virtual

Definition at line 8825 of file FEProblemBase.C.

8826{
8827 if (_displaced_problem) // Only need to do this if things are moving...
8828 {
8829 TIME_SECTION("possiblyRebuildGeomSearchPatches", 5, "Rebuilding Geometric Search Patches");
8830
8831 switch (_mesh.getPatchUpdateStrategy())
8832 {
8833 case Moose::Never:
8834 break;
8835 case Moose::Iteration:
8836 // Update the list of ghosted elements at the start of the time step
8839
8840 _displaced_problem->geomSearchData().updateGhostedElems();
8842
8843 // The commands below ensure that the sparsity of the Jacobian matrix is
8844 // augmented at the start of the time step using neighbor nodes from the end
8845 // of the previous time step.
8846
8848
8849 // This is needed to reinitialize PETSc output
8851
8852 break;
8853
8854 case Moose::Auto:
8855 {
8856 Real max = _displaced_problem->geomSearchData().maxPatchPercentage();
8857 _communicator.max(max);
8858
8859 // If we haven't moved very far through the patch
8860 if (max < 0.4)
8861 break;
8862 }
8863 libmesh_fallthrough();
8864
8865 // Let this fall through if things do need to be updated...
8866 case Moose::Always:
8867 // Flush output here to see the message before the reinitialization, which could take a
8868 // while
8869 _console << "\n\nUpdating geometric search patches\n" << std::endl;
8870
8873
8874 _displaced_problem->geomSearchData().clearNearestNodeLocators();
8876
8878
8879 // This is needed to reinitialize PETSc output
8881 }
8882 }
8883}
virtual void initPetscOutputAndSomeSolverSettings()
Reinitialize PETSc output for proper linear/nonlinear iteration display.
void clearNearestNodeLocators()
Clear out the Penetration Locators so they will redo the search.
void updateGhostedElems()
Updates the list of ghosted elements at the start of each time step for the nonlinear iteration patch...
const Moose::PatchUpdateType & getPatchUpdateStrategy() const
Get the current patch update strategy.
Definition MooseMesh.C:3477
@ Iteration

Referenced by solve().

◆ postExecute()

void FEProblemBase::postExecute ( )
virtual

Method called at the end of the simulation.

Definition at line 6359 of file FEProblemBase.C.

6360{
6361 const auto & multi_apps = _multi_apps.getActiveObjects();
6362
6363 for (const auto & multi_app : multi_apps)
6364 multi_app->postExecute();
6365}
virtual void postExecute()
Method called at the end of the simulation.

Referenced by Eigenvalue::execute(), SteadyBase::execute(), TransientBase::execute(), and MFEMSteady::execute().

◆ predictorCleanup()

void FEProblemBase::predictorCleanup ( NumericVector< libMesh::Number > &  ghosted_solution)
virtual

Perform cleanup tasks after application of predictor to solution vector.

Parameters
ghosted_solutionGhosted solution vector

Definition at line 8717 of file FEProblemBase.C.

8718{
8719}

Referenced by NonlinearSystemBase::setInitialSolution().

◆ prepare() [1/2]

void FEProblemBase::prepare ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1913 of file FEProblemBase.C.

1914{
1915 for (const auto i : index_range(_solver_systems))
1916 {
1917 _assembly[tid][i]->reinit(elem);
1918 _solver_systems[i]->prepare(tid);
1919
1920 if (i < _num_nl_sys)
1921 {
1922 // This method is called outside of residual/Jacobian callbacks during initial condition
1923 // evaluation
1925 _assembly[tid][i]->prepareJacobianBlock();
1926 _assembly[tid][i]->prepareResidual();
1928 _assembly[tid][i]->prepareNonlocal();
1929 }
1930 }
1931 _aux->prepare(tid);
1932
1933 if (_displaced_problem &&
1934 // _reinit_displaced_neighbor applies to interface type objects which will do computations
1935 // based on both elem and neighbor. Consequently, despite what you might think by its name, we
1936 // must make sure we prepare the displaced elem
1938 {
1939 _displaced_problem->prepare(_displaced_mesh->elemPtr(elem->id()), tid);
1941 _displaced_problem->prepareNonlocal(tid);
1942 }
1943}
const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing the Jacobian.
Definition SubProblem.h:695

Referenced by NodalPatchRecovery::compute(), ComputeElemDampingThread::onElement(), ComputeIndicatorThread::onElement(), ComputeMarkerThread::onElement(), ComputeMaterialsObjectThread::onElement(), ComputeUserObjectsThread::onElement(), and ComputeInitialConditionThread::operator()().

◆ prepare() [2/2]

void FEProblemBase::prepare ( const Elem *  elem,
unsigned int  ivar,
unsigned int  jvar,
const std::vector< dof_id_type > &  dof_indices,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1957 of file FEProblemBase.C.

1962{
1963 for (const auto i : index_range(_nl))
1964 {
1965 _assembly[tid][i]->reinit(elem);
1966 _nl[i]->prepare(tid);
1967 }
1968
1969 _aux->prepare(tid);
1970 const auto current_nl_sys_num = _current_nl_sys->number();
1971 _assembly[tid][current_nl_sys_num]->prepareBlock(ivar, jvar, dof_indices);
1973 if (_nonlocal_cm[current_nl_sys_num](ivar, jvar) != 0)
1974 {
1976 _assembly[tid][current_nl_sys_num]->prepareBlockNonlocal(
1977 ivar, jvar, dof_indices, jv.allDofIndices());
1978 }
1979
1981 {
1982 _displaced_problem->prepare(_displaced_mesh->elemPtr(elem->id()), ivar, jvar, dof_indices, tid);
1984 if (_nonlocal_cm[current_nl_sys_num](ivar, jvar) != 0)
1985 {
1987 _displaced_problem->prepareBlockNonlocal(ivar, jvar, dof_indices, jv.allDofIndices(), tid);
1988 }
1989 }
1990}
virtual void prepare()=0
Prepare the elemental degrees of freedom.

◆ prepareAssembly()

void FEProblemBase::prepareAssembly ( const THREAD_ID  tid)
overridevirtual

◆ prepareAssemblyNeighbor()

void FEProblemBase::prepareAssemblyNeighbor ( const THREAD_ID  tid)
virtual

Begin a fresh neighbor accumulation phase by sizing and zeroing the neighbor blocks.

Definition at line 2048 of file FEProblemBase.C.

2049{
2050 _assembly[tid][_current_nl_sys->number()]->prepareNeighbor();
2051
2053 _displaced_problem->prepareAssemblyNeighbor(tid);
2054}

Referenced by NonlinearSystemBase::constraintJacobians().

◆ prepareFace()

void FEProblemBase::prepareFace ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1946 of file FEProblemBase.C.

1947{
1948 for (auto & nl : _nl)
1949 nl->prepareFace(tid, true);
1950 _aux->prepareFace(tid, false);
1951
1953 _displaced_problem->prepareFace(_displaced_mesh->elemPtr(elem->id()), tid);
1954}
virtual void prepareFace(const Elem *elem, const THREAD_ID tid) override

Referenced by ComputeUserObjectsThread::onInterface(), and ComputeUserObjectsThread::onInternalSide().

◆ prepareFaceShapes()

void FEProblemBase::prepareFaceShapes ( unsigned int  var,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2316 of file FEProblemBase.C.

2317{
2318 _assembly[tid][_current_nl_sys->number()]->copyFaceShapes(var);
2319}

Referenced by ComputeUserObjectsThread::onBoundary().

◆ prepareKokkosMaterials()

void FEProblemBase::prepareKokkosMaterials ( const std::unordered_set< unsigned int > &  consumer_needed_mat_props)

◆ prepareMaterials()

void FEProblemBase::prepareMaterials ( const std::unordered_set< unsigned int > &  consumer_needed_mat_props,
const SubdomainID  blk_id,
const THREAD_ID  tid 
)

Add the MooseVariables and the material properties that the current materials depend on to the dependency list.

Parameters
consumer_needed_mat_propsThe material properties needed by consumer objects (other than the materials themselves)
blk_idThe subdomain ID for which we are preparing our list of needed vars and props
tidThe thread ID we are preparing the requirements for

This MUST be done after the moose variable dependency list has been set for all the other objects using the setActiveElementalMooseVariables API!

Definition at line 4315 of file FEProblemBase.C.

4318{
4319 std::set<MooseVariableFEBase *> needed_moose_vars;
4320 std::unordered_set<unsigned int> needed_mat_props;
4321
4322 if (_all_materials.hasActiveBlockObjects(blk_id, tid))
4323 {
4324 _all_materials.updateVariableDependency(needed_moose_vars, tid);
4325 _all_materials.updateBlockMatPropDependency(blk_id, needed_mat_props, tid);
4326 }
4327
4328 const auto & ids = _mesh.getSubdomainBoundaryIds(blk_id);
4329 for (const auto id : ids)
4330 {
4331 _materials.updateBoundaryVariableDependency(id, needed_moose_vars, tid);
4332 _materials.updateBoundaryMatPropDependency(id, needed_mat_props, tid);
4333 }
4334
4335 const auto & current_active_elemental_moose_variables = getActiveElementalMooseVariables(tid);
4336 needed_moose_vars.insert(current_active_elemental_moose_variables.begin(),
4337 current_active_elemental_moose_variables.end());
4338
4339 needed_mat_props.insert(consumer_needed_mat_props.begin(), consumer_needed_mat_props.end());
4340
4341 setActiveElementalMooseVariables(needed_moose_vars, tid);
4342 setActiveMaterialProperties(needed_mat_props, tid);
4343}
void setActiveMaterialProperties(const std::unordered_set< unsigned int > &mat_prop_ids, const THREAD_ID tid)
Record and set the material properties required by the current computing thread.
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFEBase * > &moose_vars, const THREAD_ID tid) override
Set the MOOSE variables to be reinited on each element.
const std::set< BoundaryID > & getSubdomainBoundaryIds(const SubdomainID subdomain_id) const
Get the list of boundary ids associated with the given subdomain id.
Definition MooseMesh.C:3561
void updateVariableDependency(std::set< MooseVariableFieldBase * > &needed_moose_vars, THREAD_ID tid=0) const
Update variable dependency vector.
void updateBlockMatPropDependency(SubdomainID id, std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0, const bool producer_only=false) const
void updateBoundaryVariableDependency(std::set< MooseVariableFieldBase * > &needed_moose_vars, THREAD_ID tid=0) const
bool hasActiveBlockObjects(THREAD_ID tid=0) const
void updateBoundaryMatPropDependency(std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0, const bool producer_only=false) const
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
Definition SubProblem.C:446

Referenced by ComputeIndicatorThread::subdomainChanged(), ComputeMarkerThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

◆ prepareNeighborShapes()

void FEProblemBase::prepareNeighborShapes ( unsigned int  var,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2322 of file FEProblemBase.C.

2323{
2324 _assembly[tid][_current_nl_sys->number()]->copyNeighborShapes(var);
2325}

◆ preparePRefinement()

void SubProblem::preparePRefinement ( )
inherited

Prepare DofMap and Assembly classes with our p-refinement information.

Definition at line 1337 of file SubProblem.C.

1338{
1339 for (const auto tid : make_range(numThreads()))
1340 for (const auto s : make_range(numNonlinearSystems()))
1341 assembly(tid, s).preparePRefinement();
1342}
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0

Referenced by init().

◆ prepareShapes()

void FEProblemBase::prepareShapes ( unsigned int  var,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2310 of file FEProblemBase.C.

2311{
2312 _assembly[tid][_current_nl_sys->number()]->copyShapes(var);
2313}

Referenced by ComputeUserObjectsThread::onElement().

◆ preserveMatrixSparsityPattern()

bool FEProblemBase::preserveMatrixSparsityPattern ( ) const
inline

Will return True if the executioner in use requires preserving the sparsity pattern of the matrices being formed during the solve.

This is usually the Jacobian.

Definition at line 2452 of file FEProblemBase.h.

◆ projectFunctionOnCustomRange()

void FEProblemBase::projectFunctionOnCustomRange ( ConstElemRange &  elem_range,
Number(*)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &)  func,
Gradient(*)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &)  func_grad,
const libMesh::Parameters &  params,
const std::vector< VariableName > &  target_vars 
)

Project a function onto a range of elements for a given variable.

Parameters
elem_rangeElement range to project on
funcFunction to project
func_gradGradient of the function
paramsParameters to pass to the function
target_varsvariable names to project

Definition at line 4025 of file FEProblemBase.C.

4036{
4037 mooseAssert(!Threads::in_threads,
4038 "We're performing a projection based on data from just the thread 0 variable, so any "
4039 "modifications to the variable solution must have been thread joined already");
4040
4041 std::unordered_map<unsigned int, std::vector<unsigned int>> sys_to_var_nums;
4042
4043 for (const auto & target_var : target_vars)
4044 {
4045 const auto sn = systemNumForVariable(target_var);
4046 const auto & var = getStandardVariable(0, target_var);
4047 sys_to_var_nums[sn].push_back(var.number());
4048 }
4049
4050 for (const auto & [sys_num, var_nums] : sys_to_var_nums)
4051 {
4052 System & libmesh_sys = getSystemBase(sys_num).system();
4053 libmesh_sys.project_solution(func, func_grad, params, elem_range, var_nums);
4054 }
4055}
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariable which may be in any system.
unsigned int systemNumForVariable(const VariableName &variable_name) const
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, std::optional< ConstElemRange > active_local_range=std::nullopt, std::optional< std::vector< unsigned int > > variable_numbers=std::nullopt) const

Referenced by ElementSubdomainModifierBase::extrapolatePolynomial().

◆ projectInitialConditionOnCustomRange()

void FEProblemBase::projectInitialConditionOnCustomRange ( libMesh::ConstElemRange &  elem_range,
ConstBndNodeRange &  bnd_node_range,
const std::optional< std::set< VariableName > > &  target_vars = std::nullopt 
)

Project initial conditions for custom elem_range and bnd_node_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step.

Parameters
elem_rangeElement range to project on
bnd_node_rangeBoundary node range to project on
target_varsSet of variable names to project ICs

Definition at line 3950 of file FEProblemBase.C.

3954{
3955 if (target_vars)
3956 {
3957 ComputeInitialConditionThread cic(*this, &(*target_vars));
3958 Threads::parallel_reduce(elem_range, cic, numThreads());
3959 }
3960 else
3961 {
3963 Threads::parallel_reduce(elem_range, cic, numThreads());
3964 }
3965
3966 // Need to close the solution vector here so that boundary ICs take precendence
3967 for (auto & nl : _nl)
3968 nl->solution().close();
3969 _aux->solution().close();
3970
3971 if (target_vars)
3972 {
3973 ComputeBoundaryInitialConditionThread cbic(*this, &(*target_vars));
3974 Threads::parallel_reduce(bnd_nodes, cbic, numThreads());
3975 }
3976 else
3977 {
3979 Threads::parallel_reduce(bnd_nodes, cbic, numThreads());
3980 }
3981
3982 for (auto & nl : _nl)
3983 nl->solution().close();
3984 _aux->solution().close();
3985
3986 // Also, load values into the SCALAR dofs
3987 // Note: We assume that all SCALAR dofs are on the
3988 // processor with highest ID
3990 {
3991 const auto & ics = _scalar_ics.getActiveObjects();
3992 for (const auto & ic : ics)
3993 {
3994 MooseVariableScalar & var = ic->variable();
3995
3996 if (target_vars && !target_vars->count(var.name()))
3997 continue;
3998
3999 var.reinit();
4000
4001 DenseVector<Number> vals(var.order());
4002 ic->compute(vals);
4003
4004 const unsigned int n_scalar_dofs = var.dofIndices().size();
4005 for (unsigned int i = 0; i < n_scalar_dofs; i++)
4006 {
4007 const auto global_index = var.dofIndices()[i];
4008 var.sys().solution().set(global_index, vals(i));
4009 var.setValue(i, vals(i));
4010 }
4011 }
4012 }
4013
4014 for (auto & nl : _nl)
4015 {
4016 nl->solution().close();
4017 nl->solution().localize(*nl->system().current_local_solution, nl->dofMap().get_send_list());
4018 }
4019
4020 _aux->solution().close();
4021 _aux->solution().localize(*_aux->sys().current_local_solution, _aux->dofMap().get_send_list());
4022}
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
void setValue(unsigned int i, Number value)
Set the nodal value for this variable (to keep everything up to date.
void reinit(bool reinit_for_derivative_reordering=false)
Fill out the VariableValue arrays from the system solution vector.
NumericVector< Number > & solution()
Definition SystemBase.h:215
virtual void set(const numeric_index_type i, const T value)=0

Referenced by ElementSubdomainModifierBase::applyIC(), and ActivateElementsUserObjectBase::initSolutions().

◆ projectSolution()

void FEProblemBase::projectSolution ( )

Definition at line 3884 of file FEProblemBase.C.

3885{
3886 TIME_SECTION("projectSolution", 2, "Projecting Initial Solutions")
3887
3889
3891 Threads::parallel_reduce(getCurrentAlgebraicElementRange(), cic, numThreads());
3892
3893 if (haveFV())
3894 {
3895 using ElemInfoRange = StoredRange<MooseMesh::const_elem_info_iterator, const ElemInfo *>;
3896 ElemInfoRange elem_info_range(_mesh.ownedElemInfoBegin(), _mesh.ownedElemInfoEnd());
3897
3899 Threads::parallel_reduce(elem_info_range, cfvic, numThreads());
3900 }
3901
3902 // Need to close the solution vector here so that boundary ICs take precendence
3903 for (auto & nl : _nl)
3904 nl->solution().close();
3905 _aux->solution().close();
3906
3907 // now run boundary-restricted initial conditions
3910
3911 for (auto & nl : _nl)
3912 nl->solution().close();
3913 _aux->solution().close();
3914
3915 // Also, load values into the SCALAR dofs
3916 // Note: We assume that all SCALAR dofs are on the
3917 // processor with highest ID
3919 {
3920 const auto & ics = _scalar_ics.getActiveObjects();
3921 for (const auto & ic : ics)
3922 {
3923 MooseVariableScalar & var = ic->variable();
3924 var.reinit();
3925
3926 DenseVector<Number> vals(var.order());
3927 ic->compute(vals);
3928
3929 const unsigned int n_scalar_dofs = var.dofIndices().size();
3930 for (unsigned int i = 0; i < n_scalar_dofs; i++)
3931 {
3932 const auto global_index = var.dofIndices()[i];
3933 var.sys().solution().set(global_index, vals(i));
3934 var.setValue(i, vals(i));
3935 }
3936 }
3937 }
3938
3939 for (auto & sys : _solver_systems)
3940 {
3941 sys->solution().close();
3942 sys->solution().localize(*sys->system().current_local_solution, sys->dofMap().get_send_list());
3943 }
3944
3945 _aux->solution().close();
3946 _aux->solution().localize(*_aux->sys().current_local_solution, _aux->dofMap().get_send_list());
3947}
Scope guard for starting and stopping Floating Point Exception Trapping.
elem_info_iterator ownedElemInfoEnd()
Definition MooseMesh.C:1484
elem_info_iterator ownedElemInfoBegin()
Iterators to owned faceInfo objects.
Definition MooseMesh.C:1476

Referenced by initialAdaptMesh().

◆ queryParam()

template<typename T >
const T * MooseBase::queryParam ( const std::string &  name) const
inherited

Query a parameter for the object.

If a parameter of the given name and type does not exist or if the parameter is not valid, nullptr will be returned

Parameters
nameThe name of the parameter
Returns
A pointer to the parameter value, if it exists

Definition at line 413 of file MooseBase.h.

414{
415 return _pars.queryParam<T>(name);
416}
const T * queryParam(const std::string &name) const
Query a parameter.

Referenced by MFEMExecutedObject::getRequestedItems(), and MFEMGeometricMultigridSolver::MFEMGeometricMultigridSolver().

◆ registerInvalidSolutionInternal()

InvalidSolutionID SolutionInvalidInterface::registerInvalidSolutionInternal ( const std::string &  message,
const bool  warning 
) const
protectedinherited

Definition at line 55 of file SolutionInvalidInterface.C.

57{
59 _si_moose_base.type(), message, warning);
60}
InvalidSolutionID registerInvalidity(const std::string &object_type, const std::string &message, const bool warning)
Call to register an invalid calculation.

◆ registerRandomInterface()

void FEProblemBase::registerRandomInterface ( RandomInterface &  random_interface,
const std::string &  name 
)

Definition at line 9676 of file FEProblemBase.C.

9677{
9678 auto insert_pair = moose_try_emplace(
9679 _random_data_objects, name, std::make_unique<RandomData>(*this, random_interface));
9680
9681 auto random_data_ptr = insert_pair.first->second.get();
9682 random_interface.setRandomDataPointer(random_data_ptr);
9683}
std::pair< typename M::iterator, bool > moose_try_emplace(M &m, const typename M::key_type &k, Args &&... args)
Function to mirror the behavior of the C++17 std::map::try_emplace() method (no hint).
Definition Moose.h:103
void setRandomDataPointer(RandomData *random_data)

Referenced by RandomInterface::setRandomResetFrequency().

◆ registerRestartableDataOnApp()

RestartableDataValue & Restartable::registerRestartableDataOnApp ( std::unique_ptr< RestartableDataValue >  data,
THREAD_ID  tid 
) const
privateinherited

Helper function for actually registering the restartable data.

Definition at line 63 of file Restartable.C.

65{
67 std::move(data), tid, _restartable_read_only, _metaname);
68}
RestartableDataValue & registerRestartableData(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool read_only, const RestartableDataMapName &metaname="")
Definition MooseApp.C:2458
const RestartableDataMapName _metaname
Restartable metadata name.
const bool _restartable_read_only
Flag for toggling read only status (see ReporterData)
MooseApp & _restartable_app
Reference to the application.

Referenced by Restartable::declareRestartableDataHelper().

◆ registerRestartableNameWithFilterOnApp()

void Restartable::registerRestartableNameWithFilterOnApp ( const std::string &  name,
Moose::RESTARTABLE_FILTER  filter 
)
privateinherited

Helper function for actually registering the restartable data.

Definition at line 71 of file Restartable.C.

73{
75}
void registerRestartableNameWithFilter(const std::string &name, Moose::RESTARTABLE_FILTER filter)
NOTE: This is an internal function meant for MOOSE use only!
Definition MooseApp.C:1710

Referenced by Restartable::declareRecoverableData().

◆ registerTimedSection() [1/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 61 of file PerfGraphInterface.C.

63{
64 const auto timed_section_name = timedSectionName(section_name);
65 if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
66 return moose::internal::getPerfGraphRegistry().registerSection(timed_section_name, level);
67 else
68 return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
69}
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID @section_name The name of the section.
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ registerTimedSection() [2/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level,
const std::string &  live_message,
const bool  print_dots = true 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
live_messageThe message to be printed to the screen during execution
print_dotsWhether or not progress dots should be printed for this section
Returns
The ID of the section - use when starting timing

Definition at line 72 of file PerfGraphInterface.C.

76{
77 const auto timed_section_name = timedSectionName(section_name);
78 if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
80 timedSectionName(section_name), level, live_message, print_dots);
81 else
82 return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
83}

◆ registerUnfilledFunctorRequest()

template<typename T >
void SubProblem::registerUnfilledFunctorRequest ( T *  functor_interface,
const std::string &  functor_name,
const THREAD_ID  tid 
)
inherited

Register an unfulfilled functor request.

◆ reinitBecauseOfGhostingOrNewGeomObjects()

void FEProblemBase::reinitBecauseOfGhostingOrNewGeomObjects ( bool  mortar_changed = false)
protected

Call when it is possible that the needs for ghosted elements has changed.

Parameters
mortar_changedWhether an update of mortar data has been requested since the last EquationSystems (re)initialization

Definition at line 5782 of file FEProblemBase.C.

5783{
5784 TIME_SECTION("reinitBecauseOfGhostingOrNewGeomObjects",
5785 3,
5786 "Reinitializing Because of Geometric Search Objects");
5787
5788 // Need to see if _any_ processor has ghosted elems or geometry objects.
5789 bool needs_reinit = !_ghosted_elems.empty();
5790 needs_reinit = needs_reinit || !_geometric_search_data._nearest_node_locators.empty() ||
5791 (_mortar_data->hasObjects() && mortar_changed);
5792 needs_reinit =
5793 needs_reinit || (_displaced_problem &&
5794 (!_displaced_problem->geomSearchData()._nearest_node_locators.empty() ||
5795 (_mortar_data->hasDisplacedObjects() && mortar_changed)));
5796 _communicator.max(needs_reinit);
5797
5798 if (needs_reinit)
5799 {
5800 // Call reinit to get the ghosted vectors correct now that some geometric search has been done
5801 es().reinit();
5802
5803 if (_displaced_mesh)
5804 _displaced_problem->es().reinit();
5805 }
5806}
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators

Referenced by meshChanged(), possiblyRebuildGeomSearchPatches(), and updateMortarMesh().

◆ reinitDirac()

bool FEProblemBase::reinitDirac ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtual

Returns true if the Problem has Dirac kernels it needs to compute on elem.

The maximum number of qps can rise if several Dirac points are added to a single element. In that case we need to resize the zeros to compensate.

Implements SubProblem.

Definition at line 2361 of file FEProblemBase.C.

2362{
2363 std::vector<Point> & points = _dirac_kernel_info.getPoints()[elem].first;
2364
2365 unsigned int n_points = points.size();
2366
2367 if (n_points)
2368 {
2369 if (n_points > _max_qps)
2370 {
2371 _max_qps = n_points;
2372
2377 unsigned int max_qpts = getMaxQps();
2378 for (unsigned int tid = 0; tid < numThreads(); ++tid)
2379 {
2380 // the highest available order in libMesh is 43
2381 _scalar_zero[tid].resize(libMesh::FORTYTHIRD, 0);
2382 _zero[tid].resize(max_qpts, 0);
2383 _grad_zero[tid].resize(max_qpts, RealGradient(0.));
2384 _second_zero[tid].resize(max_qpts, RealTensor(0.));
2385 _vector_zero[tid].resize(max_qpts, RealGradient(0.));
2386 _vector_curl_zero[tid].resize(max_qpts, RealGradient(0.));
2387 }
2388 }
2389
2390 for (const auto i : index_range(_nl))
2391 {
2392 _assembly[tid][i]->reinitAtPhysical(elem, points);
2393 _nl[i]->prepare(tid);
2394 }
2395 _aux->prepare(tid);
2396
2397 reinitElem(elem, tid);
2398 }
2399
2400 _assembly[tid][_current_nl_sys->number()]->prepare();
2402 _assembly[tid][_current_nl_sys->number()]->prepareNonlocal();
2403
2404 bool have_points = n_points > 0;
2406 {
2407 have_points |= _displaced_problem->reinitDirac(_displaced_mesh->elemPtr(elem->id()), tid);
2409 _displaced_problem->prepareNonlocal(tid);
2410 }
2411
2412 return have_points;
2413}
MultiPointMap & getPoints()
Returns a writeable reference to the _points container.
virtual void reinitElem(const Elem *elem, const THREAD_ID tid) override

Referenced by ComputeDiracThread::onElement().

◆ reinitElem()

void FEProblemBase::reinitElem ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtual

◆ reinitElemFace() [1/2]

void FEProblemBase::reinitElemFace ( const Elem *  elem,
unsigned int  side,
BoundaryID  ,
const THREAD_ID  tid 
)

Definition at line 2448 of file FEProblemBase.C.

2452{
2454 "reinitElemFace with a BoundaryID argument is deprecated because the boundary id was never "
2455 "used. Please call reinitElemFace without the BoundaryID argument instead");
2456
2457 reinitElemFace(elem, side, tid);
2458}
void reinitElemFace(const Elem *elem, unsigned int side, BoundaryID, const THREAD_ID tid)

Referenced by ComputeMaterialsObjectThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), ComputeMaterialsObjectThread::onInterface(), NonlinearThread::prepareFace(), and reinitElemFace().

◆ reinitElemFace() [2/2]

void FEProblemBase::reinitElemFace ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2461 of file FEProblemBase.C.

2462{
2463 for (const auto i : index_range(_solver_systems))
2464 {
2465 _assembly[tid][i]->reinit(elem, side);
2466 _solver_systems[i]->reinitElemFace(elem, side, tid);
2467 }
2468 _aux->reinitElemFace(elem, side, tid);
2469
2471 _displaced_problem->reinitElemFace(_displaced_mesh->elemPtr(elem->id()), side, tid);
2472}

◆ reinitElemFaceRef()

void FEProblemBase::reinitElemFaceRef ( const Elem *  elem,
unsigned int  side,
Real  tolerance,
const std::vector< Point > *const  pts,
const std::vector< Real > *const  weights = nullptr,
const THREAD_ID  tid = 0 
)
overridevirtual

reinitialize FE objects on a given element on a given side at a given set of reference points and then compute variable data.

Note that this method makes no assumptions about what's been called beforehand, e.g. you don't have to call some prepare method before this one. This is an all-in-one reinit

Reimplemented from SubProblem.

Definition at line 10066 of file FEProblemBase.C.

10072{
10073 SubProblem::reinitElemFaceRef(elem, side, tolerance, pts, weights, tid);
10074
10076 _displaced_problem->reinitElemFaceRef(
10077 _displaced_mesh->elemPtr(elem->id()), side, tolerance, pts, weights, tid);
10078}
virtual void reinitElemFaceRef(const Elem *elem, unsigned int side, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0)
reinitialize FE objects on a given element on a given side at a given set of reference points and the...
Definition SubProblem.C:874

Referenced by Moose::Mortar::loopOverMortarSegments().

◆ reinitElemNeighborAndLowerD()

void FEProblemBase::reinitElemNeighborAndLowerD ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2580 of file FEProblemBase.C.

2583{
2584 reinitNeighbor(elem, side, tid);
2585
2586 const Elem * lower_d_elem = _mesh.getLowerDElem(elem, side);
2587 if (lower_d_elem && _mesh.interiorLowerDBlocks().count(lower_d_elem->subdomain_id()) > 0)
2588 reinitLowerDElem(lower_d_elem, tid);
2589 else
2590 {
2591 // with mesh refinement, lower-dimensional element might be defined on neighbor side
2592 auto & neighbor = _assembly[tid][0]->neighbor();
2593 auto & neighbor_side = _assembly[tid][0]->neighborSide();
2594 const Elem * lower_d_elem_neighbor = _mesh.getLowerDElem(neighbor, neighbor_side);
2595 if (lower_d_elem_neighbor &&
2596 _mesh.interiorLowerDBlocks().count(lower_d_elem_neighbor->subdomain_id()) > 0)
2597 {
2598 auto qps = _assembly[tid][0]->qPointsFaceNeighbor().stdVector();
2599 std::vector<Point> reference_points;
2600 FEMap::inverse_map(
2601 lower_d_elem_neighbor->dim(), lower_d_elem_neighbor, qps, reference_points);
2602 reinitLowerDElem(lower_d_elem_neighbor, tid, &reference_points);
2603 }
2604 }
2605
2607 _displaced_problem->reinitElemNeighborAndLowerD(
2608 _displaced_mesh->elemPtr(elem->id()), side, tid);
2609}
virtual void reinitLowerDElem(const Elem *lower_d_elem, const THREAD_ID tid, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
virtual void reinitNeighbor(const Elem *elem, unsigned int side, const THREAD_ID tid) override
const Elem * getLowerDElem(const Elem *, unsigned short int) const
Returns a const pointer to a lower dimensional element that corresponds to a side of a higher dimensi...
Definition MooseMesh.C:1648

Referenced by ComputeMaterialsObjectThread::onInternalSide(), and NonlinearThread::onInternalSide().

◆ reinitElemPhys()

void FEProblemBase::reinitElemPhys ( const Elem *  elem,
const std::vector< Point > &  phys_points_in_elem,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2427 of file FEProblemBase.C.

2430{
2431 mooseAssert(_mesh.queryElemPtr(elem->id()) == elem,
2432 "Are you calling this method with a displaced mesh element?");
2433
2434 for (const auto i : index_range(_solver_systems))
2435 {
2436 _assembly[tid][i]->reinitAtPhysical(elem, phys_points_in_elem);
2437 _solver_systems[i]->prepare(tid);
2438 _assembly[tid][i]->prepare();
2440 _assembly[tid][i]->prepareNonlocal();
2441 }
2442 _aux->prepare(tid);
2443
2444 reinitElem(elem, tid);
2445}
virtual Elem * queryElemPtr(const dof_id_type i)
Definition MooseMesh.C:3189

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute().

◆ reinitFVFace()

void SubProblem::reinitFVFace ( const THREAD_ID  tid,
const FaceInfo &  fi 
)
inherited

reinitialize the finite volume assembly data for the provided face and thread

Definition at line 1289 of file SubProblem.C.

1290{
1291 for (const auto nl : make_range(numNonlinearSystems()))
1292 assembly(tid, nl).reinitFVFace(fi);
1293}
void reinitFVFace(const THREAD_ID tid, const FaceInfo &fi)
reinitialize the finite volume assembly data for the provided face and thread

◆ reinitGeomSearch()

void SubProblem::reinitGeomSearch ( )
inherited

reinitialize this object's geometric search data, e.g.

do things like clear and re-add quadrature nodes

Definition at line 1373 of file SubProblem.C.

1374{
1376}
virtual GeometricSearchData & geomSearchData()=0

◆ reinitKokkosMaterials()

void FEProblemBase::reinitKokkosMaterials ( )

◆ reinitLowerDElem()

void FEProblemBase::reinitLowerDElem ( const Elem *  lower_d_elem,
const THREAD_ID  tid,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)
overridevirtual

Reimplemented from SubProblem.

Definition at line 2475 of file FEProblemBase.C.

2479{
2480 SubProblem::reinitLowerDElem(lower_d_elem, tid, pts, weights);
2481
2483 _displaced_problem->reinitLowerDElem(
2484 _displaced_mesh->elemPtr(lower_d_elem->id()), tid, pts, weights);
2485}
virtual void reinitLowerDElem(const Elem *lower_d_elem, const THREAD_ID tid, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)
Definition SubProblem.C:949

Referenced by ComputeUserObjectsThread::onBoundary(), NonlinearThread::prepareFace(), and reinitElemNeighborAndLowerD().

◆ reinitMaterials()

void FEProblemBase::reinitMaterials ( SubdomainID  blk_id,
const THREAD_ID  tid,
bool  swap_stateful = true 
)

Definition at line 4346 of file FEProblemBase.C.

4347{
4349 {
4350 auto && elem = _assembly[tid][0]->elem();
4351 unsigned int n_points = _assembly[tid][0]->qRule()->n_points();
4352
4353 auto & material_data = _material_props.getMaterialData(tid);
4354 material_data.resize(n_points);
4355
4356 // Only swap if requested
4357 if (swap_stateful)
4358 material_data.swap(*elem);
4359
4361 material_data.reset(_discrete_materials.getActiveBlockObjects(blk_id, tid));
4362
4363 if (_materials.hasActiveBlockObjects(blk_id, tid))
4364 material_data.reinit(_materials.getActiveBlockObjects(blk_id, tid));
4365 }
4366}
bool hasActiveMaterialProperties(const THREAD_ID tid) const
Method to check whether or not a list of active material roperties has been set.
void resize(unsigned int n_qpoints)
Resize the data to hold properties for n_qpoints quadrature points.

Referenced by NodalPatchRecovery::compute(), ComputeDiracThread::onElement(), ComputeIndicatorThread::onElement(), ComputeMarkerThread::onElement(), and ComputeUserObjectsThread::onElement().

◆ reinitMaterialsBoundary()

void FEProblemBase::reinitMaterialsBoundary ( BoundaryID  boundary_id,
const THREAD_ID  tid,
bool  swap_stateful = true,
const std::deque< MaterialBase * > *  reinit_mats = nullptr 
)

reinit materials on a boundary

Parameters
boundary_idThe boundary on which to reinit corresponding materials
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
execute_statefulWhether to execute material objects that have stateful properties. This should be false when for example executing material objects for mortar contexts in which stateful properties don't make sense
reinit_matsspecific list of materials to reinit. Used notably in the context of mortar with stateful elements

Definition at line 4491 of file FEProblemBase.C.

4495{
4496 if (hasActiveMaterialProperties(tid) && needBoundaryMaterialOnSide(boundary_id, tid))
4497 {
4498 auto && elem = _assembly[tid][0]->elem();
4499 unsigned int side = _assembly[tid][0]->side();
4500 unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4501
4502 auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4503 bnd_material_data.resize(n_points);
4504
4505 if (swap_stateful && !bnd_material_data.isSwapped())
4506 bnd_material_data.swap(*elem, side);
4507
4508 if (_discrete_materials.hasActiveBoundaryObjects(boundary_id, tid))
4509 bnd_material_data.reset(_discrete_materials.getActiveBoundaryObjects(boundary_id, tid));
4510
4511 if (reinit_mats)
4512 bnd_material_data.reinit(*reinit_mats);
4513 else if (_materials.hasActiveBoundaryObjects(boundary_id, tid))
4514 bnd_material_data.reinit(_materials.getActiveBoundaryObjects(boundary_id, tid));
4515 }
4516}
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const

Referenced by Moose::Mortar::loopOverMortarSegments(), ComputeUserObjectsThread::onBoundary(), ComputeUserObjectsThread::onInterface(), NonlinearThread::onInterface(), and NonlinearThread::prepareFace().

◆ reinitMaterialsFace()

void FEProblemBase::reinitMaterialsFace ( SubdomainID  blk_id,
const THREAD_ID  tid,
bool  swap_stateful = true,
const std::deque< MaterialBase * > *  reinit_mats = nullptr 
)

reinit materials on element faces

Parameters
blk_idThe subdomain on which the element owning the face lives
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
reinit_matsspecific list of materials to reinit. Used notably in the context of mortar with stateful elements

Definition at line 4369 of file FEProblemBase.C.

4373{
4374 // we reinit more often than needed here because we dont have a way to check whether
4375 // we need to compute the face materials on a particular (possibly external) face
4377 {
4378 auto && elem = _assembly[tid][0]->elem();
4379 unsigned int side = _assembly[tid][0]->side();
4380 unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4381
4382 auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4383 bnd_material_data.resize(n_points);
4384
4385 if (swap_stateful && !bnd_material_data.isSwapped())
4386 bnd_material_data.swap(*elem, side);
4387
4388 if (_discrete_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4389 bnd_material_data.reset(
4390 _discrete_materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4391
4392 if (reinit_mats)
4393 bnd_material_data.reinit(*reinit_mats);
4394 else if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4395 bnd_material_data.reinit(
4396 _materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4397 }
4398}

Referenced by Moose::Mortar::loopOverMortarSegments(), ComputeIndicatorThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), NonlinearThread::onInternalSide(), and NonlinearThread::prepareFace().

◆ reinitMaterialsFaceOnBoundary()

void FEProblemBase::reinitMaterialsFaceOnBoundary ( const BoundaryID  boundary_id,
const SubdomainID  blk_id,
const THREAD_ID  tid,
const bool  swap_stateful = true,
const std::deque< MaterialBase * > *const  reinit_mats = nullptr 
)

reinit materials on element faces on a boundary (internal or external) This specific routine helps us not reinit when don't need to

Parameters
boundary_idThe boundary on which the face belongs
blk_idThe block id to which the element (who owns the face) belong
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
reinit_matsspecific list of materials to reinit. Used notably in the context of mortar with stateful elements

Definition at line 4401 of file FEProblemBase.C.

4406{
4407 if (hasActiveMaterialProperties(tid) && (needBoundaryMaterialOnSide(boundary_id, tid) ||
4408 needInterfaceMaterialOnSide(boundary_id, tid) ||
4410 {
4411 const auto * const elem = _assembly[tid][0]->elem();
4412 unsigned int side = _assembly[tid][0]->side();
4413 unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4414
4415 auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4416 bnd_material_data.resize(n_points);
4417
4418 if (swap_stateful && !bnd_material_data.isSwapped())
4419 bnd_material_data.swap(*elem, side);
4420
4421 if (_discrete_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4422 bnd_material_data.reset(
4423 _discrete_materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4424
4425 if (reinit_mats)
4426 bnd_material_data.reinit(*reinit_mats);
4427 else if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4428 bnd_material_data.reinit(
4429 _materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4430 }
4431}

Referenced by ComputeUserObjectsThread::onBoundary(), ComputeUserObjectsThread::onInterface(), NonlinearThread::onInterface(), and NonlinearThread::prepareFace().

◆ reinitMaterialsInterface()

void FEProblemBase::reinitMaterialsInterface ( BoundaryID  boundary_id,
const THREAD_ID  tid,
bool  swap_stateful = true 
)

Definition at line 4519 of file FEProblemBase.C.

4522{
4523 if (hasActiveMaterialProperties(tid) && needInterfaceMaterialOnSide(boundary_id, tid))
4524 {
4525 const Elem * const & elem = _assembly[tid][0]->elem();
4526 unsigned int side = _assembly[tid][0]->side();
4527 unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4528
4529 auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4530 bnd_material_data.resize(n_points);
4531
4532 if (swap_stateful && !bnd_material_data.isSwapped())
4533 bnd_material_data.swap(*elem, side);
4534
4535 if (_interface_materials.hasActiveBoundaryObjects(boundary_id, tid))
4536 bnd_material_data.reinit(_interface_materials.getActiveBoundaryObjects(boundary_id, tid));
4537 }
4538}

Referenced by ComputeUserObjectsThread::onInterface(), and NonlinearThread::onInterface().

◆ reinitMaterialsNeighbor()

void FEProblemBase::reinitMaterialsNeighbor ( SubdomainID  blk_id,
const THREAD_ID  tid,
bool  swap_stateful = true,
const std::deque< MaterialBase * > *  reinit_mats = nullptr 
)

reinit materials on the neighboring element face

Parameters
blk_idThe subdomain on which the neighbor element lives
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
reinit_matsspecific list of materials to reinit. Used notably in the context of mortar with stateful elements

Definition at line 4451 of file FEProblemBase.C.

4455{
4457 {
4458 // NOTE: this will not work with h-adaptivity
4459 // lindsayad: why not?
4460
4461 const Elem * neighbor = _assembly[tid][0]->neighbor();
4462 unsigned int neighbor_side = neighbor->which_neighbor_am_i(_assembly[tid][0]->elem());
4463
4464 mooseAssert(neighbor, "neighbor should be non-null");
4465 mooseAssert(blk_id == neighbor->subdomain_id(),
4466 "The provided blk_id " << blk_id << " and neighbor subdomain ID "
4467 << neighbor->subdomain_id() << " do not match.");
4468
4469 unsigned int n_points = _assembly[tid][0]->qRuleNeighbor()->n_points();
4470
4471 auto & neighbor_material_data = _neighbor_material_props.getMaterialData(tid);
4472 neighbor_material_data.resize(n_points);
4473
4474 // Only swap if requested
4475 if (swap_stateful)
4476 neighbor_material_data.swap(*neighbor, neighbor_side);
4477
4478 if (_discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4479 neighbor_material_data.reset(
4480 _discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4481
4482 if (reinit_mats)
4483 neighbor_material_data.reinit(*reinit_mats);
4484 else if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4485 neighbor_material_data.reinit(
4486 _materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4487 }
4488}

Referenced by Moose::Mortar::loopOverMortarSegments(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), NonlinearThread::onInternalSide(), reinitMaterialsNeighborOnBoundary(), and NonlinearSystemBase::reinitNodeFace().

◆ reinitMaterialsNeighborOnBoundary()

void FEProblemBase::reinitMaterialsNeighborOnBoundary ( const BoundaryID  boundary_id,
const SubdomainID  blk_id,
const THREAD_ID  tid,
const bool  swap_stateful = true,
const std::deque< MaterialBase * > *const  reinit_mats = nullptr 
)

reinit materials on neighbor element (usually faces) on a boundary (internal or external) This specific routine helps us not reinit when don't need to

Parameters
boundary_idThe boundary on which the face belongs
blk_idThe block id to which the element (who owns the face) belong
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
reinit_matsspecific list of materials to reinit. Used notably in the context of mortar with stateful elements

Definition at line 4434 of file FEProblemBase.C.

4440{
4441 // Since objects don't declare whether they need the face or neighbor (side) material properties,
4442 // we use the same criteria for skipping material property computations as for face material
4443 // properties This could be a future optimization.
4444 if (hasActiveMaterialProperties(tid) && (needBoundaryMaterialOnSide(boundary_id, tid) ||
4445 needInterfaceMaterialOnSide(boundary_id, tid) ||
4447 reinitMaterialsNeighbor(blk_id, tid, swap_stateful, reinit_mats);
4448}
void reinitMaterialsNeighbor(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase * > *reinit_mats=nullptr)
reinit materials on the neighboring element face

Referenced by NonlinearThread::onInterface().

◆ reinitMortarElem()

void SubProblem::reinitMortarElem ( const Elem *  elem,
const THREAD_ID  tid = 0 
)
inherited

Reinit a mortar element to obtain a valid JxW.

Definition at line 1002 of file SubProblem.C.

1003{
1004 for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1005 assembly(tid, nl_sys_num).reinitMortarElem(elem);
1006}
void reinitMortarElem(const Elem *elem, const THREAD_ID tid=0)
Reinit a mortar element to obtain a valid JxW.

Referenced by Moose::Mortar::loopOverMortarSegments().

◆ reinitMortarUserObjects()

void FEProblemBase::reinitMortarUserObjects ( BoundaryID  primary_boundary_id,
BoundaryID  secondary_boundary_id,
bool  displaced 
)

Call reinit on mortar user objects with matching primary boundary ID, secondary boundary ID, and displacement characteristics.

Definition at line 10335 of file FEProblemBase.C.

10338{
10339 const auto mortar_uos =
10340 getMortarUserObjects(primary_boundary_id, secondary_boundary_id, displaced);
10341 for (auto * const mortar_uo : mortar_uos)
10342 {
10343 mortar_uo->setNormals();
10344 mortar_uo->reinit();
10345 }
10346}

Referenced by Moose::Mortar::loopOverMortarSegments().

◆ reinitNeighbor()

void FEProblemBase::reinitNeighbor ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2541 of file FEProblemBase.C.

2542{
2543 setNeighborSubdomainID(elem, side, tid);
2544
2545 const Elem * neighbor = elem->neighbor_ptr(side);
2546 unsigned int neighbor_side = neighbor->which_neighbor_am_i(elem);
2547
2548 for (const auto i : index_range(_nl))
2549 {
2550 _assembly[tid][i]->reinitElemAndNeighbor(elem, side, neighbor, neighbor_side);
2551 _nl[i]->prepareNeighbor(tid);
2552 // Called during stateful material property evaluation outside of solve
2553 _assembly[tid][i]->prepareNeighbor();
2554 }
2555 _aux->prepareNeighbor(tid);
2556
2557 for (auto & nl : _nl)
2558 {
2559 nl->reinitElemFace(elem, side, tid);
2560 nl->reinitNeighborFace(neighbor, neighbor_side, tid);
2561 }
2562 _aux->reinitElemFace(elem, side, tid);
2563 _aux->reinitNeighborFace(neighbor, neighbor_side, tid);
2564
2566 {
2567 // There are cases like for cohesive zone modeling without significant sliding where we cannot
2568 // use FEInterface::inverse_map in Assembly::reinitElemAndNeighbor in the displaced problem
2569 // because the physical points coming from the element don't actually lie on the neighbor.
2570 // Moreover, what's the point of doing another physical point inversion in other cases? We only
2571 // care about the reference points which we can just take from the undisplaced computation
2572 const auto & displaced_ref_pts = _assembly[tid][0]->qRuleNeighbor()->get_points();
2573
2574 _displaced_problem->reinitNeighbor(
2575 _displaced_mesh->elemPtr(elem->id()), side, tid, &displaced_ref_pts);
2576 }
2577}
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, const THREAD_ID tid) override

Referenced by ComputeMaterialsObjectThread::onInterface(), ComputeUserObjectsThread::onInterface(), NonlinearThread::onInterface(), ComputeIndicatorThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and reinitElemNeighborAndLowerD().

◆ reinitNeighborFaceRef()

void FEProblemBase::reinitNeighborFaceRef ( const Elem *  neighbor_elem,
unsigned int  neighbor_side,
Real  tolerance,
const std::vector< Point > *const  pts,
const std::vector< Real > *const  weights = nullptr,
const THREAD_ID  tid = 0 
)
overridevirtual

reinitialize FE objects on a given neighbor element on a given side at a given set of reference points and then compute variable data.

Note that this method makes no assumptions about what's been called beforehand, e.g. you don't have to call some prepare method before this one. This is an all-in-one reinit

Reimplemented from SubProblem.

Definition at line 10081 of file FEProblemBase.C.

10087{
10088 SubProblem::reinitNeighborFaceRef(neighbor_elem, neighbor_side, tolerance, pts, weights, tid);
10089
10091 _displaced_problem->reinitNeighborFaceRef(
10092 _displaced_mesh->elemPtr(neighbor_elem->id()), neighbor_side, tolerance, pts, weights, tid);
10093}
virtual void reinitNeighborFaceRef(const Elem *neighbor_elem, unsigned int neighbor_side, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0)
reinitialize FE objects on a given neighbor element on a given side at a given set of reference point...
Definition SubProblem.C:913

Referenced by Moose::Mortar::loopOverMortarSegments().

◆ reinitNeighborLowerDElem()

void SubProblem::reinitNeighborLowerDElem ( const Elem *  elem,
const THREAD_ID  tid = 0 
)
inherited

reinitialize a neighboring lower dimensional element

Definition at line 995 of file SubProblem.C.

996{
997 for (const auto nl_sys_num : make_range(numNonlinearSystems()))
998 assembly(tid, nl_sys_num).reinitNeighborLowerDElem(elem);
999}
void reinitNeighborLowerDElem(const Elem *elem, const THREAD_ID tid=0)
reinitialize a neighboring lower dimensional element
Definition SubProblem.C:995

Referenced by Moose::Mortar::loopOverMortarSegments().

◆ reinitNeighborPhys() [1/2]

void FEProblemBase::reinitNeighborPhys ( const Elem *  neighbor,
const std::vector< Point > &  physical_points,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2640 of file FEProblemBase.C.

2643{
2644 mooseAssert(_mesh.queryElemPtr(neighbor->id()) == neighbor,
2645 "Are you calling this method with a displaced mesh element?");
2646
2647 for (const auto i : index_range(_nl))
2648 {
2649 // Reinits shape the functions at the physical points
2650 _assembly[tid][i]->reinitNeighborAtPhysical(neighbor, physical_points);
2651
2652 // Sets the neighbor dof indices
2653 _nl[i]->prepareNeighbor(tid);
2654 }
2655 _aux->prepareNeighbor(tid);
2656
2657 // Resizes Re and Ke
2658 _assembly[tid][_current_nl_sys->number()]->prepareNeighbor();
2659
2660 // Compute the values of each variable at the points
2661 for (auto & nl : _nl)
2662 nl->reinitNeighbor(neighbor, tid);
2663 _aux->reinitNeighbor(neighbor, tid);
2664}

◆ reinitNeighborPhys() [2/2]

void FEProblemBase::reinitNeighborPhys ( const Elem *  neighbor,
unsigned int  neighbor_side,
const std::vector< Point > &  physical_points,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2612 of file FEProblemBase.C.

2616{
2617 mooseAssert(_mesh.queryElemPtr(neighbor->id()) == neighbor,
2618 "Are you calling this method with a displaced mesh element?");
2619
2620 for (const auto i : index_range(_nl))
2621 {
2622 // Reinits shape the functions at the physical points
2623 _assembly[tid][i]->reinitNeighborAtPhysical(neighbor, neighbor_side, physical_points);
2624
2625 // Sets the neighbor dof indices
2626 _nl[i]->prepareNeighbor(tid);
2627 }
2628 _aux->prepareNeighbor(tid);
2629
2630 // Resizes Re and Ke
2631 _assembly[tid][_current_nl_sys->number()]->prepareNeighbor();
2632
2633 // Compute the values of each variable at the points
2634 for (auto & nl : _nl)
2635 nl->reinitNeighborFace(neighbor, neighbor_side, tid);
2636 _aux->reinitNeighborFace(neighbor, neighbor_side, tid);
2637}

Referenced by NonlinearSystemBase::reinitNodeFace().

◆ reinitNode()

void FEProblemBase::reinitNode ( const Node *  node,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2488 of file FEProblemBase.C.

2489{
2491 _displaced_problem->reinitNode(&_displaced_mesh->nodeRef(node->id()), tid);
2492
2493 for (const auto i : index_range(_nl))
2494 {
2495 _assembly[tid][i]->reinit(node);
2496 _nl[i]->reinitNode(node, tid);
2497 }
2498 _aux->reinitNode(node, tid);
2499}
virtual const Node & nodeRef(const dof_id_type i) const
Definition MooseMesh.C:846

Referenced by NodalPatchRecovery::compute(), NonlinearSystemBase::computeResidualInternal(), ComputeNodalDampingThread::onNode(), ComputeNodalKernelJacobiansThread::onNode(), ComputeNodalKernelsThread::onNode(), and ComputeNodalUserObjectsThread::onNode().

◆ reinitNodeFace()

void FEProblemBase::reinitNodeFace ( const Node *  node,
BoundaryID  bnd_id,
const THREAD_ID  tid 
)
overridevirtual

◆ reinitNodes()

void SubProblem::reinitNodes ( const std::vector< dof_id_type > &  nodes,
const THREAD_ID  tid 
)
inherited

Definition at line 979 of file SubProblem.C.

980{
981 for (const auto nl_sys_num : make_range(numNonlinearSystems()))
982 systemBaseNonlinear(nl_sys_num).reinitNodes(nodes, tid);
983 systemBaseAuxiliary().reinitNodes(nodes, tid);
984}
void reinitNodes(const std::vector< dof_id_type > &nodes, const THREAD_ID tid)
Definition SubProblem.C:979
virtual void reinitNodes(const std::vector< dof_id_type > &nodes, THREAD_ID tid)
Reinit variables at a set of nodes.
Definition SystemBase.C:424

Referenced by AuxNodalScalarKernel::compute(), NodalScalarKernel::reinit(), and NodalConstraint::reinitConstraintNodes().

◆ reinitNodesNeighbor()

void SubProblem::reinitNodesNeighbor ( const std::vector< dof_id_type > &  nodes,
const THREAD_ID  tid 
)
inherited

Definition at line 987 of file SubProblem.C.

988{
989 for (const auto nl_sys_num : make_range(numNonlinearSystems()))
990 systemBaseNonlinear(nl_sys_num).reinitNodesNeighbor(nodes, tid);
992}
void reinitNodesNeighbor(const std::vector< dof_id_type > &nodes, const THREAD_ID tid)
Definition SubProblem.C:987
virtual void reinitNodesNeighbor(const std::vector< dof_id_type > &nodes, THREAD_ID tid)
Reinit variables at a set of neighbor nodes.
Definition SystemBase.C:435

Referenced by NodalConstraint::reinitConstraintNodes().

◆ reinitOffDiagScalars()

void FEProblemBase::reinitOffDiagScalars ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 2533 of file FEProblemBase.C.

2534{
2535 _assembly[tid][_current_nl_sys->number()]->prepareOffDiagScalar();
2537 _displaced_problem->reinitOffDiagScalars(tid);
2538}

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians(), NonlinearSystemBase::constraintJacobians(), and NonlinearThread::onElement().

◆ reinitScalars()

void FEProblemBase::reinitScalars ( const THREAD_ID  tid,
bool  reinit_for_derivative_reordering = false 
)
overridevirtual

fills the VariableValue arrays for scalar variables from the solution vector

Parameters
tidThe thread id
reinit_for_derivative_reorderingA flag indicating whether we are reinitializing for the purpose of re-ordering derivative information for ADNodalBCs

Implements SubProblem.

Definition at line 2516 of file FEProblemBase.C.

2517{
2518 TIME_SECTION("reinitScalars", 3, "Reinitializing Scalar Variables");
2519
2521 _displaced_problem->reinitScalars(tid, reinit_for_derivative_reordering);
2522
2523 for (auto & nl : _nl)
2524 nl->reinitScalars(tid, reinit_for_derivative_reordering);
2525 _aux->reinitScalars(tid, reinit_for_derivative_reordering);
2526
2527 // This is called outside of residual/Jacobian call-backs
2528 for (auto & assembly : _assembly[tid])
2529 assembly->prepareScalar();
2530}

Referenced by NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), computeJacobianTags(), NonlinearSystemBase::computeNodalBCsJacobian(), computeResidualAndJacobian(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), computeResidualTags(), NonlinearSystemBase::computeScalarKernelsJacobians(), and AuxiliarySystem::computeScalarVars().

◆ removeAlgebraicGhostingFunctor()

void SubProblem::removeAlgebraicGhostingFunctor ( libMesh::GhostingFunctor &  algebraic_gf)
inherited

Remove an algebraic ghosting functor from this problem's DofMaps.

Definition at line 1075 of file SubProblem.C.

1076{
1077 EquationSystems & eq = es();
1078 const auto n_sys = eq.n_systems();
1079 DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1080
1081 const bool found_in_root_sys =
1082 std::find(nl_dof_map.algebraic_ghosting_functors_begin(),
1083 nl_dof_map.algebraic_ghosting_functors_end(),
1084 &algebraic_gf) != nl_dof_map.algebraic_ghosting_functors_end();
1085
1086#ifndef NDEBUG
1087 const bool found_in_our_map =
1088 _root_alg_gf_to_sys_clones.find(&algebraic_gf) != _root_alg_gf_to_sys_clones.end();
1089 mooseAssert(found_in_root_sys == found_in_our_map,
1090 "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1091 "it in our gf to clones map");
1092#endif
1093
1094 if (found_in_root_sys) // libMesh yells if we try to remove
1095 // something that's not there
1096 nl_dof_map.remove_algebraic_ghosting_functor(algebraic_gf);
1097
1098 auto it = _root_alg_gf_to_sys_clones.find(&algebraic_gf);
1099 if (it == _root_alg_gf_to_sys_clones.end())
1100 return;
1101
1102 auto & clones_vec = it->second;
1103 mooseAssert((n_sys - 1) == clones_vec.size(),
1104 "The size of the gf clones vector doesn't match the number of systems minus one");
1105 if (clones_vec.empty())
1106 {
1107 mooseAssert(n_sys == 1, "The clones vector should only be empty if there is only one system");
1108 return;
1109 }
1110
1111 for (const auto i : make_range(n_sys))
1112 eq.get_system(i + 1).get_dof_map().remove_algebraic_ghosting_functor(*clones_vec[i]);
1113
1114 _root_alg_gf_to_sys_clones.erase(it->first);
1115}

◆ removeCouplingGhostingFunctor()

void SubProblem::removeCouplingGhostingFunctor ( libMesh::GhostingFunctor &  coupling_gf)
inherited

Remove a coupling ghosting functor from this problem's DofMaps.

Definition at line 1118 of file SubProblem.C.

1119{
1120 EquationSystems & eq = es();
1121 const auto num_nl_sys = numNonlinearSystems();
1122 if (!num_nl_sys)
1123 return;
1124
1125 DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1126 const bool found_in_root_sys = std::find(nl_dof_map.coupling_functors_begin(),
1127 nl_dof_map.coupling_functors_end(),
1128 &coupling_gf) != nl_dof_map.coupling_functors_end();
1129
1130#ifndef NDEBUG
1131 const bool found_in_our_map =
1133 mooseAssert(found_in_root_sys == found_in_our_map,
1134 "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1135 "it in our gf to clones map");
1136#endif
1137
1138 if (found_in_root_sys) // libMesh yells if we try to remove
1139 // something that's not there
1140 nl_dof_map.remove_coupling_functor(coupling_gf);
1141
1142 auto it = _root_coupling_gf_to_sys_clones.find(&coupling_gf);
1143 if (it == _root_coupling_gf_to_sys_clones.end())
1144 return;
1145
1146 auto & clones_vec = it->second;
1147 mooseAssert((num_nl_sys - 1) == clones_vec.size(),
1148 "The size of the gf clones vector doesn't match the number of systems minus one");
1149 if (clones_vec.empty())
1150 {
1151 mooseAssert(num_nl_sys == 1,
1152 "The clones vector should only be empty if there is only one nonlinear system");
1153 return;
1154 }
1155
1156 for (const auto i : make_range(num_nl_sys))
1157 eq.get_system(i + 1).get_dof_map().remove_coupling_functor(*clones_vec[i]);
1158
1159 _root_coupling_gf_to_sys_clones.erase(it->first);
1160}

◆ reportMooseObjectDependency()

void FEProblemBase::reportMooseObjectDependency ( MooseObject *  a,
MooseObject *  b 
)

Register a MOOSE object dependency so we can either order operations properly or report when we cannot.

a -> b (a depends on b)

Definition at line 5776 of file FEProblemBase.C.

5777{
5778 //<< "Object " << a->name() << " -> " << b->name() << std::endl;
5779}

◆ resetFailNextNonlinearConvergenceCheck()

void FEProblemBase::resetFailNextNonlinearConvergenceCheck ( )
inline

Tell the problem that the nonlinear convergence check(s) may proceed as normal.

Definition at line 2979 of file FEProblemBase.h.

void resetFailNextSystemConvergenceCheck()
Tell the problem that the system convergence check(s) may proceed as normal.

Referenced by Moose::PetscSupport::petscNonlinearConverged().

◆ resetFailNextSystemConvergenceCheck()

void FEProblemBase::resetFailNextSystemConvergenceCheck ( )
inline

Tell the problem that the system convergence check(s) may proceed as normal.

Definition at line 2981 of file FEProblemBase.h.

Referenced by Moose::PetscSupport::petscLinearConverged(), and resetFailNextNonlinearConvergenceCheck().

◆ resetState()

void FEProblemBase::resetState ( )
privatevirtual

Reset state of this object in preparation for the next evaluation.

Definition at line 7378 of file FEProblemBase.C.

7379{
7380 // Our default state is to allow computing derivatives
7381 ADReal::do_derivatives = true;
7383
7384 // Clear the VectorTags and MatrixTags
7387
7390
7395 {
7396 _displaced_problem->setCurrentlyComputingResidual(false);
7397 _displaced_problem->setCurrentlyComputingJacobian(false);
7398 _displaced_problem->setCurrentlyComputingResidualAndJacobian(false);
7399 }
7400}
void clearCurrentJacobianMatrixTags()
Clear the current Jacobian matrix tag data structure ... if someone creates it.
void clearCurrentResidualVectorTags()
Clear the current residual vector tag data structure.

Referenced by computeJacobianTags(), computeResidualAndJacobian(), and computeResidualTags().

◆ residualSetup()

void FEProblemBase::residualSetup ( )
overridevirtual

Reimplemented from SubProblem.

Definition at line 10235 of file FEProblemBase.C.

10236{
10238 // We need to setup all the nonlinear systems other than our current one which actually called
10239 // this method (so we have to make sure we don't go in a circle)
10240 for (const auto i : make_range(numNonlinearSystems()))
10241 if (i != currentNlSysNum())
10242 _nl[i]->residualSetup();
10243 // We don't setup the aux sys because that's been done elsewhere
10245 _displaced_problem->residualSetup();
10246}
virtual void residualSetup()

Referenced by residualSetup(), and NonlinearSystemBase::residualSetup().

◆ resizeMaterialData()

void FEProblemBase::resizeMaterialData ( Moose::MaterialDataType  data_type,
unsigned int  nqp,
const THREAD_ID  tid 
)

Resize material data.

Parameters
data_typeThe type of material data to resize
nqpThe number of quadrature points to resize for
tidThe thread ID

Definition at line 10152 of file FEProblemBase.C.

10155{
10156 getMaterialData(data_type, tid).resize(nqp);
10157}

◆ restartableName()

std::string Restartable::restartableName ( const std::string &  data_name) const
protectedinherited

Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix.

This should only be used in this interface and in testing.

Definition at line 78 of file Restartable.C.

79{
80 return _restartable_system_name + "/" + _restartable_name + "/" + data_name;
81}
const std::string _restartable_system_name
The system name this object is in.

Referenced by Restartable::declareRecoverableData(), and Restartable::declareRestartableDataHelper().

◆ restoreGeometricSearchState()

void FEProblemBase::restoreGeometricSearchState ( )

Restore geometric search state captured by the most recent backupGeometricSearchState().

Called from TimeStepper::rejectStep(), which must call this before restoreSolutions() so that the geometric search re-projects from the restored, accepted-state seeds rather than from the discarded attempt's converged state.

Definition at line 7546 of file FEProblemBase.C.

7547{
7549
7551 _displaced_problem->geomSearchData().restore();
7552}
void restore()
Restore the PenetrationLocators' state captured by the most recent backup().

Referenced by TimeStepper::rejectStep().

◆ restoreMultiApps()

void FEProblemBase::restoreMultiApps ( ExecFlagType  type,
bool  force = false 
)

Restore the MultiApps associated with the ExecFlagType.

Parameters
forceForce restoration because something went wrong with the solve

Definition at line 6424 of file FEProblemBase.C.

6425{
6426 const auto & multi_apps = _multi_apps[type].getActiveObjects();
6427
6428 if (multi_apps.size())
6429 {
6431 {
6432 if (force)
6433 _console << COLOR_CYAN << "\nRestoring Multiapps on " << type.name()
6434 << " because of solve failure!" << COLOR_DEFAULT << std::endl;
6435 else
6436 _console << COLOR_CYAN << "\nRestoring MultiApps on " << type.name() << COLOR_DEFAULT
6437 << std::endl;
6438 }
6439
6440 for (const auto & multi_app : multi_apps)
6441 multi_app->restore(force);
6442
6444
6446 _console << COLOR_CYAN << "Finished Restoring MultiApps on " << type.name() << "\n"
6447 << COLOR_DEFAULT << std::endl;
6448 }
6449}

Referenced by TransientBase::incrementStepOrReject(), and FixedPointSolve::solve().

◆ restoreOldSolutions()

void FEProblemBase::restoreOldSolutions ( )
virtual

Restore old solutions from the backup vectors and deallocate them.

Definition at line 7593 of file FEProblemBase.C.

7594{
7595 TIME_SECTION("restoreOldSolutions", 5, "Restoring Old Solutions");
7596
7597 for (auto & sys : _solver_systems)
7598 sys->restoreOldSolutions();
7599 _aux->restoreOldSolutions();
7600}
virtual void restoreOldSolutions()
Restore old solutions from the backup vectors and deallocate them.

Referenced by EigenExecutionerBase::inversePowerIteration().

◆ restoreOriginalNonzeroPattern()

bool FEProblemBase::restoreOriginalNonzeroPattern ( ) const
inline
Returns
Whether the original matrix nonzero pattern is restored before each Jacobian assembly

Definition at line 2432 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::computeJacobianInternal().

◆ restoreSolutions()

void FEProblemBase::restoreSolutions ( )
virtual

Definition at line 7555 of file FEProblemBase.C.

7556{
7557 TIME_SECTION("restoreSolutions", 5, "Restoring Solutions");
7558
7559 if (!_not_zeroed_tagged_vectors.empty())
7560 paramError("not_zeroed_tag_vectors",
7561 "There is currently no way to restore not-zeroed vectors.");
7562
7563 for (auto & sys : _solver_systems)
7564 {
7565 if (_verbose_restore)
7566 _console << "Restoring solutions on system " << sys->name() << "..." << std::endl;
7567 sys->restoreStateHistory();
7568 }
7569
7570 if (_verbose_restore)
7571 _console << "Restoring solutions on Auxiliary system..." << std::endl;
7572 _aux->restoreStateHistory();
7573
7574 if (_verbose_restore)
7575 _console << "Restoring postprocessor, vector-postprocessor, and reporter data..." << std::endl;
7577
7579 _displaced_problem->updateMesh();
7580}
void restoreState(bool verbose=false)
When a time step fails, this method is called to revert the current reporter values to their old stat...

Referenced by ActivateElementsUserObjectBase::initSolutions(), TimeStepper::rejectStep(), and updateMeshXFEM().

◆ restrictionBoundaryCheckName()

std::string SubProblem::restrictionBoundaryCheckName ( BoundaryID  check_id)
privateinherited

Definition at line 775 of file SubProblem.C.

776{
777 return mesh().getMesh().get_boundary_info().sideset_name(check_id);
778}

Referenced by SubProblem::checkBoundaryMatProps().

◆ restrictionSubdomainCheckName()

std::string SubProblem::restrictionSubdomainCheckName ( SubdomainID  check_id)
privateinherited

Helper functions for checking MaterialProperties.

Definition at line 764 of file SubProblem.C.

765{
766 // TODO: Put a better a interface in MOOSE
767 std::map<subdomain_id_type, std::string> & name_map = mesh().getMesh().set_subdomain_name_map();
768 std::map<subdomain_id_type, std::string>::const_iterator pos = name_map.find(check_id);
769 if (pos != name_map.end())
770 return pos->second;
771 return "";
772}

Referenced by SubProblem::checkBlockMatProps().

◆ safeAccessTaggedMatrices()

virtual bool SubProblem::safeAccessTaggedMatrices ( ) const
inlinevirtualinherited

Is it safe to access the tagged matrices.

Reimplemented in DisplacedProblem.

Definition at line 742 of file SubProblem.h.

Referenced by MooseVariableScalar::reinit(), and DisplacedProblem::safeAccessTaggedMatrices().

◆ safeAccessTaggedVectors()

virtual bool SubProblem::safeAccessTaggedVectors ( ) const
inlinevirtualinherited

Is it safe to access the tagged vectors.

Reimplemented in DisplacedProblem.

Definition at line 745 of file SubProblem.h.

Referenced by MooseVariableScalar::reinit(), and DisplacedProblem::safeAccessTaggedVectors().

◆ saveOldSolutions()

void FEProblemBase::saveOldSolutions ( )
virtual

Allocate vectors and save old solutions into them.

Definition at line 7583 of file FEProblemBase.C.

7584{
7585 TIME_SECTION("saveOldSolutions", 5, "Saving Old Solutions");
7586
7587 for (auto & sys : _solver_systems)
7588 sys->saveOldSolutions();
7589 _aux->saveOldSolutions();
7590}
virtual void saveOldSolutions()
Allocate vectors and save old solutions into them.

Referenced by EigenExecutionerBase::inversePowerIteration().

◆ selectMatrixTagsFromSystem()

void SubProblem::selectMatrixTagsFromSystem ( const SystemBase &  system,
const std::map< TagName, TagID > &  input_matrix_tags,
std::set< TagID > &  selected_tags 
)
staticinherited

Select the matrix tags which belong to a specific system.

Parameters
systemReference to the system
input_matrix_tagsA map of matrix tags
selected_tagsA set which gets populated by the tag-ids that belong to the system

Definition at line 292 of file SubProblem.C.

295{
296 selected_tags.clear();
297 for (const auto & matrix_tag_pair : input_matrix_tags)
298 if (system.hasMatrix(matrix_tag_pair.second))
299 selected_tags.insert(matrix_tag_pair.second);
300}

Referenced by computeLinearSystemSys().

◆ selectVectorTagsFromSystem()

void SubProblem::selectVectorTagsFromSystem ( const SystemBase &  system,
const std::vector< VectorTag > &  input_vector_tags,
std::set< TagID > &  selected_tags 
)
staticinherited

Select the vector tags which belong to a specific system.

Parameters
systemReference to the system
input_vector_tagsA vector of vector tags
selected_tagsA set which gets populated by the tag-ids that belong to the system

Definition at line 281 of file SubProblem.C.

284{
285 selected_tags.clear();
286 for (const auto & vector_tag : input_vector_tags)
287 if (system.hasVector(vector_tag._id))
288 selected_tags.insert(vector_tag._id);
289}

Referenced by computeLinearSystemSys(), computeResidualAndJacobian(), and ComputeResidualAndJacobianThread::determineObjectWarehouses().

◆ setActiveElementalMooseVariables()

void FEProblemBase::setActiveElementalMooseVariables ( const std::set< MooseVariableFEBase * > &  moose_vars,
const THREAD_ID  tid 
)
overridevirtual

Set the MOOSE variables to be reinited on each element.

Parameters
moose_varsA set of variables that need to be reinited each time reinit() is called.
tidThe thread id

Reimplemented from SubProblem.

Definition at line 6697 of file FEProblemBase.C.

6699{
6701
6703 _displaced_problem->setActiveElementalMooseVariables(moose_vars, tid);
6704}
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFieldBase * > &moose_vars, const THREAD_ID tid)
Set the MOOSE variables to be reinited on each element.
Definition SubProblem.C:435

Referenced by prepareMaterials(), ComputeDiracThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeMarkerThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

◆ setActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::setActiveFEVariableCoupleableMatrixTags ( std::set< TagID > &  mtags,
const THREAD_ID  tid 
)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6659 of file FEProblemBase.C.

6660{
6662
6664 _displaced_problem->setActiveFEVariableCoupleableMatrixTags(mtags, tid);
6665}
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition SubProblem.C:355

◆ setActiveFEVariableCoupleableVectorTags()

void FEProblemBase::setActiveFEVariableCoupleableVectorTags ( std::set< TagID > &  vtags,
const THREAD_ID  tid 
)
overridevirtual

◆ setActiveMaterialProperties()

void FEProblemBase::setActiveMaterialProperties ( const std::unordered_set< unsigned int > &  mat_prop_ids,
const THREAD_ID  tid 
)

Record and set the material properties required by the current computing thread.

Parameters
mat_prop_idsThe set of material properties required by the current computing thread.
tidThe thread id

Definition at line 6752 of file FEProblemBase.C.

6754{
6755 // mark active properties in every material
6756 for (auto & mat : _all_materials.getObjects(tid))
6757 mat->setActiveProperties(mat_prop_ids);
6758 for (auto & mat : _all_materials[Moose::FACE_MATERIAL_DATA].getObjects(tid))
6759 mat->setActiveProperties(mat_prop_ids);
6760 for (auto & mat : _all_materials[Moose::NEIGHBOR_MATERIAL_DATA].getObjects(tid))
6761 mat->setActiveProperties(mat_prop_ids);
6762
6763 _has_active_material_properties[tid] = !mat_prop_ids.empty();
6764}

Referenced by Moose::Mortar::loopOverMortarSegments(), prepareMaterials(), NodalPatchRecovery::reinitPatch(), NonlinearSystemBase::setConstraintSecondaryValues(), and ComputeDiracThread::subdomainChanged().

◆ setActiveScalarVariableCoupleableMatrixTags()

void FEProblemBase::setActiveScalarVariableCoupleableMatrixTags ( std::set< TagID > &  mtags,
const THREAD_ID  tid 
)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6677 of file FEProblemBase.C.

6679{
6681
6683 _displaced_problem->setActiveScalarVariableCoupleableMatrixTags(mtags, tid);
6684}
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition SubProblem.C:394

Referenced by AuxiliarySystem::setScalarVariableCoupleableTags().

◆ setActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::setActiveScalarVariableCoupleableVectorTags ( std::set< TagID > &  vtags,
const THREAD_ID  tid 
)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6687 of file FEProblemBase.C.

6689{
6691
6693 _displaced_problem->setActiveScalarVariableCoupleableVectorTags(vtags, tid);
6694}
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
Definition SubProblem.C:401

Referenced by AuxiliarySystem::setScalarVariableCoupleableTags().

◆ setAuxKernelParamsAndLog()

void FEProblemBase::setAuxKernelParamsAndLog ( const std::string &  ak_name,
const std::string &  name,
InputParameters &  parameters,
const std::string &  base_name 
)
private

Set the subproblem and system parameters for auxiliary kernels and log their addition.

Parameters
ak_nameThe type of the auxiliary kernel
nameThe name of the auxiliary kernel
parametersThe auxiliary kernel parameters
base_nameThe base type of the auxiliary kernel, i.e. AuxKernel or KokkosAuxKernel

Definition at line 3188 of file FEProblemBase.C.

3192{
3193 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3194 {
3195 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3196 parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3197 parameters.set<SystemBase *>("_nl_sys") = &_displaced_problem->solverSys(0);
3198 if (!parameters.get<std::vector<BoundaryName>>("boundary").empty())
3200 else
3202 }
3203 else
3204 {
3205 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3206 {
3207 // We allow AuxKernels to request that they use_displaced_mesh,
3208 // but then be overridden when no displacements variables are
3209 // provided in the Mesh block. If that happened, update the value
3210 // of use_displaced_mesh appropriately for this AuxKernel.
3211 if (parameters.have_parameter<bool>("use_displaced_mesh"))
3212 parameters.set<bool>("use_displaced_mesh") = false;
3213 }
3214
3215 parameters.set<SubProblem *>("_subproblem") = this;
3216 parameters.set<SystemBase *>("_sys") = _aux.get();
3217 parameters.set<SystemBase *>("_nl_sys") = _solver_systems[0].get();
3218 }
3219
3220 logAdd(base_name, name, ak_name, parameters);
3221}

Referenced by addAuxKernel().

◆ setAxisymmetricCoordAxis()

void FEProblemBase::setAxisymmetricCoordAxis ( const MooseEnum &  rz_coord_axis)

Definition at line 922 of file FEProblemBase.C.

923{
924 _mesh.setAxisymmetricCoordAxis(rz_coord_axis);
925}
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
For axisymmetric simulations, set the symmetry coordinate axis.
Definition MooseMesh.C:4297

◆ setChainControlDataOutput()

void SubProblem::setChainControlDataOutput ( bool  set_output)
inlineinherited

Setter for debug chain control data output.

Definition at line 931 of file SubProblem.h.

931{ _show_chain_control_data = set_output; }
bool _show_chain_control_data
Whether to output a list of all the chain control data.

◆ setCheckResidualForNans()

void FEProblemBase::setCheckResidualForNans ( bool  check_residual_for_nans)
inline

Setter for residual NaN/Inf checking.

Definition at line 235 of file FEProblemBase.h.

236 {
237 _check_residual_for_nans = check_residual_for_nans;
238 }

◆ setConstJacobian()

void FEProblemBase::setConstJacobian ( bool  state)
inline

Set flag that Jacobian is constant (for optimization purposes)

Parameters
stateTrue if the Jacobian is constant, false otherwise

Definition at line 2275 of file FEProblemBase.h.

2275{ _const_jacobian = state; }

Referenced by ExplicitEuler::preSolve(), ExplicitRK2::preSolve(), and ExplicitTVDRK2::preSolve().

◆ setCoordSystem()

void FEProblemBase::setCoordSystem ( const std::vector< SubdomainName > &  blocks,
const MultiMooseEnum &  coord_sys 
)

Definition at line 914 of file FEProblemBase.C.

916{
917 TIME_SECTION("setCoordSystem", 5, "Setting Coordinate System");
918 _mesh.setCoordSystem(blocks, coord_sys);
919}
void setCoordSystem(const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
Set the coordinate system for the provided blocks to coord_sys.
Definition MooseMesh.C:4165

◆ setCoupling()

void FEProblemBase::setCoupling ( Moose::CouplingType  type)

Set the coupling between variables TODO: allow user-defined coupling.

Parameters
typeType of coupling

Definition at line 6928 of file FEProblemBase.C.

6929{
6931 {
6933 mooseError("Someone told us (the FEProblemBase) to trust the user coupling matrix, but we "
6934 "haven't been provided a coupling matrix!");
6935
6936 // We've been told to trust the user coupling matrix, so we're going to leave things alone
6937 return;
6938 }
6939
6940 _coupling = type;
6941}
bool _trust_user_coupling_matrix
Whether to trust the user coupling matrix no matter what.

Referenced by init(), and Moose::SlepcSupport::setEigenProblemSolverParams().

◆ setCouplingMatrix() [1/2]

void FEProblemBase::setCouplingMatrix ( libMesh::CouplingMatrix *  cm,
const unsigned int  nl_sys_num 
)

◆ setCouplingMatrix() [2/2]

void FEProblemBase::setCouplingMatrix ( std::unique_ptr< libMesh::CouplingMatrix >  cm,
const unsigned int  nl_sys_num 
)

Set custom coupling matrix.

Parameters
cmcoupling matrix to be set
nl_sys_numwhich nonlinear system we are setting the coupling matrix for

Referenced by MoosePreconditioner::setCouplingMatrix().

◆ setCurrentAlgebraicBndNodeRange()

void FEProblemBase::setCurrentAlgebraicBndNodeRange ( ConstBndNodeRange *  range)

Definition at line 10452 of file FEProblemBase.C.

10453{
10454 if (!range)
10455 {
10457 return;
10458 }
10459
10460 _current_algebraic_bnd_node_range = std::make_unique<ConstBndNodeRange>(*range);
10461}

◆ setCurrentAlgebraicElementRange()

void FEProblemBase::setCurrentAlgebraicElementRange ( libMesh::ConstElemRange *  range)

These functions allow setting custom ranges for the algebraic elements, nodes, and boundary nodes that contribute to the jacobian and residual for this local processor.

setCurrentAlgebraicElementRange() sets the element range that contributes to the system. A nullptr will reset the range to use the mesh's range.

setCurrentAlgebraicNodeRange() sets the node range that contributes to the system. A nullptr will reset the range to use the mesh's range.

setCurrentAlgebraicBndNodeRange() sets the boundary node range that contributes to the system. A nullptr will reset the range to use the mesh's range.

Parameters
rangeA pointer to the const range object representing the algebraic elements, nodes, or boundary nodes.

Definition at line 10430 of file FEProblemBase.C.

10431{
10432 if (!range)
10433 {
10435 return;
10436 }
10437
10438 _current_algebraic_elem_range = std::make_unique<ConstElemRange>(*range);
10439}

◆ setCurrentAlgebraicNodeRange()

void FEProblemBase::setCurrentAlgebraicNodeRange ( libMesh::ConstNodeRange *  range)

Definition at line 10441 of file FEProblemBase.C.

10442{
10443 if (!range)
10444 {
10446 return;
10447 }
10448
10449 _current_algebraic_node_range = std::make_unique<ConstNodeRange>(*range);
10450}

◆ setCurrentBoundaryID()

void FEProblemBase::setCurrentBoundaryID ( BoundaryID  bid,
const THREAD_ID  tid 
)
overridevirtual

sets the current boundary ID in assembly

Reimplemented from SubProblem.

Definition at line 10366 of file FEProblemBase.C.

10367{
10370 _displaced_problem->setCurrentBoundaryID(bid, tid);
10371}
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid)
sets the current boundary ID in assembly
Definition SubProblem.C:781

◆ setCurrentExecuteOnFlag()

void FEProblemBase::setCurrentExecuteOnFlag ( const ExecFlagType &  flag)

Definition at line 5170 of file FEProblemBase.C.

5171{
5173}

Referenced by execute(), MFEMProblem::execute(), initialSetup(), and outputStep().

◆ setCurrentLinearSystem()

void FEProblemBase::setCurrentLinearSystem ( unsigned int  sys_num)

Set the current linear system pointer.

Parameters
sys_numThe number of linear system

Definition at line 10383 of file FEProblemBase.C.

10384{
10385 mooseAssert(sys_num < _linear_systems.size(),
10386 "System number greater than the number of linear systems");
10387 _current_linear_sys = _linear_systems[sys_num].get();
10389}
SolverSystem * _current_solver_sys
The current solver system.

Referenced by computeLinearSystemSys(), LinearSystem::computeLinearSystemTags(), and solveLinearSystem().

◆ setCurrentLowerDElem()

void FEProblemBase::setCurrentLowerDElem ( const Elem *const  lower_d_elem,
const THREAD_ID  tid 
)
overridevirtual

Set the current lower dimensional element.

This can be null

Reimplemented from SubProblem.

Definition at line 10357 of file FEProblemBase.C.

10358{
10359 SubProblem::setCurrentLowerDElem(lower_d_elem, tid);
10361 _displaced_problem->setCurrentLowerDElem(
10362 lower_d_elem ? _displaced_mesh->elemPtr(lower_d_elem->id()) : nullptr, tid);
10363}
virtual void setCurrentLowerDElem(const Elem *const lower_d_elem, const THREAD_ID tid)
Set the current lower dimensional element.

◆ setCurrentlyComputingJacobian()

void SubProblem::setCurrentlyComputingJacobian ( const bool  currently_computing_jacobian)
inlineinherited

Set whether or not the problem is in the process of computing the Jacobian.

Definition at line 700 of file SubProblem.h.

701 {
702 _currently_computing_jacobian = currently_computing_jacobian;
703 }

Referenced by computeResidualAndJacobian(), and resetState().

◆ setCurrentlyComputingResidual()

void FEProblemBase::setCurrentlyComputingResidual ( bool  currently_computing_residual)
finalvirtual

Set whether or not the problem is in the process of computing the residual.

Reimplemented from SubProblem.

Definition at line 10033 of file FEProblemBase.C.

10034{
10036 _displaced_problem->setCurrentlyComputingResidual(currently_computing_residual);
10037 _currently_computing_residual = currently_computing_residual;
10038}

Referenced by computeResidualAndJacobian(), computeResidualTags(), NonlinearSystemBase::computeResidualTags(), and resetState().

◆ setCurrentlyComputingResidualAndJacobian()

void SubProblem::setCurrentlyComputingResidualAndJacobian ( bool  currently_computing_residual_and_jacobian)
inlineinherited

Set whether or not the problem is in the process of computing the Jacobian.

Definition at line 1489 of file SubProblem.h.

1491{
1492 _currently_computing_residual_and_jacobian = currently_computing_residual_and_jacobian;
1493}

Referenced by computeResidualAndJacobian(), and resetState().

◆ setCurrentNonlinearSystem()

void FEProblemBase::setCurrentNonlinearSystem ( const unsigned int  nl_sys_num)

◆ setCurrentResidualVectorTags()

void FEProblemBase::setCurrentResidualVectorTags ( const std::set< TagID > &  vector_tags)
inline

Set the current residual vector tag data structure based on the passed in tag IDs.

Definition at line 3960 of file FEProblemBase.h.

3961{
3963}

Referenced by computeResidualAndJacobian(), computeResidualTags(), and CrankNicolson::init().

◆ setCurrentSubdomainID()

void FEProblemBase::setCurrentSubdomainID ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1993 of file FEProblemBase.C.

1994{
1995 SubdomainID did = elem->subdomain_id();
1996 for (const auto i : index_range(_solver_systems))
1997 {
1998 _assembly[tid][i]->setCurrentSubdomainID(did);
1999 if (_displaced_problem &&
2001 _displaced_problem->assembly(tid, i).setCurrentSubdomainID(did);
2002 }
2003}

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), ElementalVariableValue::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), and ComputeInitialConditionThread::operator()().

◆ setErrorOnJacobianNonzeroReallocation()

void FEProblemBase::setErrorOnJacobianNonzeroReallocation ( bool  state)
inline

Definition at line 2443 of file FEProblemBase.h.

2444 {
2446 }

◆ setException()

void FEProblemBase::setException ( const std::string &  message)
virtual

Set an exception, which is stored at this point by toggling a member variable in this class, and which must be followed up with by a call to checkExceptionAndStopSolve().

Parameters
messageThe error message describing the exception, which will get printed when checkExceptionAndStopSolve() is called

Definition at line 7308 of file FEProblemBase.C.

7309{
7310 _has_exception = true;
7311 _exception_message = message;
7312}

Referenced by ComputeThreadedGeneralUserObjectsThread::caughtMooseException(), ThreadedFaceLoop< RangeType >::caughtMooseException(), ThreadedNodeLoop< RangeType, IteratorType >::caughtMooseException(), NonlinearSystemBase::computeDamping(), AuxiliarySystem::computeElementalVarsHelper(), AuxiliarySystem::computeMortarNodalVars(), handleException(), ComputeMortarFunctor::operator()(), DisplacedProblem::updateMesh(), and DisplacedProblem::updateMesh().

◆ setExecutionPrinting()

void FEProblemBase::setExecutionPrinting ( const ExecFlagEnum &  print_exec)
inline

Definition at line 2987 of file FEProblemBase.h.

2987{ _print_execution_on = print_exec; }

◆ setFailNextNonlinearConvergenceCheck()

void FEProblemBase::setFailNextNonlinearConvergenceCheck ( )
inline

Skip further residual evaluations and fail the next nonlinear convergence check(s)

Definition at line 2974 of file FEProblemBase.h.

void setFailNextSystemConvergenceCheck()
Tell the problem that the system(s) cannot be considered converged next time convergence is checked.

Referenced by Terminator::execute().

◆ setFailNextSystemConvergenceCheck()

void FEProblemBase::setFailNextSystemConvergenceCheck ( )
inline

Tell the problem that the system(s) cannot be considered converged next time convergence is checked.

Definition at line 2976 of file FEProblemBase.h.

Referenced by setFailNextNonlinearConvergenceCheck().

◆ setFunctorOutput()

void SubProblem::setFunctorOutput ( bool  set_output)
inlineinherited

Setter for debug functor output.

Definition at line 929 of file SubProblem.h.

929{ _show_functors = set_output; }
bool _show_functors
Whether to output a list of the functors used and requested (currently only at initialSetup)

◆ setIgnoreZerosInJacobian()

void FEProblemBase::setIgnoreZerosInJacobian ( bool  state)
inline

Set whether the zeros in the Jacobian should be dropped from the sparsity pattern.

Definition at line 2466 of file FEProblemBase.h.

2466{ _ignore_zeros_in_jacobian = state; }

◆ setInputParametersFEProblem()

virtual void FEProblemBase::setInputParametersFEProblem ( InputParameters &  parameters)
inlinevirtual

Reimplemented in FEProblem.

Definition at line 1046 of file FEProblemBase.h.

1047 {
1048 parameters.set<FEProblemBase *>("_fe_problem_base") = this;
1049 }

Referenced by FEProblem::setInputParametersFEProblem().

◆ setKernelCoverageCheck() [1/2]

void FEProblemBase::setKernelCoverageCheck ( bool  flag)
inline

Set flag to indicate whether kernel coverage checks should be performed.

This check makes sure that at least one kernel is active on all subdomains in the domain (default: true).

Definition at line 2287 of file FEProblemBase.h.

◆ setKernelCoverageCheck() [2/2]

void FEProblemBase::setKernelCoverageCheck ( CoverageCheckMode  mode)
inline

Set flag to indicate whether kernel coverage checks should be performed.

This check makes sure that at least one kernel is active on all subdomains in the domain (default: true).

Definition at line 2281 of file FEProblemBase.h.

2281{ _kernel_coverage_check = mode; }

◆ setLinearConvergenceNames()

void FEProblemBase::setLinearConvergenceNames ( const std::vector< ConvergenceName > &  convergence_names)

Sets the linear convergence object name(s) if there is one.

Definition at line 10201 of file FEProblemBase.C.

10202{
10203 if (convergence_names.size() != numLinearSystems())
10204 paramError("linear_convergence", "There must be one convergence object per linear system");
10205 _linear_convergence_names = convergence_names;
10206}

Referenced by FEProblemSolve::FEProblemSolve().

◆ setMaterialCoverageCheck() [1/2]

void FEProblemBase::setMaterialCoverageCheck ( bool  flag)
inline

Set flag to indicate whether material coverage checks should be performed.

This check makes sure that at least one material is active on all subdomains in the domain if any material is supplied. If no materials are supplied anywhere, a simulation is still considered OK as long as no properties are being requested anywhere.

Definition at line 2306 of file FEProblemBase.h.

◆ setMaterialCoverageCheck() [2/2]

void FEProblemBase::setMaterialCoverageCheck ( CoverageCheckMode  mode)
inline

Set flag to indicate whether material coverage checks should be performed.

This check makes sure that at least one material is active on all subdomains in the domain if any material is supplied. If no materials are supplied anywhere, a simulation is still considered OK as long as no properties are being requested anywhere.

Definition at line 2298 of file FEProblemBase.h.

2298{ _material_coverage_check = mode; }

◆ setMultiAppFixedPointConvergenceName()

void FEProblemBase::setMultiAppFixedPointConvergenceName ( const ConvergenceName &  convergence_name)

Sets the MultiApp fixed point convergence object name if there is one.

Definition at line 10173 of file FEProblemBase.C.

10174{
10175 _multiapp_fixed_point_convergence_name = convergence_name;
10176}

Referenced by FixedPointSolve::FixedPointSolve().

◆ setNeedToAddDefaultMultiAppFixedPointConvergence()

void FEProblemBase::setNeedToAddDefaultMultiAppFixedPointConvergence ( )
inline

Sets _need_to_add_default_multiapp_fixed_point_convergence to true.

Definition at line 783 of file FEProblemBase.h.

Referenced by FixedPointSolve::FixedPointSolve().

◆ setNeedToAddDefaultNonlinearConvergence()

void FEProblemBase::setNeedToAddDefaultNonlinearConvergence ( )
inline

Sets _need_to_add_default_nonlinear_convergence to true.

Definition at line 778 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

◆ setNeedToAddDefaultSteadyStateConvergence()

void FEProblemBase::setNeedToAddDefaultSteadyStateConvergence ( )
inline

Sets _need_to_add_default_steady_state_convergence to true.

Definition at line 788 of file FEProblemBase.h.

Referenced by TransientBase::TransientBase().

◆ setNeighborSubdomainID() [1/2]

void FEProblemBase::setNeighborSubdomainID ( const Elem *  elem,
const THREAD_ID  tid 
)
virtual

Definition at line 2019 of file FEProblemBase.C.

2020{
2021 SubdomainID did = elem->subdomain_id();
2022 for (const auto i : index_range(_nl))
2023 {
2024 _assembly[tid][i]->setCurrentNeighborSubdomainID(did);
2025 if (_displaced_problem &&
2027 _displaced_problem->assembly(tid, i).setCurrentNeighborSubdomainID(did);
2028 }
2029}

◆ setNeighborSubdomainID() [2/2]

void FEProblemBase::setNeighborSubdomainID ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2006 of file FEProblemBase.C.

2007{
2008 SubdomainID did = elem->neighbor_ptr(side)->subdomain_id();
2009 for (const auto i : index_range(_nl))
2010 {
2011 _assembly[tid][i]->setCurrentNeighborSubdomainID(did);
2012 if (_displaced_problem &&
2014 _displaced_problem->assembly(tid, i).setCurrentNeighborSubdomainID(did);
2015 }
2016}

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), reinitNeighbor(), and NonlinearSystemBase::reinitNodeFace().

◆ setNonlinearConvergenceNames()

void FEProblemBase::setNonlinearConvergenceNames ( const std::vector< ConvergenceName > &  convergence_names)

Sets the nonlinear convergence object name(s) if there is one.

Definition at line 10160 of file FEProblemBase.C.

10161{
10162 if (convergence_names.size() != numNonlinearSystems())
10163 paramError("nonlinear_convergence",
10164 "There must be one convergence object per nonlinear system");
10165
10166 _nonlinear_convergence_names = convergence_names;
10167
10168 for (const auto i : make_range(numNonlinearSystems()))
10169 _nl[i]->setConvergenceName(convergence_names[i]);
10170}

Referenced by FEProblemSolve::FEProblemSolve().

◆ setNonlocalCouplingMatrix()

void FEProblemBase::setNonlocalCouplingMatrix ( )

Set custom coupling matrix for variables requiring nonlocal contribution.

Definition at line 6969 of file FEProblemBase.C.

6970{
6971 TIME_SECTION("setNonlocalCouplingMatrix", 5, "Setting Nonlocal Coupling Matrix");
6972
6973 if (_nl.size() > 1)
6974 mooseError("Nonlocal kernels are weirdly stored on the FEProblem so we don't currently support "
6975 "multiple nonlinear systems with nonlocal kernels.");
6976
6977 for (const auto nl_sys_num : index_range(_nl))
6978 {
6979 auto & nl = _nl[nl_sys_num];
6980 auto & nonlocal_cm = _nonlocal_cm[nl_sys_num];
6981 unsigned int n_vars = nl->nVariables();
6982 nonlocal_cm.resize(n_vars);
6983 const auto & vars = nl->getVariables(0);
6984 const auto & nonlocal_kernel = _nonlocal_kernels.getObjects();
6985 const auto & nonlocal_integrated_bc = _nonlocal_integrated_bcs.getObjects();
6986 for (const auto & ivar : vars)
6987 {
6988 for (const auto & kernel : nonlocal_kernel)
6989 {
6990 for (unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
6991 if (i == kernel->variable().number())
6992 for (const auto & jvar : vars)
6993 {
6994 const auto it = _var_dof_map.find(jvar->name());
6995 if (it != _var_dof_map.end())
6996 {
6997 unsigned int j = jvar->number();
6998 nonlocal_cm(i, j) = 1;
6999 }
7000 }
7001 }
7002 for (const auto & integrated_bc : nonlocal_integrated_bc)
7003 {
7004 for (unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
7005 if (i == integrated_bc->variable().number())
7006 for (const auto & jvar : vars)
7007 {
7008 const auto it = _var_dof_map.find(jvar->name());
7009 if (it != _var_dof_map.end())
7010 {
7011 unsigned int j = jvar->number();
7012 nonlocal_cm(i, j) = 1;
7013 }
7014 }
7015 }
7016 }
7017 }
7018}
std::map< std::string, std::vector< dof_id_type > > _var_dof_map
Definition SubProblem.h:685

◆ setParallelBarrierMessaging()

void FEProblemBase::setParallelBarrierMessaging ( bool  flag)
inline

Toggle parallel barrier messaging (defaults to on).

Definition at line 2314 of file FEProblemBase.h.

◆ setPostprocessorValueByName()

void FEProblemBase::setPostprocessorValueByName ( const PostprocessorName &  name,
const PostprocessorValue &  value,
std::size_t  t_index = 0 
)

Set the value of a PostprocessorValue.

Parameters
nameThe name of the post-processor
t_indexFlag for getting current (0), old (1), or older (2) values
Returns
The reference to the value at the given time index

Note: This method is only for setting values that already exist, the Postprocessor and PostprocessorInterface objects should be used rather than this method for creating and getting values within objects.

WARNING! This method should be used with caution. It exists to allow Transfers and other similar objects to modify Postprocessor values. It is not intended for general use.

Definition at line 5007 of file FEProblemBase.C.

5010{
5013}
void setReporterValue(const ReporterName &reporter_name, const T &value, const std::size_t time_index=0)
Method for setting Reporter values that already exist.

Referenced by PIDTransientControl::execute(), MultiAppPostprocessorTransfer::execute(), MFEMProblem::executeMFEMObjects(), PIDTransientControl::initialSetup(), joinAndFinalize(), PIDTransientControl::timestepSetup(), PicardSolve::transformPostprocessors(), SecantSolve::transformPostprocessors(), and SteffensenSolve::transformPostprocessors().

◆ setPreserveMatrixSparsityPattern()

void FEProblemBase::setPreserveMatrixSparsityPattern ( bool  preserve)

Set whether the sparsity pattern of the matrices being formed during the solve (usually the Jacobian) should be preserved.

This global setting can be retrieved by kernels, notably those using AD, to decide whether to take additional care to preserve the sparsity pattern

Definition at line 4132 of file FEProblemBase.C.

4133{
4134 if (_ignore_zeros_in_jacobian && preserve)
4136 "ignore_zeros_in_jacobian",
4137 "We likely cannot preserve the sparsity pattern if ignoring zeros in the Jacobian, which "
4138 "leads to removing those entries from the Jacobian sparsity pattern");
4140}
void paramWarning(const std::string &param, Args... args) const

◆ setResidual() [1/2]

virtual void SubProblem::setResidual ( libMesh::NumericVector< libMesh::Number > &  residual,
const THREAD_ID  tid 
)
pure virtualinherited

◆ setResidual() [2/2]

void FEProblemBase::setResidual ( NumericVector< libMesh::Number > &  residual,
const THREAD_ID  tid 
)
overridevirtual

Definition at line 2152 of file FEProblemBase.C.

2153{
2154 _assembly[tid][_current_nl_sys->number()]->setResidual(
2155 residual,
2157 getVectorTag(_nl[_current_nl_sys->number()]->residualVectorTag()));
2159 _displaced_problem->setResidual(residual, tid);
2160}

Referenced by NonlinearSystemBase::constraintResiduals().

◆ setResidualNeighbor() [1/2]

virtual void SubProblem::setResidualNeighbor ( libMesh::NumericVector< libMesh::Number > &  residual,
const THREAD_ID  tid 
)
pure virtualinherited

◆ setResidualNeighbor() [2/2]

void FEProblemBase::setResidualNeighbor ( NumericVector< libMesh::Number > &  residual,
const THREAD_ID  tid 
)
overridevirtual

Definition at line 2163 of file FEProblemBase.C.

2164{
2165 _assembly[tid][_current_nl_sys->number()]->setResidualNeighbor(
2168 _displaced_problem->setResidualNeighbor(residual, tid);
2169}

◆ setResidualObjectParamsAndLog()

void FEProblemBase::setResidualObjectParamsAndLog ( const std::string &  ro_name,
const std::string &  name,
InputParameters &  parameters,
const unsigned int  nl_sys_num,
const std::string &  base_name,
bool &  reinit_displaced 
)
private

Set the subproblem and system parameters for residual objects and log their addition.

Parameters
ro_nameThe type of the residual object
nameThe name of the residual object
parametersThe residual object parameters
nl_sys_numThe nonlinear system that the residual object belongs to
base_nameThe base type of the residual object, e.g. Kernel, BoundaryCondition, etc.
reinit_displacedA data member indicating whether a geometric concept should be reinit'd for the displaced problem. Examples of valid data members to pass in are _reinit_displaced_elem and _reinit_displaced_face

Definition at line 3155 of file FEProblemBase.C.

3161{
3162 if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3163 {
3164 parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3165 parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3166 reinit_displaced = true;
3167 }
3168 else
3169 {
3170 if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3171 {
3172 // We allow Kernels to request that they use_displaced_mesh,
3173 // but then be overridden when no displacements variables are
3174 // provided in the Mesh block. If that happened, update the value
3175 // of use_displaced_mesh appropriately for this Kernel.
3176 if (parameters.have_parameter<bool>("use_displaced_mesh"))
3177 parameters.set<bool>("use_displaced_mesh") = false;
3178 }
3179
3180 parameters.set<SubProblem *>("_subproblem") = this;
3181 parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3182 }
3183
3184 logAdd(base_name, name, ro_name, parameters);
3185}

Referenced by addBoundaryCondition(), addHDGKernel(), and addKernel().

◆ setRestartFile()

void FEProblemBase::setRestartFile ( const std::string &  file_name)

Communicate to the Resurector the name of the restart filer.

Parameters
file_nameThe file name for restarting from

Definition at line 9629 of file FEProblemBase.C.

9630{
9631 if (_app.isRecovering())
9632 {
9633 mooseInfo("Restart file ", file_name, " is NOT being used since we are performing recovery.");
9634 }
9635 else
9636 {
9637 _app.setRestart(true);
9639 mooseInfo("Using ", file_name, " for restart.");
9640 }
9641}
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition MooseError.h:401
void setRestart(bool value)
Sets the restart/recover flags.
Definition MooseApp.C:2888
void setRestartRecoverFileBase(const std::string &file_base)
mutator for recover_base (set by RecoverBaseAction)
Definition MooseApp.h:516

Referenced by Executioner::Executioner(), Executioner::Executioner(), and FEProblemBase().

◆ setSNESMFReuseBase()

void FEProblemBase::setSNESMFReuseBase ( bool  reuse,
bool  set_by_user 
)
inline

If or not to reuse the base vector for matrix-free calculation.

Definition at line 2667 of file FEProblemBase.h.

2668 {
2670 }

Referenced by FEProblemSolve::FEProblemSolve().

◆ setSteadyStateConvergenceName()

void FEProblemBase::setSteadyStateConvergenceName ( const ConvergenceName &  convergence_name)

Sets the steady-state detection convergence object name if there is one.

Definition at line 10179 of file FEProblemBase.C.

10180{
10181 _steady_state_convergence_name = convergence_name;
10182}

Referenced by TransientBase::TransientBase().

◆ setUDotDotOldRequested()

virtual void FEProblemBase::setUDotDotOldRequested ( const bool  u_dotdot_old_requested)
inlinevirtual

Set boolean flag to true to store old solution second time derivative.

Definition at line 2715 of file FEProblemBase.h.

2716 {
2717 _u_dotdot_old_requested = u_dotdot_old_requested;
2718 }

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

◆ setUDotDotRequested()

virtual void FEProblemBase::setUDotDotRequested ( const bool  u_dotdot_requested)
inlinevirtual

Set boolean flag to true to store solution second time derivative.

Definition at line 2703 of file FEProblemBase.h.

2704 {
2705 _u_dotdot_requested = u_dotdot_requested;
2706 }

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

◆ setUDotOldRequested()

virtual void FEProblemBase::setUDotOldRequested ( const bool  u_dot_old_requested)
inlinevirtual

Set boolean flag to true to store old solution time derivative.

Definition at line 2709 of file FEProblemBase.h.

2710 {
2711 _u_dot_old_requested = u_dot_old_requested;
2712 }

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

◆ setUDotRequested()

virtual void FEProblemBase::setUDotRequested ( const bool  u_dot_requested)
inlinevirtual

Set boolean flag to true to store solution time derivative.

Definition at line 2700 of file FEProblemBase.h.

2700{ _u_dot_requested = u_dot_requested; }

Referenced by TimeIntegrator::TimeIntegrator().

◆ setupDampers()

void FEProblemBase::setupDampers ( )

Definition at line 5833 of file FEProblemBase.C.

5834{
5835 for (auto & nl : _nl)
5836 nl->setupDampers();
5837}

◆ setVariableAllDoFMap()

void FEProblemBase::setVariableAllDoFMap ( const std::vector< const MooseVariableFEBase * > &  moose_vars)

Definition at line 1901 of file FEProblemBase.C.

1902{
1903 for (unsigned int i = 0; i < moose_vars.size(); ++i)
1904 {
1905 VariableName var_name = moose_vars[i]->name();
1906 auto & sys = _solver_systems[moose_vars[i]->sys().number()];
1907 sys->setVariableGlobalDoFs(var_name);
1908 _var_dof_map[var_name] = sys->getVariableGlobalDoFs();
1909 }
1910}

Referenced by meshChanged().

◆ setVectorPostprocessorValueByName()

void FEProblemBase::setVectorPostprocessorValueByName ( const std::string &  object_name,
const std::string &  vector_name,
const VectorPostprocessorValue &  value,
std::size_t  t_index = 0 
)

Set the value of a VectorPostprocessor vector.

Parameters
object_nameThe name of the VPP object
vector_nameThe name of the declared vector
valueThe data to apply to the vector
t_indexFlag for getting current (0), old (1), or older (2) values

Definition at line 5033 of file FEProblemBase.C.

5037{
5039 VectorPostprocessorReporterName(object_name, vector_name), value, t_index);
5040}

◆ setVerboseProblem()

void FEProblemBase::setVerboseProblem ( bool  verbose)

Make the problem be verbose.

Definition at line 10349 of file FEProblemBase.C.

10350{
10351 _verbose_setup = verbose ? "true" : "false";
10352 _verbose_multiapps = verbose;
10353 _verbose_restore = verbose;
10354}

Referenced by PhysicsBase::initializePhysics().

◆ shouldPrintExecution()

bool FEProblemBase::shouldPrintExecution ( const THREAD_ID  tid) const

Check whether the problem should output execution orders at this time.

Definition at line 10291 of file FEProblemBase.C.

10292{
10293 // For now, only support printing from thread 0
10294 if (tid != 0)
10295 return false;
10296
10299 return true;
10300 else
10301 return false;
10302}
const ExecFlagType EXEC_ALWAYS
Definition Moose.C:54

Referenced by joinAndFinalize(), ComputeLinearFVElementalThread::printBlockExecutionInformation(), ComputeLinearFVFaceThread::printBlockExecutionInformation(), ComputeDiracThread::printBlockExecutionInformation(), ComputeIndicatorThread::printBlockExecutionInformation(), ComputeMarkerThread::printBlockExecutionInformation(), ComputeUserObjectsThread::printBlockExecutionInformation(), NonlinearThread::printBlockExecutionInformation(), NonlinearThread::printBoundaryExecutionInformation(), ComputeFVInitialConditionThread::printGeneralExecutionInformation(), ComputeInitialConditionThread::printGeneralExecutionInformation(), ComputeLinearFVElementalThread::printGeneralExecutionInformation(), ComputeLinearFVFaceThread::printGeneralExecutionInformation(), ComputeDiracThread::printGeneralExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeIndicatorThread::printGeneralExecutionInformation(), ComputeMarkerThread::printGeneralExecutionInformation(), ComputeNodalDampingThread::printGeneralExecutionInformation(), ComputeNodalKernelBCJacobiansThread::printGeneralExecutionInformation(), ComputeNodalKernelBcsThread::printGeneralExecutionInformation(), ComputeNodalKernelJacobiansThread::printGeneralExecutionInformation(), ComputeNodalKernelsThread::printGeneralExecutionInformation(), ComputeNodalUserObjectsThread::printGeneralExecutionInformation(), ComputeUserObjectsThread::printGeneralExecutionInformation(), NonlinearThread::printGeneralExecutionInformation(), and ComputeThreadedGeneralUserObjectsThread::printGeneralExecutionInformation().

◆ shouldSolve()

bool FEProblemBase::shouldSolve ( ) const
inline

◆ shouldUpdateSolution()

bool FEProblemBase::shouldUpdateSolution ( )
virtual

Check to see whether the problem should update the solution.

Returns
true if the problem should update the solution, false otherwise

Definition at line 8704 of file FEProblemBase.C.

8705{
8706 return false;
8707}

Referenced by computePostCheck(), and NonlinearSystem::solve().

◆ showFunctorRequestors()

void SubProblem::showFunctorRequestors ( ) const
privateinherited

Lists all functors and all the objects that requested them.

Definition at line 1264 of file SubProblem.C.

1265{
1266 for (const auto & [functor, requestors] : _functor_to_requestors)
1267 {
1268 _console << "[DBG] Requestors for wrapped functor "
1269 << std::regex_replace(functor, std::regex("wraps_"), "") << std::endl;
1270 _console << "[DBG] " << MooseUtils::join(requestors, " ") << std::endl;
1271 }
1272}

Referenced by SubProblem::initialSetup().

◆ showFunctors()

void SubProblem::showFunctors ( ) const
privateinherited

Lists all functors in the problem.

Definition at line 1252 of file SubProblem.C.

1253{
1254 _console << "[DBG] Wrapped functors found in Subproblem" << std::endl;
1255 std::string functor_names = "[DBG] ";
1256 for (const auto & functor_pair : _functors[0])
1257 functor_names += std::regex_replace(functor_pair.first, std::regex("wraps_"), "") + " ";
1258 if (functor_names.size())
1259 functor_names.pop_back();
1260 _console << functor_names << std::endl;
1261}

Referenced by SubProblem::initialSetup().

◆ showInvalidSolutionConsole()

bool FEProblemBase::showInvalidSolutionConsole ( ) const
inline

Whether or not to print out the invalid solutions summary table in console.

Definition at line 2483 of file FEProblemBase.h.

Referenced by SolverSystem::checkInvalidSolution().

◆ sideUOInterfaceMatPropIntegrityCheck()

bool FEProblemBase::sideUOInterfaceMatPropIntegrityCheck ( ) const
inline
Returns
whether to perform an integrity check for side user objects consuming interface material properties

Definition at line 2834 of file FEProblemBase.h.

2835 {
2837 }

Referenced by SideUserObject::initialSetup().

◆ sizeZeroes()

void FEProblemBase::sizeZeroes ( unsigned int  size,
const THREAD_ID  tid 
)
virtual

Definition at line 2354 of file FEProblemBase.C.

2355{
2356 mooseDoOnce(mooseWarning(
2357 "This function is deprecated and no longer performs any function. Please do not call it."));
2358}

◆ skipExceptionCheck()

void FEProblemBase::skipExceptionCheck ( bool  skip_exception_check)
inline

Set a flag that indicates if we want to skip exception and stop solve.

Definition at line 2680 of file FEProblemBase.h.

2681 {
2682 _skip_exception_check = skip_exception_check;
2683 }

Referenced by FEProblemSolve::FEProblemSolve().

◆ skipNextForwardSolutionCopyToOld()

void FEProblemBase::skipNextForwardSolutionCopyToOld ( )

Prevents the copy of the solution vector to the old solution vector in each system.

Old -> Older is still performed This is useful for MultiApps fixed point iterations

Definition at line 7486 of file FEProblemBase.C.

7487{
7488 for (auto & sys : _solver_systems)
7489 sys->skipNextSolutionToOldCopy();
7490 _aux->skipNextSolutionToOldCopy();
7491}

Referenced by FullSolveMultiApp::solveStep().

◆ solve()

void FEProblemBase::solve ( const unsigned int  nl_sys_num)
virtual

Reimplemented in EigenProblem, ExternalProblem, and DumpObjectsProblem.

Definition at line 7246 of file FEProblemBase.C.

7247{
7248 TIME_SECTION("solve", 1, "Solving", false);
7249
7250 setCurrentNonlinearSystem(nl_sys_num);
7251
7252 // This prevents stale dof indices from lingering around and possibly leading to invalid reads
7253 // and writes. Dof indices may be made stale through operations like mesh adaptivity
7256 _displaced_problem->clearAllDofIndices();
7257
7258 // Setup the output system for printing linear/nonlinear iteration information and some solver
7259 // settings, including setting matrix prefixes. This must occur before petscSetOptions
7261
7262#if PETSC_RELEASE_LESS_THAN(3, 12, 0)
7264 _petsc_options, _solver_params); // Make sure the PETSc options are setup for this app
7265#else
7266 // Now this database will be the default
7267 // Each app should have only one database
7268 if (!_app.isUltimateMaster())
7269 LibmeshPetscCall(PetscOptionsPush(_petsc_option_data_base));
7270 // We did not add PETSc options to database yet
7272 {
7273 // Insert options for all systems all at once
7276 }
7277#endif
7278
7279 // set up DM which is required if use a field split preconditioner
7280 // We need to setup DM every "solve()" because libMesh destroy SNES after solve()
7281 // Do not worry, DM setup is very cheap
7283
7285
7286 // reset flag so that residual evaluation does not get skipped
7287 // and the next non-linear iteration does not automatically fail with
7288 // "DIVERGED_NANORINF", when we throw an exception and stop solve
7290
7291 if (_solve)
7292 {
7295 }
7296
7297 // sync solutions in displaced problem
7299 _displaced_problem->syncSolutions();
7300
7301#if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
7302 if (!_app.isUltimateMaster())
7303 LibmeshPetscCall(PetscOptionsPop());
7304#endif
7305}
virtual void possiblyRebuildGeomSearchPatches()
virtual void solve() override=0
Solve the system (using libMesh magic)
void setupDM()
Setup the PETSc DM object (when appropriate)
void update()
Update the system (doing libMesh magic)
void petscSetOptions(const PetscOptions &po, const SolverParams &solver_params, FEProblemBase *const problem=nullptr)
A function for setting the PETSc options in PETSc from the options supplied to MOOSE.

Referenced by EigenExecutionerBase::inversePowerIteration(), EigenExecutionerBase::nonlinearSolve(), FEProblemSolve::solve(), and AB2PredictorCorrector::step().

◆ solveLinearSystem()

void FEProblemBase::solveLinearSystem ( const unsigned int  linear_sys_num,
const Moose::PetscSupport::PetscOptions *  po = nullptr 
)
virtual

Build and solve a linear system.

Parameters
linear_sys_numThe number of the linear system (1,..,num. of lin. systems)
poThe petsc options for the solve, if not supplied, the defaults are used

Reimplemented in DumpObjectsProblem.

Definition at line 7403 of file FEProblemBase.C.

7405{
7406 TIME_SECTION("solve", 1, "Solving", false);
7407
7408 setCurrentLinearSystem(linear_sys_num);
7409
7410 const Moose::PetscSupport::PetscOptions & options = po ? *po : _petsc_options;
7411 auto & solver_params = _solver_params[numNonlinearSystems() + linear_sys_num];
7412
7413 // Set custom convergence criteria
7415
7416#if PETSC_RELEASE_LESS_THAN(3, 12, 0)
7417 LibmeshPetscCall(Moose::PetscSupport::petscSetOptions(
7418 options, solver_params)); // Make sure the PETSc options are setup for this app
7419#else
7420 // Now this database will be the default
7421 // Each app should have only one database
7422 if (!_app.isUltimateMaster())
7423 LibmeshPetscCall(PetscOptionsPush(_petsc_option_data_base));
7424
7425 // We did not add PETSc options to database yet
7427 {
7428 Moose::PetscSupport::petscSetOptions(options, solver_params, this);
7430 }
7431#endif
7432
7433 if (_solve)
7435
7436#if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
7437 if (!_app.isUltimateMaster())
7438 LibmeshPetscCall(PetscOptionsPop());
7439#endif
7440}
virtual void solve() override
Solve the system (using libMesh magic)
A struct for storing the various types of petsc options and values.

Referenced by FEProblemSolve::solve().

◆ solverParams() [1/2]

SolverParams & FEProblemBase::solverParams ( unsigned int  solver_sys_num = 0)

Get the solver parameters.

Definition at line 9661 of file FEProblemBase.C.

9662{
9663 mooseAssert(solver_sys_num < numSolverSystems(),
9664 "Solver system number '" << solver_sys_num << "' is out of bounds. We have '"
9665 << numSolverSystems() << "' solver systems");
9666 return _solver_params[solver_sys_num];
9667}

Referenced by NonlinearEigenSystem::attachPreconditioner(), SolverSystem::compute(), SlepcEigenSolverConfiguration::configure_solver(), EigenProblemSolve::EigenProblemSolve(), ExplicitTimeIntegrator::ExplicitTimeIntegrator(), FEProblemSolve::FEProblemSolve(), EigenProblem::init(), init(), ExplicitTimeIntegrator::init(), EigenProblemSolve::initialSetup(), EigenProblem::isNonlinearEigenvalueSolver(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionA(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionAB(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionB(), Moose::SlepcSupport::mooseSlepcEigenFormJacobianA(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), ConsoleUtils::outputExecutionInformation(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), NonlinearSystem::residualAndJacobianTogether(), Moose::SlepcSupport::setEigenProblemSolverParams(), Moose::PetscSupport::setLineSearchFromParams(), Moose::PetscSupport::setMFFDTypeFromParams(), Moose::PetscSupport::setSinglePetscOption(), Moose::PetscSupport::setSolveTypeFromParams(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), EigenProblem::solve(), solverParams(), solverTypeString(), EigenProblem::solverTypeString(), and Moose::SlepcSupport::storeSolveType().

◆ solverParams() [2/2]

const SolverParams & FEProblemBase::solverParams ( unsigned int  solver_sys_num = 0) const

const version

Definition at line 9670 of file FEProblemBase.C.

9671{
9672 return const_cast<FEProblemBase *>(this)->solverParams(solver_sys_num);
9673}

◆ solverSysNum()

unsigned int FEProblemBase::solverSysNum ( const SolverSystemName &  solver_sys_name) const
overridevirtual
Returns
the solver system number corresponding to the provided solver_sys_name

Implements SubProblem.

Definition at line 7211 of file FEProblemBase.C.

7212{
7213 std::istringstream ss(solver_sys_name);
7214 unsigned int solver_sys_num;
7215 if (!(ss >> solver_sys_num) || !ss.eof())
7216 {
7217 const auto & search = _solver_sys_name_to_num.find(solver_sys_name);
7218 if (search == _solver_sys_name_to_num.end())
7219 mooseError("The solver system number was requested for system '" + solver_sys_name,
7220 "' but this system does not exist in the Problem. Systems can be added to the "
7221 "problem using the 'nl_sys_names'/'linear_sys_names' parameter.\nSystems in the "
7222 "Problem: " +
7224 solver_sys_num = search->second;
7225 }
7226
7227 return solver_sys_num;
7228}

Referenced by addVariable(), getSystemBase(), PhysicsBase::initializePhysics(), MultiSystemSolveObject::MultiSystemSolveObject(), and DisplacedProblem::solverSysNum().

◆ solverSystemConverged()

bool FEProblemBase::solverSystemConverged ( const unsigned int  sys_num)
overridevirtual
Returns
whether the given solver system sys_num is converged

Reimplemented from SubProblem.

Reimplemented in EigenProblem.

Definition at line 7443 of file FEProblemBase.C.

7444{
7445 if (_solve)
7446 return _solver_systems[sys_num]->converged();
7447 else
7448 return true;
7449}

◆ solverTypeString()

std::string FEProblemBase::solverTypeString ( unsigned int  solver_sys_num = 0)
virtual

Return solver type as a human readable string.

Reimplemented in MFEMProblem, and EigenProblem.

Definition at line 10470 of file FEProblemBase.C.

10471{
10472 return Moose::stringify(solverParams(solver_sys_num)._type);
10473}

Referenced by ConsoleUtils::outputExecutionInformation().

◆ startedInitialSetup()

virtual bool FEProblemBase::startedInitialSetup ( )
inlinevirtual

Returns true if we are in or beyond the initialSetup stage.

Definition at line 569 of file FEProblemBase.h.

569{ return _started_initial_setup; }

Referenced by MaterialBase::checkExecutionStage(), MaterialPropertyInterface::checkExecutionStage(), and NEML2ModelExecutor::checkExecutionStage().

◆ storeBoundaryDelayedCheckMatProp()

void SubProblem::storeBoundaryDelayedCheckMatProp ( const std::string &  requestor,
BoundaryID  boundary_id,
const std::string &  name 
)
virtualinherited

Adds to a map based on boundary ids of material properties to validate.

Parameters
requestorThe MOOSE object name requesting the material property
boundary_idThe block id for the MaterialProperty
nameThe name of the property

Definition at line 607 of file SubProblem.C.

610{
611 _map_boundary_material_props_check[boundary_id].insert(std::make_pair(requestor, name));
612}

Referenced by MaterialPropertyInterface::checkMaterialProperty().

◆ storeBoundaryMatPropName()

void SubProblem::storeBoundaryMatPropName ( BoundaryID  boundary_id,
const std::string &  name 
)
virtualinherited

Adds the given material property to a storage map based on boundary ids.

This is method is called from within the Material class when the property is first registered.

Parameters
boundary_idThe block id for the MaterialProperty
nameThe name of the property

Definition at line 581 of file SubProblem.C.

582{
583 _map_boundary_material_props[boundary_id].insert(name);
584}

Referenced by MaterialBase::registerPropName().

◆ storeBoundaryZeroMatProp()

void SubProblem::storeBoundaryZeroMatProp ( BoundaryID  boundary_id,
const MaterialPropertyName &  name 
)
virtualinherited

Adds to a map based on boundary ids of material properties for which a zero value can be returned.

Thes properties are optional and will not trigger a missing material property error.

Parameters
boundary_idThe block id for the MaterialProperty
nameThe name of the property

Definition at line 593 of file SubProblem.C.

594{
595 _zero_boundary_material_props[boundary_id].insert(name);
596}

Referenced by MaterialBase::storeBoundaryZeroMatProp().

◆ storeSubdomainDelayedCheckMatProp()

void SubProblem::storeSubdomainDelayedCheckMatProp ( const std::string &  requestor,
SubdomainID  block_id,
const std::string &  name 
)
virtualinherited

Adds to a map based on block ids of material properties to validate.

Parameters
block_idThe block id for the MaterialProperty
nameThe name of the property

Definition at line 599 of file SubProblem.C.

602{
603 _map_block_material_props_check[block_id].insert(std::make_pair(requestor, name));
604}

Referenced by MaterialPropertyInterface::checkMaterialProperty().

◆ storeSubdomainMatPropName()

void SubProblem::storeSubdomainMatPropName ( SubdomainID  block_id,
const std::string &  name 
)
virtualinherited

Adds the given material property to a storage map based on block ids.

This is method is called from within the Material class when the property is first registered.

Parameters
block_idThe block id for the MaterialProperty
nameThe name of the property

Definition at line 575 of file SubProblem.C.

576{
577 _map_block_material_props[block_id].insert(name);
578}

Referenced by MaterialBase::registerPropName().

◆ storeSubdomainZeroMatProp()

void SubProblem::storeSubdomainZeroMatProp ( SubdomainID  block_id,
const MaterialPropertyName &  name 
)
virtualinherited

Adds to a map based on block ids of material properties for which a zero value can be returned.

Thes properties are optional and will not trigger a missing material property error.

Parameters
block_idThe block id for the MaterialProperty
nameThe name of the property

Definition at line 587 of file SubProblem.C.

588{
589 _zero_block_material_props[block_id].insert(name);
590}

Referenced by MaterialBase::storeSubdomainZeroMatProp().

◆ subdomainSetup()

void FEProblemBase::subdomainSetup ( SubdomainID  subdomain,
const THREAD_ID  tid 
)
virtual

Definition at line 2695 of file FEProblemBase.C.

2696{
2697 _all_materials.subdomainSetup(subdomain, tid);
2698 // Call the subdomain methods of the output system, these are not threaded so only call it once
2699 if (tid == 0)
2701
2702 for (auto & nl : _nl)
2703 nl->subdomainSetup(subdomain, tid);
2704
2705 // FIXME: call displaced_problem->subdomainSetup() ?
2706 // When adding possibility with materials being evaluated on displaced mesh
2707}
virtual void subdomainSetup(THREAD_ID tid=0) const override
void subdomainSetup()
Calls the subdomainSetup function for each of the output objects.

Referenced by ThreadedFaceLoop< RangeType >::subdomainChanged(), ComputeDiracThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeMarkerThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeUserObjectsThread::subdomainChanged(), and NonlinearThread::subdomainChanged().

◆ subspaceDim()

unsigned int FEProblemBase::subspaceDim ( const std::string &  prefix) const
inline

Dimension of the subspace spanned by vectors with a given prefix.

Parameters
prefixPrefix of the vectors spanning the subspace.

Definition at line 2356 of file FEProblemBase.h.

2357 {
2358 if (_subspace_dim.count(prefix))
2359 return _subspace_dim.find(prefix)->second;
2360 else
2361 return 0;
2362 }

Referenced by computeNearNullSpace(), computeNullSpace(), and computeTransposeNullSpace().

◆ swapBackMaterials()

void FEProblemBase::swapBackMaterials ( const THREAD_ID  tid)
virtual

Definition at line 4541 of file FEProblemBase.C.

4542{
4543 auto && elem = _assembly[tid][0]->elem();
4545}
void swapBack(const Elem &elem, unsigned int side=0)
material properties for given element (and possible side)

Referenced by NodalPatchRecovery::compute(), LineMaterialSamplerBase< T >::execute(), ComputeElemAuxVarsThread< AuxKernelType >::onElement(), ComputeIndicatorThread::onElement(), ComputeMarkerThread::onElement(), ComputeUserObjectsThread::onElement(), and NonlinearThread::onElement().

◆ swapBackMaterialsFace()

void FEProblemBase::swapBackMaterialsFace ( const THREAD_ID  tid)
virtual

◆ swapBackMaterialsNeighbor()

void FEProblemBase::swapBackMaterialsNeighbor ( const THREAD_ID  tid)
virtual

Definition at line 4556 of file FEProblemBase.C.

4557{
4558 // NOTE: this will not work with h-adaptivity
4559 const Elem * neighbor = _assembly[tid][0]->neighbor();
4560 unsigned int neighbor_side =
4561 neighbor ? neighbor->which_neighbor_am_i(_assembly[tid][0]->elem()) : libMesh::invalid_uint;
4562
4563 if (!neighbor)
4564 {
4565 if (haveFV())
4566 {
4567 // If neighbor is null, then we're on the neighbor side of a mesh boundary, e.g. we're off
4568 // the mesh in ghost-land. If we're using the finite volume method, then variable values and
4569 // consequently material properties have well-defined values in this ghost region outside of
4570 // the mesh and we really do want to reinit our neighbor materials in this case. Since we're
4571 // off in ghost land it's safe to do swaps with `MaterialPropertyStorage` using the elem and
4572 // elem_side keys
4573 neighbor = _assembly[tid][0]->elem();
4574 neighbor_side = _assembly[tid][0]->side();
4575 mooseAssert(neighbor, "We should have an appropriate value for elem coming from Assembly");
4576 }
4577 else
4578 mooseError("neighbor is null in Assembly!");
4579 }
4580
4581 _neighbor_material_props.getMaterialData(tid).swapBack(*neighbor, neighbor_side);
4582}

Referenced by ComputeUserObjectsThread::onInterface(), NonlinearThread::onInterface(), ComputeIndicatorThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), NonlinearThread::onInternalSide(), and ComputeElemAuxBcsThread< AuxKernelType >::operator()().

◆ systemBaseAuxiliary() [1/2]

const SystemBase & FEProblemBase::systemBaseAuxiliary ( ) const
overridevirtual

Return the auxiliary system object as a base class reference.

Implements SubProblem.

Definition at line 10011 of file FEProblemBase.C.

10012{
10013 return *_aux;
10014}

Referenced by PhysicsBase::copyVariablesFromMesh(), and MFEMProblem::getAuxVariableNames().

◆ systemBaseAuxiliary() [2/2]

SystemBase & FEProblemBase::systemBaseAuxiliary ( )
overridevirtual

Implements SubProblem.

Definition at line 10017 of file FEProblemBase.C.

10018{
10019 return *_aux;
10020}

◆ systemBaseLinear() [1/2]

const SystemBase & FEProblemBase::systemBaseLinear ( unsigned int  sys_num) const
overridevirtual

Get a constant base class reference to a linear system.

Parameters
sys_numThe number of the linear system

Implements SubProblem.

Definition at line 9979 of file FEProblemBase.C.

9980{
9981 mooseAssert(sys_num < _linear_systems.size(),
9982 "System number greater than the number of linear systems");
9983 return *_linear_systems[sys_num];
9984}

◆ systemBaseLinear() [2/2]

SystemBase & FEProblemBase::systemBaseLinear ( unsigned int  sys_num)
overridevirtual

Get a non-constant base class reference to a linear system.

Parameters
sys_numThe number of the linear system

Implements SubProblem.

Definition at line 9987 of file FEProblemBase.C.

9988{
9989 mooseAssert(sys_num < _linear_systems.size(),
9990 "System number greater than the number of linear systems");
9991 return *_linear_systems[sys_num];
9992}

◆ systemBaseNonlinear() [1/2]

const SystemBase & FEProblemBase::systemBaseNonlinear ( const unsigned int  sys_num) const
overridevirtual

Return the nonlinear system object as a base class reference given the system number.

Implements SubProblem.

Definition at line 9965 of file FEProblemBase.C.

9966{
9967 mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
9968 return *_nl[sys_num];
9969}

◆ systemBaseNonlinear() [2/2]

SystemBase & FEProblemBase::systemBaseNonlinear ( const unsigned int  sys_num)
overridevirtual

Implements SubProblem.

Definition at line 9972 of file FEProblemBase.C.

9973{
9974 mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
9975 return *_nl[sys_num];
9976}

◆ systemBaseSolver() [1/2]

const SystemBase & FEProblemBase::systemBaseSolver ( const unsigned int  sys_num) const
overridevirtual

Return the solver system object as a base class reference given the system number.

Implements SubProblem.

Definition at line 9995 of file FEProblemBase.C.

9996{
9997 mooseAssert(sys_num < _solver_systems.size(),
9998 "System number greater than the number of solver systems");
9999 return *_solver_systems[sys_num];
10000}

◆ systemBaseSolver() [2/2]

SystemBase & FEProblemBase::systemBaseSolver ( const unsigned int  sys_num)
overridevirtual

Implements SubProblem.

Definition at line 10003 of file FEProblemBase.C.

10004{
10005 mooseAssert(sys_num < _solver_systems.size(),
10006 "System number greater than the number of solver systems");
10007 return *_solver_systems[sys_num];
10008}

◆ systemNumForVariable()

unsigned int FEProblemBase::systemNumForVariable ( const VariableName &  variable_name) const
Returns
the system number for the provided variable_name Can be nonlinear or auxiliary

Definition at line 7231 of file FEProblemBase.C.

7232{
7233 for (const auto & solver_sys : _solver_systems)
7234 if (solver_sys->hasVariable(variable_name))
7235 return solver_sys->number();
7236 mooseAssert(_aux, "Should have an auxiliary system");
7237 if (_aux->hasVariable(variable_name))
7238 return _aux->number();
7239
7240 mooseError("Variable '",
7241 variable_name,
7242 "' was not found in any solver (nonlinear/linear) or auxiliary system");
7243}

Referenced by projectFunctionOnCustomRange(), and ElementSubdomainModifierBase::restoreOverriddenDofValues().

◆ terminateSolve()

virtual void Problem::terminateSolve ( )
inlinevirtualinherited

Allow objects to request clean termination of the solve.

Definition at line 37 of file Problem.h.

37{ _termination_requested = true; };

Referenced by Terminator::execute(), WebServerControl::execute(), and TerminateChainControl::terminate().

◆ theWarehouse()

TheWarehouse & FEProblemBase::theWarehouse ( ) const
inline

Definition at line 2662 of file FEProblemBase.h.

2662{ return _app.theWarehouse(); }
TheWarehouse & theWarehouse()
Definition MooseApp.h:140

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addDGKernel(), NonlinearSystemBase::addDiracKernel(), addFVGradientMethod(), addFVInterpolationMethod(), NonlinearSystemBase::addHDGKernel(), NonlinearSystemBase::addInterfaceKernel(), NonlinearSystemBase::addKernel(), NonlinearSystemBase::addNodalKernel(), addObject(), NonlinearSystemBase::addScalarKernel(), NonlinearSystemBase::addSplit(), addUserObject(), checkGradientMethods(), NonlinearSystemBase::checkKernelCoverage(), checkUserObjectJacobianRequirement(), checkUserObjects(), ComputeResidualAndJacobianThread::compute(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), LinearSystem::containsTimeKernel(), customSetup(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), ComputeResidualThread::determineObjectWarehouses(), MFEMProblem::executeMFEMObjects(), executeSamplers(), ComputeLinearFVElementalThread::fetchBlockSystemContributionObjects(), ComputeLinearFVFaceThread::fetchBlockSystemContributionObjects(), getDistribution(), getFVGradientMethod(), getFVInterpolationMethod(), NonlinearSystemBase::getFVSetupObjects(), getKokkosUserObject(), MFEMProblem::getMFEMObject(), getMortarUserObjects(), getPositionsObject(), getPostprocessorObjectByName(), getSampler(), CompositionDT::getTimeSteppers(), getUOQuery(), getUserObject(), getUserObjectBase(), getVectorPostprocessorObjectByName(), hasDistribution(), hasFVGradientMethod(), hasFVInterpolationMethod(), MFEMProblem::hasMFEMObject(), hasUserObject(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), MFEMProblem::initialSetup(), BoundaryLinearFVFluxIntegral::initialSetup(), SideFVFluxBCIntegral::initialSetup(), LinearSystem::initialSetup(), ExplicitTimeIntegrator::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), needBoundaryMaterialOnSide(), needInterfaceMaterialOnSide(), needInternalNeighborSideMaterial(), JSONOutput::outputReporters(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), ComputeLinearFVElementalThread::setupSystemContributionObjects(), ComputeLinearFVFaceThread::setupSystemContributionObjects(), and timestepSetup().

◆ time()

virtual Real & FEProblemBase::time ( ) const
inlinevirtual

◆ timedSectionName()

std::string PerfGraphInterface::timedSectionName ( const std::string &  section_name) const
protectedinherited
Returns
The name of the timed section with the name section_name.

Optionally adds a prefix if one is defined.

Definition at line 55 of file PerfGraphInterface.C.

56{
57 return _prefix.empty() ? "" : (_prefix + "::") + section_name;
58}
const std::string _prefix
A prefix to use for all sections.

Referenced by PerfGraphInterface::registerTimedSection(), and PerfGraphInterface::registerTimedSection().

◆ timeOld()

virtual Real & FEProblemBase::timeOld ( ) const
inlinevirtual

◆ timeOlder()

virtual Real & FEProblemBase::timeOlder ( ) const
inlinevirtual

The time two steps back.

The solution keeps this state, so a multi-step integrator can ask for it, and a functor evaluated alongside that solution has to be able to ask for the time it belongs to. Only meaningful once two steps have been taken; before that it holds the start time, which is what timeOld() does at the first step too.

Definition at line 582 of file FEProblemBase.h.

582{ return _time_older; }

Referenced by getTimeFromStateArg().

◆ timeStep()

virtual int & FEProblemBase::timeStep ( ) const
inlinevirtual

◆ timestepSetup()

void FEProblemBase::timestepSetup ( )
overridevirtual

Reimplemented from SubProblem.

Definition at line 1694 of file FEProblemBase.C.

1695{
1697
1698 if (_t_step > 1 && _num_grid_steps)
1699 {
1700 libMesh::MeshRefinement mesh_refinement(_mesh);
1701 std::unique_ptr<libMesh::MeshRefinement> displaced_mesh_refinement(nullptr);
1702 if (_displaced_mesh)
1703 displaced_mesh_refinement = std::make_unique<libMesh::MeshRefinement>(*_displaced_mesh);
1704
1705 for (MooseIndex(_num_grid_steps) i = 0; i < _num_grid_steps; ++i)
1706 {
1708 // If the DisplacedProblem is active, undisplace the DisplacedMesh in preparation for
1709 // refinement. We can't safely refine the DisplacedMesh directly, since the Hilbert keys
1710 // computed on the inconsistenly-displaced Mesh are different on different processors,
1711 // leading to inconsistent Hilbert keys. We must do this before the undisplaced Mesh is
1712 // coarsensed, so that the element and node numbering is still consistent. We also have to
1713 // make sure this is done during every step of coarsening otherwise different partitions
1714 // will be generated for the reference and displaced meshes (even for replicated)
1715 _displaced_problem->undisplaceMesh();
1716
1717 mesh_refinement.uniformly_coarsen();
1718 if (_displaced_mesh)
1719 displaced_mesh_refinement->uniformly_coarsen();
1720
1721 // Mark this as an intermediate change because we do not yet want to reinit_systems. E.g. we
1722 // need things to happen in the following order for the undisplaced problem:
1723 // u1) EquationSystems::reinit_solutions. This will restrict the solution vectors and then
1724 // contract the mesh
1725 // u2) MooseMesh::meshChanged. This will update the node/side lists and other
1726 // things which needs to happen after the contraction
1727 // u3) GeometricSearchData::reinit. Once the node/side lists are updated we can perform our
1728 // geometric searches which will aid in determining sparsity patterns
1729 //
1730 // We do these things for the displaced problem (if it exists)
1731 // d1) EquationSystems::reinit. Restrict the displaced problem vector copies and then contract
1732 // the mesh. It's safe to do a full reinit with the displaced because there are no
1733 // matrices that sparsity pattern calculations will be conducted for
1734 // d2) MooseMesh::meshChanged. This will update the node/side lists and other
1735 // things which needs to happen after the contraction
1736 // d3) UpdateDisplacedMeshThread::operator(). Re-displace the mesh using the *displaced*
1737 // solution vector copy because we don't know the state of the reference solution vector.
1738 // It's safe to use the displaced copy because we are outside of a non-linear solve,
1739 // and there is no concern about differences between solution and current_local_solution
1740 // d4) GeometricSearchData::reinit. With the node/side lists updated and the mesh
1741 // re-displaced, we can perform our geometric searches, which will aid in determining the
1742 // sparsity pattern of the matrix held by the libMesh::ImplicitSystem held by the
1743 // NonlinearSystem held by this
1745 /*intermediate_change=*/true, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
1746 }
1747
1748 // u4) Now that all the geometric searches have been done (both undisplaced and displaced),
1749 // we're ready to update the sparsity pattern
1750 es().reinit_systems();
1751 }
1752
1754 if (_line_search)
1755 _line_search->timestepSetup();
1756
1757 // Random interface objects
1758 for (const auto & it : _random_data_objects)
1759 it.second->updateSeeds(EXEC_TIMESTEP_BEGIN);
1760
1761 unsigned int n_threads = numThreads();
1762 for (THREAD_ID tid = 0; tid < n_threads; tid++)
1763 {
1766 }
1767
1768#ifdef MOOSE_KOKKOS_ENABLED
1770#endif
1771
1772 _aux->timestepSetup();
1773 for (auto & sys : _solver_systems)
1774 sys->timestepSetup();
1775
1777 // timestepSetup for displaced systems
1778 _displaced_problem->timestepSetup();
1779
1780 for (THREAD_ID tid = 0; tid < n_threads; tid++)
1781 {
1785 }
1786
1787 std::vector<UserObject *> userobjs;
1788 theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(userobjs);
1789 for (auto obj : userobjs)
1790 obj->timestepSetup();
1791
1792#ifdef MOOSE_KOKKOS_ENABLED
1793 {
1794 std::vector<UserObjectBase *> userobjs;
1795 theWarehouse().query().condition<AttribSystem>("KokkosUserObject").queryIntoUnsorted(userobjs);
1796 for (auto obj : userobjs)
1797 obj->timestepSetup();
1798 }
1799#endif
1800
1801 // Timestep setup of output objects
1803
1807}
virtual void timestepSetup(THREAD_ID tid=0) const override
virtual void timestepSetup(THREAD_ID tid=0) const
void timestepSetup()
Calls the timestepSetup function for each of the output objects.
virtual void timestepSetup()

Referenced by Eigenvalue::execute(), SteadyBase::execute(), MFEMSteady::execute(), NonlinearEigen::takeStep(), TransientBase::takeStep(), and MFEMTransient::takeStep().

◆ transient()

virtual void FEProblemBase::transient ( bool  trans)
inlinevirtual

Definition at line 591 of file FEProblemBase.h.

591{ _transient = trans; }

Referenced by EigenExecutionerBase::EigenExecutionerBase(), and TransientBase::TransientBase().

◆ trustUserCouplingMatrix()

void FEProblemBase::trustUserCouplingMatrix ( )

Whether to trust the user coupling matrix even if we want to do things like be paranoid and create a full coupling matrix.

See https://github.com/idaholab/moose/issues/16395 for detailed background

Definition at line 6959 of file FEProblemBase.C.

6960{
6962 mooseError("Someone told us (the FEProblemBase) to trust the user coupling matrix, but we "
6963 "haven't been provided a coupling matrix!");
6964
6966}

Referenced by SingleMatrixPreconditioner::SingleMatrixPreconditioner().

◆ type()

const std::string & MooseBase::type ( ) const
inlineinherited

Get the type of this class.

Returns
the name of the type of this class

Definition at line 93 of file MooseBase.h.

94 {
95 mooseAssert(_type.size(), "Empty type");
96 return _type;
97 }

Referenced by CreateProblemDefaultAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), SetupDebugAction::act(), addAuxArrayVariable(), addAuxScalarVariable(), addConvergence(), addDistribution(), DistributedRectilinearMeshGenerator::addElement(), DistributedRectilinearMeshGenerator::addElement(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), MFEMProblem::addFESpace(), MFEMProblem::addFESpaceHierarchy(), addFunction(), MFEMProblem::addFunction(), addMeshDivision(), MooseApp::addMeshGenerator(), MeshGenerator::addMeshSubgenerator(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMProblemComposer(), MFEMProblem::addObject(), addObject(), DistributedRectilinearMeshGenerator::addPoint(), MFEMProblem::addPostprocessor(), addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), addReporter(), addSampler(), WebServerControl::addServerActionsInternal(), addTimeIntegrator(), MFEMProblem::addVectorPostprocessor(), SubProblem::addVectorTag(), DisplacedProblem::addVectorTag(), advanceMultiApps(), MooseApp::appendMeshGenerator(), AuxKernelBase::AuxKernelBase(), backupMultiApps(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BoundaryPreservedMarker::BoundaryPreservedMarker(), DistributedRectilinearMeshGenerator::buildCube(), MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildLowerDMesh(), MooseMesh::buildPRefinementAndCoarseningMaps(), PhysicsBase::checkComponentType(), MeshGenerator::checkGetMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), checkUserObjectNameCollision(), MFEMMultiAppTransfer::checkValidTransferProblemTypes(), MeshInfo::CombinedInfos< ElemInfoMap, ElemInfoItems >::CombinedInfos(), ElemElemConstraint::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighJacobian(), DGKernel::computeElemNeighJacobian(), ADDGKernel::computeElemNeighJacobian(), ElemElemConstraint::computeElemNeighResidual(), ArrayDGKernel::computeElemNeighResidual(), DGKernel::computeElemNeighResidual(), ADDGKernel::computeElemNeighResidual(), ArrayDGLowerDKernel::computeLowerDJacobian(), DGLowerDKernel::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDJacobian(), LowerDIntegratedBC::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayHFEMDirichletBC::computeLowerDQpJacobian(), HFEMDirichletBC::computeLowerDQpJacobian(), ArrayHFEMDiffusion::computeLowerDQpJacobian(), HFEMDiffusion::computeLowerDQpJacobian(), ArrayLowerDIntegratedBC::computeLowerDQpOffDiagJacobian(), ArrayDGLowerDKernel::computeLowerDQpOffDiagJacobian(), ArrayHFEMDirichletBC::computeLowerDQpOffDiagJacobian(), HFEMDirichletBC::computeLowerDQpOffDiagJacobian(), computeMultiAppsDT(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), DGKernel::computeOffDiagElemNeighJacobian(), ADDGKernel::computeOffDiagElemNeighJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ScalarKernel::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGConvection::computeQpJacobian(), ArrayDGDiffusion::computeQpJacobian(), DGDiffusion::computeQpJacobian(), InterfaceDiffusion::computeQpJacobian(), InterfaceReaction::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), ArrayDGKernel::computeQpOffDiagJacobian(), HFEMTestJump::computeQpOffDiagJacobian(), HFEMTrialJump::computeQpOffDiagJacobian(), ScalarKernel::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), DGConvection::computeQpResidual(), ADDGAdvection::computeQpResidual(), ADDGDiffusion::computeQpResidual(), DGDiffusion::computeQpResidual(), HFEMDiffusion::computeQpResidual(), HFEMTestJump::computeQpResidual(), HFEMTrialJump::computeQpResidual(), ADMatInterfaceReaction::computeQpResidual(), InterfaceDiffusion::computeQpResidual(), InterfaceReaction::computeQpResidual(), ArrayDGDiffusion::computeQpResidual(), ArrayHFEMDiffusion::computeQpResidual(), computeSystems(), computeUserObjectByName(), computeUserObjects(), computeUserObjectsInternal(), createQRules(), DisplacedProblem::createQRules(), MooseApp::createRecoverablePerfGraph(), MoveBoundaryNodesToCurveGenerator::curveGenerator(), MeshGenerator::declareMeshProperty(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), duplicateVariableCheck(), execMultiAppTransfers(), SteadyBase::execute(), WebServerControl::execute(), ActionWarehouse::executeActionsWithAction(), finishMultiAppStep(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), SubdomainPerElementGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), MultiAppTransfer::getAppInfo(), TransfiniteMeshGenerator::getEdge(), ElementGenerator::getElemType(), getMaterial(), getMaterialData(), getMaterialPropertyStorageConsumers(), MaterialOutputAction::getParams(), ReporterData::getReporterInfo(), MooseServer::getSyntaxMetadata(), getTransfers(), getUOQuery(), SubProblem::getVectorTags(), DisplacedProblem::getVectorTags(), EqualValueBoundaryConstraint::ghostPrimary(), CommonOutputAction::hasConsole(), hasMultiApps(), AdvancedOutput::hasOutput(), incrementMultiAppTStep(), NEML2Action::inferMOOSEIOType(), AdvancedOutput::initAvailableLists(), FunctorPositions::initialize(), FunctorTimes::initialize(), LinearFVAdvection::initialSetup(), LinearFVAnisotropicDiffusion::initialSetup(), LinearFVDiffusion::initialSetup(), MultiAppConservativeTransfer::initialSetup(), ArrayDGDiffusion::initQpResidual(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), logAdd(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MooseApp::MooseApp(), MooseObject::MooseObject(), SubProblem::numVectorTags(), DisplacedProblem::numVectorTags(), AdvancedOutput::output(), Console::output(), ConsoleUtils::outputExecutionInformation(), Output::outputStep(), SampledOutput::outputStep(), outputStep(), MooseServer::parseDocumentForDiagnostics(), PointInUnionCheckUO::PointInUnionCheckUO(), MooseMesh::prepare(), MFEMFunctorMaterial::processLiterals(), ProjectedStatefulMaterialStorageAction::processProperty(), MooseApp::recursivelyCreateExecutors(), SolutionInvalidInterface::registerInvalidSolutionInternal(), restoreMultiApps(), MeshRepairGenerator::separateSubdomainsByElementType(), setCoupling(), MooseApp::setupOptions(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), Reporter::store(), MooseBase::typeAndName(), AuxScalarKernel::uOld(), ScalarKernelBase::uOld(), DisplacedProblem::updateGeomSearch(), updateGeomSearch(), UserObjectInterface::userObjectType(), and AdvancedOutput::wantOutput().

◆ typeAndName()

std::string MooseBase::typeAndName ( ) const
inherited

Get the class's combined type and name; useful in error handling.

Returns
The type and name of this class in the form '<type()> "<name()>"'.

Definition at line 57 of file MooseBase.C.

58{
59 return type() + std::string(" \"") + name() + std::string("\"");
60}

Referenced by MaterialPropertyStorage::addProperty(), checkUserObjectNameCollision(), MeshGeneratorSystem::dataDrivenError(), ReporterContext< T >::finalize(), ReporterData::getReporterInfo(), MFEMSamplerBase::initialSetup(), MFEMVariableSamplerBase::initialSetup(), WebServerControl::outputMessage(), and Action::timedAct().

◆ uDotDotOldRequested()

virtual bool FEProblemBase::uDotDotOldRequested ( )
inlinevirtual

Get boolean flag to check whether old solution second time derivative needs to be stored.

Definition at line 2738 of file FEProblemBase.h.

2739 {
2741 mooseError("FEProblemBase: When requesting old second time derivative of solution, current "
2742 "second time derivation of solution should also be stored. Please set "
2743 "`u_dotdot_requested` to true using setUDotDotRequested.");
2745 }

Referenced by SystemBase::addDotVectors().

◆ uDotDotRequested()

virtual bool FEProblemBase::uDotDotRequested ( )
inlinevirtual

Get boolean flag to check whether solution second time derivative needs to be stored.

Definition at line 2724 of file FEProblemBase.h.

2724{ return _u_dotdot_requested; }

Referenced by SystemBase::addDotVectors(), and addTimeIntegrator().

◆ uDotOldRequested()

virtual bool FEProblemBase::uDotOldRequested ( )
inlinevirtual

Get boolean flag to check whether old solution time derivative needs to be stored.

Definition at line 2727 of file FEProblemBase.h.

2728 {
2730 mooseError("FEProblemBase: When requesting old time derivative of solution, current time "
2731 "derivative of solution should also be stored. Please set `u_dot_requested` to "
2732 "true using setUDotRequested.");
2733
2734 return _u_dot_old_requested;
2735 }

Referenced by SystemBase::addDotVectors().

◆ uDotRequested()

virtual bool FEProblemBase::uDotRequested ( )
inlinevirtual

Get boolean flag to check whether solution time derivative needs to be stored.

Definition at line 2721 of file FEProblemBase.h.

2721{ return _u_dot_requested; }

Referenced by SystemBase::addDotVectors().

◆ uniformRefine()

void FEProblemBase::uniformRefine ( )

uniformly refine the problem mesh(es).

This will also prolong the the solution, and in order for that to be safe, we can only perform one refinement at a time

Definition at line 10041 of file FEProblemBase.C.

10042{
10043 // ResetDisplacedMeshThread::onNode looks up the reference mesh by ID, so we need to make sure
10044 // we undisplace before adapting the reference mesh
10046 _displaced_problem->undisplaceMesh();
10047
10051
10053 /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
10054}
static void uniformRefine(MooseMesh *mesh, unsigned int level=libMesh::invalid_uint)
Performs uniform refinement of the passed Mesh object.
Definition Adaptivity.C:301

Referenced by FEProblemSolve::solve().

◆ uniqueName()

MooseObjectName MooseBase::uniqueName ( ) const
inherited
Returns
The unique name for accessing input parameters of this object in the InputParameterWarehouse

Definition at line 69 of file MooseBase.C.

70{
71 if (!_pars.have_parameter<std::string>(unique_name_param))
72 mooseError("uniqueName(): Object does not have a unique name");
73 return MooseObjectName(_pars.get<std::string>(unique_name_param));
74}
static const std::string unique_name_param
The name of the parameter that contains the unique object name.
Definition MooseBase.h:57

Referenced by MooseBase::connectControllableParams(), and Action::uniqueActionName().

◆ uniqueParameterName()

MooseObjectParameterName MooseBase::uniqueParameterName ( const std::string &  parameter_name) const
inherited
Returns
The unique parameter name of a valid parameter of this object for accessing parameter controls

Definition at line 63 of file MooseBase.C.

64{
65 return MooseObjectParameterName(getBase(), name(), parameter_name);
66}
const std::string & getBase() const
Definition MooseBase.h:147

◆ updateActiveObjects()

void FEProblemBase::updateActiveObjects ( )
virtual

Update the active objects in the warehouses.

Reimplemented in DumpObjectsProblem.

Definition at line 5745 of file FEProblemBase.C.

5746{
5747 TIME_SECTION("updateActiveObjects", 5, "Updating Active Objects");
5748
5749 for (THREAD_ID tid = 0; tid < numThreads(); ++tid)
5750 {
5751 for (auto & nl : _nl)
5752 nl->updateActive(tid);
5753 _aux->updateActive(tid);
5760 }
5761
5769
5770#ifdef MOOSE_KOKKOS_ENABLED
5772#endif
5773}
void updateActive(THREAD_ID tid=0) override
Updates the active objects storage.
virtual void updateActive(THREAD_ID tid=0) override
Update the active status of Kernels.
virtual void updateActive(THREAD_ID tid=0) override
Update the active status of Kernels.

Referenced by MooseEigenSystem::eigenKernelOnCurrent(), MooseEigenSystem::eigenKernelOnOld(), and FixedPointSolve::solveStep().

◆ updateGeomSearch()

void FEProblemBase::updateGeomSearch ( GeometricSearchData::GeometricSearchType  type = GeometricSearchData::ALL)
overridevirtual

Update this object's geometric search data as well as the displaced problem's if it exists.

Implements SubProblem.

Definition at line 8731 of file FEProblemBase.C.

8732{
8733 TIME_SECTION("updateGeometricSearch", 3, "Updating Geometric Search");
8734
8736
8738 _displaced_problem->updateGeomSearch(type);
8739}
void update(GeometricSearchType type=ALL)
Update all of the search objects.

Referenced by NonlinearSystemBase::augmentSparsity().

◆ updateMaxQps()

void FEProblemBase::updateMaxQps ( )
private

Definition at line 6827 of file FEProblemBase.C.

6828{
6829 // Find the maximum number of quadrature points
6830 {
6831 MaxQpsThread mqt(*this);
6833 _max_qps = mqt.max();
6834
6835 // If we have more shape functions or more quadrature points on
6836 // another processor, then we may need to handle those elements
6837 // ourselves later after repartitioning.
6839 }
6840
6841 unsigned int max_qpts = getMaxQps();
6842 if (max_qpts > Moose::constMaxQpsPerElem)
6843 mooseError("Max quadrature points per element assumptions made in some code (e.g. Coupleable ",
6844 "and MaterialPropertyInterface classes) have been violated.\n",
6845 "Complain to Moose developers to have constMaxQpsPerElem increased from ",
6847 " to ",
6848 max_qpts);
6849 for (unsigned int tid = 0; tid < numThreads(); ++tid)
6850 {
6851 // the highest available order in libMesh is 43
6852 _scalar_zero[tid].resize(libMesh::FORTYTHIRD, 0);
6853 _zero[tid].resize(max_qpts, 0);
6854 _ad_zero[tid].resize(max_qpts, 0);
6855 _grad_zero[tid].resize(max_qpts, RealGradient(0.));
6856 _ad_grad_zero[tid].resize(max_qpts, ADRealGradient(0));
6857 _second_zero[tid].resize(max_qpts, RealTensor(0.));
6858 _ad_second_zero[tid].resize(max_qpts, ADRealTensorValue(0));
6859 _vector_zero[tid].resize(max_qpts, RealGradient(0.));
6860 _vector_curl_zero[tid].resize(max_qpts, RealGradient(0.));
6861 }
6862}
libMesh::TensorValue< ADReal > ADRealTensorValue
Definition MooseTypes.h:414
ADRealVectorValue ADRealGradient
Definition MooseTypes.h:412
This class determines the maximum number of Quadrature Points and Shape Functions used for a given si...
constexpr std::size_t constMaxQpsPerElem
This is used for places where we initialize some qp-sized data structures that would end up being siz...
Definition MooseTypes.h:258

Referenced by bumpAllQRuleOrder(), bumpVolumeQRuleOrder(), and createQRules().

◆ updateMeshXFEM()

bool FEProblemBase::updateMeshXFEM ( )
virtual

Update the mesh due to changing XFEM cuts.

Definition at line 9013 of file FEProblemBase.C.

9014{
9015 TIME_SECTION("updateMeshXFEM", 5, "Updating XFEM");
9016
9017 bool updated = false;
9018 if (haveXFEM())
9019 {
9020 if (_xfem->updateHeal())
9021 // XFEM exodiff tests rely on a given numbering because they cannot use map = true due to
9022 // having coincident elements. While conceptually speaking we do not need to contract the
9023 // mesh, we need its call to renumber_nodes_and_elements in order to preserve these tests
9025 /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/false);
9026
9027 updated = _xfem->update(_time, _nl, *_aux);
9028 if (updated)
9029 {
9031 /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/false);
9032 _xfem->initSolution(_nl, *_aux);
9034 _console << "\nXFEM update complete: Mesh modified" << std::endl;
9035 }
9036 else
9037 _console << "\nXFEM update complete: Mesh not modified" << std::endl;
9038 }
9039 return updated;
9040}
virtual void restoreSolutions()

Referenced by FixedPointSolve::solveStep().

◆ updateMortarMesh()

void FEProblemBase::updateMortarMesh ( )
virtual

Definition at line 8742 of file FEProblemBase.C.

8743{
8744 TIME_SECTION("updateMortarMesh", 5, "Updating Mortar Mesh");
8745
8747
8748 // If any mortar interface's coverage changed, the DoF ghosting and sparsity that
8749 // AugmentSparsityOnInterface computed from the previous coverage are stale (see
8750 // reinitBecauseOfGhostingOrNewGeomObjects()'s mortar_changed parameter); refresh them now rather
8751 // than leaving that to the caller, since this may be called mid-solve where no other reinit
8752 // follows. Guard on _initialized: this is also called from init() itself, before es().init() has
8753 // run for the first time, and reinit()ing an EquationSystems that has never been init()ed is not
8754 // meaningful (init() immediately after will pick up whatever _mortar_data->update() just built).
8755 if (_mortar_data->update() && _initialized && !currentlyComputingResidual() &&
8757 reinitBecauseOfGhostingOrNewGeomObjects(/*mortar_changed=*/true);
8758}
const bool & currentlyComputingResidual() const
Returns true if the problem is in the process of computing the residual.
Definition SubProblem.h:731

Referenced by computeJacobianTags(), computeResidualAndJacobian(), computeResidualTags(), and init().

◆ updateSolution()

bool FEProblemBase::updateSolution ( NumericVector< libMesh::Number > &  vec_solution,
NumericVector< libMesh::Number > &  ghosted_solution 
)
virtual

Update the solution.

Parameters
vec_solutionLocal solution vector that gets modified by this method
ghosted_solutionGhosted solution vector
Returns
true if the solution was modified, false otherwise

Definition at line 8710 of file FEProblemBase.C.

8712{
8713 return false;
8714}

Referenced by computePostCheck().

◆ useHashTableMatrixAssembly()

bool FEProblemBase::useHashTableMatrixAssembly ( ) const
inline

Definition at line 3072 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::addConstraint().

◆ useSNESMFReuseBase()

bool FEProblemBase::useSNESMFReuseBase ( )
inline

Return a flag that indicates if we are reusing the vector base.

Definition at line 2675 of file FEProblemBase.h.

2675{ return _snesmf_reuse_base; }

Referenced by NonlinearSystem::potentiallySetupFiniteDifferencing().

◆ validParams()

InputParameters FEProblemBase::validParams ( )
static

Definition at line 163 of file FEProblemBase.C.

164{
166 params.addParam<unsigned int>("null_space_dimension", 0, "The dimension of the nullspace");
167 params.addParam<unsigned int>(
168 "transpose_null_space_dimension", 0, "The dimension of the transpose nullspace");
169 params.addParam<unsigned int>(
170 "near_null_space_dimension", 0, "The dimension of the near nullspace");
171 params.addParam<bool>("solve",
172 true,
173 "Whether or not to actually solve the Nonlinear system. "
174 "This is handy in the case that all you want to do is "
175 "execute AuxKernels, Transfers, etc. without actually "
176 "solving anything");
177 params.addParam<bool>("use_nonlinear",
178 true,
179 "Determines whether to use a Nonlinear vs a "
180 "Eigenvalue system (Automatically determined based "
181 "on executioner)");
182 params.addParam<bool>("error_on_jacobian_nonzero_reallocation",
183 "This causes PETSc to error if it had to reallocate memory in the Jacobian "
184 "matrix due to not having enough nonzeros");
185 params.addParam<bool>("ignore_zeros_in_jacobian",
186 false,
187 "Do not explicitly store zero values in "
188 "the Jacobian matrix if true");
189 params.addParam<bool>("force_restart",
190 false,
191 "EXPERIMENTAL: If true, a sub_app may use a "
192 "restart file instead of using of using the master "
193 "backup file");
194 params.addDeprecatedParam<bool>("skip_additional_restart_data",
195 false,
196 "True to skip additional data in equation system for restart.",
197 "This parameter is no longer used, as we do not load additional "
198 "vectors by default with restart");
199 params.addParam<bool>("skip_nl_system_check",
200 false,
201 "True to skip the NonlinearSystem check for work to do (e.g. Make sure "
202 "that there are variables to solve for).");
203 params.addParam<bool>("allow_initial_conditions_with_restart",
204 false,
205 "True to allow the user to specify initial conditions when restarting. "
206 "Initial conditions can override any restarted field");
207
208 auto coverage_check_description = [](std::string scope, std::string list_param_name)
209 {
210 return "Controls, if and how a " + scope +
211 " subdomain coverage check is performed. "
212 "With 'TRUE' or 'ON' all subdomains are checked (the default). Setting 'FALSE' or 'OFF' "
213 "will disable the check for all subdomains. "
214 "To exclude a predefined set of subdomains 'SKIP_LIST' is to "
215 "be used, while the subdomains to skip are to be defined in the parameter '" +
216 list_param_name +
217 "'. To limit the check to a list of subdomains, 'ONLY_LIST' is to "
218 "be used (again, using the parameter '" +
219 list_param_name + "').";
220 };
221
222 params.addParam<std::vector<SubdomainName>>(
223 "block",
224 {"ANY_BLOCK_ID"},
225 "List of subdomains for kernel coverage and material coverage checks. Setting this parameter "
226 "is equivalent to setting 'kernel_coverage_block_list' and 'material_coverage_block_list' as "
227 "well as using 'ONLY_LIST' as the coverage check mode.");
228
229 MooseEnum kernel_coverage_check_modes("FALSE TRUE OFF ON SKIP_LIST ONLY_LIST", "TRUE");
230 params.addParam<MooseEnum>("kernel_coverage_check",
231 kernel_coverage_check_modes,
232 coverage_check_description("kernel", "kernel_coverage_block_list"));
233 params.addParam<std::vector<SubdomainName>>(
234 "kernel_coverage_block_list",
235 {},
236 "List of subdomains for kernel coverage check. The meaning of this list is controlled by the "
237 "parameter 'kernel_coverage_check' (whether this is the list of subdomains to be checked, "
238 "not to be checked or not taken into account).");
239 params.addParam<bool>(
240 "boundary_restricted_node_integrity_check",
241 true,
242 "Set to false to disable checking of boundary restricted nodal object variable dependencies, "
243 "e.g. are the variable dependencies defined on the selected boundaries?");
244 params.addParam<bool>("boundary_restricted_elem_integrity_check",
245 true,
246 "Set to false to disable checking of boundary restricted elemental object "
247 "variable dependencies, e.g. are the variable dependencies defined on the "
248 "selected boundaries?");
249 params.addParam<bool>(
250 "side_uo_interface_mat_prop_integrity_check",
251 true,
252 "Set to false to disable checking that side user objects do not consume material "
253 "properties declared by interface materials on the same boundary.");
254 MooseEnum material_coverage_check_modes("FALSE TRUE OFF ON SKIP_LIST ONLY_LIST", "TRUE");
255 params.addParam<MooseEnum>(
256 "material_coverage_check",
257 material_coverage_check_modes,
258 coverage_check_description("material", "material_coverage_block_list"));
259 params.addParam<std::vector<SubdomainName>>(
260 "material_coverage_block_list",
261 {},
262 "List of subdomains for material coverage check. The meaning of this list is controlled by "
263 "the parameter 'material_coverage_check' (whether this is the list of subdomains to be "
264 "checked, not to be checked or not taken into account).");
265
266 params.addParam<bool>("fv_bcs_integrity_check",
267 true,
268 "Set to false to disable checking of overlapping Dirichlet and Flux BCs "
269 "and/or multiple DirichletBCs per sideset");
270
271 params.addParam<bool>(
272 "fv_face_integrity_check",
273 true,
274 "Set to false to disable checking that FV flux boundary conditions and FV interface "
275 "kernels are applied to faces with valid variable ownership and interface topology.");
276
277 params.addParam<bool>(
278 "material_dependency_check", true, "Set to false to disable material dependency check");
279 params.addParam<bool>("parallel_barrier_messaging",
280 false,
281 "Displays messaging from parallel "
282 "barrier notifications when executing "
283 "or transferring to/from Multiapps "
284 "(default: false)");
285 params.addParam<unsigned int>(
286 "num_concurrent_multiapps",
287 1,
288 "Set greater than 1 to solve the multiapps sharing an 'execution_order_group' "
289 "concurrently. Each such multiapp is assigned a disjoint subset of the MPI ranks "
290 "(partitioned using their 'min_procs_per_app'/'max_procs_per_app', otherwise evenly), so "
291 "they solve at the same time on different ranks. The specific value only acts as an "
292 "on/off switch; the number that run at once is set by the ranks available.");
293
294 MooseEnum verbosity("false true extra", "false");
295 params.addParam<MooseEnum>("verbose_setup",
296 verbosity,
297 "Set to 'true' to have the problem report on any object created. Set "
298 "to 'extra' to also display all parameters.");
299 params.addParam<bool>("verbose_multiapps",
300 false,
301 "Set to True to enable verbose screen printing related to MultiApps");
302 params.addParam<bool>(
303 "verbose_restore",
304 false,
305 "Set to True to enable verbose screen printing related to solution restoration");
306
307 params.addParam<FileNameNoExtension>("restart_file_base",
308 "File base name used for restart (e.g. "
309 "<path>/<filebase> or <path>/LATEST to "
310 "grab the latest file available)");
311
312 params.addParam<std::vector<std::vector<TagName>>>(
313 "extra_tag_vectors",
314 {},
315 "Extra vectors to add to the system that can be filled by objects which compute residuals "
316 "and Jacobians (Kernels, BCs, etc.) by setting tags on them. The outer index is for which "
317 "nonlinear system the extra tag vectors should be added for");
318
319 params.addParam<std::vector<std::vector<TagName>>>(
320 "not_zeroed_tag_vectors",
321 {},
322 "Extra vector tags which the sytem will not zero when other vector tags are zeroed. "
323 "The outer index is for which nonlinear system the extra tag vectors should be added for");
324
325 params.addParam<std::vector<std::vector<TagName>>>(
326 "extra_tag_matrices",
327 {},
328 "Extra matrices to add to the system that can be filled "
329 "by objects which compute residuals and Jacobians "
330 "(Kernels, BCs, etc.) by setting tags on them. The outer index is for which "
331 "nonlinear system the extra tag vectors should be added for");
332
333 params.addParam<std::vector<TagName>>(
334 "extra_tag_solutions",
335 {},
336 "Extra solution vectors to add to the system that can be used by "
337 "objects for coupling variable values stored in them.");
338
339 params.addParam<bool>("previous_nl_solution_required",
340 false,
341 "True to indicate that this calculation requires a solution vector for "
342 "storing the previous nonlinear iteration.");
343
344 params.addParam<std::vector<NonlinearSystemName>>(
345 "nl_sys_names", std::vector<NonlinearSystemName>{"nl0"}, "The nonlinear system names");
346
347 params.addParam<std::vector<LinearSystemName>>("linear_sys_names", {}, "The linear system names");
348
349 params.addParam<bool>("check_uo_aux_state",
350 false,
351 "True to turn on a check that no state presents during the evaluation of "
352 "user objects and aux kernels");
353
354 params.addPrivateParam<MooseMesh *>("mesh");
355
356 params.declareControllable("solve");
357
358 params.addParam<bool>(
359 "allow_invalid_solution",
360 false,
361 "Set to true to allow convergence even though the solution has been marked as 'invalid'");
362 params.addParam<bool>("show_invalid_solution_console",
363 true,
364 "Set to true to show the invalid solution occurrence summary in console");
365 params.addParam<bool>("immediately_print_invalid_solution",
366 false,
367 "Whether or not to report invalid solution warnings at the time the "
368 "warning is produced instead of after the calculation");
369
370 params.addParam<bool>(
371 "identify_variable_groups_in_nl",
372 true,
373 "Whether to identify variable groups in nonlinear systems. This affects dof ordering");
374
375 params.addParam<bool>(
376 "regard_general_exceptions_as_errors",
377 false,
378 "If we catch an exception during residual/Jacobian evaluaton for which we don't have "
379 "specific handling, immediately error instead of allowing the time step to be cut");
380
381 params.addParam<bool>("use_hash_table_matrix_assembly",
382 false,
383 "Whether to assemble matrices using hash tables instead of preallocating "
384 "matrix memory. This can be a good option if the sparsity pattern changes "
385 "throughout the course of the simulation.");
386 params.addParam<bool>(
387 "restore_original_nonzero_pattern",
388 "Whether we should reset matrix memory for every Jacobian evaluation. This option is useful "
389 "if the sparsity pattern is constantly changing and you are using hash table assembly or if "
390 "you wish to continually restore the matrix to the originally preallocated sparsity pattern "
391 "computed by relationship managers.");
392
394 "skip_nl_system_check kernel_coverage_check kernel_coverage_block_list "
395 "boundary_restricted_node_integrity_check "
396 "boundary_restricted_elem_integrity_check "
397 "side_uo_interface_mat_prop_integrity_check material_coverage_check "
398 "material_coverage_block_list fv_bcs_integrity_check fv_face_integrity_check "
399 "material_dependency_check check_uo_aux_state error_on_jacobian_nonzero_reallocation",
400 "Simulation checks");
401 params.addParamNamesToGroup("use_nonlinear previous_nl_solution_required nl_sys_names "
402 "ignore_zeros_in_jacobian identify_variable_groups_in_nl "
403 "use_hash_table_matrix_assembly restore_original_nonzero_pattern",
404 "Nonlinear system(s)");
406 "restart_file_base force_restart allow_initial_conditions_with_restart", "Restart");
408 "verbose_setup verbose_multiapps verbose_restore parallel_barrier_messaging", "Verbosity");
410 "null_space_dimension transpose_null_space_dimension near_null_space_dimension",
411 "Null space removal");
413 "extra_tag_vectors extra_tag_matrices extra_tag_solutions not_zeroed_tag_vectors",
414 "Contribution to tagged field data");
416 "allow_invalid_solution show_invalid_solution_console immediately_print_invalid_solution",
417 "Solution validity control");
418
419 return params;
420}
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...
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 addDeprecatedParam(const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
static InputParameters validParams()
Definition SubProblem.C:34

Referenced by DumpObjectsProblem::validParams(), EigenProblem::validParams(), ExternalProblem::validParams(), and FEProblem::validParams().

◆ vectorTagExists() [1/2]

virtual bool SubProblem::vectorTagExists ( const TagID  tag_id) const
inlinevirtualinherited

◆ vectorTagExists() [2/2]

bool SubProblem::vectorTagExists ( const TagName &  tag_name) const
virtualinherited

Check to see if a particular Tag exists by using Tag name.

Reimplemented in DisplacedProblem.

Definition at line 128 of file SubProblem.C.

129{
130 mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
131
132 const auto tag_name_upper = MooseUtils::toUpper(tag_name);
133 for (const auto & vector_tag : _vector_tags)
134 if (vector_tag._name == tag_name_upper)
135 return true;
136
137 return false;
138}

◆ vectorTagName()

TagName SubProblem::vectorTagName ( const TagID  tag) const
virtualinherited

Retrieve the name associated with a TagID.

Reimplemented in DisplacedProblem.

Definition at line 213 of file SubProblem.C.

214{
215 mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
216 if (!vectorTagExists(tag_id))
217 mooseError("Vector tag with ID ", tag_id, " does not exist");
218
219 return _vector_tags[tag_id]._name;
220}

Referenced by SystemBase::addVector(), SystemBase::closeTaggedVector(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), SystemBase::removeVector(), NonlinearSystemBase::residualGhosted(), DisplacedProblem::vectorTagName(), and SystemBase::zeroTaggedVector().

◆ vectorTagNotZeroed()

bool SubProblem::vectorTagNotZeroed ( const TagID  tag) const
inherited

Checks if a vector tag is in the list of vectors that will not be zeroed when other tagged vectors are.

Parameters
tagthe TagID of the vector that is currently being checked
Returns
false if the tag is not within the set of vectors that are intended to not be zero or if the set is empty. returns true otherwise

Definition at line 147 of file SubProblem.C.

148{
149 return _not_zeroed_tagged_vectors.count(tag);
150}

Referenced by SystemBase::zeroTaggedVector().

◆ vectorTagType()

Moose::VectorTagType SubProblem::vectorTagType ( const TagID  tag_id) const
virtualinherited

Reimplemented in DisplacedProblem.

Definition at line 223 of file SubProblem.C.

224{
225 mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
226 if (!vectorTagExists(tag_id))
227 mooseError("Vector tag with ID ", tag_id, " does not exist");
228
229 return _vector_tags[tag_id]._type;
230}

Referenced by MooseVariableScalar::reinit(), TaggingInterface::TaggingInterface(), TagVectorAux::TagVectorAux(), and DisplacedProblem::vectorTagType().

◆ verboseMultiApps()

bool FEProblemBase::verboseMultiApps ( ) const
inline

Whether or not to use verbose printing for MultiApps.

Definition at line 2322 of file FEProblemBase.h.

2322{ return _verbose_multiapps; }

Referenced by MultiApp::backup(), MultiApp::createApp(), MultiApp::restore(), FullSolveMultiApp::showStatusMessage(), and TransientMultiApp::solveStep().

◆ verifyVectorTags()

bool SubProblem::verifyVectorTags ( ) const
protectedinherited

Verify the integrity of _vector_tags and _typed_vector_tags.

Definition at line 233 of file SubProblem.C.

234{
235 for (TagID tag_id = 0; tag_id < _vector_tags.size(); ++tag_id)
236 {
237 const auto & vector_tag = _vector_tags[tag_id];
238
239 if (vector_tag._id != tag_id)
240 mooseError("Vector tag ", vector_tag._id, " id mismatch in _vector_tags");
241 if (vector_tag._type == Moose::VECTOR_TAG_ANY)
242 mooseError("Vector tag '", vector_tag._name, "' has type VECTOR_TAG_ANY");
243
244 const auto search = _vector_tags_name_map.find(vector_tag._name);
245 if (search == _vector_tags_name_map.end())
246 mooseError("Vector tag ", vector_tag._id, " is not in _vector_tags_name_map");
247 else if (search->second != tag_id)
248 mooseError("Vector tag ", vector_tag._id, " has incorrect id in _vector_tags_name_map");
249
250 unsigned int found_in_type = 0;
251 for (TagTypeID tag_type_id = 0; tag_type_id < _typed_vector_tags[vector_tag._type].size();
252 ++tag_type_id)
253 {
254 const auto & vector_tag_type = _typed_vector_tags[vector_tag._type][tag_type_id];
255 if (vector_tag_type == vector_tag)
256 {
257 ++found_in_type;
258 if (vector_tag_type._type_id != tag_type_id)
259 mooseError("Type ID for Vector tag ", tag_id, " is incorrect");
260 }
261 }
262
263 if (found_in_type == 0)
264 mooseError("Vector tag ", tag_id, " not found in _typed_vector_tags");
265 if (found_in_type > 1)
266 mooseError("Vector tag ", tag_id, " found multiple times in _typed_vector_tags");
267 }
268
269 unsigned int num_typed_vector_tags = 0;
270 for (const auto & typed_vector_tags : _typed_vector_tags)
271 num_typed_vector_tags += typed_vector_tags.size();
272 if (num_typed_vector_tags != _vector_tags.size())
273 mooseError("Size mismatch between _vector_tags and _typed_vector_tags");
274 if (_vector_tags_name_map.size() != _vector_tags.size())
275 mooseError("Size mismatch between _vector_tags and _vector_tags_name_map");
276
277 return true;
278}

Referenced by SubProblem::addVectorTag(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), SubProblem::getVectorTags(), SubProblem::getVectorTags(), SubProblem::numVectorTags(), SubProblem::vectorTagExists(), SubProblem::vectorTagName(), and SubProblem::vectorTagType().

Friends And Related Symbol Documentation

◆ AuxiliarySystem

friend class AuxiliarySystem
friend

Definition at line 3702 of file FEProblemBase.h.

◆ DisplacedProblem

friend class DisplacedProblem
friend

Definition at line 3707 of file FEProblemBase.h.

◆ Moose::PetscSupport::setSinglePetscOption

void Moose::PetscSupport::setSinglePetscOption ( const std::string &  name,
const std::string &  value,
FEProblemBase *const  problem 
)
friend

◆ MooseEigenSystem

friend class MooseEigenSystem
friend

Definition at line 3704 of file FEProblemBase.h.

◆ NonlinearSystemBase

friend class NonlinearSystemBase
friend

Definition at line 3703 of file FEProblemBase.h.

◆ Restartable

friend class Restartable
friend

Definition at line 3706 of file FEProblemBase.h.

◆ Resurrector

friend class Resurrector
friend

Definition at line 3705 of file FEProblemBase.h.

Member Data Documentation

◆ _action_factory

ActionFactory& ParallelParamObject::_action_factory
protectedinherited

◆ _active_elemental_moose_variables

std::vector<std::set<MooseVariableFieldBase *> > SubProblem::_active_elemental_moose_variables
protectedinherited

This is the set of MooseVariableFieldBase that will actually get reinited by a call to reinit(elem)

Definition at line 1076 of file SubProblem.h.

Referenced by SubProblem::clearActiveElementalMooseVariables(), SubProblem::getActiveElementalMooseVariables(), SubProblem::setActiveElementalMooseVariables(), and SubProblem::SubProblem().

◆ _active_fe_var_coupleable_matrix_tags

std::vector<std::set<TagID> > SubProblem::_active_fe_var_coupleable_matrix_tags
protectedinherited

◆ _active_fe_var_coupleable_vector_tags

std::vector<std::set<TagID> > SubProblem::_active_fe_var_coupleable_vector_tags
protectedinherited

◆ _active_sc_var_coupleable_matrix_tags

std::vector<std::set<TagID> > SubProblem::_active_sc_var_coupleable_matrix_tags
protectedinherited

◆ _active_sc_var_coupleable_vector_tags

std::vector<std::set<TagID> > SubProblem::_active_sc_var_coupleable_vector_tags
protectedinherited

◆ _ad_grad_zero

std::vector<MooseArray<ADRealVectorValue> > FEProblemBase::_ad_grad_zero

Definition at line 2607 of file FEProblemBase.h.

Referenced by FEProblemBase(), updateMaxQps(), and ~FEProblemBase().

◆ _ad_second_zero

std::vector<MooseArray<ADRealTensorValue> > FEProblemBase::_ad_second_zero

Definition at line 2610 of file FEProblemBase.h.

Referenced by FEProblemBase(), updateMaxQps(), and ~FEProblemBase().

◆ _ad_zero

std::vector<MooseArray<ADReal> > FEProblemBase::_ad_zero

Definition at line 2605 of file FEProblemBase.h.

Referenced by FEProblemBase(), updateMaxQps(), and ~FEProblemBase().

◆ _adaptivity

Adaptivity FEProblemBase::_adaptivity
protected

◆ _all_materials

MaterialWarehouse FEProblemBase::_all_materials
protected

◆ _allow_ics_during_restart

const bool FEProblemBase::_allow_ics_during_restart
private

Definition at line 3677 of file FEProblemBase.h.

Referenced by checkICRestartError().

◆ _allow_invalid_solution

const bool FEProblemBase::_allow_invalid_solution
private

Definition at line 3680 of file FEProblemBase.h.

Referenced by allowInvalidSolution().

◆ _app

MooseApp& MooseBase::_app
protectedinherited

The MOOSE application this is associated with.

Definition at line 375 of file MooseBase.h.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), acceptInvalidSolution(), addAnyRedistributers(), MeshGenerator::addChildMeshGenerator(), addMaterialHelper(), MeshGenerator::addMeshSubgenerator(), MeshGenerator::addMeshSubgenerator(), addOutput(), MeshGenerator::addParentMeshGenerator(), allowOutput(), AStableDirk4::AStableDirk4(), FileMesh::buildMesh(), MooseMesh::buildTypedMesh(), MooseMesh::cacheFaceInfoVariableOwnership(), MooseMesh::cacheFVElementalDoFs(), DefaultNonlinearConvergence::checkConvergence(), MeshGenerator::checkGetMesh(), checkICRestartError(), checkProblemIntegrity(), LibmeshPartitioner::clone(), BlockWeightedPartitioner::clone(), CopyMeshPartitioner::clone(), GridPartitioner::clone(), HierarchicalGridPartitioner::clone(), PetscExternalPartitioner::clone(), RandomPartitioner::clone(), SingleRankPartitioner::clone(), ElementPointNeighborLayers::clone(), ElementSideNeighborLayers::clone(), GhostAllPointNeighbors::clone(), GhostBoundary::clone(), GhostEverything::clone(), GhostHigherDLowerDPointNeighbors::clone(), GhostLowerDElems::clone(), GhostPrimaryFace::clone(), ProxyRelationshipManager::clone(), RedistributeProperties::clone(), SampledOutput::cloneMesh(), computeJacobianSys(), computeJacobianTags(), computeLinearSystemTags(), computeResidualAndJacobian(), computeResidualSys(), computeResidualTags(), Console::Console(), TimeStepper::constrainStep(), Control::Control(), CopyMeshPartitioner::CopyMeshPartitioner(), MultiApp::createApp(), MultiApp::createApps(), MoveBoundaryNodesToCurveGenerator::curveGenerator(), customSetup(), MeshGenerator::declareMeshProperty(), MeshGenerator::declareNullMeshName(), MooseMesh::determineUseDistributedMesh(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::DumpObjectsProblem(), DumpObjectsProblem::dumpVariableHelper(), EigenExecutionerBase::EigenExecutionerBase(), EigenKernel::EigenKernel(), PIDTransientControl::execute(), Eigenvalue::execute(), InversePowerMethod::execute(), NonlinearEigen::execute(), SteadyBase::execute(), TransientBase::execute(), MFEMSteady::execute(), PseudoTimestep::execute(), IterationInfo::execute(), EigenProblem::execute(), Executioner::Executioner(), Executioner::Executioner(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), FEProblemBase(), FileOutput::FileOutput(), NEML2Assembly::finalize(), ChangeOverFixedPointPostprocessor::finalize(), RadialAverage::finalize(), FixedPointSolve::FixedPointSolve(), forceOutput(), FullSolveMultiApp::FullSolveMultiApp(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVAdvection::FVAdvection(), FileMeshGenerator::generate(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), MeshGenerator::getCSGBaseByName(), getExecutor(), MeshGenerator::getMeshByName(), NumFixedPointIterations::getValue(), NumRelationshipManagers::getValue(), GhostingUserObject::GhostingUserObject(), MooseMesh::init(), Eigenvalue::init(), InversePowerMethod::init(), NonlinearEigen::init(), TransientBase::init(), MFEMMesh::init(), init(), CompositionDT::init(), SubProblem::initialSetup(), PIDTransientControl::initialSetup(), RealFunctionControl::initialSetup(), TimePeriod::initialSetup(), EigenProblemSolve::initialSetup(), FEProblemSolve::initialSetup(), Console::initialSetup(), initialSetup(), BoundaryMeshBuilder::initialSetup(), AdvancedOutput::initOutputList(), initPetscOutputAndSomeSolverSettings(), EigenProblem::initPetscOutputAndSomeSolverSettings(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), meshChanged(), MeshGenerator::MeshGenerator(), MFEMProblemSolve::MFEMProblemSolve(), MooseMesh::MooseMesh(), MooseMesh::MooseMesh(), MooseObject::MooseObject(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), EigenExecutionerBase::normalizeSolution(), NumFailedTimeSteps::NumFailedTimeSteps(), Checkpoint::output(), Exodus::output(), Nemesis::output(), PerfGraphOutput::output(), Tecplot::output(), MortarNodalGeometryOutput::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Exodus::outputEmptyTimestep(), Console::outputInput(), Exodus::outputInput(), Exodus::outputNodalVariables(), JSONOutput::outputReporters(), Output::outputStep(), SampledOutput::outputStep(), outputStep(), Console::outputSystemInformation(), JSONOutput::outputSystemInformation(), OverlayMeshGenerator::OverlayMeshGenerator(), MultiApp::parentOutputPositionChanged(), TransientBase::preExecute(), projectSolution(), AnnularMesh::safeClone(), ConcentricCircleMesh::safeClone(), FileMesh::safeClone(), GeneratedMesh::safeClone(), ImageMesh::safeClone(), MeshGeneratorMesh::safeClone(), PatternedMesh::safeClone(), RinglebMesh::safeClone(), SpiralAnnularMesh::safeClone(), StitchedMesh::safeClone(), TiledMesh::safeClone(), MFEMFileMesh::safeClone(), MFEMMeshGeneratorMesh::safeClone(), MultiApp::setAppOutputFileBase(), FileOutput::setFileBaseInternal(), MeshGenerator::setMeshProperty(), MeshGenerator::setMeshPropertyHelper(), setRestartFile(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), TransientBase::setupTimeIntegrator(), Output::setWallTimeIntervalFromCommandLineParam(), SideSetExtruderGenerator::SideSetExtruderGenerator(), SolutionInvalidityReporter::SolutionInvalidityReporter(), FixedPointSolve::solve(), ActuallyExplicitEuler::solve(), solve(), EigenProblem::solve(), solveLinearSystem(), PetscOutput::solveSetup(), FixedPointSolve::solveStep(), TransientMultiApp::solveStep(), subdomainSetup(), theWarehouse(), TimeExtremeValue::TimeExtremeValue(), TimeIntegratedPostprocessor::TimeIntegratedPostprocessor(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), SubProblem::timestepSetup(), PIDTransientControl::timestepSetup(), timestepSetup(), TransientBase::TransientBase(), MooseMesh::update(), NEML2FEInterpolation::updateDofMap(), NEML2FEInterpolation::updateGradPhi(), NEML2FEInterpolation::updateInterpolations(), updateMortarMesh(), NEML2FEInterpolation::updatePhi(), Console::write(), XYQuadrilateralMeshFromBoundaryCurve::XYQuadrilateralMeshFromBoundaryCurve(), and ~FEProblemBase().

◆ _assembly

std::vector<std::vector<std::unique_ptr<Assembly> > > FEProblemBase::_assembly
protected

◆ _aux

std::shared_ptr<AuxiliarySystem> FEProblemBase::_aux
protected

The auxiliary system.

Definition at line 3251 of file FEProblemBase.h.

Referenced by addAuxArrayVariable(), addAuxKernel(), addAuxScalarKernel(), addAuxScalarVariable(), addAuxVariable(), addIndicator(), addMarker(), addMultiApp(), addObjectParamsHelper(), addTimeIntegrator(), addTransfer(), advanceState(), checkExceptionAndStopSolve(), computeBounds(), computeIndicators(), computeJacobianTags(), computeLinearSystemTags(), computeMarkers(), computePostCheck(), computeResidualAndJacobian(), computeResidualTags(), computeSystems(), computeUserObjectsInternal(), copySolutionsBackwards(), createQRules(), createTagMatrices(), createTagSolutions(), customSetup(), determineSolverSystem(), DumpObjectsProblem::DumpObjectsProblem(), duplicateVariableCheck(), EigenProblem::EigenProblem(), execute(), ExternalProblem::ExternalProblem(), FEProblem::FEProblem(), getActualFieldVariable(), getArrayVariable(), getAuxiliarySystem(), getScalarVariable(), getStandardVariable(), getSystem(), getSystemBase(), getSystemBase(), getSystemBase(), getVariable(), getVariableNames(), getVectorVariable(), hasScalarVariable(), hasSolutionState(), hasVariable(), init(), initialSetup(), meshChanged(), needBoundaryMaterialOnSide(), needSolutionState(), outputStep(), prepare(), prepare(), prepareFace(), projectInitialConditionOnCustomRange(), projectSolution(), reinitDirac(), reinitElem(), reinitElemFace(), reinitElemPhys(), reinitNeighbor(), reinitNeighborPhys(), reinitNeighborPhys(), reinitNode(), reinitNodeFace(), reinitScalars(), restoreOldSolutions(), restoreSolutions(), saveOldSolutions(), setAuxKernelParamsAndLog(), skipNextForwardSolutionCopyToOld(), systemBaseAuxiliary(), systemBaseAuxiliary(), systemNumForVariable(), timestepSetup(), updateActiveObjects(), and updateMeshXFEM().

◆ _aux_evaluable_local_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_aux_evaluable_local_elem_range
protected

Definition at line 3579 of file FEProblemBase.h.

◆ _between_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_between_multi_app_transfers
protected

Transfers executed just before MultiApps to transfer data between them.

Definition at line 3353 of file FEProblemBase.h.

Referenced by addTransfer(), execMultiAppTransfers(), getMultiAppTransferWarehouse(), getTransfers(), getTransfers(), and updateActiveObjects().

◆ _block_mat_side_cache

std::vector<std::unordered_map<SubdomainID, bool> > FEProblemBase::_block_mat_side_cache
protected

Cache for calculating materials on side.

Definition at line 3362 of file FEProblemBase.h.

Referenced by FEProblemBase(), and needInternalNeighborSideMaterial().

◆ _bnd_mat_side_cache

std::vector<std::unordered_map<BoundaryID, bool> > FEProblemBase::_bnd_mat_side_cache
protected

Cache for calculating materials on side.

Definition at line 3365 of file FEProblemBase.h.

Referenced by FEProblemBase(), and needBoundaryMaterialOnSide().

◆ _bnd_material_props

MaterialPropertyStorage& FEProblemBase::_bnd_material_props
protected

◆ _boundary_restricted_elem_integrity_check

const bool FEProblemBase::_boundary_restricted_elem_integrity_check
protected

whether to perform checking of boundary restricted elemental object variable dependencies, e.g.

whether the variable dependencies are defined on the selected boundaries

Definition at line 3507 of file FEProblemBase.h.

◆ _boundary_restricted_node_integrity_check

const bool FEProblemBase::_boundary_restricted_node_integrity_check
protected

whether to perform checking of boundary restricted nodal object variable dependencies, e.g.

whether the variable dependencies are defined on the selected boundaries

Definition at line 3503 of file FEProblemBase.h.

◆ _calculate_jacobian_in_uo

bool FEProblemBase::_calculate_jacobian_in_uo
protected

◆ _check_residual_for_nans

bool FEProblemBase::_check_residual_for_nans
protected

Whether to check the residual for NaN or Inf values.

Definition at line 3530 of file FEProblemBase.h.

Referenced by checkResidualForNans(), and setCheckResidualForNans().

◆ _checking_uo_aux_state

bool FEProblemBase::_checking_uo_aux_state = false
private

Flag used to indicate whether we are doing the uo/aux state check in execute.

Definition at line 3726 of file FEProblemBase.h.

Referenced by checkingUOAuxState(), and execute().

◆ _cli_option_found

bool Problem::_cli_option_found
protectedinherited

True if the CLI option is found.

Definition at line 52 of file Problem.h.

Referenced by Problem::_setCLIOption().

◆ _cm

std::vector<std::unique_ptr<libMesh::CouplingMatrix> > FEProblemBase::_cm
protected

Coupling matrix for variables.

Definition at line 3254 of file FEProblemBase.h.

Referenced by areCoupled(), couplingMatrix(), FEProblemBase(), and init().

◆ _color_output

bool Problem::_color_output
protectedinherited

True if we're going to attempt to write color output.

Definition at line 55 of file Problem.h.

◆ _computing_nonlinear_residual

bool SubProblem::_computing_nonlinear_residual
protectedinherited

Whether the non-linear residual is being evaluated.

Definition at line 1103 of file SubProblem.h.

Referenced by SubProblem::computingNonlinearResid(), computingNonlinearResid(), and SubProblem::computingNonlinearResid().

◆ _computing_scaling_jacobian

bool FEProblemBase::_computing_scaling_jacobian = false
private

Flag used to indicate whether we are computing the scaling Jacobian.

Definition at line 3720 of file FEProblemBase.h.

Referenced by computingScalingJacobian(), and computingScalingJacobian().

◆ _computing_scaling_residual

bool FEProblemBase::_computing_scaling_residual = false
private

Flag used to indicate whether we are computing the scaling Residual.

Definition at line 3723 of file FEProblemBase.h.

Referenced by computingScalingResidual(), and computingScalingResidual().

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 31 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), MaterialOutputAction::act(), MeshOnlyAction::act(), SetupDebugAction::act(), adaptMesh(), Adaptivity::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), DefaultSteadyStateConvergence::checkConvergence(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonConformingFaces(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), MeshDiagnosticsGenerator::checkPolygons(), checkProblemIntegrity(), ReferenceResidualConvergence::checkResidualConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), CoarsenSurfaceMeshAlongSidesetGenerator::coarsenAlongSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), computeLinearSystemTags(), LinearSystem::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), TimeStepper::constrainStep(), IterationAdaptiveDT::constrainStep(), MultiApp::createApp(), execMultiApps(), execMultiAppTransfers(), Eigenvalue::execute(), SteadyBase::execute(), MFEMSteady::execute(), MessageFromInput::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), SidesetAroundSubdomainUpdater::finalize(), ElementQualityChecker::finalize(), finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), CoarsenBlockGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), OrientSurfaceMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), initialAdaptMesh(), SubProblem::initialSetup(), EigenExecutionerBase::inversePowerIteration(), joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), SurfaceDelaunayGeneratorBase::meshNormalDeviation2D(), MooseBase::mooseDeprecated(), MooseBase::mooseDeprecatedNoTrace(), MooseBase::mooseInfo(), MooseBase::mooseWarning(), MooseBase::mooseWarningNonPrefixed(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), Console::output(), DOFMapOutput::output(), MaterialPropertyDebugOutput::output(), PerfGraphOutput::output(), ReporterDebugOutput::output(), SolutionInvalidityOutput::output(), VariableResidualNormsDebugOutput::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), WebServerControl::outputMessage(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), DefaultMultiAppFixedPointConvergence::preLoop(), ActionWarehouse::printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), PicardSolve::printFixedPointConvergenceHistory(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), NEML2Action::printSummary(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), restoreMultiApps(), restoreSolutions(), NonlinearSystemBase::setInitialSolution(), MooseApp::setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), LinearSystem::solve(), NonlinearSystem::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), ImplicitMidpoint::solve(), LStableDirk2::solve(), LStableDirk3::solve(), LStableDirk4::solve(), EigenProblem::solve(), FixedPointSolve::solveStep(), TransientMultiApp::solveStep(), MeshRepairGenerator::splitNonConvexPolygons(), PerfGraphLivePrint::start(), WebServerControl::startServer(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), TransientBase::takeStep(), MFEMTransient::takeStep(), TerminateChainControl::terminate(), SubProblem::timestepSetup(), updateMeshXFEM(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and ~FEProblemBase().

◆ _const_jacobian

bool FEProblemBase::_const_jacobian
protected

true if the Jacobian is constant

Definition at line 3467 of file FEProblemBase.h.

Referenced by computeJacobianTags(), constJacobian(), prepare(), and setConstJacobian().

◆ _consumed_material_properties

std::map<MooseObjectName, std::set<std::string> > SubProblem::_consumed_material_properties
privateinherited

◆ _control_warehouse

ExecuteMooseObjectWarehouse<Control> FEProblemBase::_control_warehouse
protected

The control logic warehouse.

Definition at line 3564 of file FEProblemBase.h.

Referenced by executeControls(), getControlWarehouse(), timestepSetup(), and updateActiveObjects().

◆ _convergences

MooseObjectWarehouse<Convergence> FEProblemBase::_convergences
protected

convergence warehouse

Definition at line 3287 of file FEProblemBase.h.

Referenced by addConvergence(), getConvergence(), getConvergenceObjects(), and hasConvergence().

◆ _coupling

Moose::CouplingType FEProblemBase::_coupling
protected

Type of variable coupling.

Definition at line 3253 of file FEProblemBase.h.

Referenced by coupling(), init(), setCoupling(), and trustUserCouplingMatrix().

◆ _current_algebraic_bnd_node_range

std::unique_ptr<ConstBndNodeRange> FEProblemBase::_current_algebraic_bnd_node_range
protected

◆ _current_algebraic_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_current_algebraic_elem_range
protected

◆ _current_algebraic_node_range

std::unique_ptr<libMesh::ConstNodeRange> FEProblemBase::_current_algebraic_node_range
protected

Definition at line 3582 of file FEProblemBase.h.

Referenced by getCurrentAlgebraicNodeRange(), and setCurrentAlgebraicNodeRange().

◆ _current_execute_on_flag

ExecFlagType FEProblemBase::_current_execute_on_flag
protected

◆ _current_ic_state

unsigned short FEProblemBase::_current_ic_state
protected

Definition at line 3590 of file FEProblemBase.h.

Referenced by getCurrentICState().

◆ _current_linear_sys

LinearSystem* FEProblemBase::_current_linear_sys
protected

◆ _current_nl_sys

NonlinearSystemBase* FEProblemBase::_current_nl_sys
protected

◆ _current_residual_vector_tags

std::vector<VectorTag> FEProblemBase::_current_residual_vector_tags
private

A data member to store the residual vector tag(s) passed into computeResidualTag(s).

This data member will be used when APIs like cacheResidual, addCachedResiduals, etc. are called

Definition at line 3737 of file FEProblemBase.h.

Referenced by clearCurrentResidualVectorTags(), currentResidualVectorTags(), and setCurrentResidualVectorTags().

◆ _current_solver_sys

SolverSystem* FEProblemBase::_current_solver_sys
protected

The current solver system.

Definition at line 3236 of file FEProblemBase.h.

Referenced by setCurrentLinearSystem(), and setCurrentNonlinearSystem().

◆ _currently_computing_jacobian

bool SubProblem::_currently_computing_jacobian
protectedinherited

Flag to determine whether the problem is currently computing Jacobian.

Definition at line 1097 of file SubProblem.h.

Referenced by computeJacobianBlocks(), EigenProblem::computeJacobianBlocks(), computeJacobianTags(), SubProblem::currentlyComputingJacobian(), and SubProblem::setCurrentlyComputingJacobian().

◆ _currently_computing_residual

bool SubProblem::_currently_computing_residual
protectedinherited

Whether the residual is being evaluated.

Definition at line 1106 of file SubProblem.h.

Referenced by SubProblem::currentlyComputingResidual(), setCurrentlyComputingResidual(), and SubProblem::setCurrentlyComputingResidual().

◆ _currently_computing_residual_and_jacobian

bool SubProblem::_currently_computing_residual_and_jacobian
protectedinherited

Flag to determine whether the problem is currently computing the residual and Jacobian.

Definition at line 1100 of file SubProblem.h.

Referenced by SubProblem::currentlyComputingResidualAndJacobian(), and SubProblem::setCurrentlyComputingResidualAndJacobian().

◆ _cycles_completed

unsigned int FEProblemBase::_cycles_completed
protected

Definition at line 3426 of file FEProblemBase.h.

Referenced by adaptMesh(), getNumCyclesCompleted(), and initialAdaptMesh().

◆ _default_ghosting

bool SubProblem::_default_ghosting
protectedinherited

Whether or not to use default libMesh coupling.

Definition at line 1091 of file SubProblem.h.

Referenced by SubProblem::defaultGhosting().

◆ _dirac_kernel_info

DiracKernelInfo SubProblem::_dirac_kernel_info
protectedinherited

◆ _discrete_materials

MaterialWarehouse FEProblemBase::_discrete_materials
protected

◆ _displaced_mesh

MooseMesh* FEProblemBase::_displaced_mesh
protected

◆ _displaced_problem

std::shared_ptr<DisplacedProblem> FEProblemBase::_displaced_problem
protected

Definition at line 3434 of file FEProblemBase.h.

Referenced by adaptMesh(), addAnyRedistributers(), addAuxArrayVariable(), addAuxScalarKernel(), addAuxScalarVariable(), addAuxVariable(), addCachedJacobian(), addCachedResidual(), addCachedResidualDirectly(), addConstraint(), addDGKernel(), addDiracKernel(), addDisplacedProblem(), addFunction(), addFunctorMaterial(), addFVKernel(), addGhostedBoundary(), addIndicator(), addInterfaceKernel(), addJacobian(), addJacobianBlockTags(), addJacobianLowerD(), addJacobianNeighbor(), addJacobianNeighborLowerD(), addMarker(), addMaterialHelper(), addMultiApp(), addNodalKernel(), addObjectParamsHelper(), addResidual(), addResidualLower(), addResidualNeighbor(), addScalarKernel(), addTimeIntegrator(), addTransfer(), addUserObject(), addVariable(), advanceState(), automaticScaling(), backupGeometricSearchState(), bumpAllQRuleOrder(), bumpVolumeQRuleOrder(), cacheJacobian(), cacheJacobianNeighbor(), cacheResidual(), cacheResidualNeighbor(), checkDisplacementOrders(), clearActiveElementalMooseVariables(), clearActiveFEVariableCoupleableMatrixTags(), clearActiveFEVariableCoupleableVectorTags(), clearActiveScalarVariableCoupleableMatrixTags(), clearActiveScalarVariableCoupleableVectorTags(), clearDiracInfo(), computeJacobianBlocks(), EigenProblem::computeJacobianBlocks(), computeJacobianTags(), computeResidualAndJacobian(), computeResidualTags(), computeUserObjectsInternal(), computingNonlinearResid(), createMortarInterface(), createQRules(), customSetup(), execute(), getDiracElements(), getDisplacedProblem(), getDisplacedProblem(), getMortarUserObjects(), ghostGhostedBoundaries(), haveADObjects(), haveDisplaced(), init(), initXFEM(), jacobianSetup(), mesh(), mesh(), meshChanged(), outputStep(), possiblyRebuildGeomSearchPatches(), prepare(), prepare(), prepareAssembly(), prepareAssemblyNeighbor(), prepareFace(), reinitBecauseOfGhostingOrNewGeomObjects(), reinitDirac(), reinitElem(), reinitElemFace(), reinitElemFaceRef(), reinitElemNeighborAndLowerD(), reinitLowerDElem(), reinitNeighbor(), reinitNeighborFaceRef(), reinitNode(), reinitNodeFace(), reinitOffDiagScalars(), reinitScalars(), resetState(), residualSetup(), restoreGeometricSearchState(), restoreSolutions(), setActiveElementalMooseVariables(), setActiveFEVariableCoupleableMatrixTags(), setActiveFEVariableCoupleableVectorTags(), setActiveScalarVariableCoupleableMatrixTags(), setActiveScalarVariableCoupleableVectorTags(), setAuxKernelParamsAndLog(), setCurrentBoundaryID(), setCurrentLowerDElem(), setCurrentlyComputingResidual(), setCurrentSubdomainID(), setNeighborSubdomainID(), setNeighborSubdomainID(), setResidual(), setResidualNeighbor(), setResidualObjectParamsAndLog(), solve(), EigenProblem::solve(), timestepSetup(), uniformRefine(), and updateGeomSearch().

◆ _dt

Real& FEProblemBase::_dt
protected

Definition at line 3192 of file FEProblemBase.h.

Referenced by dt(), execMultiApps(), and FEProblemBase().

◆ _dt_old

Real& FEProblemBase::_dt_old
protected

Definition at line 3193 of file FEProblemBase.h.

Referenced by dtOld(), and FEProblemBase().

◆ _enabled

const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects.

Definition at line 71 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _error_on_jacobian_nonzero_reallocation

bool FEProblemBase::_error_on_jacobian_nonzero_reallocation
private

Whether to error when the Jacobian is re-allocated, usually because the sparsity pattern changed.

Definition at line 3665 of file FEProblemBase.h.

Referenced by errorOnJacobianNonzeroReallocation(), and setErrorOnJacobianNonzeroReallocation().

◆ _evaluable_local_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_evaluable_local_elem_range
protected

Definition at line 3577 of file FEProblemBase.h.

Referenced by getEvaluableElementRange(), and meshChanged().

◆ _exception_message

std::string FEProblemBase::_exception_message
protected

The error message to go with an exception.

Definition at line 3558 of file FEProblemBase.h.

Referenced by checkExceptionAndStopSolve(), and setException().

◆ _factory

Factory& SubProblem::_factory
protectedinherited

◆ _fail_next_system_convergence_check

bool FEProblemBase::_fail_next_system_convergence_check
private

◆ _fe_matrix_tags

std::set<TagID> FEProblemBase::_fe_matrix_tags
protected

◆ _fe_vector_tags

std::set<TagID> FEProblemBase::_fe_vector_tags
protected

◆ _force_restart

const bool FEProblemBase::_force_restart
private

Definition at line 3676 of file FEProblemBase.h.

◆ _from_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_from_multi_app_transfers
protected

Transfers executed just after MultiApps to transfer data from them.

Definition at line 3350 of file FEProblemBase.h.

Referenced by addTransfer(), execMultiAppTransfers(), getMultiAppTransferWarehouse(), getTransfers(), getTransfers(), and updateActiveObjects().

◆ _functions

MooseObjectWarehouse<Function> FEProblemBase::_functions
protected

◆ _functor_to_request_info

std::vector<std::multimap<std::string, std::pair<bool, bool> > > SubProblem::_functor_to_request_info
privateinherited

A multimap (for each thread) from unfilled functor requests to whether the requests were for AD functors and whether the requestor was an AD object.

Definition at line 1162 of file SubProblem.h.

Referenced by SubProblem::addFunctor(), SubProblem::getFunctor(), and SubProblem::SubProblem().

◆ _functor_to_requestors

std::map<std::string, std::set<std::string> > SubProblem::_functor_to_requestors
privateinherited

The requestors of functors where the key is the prop name and the value is a set of names of requestors.

Definition at line 1158 of file SubProblem.h.

Referenced by SubProblem::getFunctor(), SubProblem::initialSetup(), and SubProblem::showFunctorRequestors().

◆ _functors

std::vector<std::multimap<std::string, std::tuple<TrueFunctorIs, std::unique_ptr<Moose::FunctorEnvelopeBase>, std::unique_ptr<Moose::FunctorEnvelopeBase> > > > SubProblem::_functors
privateinherited

A container holding pointers to all the functors in our problem.

We hold a tuple where the zeroth item in the tuple is an enumerator that describes what type of functor the "true" functor is (either NONAD or AD), the first item in the tuple is the non-AD version of the functor, and the second item in the tuple is the AD version of the functor

Definition at line 1145 of file SubProblem.h.

Referenced by SubProblem::addFunctor(), SubProblem::getFunctor(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), SubProblem::initialSetup(), SubProblem::showFunctors(), and SubProblem::SubProblem().

◆ _fv_bcs_integrity_check

bool FEProblemBase::_fv_bcs_integrity_check
protected

Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset.

Definition at line 3517 of file FEProblemBase.h.

Referenced by fvBCsIntegrityCheck(), and fvBCsIntegrityCheck().

◆ _fv_face_integrity_check

const bool FEProblemBase::_fv_face_integrity_check
protected

Whether to check FV boundary and interface objects against the faces on which they execute.

Definition at line 3520 of file FEProblemBase.h.

◆ _fv_ics

FVInitialConditionWarehouse FEProblemBase::_fv_ics
protected

Definition at line 3298 of file FEProblemBase.h.

Referenced by addFVInitialCondition(), and getFVInitialConditionWarehouse().

◆ _geometric_search_data

GeometricSearchData FEProblemBase::_geometric_search_data
protected

◆ _ghosted_elems

std::set<dof_id_type> SubProblem::_ghosted_elems
protectedinherited

Elements that should have Dofs ghosted to the local processor.

Definition at line 1094 of file SubProblem.h.

Referenced by addGhostedElem(), SubProblem::ghostedElems(), meshChanged(), possiblyRebuildGeomSearchPatches(), and reinitBecauseOfGhostingOrNewGeomObjects().

◆ _grad_phi_zero

std::vector<VariablePhiGradient> FEProblemBase::_grad_phi_zero

Definition at line 2608 of file FEProblemBase.h.

Referenced by FEProblemBase(), and ~FEProblemBase().

◆ _grad_zero

std::vector<VariableGradient> FEProblemBase::_grad_zero

Definition at line 2606 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _has_active_elemental_moose_variables

std::vector<unsigned int> SubProblem::_has_active_elemental_moose_variables
protectedinherited

Whether or not there is currently a list of active elemental moose variables.

Definition at line 1080 of file SubProblem.h.

Referenced by SubProblem::clearActiveElementalMooseVariables(), SubProblem::hasActiveElementalMooseVariables(), SubProblem::setActiveElementalMooseVariables(), and SubProblem::SubProblem().

◆ _has_active_material_properties

std::vector<unsigned char> FEProblemBase::_has_active_material_properties
protected

Whether there are active material properties on each thread.

Definition at line 3493 of file FEProblemBase.h.

Referenced by clearActiveMaterialProperties(), FEProblemBase(), hasActiveMaterialProperties(), and setActiveMaterialProperties().

◆ _has_constraints

bool FEProblemBase::_has_constraints
protected

Whether or not this system has any Constraints.

Definition at line 3452 of file FEProblemBase.h.

Referenced by addConstraint(), NonlinearSystemBase::computeJacobianInternal(), and NonlinearSystemBase::computeResidualInternal().

◆ _has_dampers

bool FEProblemBase::_has_dampers
protected

Whether or not this system has any Dampers associated with it.

Definition at line 3449 of file FEProblemBase.h.

Referenced by addDamper(), computeDamping(), computePostCheck(), and hasDampers().

◆ _has_exception

bool FEProblemBase::_has_exception
protected

Whether or not an exception has occurred.

Definition at line 3543 of file FEProblemBase.h.

Referenced by checkExceptionAndStopSolve(), hasException(), and setException().

◆ _has_initialized_stateful

bool FEProblemBase::_has_initialized_stateful
protected

Whether nor not stateful materials have been initialized.

Definition at line 3464 of file FEProblemBase.h.

Referenced by meshChanged().

◆ _has_internal_edge_residual_objects

bool FEProblemBase::_has_internal_edge_residual_objects
private

Whether the problem has dgkernels or interface kernels.

Definition at line 3688 of file FEProblemBase.h.

Referenced by addDGKernel(), addInterfaceKernel(), and hasNeighborCoupling().

◆ _has_jacobian

bool FEProblemBase::_has_jacobian
protected

Indicates if the Jacobian was computed.

Definition at line 3470 of file FEProblemBase.h.

Referenced by computeJacobianTags(), hasJacobian(), meshChanged(), and prepare().

◆ _has_kokkos_objects

bool FEProblemBase::_has_kokkos_objects = false
private

Whether we have any Kokkos objects.

Definition at line 3754 of file FEProblemBase.h.

Referenced by hasKokkosObjects(), init(), and initElementStatefulProps().

◆ _has_kokkos_residual_objects

bool FEProblemBase::_has_kokkos_residual_objects = false
private

Whether we have any Kokkos residual objects.

Definition at line 3757 of file FEProblemBase.h.

Referenced by hasKokkosResidualObjects().

◆ _has_mortar

bool FEProblemBase::_has_mortar
private

Whether the simulation requires mortar coupling.

Definition at line 3710 of file FEProblemBase.h.

Referenced by createMortarInterface(), and hasMortarCoupling().

◆ _has_nonlocal_coupling

bool FEProblemBase::_has_nonlocal_coupling
protected

Indicates if nonlocal coupling is required/exists.

Definition at line 3487 of file FEProblemBase.h.

Referenced by addJacobian(), addJacobianBlockTags(), hasNonlocalCoupling(), prepare(), prepare(), prepareAssembly(), reinitDirac(), reinitElemPhys(), and timestepSetup().

◆ _has_time_integrator

bool FEProblemBase::_has_time_integrator
protected

Indicates whether or not this executioner has a time integrator (during setup)

Definition at line 3540 of file FEProblemBase.h.

Referenced by addTimeIntegrator(), and hasTimeIntegrator().

◆ _have_ad_objects

bool SubProblem::_have_ad_objects
protectedinherited

AD flag indicating whether any AD objects have been added.

Definition at line 1115 of file SubProblem.h.

Referenced by SubProblem::haveADObjects(), SubProblem::haveADObjects(), DisplacedProblem::haveADObjects(), and haveADObjects().

◆ _have_fv

bool FEProblemBase::_have_fv = false
private

Whether we are performing some calculations with finite volume discretizations.

Definition at line 3740 of file FEProblemBase.h.

Referenced by haveFV(), and needFV().

◆ _ics

InitialConditionWarehouse FEProblemBase::_ics
protected

Initial condition storage

Definition at line 3297 of file FEProblemBase.h.

Referenced by addInitialCondition(), and getInitialConditionWarehouse().

◆ _identify_variable_groups_in_nl

const bool FEProblemBase::_identify_variable_groups_in_nl
private

Whether to identify variable groups in nonlinear systems. This affects dof ordering.

Definition at line 3732 of file FEProblemBase.h.

Referenced by identifyVariableGroupsInNL().

◆ _ignore_zeros_in_jacobian

bool FEProblemBase::_ignore_zeros_in_jacobian
private

Whether to ignore zeros in the Jacobian, thereby leading to a reduced sparsity pattern.

Definition at line 3672 of file FEProblemBase.h.

Referenced by ignoreZerosInJacobian(), setIgnoreZerosInJacobian(), and setPreserveMatrixSparsityPattern().

◆ _immediately_print_invalid_solution

const bool& FEProblemBase::_immediately_print_invalid_solution
private

Definition at line 3682 of file FEProblemBase.h.

Referenced by immediatelyPrintInvalidSolution().

◆ _indicators

MooseObjectWarehouse<Indicator> FEProblemBase::_indicators
protected

◆ _initialized

bool FEProblemBase::_initialized
protected

Definition at line 3163 of file FEProblemBase.h.

Referenced by init(), initialized(), and updateMortarMesh().

◆ _input_file_saved

bool FEProblemBase::_input_file_saved
protected

whether input file has been written

Definition at line 3446 of file FEProblemBase.h.

◆ _interface_mat_side_cache

std::vector<std::unordered_map<BoundaryID, bool> > FEProblemBase::_interface_mat_side_cache
protected

Cache for calculating materials on interface.

Definition at line 3368 of file FEProblemBase.h.

Referenced by FEProblemBase(), and needInterfaceMaterialOnSide().

◆ _interface_materials

MaterialWarehouse FEProblemBase::_interface_materials
protected

◆ _internal_side_indicators

MooseObjectWarehouse<InternalSideIndicatorBase> FEProblemBase::_internal_side_indicators
protected

◆ _is_petsc_options_inserted

bool FEProblemBase::_is_petsc_options_inserted
protected

If or not PETSc options have been added to database.

Definition at line 3573 of file FEProblemBase.h.

Referenced by FEProblemBase(), petscOptionsInserted(), solve(), and solveLinearSystem().

◆ _kernel_coverage_blocks

std::vector<SubdomainName> FEProblemBase::_kernel_coverage_blocks
protected

Definition at line 3499 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), and FEProblemBase().

◆ _kernel_coverage_check

CoverageCheckMode FEProblemBase::_kernel_coverage_check
protected

Determines whether and which subdomains are to be checked to ensure that they have an active kernel.

Definition at line 3498 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), FEProblemBase(), setKernelCoverageCheck(), and setKernelCoverageCheck().

◆ _kokkos_assembly

Moose::Kokkos::Assembly FEProblemBase::_kokkos_assembly
protected

Definition at line 3271 of file FEProblemBase.h.

Referenced by kokkosAssembly(), and kokkosAssembly().

◆ _kokkos_bnd_material_props

Moose::Kokkos::MaterialPropertyStorage& FEProblemBase::_kokkos_bnd_material_props
protected

◆ _kokkos_fe_systems

Moose::Kokkos::Array<Moose::Kokkos::FESystem> FEProblemBase::_kokkos_fe_systems
protected

FESystem array - sparsely populated (only slots for systems needing a Kokkos::FESystem)

Definition at line 3260 of file FEProblemBase.h.

Referenced by getKokkosFESystems(), and getKokkosFESystems().

◆ _kokkos_functions

MooseObjectWarehouse<Moose::FunctionBase> FEProblemBase::_kokkos_functions
protected

◆ _kokkos_material_props

Moose::Kokkos::MaterialPropertyStorage& FEProblemBase::_kokkos_material_props
protected

◆ _kokkos_materials

MaterialWarehouse FEProblemBase::_kokkos_materials
protected

Definition at line 3321 of file FEProblemBase.h.

Referenced by getKokkosMaterialsWarehouse(), and updateActiveObjects().

◆ _kokkos_mesh_initialization_hooks

std::vector<std::function<void()> > FEProblemBase::_kokkos_mesh_initialization_hooks
private

Container holding hooks for functions that need to be called after Kokkos mesh initialization.

Definition at line 3760 of file FEProblemBase.h.

Referenced by addKokkosMeshInitializationHook().

◆ _kokkos_neighbor_material_props

Moose::Kokkos::MaterialPropertyStorage& FEProblemBase::_kokkos_neighbor_material_props
protected

◆ _kokkos_systems

Moose::Kokkos::Array<Moose::Kokkos::System> FEProblemBase::_kokkos_systems
protected

System array - sparsely populated (only slots for systems needing a Kokkos::System)

Definition at line 3258 of file FEProblemBase.h.

Referenced by getKokkosSystems(), and getKokkosSystems().

◆ _line_search

std::shared_ptr<LineSearch> FEProblemBase::_line_search
protected

◆ _linear_convergence_names

std::optional<std::vector<ConvergenceName> > FEProblemBase::_linear_convergence_names
protected

Linear system(s) convergence name(s) (if any)

Definition at line 3168 of file FEProblemBase.h.

Referenced by getLinearConvergenceNames(), hasLinearConvergenceObjects(), and setLinearConvergenceNames().

◆ _linear_matrix_tags

std::set<TagID> FEProblemBase::_linear_matrix_tags
protected

Temporary storage for filtered matrix tags for linear systems.

Definition at line 3182 of file FEProblemBase.h.

Referenced by computeLinearSystemSys().

◆ _linear_sys_name_to_num

std::map<LinearSystemName, unsigned int> FEProblemBase::_linear_sys_name_to_num
protected

Map from linear system name to number.

Definition at line 3212 of file FEProblemBase.h.

Referenced by FEProblemBase(), and linearSysNum().

◆ _linear_sys_names

const std::vector<LinearSystemName> FEProblemBase::_linear_sys_names
protected

◆ _linear_systems

std::vector<std::shared_ptr<LinearSystem> > FEProblemBase::_linear_systems
protected

◆ _linear_vector_tags

std::set<TagID> FEProblemBase::_linear_vector_tags
protected

Temporary storage for filtered vector tags for linear systems.

Definition at line 3179 of file FEProblemBase.h.

Referenced by computeLinearSystemSys().

◆ _map_block_material_props

std::map<SubdomainID, std::set<std::string> > SubProblem::_map_block_material_props
protectedinherited

Map of material properties (block_id -> list of properties)

Definition at line 1053 of file SubProblem.h.

Referenced by SubProblem::checkBlockMatProps(), SubProblem::getMaterialPropertyBlocks(), SubProblem::hasBlockMaterialProperty(), and SubProblem::storeSubdomainMatPropName().

◆ _map_block_material_props_check

std::map<SubdomainID, std::multimap<std::string, std::string> > SubProblem::_map_block_material_props_check
protectedinherited

Data structures of the requested material properties.

We store them in a map from boundary/block id to multimap. Each of the multimaps is a list of requestor object names to material property names.

Definition at line 1071 of file SubProblem.h.

Referenced by SubProblem::checkBlockMatProps(), and SubProblem::storeSubdomainDelayedCheckMatProp().

◆ _map_boundary_material_props

std::map<BoundaryID, std::set<std::string> > SubProblem::_map_boundary_material_props
protectedinherited

Map for boundary material properties (boundary_id -> list of properties)

Definition at line 1056 of file SubProblem.h.

Referenced by SubProblem::checkBoundaryMatProps(), SubProblem::getMaterialPropertyBoundaryIDs(), SubProblem::hasBoundaryMaterialProperty(), and SubProblem::storeBoundaryMatPropName().

◆ _map_boundary_material_props_check

std::map<BoundaryID, std::multimap<std::string, std::string> > SubProblem::_map_boundary_material_props_check
protectedinherited

◆ _markers

MooseObjectWarehouse<Marker> FEProblemBase::_markers
protected

◆ _material_coverage_blocks

std::vector<SubdomainName> FEProblemBase::_material_coverage_blocks
protected

Definition at line 3514 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), and FEProblemBase().

◆ _material_coverage_check

CoverageCheckMode FEProblemBase::_material_coverage_check
protected

Determines whether and which subdomains are to be checked to ensure that they have an active material.

Definition at line 3513 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), FEProblemBase(), setMaterialCoverageCheck(), and setMaterialCoverageCheck().

◆ _material_dependency_check

const bool FEProblemBase::_material_dependency_check
protected

Determines whether a check to verify material dependencies on every subdomain.

Definition at line 3523 of file FEProblemBase.h.

Referenced by checkProblemIntegrity().

◆ _material_prop_registry

MaterialPropertyRegistry FEProblemBase::_material_prop_registry
protected

Definition at line 3303 of file FEProblemBase.h.

Referenced by checkDependMaterialsHelper(), and getMaterialPropertyRegistry().

◆ _material_property_requested

std::set<std::string> SubProblem::_material_property_requested
protectedinherited

set containing all material property names that have been requested by getMaterialProperty*

Definition at line 1063 of file SubProblem.h.

Referenced by SubProblem::isMatPropRequested(), and SubProblem::markMatPropRequested().

◆ _material_props

MaterialPropertyStorage& FEProblemBase::_material_props
protected

◆ _materials

MaterialWarehouse FEProblemBase::_materials
protected

◆ _matrix_tag_id_to_tag_name

std::map<TagID, TagName> SubProblem::_matrix_tag_id_to_tag_name
protectedinherited

Reverse map.

Definition at line 1045 of file SubProblem.h.

Referenced by SubProblem::addMatrixTag(), SubProblem::matrixTagExists(), and SubProblem::matrixTagName().

◆ _matrix_tag_name_to_tag_id

std::map<TagName, TagID> SubProblem::_matrix_tag_name_to_tag_id
protectedinherited

◆ _max_qps

unsigned int FEProblemBase::_max_qps
protected

Maximum number of quadrature points used in the problem.

Definition at line 3534 of file FEProblemBase.h.

Referenced by getMaxQps(), reinitDirac(), and updateMaxQps().

◆ _max_scalar_order

libMesh::Order FEProblemBase::_max_scalar_order
protected

Maximum scalar variable order.

Definition at line 3537 of file FEProblemBase.h.

Referenced by addAuxScalarVariable(), and getMaxScalarOrder().

◆ _mesh

MooseMesh& FEProblemBase::_mesh
protected

◆ _mesh_divisions

MooseObjectWarehouse<MeshDivision> FEProblemBase::_mesh_divisions
protected

Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the Problem Time (and people's uses) will tell where this fits best.

Definition at line 3277 of file FEProblemBase.h.

Referenced by addMeshDivision(), and getMeshDivision().

◆ _metaname

const RestartableDataMapName Restartable::_metaname
privateinherited

Restartable metadata name.

Definition at line 247 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp().

◆ _mortar_data

std::unique_ptr<MortarInterfaceWarehouse> FEProblemBase::_mortar_data
protected

◆ _multi_apps

ExecuteMooseObjectWarehouse<MultiApp> FEProblemBase::_multi_apps
protected

◆ _multiapp_fixed_point_convergence_name

std::optional<ConvergenceName> FEProblemBase::_multiapp_fixed_point_convergence_name
protected

◆ _name

const std::string& MooseBase::_name
protectedinherited

The name of this class.

Definition at line 381 of file MooseBase.h.

Referenced by AddFieldSplitAction::act(), AddBCAction::act(), AddConstraintAction::act(), AddControlAction::act(), AddConvergenceAction::act(), AddCorrectorAction::act(), AddDamperAction::act(), AddDGKernelAction::act(), AddDiracKernelAction::act(), AddDistributionAction::act(), AddFunctionAction::act(), AddFunctorMaterialAction::act(), AddFVBCAction::act(), AddFVGradientMethodAction::act(), AddFVInitialConditionAction::act(), AddFVInterfaceKernelAction::act(), AddFVInterpolationMethodAction::act(), AddFVKernelAction::act(), AddHDGKernelAction::act(), AddIndicatorAction::act(), AddInitialConditionAction::act(), AddInterfaceKernelAction::act(), AddKernelAction::act(), AddLinearFVBCAction::act(), AddLinearFVKernelAction::act(), AddMarkerAction::act(), AddMaterialAction::act(), AddMeshDivisionAction::act(), AddMeshGeneratorAction::act(), AddMeshModifiersAction::act(), AddMultiAppAction::act(), AddNodalKernelAction::act(), AddOutputAction::act(), AddPositionsAction::act(), AddPostprocessorAction::act(), AddReporterAction::act(), AddSamplerAction::act(), AddScalarKernelAction::act(), AddTimesAction::act(), AddTimeStepperAction::act(), AddTransferAction::act(), AddUserObjectAction::act(), AddVectorPostprocessorAction::act(), PartitionerAction::act(), ReadExecutorParamsAction::act(), SetupPreconditionerAction::act(), SetupTimeIntegratorAction::act(), AddMFEMComplexBCComponentAction::act(), AddMFEMComplexKernelComponentAction::act(), AddMFEMFESpaceAction::act(), AddMFEMFESpaceHierarchyAction::act(), AddMFEMProblemComposerAction::act(), AddMFEMSolverAction::act(), AddMFEMSubMeshAction::act(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), PiecewiseLinearBase::buildInterpolation(), CombinerGenerator::CombinerGenerator(), Executor::Executor(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), MultiApp::fillPositions(), CentroidMultiApp::fillPositions(), QuadraturePointMultiApp::fillPositions(), FunctionDT::FunctionDT(), FillBetweenCurvesGenerator::generate(), FillBetweenPointVectorsGenerator::generate(), FillBetweenSidesetsGenerator::generate(), MooseBase::MooseBase(), MooseBase::name(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseBase::setData(), and AddVariableAction::varName().

◆ _need_to_add_default_multiapp_fixed_point_convergence

bool FEProblemBase::_need_to_add_default_multiapp_fixed_point_convergence
protected

Flag that the problem needs to add the default fixed point convergence.

Definition at line 3198 of file FEProblemBase.h.

Referenced by needToAddDefaultMultiAppFixedPointConvergence(), and setNeedToAddDefaultMultiAppFixedPointConvergence().

◆ _need_to_add_default_nonlinear_convergence

bool FEProblemBase::_need_to_add_default_nonlinear_convergence
protected

Flag that the problem needs to add the default nonlinear convergence.

Definition at line 3196 of file FEProblemBase.h.

Referenced by needToAddDefaultNonlinearConvergence(), and setNeedToAddDefaultNonlinearConvergence().

◆ _need_to_add_default_steady_state_convergence

bool FEProblemBase::_need_to_add_default_steady_state_convergence
protected

Flag that the problem needs to add the default steady convergence.

Definition at line 3200 of file FEProblemBase.h.

Referenced by needToAddDefaultSteadyStateConvergence(), and setNeedToAddDefaultSteadyStateConvergence().

◆ _needs_old_newton_iter

bool FEProblemBase::_needs_old_newton_iter
protected

Indicates that we need to compute variable values for previous Newton iteration.

Definition at line 3473 of file FEProblemBase.h.

◆ _neighbor_material_props

MaterialPropertyStorage& FEProblemBase::_neighbor_material_props
protected

◆ _nl

std::vector<std::shared_ptr<NonlinearSystemBase> > FEProblemBase::_nl
protected

◆ _nl_evaluable_local_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_nl_evaluable_local_elem_range
protected

Definition at line 3578 of file FEProblemBase.h.

Referenced by getNonlinearEvaluableElementRange(), and meshChanged().

◆ _nl_sys_name_to_num

std::map<NonlinearSystemName, unsigned int> FEProblemBase::_nl_sys_name_to_num
protected

Map from nonlinear system name to number.

Definition at line 3230 of file FEProblemBase.h.

Referenced by FEProblemBase(), and nlSysNum().

◆ _nl_sys_names

const std::vector<NonlinearSystemName> FEProblemBase::_nl_sys_names
protected

◆ _nonlinear_convergence_names

std::optional<std::vector<ConvergenceName> > FEProblemBase::_nonlinear_convergence_names
protected

Nonlinear system(s) convergence name(s)

Definition at line 3166 of file FEProblemBase.h.

Referenced by getNonlinearConvergenceNames(), and setNonlinearConvergenceNames().

◆ _nonlocal_cm

std::vector<libMesh::CouplingMatrix> FEProblemBase::_nonlocal_cm
private

nonlocal coupling matrix

Definition at line 3747 of file FEProblemBase.h.

Referenced by addJacobianBlockTags(), FEProblemBase(), nonlocalCouplingMatrix(), prepare(), and setNonlocalCouplingMatrix().

◆ _nonlocal_integrated_bcs

MooseObjectWarehouse<IntegratedBCBase> FEProblemBase::_nonlocal_integrated_bcs
protected

nonlocal integrated_bcs

Definition at line 3293 of file FEProblemBase.h.

Referenced by checkNonlocalCoupling(), setNonlocalCouplingMatrix(), and timestepSetup().

◆ _nonlocal_kernels

MooseObjectWarehouse<KernelBase> FEProblemBase::_nonlocal_kernels
protected

nonlocal kernels

Definition at line 3290 of file FEProblemBase.h.

Referenced by checkNonlocalCoupling(), setNonlocalCouplingMatrix(), and timestepSetup().

◆ _not_zeroed_tagged_vectors

std::unordered_set<TagID> SubProblem::_not_zeroed_tagged_vectors
protectedinherited

the list of vector tags that will not be zeroed when all other tags are

Definition at line 1118 of file SubProblem.h.

Referenced by SubProblem::addNotZeroedVectorTag(), restoreSolutions(), and SubProblem::vectorTagNotZeroed().

◆ _notify_when_mesh_changes

std::vector<MeshChangedInterface *> FEProblemBase::_notify_when_mesh_changes
protected

Objects to be notified when the mesh changes.

Definition at line 3371 of file FEProblemBase.h.

Referenced by meshChanged(), and notifyWhenMeshChanges().

◆ _notify_when_mesh_displaces

std::vector<MeshDisplacedInterface *> FEProblemBase::_notify_when_mesh_displaces
protected

Objects to be notified when the mesh displaces.

Definition at line 3374 of file FEProblemBase.h.

Referenced by meshDisplaced(), and notifyWhenMeshDisplaces().

◆ _num_concurrent_multiapps

const unsigned int FEProblemBase::_num_concurrent_multiapps
protected

Number of concurrent applications being solved at the same time.

Definition at line 3356 of file FEProblemBase.h.

Referenced by execMultiApps(), numConcurrentMultiApps(), and partitionConcurrentMultiApps().

◆ _num_grid_steps

unsigned int FEProblemBase::_num_grid_steps
private

Number of steps in a grid sequence.

Definition at line 3713 of file FEProblemBase.h.

Referenced by addAnyRedistributers(), checkProblemIntegrity(), numGridSteps(), and timestepSetup().

◆ _num_linear_sys

const std::size_t FEProblemBase::_num_linear_sys
protected

The number of linear systems.

Definition at line 3206 of file FEProblemBase.h.

Referenced by FEProblem::FEProblem(), FEProblemBase(), numLinearSystems(), and numSolverSystems().

◆ _num_nl_sys

const std::size_t FEProblemBase::_num_nl_sys
protected

◆ _parallel_barrier_messaging

bool FEProblemBase::_parallel_barrier_messaging
protected

Whether or not information about how many transfers have completed is printed.

Definition at line 3546 of file FEProblemBase.h.

Referenced by backupMultiApps(), execMultiApps(), execMultiAppTransfers(), finishMultiAppStep(), restoreMultiApps(), and setParallelBarrierMessaging().

◆ _parent

const ParallelParamObject& DataFileInterface::_parent
privateinherited

◆ _pars

const InputParameters& MooseBase::_pars
protectedinherited

The object's parameters.

Definition at line 384 of file MooseBase.h.

Referenced by AddAuxKernelAction::act(), AddFVICAction::act(), AddICAction::act(), CommonOutputAction::act(), ComposeTimeStepperAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupDebugAction::act(), SetupMeshAction::act(), AddMFEMComplexBCComponentAction::act(), AddMFEMComplexKernelComponentAction::act(), FunctorMaterial::addFunctorPropertyByBlocks(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), PNGOutput::calculateRescalingValues(), MooseBase::callMooseError(), MooseBase::connectControllableParams(), Console::Console(), MooseApp::copyInputs(), MaterialBase::declareADProperty(), Moose::Kokkos::MaterialBase::declareKokkosOnDemandProperty(), Moose::Kokkos::MaterialBase::declareKokkosProperty(), MaterialBase::declareProperty(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::generate(), MooseBase::getBase(), MooseBase::getCheckedPointerParam(), MaterialBase::getGenericZeroMaterialProperty(), MooseBase::getHitNode(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBase::getParam(), MooseBase::getParam(), MooseBase::hasBase(), MeshGenerator::hasGenerateCSG(), MeshGenerator::hasGenerateData(), AddVariableAction::init(), AdvancedOutput::initExecutionTypes(), EigenProblemSolve::initialSetup(), Console::initialSetup(), MooseBase::isParamSetByUser(), MooseBase::isParamValid(), MultiApp::keepSolutionDuringRestore(), MooseBase::messagePrefix(), MooseApp::MooseApp(), MooseBase::MooseBase(), MultiSystemSolveObject::MultiSystemSolveObject(), MooseApp::outputMachineReadableData(), MooseBase::paramError(), MooseBase::parameters(), MooseBase::paramInfo(), MooseBase::paramWarning(), MooseMesh::prepare(), MooseBase::queryParam(), MooseMesh::setCoordSystem(), MooseMesh::setPartitionerHelper(), SetupMeshAction::setupMesh(), TransientBase::setupTimeIntegrator(), MooseApp::showInputs(), and MooseBase::uniqueName().

◆ _pbblf_functors

std::vector<std::map<std::string, std::unique_ptr<Moose::FunctorAbstract> > > SubProblem::_pbblf_functors
privateinherited

◆ _petsc_option_data_base

PetscOptions FEProblemBase::_petsc_option_data_base
protected

◆ _petsc_options

Moose::PetscSupport::PetscOptions FEProblemBase::_petsc_options
protected

PETSc option storage.

Definition at line 3567 of file FEProblemBase.h.

Referenced by getPetscOptions(), solve(), and solveLinearSystem().

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 135 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::perfGraph().

◆ _phi_zero

std::vector<VariablePhiValue> FEProblemBase::_phi_zero

Definition at line 2604 of file FEProblemBase.h.

Referenced by FEProblemBase(), and ~FEProblemBase().

◆ _point_zero

std::vector<Point> FEProblemBase::_point_zero

Definition at line 2612 of file FEProblemBase.h.

Referenced by FEProblemBase().

◆ _prefix

const std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 138 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::timedSectionName().

◆ _preserve_matrix_sparsity_pattern

bool FEProblemBase::_preserve_matrix_sparsity_pattern
private

Whether to preserve the system matrix / Jacobian sparsity pattern, using 0-valued entries usually.

Definition at line 3674 of file FEProblemBase.h.

Referenced by preserveMatrixSparsityPattern(), and setPreserveMatrixSparsityPattern().

◆ _previous_multiapp_fp_aux_solution_required

bool FEProblemBase::_previous_multiapp_fp_aux_solution_required
protected

Indicates we need to save the previous multiapp fixed-point iteration auxiliary variable values.

Definition at line 3480 of file FEProblemBase.h.

Referenced by needsPreviousMultiAppFixedPointIterationAuxiliary(), and needsPreviousMultiAppFixedPointIterationAuxiliary().

◆ _previous_multiapp_fp_nl_solution_required

std::vector<bool> FEProblemBase::_previous_multiapp_fp_nl_solution_required
protected

Indicates we need to save the previous multiapp fixed-point iteration solver variable values.

Definition at line 3478 of file FEProblemBase.h.

Referenced by needsPreviousMultiAppFixedPointIterationSolution(), and needsPreviousMultiAppFixedPointIterationSolution().

◆ _previous_multisystem_fp_aux_solution_required

bool FEProblemBase::_previous_multisystem_fp_aux_solution_required
protected

Indicates we need to save the previous multi-system fixed-point iteration auxiliary variable values.

Definition at line 3484 of file FEProblemBase.h.

Referenced by needsPreviousMultiSystemFixedPointIterationAuxiliary(), and needsPreviousMultiSystemFixedPointIterationAuxiliary().

◆ _previous_multisystem_fp_nl_solution_required

std::vector<bool> FEProblemBase::_previous_multisystem_fp_nl_solution_required
protected

Indicates we need to save the previous multi-system fixed-point iteration solver variable values.

Definition at line 3482 of file FEProblemBase.h.

Referenced by needsPreviousMultiSystemFixedPointIterationSolution(), and needsPreviousMultiSystemFixedPointIterationSolution().

◆ _previous_nl_solution_required

bool FEProblemBase::_previous_nl_solution_required
protected

Indicates we need to save the previous NL iteration variable values.

Definition at line 3476 of file FEProblemBase.h.

Referenced by createTagSolutions().

◆ _print_execution_on

ExecFlagEnum FEProblemBase::_print_execution_on
private

When to print the execution of loops.

Definition at line 3729 of file FEProblemBase.h.

Referenced by setExecutionPrinting(), and shouldPrintExecution().

◆ _random_data_objects

std::map<std::string, std::unique_ptr<RandomData> > FEProblemBase::_random_data_objects
protected

A map of objects that consume random numbers.

Definition at line 3359 of file FEProblemBase.h.

Referenced by computeJacobianTags(), computeLinearSystemTags(), computeResidualAndJacobian(), computeResidualTags(), registerRandomInterface(), and timestepSetup().

◆ _real_zero

std::vector<Real> FEProblemBase::_real_zero

Convenience zeros.

Definition at line 2601 of file FEProblemBase.h.

Referenced by FEProblemBase().

◆ _regard_general_exceptions_as_errors

const bool FEProblemBase::_regard_general_exceptions_as_errors
private

If we catch an exception during residual/Jacobian evaluaton for which we don't have specific handling, immediately error instead of allowing the time step to be cut.

Definition at line 3744 of file FEProblemBase.h.

Referenced by handleException().

◆ _reinit_displaced_elem

bool FEProblemBase::_reinit_displaced_elem
protected

◆ _reinit_displaced_face

bool FEProblemBase::_reinit_displaced_face
protected

◆ _reinit_displaced_neighbor

bool FEProblemBase::_reinit_displaced_neighbor
protected

◆ _reporter_data

ReporterData FEProblemBase::_reporter_data
protected

◆ _req

The EquationSystems object, wrapped for restart.

Definition at line 3119 of file FEProblemBase.h.

Referenced by es(), and getRestartableEquationSystems().

◆ _requires_nonlocal_coupling

bool FEProblemBase::_requires_nonlocal_coupling
private

nonlocal coupling requirement flag

Definition at line 3750 of file FEProblemBase.h.

Referenced by checkNonlocalCoupling(), checkNonlocalCouplingRequirement(), and timestepSetup().

◆ _restartable_app

MooseApp& Restartable::_restartable_app
protectedinherited

Reference to the application.

Definition at line 234 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp(), and Restartable::registerRestartableNameWithFilterOnApp().

◆ _restartable_name

std::string Restartable::_restartable_name
privateinherited

The name of the object.

Definition at line 250 of file Restartable.h.

Referenced by Restartable::declareRestartableDataWithObjectNameWithContext(), and Restartable::restartableName().

◆ _restartable_read_only

const bool Restartable::_restartable_read_only
protectedinherited

Flag for toggling read only status (see ReporterData)

Definition at line 243 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp().

◆ _restartable_system_name

const std::string Restartable::_restartable_system_name
protectedinherited

The system name this object is in.

Definition at line 237 of file Restartable.h.

Referenced by Restartable::restartableName().

◆ _restartable_tid

const THREAD_ID Restartable::_restartable_tid
protectedinherited

The thread ID for this object.

Definition at line 240 of file Restartable.h.

Referenced by Restartable::declareRestartableDataHelper().

◆ _restore_original_nonzero_pattern

const bool FEProblemBase::_restore_original_nonzero_pattern
private

Whether we should restore the original nonzero pattern for every Jacobian evaluation.

This option is useful if the sparsity pattern is constantly changing and you are using hash table assembly or if you wish to continually restore the matrix to the originally preallocated sparsity pattern computed by relationship managers.

Definition at line 3670 of file FEProblemBase.h.

Referenced by computeJacobianTags(), and restoreOriginalNonzeroPattern().

◆ _root_alg_gf_to_sys_clones

std::unordered_map<libMesh::GhostingFunctor *, std::vector<std::shared_ptr<libMesh::GhostingFunctor> > > SubProblem::_root_alg_gf_to_sys_clones
privateinherited

A map from a root algebraic ghosting functor, e.g.

the ghosting functor passed into removeAlgebraicGhostingFunctor, to its clones in other systems, e.g. systems other than system 0

Definition at line 1196 of file SubProblem.h.

Referenced by SubProblem::cloneAlgebraicGhostingFunctor(), and SubProblem::removeAlgebraicGhostingFunctor().

◆ _root_coupling_gf_to_sys_clones

std::unordered_map<libMesh::GhostingFunctor *, std::vector<std::shared_ptr<libMesh::GhostingFunctor> > > SubProblem::_root_coupling_gf_to_sys_clones
privateinherited

A map from a root coupling ghosting functor, e.g.

the ghosting functor passed into removeCouplingGhostingFunctor, to its clones in other systems, e.g. systems other than system 0

Definition at line 1203 of file SubProblem.h.

Referenced by SubProblem::cloneCouplingGhostingFunctor(), and SubProblem::removeCouplingGhostingFunctor().

◆ _safe_access_tagged_matrices

bool SubProblem::_safe_access_tagged_matrices
protectedinherited

Is it safe to retrieve data from tagged matrices.

Definition at line 1109 of file SubProblem.h.

Referenced by computeJacobianTags(), computeLinearSystemTags(), computeResidualAndJacobian(), resetState(), and SubProblem::safeAccessTaggedMatrices().

◆ _safe_access_tagged_vectors

bool SubProblem::_safe_access_tagged_vectors
protectedinherited

Is it safe to retrieve data from tagged vectors.

Definition at line 1112 of file SubProblem.h.

Referenced by computeLinearSystemTags(), computeResidualAndJacobian(), computeResidualTags(), resetState(), and SubProblem::safeAccessTaggedVectors().

◆ _scalar_ics

ScalarInitialConditionWarehouse FEProblemBase::_scalar_ics
protected

◆ _scalar_zero

std::vector<VariableValue> FEProblemBase::_scalar_zero

Definition at line 2602 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _second_phi_zero

std::vector<VariablePhiSecond> FEProblemBase::_second_phi_zero

Definition at line 2611 of file FEProblemBase.h.

Referenced by FEProblemBase(), and ~FEProblemBase().

◆ _second_zero

std::vector<VariableSecond> FEProblemBase::_second_zero

Definition at line 2609 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _show_chain_control_data

bool SubProblem::_show_chain_control_data
privateinherited

Whether to output a list of all the chain control data.

Definition at line 1168 of file SubProblem.h.

Referenced by SubProblem::initialSetup(), SubProblem::setChainControlDataOutput(), and SubProblem::timestepSetup().

◆ _show_functors

bool SubProblem::_show_functors
privateinherited

Whether to output a list of the functors used and requested (currently only at initialSetup)

Definition at line 1165 of file SubProblem.h.

Referenced by SubProblem::initialSetup(), and SubProblem::setFunctorOutput().

◆ _show_invalid_solution_console

const bool FEProblemBase::_show_invalid_solution_console
private

Definition at line 3681 of file FEProblemBase.h.

Referenced by showInvalidSolutionConsole().

◆ _si_moose_base

const MooseBase& SolutionInvalidInterface::_si_moose_base
privateinherited

◆ _si_problem

const FEProblemBase* SolutionInvalidInterface::_si_problem
privateinherited

A pointer to FEProblem base.

Definition at line 114 of file SolutionInvalidInterface.h.

Referenced by SolutionInvalidInterface::flagInvalidSolutionInternal().

◆ _side_uo_interface_mat_prop_integrity_check

const bool FEProblemBase::_side_uo_interface_mat_prop_integrity_check
protected

Whether to check that side user objects do not consume interface material properties.

Definition at line 3510 of file FEProblemBase.h.

Referenced by sideUOInterfaceMatPropIntegrityCheck().

◆ _skip_exception_check

bool FEProblemBase::_skip_exception_check
protected

If or not skip 'exception and stop solve'.

Definition at line 3458 of file FEProblemBase.h.

Referenced by checkExceptionAndStopSolve(), initialSetup(), and skipExceptionCheck().

◆ _skip_nl_system_check

const bool FEProblemBase::_skip_nl_system_check
private

Definition at line 3678 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), and init().

◆ _snesmf_reuse_base

bool FEProblemBase::_snesmf_reuse_base
protected

If or not to resuse the base vector for matrix-free calculation.

Definition at line 3455 of file FEProblemBase.h.

Referenced by setSNESMFReuseBase(), and useSNESMFReuseBase().

◆ _snesmf_reuse_base_set_by_user

bool FEProblemBase::_snesmf_reuse_base_set_by_user
protected

If or not _snesmf_reuse_base is set by user.

Definition at line 3461 of file FEProblemBase.h.

Referenced by isSNESMFReuseBaseSetbyUser(), and setSNESMFReuseBase().

◆ _solve

const bool& FEProblemBase::_solve
protected

Whether or not to actually solve the nonlinear system.

Definition at line 3185 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), FEProblemBase(), init(), shouldSolve(), solve(), EigenProblem::solve(), solveLinearSystem(), EigenProblem::solverSystemConverged(), and solverSystemConverged().

◆ _solver_params

std::vector<SolverParams> FEProblemBase::_solver_params
protected

Definition at line 3495 of file FEProblemBase.h.

Referenced by FEProblemBase(), solve(), solveLinearSystem(), and solverParams().

◆ _solver_sys_name_to_num

std::map<SolverSystemName, unsigned int> FEProblemBase::_solver_sys_name_to_num
protected

Map connecting solver system names with their respective systems.

Definition at line 3245 of file FEProblemBase.h.

Referenced by FEProblemBase(), and solverSysNum().

◆ _solver_sys_names

std::vector<SolverSystemName> FEProblemBase::_solver_sys_names
protected

The union of nonlinear and linear system names.

Definition at line 3248 of file FEProblemBase.h.

Referenced by FEProblemBase(), getSolverSystemNames(), getSystemBase(), Moose::PetscSupport::setSinglePetscOption(), and solverSysNum().

◆ _solver_systems

std::vector<std::shared_ptr<SolverSystem> > FEProblemBase::_solver_systems
protected

◆ _solver_var_to_sys_num

std::map<SolverVariableName, unsigned int> FEProblemBase::_solver_var_to_sys_num
protected

Map connecting variable names with their respective solver systems.

Definition at line 3242 of file FEProblemBase.h.

Referenced by addVariable(), and determineSolverSystem().

◆ _started_initial_setup

bool FEProblemBase::_started_initial_setup
private

At or beyond initialSteup stage.

Definition at line 3685 of file FEProblemBase.h.

Referenced by initialSetup(), and startedInitialSetup().

◆ _steady_state_convergence_name

std::optional<ConvergenceName> FEProblemBase::_steady_state_convergence_name
protected

Steady-state detection convergence name.

Definition at line 3172 of file FEProblemBase.h.

Referenced by getSteadyStateConvergenceName(), hasSetSteadyStateConvergenceName(), and setSteadyStateConvergenceName().

◆ _subspace_dim

std::map<std::string, unsigned int> FEProblemBase::_subspace_dim
protected

Dimension of the subspace spanned by the vectors with a given prefix.

Definition at line 3264 of file FEProblemBase.h.

Referenced by initNullSpaceVectors(), and subspaceDim().

◆ _t_step

int& FEProblemBase::_t_step
protected

Definition at line 3191 of file FEProblemBase.h.

Referenced by FEProblemBase(), timeStep(), and timestepSetup().

◆ _termination_requested

bool Problem::_termination_requested
protectedinherited

True if termination of the solve has been requested.

Definition at line 58 of file Problem.h.

Referenced by Problem::isSolveTerminationRequested(), and Problem::terminateSolve().

◆ _time

Real& FEProblemBase::_time
protected

◆ _time_old

Real& FEProblemBase::_time_old
protected

Definition at line 3189 of file FEProblemBase.h.

Referenced by FEProblemBase(), and timeOld().

◆ _time_older

Real& FEProblemBase::_time_older
protected

Definition at line 3190 of file FEProblemBase.h.

Referenced by FEProblemBase(), and timeOlder().

◆ _to_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_to_multi_app_transfers
protected

Transfers executed just before MultiApps to transfer data to them.

Definition at line 3347 of file FEProblemBase.h.

Referenced by addTransfer(), execMultiAppTransfers(), getMultiAppTransferWarehouse(), getTransfers(), getTransfers(), and updateActiveObjects().

◆ _transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_transfers
protected

Normal Transfers.

Definition at line 3344 of file FEProblemBase.h.

Referenced by addTransfer(), and updateActiveObjects().

◆ _transient

bool FEProblemBase::_transient
protected

Definition at line 3187 of file FEProblemBase.h.

Referenced by isTransient(), and transient().

◆ _transient_multi_apps

ExecuteMooseObjectWarehouse<TransientMultiApp> FEProblemBase::_transient_multi_apps
protected

Storage for TransientMultiApps (only needed for calling 'computeDT')

Definition at line 3341 of file FEProblemBase.h.

Referenced by addMultiApp(), computeMultiAppsDT(), and updateActiveObjects().

◆ _trust_user_coupling_matrix

bool FEProblemBase::_trust_user_coupling_matrix = false
private

Whether to trust the user coupling matrix no matter what.

See https://github.com/idaholab/moose/issues/16395 for detailed background

Definition at line 3717 of file FEProblemBase.h.

Referenced by setCoupling(), and trustUserCouplingMatrix().

◆ _type

const std::string& MooseBase::_type
protectedinherited

◆ _typed_vector_tags

std::vector<std::vector<VectorTag> > SubProblem::_typed_vector_tags
privateinherited

The vector tags associated with each VectorTagType This is kept separate from _vector_tags for quick access into typed vector tags in places where we don't want to build a new vector every call (like in residual evaluation)

Definition at line 1178 of file SubProblem.h.

Referenced by SubProblem::addVectorTag(), SubProblem::getVectorTags(), and SubProblem::verifyVectorTags().

◆ _u_dot_old_requested

bool FEProblemBase::_u_dot_old_requested
private

Whether old solution time derivative needs to be stored.

Definition at line 3697 of file FEProblemBase.h.

Referenced by setUDotOldRequested(), and uDotOldRequested().

◆ _u_dot_requested

bool FEProblemBase::_u_dot_requested
private

Whether solution time derivative needs to be stored.

Definition at line 3691 of file FEProblemBase.h.

Referenced by setUDotRequested(), uDotOldRequested(), and uDotRequested().

◆ _u_dotdot_old_requested

bool FEProblemBase::_u_dotdot_old_requested
private

Whether old solution second time derivative needs to be stored.

Definition at line 3700 of file FEProblemBase.h.

Referenced by setUDotDotOldRequested(), and uDotDotOldRequested().

◆ _u_dotdot_requested

bool FEProblemBase::_u_dotdot_requested
private

Whether solution second time derivative needs to be stored.

Definition at line 3694 of file FEProblemBase.h.

Referenced by setUDotDotRequested(), uDotDotOldRequested(), and uDotDotRequested().

◆ _uo_aux_state_check

const bool FEProblemBase::_uo_aux_state_check
protected

Whether or not checking the state of uo/aux evaluation.

Definition at line 3526 of file FEProblemBase.h.

Referenced by execute(), and hasUOAuxStateCheck().

◆ _uo_jacobian_moose_vars

std::vector<std::vector<const MooseVariableFEBase *> > FEProblemBase::_uo_jacobian_moose_vars
protected

Definition at line 3490 of file FEProblemBase.h.

Referenced by FEProblemBase(), getUserObjectJacobianVariables(), and meshChanged().

◆ _use_hash_table_matrix_assembly

const bool FEProblemBase::_use_hash_table_matrix_assembly
protected

Whether to assemble matrices using hash tables instead of preallocating matrix memory.

This can be a good option if the sparsity pattern changes throughout the course of the simulation

Definition at line 3594 of file FEProblemBase.h.

Referenced by EigenProblem::EigenProblem(), FEProblem::FEProblem(), and useHashTableMatrixAssembly().

◆ _using_ad_mat_props

bool FEProblemBase::_using_ad_mat_props
protected

Automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material property or whether any suppier has declared an AD material property.

Definition at line 3587 of file FEProblemBase.h.

◆ _using_default_nl

const bool FEProblemBase::_using_default_nl
protected

Boolean to check if we have the default nonlinear system.

Definition at line 3218 of file FEProblemBase.h.

◆ _var_dof_map

std::map<std::string, std::vector<dof_id_type> > SubProblem::_var_dof_map
inherited

◆ _vector_curl_zero

std::vector<VectorVariableCurl> FEProblemBase::_vector_curl_zero

Definition at line 2614 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _vector_tags

std::vector<VectorTag> SubProblem::_vector_tags
privateinherited

◆ _vector_tags_name_map

std::map<TagName, TagID> SubProblem::_vector_tags_name_map
privateinherited

Map of vector tag TagName to TagID.

Definition at line 1181 of file SubProblem.h.

Referenced by SubProblem::addVectorTag(), SubProblem::getVectorTagID(), and SubProblem::verifyVectorTags().

◆ _vector_zero

std::vector<VectorVariableValue> FEProblemBase::_vector_zero

Definition at line 2613 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _verbose_multiapps

bool FEProblemBase::_verbose_multiapps
protected

Whether or not to be verbose with multiapps.

Definition at line 3552 of file FEProblemBase.h.

Referenced by backupMultiApps(), execMultiApps(), execMultiAppTransfers(), finishMultiAppStep(), restoreMultiApps(), setVerboseProblem(), and verboseMultiApps().

◆ _verbose_restore

bool FEProblemBase::_verbose_restore
protected

Whether or not to be verbose on solution restoration post a failed time step.

Definition at line 3555 of file FEProblemBase.h.

Referenced by restoreSolutions(), and setVerboseProblem().

◆ _verbose_setup

MooseEnum FEProblemBase::_verbose_setup
protected

Whether or not to be verbose during setup.

Definition at line 3549 of file FEProblemBase.h.

Referenced by logAdd(), and setVerboseProblem().

◆ _xfem

std::shared_ptr<XFEMInterface> FEProblemBase::_xfem
protected

Pointer to XFEM controller.

Definition at line 3430 of file FEProblemBase.h.

Referenced by getXFEM(), haveXFEM(), initXFEM(), and updateMeshXFEM().

◆ _zero

std::vector<VariableValue> FEProblemBase::_zero

Definition at line 2603 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _zero_block_material_props

std::map<SubdomainID, std::set<MaterialPropertyName> > SubProblem::_zero_block_material_props
protectedinherited

Set of properties returned as zero properties.

Definition at line 1059 of file SubProblem.h.

Referenced by SubProblem::checkBlockMatProps(), checkDependMaterialsHelper(), and SubProblem::storeSubdomainZeroMatProp().

◆ _zero_boundary_material_props

std::map<BoundaryID, std::set<MaterialPropertyName> > SubProblem::_zero_boundary_material_props
protectedinherited

◆ app_param

const std::string MooseBase::app_param = "_moose_app"
staticinherited

◆ kokkos_object_param

const std::string MooseBase::kokkos_object_param = "_kokkos_object"
staticinherited

The name of the parameter that indicates an object is a Kokkos functor.

Definition at line 64 of file MooseBase.h.

Referenced by InputParameters::isKokkosObject().

◆ moose_base_param

const std::string MooseBase::moose_base_param = "_moose_base"
staticinherited

The name of the parameter that contains the moose system base.

Definition at line 61 of file MooseBase.h.

Referenced by InputParameters::getBase(), InputParameters::hasBase(), and InputParameters::registerBase().

◆ name_param

const std::string MooseBase::name_param = "_object_name"
staticinherited

◆ type_param

const std::string MooseBase::type_param = "_type"
staticinherited

◆ unique_name_param

const std::string MooseBase::unique_name_param = "_unique_name"
staticinherited

The name of the parameter that contains the unique object name.

Definition at line 57 of file MooseBase.h.

Referenced by InputParameterWarehouse::addInputParameters(), AppFactory::create(), InputParameterWarehouse::removeInputParameters(), MooseBase::uniqueName(), and MooseBase::validParams().

◆ usingCombinedWarningSolutionWarnings

MooseObject::usingCombinedWarningSolutionWarnings
inherited

Definition at line 67 of file MooseObject.h.


The documentation for this class was generated from the following files: