https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
FEProblem Class Referenceabstract

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

#include <FEProblem.h>

Inheritance diagram for FEProblem:
[legend]

Public Types

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

Public Member Functions

 FEProblem (const InputParameters &parameters)
 
virtual bool getUseNonlinear () const
 
virtual void setUseNonlinear (bool use_nonlinear)
 
virtual void setInputParametersFEProblem (InputParameters &parameters) override
 
virtual NonlinearSystemgetNonlinearSystem (const unsigned int nl_sys_num) override
 
virtual void addLineSearch (const InputParameters &parameters) override
 add a MOOSE line search More...
 
virtual void init () override
 
virtual libMesh::EquationSystemses () override
 
virtual MooseMeshmesh () override
 
virtual const MooseMeshmesh () const override
 
const MooseMeshmesh (bool use_displaced) const override
 
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. More...
 
Moose::CouplingType coupling () const
 
void setCouplingMatrix (std::unique_ptr< libMesh::CouplingMatrix > cm, const unsigned int nl_sys_num)
 Set custom coupling matrix. More...
 
void setCouplingMatrix (libMesh::CouplingMatrix *cm, const unsigned int nl_sys_num)
 
const libMesh::CouplingMatrixcouplingMatrix (const unsigned int nl_sys_num) const override
 The coupling matrix defining what blocks exist in the preconditioning matrix. More...
 
void setNonlocalCouplingMatrix ()
 Set custom coupling matrix for variables requiring nonlocal contribution. More...
 
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. More...
 
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. More...
 
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. More...
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & couplingEntries (const THREAD_ID tid, const unsigned int nl_sys_num)
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & nonlocalCouplingEntries (const THREAD_ID tid, const unsigned int nl_sys_num)
 
virtual bool hasVariable (const std::string &var_name) const override
 Whether or not this problem has the variable. More...
 
bool hasSolverVariable (const std::string &var_name) const
 
virtual const MooseVariableFieldBasegetVariable (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. More...
 
virtual const MooseVariableFieldBasegetVariable (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. More...
 
virtual MooseVariableFieldBasegetVariable (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 MooseVariableFieldBasegetVariable (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)
 
MooseVariableFieldBasegetActualFieldVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested MooseVariableField which may be in any system. More...
 
virtual MooseVariablegetStandardVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested MooseVariable which may be in any system. More...
 
virtual VectorMooseVariablegetVectorVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested VectorMooseVariable which may be in any system. More...
 
virtual ArrayMooseVariablegetArrayVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested ArrayMooseVariable which may be in any system. More...
 
virtual bool hasScalarVariable (const std::string &var_name) const override
 Returns a Boolean indicating whether any system contains a variable with the name provided. More...
 
virtual MooseVariableScalargetScalarVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the scalar variable reference from whichever system contains it. More...
 
virtual libMesh::SystemgetSystem (const std::string &var_name) override
 Returns the equation system containing the variable provided. More...
 
virtual void setActiveElementalMooseVariables (const std::set< MooseVariableFEBase *> &moose_vars, const THREAD_ID tid) override
 Set the MOOSE variables to be reinited on each element. More...
 
virtual void clearActiveElementalMooseVariables (const THREAD_ID tid) override
 Clear the active elemental MooseVariableFEBase. More...
 
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. More...
 
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 Assemblyassembly (const THREAD_ID tid, const unsigned int sys_num) override
 
virtual const Assemblyassembly (const THREAD_ID tid, const unsigned int sys_num) const override
 
virtual std::vector< VariableName > getVariableNames ()
 Returns a list of all the variables in the problem (both from the NL and Aux systems. More...
 
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 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 prepareFace (const Elem *elem, 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 addGhostedElem (dof_id_type elem_id) override
 Will make sure that all dofs connected to elem_id are ghosted to this processor. More...
 
virtual void addGhostedBoundary (BoundaryID boundary_id) override
 Will make sure that all necessary elements from boundary_id are ghosted to this processor. More...
 
virtual void ghostGhostedBoundaries () override
 Causes the boundaries added using addGhostedBoundary to actually be ghosted. More...
 
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. More...
 
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 reinitNodes (const std::vector< dof_id_type > &nodes, const THREAD_ID tid) override
 
virtual void reinitNodesNeighbor (const std::vector< dof_id_type > &nodes, 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 More...
 
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. More...
 
virtual void clearDiracInfo () override
 Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in. More...
 
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 solve (const unsigned int nl_sys_num)
 
virtual void solveLinearSystem (const unsigned int linear_sys_num, const Moose::PetscSupport::PetscOptions *po=nullptr)
 Build and solve a linear system. More...
 
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(). More...
 
virtual bool hasException ()
 Whether or not an exception has occurred. More...
 
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. More...
 
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. More...
 
virtual std::string solverTypeString (unsigned int solver_sys_num=0)
 Return solver type as a human readable string. More...
 
virtual bool startedInitialSetup ()
 Returns true if we are in or beyond the initialSetup stage. More...
 
virtual void onTimestepBegin () override
 
virtual void onTimestepEnd () override
 
virtual Realtime () const
 
virtual RealtimeOld () const
 
virtual inttimeStep () const
 
virtual Realdt () const
 
virtual RealdtOld () const
 
Real getTimeFromStateArg (const Moose::StateArg &state) const
 Returns the time associated with the requested state. More...
 
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 ()
 
virtual void advanceState ()
 Advance all of the state holding vectors / datastructures so that we can move to the next timestep. More...
 
virtual void restoreSolutions ()
 
virtual void saveOldSolutions ()
 Allocate vectors and save old solutions into them. More...
 
virtual void restoreOldSolutions ()
 Restore old solutions from the backup vectors and deallocate them. More...
 
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. More...
 
virtual void outputStep (ExecFlagType type)
 Output the current step. More...
 
virtual void postExecute ()
 Method called at the end of the simulation. More...
 
void forceOutput ()
 Indicates that the next call to outputStep should be forced. More...
 
virtual void initPetscOutputAndSomeSolverSettings ()
 Reinitialize PETSc output for proper linear/nonlinear iteration display. More...
 
Moose::PetscSupport::PetscOptionsgetPetscOptions ()
 Retrieve a writable reference the PETSc options (used by PetscSupport) More...
 
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. More...
 
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 FunctiongetFunction (const std::string &name, const THREAD_ID tid=0)
 
virtual void addMeshDivision (const std::string &type, const std::string &name, InputParameters &params)
 Add a MeshDivision. More...
 
MeshDivisiongetMeshDivision (const std::string &name, const THREAD_ID tid=0) const
 Get a MeshDivision. More...
 
virtual void addConvergence (const std::string &type, const std::string &name, InputParameters &parameters)
 Adds a Convergence object. More...
 
virtual ConvergencegetConvergence (const std::string &name, const THREAD_ID tid=0) const
 Gets a Convergence object. More...
 
virtual const std::vector< std::shared_ptr< Convergence > > & getConvergenceObjects (const THREAD_ID tid=0) const
 Gets the Convergence objects. More...
 
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. More...
 
bool needToAddDefaultNonlinearConvergence () const
 Returns true if the problem needs to add the default nonlinear convergence. More...
 
bool needToAddDefaultMultiAppFixedPointConvergence () const
 Returns true if the problem needs to add the default fixed point convergence. More...
 
bool needToAddDefaultSteadyStateConvergence () const
 Returns true if the problem needs to add the default steady-state detection convergence. More...
 
void setNeedToAddDefaultNonlinearConvergence ()
 Sets _need_to_add_default_nonlinear_convergence to true. More...
 
void setNeedToAddDefaultMultiAppFixedPointConvergence ()
 Sets _need_to_add_default_multiapp_fixed_point_convergence to true. More...
 
void setNeedToAddDefaultSteadyStateConvergence ()
 Sets _need_to_add_default_steady_state_convergence to true. More...
 
bool hasSetMultiAppFixedPointConvergenceName () const
 Returns true if the problem has set the fixed point convergence name. More...
 
bool hasSetSteadyStateConvergenceName () const
 Returns true if the problem has set the steady-state detection convergence name. More...
 
virtual void addDefaultNonlinearConvergence (const InputParameters &params)
 Adds the default nonlinear Convergence associated with the problem. More...
 
virtual bool onlyAllowDefaultNonlinearConvergence () const
 Returns true if an error will result if the user supplies 'nonlinear_convergence'. More...
 
void addDefaultMultiAppFixedPointConvergence (const InputParameters &params)
 Adds the default fixed point Convergence associated with the problem. More...
 
void addDefaultSteadyStateConvergence (const InputParameters &params)
 Adds the default steady-state detection Convergence. More...
 
virtual void lineSearch ()
 execute MOOSE line search More...
 
LineSearchgetLineSearch () override
 getter for the MOOSE line search More...
 
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. More...
 
virtual DistributiongetDistribution (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. More...
 
virtual SamplergetSampler (const std::string &name, const THREAD_ID tid=0)
 
NonlinearSystemBasegetNonlinearSystemBase (const unsigned int sys_num)
 
const NonlinearSystemBasegetNonlinearSystemBase (const unsigned int sys_num) const
 
void setCurrentNonlinearSystem (const unsigned int nl_sys_num)
 
NonlinearSystemBasecurrentNonlinearSystem ()
 
const NonlinearSystemBasecurrentNonlinearSystem () const
 
virtual const SystemBasesystemBaseNonlinear (const unsigned int sys_num) const override
 Return the nonlinear system object as a base class reference given the system number. More...
 
virtual SystemBasesystemBaseNonlinear (const unsigned int sys_num) override
 
virtual const SystemBasesystemBaseSolver (const unsigned int sys_num) const override
 Return the solver system object as a base class reference given the system number. More...
 
virtual SystemBasesystemBaseSolver (const unsigned int sys_num) override
 
virtual const SystemBasesystemBaseAuxiliary () const override
 Return the auxiliary system object as a base class reference. More...
 
virtual SystemBasesystemBaseAuxiliary () override
 
virtual const SystemBasegetSystemBase (const unsigned int sys_num) const
 Get constant reference to a system in this problem. More...
 
virtual SystemBasegetSystemBase (const unsigned int sys_num)
 Get non-constant reference to a system in this problem. More...
 
LinearSystemgetLinearSystem (unsigned int sys_num)
 Get non-constant reference to a linear system. More...
 
const LinearSystemgetLinearSystem (unsigned int sys_num) const
 Get a constant reference to a linear system. More...
 
SolverSystemgetSolverSystem (unsigned int sys_num)
 Get non-constant reference to a solver system. More...
 
const SolverSystemgetSolverSystem (unsigned int sys_num) const
 Get a constant reference to a solver system. More...
 
void setCurrentLinearSystem (unsigned int sys_num)
 Set the current linear system pointer. More...
 
LinearSystemcurrentLinearSystem ()
 Get a non-constant reference to the current linear system. More...
 
const LinearSystemcurrentLinearSystem () const
 Get a constant reference to the current linear system. More...
 
virtual const SystemBasesystemBaseLinear (unsigned int sys_num) const override
 Get a constant base class reference to a linear system. More...
 
virtual SystemBasesystemBaseLinear (unsigned int sys_num) override
 Get a non-constant base class reference to a linear system. More...
 
virtual void addVariable (const std::string &var_type, const std::string &var_name, InputParameters &params)
 Canonical method for adding a non-linear variable. More...
 
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 addConstraint (const std::string &c_name, const std::string &name, InputParameters &parameters)
 
virtual void addAuxVariable (const std::string &var_type, const std::string &var_name, InputParameters &params)
 Canonical method for adding an auxiliary variable. More...
 
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)
 
AuxiliarySystemgetAuxiliarySystem ()
 
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. More...
 
void projectSolution ()
 
unsigned short getCurrentICState ()
 Retrieves the current initial condition state. More...
 
void projectInitialConditionOnCustomRange (libMesh::ConstElemRange &elem_range, ConstBndNodeRange &bnd_node_range)
 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. More...
 
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)
 
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. More...
 
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 More...
 
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 More...
 
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 More...
 
void reinitMaterialsInterface (BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true)
 
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. More...
 
bool hasActiveMaterialProperties (const THREAD_ID tid) const
 Method to check whether or not a list of active material roperties has been set. More...
 
void clearActiveMaterialProperties (const THREAD_ID tid)
 Clear the active material properties. More...
 
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. More...
 
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. More...
 
const ReporterDatagetReporterData () const
 Provides const access the ReporterData object. More...
 
ReporterDatagetReporterData (ReporterData::WriteKey)
 Provides non-const access the ReporterData object that is used to store reporter values. More...
 
virtual std::vector< std::shared_ptr< UserObject > > addUserObject (const std::string &user_object_name, const std::string &name, InputParameters &parameters)
 
const ExecuteMooseObjectWarehouse< UserObject > & getUserObjects () const
 
template<class T >
T & getUserObject (const std::string &name, unsigned int tid=0) const
 Get the user object by its name. More...
 
const UserObjectgetUserObjectBase (const std::string &name, const THREAD_ID tid=0) const
 Get the user object by its name. More...
 
const PositionsgetPositionsObject (const std::string &name) const
 Get the Positions object by its name. More...
 
bool hasUserObject (const std::string &name) const
 Check if there if a user object of given name. More...
 
bool hasPostprocessorValueByName (const PostprocessorName &name) const
 Whether or not a Postprocessor value exists by a given name. More...
 
const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name, std::size_t t_index=0) const
 Get a read-only reference to the value associated with a Postprocessor that exists. More...
 
void setPostprocessorValueByName (const PostprocessorName &name, const PostprocessorValue &value, std::size_t t_index=0)
 Set the value of a PostprocessorValue. More...
 
bool hasPostprocessor (const std::string &name) const
 Deprecated. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (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. More...
 
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. More...
 
const VectorPostprocessorgetVectorPostprocessorObjectByName (const std::string &object_name, const THREAD_ID tid=0) const
 Return the VPP object given the name. More...
 
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. More...
 
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. More...
 
std::shared_ptr< MultiAppgetMultiApp (const std::string &multi_app_name) const
 Get a MultiApp object by name. More...
 
std::vector< std::shared_ptr< Transfer > > getTransfers (ExecFlagType type, Transfer::DIRECTION direction) const
 Get Transfers by ExecFlagType and direction. More...
 
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. More...
 
void execMultiAppTransfers (ExecFlagType type, Transfer::DIRECTION direction)
 Execute MultiAppTransfers associated with execution flag and direction. More...
 
bool execMultiApps (ExecFlagType type, bool auto_advance=true)
 Execute the MultiApps associated with the ExecFlagType. More...
 
void finalizeMultiApps ()
 
void incrementMultiAppTStep (ExecFlagType type)
 Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType. More...
 
void advanceMultiApps (ExecFlagType type)
 Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep depending on your purpose. More...
 
void finishMultiAppStep (ExecFlagType type, bool recurse_through_multiapp_levels=false)
 Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType. More...
 
void backupMultiApps (ExecFlagType type)
 Backup the MultiApps associated with the ExecFlagType. More...
 
void restoreMultiApps (ExecFlagType type, bool force=false)
 Restore the MultiApps associated with the ExecFlagType. More...
 
Real computeMultiAppsDT (ExecFlagType type)
 Find the smallest timestep over all MultiApps. More...
 
virtual void addTransfer (const std::string &transfer_name, const std::string &name, InputParameters &parameters)
 Add a Transfer to the problem. More...
 
void execTransfers (ExecFlagType type)
 Execute the Transfers associated with the ExecFlagType. More...
 
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. More...
 
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. More...
 
virtual Real computeResidualL2Norm ()
 Computes the residual using whatever is sitting in the current solution vector then returns the L2 norm. More...
 
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. More...
 
void computeResidual (libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual)
 This function is called by Libmesh to form a residual. More...
 
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). More...
 
void computeResidualAndJacobian (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, libMesh::SparseMatrix< libMesh::Number > &jacobian)
 Form a residual and Jacobian with default tags. More...
 
virtual void computeResidualTag (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, TagID tag)
 Form a residual vector for a given tag. More...
 
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. More...
 
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. More...
 
virtual void computeResidualTags (const std::set< TagID > &tags)
 Form multiple residual vectors and each is associated with one tag. More...
 
virtual void computeJacobianSys (libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian)
 Form a Jacobian matrix. More...
 
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). More...
 
virtual void computeJacobianTag (const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, TagID tag)
 Form a Jacobian matrix for a given tag. More...
 
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. More...
 
virtual void computeJacobianTags (const std::set< TagID > &tags)
 Form multiple matrices, and each is associated with a tag. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual bool updateSolution (NumericVector< libMesh::Number > &vec_solution, NumericVector< libMesh::Number > &ghosted_solution)
 Update the solution. More...
 
virtual void predictorCleanup (NumericVector< libMesh::Number > &ghosted_solution)
 Perform cleanup tasks after application of predictor to solution vector. More...
 
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. More...
 
virtual void setResidual (NumericVector< libMesh::Number > &residual, const THREAD_ID tid) override
 
virtual void setResidual (libMesh::NumericVector< libMesh::Number > &residual, const THREAD_ID tid)=0
 
virtual void setResidualNeighbor (NumericVector< libMesh::Number > &residual, const THREAD_ID tid) override
 
virtual void setResidualNeighbor (libMesh::NumericVector< libMesh::Number > &residual, const THREAD_ID tid)=0
 
virtual void addJacobian (const THREAD_ID tid) override
 
virtual void addJacobianNeighbor (const THREAD_ID tid) override
 
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 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
 
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 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 DisplacedProblemgetDisplacedProblem () const
 
virtual std::shared_ptr< DisplacedProblemgetDisplacedProblem ()
 
virtual void updateGeomSearch (GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
 
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 std::unordered_map< std::pair< BoundaryID, BoundaryID >, AutomaticMortarGeneration > & getMortarInterfaces (bool on_displaced) const
 
virtual void possiblyRebuildGeomSearchPatches ()
 
virtual GeometricSearchDatageomSearchData () override
 
void setRestartFile (const std::string &file_name)
 Communicate to the Resurector the name of the restart filer. More...
 
const MaterialPropertyRegistrygetMaterialPropertyRegistry () const
 
const InitialConditionWarehousegetInitialConditionWarehouse () const
 Return InitialCondition storage. More...
 
const FVInitialConditionWarehousegetFVInitialConditionWarehouse () const
 Return FVInitialCondition storage. More...
 
SolverParamssolverParams (unsigned int solver_sys_num=0)
 Get the solver parameters. More...
 
const SolverParamssolverParams (unsigned int solver_sys_num=0) const
 const version More...
 
Adaptivityadaptivity ()
 
virtual void initialAdaptMesh ()
 
virtual bool adaptMesh ()
 
unsigned int getNumCyclesCompleted ()
 
bool hasInitialAdaptivity () const
 Return a Boolean indicating whether initial AMR is turned on. More...
 
bool hasInitialAdaptivity () const
 Return a Boolean indicating whether initial AMR is turned on. More...
 
void initXFEM (std::shared_ptr< XFEMInterface > xfem)
 Create XFEM controller object. More...
 
std::shared_ptr< XFEMInterfacegetXFEM ()
 Get a pointer to the XFEM controller object. More...
 
bool haveXFEM ()
 Find out whether the current analysis is using XFEM. More...
 
virtual bool updateMeshXFEM ()
 Update the mesh due to changing XFEM cuts. More...
 
virtual void meshChanged (bool intermediate_change, bool contract_mesh, bool clean_refinement_flags)
 Update data after a mesh change. More...
 
void notifyWhenMeshChanges (MeshChangedInterface *mci)
 Register an object that derives from MeshChangedInterface to be notified when the mesh changes. More...
 
void notifyWhenMeshDisplaces (MeshDisplacedInterface *mdi)
 Register an object that derives from MeshDisplacedInterface to be notified when the displaced mesh gets updated. More...
 
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. More...
 
virtual void checkProblemIntegrity ()
 Method called to perform a series of sanity checks before a simulation is run. More...
 
void registerRandomInterface (RandomInterface &random_interface, const std::string &name)
 
void setConstJacobian (bool state)
 Set flag that Jacobian is constant (for optimization purposes) More...
 
void setKernelCoverageCheck (CoverageCheckMode mode)
 Set flag to indicate whether kernel coverage checks should be performed. More...
 
void setKernelCoverageCheck (bool flag)
 Set flag to indicate whether kernel coverage checks should be performed. More...
 
void setMaterialCoverageCheck (CoverageCheckMode mode)
 Set flag to indicate whether material coverage checks should be performed. More...
 
void setMaterialCoverageCheck (bool flag)
 Set flag to indicate whether material coverage checks should be performed. More...
 
void setParallelBarrierMessaging (bool flag)
 Toggle parallel barrier messaging (defaults to on). More...
 
void setVerboseProblem (bool verbose)
 Make the problem be verbose. More...
 
bool verboseMultiApps () const
 Whether or not to use verbose printing for MultiApps. More...
 
void parentOutputPositionChanged ()
 Calls parentOutputPositionChanged() on all sub apps. More...
 
unsigned int subspaceDim (const std::string &prefix) const
 Dimension of the subspace spanned by vectors with a given prefix. More...
 
const MaterialWarehousegetMaterialWarehouse () const
 
const MaterialWarehousegetRegularMaterialsWarehouse () const
 
const MaterialWarehousegetDiscreteMaterialWarehouse () const
 
const MaterialWarehousegetInterfaceMaterialsWarehouse () const
 
std::shared_ptr< MaterialBasegetMaterial (std::string name, Moose::MaterialDataType type, const THREAD_ID tid=0, bool no_warn=false)
 Return a pointer to a MaterialBase object. More...
 
MaterialDatagetMaterialData (Moose::MaterialDataType type, const THREAD_ID tid=0) 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. More...
 
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. More...
 
void setPreserveMatrixSparsityPattern (bool preserve)
 Set whether the sparsity pattern of the matrices being formed during the solve (usually the Jacobian) should be preserved. More...
 
bool ignoreZerosInJacobian () const
 Will return true if zeros in the Jacobian are to be dropped from the sparsity pattern. More...
 
void setIgnoreZerosInJacobian (bool state)
 Set whether the zeros in the Jacobian should be dropped from the sparsity pattern. More...
 
bool acceptInvalidSolution () const
 Whether or not to accept the solution based on its invalidity. More...
 
bool allowInvalidSolution () const
 Whether to accept / allow an invalid solution. More...
 
bool showInvalidSolutionConsole () const
 Whether or not to print out the invalid solutions summary table in console. More...
 
bool immediatelyPrintInvalidSolution () const
 Whether or not the solution invalid warnings are printed out immediately. More...
 
bool hasTimeIntegrator () const
 Returns whether or not this Problem has a TimeIntegrator. More...
 
virtual void execute (const ExecFlagType &exec_type)
 Convenience function for performing execution of MOOSE systems. More...
 
virtual void executeAllObjects (const ExecFlagType &exec_type)
 
virtual ExecutorgetExecutor (const std::string &name)
 
virtual void computeUserObjects (const ExecFlagType &type, const Moose::AuxGroup &group)
 Call compute methods on UserObjects. More...
 
virtual void computeUserObjectByName (const ExecFlagType &type, const Moose::AuxGroup &group, const std::string &name)
 Compute an user object with the given name. More...
 
void needsPreviousNewtonIteration (bool state)
 Set a flag that indicated that user required values for the previous Newton iterate. More...
 
bool needsPreviousNewtonIteration () const
 Check to see whether we need to compute the variable values of the previous Newton iterate. More...
 
ExecuteMooseObjectWarehouse< Control > & getControlWarehouse ()
 Reference to the control logic warehouse. More...
 
void executeControls (const ExecFlagType &exec_type)
 Performs setup and execute calls for Control objects. More...
 
void executeSamplers (const ExecFlagType &exec_type)
 Performs setup and execute calls for Sampler objects. More...
 
virtual void updateActiveObjects ()
 Update the active objects in the warehouses. More...
 
void reportMooseObjectDependency (MooseObject *a, MooseObject *b)
 Register a MOOSE object dependency so we can either order operations properly or report when we cannot. More...
 
ExecuteMooseObjectWarehouse< MultiApp > & getMultiAppWarehouse ()
 
bool hasJacobian () const
 Returns _has_jacobian. More...
 
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) More...
 
void addOutput (const std::string &, const std::string &, InputParameters &)
 Adds an Output object. More...
 
TheWarehousetheWarehouse () const
 
void setSNESMFReuseBase (bool reuse, bool set_by_user)
 If or not to reuse the base vector for matrix-free calculation. More...
 
bool useSNESMFReuseBase ()
 Return a flag that indicates if we are reusing the vector base. More...
 
void skipExceptionCheck (bool skip_exception_check)
 Set a flag that indicates if we want to skip exception and stop solve. More...
 
bool isSNESMFReuseBaseSetbyUser ()
 Return a flag to indicate if _snesmf_reuse_base is set by users. More...
 
bool & petscOptionsInserted ()
 If PETSc options are already inserted. More...
 
PetscOptions & petscOptionsDatabase ()
 
virtual void setUDotRequested (const bool u_dot_requested)
 Set boolean flag to true to store solution time derivative. More...
 
virtual void setUDotDotRequested (const bool u_dotdot_requested)
 Set boolean flag to true to store solution second time derivative. More...
 
virtual void setUDotOldRequested (const bool u_dot_old_requested)
 Set boolean flag to true to store old solution time derivative. More...
 
virtual void setUDotDotOldRequested (const bool u_dotdot_old_requested)
 Set boolean flag to true to store old solution second time derivative. More...
 
virtual bool uDotRequested ()
 Get boolean flag to check whether solution time derivative needs to be stored. More...
 
virtual bool uDotDotRequested ()
 Get boolean flag to check whether solution second time derivative needs to be stored. More...
 
virtual bool uDotOldRequested ()
 Get boolean flag to check whether old solution time derivative needs to be stored. More...
 
virtual bool uDotDotOldRequested ()
 Get boolean flag to check whether old solution second time derivative needs to be stored. More...
 
void haveADObjects (bool have_ad_objects) override
 Method for setting whether we have any ad objects. More...
 
virtual void haveADObjects (bool have_ad_objects)
 Method for setting whether we have any ad objects. More...
 
bool haveADObjects () const
 Method for reading wehther we have any ad objects. More...
 
bool haveADObjects () const
 Method for reading wehther we have any ad objects. More...
 
bool shouldSolve () const
 
const MortarDatamortarData () const
 Returns the mortar data object. More...
 
MortarDatamortarData ()
 
virtual bool hasNeighborCoupling () const
 Whether the simulation has neighbor coupling. More...
 
virtual bool hasMortarCoupling () const
 Whether the simulation has mortar coupling. More...
 
void computingNonlinearResid (bool computing_nonlinear_residual) final
 Set whether or not the problem is in the process of computing the nonlinear residual. More...
 
bool computingNonlinearResid () const
 Returns true if the problem is in the process of computing the nonlinear residual. More...
 
virtual void computingNonlinearResid (const bool computing_nonlinear_residual)
 Set whether or not the problem is in the process of computing the nonlinear residual. More...
 
bool computingNonlinearResid () const
 Returns true if the problem is in the process of computing the nonlinear residual. More...
 
void setCurrentlyComputingResidual (bool currently_computing_residual) final
 Set whether or not the problem is in the process of computing the residual. More...
 
void numGridSteps (unsigned int num_grid_steps)
 Set the number of steps in a grid sequences. More...
 
void uniformRefine ()
 uniformly refine the problem mesh(es). More...
 
void automaticScaling (bool automatic_scaling) override
 Automatic scaling setter. More...
 
virtual void automaticScaling (bool automatic_scaling)
 Automatic scaling setter. More...
 
bool automaticScaling () const
 Automatic scaling getter. More...
 
bool automaticScaling () const
 Automatic scaling getter. More...
 
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. More...
 
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. More...
 
bool fvBCsIntegrityCheck () 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. More...
 
void resizeMaterialData (Moose::MaterialDataType data_type, unsigned int nqp, const THREAD_ID tid)
 Resize material data. More...
 
bool haveDisplaced () const override final
 Whether we have a displaced problem in our simulation. More...
 
bool hasLinearConvergenceObjects () const
 Whether we have linear convergence objects. More...
 
void setNonlinearConvergenceNames (const std::vector< ConvergenceName > &convergence_names)
 Sets the nonlinear convergence object name(s) if there is one. More...
 
void setLinearConvergenceNames (const std::vector< ConvergenceName > &convergence_names)
 Sets the linear convergence object name(s) if there is one. More...
 
void setMultiAppFixedPointConvergenceName (const ConvergenceName &convergence_name)
 Sets the MultiApp fixed point convergence object name if there is one. More...
 
void setSteadyStateConvergenceName (const ConvergenceName &convergence_name)
 Sets the steady-state detection convergence object name if there is one. More...
 
const std::vector< ConvergenceName > & getNonlinearConvergenceNames () const
 Gets the nonlinear system convergence object name(s). More...
 
const std::vector< ConvergenceName > & getLinearConvergenceNames () const
 Gets the linear convergence object name(s). More...
 
const ConvergenceName & getMultiAppFixedPointConvergenceName () const
 Gets the MultiApp fixed point convergence object name. More...
 
const ConvergenceName & getSteadyStateConvergenceName () const
 Gets the steady-state detection convergence object name. More...
 
void computingScalingJacobian (bool computing_scaling_jacobian)
 Setter for whether we're computing the scaling jacobian. More...
 
bool computingScalingJacobian () const override final
 Getter for whether we're computing the scaling jacobian. More...
 
void computingScalingResidual (bool computing_scaling_residual)
 Setter for whether we're computing the scaling residual. More...
 
bool computingScalingResidual () const override final
 
MooseAppCoordTransformcoordTransform ()
 
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. More...
 
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) More...
 
bool getFailNextSystemConvergenceCheck () const
 Whether it will fail the next system convergence check(s), triggering failed step behavior. More...
 
void setFailNextNonlinearConvergenceCheck ()
 Skip further residual evaluations and fail the next nonlinear convergence check(s) More...
 
void setFailNextSystemConvergenceCheck ()
 Tell the problem that the system(s) cannot be considered converged next time convergence is checked. More...
 
void resetFailNextNonlinearConvergenceCheck ()
 Tell the problem that the nonlinear convergence check(s) may proceed as normal. More...
 
void resetFailNextSystemConvergenceCheck ()
 Tell the problem that the system convergence check(s) may proceed as normal. More...
 
void setExecutionPrinting (const ExecFlagEnum &print_exec)
 
bool shouldPrintExecution (const THREAD_ID tid) const
 Check whether the problem should output execution orders at this time. More...
 
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. More...
 
virtual const std::vector< VectorTag > & currentResidualVectorTags () const override
 Return the residual vector tags we are currently computing. More...
 
void setCurrentResidualVectorTags (const std::set< TagID > &vector_tags)
 Set the current residual vector tag data structure based on the passed in tag IDs. More...
 
void clearCurrentResidualVectorTags ()
 Clear the current residual vector tag data structure. More...
 
void clearCurrentJacobianMatrixTags ()
 Clear the current Jacobian matrix tag data structure ... More...
 
virtual void needFV () override
 marks this problem as including/needing finite volume functionality. More...
 
virtual bool haveFV () const override
 returns true if this problem includes/needs finite volume functionality. More...
 
virtual bool hasNonlocalCoupling () const override
 Whether the simulation has active nonlocal coupling which should be accounted for in the Jacobian. More...
 
bool identifyVariableGroupsInNL () const
 Whether to identify variable groups in nonlinear systems. More...
 
virtual void setCurrentLowerDElem (const Elem *const lower_d_elem, const THREAD_ID tid) override
 Set the current lower dimensional element. More...
 
virtual void setCurrentBoundaryID (BoundaryID bid, const THREAD_ID tid) override
 sets the current boundary ID in assembly More...
 
const std::vector< NonlinearSystemName > & getNonlinearSystemNames () const
 
const std::vector< LinearSystemName > & getLinearSystemNames () const
 
const std::vector< SolverSystemName > & getSolverSystemNames () const
 
virtual const libMesh::CouplingMatrixnonlocalCouplingMatrix (const unsigned i) const override
 
virtual bool checkNonlocalCouplingRequirement () const override
 
virtual Moose::FEBackend feBackend () const
 
const bool & currentlyComputingResidual () const
 Returns true if the problem is in the process of computing the residual. More...
 
const bool & currentlyComputingResidual () const
 Returns true if the problem is in the process of computing the residual. More...
 
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. More...
 
bool defaultGhosting ()
 Whether or not the user has requested default ghosting ot be on. More...
 
virtual TagID addVectorTag (const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
 Create a Tag. More...
 
void addNotZeroedVectorTag (const TagID tag)
 Adds a vector tag to the list of vectors that will not be zeroed when other tagged vectors are. More...
 
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. More...
 
virtual const VectorTaggetVectorTag (const TagID tag_id) const
 Get a VectorTag from a TagID. More...
 
std::vector< VectorTaggetVectorTags (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. More...
 
virtual TagID getVectorTagID (const TagName &tag_name) const
 Get a TagID from a TagName. More...
 
virtual TagName vectorTagName (const TagID tag) const
 Retrieve the name associated with a TagID. More...
 
virtual bool vectorTagExists (const TagID tag_id) const
 Check to see if a particular Tag exists. More...
 
virtual bool vectorTagExists (const TagName &tag_name) const
 Check to see if a particular Tag exists by using Tag name. More...
 
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. More...
 
virtual Moose::VectorTagType vectorTagType (const TagID tag_id) const
 
virtual TagID addMatrixTag (TagName tag_name)
 Create a Tag. More...
 
virtual TagID getMatrixTagID (const TagName &tag_name) const
 Get a TagID from a TagName. More...
 
virtual TagName matrixTagName (TagID tag)
 Retrieve the name associated with a TagID. More...
 
virtual bool matrixTagExists (const TagName &tag_name) const
 Check to see if a particular Tag exists. More...
 
virtual bool matrixTagExists (TagID tag_id) const
 Check to see if a particular Tag exists. More...
 
virtual unsigned int numMatrixTags () const
 The total number of tags. More...
 
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. More...
 
virtual bool hasLinearVariable (const std::string &var_name) const
 Whether or not this problem has this linear variable. More...
 
virtual bool hasAuxiliaryVariable (const std::string &var_name) const
 Whether or not this problem has this auxiliary variable. More...
 
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables (const THREAD_ID tid) const
 Get the MOOSE variables to be reinited on each element. More...
 
virtual bool hasActiveElementalMooseVariables (const THREAD_ID tid) const
 Whether or not a list of active elemental moose variables has been set. More...
 
Moose::CoordinateSystemType getCoordSystem (SubdomainID sid) const
 
unsigned int getAxisymmetricRadialCoord () const
 Returns the desired radial direction for RZ coordinate transformation. More...
 
virtual DiracKernelInfodiracKernelInfo ()
 
void reinitNeighborLowerDElem (const Elem *elem, const THREAD_ID tid=0)
 reinitialize a neighboring lower dimensional element More...
 
void reinitMortarElem (const Elem *elem, const THREAD_ID tid=0)
 Reinit a mortar element to obtain a valid JxW. More...
 
virtual void storeSubdomainMatPropName (SubdomainID block_id, const std::string &name)
 Adds the given material property to a storage map based on block ids. More...
 
virtual void storeBoundaryMatPropName (BoundaryID boundary_id, const std::string &name)
 Adds the given material property to a storage map based on boundary ids. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void checkBlockMatProps ()
 Checks block material properties integrity. More...
 
virtual void checkBoundaryMatProps ()
 Checks boundary material properties integrity. More...
 
virtual void markMatPropRequested (const std::string &)
 Helper method for adding a material property name to the _material_property_requested set. More...
 
virtual bool isMatPropRequested (const std::string &prop_name) const
 Find out if a material property has been requested by any object. More...
 
void addConsumedPropertyName (const MooseObjectName &obj_name, const std::string &prop_name)
 Helper for tracking the object that is consuming a property for MaterialPropertyDebugOutput. More...
 
const std::map< MooseObjectName, std::set< std::string > > & getConsumedPropertyMap () const
 Return the map that tracks the object with consumed material properties. More...
 
virtual std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &prop_name)
 Get a vector containing the block ids the material property is defined on. More...
 
virtual std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &prop_name)
 Get a vector of block id equivalences that the material property is defined on. More...
 
virtual bool hasBlockMaterialProperty (SubdomainID block_id, const std::string &prop_name)
 Check if a material property is defined on a block. More...
 
virtual std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &prop_name)
 Get a vector containing the block ids the material property is defined on. More...
 
virtual std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &prop_name)
 Get a vector of block id equivalences that the material property is defined on. More...
 
virtual bool hasBoundaryMaterialProperty (BoundaryID boundary_id, const std::string &prop_name)
 Check if a material property is defined on a block. More...
 
virtual std::set< dof_id_type > & ghostedElems ()
 Return the list of elements that should have their DoFs ghosted to this processor. More...
 
const bool & currentlyComputingJacobian () const
 Returns true if the problem is in the process of computing the Jacobian. More...
 
void setCurrentlyComputingJacobian (const bool currently_computing_jacobian)
 Set whether or not the problem is in the process of computing the Jacobian. More...
 
const bool & currentlyComputingResidualAndJacobian () const
 Returns true if the problem is in the process of computing the residual and the Jacobian. More...
 
void setCurrentlyComputingResidualAndJacobian (bool currently_computing_residual_and_jacobian)
 Set whether or not the problem is in the process of computing the Jacobian. More...
 
virtual bool safeAccessTaggedMatrices () const
 Is it safe to access the tagged matrices. More...
 
virtual bool safeAccessTaggedVectors () const
 Is it safe to access the tagged vectors. More...
 
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. More...
 
void addCouplingGhostingFunctor (libMesh::GhostingFunctor &coupling_gf, bool to_mesh=true)
 Add a coupling functor to this problem's DofMaps. More...
 
void removeAlgebraicGhostingFunctor (libMesh::GhostingFunctor &algebraic_gf)
 Remove an algebraic ghosting functor from this problem's DofMaps. More...
 
void removeCouplingGhostingFunctor (libMesh::GhostingFunctor &coupling_gf)
 Remove a coupling ghosting functor from this problem's DofMaps. More...
 
void hasScalingVector (const unsigned int nl_sys_num)
 Tells this problem that the assembly associated with the given nonlinear system number involves a scaling vector. More...
 
void clearAllDofIndices ()
 Clear dof indices from variables in nl and aux systems. More...
 
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 More...
 
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 More...
 
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 More...
 
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. More...
 
void setFunctorOutput (bool set_output)
 Setter for debug functor output. More...
 
template<typename T >
void registerUnfilledFunctorRequest (T *functor_interface, const std::string &functor_name, const THREAD_ID tid)
 Register an unfulfilled functor request. More...
 
void reinitFVFace (const THREAD_ID tid, const FaceInfo &fi)
 reinitialize the finite volume assembly data for the provided face and thread More...
 
void preparePRefinement ()
 Prepare DofMap and Assembly classes with our p-refinement information. More...
 
bool doingPRefinement () const
 
bool havePRefinement () const
 Query whether p-refinement has been requested at any point during the simulation. More...
 
template<typename T >
MooseVariableFEBasegetVariableHelper (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. More...
 
virtual void terminateSolve ()
 Allow objects to request clean termination of the solve. More...
 
virtual bool isSolveTerminationRequested () const
 Check of termination has been requested. More...
 
const ConsoleStreamconsole () const
 Return console handle. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 Get another shared pointer to this object that has the same ownership group. More...
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 Get the MooseApp this class is associated with. More...
 
const std::string & type () const
 Get the type of this class. More...
 
virtual const std::string & name () const
 Get the name of the class. More...
 
std::string typeAndName () const
 Get the class's combined type and name; useful in error handling. More...
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 Calls moose error with the message msg. More...
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 The unique parameter name of a valid parameter of this object for accessing parameter controls. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
MooseObjectName uniqueName () const
 The unique name for accessing input parameters of this object in the InputParameterWarehouse. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
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. More...
 
template<typename T >
const T * queryParam (const std::string &name) const
 Query a parameter for the object. More...
 
template<typename T >
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 Retrieve a renamed parameter for the object. More...
 
template<typename 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. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
bool isParamSetByUser (const std::string &nm) const
 Test if the supplied parameter is set by a user, as opposed to not set or set to default. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 Emits an error prefixed with object name and type. More...
 
template<typename... Args>
void mooseErrorNonPrefixed (Args &&... args) const
 Emits an error without the prefixing included in mooseError(). More...
 
template<typename... Args>
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 Emits a documented error with object name and type. More...
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 Emits a warning prefixed with object name and type. More...
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 Emits a warning without the prefixing included in mooseWarning(). More...
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
const Parallel::Communicatorcomm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
std::string getDataFileName (const std::string &param) const
 Deprecated method. More...
 
std::string getDataFileNameByName (const std::string &relative_path) const
 Deprecated method. More...
 
std::string getDataFilePath (const std::string &relative_path) const
 Returns the path of a data file for a given relative file path. More...
 
PerfGraphperfGraph ()
 Get the PerfGraph. More...
 
const libMesh::ConstElemRangegetEvaluableElementRange ()
 In general, {evaluable elements} >= {local elements} U {algebraic ghosting elements}. More...
 
const libMesh::ConstElemRangegetNonlinearEvaluableElementRange ()
 
const libMesh::ConstElemRangegetCurrentAlgebraicElementRange ()
 These are the element and nodes that contribute to the jacobian and residual for this local processor. More...
 
const libMesh::ConstNodeRangegetCurrentAlgebraicNodeRange ()
 
const ConstBndNodeRangegetCurrentAlgebraicBndNodeRange ()
 
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. More...
 
void setCurrentAlgebraicNodeRange (libMesh::ConstNodeRange *range)
 
void setCurrentAlgebraicBndNodeRange (ConstBndNodeRange *range)
 
void allowOutput (bool state)
 Ability to enable/disable all output calls. More...
 
template<typename T >
void allowOutput (bool state)
 
bool hasMultiApps () const
 Returns whether or not the current simulation has any multiapps. More...
 
bool hasMultiApps (ExecFlagType type) const
 
bool hasMultiApp (const std::string &name) const
 
const AutomaticMortarGenerationgetMortarInterface (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. More...
 
AutomaticMortarGenerationgetMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced)
 
const MaterialPropertyStoragegetMaterialPropertyStorage ()
 Return a reference to the material property storage. More...
 
const MaterialPropertyStoragegetBndMaterialPropertyStorage ()
 
const MaterialPropertyStoragegetNeighborMaterialPropertyStorage ()
 
const MooseObjectWarehouse< Indicator > & getIndicatorWarehouse ()
 Return indicator/marker storage. More...
 
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. More...
 
bool needInterfaceMaterialOnSide (BoundaryID bnd_id, const THREAD_ID tid)
 
bool needSubdomainMaterialOnSide (SubdomainID subdomain_id, const THREAD_ID tid)
 
const ExecFlagTypegetCurrentExecuteOnFlag () const
 Return/set the current execution flag. More...
 
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. More...
 
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. More...
 
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. More...
 
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
 
const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 
std::vector< Real_real_zero
 Convenience zeros. More...
 
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
 

Protected Member Functions

virtual void meshChanged ()
 Deprecated. More...
 
void createTagVectors ()
 Create extra tagged vectors and matrices. More...
 
void createTagSolutions ()
 Create extra tagged solution vectors. More...
 
virtual void meshDisplaced ()
 Update data after a mesh displaced. More...
 
void computeSystems (const ExecFlagType &type)
 Do generic system computations. More...
 
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. More...
 
void computeUserObjectsInternal (const ExecFlagType &type, const Moose::AuxGroup &group, TheWarehouse::Query &query)
 
void checkDisplacementOrders ()
 Verify that SECOND order mesh uses SECOND order displacements. More...
 
void checkUserObjects ()
 
void checkDependMaterialsHelper (const std::map< SubdomainID, std::vector< std::shared_ptr< MaterialBase >>> &materials_map)
 Helper method for checking Material object dependency. More...
 
void checkCoordinateSystems ()
 Verify that there are no element type/coordinate type conflicts. More...
 
void reinitBecauseOfGhostingOrNewGeomObjects (bool mortar_changed=false)
 Call when it is possible that the needs for ghosted elements has changed. More...
 
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(). More...
 
template<typename T >
MooseVariableFieldBasegetVariableHelper (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. More...
 
bool verifyVectorTags () const
 Verify the integrity of _vector_tags and _typed_vector_tags. More...
 
void markFamilyPRefinement (const InputParameters &params)
 Mark a variable family for either disabling or enabling p-refinement with valid parameters of a variable. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 Call to register a named section for timing. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<typename T , typename... Args>
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 Declare a piece of data as "recoverable" and initialize it. More...
 
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". More...
 
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". More...
 
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. More...
 

Protected Attributes

bool _use_nonlinear
 
std::vector< std::shared_ptr< NonlinearSystem > > _nl_sys
 
MooseMesh_mesh
 
bool _initialized
 
std::optional< std::vector< ConvergenceName > > _nonlinear_convergence_names
 Nonlinear system(s) convergence name(s) More...
 
std::optional< std::vector< ConvergenceName > > _linear_convergence_names
 Linear system(s) convergence name(s) (if any) More...
 
std::optional< ConvergenceName > _multiapp_fixed_point_convergence_name
 MultiApp fixed point convergence name. More...
 
std::optional< ConvergenceName > _steady_state_convergence_name
 Steady-state detection convergence name. More...
 
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. More...
 
std::set< TagID_linear_matrix_tags
 Temporary storage for filtered matrix tags for linear systems. More...
 
const bool & _solve
 Whether or not to actually solve the nonlinear system. More...
 
bool _transient
 
Real_time
 
Real_time_old
 
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. More...
 
bool _need_to_add_default_multiapp_fixed_point_convergence
 Flag that the problem needs to add the default fixed point convergence. More...
 
bool _need_to_add_default_steady_state_convergence
 Flag that the problem needs to add the default steady convergence. More...
 
const std::vector< LinearSystemName > _linear_sys_names
 The linear system names. More...
 
const std::size_t _num_linear_sys
 The number of linear systems. More...
 
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
 The vector of linear systems. More...
 
std::map< LinearSystemName, unsigned int_linear_sys_name_to_num
 Map from linear system name to number. More...
 
LinearSystem_current_linear_sys
 The current linear system that we are solving. More...
 
const bool _using_default_nl
 Boolean to check if we have the default nonlinear system. More...
 
const std::vector< NonlinearSystemName > _nl_sys_names
 The nonlinear system names. More...
 
const std::size_t _num_nl_sys
 The number of nonlinear systems. More...
 
std::map< NonlinearSystemName, unsigned int_nl_sys_name_to_num
 Map from nonlinear system name to number. More...
 
NonlinearSystemBase_current_nl_sys
 The current nonlinear system that we are solving. More...
 
SolverSystem_current_solver_sys
 The current solver system. More...
 
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
 Combined container to base pointer of every solver system. More...
 
std::map< SolverVariableName, unsigned int_solver_var_to_sys_num
 Map connecting variable names with their respective solver systems. More...
 
std::map< SolverSystemName, unsigned int_solver_sys_name_to_num
 Map connecting solver system names with their respective systems. More...
 
std::vector< SolverSystemName > _solver_sys_names
 The union of nonlinear and linear system names. More...
 
std::shared_ptr< AuxiliarySystem_aux
 The auxiliary system. More...
 
Moose::CouplingType _coupling
 Type of variable coupling. More...
 
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
 Coupling matrix for variables. More...
 
std::map< std::string, unsigned int_subspace_dim
 Dimension of the subspace spanned by the vectors with a given prefix. More...
 
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
 The Assembly objects. More...
 
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. More...
 
MooseObjectWarehouse< Function_functions
 functions More...
 
MooseObjectWarehouse< Convergence_convergences
 convergence warehouse More...
 
MooseObjectWarehouse< KernelBase_nonlocal_kernels
 nonlocal kernels More...
 
MooseObjectWarehouse< IntegratedBCBase_nonlocal_integrated_bcs
 nonlocal integrated_bcs More...
 
MaterialPropertyRegistry _material_prop_registry
 
MaterialPropertyStorage_material_props
 
MaterialPropertyStorage_bnd_material_props
 
MaterialPropertyStorage_neighbor_material_props
 
MooseObjectWarehouse< Marker_markers
 
ReporterData _reporter_data
 
ExecuteMooseObjectWarehouse< UserObject_all_user_objects
 
ExecuteMooseObjectWarehouse< MultiApp_multi_apps
 MultiApp Warehouse. More...
 
ExecuteMooseObjectWarehouse< TransientMultiApp_transient_multi_apps
 Storage for TransientMultiApps (only needed for calling 'computeDT') More...
 
ExecuteMooseObjectWarehouse< Transfer_transfers
 Normal Transfers. More...
 
ExecuteMooseObjectWarehouse< Transfer_to_multi_app_transfers
 Transfers executed just before MultiApps to transfer data to them. More...
 
ExecuteMooseObjectWarehouse< Transfer_from_multi_app_transfers
 Transfers executed just after MultiApps to transfer data from them. More...
 
ExecuteMooseObjectWarehouse< Transfer_between_multi_app_transfers
 Transfers executed just before MultiApps to transfer data between them. More...
 
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
 A map of objects that consume random numbers. More...
 
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
 Cache for calculating materials on side. More...
 
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
 Cache for calculating materials on side. More...
 
std::vector< std::unordered_map< BoundaryID, bool > > _interface_mat_side_cache
 Cache for calculating materials on interface. More...
 
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
 Objects to be notified when the mesh changes. More...
 
std::vector< MeshDisplacedInterface * > _notify_when_mesh_displaces
 Objects to be notified when the mesh displaces. More...
 
Adaptivity _adaptivity
 
unsigned int _cycles_completed
 
std::shared_ptr< XFEMInterface_xfem
 Pointer to XFEM controller. More...
 
MooseMesh_displaced_mesh
 
std::shared_ptr< DisplacedProblem_displaced_problem
 
GeometricSearchData _geometric_search_data
 
MortarData _mortar_data
 
bool _reinit_displaced_elem
 Whether to call DisplacedProblem::reinitElem when this->reinitElem is called. More...
 
bool _reinit_displaced_face
 Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called. More...
 
bool _reinit_displaced_neighbor
 Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called. More...
 
bool _input_file_saved
 whether input file has been written More...
 
bool _has_dampers
 Whether or not this system has any Dampers associated with it. More...
 
bool _has_constraints
 Whether or not this system has any Constraints. More...
 
bool _snesmf_reuse_base
 If or not to resuse the base vector for matrix-free calculation. More...
 
bool _skip_exception_check
 If or not skip 'exception and stop solve'. More...
 
bool _snesmf_reuse_base_set_by_user
 If or not _snesmf_reuse_base is set by user. More...
 
bool _has_initialized_stateful
 Whether nor not stateful materials have been initialized. More...
 
bool _const_jacobian
 true if the Jacobian is constant More...
 
bool _has_jacobian
 Indicates if the Jacobian was computed. More...
 
bool _needs_old_newton_iter
 Indicates that we need to compute variable values for previous Newton iteration. More...
 
bool _previous_nl_solution_required
 Indicates we need to save the previous NL iteration variable values. More...
 
bool _has_nonlocal_coupling
 Indicates if nonlocal coupling is required/exists. More...
 
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. More...
 
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. More...
 
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. More...
 
const bool _boundary_restricted_elem_integrity_check
 whether to perform checking of boundary restricted elemental object variable dependencies, e.g. More...
 
CoverageCheckMode _material_coverage_check
 Determines whether and which subdomains are to be checked to ensure that they have an active material. More...
 
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. More...
 
const bool _material_dependency_check
 Determines whether a check to verify material dependencies on every subdomain. More...
 
const bool _uo_aux_state_check
 Whether or not checking the state of uo/aux evaluation. More...
 
unsigned int _max_qps
 Maximum number of quadrature points used in the problem. More...
 
libMesh::Order _max_scalar_order
 Maximum scalar variable order. More...
 
bool _has_time_integrator
 Indicates whether or not this executioner has a time integrator (during setup) More...
 
bool _has_exception
 Whether or not an exception has occurred. More...
 
bool _parallel_barrier_messaging
 Whether or not information about how many transfers have completed is printed. More...
 
MooseEnum _verbose_setup
 Whether or not to be verbose during setup. More...
 
bool _verbose_multiapps
 Whether or not to be verbose with multiapps. More...
 
bool _verbose_restore
 Whether or not to be verbose on solution restoration post a failed time step. More...
 
std::string _exception_message
 The error message to go with an exception. More...
 
ExecFlagType _current_execute_on_flag
 Current execute_on flag. More...
 
ExecuteMooseObjectWarehouse< Control_control_warehouse
 The control logic warehouse. More...
 
Moose::PetscSupport::PetscOptions _petsc_options
 PETSc option storage. More...
 
PetscOptions _petsc_option_data_base
 
bool _is_petsc_options_inserted
 If or not PETSc options have been added to database. More...
 
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. More...
 
unsigned short _current_ic_state
 
const bool _use_hash_table_matrix_assembly
 Whether to assemble matrices using hash tables instead of preallocating matrix memory. More...
 
std::map< TagName, TagID_matrix_tag_name_to_tag_id
 The currently declared tags. More...
 
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
 Reverse map. More...
 
Factory_factory
 The Factory for building objects. More...
 
DiracKernelInfo _dirac_kernel_info
 
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
 Map of material properties (block_id -> list of properties) More...
 
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
 Map for boundary material properties (boundary_id -> list of properties) More...
 
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
 Set of properties returned as zero properties. More...
 
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* More...
 
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) More...
 
std::vector< unsigned int_has_active_elemental_moose_variables
 Whether or not there is currently a list of active elemental moose variables. More...
 
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. More...
 
std::set< dof_id_type_ghosted_elems
 Elements that should have Dofs ghosted to the local processor. More...
 
bool _currently_computing_jacobian
 Flag to determine whether the problem is currently computing Jacobian. More...
 
bool _currently_computing_residual_and_jacobian
 Flag to determine whether the problem is currently computing the residual and Jacobian. More...
 
bool _computing_nonlinear_residual
 Whether the non-linear residual is being evaluated. More...
 
bool _currently_computing_residual
 Whether the residual is being evaluated. More...
 
bool _safe_access_tagged_matrices
 Is it safe to retrieve data from tagged matrices. More...
 
bool _safe_access_tagged_vectors
 Is it safe to retrieve data from tagged vectors. More...
 
bool _have_ad_objects
 AD flag indicating whether any AD objects have been added. More...
 
std::unordered_set< TagID_not_zeroed_tagged_vectors
 the list of vector tags that will not be zeroed when all other tags are More...
 
bool _cli_option_found
 True if the CLI option is found. More...
 
bool _color_output
 True if we're going to attempt to write color output. More...
 
bool _termination_requested
 True if termination of the solve has been requested. More...
 
const bool & _enabled
 Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects. More...
 
MooseApp_app
 The MOOSE application this is associated with. More...
 
const std::string _type
 The type of this class. More...
 
const std::string _name
 The name of this class. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
ActionFactory_action_factory
 Builds Actions. More...
 
const Parallel::Communicator_communicator
 
MooseApp_pg_moose_app
 The MooseApp that owns the PerfGraph. More...
 
const std::string _prefix
 A prefix to use for all sections. More...
 
MooseApp_restartable_app
 Reference to the application. More...
 
const std::string _restartable_system_name
 The system name this object is in. More...
 
const THREAD_ID _restartable_tid
 The thread ID for this object. More...
 
const bool _restartable_read_only
 Flag for toggling read only status (see ReporterData) More...
 
InitialConditionWarehouse _ics
 
FVInitialConditionWarehouse _fv_ics
 
ScalarInitialConditionWarehouse _scalar_ics
 
MaterialWarehouse _materials
 
MaterialWarehouse _interface_materials
 
MaterialWarehouse _discrete_materials
 
MaterialWarehouse _all_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. More...
 
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
 

Private Attributes

std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
 The nonlinear systems. More...
 

Detailed Description

Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.

Definition at line 20 of file FEProblem.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

enum FEProblemBase::CoverageCheckMode
stronginherited
Enumerator
FALSE 
TRUE 
OFF 
ON 
SKIP_LIST 
ONLY_LIST 

Definition at line 140 of file FEProblemBase.h.

141  {
142  FALSE,
143  TRUE,
144  OFF,
145  ON,
146  SKIP_LIST,
147  ONLY_LIST,
148  };

Constructor & Destructor Documentation

◆ FEProblem()

FEProblem::FEProblem ( const InputParameters parameters)

Definition at line 35 of file FEProblem.C.

36  : FEProblemBase(parameters), _use_nonlinear(getParam<bool>("use_nonlinear"))
37 {
38  if (_num_nl_sys)
39  {
40  for (const auto i : index_range(_nl_sys_names))
41  {
42  const auto & sys_name = _nl_sys_names[i];
43  auto & nl = _nl[i];
44  nl = _use_nonlinear ? (std::make_shared<NonlinearSystem>(*this, sys_name))
45  : (std::make_shared<MooseEigenSystem>(*this, sys_name));
46  _nl_sys.push_back(std::dynamic_pointer_cast<NonlinearSystem>(nl));
48  }
49 
50  // backwards compatibility for AD for objects that depend on initializing derivatives during
51  // construction
53  }
54 
55  if (_num_linear_sys)
56  for (const auto i : index_range(_linear_sys_names))
57  {
58  _linear_systems[i] = std::make_shared<LinearSystem>(*this, _linear_sys_names[i]);
61  }
62 
63  if (_solver_systems.size() > 1)
64  for (auto & solver_system : _solver_systems)
65  solver_system->system().prefix_with_name(true);
66 
67  _aux = std::make_shared<AuxiliarySystem>(*this, "aux0");
68 
70  for (auto & solver_system : _solver_systems)
71  solver_system->system().prefer_hash_table_matrix_assembly(_use_hash_table_matrix_assembly);
72 
73  if (_num_nl_sys)
75 
76  es().parameters.set<FEProblem *>("_fe_problem") = this;
77 
78  // Create extra vectors and matrices if any
80 
81  // Create extra solution vectors if any
83 }
std::vector< std::shared_ptr< NonlinearSystem > > _nl_sys
Definition: FEProblem.h:39
bool _use_nonlinear
Definition: FEProblem.h:38
const std::size_t _num_nl_sys
The number of nonlinear systems.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblem.h:20
virtual void newAssemblyArray(std::vector< std::shared_ptr< SolverSystem >> &solver_systems)
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
FEProblemBase(const InputParameters &parameters)
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
void createTagSolutions()
Create extra tagged solution vectors.
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
void createTagVectors()
Create extra tagged vectors and matrices.
virtual libMesh::EquationSystems & es() override
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
virtual void initNullSpaceVectors(const InputParameters &parameters, std::vector< std::shared_ptr< NonlinearSystemBase >> &nl)
const std::vector< NonlinearSystemName > _nl_sys_names
The nonlinear system names.
T & set(const std::string &)
const std::vector< LinearSystemName > _linear_sys_names
The linear system names.
const InputParameters & parameters() const
Get the parameters of the object.
const std::size_t _num_linear_sys
The number of linear systems.
const bool _use_hash_table_matrix_assembly
Whether to assemble matrices using hash tables instead of preallocating matrix memory.
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.
void prefix_with_name(bool value)
auto index_range(const T &sizable)

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
inherited

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 3797 of file FEProblemBase.C.

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

3798 {
3799  return allowInvalidSolution() || // invalid solutions are always allowed
3800  !_app.solutionInvalidity().hasInvalidSolutionError(); // if not allowed, check for errors
3801 }
bool hasInvalidSolutionError() const
Whether or not an invalid solution was encountered that was an error.
SolutionInvalidity & solutionInvalidity()
Get the SolutionInvalidity for this app.
Definition: MooseApp.h:178
bool allowInvalidSolution() const
Whether to accept / allow an invalid solution.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84

◆ adaptivity()

Adaptivity& FEProblemBase::adaptivity ( )
inlineinherited

◆ adaptMesh()

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

Reimplemented in DumpObjectsProblem.

Definition at line 7932 of file FEProblemBase.C.

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

7933 {
7934  // reset cycle counter
7935  _cycles_completed = 0;
7936 
7938  return false;
7939 
7940  TIME_SECTION("adaptMesh", 3, "Adapting Mesh");
7941 
7942  unsigned int cycles_per_step = _adaptivity.getCyclesPerStep();
7943 
7944  bool mesh_changed = false;
7945 
7946  for (unsigned int i = 0; i < cycles_per_step; ++i)
7947  {
7948  if (!_mesh.interiorLowerDBlocks().empty() || !_mesh.boundaryLowerDBlocks().empty())
7949  mooseError("HFEM does not support mesh adaptivity currently.");
7950 
7951  // Markers were already computed once by Executioner
7952  if (_adaptivity.getRecomputeMarkersFlag() && i > 0)
7953  computeMarkers();
7954 
7955  bool mesh_changed_this_step;
7956  mesh_changed_this_step = _adaptivity.adaptMesh();
7957 
7958  if (mesh_changed_this_step)
7959  {
7960  mesh_changed = true;
7961 
7962  meshChanged(
7963  /*intermediate_change=*/true, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
7965  }
7966  else
7967  {
7968  // If the mesh didn't change, we still need to update the displaced mesh
7969  // to undo the undisplacement performed in Adaptivity::adaptMesh
7970  if (_displaced_problem)
7971  _displaced_problem->updateMesh();
7972 
7973  _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
7974  break;
7975  }
7976 
7977  // Show adaptivity progress
7978  _console << std::flush;
7979  }
7980 
7981  // We're done with all intermediate changes; now get systems ready
7982  // for real if necessary.
7983  if (mesh_changed)
7984  es().reinit_systems();
7985 
7986  // Execute multi-apps that need to run after adaptivity, but before the next timestep.
7988 
7989  return mesh_changed;
7990 }
bool adaptMesh(std::string marker_name=std::string())
Adapts the mesh based on the error estimator used.
Definition: Adaptivity.C:131
virtual void meshChanged()
Deprecated.
const std::set< SubdomainID > & interiorLowerDBlocks() const
Definition: MooseMesh.h:1403
unsigned int _cycles_completed
unsigned int getCyclesPerStep() const
Pull out the number of cycles_per_step previously set through the AdaptivityAction.
Definition: Adaptivity.h:112
virtual void computeMarkers()
virtual void reinit_systems()
bool getRecomputeMarkersFlag() const
Pull out the _recompute_markers_during_cycles flag previously set through the AdaptivityAction.
Definition: Adaptivity.h:125
virtual libMesh::EquationSystems & es() override
MooseMesh & _mesh
Adaptivity _adaptivity
const std::set< SubdomainID > & boundaryLowerDBlocks() const
Definition: MooseMesh.h:1407
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
bool isAdaptivityDue()
Query if an adaptivity step should be performed at the current time / time step.
Definition: Adaptivity.C:393
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
const ExecFlagType EXEC_POST_ADAPTIVITY
Definition: Moose.C:54

◆ 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 1023 of file SubProblem.C.

1024 {
1025  EquationSystems & eq = es();
1026  const auto n_sys = eq.n_systems();
1027  if (!n_sys)
1028  return;
1029 
1030  eq.get_system(0).get_dof_map().add_algebraic_ghosting_functor(algebraic_gf, to_mesh);
1031  cloneAlgebraicGhostingFunctor(algebraic_gf, to_mesh);
1032 }
unsigned int n_systems() const
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...
Definition: SubProblem.C:1001
const T_sys & get_system(std::string_view name) const
virtual libMesh::EquationSystems & es()=0

◆ addAuxArrayVariable()

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

Definition at line 3178 of file FEProblemBase.C.

3182 {
3183  parallel_object_only();
3184 
3185  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
3186 
3187  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true, active_subdomains))
3188  return;
3189 
3190  InputParameters params = _factory.getValidParams("ArrayMooseVariable");
3191  params.set<FEProblemBase *>("_fe_problem_base") = this;
3193  params.set<MooseEnum>("order") = type.order.get_order();
3194  params.set<MooseEnum>("family") = Moose::stringify(type.family);
3195  params.set<unsigned int>("components") = components;
3196 
3197  if (active_subdomains)
3198  for (const SubdomainID & id : *active_subdomains)
3199  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
3200 
3201  logAdd("Variable", var_name, "ArrayMooseVariable", params);
3202  _aux->addVariable("ArrayMooseVariable", var_name, params);
3203  if (_displaced_problem)
3204  _displaced_problem->addAuxVariable("ArrayMooseVariable", var_name, params);
3205 
3206  markFamilyPRefinement(params);
3207 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
void mooseDeprecated(Args &&... args) const
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
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.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:714
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void markFamilyPRefinement(const InputParameters &params)
Mark a variable family for either disabling or enabling p-refinement with valid parameters of a varia...
Definition: SubProblem.C:1367
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
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.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addAuxKernel()

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

Reimplemented in MFEMProblem.

Definition at line 3244 of file FEProblemBase.C.

3247 {
3248  parallel_object_only();
3249 
3250  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3251  {
3252  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3253  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3254  parameters.set<SystemBase *>("_nl_sys") = &_displaced_problem->solverSys(0);
3255  if (!parameters.get<std::vector<BoundaryName>>("boundary").empty())
3256  _reinit_displaced_face = true;
3257  else
3258  _reinit_displaced_elem = true;
3259  }
3260  else
3261  {
3262  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3263  {
3264  // We allow AuxKernels to request that they use_displaced_mesh,
3265  // but then be overridden when no displacements variables are
3266  // provided in the Mesh block. If that happened, update the value
3267  // of use_displaced_mesh appropriately for this AuxKernel.
3268  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3269  parameters.set<bool>("use_displaced_mesh") = false;
3270  }
3271 
3272  parameters.set<SubProblem *>("_subproblem") = this;
3273  parameters.set<SystemBase *>("_sys") = _aux.get();
3274  parameters.set<SystemBase *>("_nl_sys") = _solver_systems[0].get();
3275  }
3276 
3277  logAdd("AuxKernel", name, kernel_name, parameters);
3278  _aux->addKernel(kernel_name, name, parameters);
3279 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addAuxScalarKernel()

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

Definition at line 3282 of file FEProblemBase.C.

3285 {
3286  parallel_object_only();
3287 
3288  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3289  {
3290  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3291  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3292  }
3293  else
3294  {
3295  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3296  {
3297  // We allow AuxScalarKernels to request that they use_displaced_mesh,
3298  // but then be overridden when no displacements variables are
3299  // provided in the Mesh block. If that happened, update the value
3300  // of use_displaced_mesh appropriately for this AuxScalarKernel.
3301  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3302  parameters.set<bool>("use_displaced_mesh") = false;
3303  }
3304 
3305  parameters.set<SubProblem *>("_subproblem") = this;
3306  parameters.set<SystemBase *>("_sys") = _aux.get();
3307  }
3308 
3309  logAdd("AuxScalarKernel", name, kernel_name, parameters);
3310  _aux->addScalarKernel(kernel_name, name, parameters);
3311 }
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addAuxScalarVariable()

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

Definition at line 3210 of file FEProblemBase.C.

3214 {
3215  parallel_object_only();
3216 
3217  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
3218 
3219  if (order > _max_scalar_order)
3220  _max_scalar_order = order;
3221 
3222  FEType type(order, SCALAR);
3223  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true, active_subdomains))
3224  return;
3225 
3226  InputParameters params = _factory.getValidParams("MooseVariableScalar");
3227  params.set<FEProblemBase *>("_fe_problem_base") = this;
3229 
3230  params.set<MooseEnum>("order") = type.order.get_order();
3231  params.set<MooseEnum>("family") = "SCALAR";
3232  params.set<std::vector<Real>>("scaling") = {1};
3233  if (active_subdomains)
3234  for (const SubdomainID & id : *active_subdomains)
3235  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
3236 
3237  logAdd("ScalarVariable", var_name, "MooseVariableScalar", params);
3238  _aux->addVariable("MooseVariableScalar", var_name, params);
3239  if (_displaced_problem)
3240  _displaced_problem->addAuxVariable("MooseVariableScalar", var_name, params);
3241 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
void mooseDeprecated(Args &&... args) const
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
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.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:714
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
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.
std::shared_ptr< DisplacedProblem > _displaced_problem
libMesh::Order _max_scalar_order
Maximum scalar variable order.

◆ addAuxVariable() [1/2]

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

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.

Definition at line 3107 of file FEProblemBase.C.

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

3110 {
3111  parallel_object_only();
3112 
3113  const auto order = Utility::string_to_enum<Order>(params.get<MooseEnum>("order"));
3114  const auto family = Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family"));
3115  const auto fe_type = FEType(order, family);
3116 
3117  const auto active_subdomains_vector =
3118  _mesh.getSubdomainIDs(params.get<std::vector<SubdomainName>>("block"));
3119  const std::set<SubdomainID> active_subdomains(active_subdomains_vector.begin(),
3120  active_subdomains_vector.end());
3121 
3122  if (duplicateVariableCheck(var_name, fe_type, /* is_aux = */ true, &active_subdomains))
3123  return;
3124 
3125  params.set<FEProblemBase *>("_fe_problem_base") = this;
3127 
3128  logAdd("AuxVariable", var_name, var_type, params);
3129  _aux->addVariable(var_type, var_name, params);
3130  if (_displaced_problem)
3131  // MooseObjects need to be unique so change the name here
3132  _displaced_problem->addAuxVariable(var_type, var_name, params);
3133 
3134  markFamilyPRefinement(params);
3135 }
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
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:1734
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:714
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
void markFamilyPRefinement(const InputParameters &params)
Mark a variable family for either disabling or enabling p-refinement with valid parameters of a varia...
Definition: SubProblem.C:1367
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
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.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addAuxVariable() [2/2]

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

Definition at line 3138 of file FEProblemBase.C.

3141 {
3142  parallel_object_only();
3143 
3144  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
3145 
3146  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true, active_subdomains))
3147  return;
3148 
3149  std::string var_type;
3150  if (type == FEType(0, MONOMIAL))
3151  var_type = "MooseVariableConstMonomial";
3152  else if (type.family == SCALAR)
3153  var_type = "MooseVariableScalar";
3154  else if (FEInterface::field_type(type) == TYPE_VECTOR)
3155  var_type = "VectorMooseVariable";
3156  else
3157  var_type = "MooseVariable";
3158 
3159  InputParameters params = _factory.getValidParams(var_type);
3160  params.set<FEProblemBase *>("_fe_problem_base") = this;
3162  params.set<MooseEnum>("order") = type.order.get_order();
3163  params.set<MooseEnum>("family") = Moose::stringify(type.family);
3164 
3165  if (active_subdomains)
3166  for (const SubdomainID & id : *active_subdomains)
3167  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
3168 
3169  logAdd("AuxVariable", var_name, var_type, params);
3170  _aux->addVariable(var_type, var_name, params);
3171  if (_displaced_problem)
3172  _displaced_problem->addAuxVariable("MooseVariable", var_name, params);
3173 
3174  markFamilyPRefinement(params);
3175 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
void mooseDeprecated(Args &&... args) const
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
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.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:714
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void markFamilyPRefinement(const InputParameters &params)
Mark a variable family for either disabling or enabling p-refinement with valid parameters of a varia...
Definition: SubProblem.C:1367
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
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.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addBoundaryCondition()

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

Reimplemented in MFEMProblem.

Definition at line 3036 of file FEProblemBase.C.

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

3039 {
3040  parallel_object_only();
3041 
3042  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3043  if (!isSolverSystemNonlinear(nl_sys_num))
3044  mooseError(
3045  "You are trying to add a BoundaryCondition to a linear variable/system, which is not "
3046  "supported at the moment!");
3047 
3049  bc_name, name, parameters, nl_sys_num, "BoundaryCondition", _reinit_displaced_face);
3050  _nl[nl_sys_num]->addBoundaryCondition(bc_name, name, parameters);
3051 }
void setResidualObjectParamsAndLog(const std::string &ro_name, const std::string &name, InputParameters &params, 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.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
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.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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 parameter name.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addCachedJacobian()

void FEProblemBase::addCachedJacobian ( const THREAD_ID  tid)
overridevirtualinherited

◆ addCachedResidual()

void FEProblemBase::addCachedResidual ( const THREAD_ID  tid)
overridevirtualinherited

◆ addCachedResidualDirectly()

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

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 1878 of file FEProblemBase.C.

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

1879 {
1881  _assembly[tid][_current_nl_sys->number()]->addCachedResidualDirectly(
1883 
1885  _assembly[tid][_current_nl_sys->number()]->addCachedResidualDirectly(
1887 
1888  // We do this because by adding the cached residual directly, we cannot ensure that all of the
1889  // cached residuals are emptied after only the two add calls above
1890  _assembly[tid][_current_nl_sys->number()]->clearCachedResiduals(Assembly::GlobalDataKey{});
1891 
1892  if (_displaced_problem)
1893  _displaced_problem->addCachedResidualDirectly(residual, tid);
1894 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
TagID nonTimeVectorTag() const override
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
TagID timeVectorTag() const override
Ideally, we should not need this API.
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:161
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addConstraint()

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

Definition at line 3054 of file FEProblemBase.C.

3057 {
3058  parallel_object_only();
3059 
3060  _has_constraints = true;
3061 
3062  auto determine_var_param_name = [&parameters, this]()
3063  {
3064  if (parameters.isParamValid("variable"))
3065  return "variable";
3066  else
3067  {
3068  // must be a mortar constraint
3069  const bool has_secondary_var = parameters.isParamValid("secondary_variable");
3070  const bool has_primary_var = parameters.isParamValid("primary_variable");
3071  if (!has_secondary_var && !has_primary_var)
3072  mooseError(
3073  "Either a 'secondary_variable' or 'primary_variable' parameter must be supplied for '",
3074  parameters.get<std::string>("_object_name"),
3075  "'");
3076  return has_secondary_var ? "secondary_variable" : "primary_variable";
3077  }
3078  };
3079 
3080  const auto nl_sys_num =
3081  determineSolverSystem(parameters.varName(determine_var_param_name(), name), true).second;
3082  if (!isSolverSystemNonlinear(nl_sys_num))
3083  mooseError("You are trying to add a Constraint to a linear variable/system, which is not "
3084  "supported at the moment!");
3085 
3086  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3087  {
3088  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3089  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3090  _reinit_displaced_face = true;
3091  }
3092  else
3093  {
3094  // It might _want_ to use a displaced mesh... but we're not so set it to false
3095  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3096  parameters.set<bool>("use_displaced_mesh") = false;
3097 
3098  parameters.set<SubProblem *>("_subproblem") = this;
3099  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3100  }
3101 
3102  logAdd("Constraint", name, c_name, parameters);
3103  _nl[nl_sys_num]->addConstraint(c_name, name, parameters);
3104 }
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
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.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
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 parameter name.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
bool _has_constraints
Whether or not this system has any Constraints.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ 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 736 of file SubProblem.C.

Referenced by MaterialPropertyInterface::addConsumedPropertyName().

737 {
738  _consumed_material_properties[obj_name].insert(prop_name);
739 }
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
Definition: SubProblem.h:1185

◆ addConvergence()

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

Adds a Convergence object.

Definition at line 2510 of file FEProblemBase.C.

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

2513 {
2514  parallel_object_only();
2515 
2516  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2517  {
2518  std::shared_ptr<Convergence> conv = _factory.create<Convergence>(type, name, parameters, tid);
2519  _convergences.addObject(conv, tid);
2520  }
2521 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MooseObjectWarehouse< Convergence > _convergences
convergence warehouse
virtual std::unique_ptr< Base > create()=0
Base class for convergence criteria.
Definition: Convergence.h:21
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ 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 1056 of file SubProblem.C.

1057 {
1058  const auto num_nl_sys = numNonlinearSystems();
1059  if (!num_nl_sys)
1060  return;
1061 
1062  systemBaseNonlinear(0).system().get_dof_map().add_coupling_functor(coupling_gf, to_mesh);
1063  cloneCouplingGhostingFunctor(coupling_gf, to_mesh);
1064 }
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 ...
Definition: SubProblem.C:1035
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.
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
void add_coupling_functor(GhostingFunctor &coupling_functor, bool to_mesh=true)
virtual std::size_t numNonlinearSystems() const =0
const DofMap & get_dof_map() const

◆ addDamper()

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

Definition at line 5128 of file FEProblemBase.C.

5131 {
5132  parallel_object_only();
5133 
5134  const auto nl_sys_num =
5135  parameters.isParamValid("variable")
5136  ? determineSolverSystem(parameters.varName("variable", name), true).second
5137  : (unsigned int)0;
5138 
5139  if (!isSolverSystemNonlinear(nl_sys_num))
5140  mooseError("You are trying to add a DGKernel to a linear variable/system, which is not "
5141  "supported at the moment!");
5142 
5143  parameters.set<SubProblem *>("_subproblem") = this;
5144  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
5145 
5146  _has_dampers = true;
5147  logAdd("Damper", name, damper_name, parameters);
5148  _nl[nl_sys_num]->addDamper(damper_name, name, parameters);
5149 }
bool _has_dampers
Whether or not this system has any Dampers associated with it.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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 parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ addDefaultMultiAppFixedPointConvergence()

void FEProblemBase::addDefaultMultiAppFixedPointConvergence ( const InputParameters params)
inherited

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 2536 of file FEProblemBase.C.

2537 {
2538  const std::string class_name = "DefaultMultiAppFixedPointConvergence";
2539  InputParameters params = _factory.getValidParams(class_name);
2540  params.applyParameters(params_to_apply);
2541  params.applyParameters(parameters());
2542  params.set<bool>("added_as_default") = true;
2544 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
Method for applying common parameters.
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.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addDefaultNonlinearConvergence()

void FEProblemBase::addDefaultNonlinearConvergence ( const InputParameters params)
virtualinherited

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 2524 of file FEProblemBase.C.

2525 {
2526  const std::string class_name = "DefaultNonlinearConvergence";
2527  InputParameters params = _factory.getValidParams(class_name);
2528  params.applyParameters(params_to_apply);
2529  params.applyParameters(parameters());
2530  params.set<bool>("added_as_default") = true;
2531  for (const auto & conv_name : getNonlinearConvergenceNames())
2532  addConvergence(class_name, conv_name, params);
2533 }
const std::vector< ConvergenceName > & getNonlinearConvergenceNames() const
Gets the nonlinear system convergence object name(s).
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
Method for applying common parameters.
virtual void addConvergence(const std::string &type, const std::string &name, InputParameters &parameters)
Adds a Convergence object.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addDefaultSteadyStateConvergence()

void FEProblemBase::addDefaultSteadyStateConvergence ( const InputParameters params)
inherited

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 2547 of file FEProblemBase.C.

2548 {
2549  const std::string class_name = "DefaultSteadyStateConvergence";
2550  InputParameters params = _factory.getValidParams(class_name);
2551  params.applyParameters(params_to_apply);
2552  params.applyParameters(parameters());
2553  params.set<bool>("added_as_default") = true;
2554  addConvergence(class_name, getSteadyStateConvergenceName(), params);
2555 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
Method for applying common parameters.
const ConvergenceName & getSteadyStateConvergenceName() const
Gets the steady-state detection convergence object name.
virtual void addConvergence(const std::string &type, const std::string &name, InputParameters &parameters)
Adds a Convergence object.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addDGKernel()

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

Definition at line 3354 of file FEProblemBase.C.

3357 {
3358  parallel_object_only();
3359 
3360  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3361  if (!isSolverSystemNonlinear(nl_sys_num))
3362  mooseError("You are trying to add a DGKernel to a linear variable/system, which is not "
3363  "supported at the moment!");
3364 
3365  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3366  {
3367  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3368  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3370  }
3371  else
3372  {
3373  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3374  {
3375  // We allow DGKernels to request that they use_displaced_mesh,
3376  // but then be overridden when no displacements variables are
3377  // provided in the Mesh block. If that happened, update the value
3378  // of use_displaced_mesh appropriately for this DGKernel.
3379  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3380  parameters.set<bool>("use_displaced_mesh") = false;
3381  }
3382 
3383  parameters.set<SubProblem *>("_subproblem") = this;
3384  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3385  }
3386 
3387  logAdd("DGKernel", name, dg_kernel_name, parameters);
3388  _nl[nl_sys_num]->addDGKernel(dg_kernel_name, name, parameters);
3389 
3391 }
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
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.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
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 parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.

◆ addDiracKernel()

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

Definition at line 3314 of file FEProblemBase.C.

3317 {
3318  parallel_object_only();
3319 
3320  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3321  if (!isSolverSystemNonlinear(nl_sys_num))
3322  mooseError("You are trying to add a DiracKernel to a linear variable/system, which is not "
3323  "supported at the moment!");
3324 
3325  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3326  {
3327  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3328  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3329  _reinit_displaced_elem = true;
3330  }
3331  else
3332  {
3333  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3334  {
3335  // We allow DiracKernels to request that they use_displaced_mesh,
3336  // but then be overridden when no displacements variables are
3337  // provided in the Mesh block. If that happened, update the value
3338  // of use_displaced_mesh appropriately for this DiracKernel.
3339  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3340  parameters.set<bool>("use_displaced_mesh") = false;
3341  }
3342 
3343  parameters.set<SubProblem *>("_subproblem") = this;
3344  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3345  }
3346 
3347  logAdd("DiracKernel", name, kernel_name, parameters);
3348  _nl[nl_sys_num]->addDiracKernel(kernel_name, name, parameters);
3349 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
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.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
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 parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addDisplacedProblem()

void FEProblemBase::addDisplacedProblem ( std::shared_ptr< DisplacedProblem displaced_problem)
virtualinherited

Definition at line 7746 of file FEProblemBase.C.

7747 {
7748  parallel_object_only();
7749 
7752 }
std::shared_ptr< DisplacedProblem > displaced_problem
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ addDistribution()

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

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

Definition at line 2676 of file FEProblemBase.C.

2679 {
2680  parameters.set<std::string>("type") = type;
2681  addObject<Distribution>(type, name, parameters, /* threaded = */ false);
2682 }
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
const InputParameters & parameters() const
Get the parameters of the object.

◆ addFunction()

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

Reimplemented in MFEMProblem.

Definition at line 2484 of file FEProblemBase.C.

Referenced by MFEMProblem::addFunction(), and FEProblemBase::getFunction().

2487 {
2488  parallel_object_only();
2489 
2490  parameters.set<SubProblem *>("_subproblem") = this;
2491 
2492  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2493  {
2494  std::shared_ptr<Function> func = _factory.create<Function>(type, name, parameters, tid);
2495  logAdd("Function", name, type, parameters);
2496  _functions.addObject(func, tid);
2497 
2498  if (auto * const functor = dynamic_cast<Moose::FunctorBase<Real> *>(func.get()))
2499  {
2500  this->addFunctor(name, *functor, tid);
2501  if (_displaced_problem)
2502  _displaced_problem->addFunctor(name, *functor, tid);
2503  }
2504  else
2505  mooseError("Unrecognized function functor type");
2506  }
2507 }
Base class for function objects.
Definition: Function.h:36
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
void addFunctor(const std::string &name, const Moose::FunctorBase< T > &functor, const THREAD_ID tid)
add a functor to the problem functor container
Definition: SubProblem.h:1375
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 const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::unique_ptr< Base > create()=0
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
MooseObjectWarehouse< Function > _functions
functions
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ 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 1375 of file SubProblem.h.

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

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

◆ addFunctorMaterial()

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

Reimplemented in MFEMProblem.

Definition at line 3804 of file FEProblemBase.C.

3807 {
3808  parallel_object_only();
3809 
3810  auto add_functor_materials = [&](const auto & parameters, const auto & name)
3811  {
3812  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3813  {
3814  // Create the general Block/Boundary MaterialBase object
3815  std::shared_ptr<MaterialBase> material =
3816  _factory.create<MaterialBase>(functor_material_name, name, parameters, tid);
3817  logAdd("FunctorMaterial", name, functor_material_name, parameters);
3818  _all_materials.addObject(material, tid);
3819  _materials.addObject(material, tid);
3820  }
3821  };
3822 
3823  parameters.set<SubProblem *>("_subproblem") = this;
3824  add_functor_materials(parameters, name);
3825  if (_displaced_problem)
3826  {
3827  auto disp_params = parameters;
3828  disp_params.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3829  add_functor_materials(disp_params, name + "_displaced");
3830  }
3831 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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 const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::unique_ptr< Base > create()=0
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
MaterialBases compute MaterialProperties.
Definition: MaterialBase.h:62
MaterialWarehouse _all_materials
unsigned int THREAD_ID
Definition: MooseTypes.h:209
MaterialWarehouse _materials

◆ addFVBC()

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

Definition at line 3408 of file FEProblemBase.C.

Referenced by DiffusionFV::addFVBCs().

3411 {
3412  addObject<FVBoundaryCondition>(fv_bc_name, name, parameters);
3413 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & parameters() const
Get the parameters of the object.

◆ addFVInitialCondition()

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

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 3577 of file FEProblemBase.C.

3580 {
3581  parallel_object_only();
3582 
3583  // before we start to mess with the initial condition, we need to check parameters for errors.
3585  const std::string & var_name = parameters.get<VariableName>("variable");
3586 
3587  // Forbid initial conditions on a restarted problem, as they would override the restart
3588  checkICRestartError(ic_name, name, var_name);
3589 
3590  parameters.set<SubProblem *>("_subproblem") = this;
3591 
3592  // field IC
3593  if (hasVariable(var_name))
3594  {
3595  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
3596  {
3597  auto & var = getVariable(
3599  parameters.set<SystemBase *>("_sys") = &var.sys();
3600  std::shared_ptr<FVInitialConditionBase> ic;
3601  if (var.isFV())
3602  ic = _factory.create<FVInitialCondition>(ic_name, name, parameters, tid);
3603  else
3604  mooseError(
3605  "Your variable for an FVInitialCondition needs to be an a finite volume variable!");
3606  _fv_ics.addObject(ic, tid);
3607  }
3608  }
3609  else
3610  mooseError("Variable '",
3611  var_name,
3612  "' requested in finite volume initial condition '",
3613  name,
3614  "' does not exist.");
3615 }
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
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 std::unique_ptr< Base > create()=0
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...
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
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 addObject(std::shared_ptr< FVInitialConditionBase > object, THREAD_ID tid, bool recurse=true)
Add object to the warehouse.
FVInitialConditionWarehouse _fv_ics
This is a template class that implements the workhorse compute and computeNodal methods.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ addFVInterfaceKernel()

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

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 3416 of file FEProblemBase.C.

3419 {
3422  addObject<FVInterfaceKernel>(
3423  fv_ik_name, name, parameters, /*threaded=*/true, /*variable_param_name=*/"variable1");
3424 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & parameters() const
Get the parameters of the object.

◆ addFVKernel()

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

Definition at line 3394 of file FEProblemBase.C.

Referenced by DiffusionFV::addFVKernels().

3397 {
3398  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3399  // FVElementalKernels are computed in the historically finite element threaded loops. They rely
3400  // on Assembly data like _current_elem. When we call reinit on the FEProblemBase we will only
3401  // reinit the DisplacedProblem and its associated Assembly objects if we mark this boolean as
3402  // true
3403  _reinit_displaced_elem = true;
3404  addObject<FVKernel>(fv_kernel_name, name, parameters);
3405 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
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.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addGhostedBoundary()

void FEProblemBase::addGhostedBoundary ( BoundaryID  boundary_id)
overridevirtualinherited

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

Implements SubProblem.

Definition at line 2080 of file FEProblemBase.C.

Referenced by DisplacedProblem::addGhostedBoundary().

2081 {
2082  _mesh.addGhostedBoundary(boundary_id);
2083  if (_displaced_problem)
2084  _displaced_mesh->addGhostedBoundary(boundary_id);
2085 }
MooseMesh & _mesh
std::shared_ptr< DisplacedProblem > _displaced_problem
void addGhostedBoundary(BoundaryID boundary_id)
This will add the boundary ids to be ghosted to this processor.
Definition: MooseMesh.C:3224
MooseMesh * _displaced_mesh

◆ addGhostedElem()

void FEProblemBase::addGhostedElem ( dof_id_type  elem_id)
overridevirtualinherited

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

Implements SubProblem.

Definition at line 2073 of file FEProblemBase.C.

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

2074 {
2075  if (_mesh.elemPtr(elem_id)->processor_id() != processor_id())
2076  _ghosted_elems.insert(elem_id);
2077 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1093
MooseMesh & _mesh
processor_id_type processor_id() const
processor_id_type processor_id() const

◆ addHDGKernel()

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

Definition at line 2950 of file FEProblemBase.C.

2953 {
2954  parallel_object_only();
2955  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
2956  if (!isSolverSystemNonlinear(nl_sys_num))
2957  mooseError("You are trying to add a HDGKernel to a linear variable/system, which is not "
2958  "supported at the moment!");
2960  kernel_name, name, parameters, nl_sys_num, "HDGKernel", _reinit_displaced_elem);
2961 
2962  _nl[nl_sys_num]->addHDGKernel(kernel_name, name, parameters);
2963 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void setResidualObjectParamsAndLog(const std::string &ro_name, const std::string &name, InputParameters &params, 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.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
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.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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 parameter name.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addIndicator()

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

Definition at line 5159 of file FEProblemBase.C.

5162 {
5163  parallel_object_only();
5164 
5165  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5166  {
5167  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5168  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5169  _reinit_displaced_elem = true;
5170  }
5171  else
5172  {
5173  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5174  {
5175  // We allow Indicators to request that they use_displaced_mesh,
5176  // but then be overridden when no displacements variables are
5177  // provided in the Mesh block. If that happened, update the value
5178  // of use_displaced_mesh appropriately for this Indicator.
5179  if (parameters.have_parameter<bool>("use_displaced_mesh"))
5180  parameters.set<bool>("use_displaced_mesh") = false;
5181  }
5182 
5183  parameters.set<SubProblem *>("_subproblem") = this;
5184  parameters.set<SystemBase *>("_sys") = _aux.get();
5185  }
5186 
5187  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
5188  {
5189  std::shared_ptr<Indicator> indicator =
5190  _factory.create<Indicator>(indicator_name, name, parameters, tid);
5191  logAdd("Indicator", name, indicator_name, parameters);
5192  std::shared_ptr<InternalSideIndicatorBase> isi =
5194  if (isi)
5196  else
5197  _indicators.addObject(indicator, tid);
5198  }
5199 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::unique_ptr< Base > create()=0
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseObjectWarehouse< Indicator > _indicators
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ addInitialCondition()

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

Reimplemented in MFEMProblem.

Definition at line 3517 of file FEProblemBase.C.

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

3520 {
3521  parallel_object_only();
3522 
3523  // before we start to mess with the initial condition, we need to check parameters for errors.
3525  const std::string & var_name = parameters.get<VariableName>("variable");
3526 
3527  // Forbid initial conditions on a restarted problem, as they would override the restart
3528  checkICRestartError(ic_name, name, var_name);
3529 
3530  parameters.set<SubProblem *>("_subproblem") = this;
3531 
3532  // field IC
3533  if (hasVariable(var_name))
3534  {
3535  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
3536  {
3539  parameters.set<SystemBase *>("_sys") = &var.sys();
3540  std::shared_ptr<InitialConditionBase> ic;
3541  if (dynamic_cast<MooseVariable *>(&var))
3542  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3543  else if (dynamic_cast<VectorMooseVariable *>(&var))
3544  ic = _factory.create<VectorInitialCondition>(ic_name, name, parameters, tid);
3545  else if (dynamic_cast<ArrayMooseVariable *>(&var))
3546  ic = _factory.create<ArrayInitialCondition>(ic_name, name, parameters, tid);
3547  else if (dynamic_cast<MooseVariableFVReal *>(&var))
3548  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3549  else if (dynamic_cast<MooseLinearVariableFVReal *>(&var))
3550  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3551  else
3552  mooseError("Your FE variable in initial condition ",
3553  name,
3554  " must be either of scalar or vector type");
3555  logAdd("IC", name, ic_name, parameters);
3556  _ics.addObject(ic, tid);
3557  }
3558  }
3559 
3560  // scalar IC
3561  else if (hasScalarVariable(var_name))
3562  {
3563  MooseVariableScalar & var = getScalarVariable(0, var_name);
3564  parameters.set<SystemBase *>("_sys") = &var.sys();
3565  std::shared_ptr<ScalarInitialCondition> ic =
3567  logAdd("ScalarIC", name, ic_name, parameters);
3568  _scalar_ics.addObject(ic);
3569  }
3570 
3571  else
3572  mooseError(
3573  "Variable '", var_name, "' requested in initial condition '", name, "' does not exist.");
3574 }
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
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.
This is a template class that implements the workhorse compute and computeNodal methods.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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 bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided...
This class provides an interface for common operations on field variables of both FE and FV types wit...
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
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...
ScalarInitialConditionWarehouse _scalar_ics
virtual std::unique_ptr< Base > create()=0
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the scalar variable reference from whichever system contains it.
void addObject(std::shared_ptr< InitialConditionBase > 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...
InitialConditions are objects that set the initial value of variables.
InitialConditionWarehouse _ics
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
Class for scalar variables (they are different).
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
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...
SystemBase & sys()
Get the system this variable is part of.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ addInterfaceKernel()

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

Definition at line 3445 of file FEProblemBase.C.

3448 {
3449  parallel_object_only();
3450 
3451  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3452  if (!isSolverSystemNonlinear(nl_sys_num))
3453  mooseError("You are trying to add a InterfaceKernel to a linear variable/system, which is not "
3454  "supported at the moment!");
3455 
3456  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3457  {
3458  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3459  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3461  }
3462  else
3463  {
3464  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3465  {
3466  // We allow InterfaceKernels to request that they use_displaced_mesh,
3467  // but then be overridden when no displacements variables are
3468  // provided in the Mesh block. If that happened, update the value
3469  // of use_displaced_mesh appropriately for this InterfaceKernel.
3470  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3471  parameters.set<bool>("use_displaced_mesh") = false;
3472  }
3473 
3474  parameters.set<SubProblem *>("_subproblem") = this;
3475  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3476  }
3477 
3478  logAdd("InterfaceKernel", name, interface_kernel_name, parameters);
3479  _nl[nl_sys_num]->addInterfaceKernel(interface_kernel_name, name, parameters);
3480 
3482 }
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
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.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
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 parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.

◆ addInterfaceMaterial()

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

Definition at line 3842 of file FEProblemBase.C.

3845 {
3847 }
virtual void addMaterialHelper(std::vector< MaterialWarehouse *> warehouse, const std::string &material_name, const std::string &name, InputParameters &parameters)
MaterialWarehouse _interface_materials
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & parameters() const
Get the parameters of the object.

◆ addJacobian()

void FEProblemBase::addJacobian ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1917 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1918 {
1919  _assembly[tid][_current_nl_sys->number()]->addJacobian(Assembly::GlobalDataKey{});
1921  _assembly[tid][_current_nl_sys->number()]->addJacobianNonlocal(Assembly::GlobalDataKey{});
1922  if (_displaced_problem)
1923  {
1924  _displaced_problem->addJacobian(tid);
1926  _displaced_problem->addJacobianNonlocal(tid);
1927  }
1928 }
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ 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 
)
virtualinherited

Definition at line 1992 of file FEProblemBase.C.

Referenced by ComputeJacobianBlocksThread::postElement().

1999 {
2000  _assembly[tid][_current_nl_sys->number()]->addJacobianBlockTags(
2001  jacobian, ivar, jvar, dof_map, dof_indices, Assembly::GlobalDataKey{}, tags);
2002 
2004  if (_nonlocal_cm[_current_nl_sys->number()](ivar, jvar) != 0)
2005  {
2006  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
2007  _assembly[tid][_current_nl_sys->number()]->addJacobianBlockNonlocalTags(
2008  jacobian,
2009  ivar,
2010  jvar,
2011  dof_map,
2012  dof_indices,
2013  jv.allDofIndices(),
2015  tags);
2016  }
2017 
2018  if (_displaced_problem)
2019  {
2020  _displaced_problem->addJacobianBlockTags(jacobian, ivar, jvar, dof_map, dof_indices, tags, tid);
2022  if (_nonlocal_cm[_current_nl_sys->number()](ivar, jvar) != 0)
2023  {
2024  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
2025  _displaced_problem->addJacobianBlockNonlocal(
2026  jacobian, ivar, jvar, dof_map, dof_indices, jv.allDofIndices(), tags, tid);
2027  }
2028  }
2029 }
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
This class provides an interface for common operations on field variables of both FE and FV types wit...
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
const std::vector< dof_id_type > & allDofIndices() const
Get all global dofindices for the variable.
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89
std::vector< libMesh::CouplingMatrix > _nonlocal_cm
nonlocal coupling matrix
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addJacobianLowerD()

void FEProblemBase::addJacobianLowerD ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1947 of file FEProblemBase.C.

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

1948 {
1949  _assembly[tid][_current_nl_sys->number()]->addJacobianLowerD(Assembly::GlobalDataKey{});
1950  if (_displaced_problem)
1951  _displaced_problem->addJacobianLowerD(tid);
1952 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addJacobianNeighbor() [1/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

Implemented in DisplacedProblem.

◆ addJacobianNeighbor() [2/3]

void FEProblemBase::addJacobianNeighbor ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1931 of file FEProblemBase.C.

Referenced by ComputeResidualAndJacobianThread::accumulateNeighbor(), ComputeJacobianThread::accumulateNeighbor(), and ComputeJacobianBlocksThread::postInternalSide().

1932 {
1933  _assembly[tid][_current_nl_sys->number()]->addJacobianNeighbor(Assembly::GlobalDataKey{});
1934  if (_displaced_problem)
1935  _displaced_problem->addJacobianNeighbor(tid);
1936 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addJacobianNeighbor() [3/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 
)
overridevirtualinherited

◆ addJacobianNeighborLowerD()

void FEProblemBase::addJacobianNeighborLowerD ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1939 of file FEProblemBase.C.

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

1940 {
1941  _assembly[tid][_current_nl_sys->number()]->addJacobianNeighborLowerD(Assembly::GlobalDataKey{});
1942  if (_displaced_problem)
1943  _displaced_problem->addJacobianNeighborLowerD(tid);
1944 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addJacobianOffDiagScalar()

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

Definition at line 1961 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

1962 {
1963  _assembly[tid][_current_nl_sys->number()]->addJacobianOffDiagScalar(ivar,
1965 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addJacobianScalar()

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

Definition at line 1955 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

1956 {
1957  _assembly[tid][_current_nl_sys->number()]->addJacobianScalar(Assembly::GlobalDataKey{});
1958 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addKernel()

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

Reimplemented in MFEMProblem.

Definition at line 2934 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEKernels().

2937 {
2938  parallel_object_only();
2939  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
2940  if (!isSolverSystemNonlinear(nl_sys_num))
2941  mooseError("You are trying to add a Kernel to a linear variable/system, which is not "
2942  "supported at the moment!");
2944  kernel_name, name, parameters, nl_sys_num, "Kernel", _reinit_displaced_elem);
2945 
2946  _nl[nl_sys_num]->addKernel(kernel_name, name, parameters);
2947 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void setResidualObjectParamsAndLog(const std::string &ro_name, const std::string &name, InputParameters &params, 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.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
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.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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 parameter name.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addLinearFVBC()

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

Definition at line 3435 of file FEProblemBase.C.

3438 {
3439  addObject<LinearFVBoundaryCondition>(bc_name, name, parameters);
3440 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & parameters() const
Get the parameters of the object.

◆ addLinearFVKernel()

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

Definition at line 3427 of file FEProblemBase.C.

3430 {
3431  addObject<LinearFVKernel>(kernel_name, name, parameters);
3432 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & parameters() const
Get the parameters of the object.

◆ addLineSearch()

void FEProblem::addLineSearch ( const InputParameters )
overridevirtual

add a MOOSE line search

Reimplemented from FEProblemBase.

Definition at line 129 of file FEProblem.C.

130 {
131  MooseEnum line_search = parameters.get<MooseEnum>("line_search");
132  Moose::LineSearchType enum_line_search = Moose::stringToEnum<Moose::LineSearchType>(line_search);
133  if (enum_line_search == Moose::LS_CONTACT || enum_line_search == Moose::LS_PROJECT)
134  {
135  if (enum_line_search == Moose::LS_CONTACT)
136  {
137  InputParameters ls_params = _factory.getValidParams("PetscContactLineSearch");
138 
139  bool affect_ltol = parameters.isParamValid("contact_line_search_ltol");
140  ls_params.set<bool>("affect_ltol") = affect_ltol;
141  ls_params.set<unsigned>("allowed_lambda_cuts") =
142  parameters.get<unsigned>("contact_line_search_allowed_lambda_cuts");
143  ls_params.set<Real>("contact_ltol") = affect_ltol
144  ? parameters.get<Real>("contact_line_search_ltol")
145  : parameters.get<Real>("l_tol");
146  ls_params.set<FEProblem *>("_fe_problem") = this;
147 
148  _line_search =
149  _factory.create<LineSearch>("PetscContactLineSearch", "contact_line_search", ls_params);
150  }
151  else
152  {
153  InputParameters ls_params = _factory.getValidParams("PetscProjectSolutionOntoBounds");
154  ls_params.set<FEProblem *>("_fe_problem") = this;
155 
157  "PetscProjectSolutionOntoBounds", "project_solution_onto_bounds_line_search", ls_params);
158  }
159  }
160  else
161  mooseError("Requested line search ", line_search.operator std::string(), " is not supported");
162 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblem.h:20
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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:111
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Definition: Factory.C:68
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
LineSearchType
Type of the line search.
Definition: MooseTypes.h:925
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
std::shared_ptr< LineSearch > _line_search
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ addMarker()

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

Definition at line 5202 of file FEProblemBase.C.

5205 {
5206  parallel_object_only();
5207 
5208  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5209  {
5210  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5211  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5212  _reinit_displaced_elem = true;
5213  }
5214  else
5215  {
5216  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5217  {
5218  // We allow Markers to request that they use_displaced_mesh,
5219  // but then be overridden when no displacements variables are
5220  // provided in the Mesh block. If that happened, update the value
5221  // of use_displaced_mesh appropriately for this Marker.
5222  if (parameters.have_parameter<bool>("use_displaced_mesh"))
5223  parameters.set<bool>("use_displaced_mesh") = false;
5224  }
5225 
5226  parameters.set<SubProblem *>("_subproblem") = this;
5227  parameters.set<SystemBase *>("_sys") = _aux.get();
5228  }
5229 
5230  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
5231  {
5232  std::shared_ptr<Marker> marker = _factory.create<Marker>(marker_name, name, parameters, tid);
5233  logAdd("Marker", name, marker_name, parameters);
5234  _markers.addObject(marker, tid);
5235  }
5236 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Definition: Marker.h:41
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.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::unique_ptr< Base > create()=0
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
MooseObjectWarehouse< Marker > _markers
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ addMaterial()

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

Reimplemented in MFEMProblem.

Definition at line 3834 of file FEProblemBase.C.

Referenced by ComponentMaterialPropertyInterface::addMaterials().

3837 {
3838  addMaterialHelper({&_materials}, mat_name, name, parameters);
3839 }
virtual void addMaterialHelper(std::vector< MaterialWarehouse *> warehouse, const std::string &material_name, const std::string &name, InputParameters &parameters)
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & parameters() const
Get the parameters of the object.
MaterialWarehouse _materials

◆ addMaterialHelper()

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

Definition at line 3850 of file FEProblemBase.C.

Referenced by FEProblemBase::addInterfaceMaterial(), and FEProblemBase::addMaterial().

3854 {
3855  parallel_object_only();
3856 
3857  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3858  {
3859  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3861  }
3862  else
3863  {
3864  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3865  {
3866  // We allow Materials to request that they use_displaced_mesh,
3867  // but then be overridden when no displacements variables are
3868  // provided in the Mesh block. If that happened, update the value
3869  // of use_displaced_mesh appropriately for this Material.
3870  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3871  parameters.set<bool>("use_displaced_mesh") = false;
3872  }
3873 
3874  parameters.set<SubProblem *>("_subproblem") = this;
3875  }
3876 
3877  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3878  {
3879  // Create the general Block/Boundary MaterialBase object
3880  std::shared_ptr<MaterialBase> material =
3881  _factory.create<MaterialBase>(mat_name, name, parameters, tid);
3882  logAdd("Material", name, mat_name, parameters);
3883  bool discrete = !material->getParam<bool>("compute");
3884 
3885  // If the object is boundary restricted or if it is a functor material we do not create the
3886  // neighbor and face objects
3887  if (material->boundaryRestricted() || dynamic_cast<FunctorMaterial *>(material.get()))
3888  {
3889  _all_materials.addObject(material, tid);
3890  if (discrete)
3891  _discrete_materials.addObject(material, tid);
3892  else
3893  for (auto && warehouse : warehouses)
3894  warehouse->addObject(material, tid);
3895  }
3896 
3897  // Non-boundary restricted require face and neighbor objects
3898  else
3899  {
3900  // TODO: we only need to do this if we have needs for face materials (e.g.
3901  // FV, DG, etc.) - but currently we always do it. Figure out how to fix
3902  // this.
3903 
3904  // The name of the object being created, this is changed multiple times as objects are
3905  // created below
3906  std::string object_name;
3907 
3908  // Create a copy of the supplied parameters to the setting for "_material_data_type" isn't
3909  // used from a previous tid loop
3910  InputParameters current_parameters = parameters;
3911 
3912  // face material
3913  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
3915  object_name = name + "_face";
3916  std::shared_ptr<MaterialBase> face_material =
3917  _factory.create<MaterialBase>(mat_name, object_name, current_parameters, tid);
3918 
3919  // neighbor material
3920  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
3922  current_parameters.set<bool>("_neighbor") = true;
3923  object_name = name + "_neighbor";
3924  std::shared_ptr<MaterialBase> neighbor_material =
3925  _factory.create<MaterialBase>(mat_name, object_name, current_parameters, tid);
3926 
3927  // Store the material objects
3928  _all_materials.addObjects(material, neighbor_material, face_material, tid);
3929 
3930  if (discrete)
3931  _discrete_materials.addObjects(material, neighbor_material, face_material, tid);
3932  else
3933  for (auto && warehouse : warehouses)
3934  warehouse->addObjects(material, neighbor_material, face_material, tid);
3935 
3936  // Names of all controllable parameters for this Material object
3937  const std::string & base = parameters.get<std::string>("_moose_base");
3938  MooseObjectParameterName name(MooseObjectName(base, material->name()), "*");
3939  const auto param_names =
3941 
3942  // Connect parameters of the primary Material object to those on the face and neighbor
3943  // objects
3944  for (const auto & p_name : param_names)
3945  {
3946  MooseObjectParameterName primary_name(MooseObjectName(base, material->name()),
3947  p_name.parameter());
3948  MooseObjectParameterName face_name(MooseObjectName(base, face_material->name()),
3949  p_name.parameter());
3950  MooseObjectParameterName neighbor_name(MooseObjectName(base, neighbor_material->name()),
3951  p_name.parameter());
3953  primary_name, face_name, false);
3955  primary_name, neighbor_name, false);
3956  }
3957  }
3958  }
3959 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void addControllableParameterConnection(const MooseObjectParameterName &primary, const MooseObjectParameterName &secondary, bool error_on_empty=true)
Method for linking control parameters of different names.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
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.
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition: MooseApp.C:2865
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:691
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
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 const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< MooseObjectParameterName > getControllableParameterNames(const MooseObjectParameterName &input) const
Return a vector of parameters names matching the supplied name.
FunctorMaterials compute functor material properties.
virtual std::unique_ptr< Base > create()=0
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...
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
MaterialWarehouse _discrete_materials
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
A class for storing an input parameter name.
A class for storing the names of MooseObject by tag and object name.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
MaterialBases compute MaterialProperties.
Definition: MaterialBase.h:62
MaterialWarehouse _all_materials
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ 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 311 of file SubProblem.C.

Referenced by DisplacedProblem::addMatrixTag(), FEProblemBase::createTagVectors(), LinearSystem::LinearSystem(), and NonlinearSystemBase::NonlinearSystemBase().

312 {
313  auto tag_name_upper = MooseUtils::toUpper(tag_name);
314  auto existing_tag = _matrix_tag_name_to_tag_id.find(tag_name_upper);
315  if (existing_tag == _matrix_tag_name_to_tag_id.end())
316  {
317  auto tag_id = _matrix_tag_name_to_tag_id.size();
318 
319  _matrix_tag_name_to_tag_id[tag_name_upper] = tag_id;
320 
321  _matrix_tag_id_to_tag_name[tag_id] = tag_name_upper;
322  }
323 
324  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
325 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1041
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:1044

◆ addMeshDivision()

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

Add a MeshDivision.

Definition at line 2631 of file FEProblemBase.C.

2634 {
2635  parallel_object_only();
2636  parameters.set<FEProblemBase *>("_fe_problem_base") = this;
2637  parameters.set<SubProblem *>("_subproblem") = this;
2638  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2639  {
2640  std::shared_ptr<MeshDivision> func = _factory.create<MeshDivision>(type, name, parameters, tid);
2641  _mesh_divisions.addObject(func, tid);
2642  }
2643 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for MeshDivision objects.
Definition: MeshDivision.h:35
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::unique_ptr< Base > create()=0
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
MooseObjectWarehouse< MeshDivision > _mesh_divisions
Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the ...
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ addMultiApp()

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

Add a MultiApp to the problem.

Definition at line 5239 of file FEProblemBase.C.

5242 {
5243  parallel_object_only();
5244 
5245  parameters.set<MPI_Comm>("_mpi_comm") = _communicator.get();
5246  parameters.set<std::shared_ptr<CommandLine>>("_command_line") = _app.commandLine();
5247 
5248  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5249  {
5250  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5251  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5252  _reinit_displaced_elem = true;
5253  }
5254  else
5255  {
5256  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5257  {
5258  // We allow MultiApps to request that they use_displaced_mesh,
5259  // but then be overridden when no displacements variables are
5260  // provided in the Mesh block. If that happened, update the value
5261  // of use_displaced_mesh appropriately for this MultiApp.
5262  if (parameters.have_parameter<bool>("use_displaced_mesh"))
5263  parameters.set<bool>("use_displaced_mesh") = false;
5264  }
5265 
5266  parameters.set<SubProblem *>("_subproblem") = this;
5267  parameters.set<SystemBase *>("_sys") = _aux.get();
5268  }
5269 
5270  std::shared_ptr<MultiApp> multi_app = _factory.create<MultiApp>(multi_app_name, name, parameters);
5271  logAdd("MultiApp", name, multi_app_name, parameters);
5272  multi_app->setupPositions();
5273 
5274  _multi_apps.addObject(multi_app);
5275 
5276  // Store TransientMultiApp objects in another container, this is needed for calling computeDT
5277  std::shared_ptr<TransientMultiApp> trans_multi_app =
5279  if (trans_multi_app)
5280  _transient_multi_apps.addObject(trans_multi_app);
5281 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
std::shared_ptr< CommandLine > commandLine() const
Get the command line.
Definition: MooseApp.h:441
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
MultiApp Implementation for Transient Apps.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
const Parallel::Communicator & _communicator
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling &#39;computeDT&#39;)
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::unique_ptr< Base > create()=0
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
A MultiApp represents one or more MOOSE applications that are running simultaneously.
Definition: MultiApp.h:112

◆ addNodalKernel()

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

Definition at line 2966 of file FEProblemBase.C.

2969 {
2970  parallel_object_only();
2971 
2972  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
2973  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2974  {
2975  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2976  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
2977  _reinit_displaced_elem = true;
2978  }
2979  else
2980  {
2981  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2982  {
2983  // We allow NodalKernels to request that they use_displaced_mesh,
2984  // but then be overridden when no displacements variables are
2985  // provided in the Mesh block. If that happened, update the value
2986  // of use_displaced_mesh appropriately for this NodalKernel.
2987  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2988  parameters.set<bool>("use_displaced_mesh") = false;
2989  }
2990 
2991  parameters.set<SubProblem *>("_subproblem") = this;
2992  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2993  }
2994  logAdd("NodalKernel", name, kernel_name, parameters);
2995  _nl[nl_sys_num]->addNodalKernel(kernel_name, name, parameters);
2996 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
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.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
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 parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ 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 149 of file SubProblem.C.

Referenced by FEProblemBase::createTagVectors().

150 {
151  _not_zeroed_tagged_vectors.insert(tag);
152 }
std::unordered_set< TagID > _not_zeroed_tagged_vectors
the list of vector tags that will not be zeroed when all other tags are
Definition: SubProblem.h:1117

◆ 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" 
)
inherited

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 3145 of file FEProblemBase.h.

3150 {
3151  parallel_object_only();
3152 
3153  logAdd(MooseUtils::prettyCppType<T>(), name, type, parameters);
3154  // Add the _subproblem and _sys parameters depending on use_displaced_mesh
3155  addObjectParamsHelper(parameters, name, var_param_name);
3156 
3157  const auto n_threads = threaded ? libMesh::n_threads() : 1;
3158  std::vector<std::shared_ptr<T>> objects(n_threads);
3159  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
3160  {
3161  std::shared_ptr<T> obj = _factory.create<T>(type, name, parameters, tid);
3162  theWarehouse().add(obj);
3163  objects[tid] = std::move(obj);
3164  }
3165 
3166  return objects;
3167 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
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...
Definition: TheWarehouse.C:116
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:111
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 const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
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().
const InputParameters & parameters() const
Get the parameters of the object.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ addObjectParamsHelper()

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

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 4192 of file FEProblemBase.C.

Referenced by FEProblemBase::addObject(), and FEProblemBase::addUserObject().

4195 {
4196  // Due to objects like SolutionUserObject which manipulate libmesh objects
4197  // and variables directly at the back end, we need a default option here
4198  // which is going to be the pointer to the first solver system within this
4199  // problem
4200  unsigned int sys_num = 0;
4201  if (parameters.isParamValid(var_param_name))
4202  {
4203  const auto variable_name = parameters.varName(var_param_name, object_name);
4204  if (this->hasVariable(variable_name) || this->hasScalarVariable(variable_name))
4205  sys_num = getSystem(parameters.varName(var_param_name, object_name)).number();
4206  }
4207 
4208  if (_displaced_problem && parameters.have_parameter<bool>("use_displaced_mesh") &&
4209  parameters.get<bool>("use_displaced_mesh"))
4210  {
4211  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4212  if (sys_num == _aux->number())
4213  parameters.set<SystemBase *>("_sys") = &_displaced_problem->systemBaseAuxiliary();
4214  else
4215  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(sys_num);
4216  }
4217  else
4218  {
4219  // The object requested use_displaced_mesh, but it was overridden
4220  // due to there being no displacements variables in the [Mesh] block.
4221  // If that happened, update the value of use_displaced_mesh appropriately.
4222  if (!_displaced_problem && parameters.have_parameter<bool>("use_displaced_mesh") &&
4223  parameters.get<bool>("use_displaced_mesh"))
4224  parameters.set<bool>("use_displaced_mesh") = false;
4225 
4226  parameters.set<SubProblem *>("_subproblem") = this;
4227 
4228  if (sys_num == _aux->number())
4229  parameters.set<SystemBase *>("_sys") = _aux.get();
4230  else
4231  parameters.set<SystemBase *>("_sys") = _solver_systems[sys_num].get();
4232  }
4233 }
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
virtual libMesh::System & getSystem(const std::string &var_name) override
Returns the equation system containing the variable provided.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided...
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
Base class for a system (of equations)
Definition: SystemBase.h:84
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
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 parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ addOutput()

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

Adds an Output object.

Definition at line 8784 of file FEProblemBase.C.

8787 {
8788  parallel_object_only();
8789 
8790  // Get a reference to the OutputWarehouse
8791  OutputWarehouse & output_warehouse = _app.getOutputWarehouse();
8792 
8793  // Reject the reserved names for objects not built by MOOSE
8794  if (!parameters.get<bool>("_built_by_moose") && output_warehouse.isReservedName(object_name))
8795  mooseError("The name '", object_name, "' is a reserved name for output objects");
8796 
8797  // Check that an object by the same name does not already exist; this must be done before the
8798  // object is created to avoid getting misleading errors from the Parser
8799  if (output_warehouse.hasOutput(object_name))
8800  mooseError("An output object named '", object_name, "' already exists");
8801 
8802  // Add a pointer to the FEProblemBase class
8803  parameters.addPrivateParam<FEProblemBase *>("_fe_problem_base", this);
8804 
8805  // Create common parameter exclude list
8806  std::vector<std::string> exclude;
8807  if (object_type == "Console")
8808  {
8809  exclude.push_back("execute_on");
8810 
8811  // --show-input should enable the display of the input file on the screen
8812  if (_app.getParam<bool>("show_input") && parameters.get<bool>("output_screen"))
8813  parameters.set<ExecFlagEnum>("execute_input_on") = EXEC_INITIAL;
8814  }
8815  // Need this because Checkpoint::validParams changes the default value of
8816  // execute_on
8817  else if (object_type == "Checkpoint")
8818  exclude.push_back("execute_on");
8819 
8820  // Apply the common parameters loaded with Outputs input syntax
8821  const InputParameters * common = output_warehouse.getCommonParameters();
8822  if (common)
8823  parameters.applyParameters(*common, exclude);
8824  if (common && std::find(exclude.begin(), exclude.end(), "execute_on") != exclude.end() &&
8825  common->isParamSetByUser("execute_on") && object_type != "Console")
8827  "'execute_on' parameter specified in [Outputs] block is ignored for object '" +
8828  object_name +
8829  "'.\nDefine this object in its own sub-block of [Outputs] to modify its "
8830  "execution schedule.");
8831 
8832  // Set the correct value for the binary flag for XDA/XDR output
8833  if (object_type == "XDR")
8834  parameters.set<bool>("_binary") = true;
8835  else if (object_type == "XDA")
8836  parameters.set<bool>("_binary") = false;
8837 
8838  // Adjust the checkpoint suffix if auto recovery was enabled
8839  if (object_name == "auto_recovery_checkpoint")
8840  parameters.set<std::string>("suffix") = "auto_recovery";
8841 
8842  // Create the object and add it to the warehouse
8843  std::shared_ptr<Output> output = _factory.create<Output>(object_type, object_name, parameters);
8844  logAdd("Output", object_name, object_type, parameters);
8845  output_warehouse.addOutput(output);
8846 }
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
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...
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named 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 mooseInfoRepeated(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:377
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
Method for applying common parameters.
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.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Based class for output objects.
Definition: Output.h:43
virtual std::unique_ptr< Base > create()=0
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
Class for storing and utilizing output objects.
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was set by the user.
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
Definition: MooseApp.h:1605
const InputParameters * getCommonParameters() const
Get a reference to the common output parameters.
void addOutput(std::shared_ptr< Output > output)
Adds an existing output object to the warehouse.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28

◆ 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 1338 of file SubProblem.h.

Referenced by FunctorMaterial::addFunctorPropertyByBlocks().

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

◆ addPostprocessor()

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

Reimplemented in MFEMProblem.

Definition at line 4236 of file FEProblemBase.C.

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

4239 {
4240  // Check for name collision
4241  if (hasUserObject(name))
4242  mooseError("A UserObject with the name \"",
4243  name,
4244  "\" already exists. You may not add a Postprocessor by the same name.");
4245 
4246  addUserObject(pp_name, name, parameters);
4247 }
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addPredictor()

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

Definition at line 6769 of file FEProblemBase.C.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector().

6772 {
6773  parallel_object_only();
6774 
6776  mooseError("Vector bounds cannot be used with LinearSystems!");
6777 
6778  parameters.set<SubProblem *>("_subproblem") = this;
6779  std::shared_ptr<Predictor> predictor = _factory.create<Predictor>(type, name, parameters);
6780  logAdd("Predictor", name, type, parameters);
6781 
6782  for (auto & nl : _nl)
6783  nl->setPredictor(predictor);
6784 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
virtual std::size_t numNonlinearSystems() const override
Base class for predictors.
Definition: Predictor.h:28
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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 const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
virtual std::unique_ptr< Base > create()=0
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
virtual std::size_t numLinearSystems() const override

◆ addReporter()

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

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 4264 of file FEProblemBase.C.

Referenced by MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer().

4267 {
4268  // Check for name collision
4269  if (hasUserObject(name))
4270  mooseError(std::string("A UserObject with the name \"") + name +
4271  "\" already exists. You may not add a Reporter by the same name.");
4272 
4274 }
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addResidual()

void FEProblemBase::addResidual ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1817 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1818 {
1819  _assembly[tid][_current_nl_sys->number()]->addResidual(Assembly::GlobalDataKey{},
1821 
1822  if (_displaced_problem)
1823  _displaced_problem->addResidual(tid);
1824 }
virtual const std::vector< VectorTag > & currentResidualVectorTags() const override
Return the residual vector tags we are currently computing.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addResidualLower()

void FEProblemBase::addResidualLower ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1837 of file FEProblemBase.C.

Referenced by ComputeResidualThread::accumulateLower(), ComputeResidualAndJacobianThread::accumulateLower(), ComputeResidualThread::accumulateNeighborLower(), and ComputeResidualAndJacobianThread::accumulateNeighborLower().

1838 {
1839  _assembly[tid][_current_nl_sys->number()]->addResidualLower(Assembly::GlobalDataKey{},
1841 
1842  if (_displaced_problem)
1843  _displaced_problem->addResidualLower(tid);
1844 }
virtual const std::vector< VectorTag > & currentResidualVectorTags() const override
Return the residual vector tags we are currently computing.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addResidualNeighbor()

void FEProblemBase::addResidualNeighbor ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1827 of file FEProblemBase.C.

Referenced by ComputeResidualThread::accumulateNeighbor(), ComputeResidualAndJacobianThread::accumulateNeighbor(), ComputeResidualThread::accumulateNeighborLower(), and ComputeResidualAndJacobianThread::accumulateNeighborLower().

1828 {
1829  _assembly[tid][_current_nl_sys->number()]->addResidualNeighbor(Assembly::GlobalDataKey{},
1831 
1832  if (_displaced_problem)
1833  _displaced_problem->addResidualNeighbor(tid);
1834 }
virtual const std::vector< VectorTag > & currentResidualVectorTags() const override
Return the residual vector tags we are currently computing.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addResidualScalar()

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

Definition at line 1847 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeResidualInternal().

1848 {
1849  _assembly[tid][_current_nl_sys->number()]->addResidualScalar(Assembly::GlobalDataKey{},
1851 }
virtual const std::vector< VectorTag > & currentResidualVectorTags() const override
Return the residual vector tags we are currently computing.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ addSampler()

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

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

Definition at line 2699 of file FEProblemBase.C.

2702 {
2703  const auto samplers = addObject<Sampler>(type, name, parameters);
2704  for (auto & sampler : samplers)
2705  sampler->init();
2706 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
const InputParameters & parameters() const
Get the parameters of the object.

◆ addScalarKernel()

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

Definition at line 2999 of file FEProblemBase.C.

3002 {
3003  parallel_object_only();
3004 
3005  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3006  if (!isSolverSystemNonlinear(nl_sys_num))
3007  mooseError("You are trying to add a ScalarKernel to a linear variable/system, which is not "
3008  "supported at the moment!");
3009 
3010  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3011  {
3012  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3013  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3014  }
3015  else
3016  {
3017  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3018  {
3019  // We allow ScalarKernels to request that they use_displaced_mesh,
3020  // but then be overridden when no displacements variables are
3021  // provided in the Mesh block. If that happened, update the value
3022  // of use_displaced_mesh appropriately for this ScalarKernel.
3023  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3024  parameters.set<bool>("use_displaced_mesh") = false;
3025  }
3026 
3027  parameters.set<SubProblem *>("_subproblem") = this;
3028  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3029  }
3030 
3031  logAdd("ScalarKernel", name, kernel_name, parameters);
3032  _nl[nl_sys_num]->addScalarKernel(kernel_name, name, parameters);
3033 }
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
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.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
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 parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addTimeIntegrator()

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

Definition at line 6734 of file FEProblemBase.C.

Referenced by TransientBase::setupTimeIntegrator().

6737 {
6738  parallel_object_only();
6739 
6740  parameters.set<SubProblem *>("_subproblem") = this;
6741  logAdd("TimeIntegrator", name, type, parameters);
6742  _aux->addTimeIntegrator(type, name + ":aux", parameters);
6743  for (auto & sys : _solver_systems)
6744  sys->addTimeIntegrator(type, name + ":" + sys->name(), parameters);
6745  _has_time_integrator = true;
6746 
6747  // add vectors to store u_dot, u_dotdot, udot_old, u_dotdot_old and
6748  // solution vectors older than 2 time steps, if requested by the time
6749  // integrator
6750  _aux->addDotVectors();
6751  for (auto & nl : _nl)
6752  {
6753  nl->addDotVectors();
6754 
6755  auto tag_udot = nl->getTimeIntegrators()[0]->uDotFactorTag();
6756  if (!nl->hasVector(tag_udot))
6757  nl->associateVectorToTag(*nl->solutionUDot(), tag_udot);
6758  auto tag_udotdot = nl->getTimeIntegrators()[0]->uDotDotFactorTag();
6759  if (!nl->hasVector(tag_udotdot) && uDotDotRequested())
6760  nl->associateVectorToTag(*nl->solutionUDotDot(), tag_udotdot);
6761  }
6762 
6763  if (_displaced_problem)
6764  // Time integrator does not exist when displaced problem is created.
6765  _displaced_problem->addTimeIntegrator();
6766 }
virtual bool uDotDotRequested()
Get boolean flag to check whether solution second time derivative needs to be stored.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addTransfer()

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

Add a Transfer to the problem.

Reimplemented in MFEMProblem.

Definition at line 5586 of file FEProblemBase.C.

Referenced by MFEMProblem::addTransfer().

5589 {
5590  parallel_object_only();
5591 
5592  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5593  {
5594  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5595  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5596  _reinit_displaced_elem = true;
5597  }
5598  else
5599  {
5600  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5601  {
5602  // We allow Transfers to request that they use_displaced_mesh,
5603  // but then be overridden when no displacements variables are
5604  // provided in the Mesh block. If that happened, update the value
5605  // of use_displaced_mesh appropriately for this Transfer.
5606  if (parameters.have_parameter<bool>("use_displaced_mesh"))
5607  parameters.set<bool>("use_displaced_mesh") = false;
5608  }
5609 
5610  parameters.set<SubProblem *>("_subproblem") = this;
5611  parameters.set<SystemBase *>("_sys") = _aux.get();
5612  }
5613 
5614  // Handle the "SAME_AS_MULTIAPP" execute option. The get method is used to test for the
5615  // flag so the set by user flag is not reset, calling set with the true flag causes the set
5616  // by user status to be reset, which should only be done if the EXEC_SAME_AS_MULTIAPP is
5617  // being applied to the object.
5619  {
5620  ExecFlagEnum & exec_enum = parameters.set<ExecFlagEnum>("execute_on", true);
5621  std::shared_ptr<MultiApp> multiapp;
5622  if (parameters.isParamValid("multi_app"))
5623  multiapp = getMultiApp(parameters.get<MultiAppName>("multi_app"));
5624  else if (parameters.isParamValid("from_multi_app"))
5625  multiapp = getMultiApp(parameters.get<MultiAppName>("from_multi_app"));
5626  else if (parameters.isParamValid("to_multi_app"))
5627  multiapp = getMultiApp(parameters.get<MultiAppName>("to_multi_app"));
5628  // else do nothing because the user has provided invalid input. They should get a nice error
5629  // about this during transfer construction. This necessitates checking for null in this next
5630  // line, however
5631  if (multiapp)
5632  exec_enum = multiapp->getParam<ExecFlagEnum>("execute_on");
5633  }
5634 
5635  // Create the Transfer objects
5636  std::shared_ptr<Transfer> transfer = _factory.create<Transfer>(transfer_name, name, parameters);
5637  logAdd("Transfer", name, transfer_name, parameters);
5638 
5639  // Add MultiAppTransfer object
5640  std::shared_ptr<MultiAppTransfer> multi_app_transfer =
5642  if (multi_app_transfer)
5643  {
5644  if (multi_app_transfer->directions().isValueSet(MultiAppTransfer::TO_MULTIAPP))
5645  _to_multi_app_transfers.addObject(multi_app_transfer);
5646  if (multi_app_transfer->directions().isValueSet(MultiAppTransfer::FROM_MULTIAPP))
5647  _from_multi_app_transfers.addObject(multi_app_transfer);
5648  if (multi_app_transfer->directions().isValueSet(MultiAppTransfer::BETWEEN_MULTIAPP))
5649  _between_multi_app_transfers.addObject(multi_app_transfer);
5650  }
5651  else
5652  _transfers.addObject(transfer);
5653 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< MultiApp > getMultiApp(const std::string &multi_app_name) const
Get a MultiApp object by name.
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
virtual std::unique_ptr< Base > create()=0
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
bool isValueSet(const std::string &value) const
Methods for seeing if a value is set in the MultiMooseEnum.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
Base class for all MultiAppTransfer objects.
const ExecFlagType EXEC_SAME_AS_MULTIAPP
Definition: Moose.C:49
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
Base class for all Transfer objects.
Definition: Transfer.h:36
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ addUserObject()

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

Definition at line 4277 of file FEProblemBase.C.

Referenced by MFEMProblem::addAuxKernel(), MFEMProblem::addBoundaryCondition(), MFEMProblem::addFESpace(), MFEMProblem::addFunctorMaterial(), MFEMProblem::addGridFunction(), MFEMProblem::addInitialCondition(), MFEMProblem::addKernel(), MFEMProblem::addMFEMPreconditioner(), MFEMProblem::addMFEMSolver(), FEProblemBase::addPostprocessor(), FEProblemBase::addReporter(), MFEMProblem::addSubMesh(), MFEMProblem::addTransfer(), and FEProblemBase::addVectorPostprocessor().

4280 {
4281  parallel_object_only();
4282 
4283  std::vector<std::shared_ptr<UserObject>> uos;
4284 
4285  // Add the _subproblem and _sys parameters depending on use_displaced_mesh
4287 
4288  for (const auto tid : make_range(libMesh::n_threads()))
4289  {
4290  // Create the UserObject
4291  std::shared_ptr<UserObject> user_object =
4292  _factory.create<UserObject>(user_object_name, name, parameters, tid);
4293  logAdd("UserObject", name, user_object_name, parameters);
4294  uos.push_back(user_object);
4295 
4296  if (tid != 0)
4297  user_object->setPrimaryThreadCopy(uos[0].get());
4298 
4299  // TODO: delete this line after apps have been updated to not call getUserObjects
4300  _all_user_objects.addObject(user_object, tid);
4301 
4302  theWarehouse().add(user_object);
4303 
4304  // Attempt to create all the possible UserObject types
4305  auto euo = std::dynamic_pointer_cast<ElementUserObject>(user_object);
4306  auto suo = std::dynamic_pointer_cast<SideUserObject>(user_object);
4307  auto isuo = std::dynamic_pointer_cast<InternalSideUserObject>(user_object);
4308  auto iuob = std::dynamic_pointer_cast<InterfaceUserObjectBase>(user_object);
4309  auto nuo = std::dynamic_pointer_cast<NodalUserObject>(user_object);
4310  auto duo = std::dynamic_pointer_cast<DomainUserObject>(user_object);
4311  auto guo = std::dynamic_pointer_cast<GeneralUserObject>(user_object);
4312  auto tguo = std::dynamic_pointer_cast<ThreadedGeneralUserObject>(user_object);
4313  auto muo = std::dynamic_pointer_cast<MortarUserObject>(user_object);
4314 
4315  // Account for displaced mesh use
4316  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4317  {
4318  if (euo || nuo || duo)
4319  _reinit_displaced_elem = true;
4320  else if (suo || duo)
4321  // shouldn't we add isuo
4322  _reinit_displaced_face = true;
4323  else if (iuob || duo)
4325  }
4326 
4327  // These objects only require one thread
4328  if ((guo && !tguo) || muo)
4329  break;
4330  }
4331 
4332  // Add as a Functor if it is one. We usually need to add the user object from thread 0 as the
4333  // registered functor for all threads because when user objects are thread joined, generally only
4334  // the primary thread copy ends up with all the data
4335  for (const auto tid : make_range(libMesh::n_threads()))
4336  {
4337  const decltype(uos)::size_type uo_index = uos.front()->needThreadedCopy() ? tid : 0;
4338  if (const auto functor = dynamic_cast<Moose::FunctorBase<Real> *>(uos[uo_index].get()))
4339  {
4340  this->addFunctor(name, *functor, tid);
4341  if (_displaced_problem)
4342  _displaced_problem->addFunctor(name, *functor, tid);
4343  }
4344  }
4345 
4346  return uos;
4347 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
unsigned int n_threads()
Base class for implementing interface user objects.
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.
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...
Definition: TheWarehouse.C:116
void addFunctor(const std::string &name, const Moose::FunctorBase< T > &functor, const THREAD_ID tid)
add a functor to the problem functor container
Definition: SubProblem.h:1375
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.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
Base class for user objects executed one or more sidesets, which may be on the outer boundary of the ...
This user object allows related evaluations on elements, boundaries, internal sides, interfaces in one single place.
Base class for creating new nodally-based mortar user objects.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
A user object that runs over all the nodes and does an aggregation step to compute a single value...
virtual std::unique_ptr< Base > create()=0
TheWarehouse & theWarehouse() const
Base class for user objects executed on all element sides internal to one or more blocks...
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
IntRange< T > make_range(T beg, T end)
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().
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
Base class for user-specific data.
Definition: UserObject.h:40
An instance of this object type has one copy per thread that runs on each thread. ...

◆ addVariable()

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

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 MFEMProblem.

Definition at line 2839 of file FEProblemBase.C.

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

2842 {
2843  parallel_object_only();
2844 
2845  const auto order = Utility::string_to_enum<Order>(params.get<MooseEnum>("order"));
2846  const auto family = Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family"));
2847  const auto fe_type = FEType(order, family);
2848 
2849  const auto active_subdomains_vector =
2850  _mesh.getSubdomainIDs(params.get<std::vector<SubdomainName>>("block"));
2851  const std::set<SubdomainID> active_subdomains(active_subdomains_vector.begin(),
2852  active_subdomains_vector.end());
2853 
2854  if (duplicateVariableCheck(var_name, fe_type, /* is_aux = */ false, &active_subdomains))
2855  return;
2856 
2857  params.set<FEProblemBase *>("_fe_problem_base") = this;
2858  params.set<Moose::VarKindType>("_var_kind") = Moose::VarKindType::VAR_SOLVER;
2859  SolverSystemName sys_name = params.get<SolverSystemName>("solver_sys");
2860 
2861  const auto solver_system_number = solverSysNum(sys_name);
2862  logAdd("Variable", var_name, var_type, params);
2863  _solver_systems[solver_system_number]->addVariable(var_type, var_name, params);
2864  if (_displaced_problem)
2865  // MooseObjects need to be unique so change the name here
2866  _displaced_problem->addVariable(var_type, var_name, params, solver_system_number);
2867 
2868  _solver_var_to_sys_num[var_name] = solver_system_number;
2869 
2870  markFamilyPRefinement(params);
2871 }
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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.
std::map< SolverVariableName, unsigned int > _solver_var_to_sys_num
Map connecting variable names with their respective solver systems.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
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:1734
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:714
MooseMesh & _mesh
void markFamilyPRefinement(const InputParameters &params)
Mark a variable family for either disabling or enabling p-refinement with valid parameters of a varia...
Definition: SubProblem.C:1367
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
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.
unsigned int solverSysNum(const SolverSystemName &solver_sys_name) const override
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addVectorPostprocessor()

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

Definition at line 4250 of file FEProblemBase.C.

Referenced by ExtraIDIntegralReporter::ExtraIDIntegralReporter().

4253 {
4254  // Check for name collision
4255  if (hasUserObject(name))
4256  mooseError("A UserObject with the name \"",
4257  name,
4258  "\" already exists. You may not add a VectorPostprocessor by the same name.");
4259 
4260  addUserObject(pp_name, name, parameters);
4261 }
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ 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 92 of file SubProblem.C.

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

94 {
96  mooseError("Vector tag type cannot be VECTOR_TAG_ANY");
97 
98  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
99 
100  // First, see if the tag exists already
101  for (const auto & vector_tag : _vector_tags)
102  {
103  mooseAssert(_vector_tags[vector_tag._id] == vector_tag, "Vector tags index mismatch");
104  if (vector_tag._name == tag_name_upper)
105  {
106  if (vector_tag._type != type)
107  mooseError("While attempting to add vector tag with name '",
108  tag_name_upper,
109  "' and type ",
110  type,
111  ",\na tag with the same name but type ",
112  vector_tag._type,
113  " was found.\n\nA tag can only exist with one type.");
114 
115  return vector_tag._id;
116  }
117  }
118 
119  // Doesn't exist - create it
120  const TagID new_tag_id = _vector_tags.size();
121  const TagTypeID new_tag_type_id = _typed_vector_tags[type].size();
122  // Primary storage for all tags where the index in the vector == the tag ID
123  _vector_tags.emplace_back(new_tag_id, new_tag_type_id, tag_name_upper, type);
124  // Secondary storage for each type so that we can have quick access to all tags of a type
125  _typed_vector_tags[type].emplace_back(new_tag_id, new_tag_type_id, tag_name_upper, type);
126  // Name map storage for quick name access
127  _vector_tags_name_map.emplace(tag_name_upper, new_tag_id);
128 
129  // Make sure that _vector_tags, _typed_vector_tags, and _vector_tags_name_map are sane
131 
132  return new_tag_id;
133 }
unsigned int TagTypeID
Definition: MooseTypes.h:211
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
unsigned int TagID
Definition: MooseTypes.h:210
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1167
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1177
std::vector< std::vector< VectorTag > > _typed_vector_tags
The vector tags associated with each VectorTagType This is kept separate from _vector_tags for quick ...
Definition: SubProblem.h:1174
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ advanceMultiApps()

void FEProblemBase::advanceMultiApps ( ExecFlagType  type)
inlineinherited

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

Definition at line 1327 of file FEProblemBase.h.

1328  {
1329  mooseDeprecated("Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep "
1330  "depending on your purpose");
1332  }
void mooseDeprecated(Args &&... args) const
void finishMultiAppStep(ExecFlagType type, bool recurse_through_multiapp_levels=false)
Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ advanceState()

void FEProblemBase::advanceState ( )
virtualinherited

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

Reimplemented in DumpObjectsProblem.

Definition at line 6588 of file FEProblemBase.C.

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

6589 {
6590  TIME_SECTION("advanceState", 5, "Advancing State");
6591 
6592  for (auto & sys : _solver_systems)
6593  sys->copyOldSolutions();
6594  _aux->copyOldSolutions();
6595 
6596  if (_displaced_problem)
6597  {
6598  for (const auto i : index_range(_solver_systems))
6599  _displaced_problem->solverSys(i).copyOldSolutions();
6600  _displaced_problem->auxSys().copyOldSolutions();
6601  }
6602 
6604 
6606 
6609 
6612 
6615 }
void shift()
Shift the material properties in time.
MaterialPropertyStorage & _bnd_material_props
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
void copyValuesBack()
Copies current chain control data values into old values.
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:45
ReporterData _reporter_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void copyValuesBack()
At the end of a timestep this method is called to copy the values back in time in preparation for the...
Definition: ReporterData.C:17
ChainControlDataSystem & getChainControlDataSystem()
Gets the system that manages the ChainControls.
Definition: MooseApp.h:862
std::shared_ptr< DisplacedProblem > _displaced_problem
MaterialPropertyStorage & _neighbor_material_props
MaterialPropertyStorage & _material_props
auto index_range(const T &sizable)

◆ allowInvalidSolution()

bool FEProblemBase::allowInvalidSolution ( ) const
inlineinherited

Whether to accept / allow an invalid solution.

Definition at line 1986 of file FEProblemBase.h.

Referenced by FEProblemBase::acceptInvalidSolution().

1986 { return _allow_invalid_solution; }
const bool _allow_invalid_solution

◆ allowOutput() [1/2]

void FEProblemBase::allowOutput ( bool  state)
inherited

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 6680 of file FEProblemBase.C.

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

6681 {
6683 }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
void allowOutput(bool state)
Ability to enable/disable output calls This is private, users should utilize FEProblemBase::allowOutp...
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407

◆ allowOutput() [2/2]

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

Definition at line 3096 of file FEProblemBase.h.

3097 {
3098  _app.getOutputWarehouse().allowOutput<T>(state);
3099 }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
void allowOutput(bool state)
Ability to enable/disable output calls This is private, users should utilize FEProblemBase::allowOutp...
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407

◆ areCoupled()

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

Definition at line 6134 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

6137 {
6138  return (*_cm[nl_sys])(ivar, jvar);
6139 }
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
Coupling matrix for variables.

◆ assembly() [1/2]

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

◆ assembly() [2/2]

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

Implements SubProblem.

Definition at line 3253 of file FEProblemBase.h.

3254 {
3255  mooseAssert(tid < _assembly.size(), "Assembly objects not initialized");
3256  mooseAssert(sys_num < _assembly[tid].size(),
3257  "System number larger than the assembly container size");
3258  return *_assembly[tid][sys_num];
3259 }
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ automaticScaling() [1/4]

bool SubProblem::automaticScaling ( ) const
inherited

Automatic scaling getter.

Returns
A boolean representing whether we are performing automatic scaling

Definition at line 1162 of file SubProblem.C.

Referenced by FEProblemBase::automaticScaling(), and DisplacedProblem::DisplacedProblem().

1163 {
1164  // Currently going to assume that we are applying or not applying automatic scaling consistently
1165  // across nonlinear systems
1167 }
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.
bool automaticScaling() const
Getter for whether we are performing automatic scaling.
Definition: SystemBase.h:122

◆ automaticScaling() [2/4]

void SubProblem::automaticScaling
inherited

Automatic scaling setter.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Definition at line 1155 of file SubProblem.C.

1156 {
1157  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1158  systemBaseNonlinear(nl_sys_num).automaticScaling(automatic_scaling);
1159 }
virtual std::size_t numNonlinearSystems() const override
bool automaticScaling() const
Getter for whether we are performing automatic scaling.
Definition: SystemBase.h:122
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.
IntRange< T > make_range(T beg, T end)

◆ automaticScaling() [3/4]

bool SubProblem::automaticScaling
inherited

Automatic scaling getter.

Returns
A boolean representing whether we are performing automatic scaling

Definition at line 1162 of file SubProblem.C.

1163 {
1164  // Currently going to assume that we are applying or not applying automatic scaling consistently
1165  // across nonlinear systems
1167 }
bool automaticScaling() const
Getter for whether we are performing automatic scaling.
Definition: SystemBase.h:122
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.

◆ automaticScaling() [4/4]

void FEProblemBase::automaticScaling ( bool  automatic_scaling)
overridevirtualinherited

Automatic scaling setter.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Reimplemented from SubProblem.

Definition at line 8967 of file FEProblemBase.C.

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

8968 {
8969  if (_displaced_problem)
8970  _displaced_problem->automaticScaling(automatic_scaling);
8971 
8972  SubProblem::automaticScaling(automatic_scaling);
8973 }
bool automaticScaling() const
Automatic scaling getter.
Definition: SubProblem.C:1162
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ backupMultiApps()

void FEProblemBase::backupMultiApps ( ExecFlagType  type)
inherited

Backup the MultiApps associated with the ExecFlagType.

Definition at line 5507 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup(), and FixedPointSolve::solve().

5508 {
5509  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5510 
5511  if (multi_apps.size())
5512  {
5513  TIME_SECTION("backupMultiApps", 5, "Backing Up MultiApp");
5514 
5515  if (_verbose_multiapps)
5516  _console << COLOR_CYAN << "\nBacking Up MultiApps on " << type.name() << COLOR_DEFAULT
5517  << std::endl;
5518 
5519  for (const auto & multi_app : multi_apps)
5520  multi_app->backup();
5521 
5523 
5524  if (_verbose_multiapps)
5525  _console << COLOR_CYAN << "Finished Backing Up MultiApps on " << type.name() << "\n"
5526  << COLOR_DEFAULT << std::endl;
5527  }
5528 }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
const Parallel::Communicator & _communicator
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 libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
Definition: MooseUtils.C:323
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ bumpAllQRuleOrder()

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

Definition at line 5991 of file FEProblemBase.C.

5992 {
5993  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
5994  for (const auto i : index_range(_nl))
5995  _assembly[tid][i]->bumpAllQRuleOrder(order, block);
5996 
5997  if (_displaced_problem)
5998  _displaced_problem->bumpAllQRuleOrder(order, block);
5999 
6000  updateMaxQps();
6001 }
unsigned int n_threads()
void bumpAllQRuleOrder(libMesh::Order order, SubdomainID block)
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
auto index_range(const T &sizable)

◆ bumpVolumeQRuleOrder()

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

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 5978 of file FEProblemBase.C.

5979 {
5980  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
5981  for (const auto i : index_range(_nl))
5982  _assembly[tid][i]->bumpVolumeQRuleOrder(order, block);
5983 
5984  if (_displaced_problem)
5985  _displaced_problem->bumpVolumeQRuleOrder(order, block);
5986 
5987  updateMaxQps();
5988 }
unsigned int n_threads()
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
void bumpVolumeQRuleOrder(libMesh::Order order, SubdomainID block)
Increases the element/volume quadrature order for the specified mesh block if and only if the current...
std::shared_ptr< DisplacedProblem > _displaced_problem
auto index_range(const T &sizable)

◆ cacheJacobian()

void FEProblemBase::cacheJacobian ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 1968 of file FEProblemBase.C.

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

1969 {
1971  if (_displaced_problem)
1972  _displaced_problem->cacheJacobian(tid);
1973 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void cacheJacobian(const THREAD_ID tid)
Definition: SubProblem.C:1312

◆ cacheJacobianNeighbor()

void FEProblemBase::cacheJacobianNeighbor ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 1976 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

1977 {
1979  if (_displaced_problem)
1980  _displaced_problem->cacheJacobianNeighbor(tid);
1981 }
virtual void cacheJacobianNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1320
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ cacheResidual()

void FEProblemBase::cacheResidual ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 1854 of file FEProblemBase.C.

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

1855 {
1857  if (_displaced_problem)
1858  _displaced_problem->cacheResidual(tid);
1859 }
virtual void cacheResidual(const THREAD_ID tid)
Definition: SubProblem.C:1291
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ cacheResidualNeighbor()

void FEProblemBase::cacheResidualNeighbor ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 1862 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals().

1863 {
1865  if (_displaced_problem)
1866  _displaced_problem->cacheResidualNeighbor(tid);
1867 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void cacheResidualNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1298

◆ callMooseError()

void MooseBase::callMooseError ( std::string  msg,
const bool  with_prefix 
) const
inherited

Calls moose error with the message msg.

Will prefix the message with the subapp name if one exists.

If with_prefix, then add the prefix from errorPrefix() to the error.

Definition at line 33 of file MooseBase.C.

Referenced by InputParameters::callMooseErrorHelper(), MooseBaseErrorInterface::mooseDocumentedError(), MooseBaseErrorInterface::mooseError(), MooseBaseErrorInterface::mooseErrorNonPrefixed(), and MooseBaseParameterInterface::paramError().

34 {
36  const std::string prefix = _app.isUltimateMaster() ? "" : _app.name();
37  if (with_prefix)
38  msg = errorPrefix("error") + msg;
39  moose::internal::mooseErrorRaw(msg, prefix);
40 }
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:837
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::string errorPrefix(const std::string &error_type) const
Definition: MooseBase.C:43
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
void mooseErrorRaw(std::string msg, const std::string prefix="")
Definition: MooseError.C:53
void mooseConsole()
Send current output buffer to Console output objects.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407

◆ checkBlockMatProps()

void SubProblem::checkBlockMatProps ( )
virtualinherited

Checks block material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 623 of file SubProblem.C.

Referenced by FEProblemBase::checkProblemIntegrity().

624 {
625  // Variable for storing all available blocks/boundaries from the mesh
626  std::set<SubdomainID> all_ids(mesh().meshSubdomains());
627 
628  std::stringstream errors;
629 
630  // Loop through the properties to check
631  for (const auto & check_it : _map_block_material_props_check)
632  {
633  // The current id for the property being checked (BoundaryID || BlockID)
634  SubdomainID check_id = check_it.first;
635 
636  std::set<SubdomainID> check_ids = {check_id};
637 
638  // Loop through all the block/boundary ids
639  for (const auto & id : check_ids)
640  {
641  // Loop through all the stored properties
642  for (const auto & prop_it : check_it.second)
643  {
644  // Produce an error if the material property is not defined on the current block/boundary
645  // and any block/boundary
646  // and not is not a zero material property.
647  if (_map_block_material_props[id].count(prop_it.second) == 0 &&
648  _zero_block_material_props[id].count(prop_it.second) == 0)
649  {
650  std::string check_name = restrictionSubdomainCheckName(id);
651  if (check_name.empty())
652  check_name = std::to_string(id);
653  errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
654  << "' is not defined on block " << check_name << "\n";
655  }
656  }
657  }
658  }
659 
660  if (!errors.str().empty())
661  mooseError(errors.str());
662 }
virtual MooseMesh & mesh()=0
std::string restrictionSubdomainCheckName(SubdomainID check_id)
Helper functions for checking MaterialProperties.
Definition: SubProblem.C:772
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:1058
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
Definition: SubProblem.h:1070
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1052

◆ checkBoundaryMatProps()

void SubProblem::checkBoundaryMatProps ( )
virtualinherited

Checks boundary material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 665 of file SubProblem.C.

Referenced by FEProblemBase::checkProblemIntegrity().

666 {
667  // Variable for storing the value for ANY_BOUNDARY_ID
669 
670  // Variable for storing all available blocks/boundaries from the mesh
671  std::set<BoundaryID> all_ids(mesh().getBoundaryIDs());
672 
673  std::stringstream errors;
674 
675  // Loop through the properties to check
676  for (const auto & check_it : _map_boundary_material_props_check)
677  {
678  // The current id for the property being checked (BoundaryID || BlockID)
679  BoundaryID check_id = check_it.first;
680 
681  // In the case when the material being checked has an ID is set to ANY, then loop through all
682  // the possible ids and verify that the material property is defined.
683  std::set<BoundaryID> check_ids{check_id};
684  if (check_id == any_id)
685  check_ids = all_ids;
686 
687  // Loop through all the block/boundary ids
688  for (const auto & id : check_ids)
689  {
690  // Loop through all the stored properties
691  for (const auto & prop_it : check_it.second)
692  {
693  // Produce an error if the material property is not defined on the current block/boundary
694  // and any block/boundary
695  // and not is not a zero material property.
696  if (_map_boundary_material_props[id].count(prop_it.second) == 0 &&
697  _map_boundary_material_props[any_id].count(prop_it.second) == 0 &&
698  _zero_boundary_material_props[id].count(prop_it.second) == 0 &&
699  _zero_boundary_material_props[any_id].count(prop_it.second) == 0)
700  {
701  std::string check_name = restrictionBoundaryCheckName(id);
702  if (check_name.empty())
703  check_name = std::to_string(id);
704  errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
705  << "' is not defined on boundary " << check_name << "\n";
706  }
707  }
708  }
709  }
710 
711  if (!errors.str().empty())
712  mooseError(errors.str());
713 }
virtual MooseMesh & mesh()=0
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
Definition: SubProblem.h:1071
std::string restrictionBoundaryCheckName(BoundaryID check_id)
Definition: SubProblem.C:783
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:1059
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1055
boundary_id_type BoundaryID
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.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:21

◆ checkCoordinateSystems()

void FEProblemBase::checkCoordinateSystems ( )
protectedinherited

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

Definition at line 8596 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

8597 {
8599 }
MooseMesh & _mesh
void checkCoordinateSystems()
Performs a sanity check for every element in the mesh.
Definition: MooseMesh.C:4276

◆ checkDependMaterialsHelper()

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

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 8471 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

8473 {
8474  for (const auto & it : materials_map)
8475  {
8477  std::set<std::string> block_depend_props, block_supplied_props;
8478 
8479  for (const auto & mat1 : it.second)
8480  {
8481  const std::set<std::string> & depend_props = mat1->getRequestedItems();
8482  block_depend_props.insert(depend_props.begin(), depend_props.end());
8483 
8484  auto & alldeps = mat1->getMatPropDependencies(); // includes requested stateful props
8485  for (auto & dep : alldeps)
8486  if (const auto name = _material_props.queryStatefulPropName(dep))
8487  block_depend_props.insert(*name);
8488 
8489  // See if any of the active materials supply this property
8490  for (const auto & mat2 : it.second)
8491  {
8492  const std::set<std::string> & supplied_props = mat2->MaterialBase::getSuppliedItems();
8493  block_supplied_props.insert(supplied_props.begin(), supplied_props.end());
8494  }
8495  }
8496 
8497  // Add zero material properties specific to this block and unrestricted
8498  block_supplied_props.insert(_zero_block_material_props[it.first].begin(),
8499  _zero_block_material_props[it.first].end());
8500 
8501  // Error check to make sure all properties consumed by materials are supplied on this block
8502  std::set<std::string> difference;
8503  std::set_difference(block_depend_props.begin(),
8504  block_depend_props.end(),
8505  block_supplied_props.begin(),
8506  block_supplied_props.end(),
8507  std::inserter(difference, difference.end()));
8508 
8509  if (!difference.empty())
8510  {
8511  std::ostringstream oss;
8512  oss << "One or more Material Properties were not supplied on block ";
8513  const std::string & subdomain_name = _mesh.getSubdomainName(it.first);
8514  if (subdomain_name.length() > 0)
8515  oss << subdomain_name << " (" << it.first << ")";
8516  else
8517  oss << it.first;
8518  oss << ":\n";
8519  for (const auto & name : difference)
8520  oss << name << "\n";
8521  mooseError(oss.str());
8522  }
8523  }
8524 
8525  // This loop checks that materials are not supplied by multiple Material objects
8526  for (const auto & it : materials_map)
8527  {
8528  const auto & materials = it.second;
8529  std::set<std::string> inner_supplied, outer_supplied;
8530 
8531  for (const auto & outer_mat : materials)
8532  {
8533  // Storage for properties for this material (outer) and all other materials (inner)
8534  outer_supplied = outer_mat->getSuppliedItems();
8535  inner_supplied.clear();
8536 
8537  // Property to material map for error reporting
8538  std::map<std::string, std::set<std::string>> prop_to_mat;
8539  for (const auto & name : outer_supplied)
8540  prop_to_mat[name].insert(outer_mat->name());
8541 
8542  for (const auto & inner_mat : materials)
8543  {
8544  if (outer_mat == inner_mat)
8545  continue;
8546 
8547  // Check whether these materials are an AD pair
8548  auto outer_mat_type = outer_mat->type();
8549  auto inner_mat_type = inner_mat->type();
8550  removeSubstring(outer_mat_type, "<RESIDUAL>");
8551  removeSubstring(outer_mat_type, "<JACOBIAN>");
8552  removeSubstring(inner_mat_type, "<RESIDUAL>");
8553  removeSubstring(inner_mat_type, "<JACOBIAN>");
8554  if (outer_mat_type == inner_mat_type && outer_mat_type != outer_mat->type() &&
8555  inner_mat_type != inner_mat->type())
8556  continue;
8557 
8558  inner_supplied.insert(inner_mat->getSuppliedItems().begin(),
8559  inner_mat->getSuppliedItems().end());
8560 
8561  for (const auto & inner_supplied_name : inner_supplied)
8562  prop_to_mat[inner_supplied_name].insert(inner_mat->name());
8563  }
8564 
8565  // Test that a property isn't supplied on multiple blocks
8566  std::set<std::string> intersection;
8567  std::set_intersection(outer_supplied.begin(),
8568  outer_supplied.end(),
8569  inner_supplied.begin(),
8570  inner_supplied.end(),
8571  std::inserter(intersection, intersection.end()));
8572 
8573  if (!intersection.empty())
8574  {
8575  std::ostringstream oss;
8576  oss << "The following material properties are declared on block " << it.first
8577  << " by multiple materials:\n";
8578  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << "Material Property"
8579  << "Material Objects\n";
8580  for (const auto & outer_name : intersection)
8581  {
8582  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << outer_name;
8583  for (const auto & inner_name : prop_to_mat[outer_name])
8584  oss << inner_name << " ";
8585  oss << '\n';
8586  }
8587 
8588  mooseError(oss.str());
8589  break;
8590  }
8591  }
8592  }
8593 }
std::string indent(unsigned int spaces)
Create empty string for indenting.
Definition: ConsoleUtils.C:41
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1758
std::optional< std::string > queryStatefulPropName(const unsigned int id) const
MooseMesh & _mesh
void removeSubstring(std::string &main, const std::string &sub)
find, erase, length algorithm for removing a substring from a string
Definition: MooseUtils.C:1296
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:1058
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MaterialPropertyStorage & _material_props
for(PetscInt i=0;i< nvars;++i)

◆ checkDisplacementOrders()

void FEProblemBase::checkDisplacementOrders ( )
protectedinherited

Verify that SECOND order mesh uses SECOND order displacements.

Definition at line 8395 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

8396 {
8397  if (_displaced_problem)
8398  {
8399  bool mesh_has_second_order_elements = false;
8400  for (const auto & elem : as_range(_displaced_mesh->activeLocalElementsBegin(),
8402  {
8403  if (elem->default_order() == SECOND)
8404  {
8405  mesh_has_second_order_elements = true;
8406  break;
8407  }
8408  }
8409 
8410  // We checked our local elements, so take the max over all processors.
8411  _displaced_mesh->comm().max(mesh_has_second_order_elements);
8412 
8413  // If the Mesh has second order elements, make sure the
8414  // displacement variables are second-order.
8415  if (mesh_has_second_order_elements)
8416  {
8417  const std::vector<std::string> & displacement_variables =
8418  _displaced_problem->getDisplacementVarNames();
8419 
8420  for (const auto & var_name : displacement_variables)
8421  {
8422  MooseVariableFEBase & mv =
8423  _displaced_problem->getVariable(/*tid=*/0,
8424  var_name,
8427  if (mv.order() != SECOND)
8428  mooseError("Error: mesh has SECOND order elements, so all displacement variables must be "
8429  "SECOND order.");
8430  }
8431  }
8432  }
8433 }
const Parallel::Communicator & comm() const
This class provides an interface for common operations on field variables of both FE and FV types wit...
SECOND
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
MeshBase::element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:3046
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
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
const MeshBase::element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:3052
MooseMesh * _displaced_mesh

◆ checkDuplicatePostprocessorVariableNames()

void FEProblemBase::checkDuplicatePostprocessorVariableNames ( )
inherited

Definition at line 1469 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

1470 {
1471  for (const auto & pp : _reporter_data.getPostprocessorNames())
1472  if (hasScalarVariable(pp))
1473  mooseError("Postprocessor \"" + pp +
1474  "\" has the same name as a scalar variable in the system.");
1475 }
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided...
ReporterData _reporter_data
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::set< std::string > getPostprocessorNames() const
Return a list of all postprocessor names.
Definition: ReporterData.C:71

◆ checkExceptionAndStopSolve()

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

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 6416 of file FEProblemBase.C.

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

6417 {
6419  return;
6420 
6421  TIME_SECTION("checkExceptionAndStopSolve", 5);
6422 
6423  // See if any processor had an exception. If it did, get back the
6424  // processor that the exception occurred on.
6425  unsigned int processor_id;
6426 
6428 
6429  if (_has_exception)
6430  {
6432 
6435  {
6436  // Print the message
6437  if (_communicator.rank() == 0 && print_message)
6438  {
6439  _console << "\n" << _exception_message << "\n";
6440  if (isTransient())
6441  _console
6442  << "To recover, the solution will fail and then be re-attempted with a reduced time "
6443  "step.\n"
6444  << std::endl;
6445  }
6446 
6447  // Stop the solve -- this entails setting
6448  // SNESSetFunctionDomainError() or directly inserting NaNs in the
6449  // residual vector to let PETSc >= 3.6 return DIVERGED_NANORINF.
6450  if (_current_nl_sys)
6452 
6453  if (_current_linear_sys)
6455 
6456  // and close Aux system (we MUST do this here; see #11525)
6457  _aux->solution().close();
6458 
6459  // We've handled this exception, so we no longer have one.
6460  _has_exception = false;
6461 
6462  // Force the next non-linear convergence check to fail (and all further residual evaluation
6463  // to be skipped).
6465 
6466  // Repropagate the exception, so it can be caught at a higher level, typically
6467  // this is NonlinearSystem::computeResidual().
6469  }
6470  else
6471  mooseError("The following parallel-communicated exception was detected during " +
6472  Moose::stringify(_current_execute_on_flag) + " evaluation:\n" +
6474  "\nBecause this did not occur during residual evaluation, there"
6475  " is no way to handle this, so the solution is aborting.\n");
6476  }
6477 }
virtual void stopSolve(const ExecFlagType &exec_flag, const std::set< TagID > &vector_tags_to_close) override
Quit the current solve as soon as possible.
Definition: LinearSystem.C:301
bool _skip_exception_check
If or not skip &#39;exception and stop solve&#39;.
ExecFlagType _current_execute_on_flag
Current execute_on flag.
processor_id_type rank() const
bool _has_exception
Whether or not an exception has occurred.
const Parallel::Communicator & _communicator
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
LinearSystem * _current_linear_sys
The current linear system that we are solving.
void maxloc(T &r, unsigned int &max_id) const
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
std::string _exception_message
The error message to go with an exception.
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
const ExecFlagType EXEC_POSTCHECK
Definition: Moose.C:33
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:31
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.
std::set< TagID > _fe_vector_tags
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
virtual bool isTransient() const override
bool _fail_next_system_convergence_check
processor_id_type processor_id() const

◆ checkingUOAuxState()

bool FEProblemBase::checkingUOAuxState ( ) const
inlineinherited

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 197 of file FEProblemBase.h.

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

197 { 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.

◆ checkNonlocalCoupling()

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

Definition at line 1594 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

1595 {
1596  TIME_SECTION("checkNonlocalCoupling", 5, "Checking Nonlocal Coupling");
1597 
1598  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
1599  for (auto & nl : _nl)
1600  {
1601  const auto & all_kernels = nl->getKernelWarehouse();
1602  const auto & kernels = all_kernels.getObjects(tid);
1603  for (const auto & kernel : kernels)
1604  {
1605  std::shared_ptr<NonlocalKernel> nonlocal_kernel =
1607  if (nonlocal_kernel)
1608  {
1611  _nonlocal_kernels.addObject(kernel, tid);
1612  }
1613  }
1614  const MooseObjectWarehouse<IntegratedBCBase> & all_integrated_bcs =
1615  nl->getIntegratedBCWarehouse();
1616  const auto & integrated_bcs = all_integrated_bcs.getObjects(tid);
1617  for (const auto & integrated_bc : integrated_bcs)
1618  {
1619  std::shared_ptr<NonlocalIntegratedBC> nonlocal_integrated_bc =
1621  if (nonlocal_integrated_bc)
1622  {
1625  _nonlocal_integrated_bcs.addObject(integrated_bc, tid);
1626  }
1627  }
1628  }
1629 }
unsigned int n_threads()
NonlocalIntegratedBC is used for solving integral terms in integro-differential equations.
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
bool _calculate_jacobian_in_uo
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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...
NonlocalKernel is used for solving integral terms in integro-differential equations.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:209
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
nonlocal integrated_bcs
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
nonlocal kernels

◆ checkNonlocalCouplingRequirement()

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

Implements SubProblem.

Definition at line 9397 of file FEProblemBase.C.

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

9398 {
9400 }
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag

◆ checkProblemIntegrity()

void FEProblemBase::checkProblemIntegrity ( )
virtualinherited

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 8229 of file FEProblemBase.C.

Referenced by EigenProblem::checkProblemIntegrity().

8230 {
8231  TIME_SECTION("checkProblemIntegrity", 5);
8232 
8233  // Check for unsatisfied actions
8234  const std::set<SubdomainID> & mesh_subdomains = _mesh.meshSubdomains();
8235 
8236  // Check kernel coverage of subdomains (blocks) in the mesh
8239  {
8240  std::set<SubdomainID> blocks;
8243  blocks = mesh_subdomains;
8245  {
8246  blocks = mesh_subdomains;
8247  for (const auto & subdomain_name : _kernel_coverage_blocks)
8248  {
8249  const auto id = _mesh.getSubdomainID(subdomain_name);
8250  if (id == Moose::INVALID_BLOCK_ID)
8251  paramError("kernel_coverage_block_list",
8252  "Subdomain \"" + subdomain_name + "\" not found in mesh.");
8253  blocks.erase(id);
8254  }
8255  }
8257  for (const auto & subdomain_name : _kernel_coverage_blocks)
8258  {
8259  const auto id = _mesh.getSubdomainID(subdomain_name);
8260  if (id == Moose::INVALID_BLOCK_ID)
8261  paramError("kernel_coverage_block_list",
8262  "Subdomain \"" + subdomain_name + "\" not found in mesh.");
8263  blocks.insert(id);
8264  }
8265  if (!blocks.empty())
8266  for (auto & nl : _nl)
8267  nl->checkKernelCoverage(blocks);
8268  }
8269 
8270  // Check materials
8271  {
8272 #ifdef LIBMESH_ENABLE_AMR
8273  if ((_adaptivity.isOn() || _num_grid_steps) &&
8276  {
8277  _console << "Using EXPERIMENTAL Stateful Material Property projection with Adaptivity!\n"
8278  << std::flush;
8279  }
8280 #endif
8281 
8282  std::set<SubdomainID> local_mesh_subs(mesh_subdomains);
8283 
8286  {
8291  bool check_material_coverage = false;
8292  std::set<SubdomainID> ids = _all_materials.getActiveBlocks();
8293  for (const auto & id : ids)
8294  {
8295  local_mesh_subs.erase(id);
8296  check_material_coverage = true;
8297  }
8298 
8299  // did the user limit the subdomains to be checked?
8301  {
8302  for (const auto & subdomain_name : _material_coverage_blocks)
8303  {
8304  const auto id = _mesh.getSubdomainID(subdomain_name);
8305  if (id == Moose::INVALID_BLOCK_ID)
8306  paramError("material_coverage_block_list",
8307  "Subdomain \"" + subdomain_name + "\" not found in mesh.");
8308  local_mesh_subs.erase(id);
8309  }
8310  }
8312  {
8313  std::set<SubdomainID> blocks(local_mesh_subs);
8314  for (const auto & subdomain_name : _material_coverage_blocks)
8315  {
8316  const auto id = _mesh.getSubdomainID(subdomain_name);
8317  if (id == Moose::INVALID_BLOCK_ID)
8318  paramError("material_coverage_block_list",
8319  "Subdomain \"" + subdomain_name + "\" not found in mesh.");
8320  blocks.erase(id);
8321  }
8322  for (const auto id : blocks)
8323  local_mesh_subs.erase(id);
8324  }
8325 
8326  // also exclude mortar spaces from the material check
8327  auto && mortar_subdomain_ids = _mortar_data.getMortarSubdomainIDs();
8328  for (auto subdomain_id : mortar_subdomain_ids)
8329  local_mesh_subs.erase(subdomain_id);
8330 
8331  // Check Material Coverage
8332  if (check_material_coverage && !local_mesh_subs.empty())
8333  {
8334  std::stringstream extra_subdomain_ids;
8336  std::copy(local_mesh_subs.begin(),
8337  local_mesh_subs.end(),
8338  std::ostream_iterator<unsigned int>(extra_subdomain_ids, " "));
8340  std::vector<SubdomainID> local_mesh_subs_vec(local_mesh_subs.begin(),
8341  local_mesh_subs.end());
8342 
8343  mooseError("The following blocks from your input mesh do not contain an active material: " +
8344  extra_subdomain_ids.str() +
8345  "(names: " + Moose::stringify(_mesh.getSubdomainNames(local_mesh_subs_vec)) +
8346  ")\nWhen ANY mesh block contains a Material object, "
8347  "all blocks must contain a Material object.\n");
8348  }
8349  }
8350 
8351  // Check material properties on blocks and boundaries
8354 
8355  // Check that material properties exist when requested by other properties on a given block
8356  const auto & materials = _all_materials.getActiveObjects();
8357  for (const auto & material : materials)
8358  material->checkStatefulSanity();
8359 
8360  // auto mats_to_check = _materials.getActiveBlockObjects();
8361  // const auto & discrete_materials = _discrete_materials.getActiveBlockObjects();
8362  // for (const auto & map_it : discrete_materials)
8363  // for (const auto & container_element : map_it.second)
8364  // mats_to_check[map_it.first].push_back(container_element);
8367  }
8368 
8369  checkUserObjects();
8370 
8371  // Verify that we don't have any Element type/Coordinate Type conflicts
8373 
8374  // Coordinate transforms are only intended for use with MultiApps at this time. If you are not
8375  // using multiapps but still require these, contact a moose developer
8377  !hasMultiApps())
8378  mooseError("Coordinate transformation parameters, listed below, are only to be used in the "
8379  "context of application to application field transfers at this time. The mesh is "
8380  "not modified by these parameters within an application.\n"
8381  "You should likely use a 'TransformGenerator' in the [Mesh] block to achieve the "
8382  "desired mesh modification.\n\n",
8384 
8385  // If using displacements, verify that the order of the displacement
8386  // variables matches the order of the elements in the displaced
8387  // mesh.
8389 
8390  // Check for postprocessor names with same name as a scalar variable
8392 }
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:837
MaterialPropertyStorage & _bnd_material_props
void checkDependMaterialsHelper(const std::map< SubdomainID, std::vector< std::shared_ptr< MaterialBase >>> &materials_map)
Helper method for checking Material object dependency.
static InputParameters validParams()
Describes the parameters this object can take to setup transformations.
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
char ** blocks
std::vector< SubdomainName > _kernel_coverage_blocks
std::vector< SubdomainName > _material_coverage_blocks
unsigned int _num_grid_steps
Number of steps in a grid sequence.
bool isOn()
Is adaptivity on?
Definition: Adaptivity.h:179
const bool _skip_nl_system_check
const SubdomainID INVALID_BLOCK_ID
Definition: MooseTypes.C:20
virtual void checkBoundaryMatProps()
Checks boundary material properties integrity.
Definition: SubProblem.C:665
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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...
const bool & _solve
Whether or not to actually solve the nonlinear system.
std::set< SubdomainID > getActiveBlocks(THREAD_ID tid=0) const
Return a set of active SubdomainsIDs.
bool hasScalingOrRotationTransformation() const
Returns true if the app has scaling and/or rotation transformation.
void checkUserObjects()
void checkDisplacementOrders()
Verify that SECOND order mesh uses SECOND order displacements.
MortarData _mortar_data
MooseMesh & _mesh
virtual void checkBlockMatProps()
Checks block material properties integrity.
Definition: SubProblem.C:623
Adaptivity _adaptivity
const std::set< SubdomainID > & getMortarSubdomainIDs() const
Returns the mortar covered subdomains.
Definition: MortarData.h:84
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
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 ...
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
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:1764
MooseAppCoordTransform & coordTransform()
Definition: MooseMesh.h:1888
void checkDuplicatePostprocessorVariableNames()
const bool _material_dependency_check
Determines whether a check to verify material dependencies on every subdomain.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
CoverageCheckMode _material_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active material...
MaterialPropertyStorage & _neighbor_material_props
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool hasMultiApps() const
Returns whether or not the current simulation has any multiapps.
CoverageCheckMode _kernel_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active kernel...
MaterialPropertyStorage & _material_props
MaterialWarehouse _all_materials
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3166
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1728
void checkCoordinateSystems()
Verify that there are no element type/coordinate type conflicts.

◆ checkUserObjectJacobianRequirement()

void FEProblemBase::checkUserObjectJacobianRequirement ( THREAD_ID  tid)
inherited

Definition at line 1632 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

1633 {
1634  std::set<const MooseVariableFEBase *> uo_jacobian_moose_vars;
1635  {
1636  std::vector<ShapeElementUserObject *> objs;
1637  theWarehouse()
1638  .query()
1640  .condition<AttribThread>(tid)
1641  .queryInto(objs);
1642 
1643  for (const auto & uo : objs)
1644  {
1645  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1646  const auto & mv_deps = uo->jacobianMooseVariables();
1647  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1648  }
1649  }
1650  {
1651  std::vector<ShapeSideUserObject *> objs;
1652  theWarehouse()
1653  .query()
1655  .condition<AttribThread>(tid)
1656  .queryInto(objs);
1657  for (const auto & uo : objs)
1658  {
1659  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1660  const auto & mv_deps = uo->jacobianMooseVariables();
1661  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1662  }
1663  }
1664 
1665  _uo_jacobian_moose_vars[tid].assign(uo_jacobian_moose_vars.begin(), uo_jacobian_moose_vars.end());
1666  std::sort(
1667  _uo_jacobian_moose_vars[tid].begin(), _uo_jacobian_moose_vars[tid].end(), sortMooseVariables);
1668 }
bool _calculate_jacobian_in_uo
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ checkUserObjects()

void FEProblemBase::checkUserObjects ( )
protectedinherited

Definition at line 8436 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

8437 {
8438  // Check user_objects block coverage
8439  std::set<SubdomainID> mesh_subdomains = _mesh.meshSubdomains();
8440  std::set<SubdomainID> user_objects_blocks;
8441 
8442  // gather names of all user_objects that were defined in the input file
8443  // and the blocks that they are defined on
8444  std::set<std::string> names;
8445 
8446  std::vector<UserObject *> objects;
8448 
8449  for (const auto & obj : objects)
8450  names.insert(obj->name());
8451 
8452  // See if all referenced blocks are covered
8453  std::set<SubdomainID> difference;
8454  std::set_difference(user_objects_blocks.begin(),
8455  user_objects_blocks.end(),
8456  mesh_subdomains.begin(),
8457  mesh_subdomains.end(),
8458  std::inserter(difference, difference.end()));
8459 
8460  if (!difference.empty())
8461  {
8462  std::ostringstream oss;
8463  oss << "One or more UserObjects is referencing a nonexistent block:\n";
8464  for (const auto & id : difference)
8465  oss << id << "\n";
8466  mooseError(oss.str());
8467  }
8468 }
TheWarehouse & theWarehouse() const
MooseMesh & _mesh
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3166

◆ clearActiveElementalMooseVariables()

void FEProblemBase::clearActiveElementalMooseVariables ( const THREAD_ID  tid)
overridevirtualinherited

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 5820 of file FEProblemBase.C.

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

5821 {
5823 
5824  if (_displaced_problem)
5825  _displaced_problem->clearActiveElementalMooseVariables(tid);
5826 }
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid)
Clear the active elemental MooseVariableFieldBase.
Definition: SubProblem.C:466
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveFEVariableCoupleableMatrixTags ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5829 of file FEProblemBase.C.

5830 {
5832 
5833  if (_displaced_problem)
5834  _displaced_problem->clearActiveFEVariableCoupleableMatrixTags(tid);
5835 }
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:384
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableVectorTags()

void FEProblemBase::clearActiveFEVariableCoupleableVectorTags ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5838 of file FEProblemBase.C.

5839 {
5841 
5842  if (_displaced_problem)
5843  _displaced_problem->clearActiveFEVariableCoupleableVectorTags(tid);
5844 }
virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:378
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveMaterialProperties()

void FEProblemBase::clearActiveMaterialProperties ( const THREAD_ID  tid)
inherited

Clear the active material properties.

Should be called at the end of every computing thread

Parameters
tidThe thread id

Definition at line 5886 of file FEProblemBase.C.

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

5887 {
5889 }
std::vector< unsigned char > _has_active_material_properties
Whether there are active material properties on each thread.

◆ clearActiveScalarVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveScalarVariableCoupleableMatrixTags ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5847 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

5848 {
5850 
5851  if (_displaced_problem)
5852  _displaced_problem->clearActiveScalarVariableCoupleableMatrixTags(tid);
5853 }
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:425
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::clearActiveScalarVariableCoupleableVectorTags ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5856 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

5857 {
5859 
5860  if (_displaced_problem)
5861  _displaced_problem->clearActiveScalarVariableCoupleableVectorTags(tid);
5862 }
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:419
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearAllDofIndices()

void SubProblem::clearAllDofIndices ( )
inherited

Clear dof indices from variables in nl and aux systems.

Definition at line 1177 of file SubProblem.C.

Referenced by FEProblemBase::solve().

1178 {
1179  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1182 }
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.
virtual const SystemBase & systemBaseAuxiliary() const =0
Return the auxiliary system object as a base class reference.
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0
void clearAllDofIndices()
Clear all dof indices from moose variables.
Definition: SystemBase.C:1580

◆ clearCurrentJacobianMatrixTags()

void FEProblemBase::clearCurrentJacobianMatrixTags ( )
inlineinherited

Clear the current Jacobian matrix tag data structure ...

if someone creates it

Definition at line 2465 of file FEProblemBase.h.

Referenced by FEProblemBase::resetState().

2465 {}

◆ clearCurrentResidualVectorTags()

void FEProblemBase::clearCurrentResidualVectorTags ( )
inlineinherited

Clear the current residual vector tag data structure.

Definition at line 3290 of file FEProblemBase.h.

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

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

◆ clearDiracInfo()

void FEProblemBase::clearDiracInfo ( )
overridevirtualinherited

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

Implements SubProblem.

Definition at line 2454 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeDiracContributions().

2455 {
2457 
2458  if (_displaced_problem)
2459  _displaced_problem->clearDiracInfo();
2460 }
void clearPoints()
Remove all of the current points and elements.
std::shared_ptr< DisplacedProblem > _displaced_problem
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1049

◆ computeBounds()

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

Definition at line 7420 of file FEProblemBase.C.

Referenced by Moose::compute_bounds().

7423 {
7424  try
7425  {
7426  try
7427  {
7428  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7429  "I expect these system numbers to be the same");
7430 
7431  if (!_current_nl_sys->hasVector("lower_bound") || !_current_nl_sys->hasVector("upper_bound"))
7432  return;
7433 
7434  TIME_SECTION("computeBounds", 1, "Computing Bounds");
7435 
7436  NumericVector<Number> & _lower = _current_nl_sys->getVector("lower_bound");
7437  NumericVector<Number> & _upper = _current_nl_sys->getVector("upper_bound");
7438  _lower.swap(lower);
7439  _upper.swap(upper);
7440  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
7442 
7443  _aux->residualSetup();
7445  _lower.swap(lower);
7446  _upper.swap(upper);
7447  }
7448  catch (...)
7449  {
7450  handleException("computeBounds");
7451  }
7452  }
7453  catch (MooseException & e)
7454  {
7455  mooseError("Irrecoverable exception: " + std::string(e.what()));
7456  }
7457  catch (...)
7458  {
7459  mooseError("Unexpected exception type");
7460  }
7461 }
virtual const char * what() const
Get out the error message.
unsigned int n_threads()
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
unsigned int number() const
void handleException(const std::string &calling_method)
Handle exceptions.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
Provides a way for users to bail out of the current solve.
virtual void swap(NumericVector< T > &v)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916
MaterialWarehouse _all_materials
void computeSystems(const ExecFlagType &type)
Do generic system computations.
unsigned int THREAD_ID
Definition: MooseTypes.h:209
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeDamping()

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

Definition at line 7699 of file FEProblemBase.C.

Referenced by FEProblemBase::computePostCheck().

7701 {
7702  // Default to no damping
7703  Real damping = 1.0;
7704 
7705  if (_has_dampers)
7706  {
7707  TIME_SECTION("computeDamping", 1, "Computing Damping");
7708 
7709  // Save pointer to the current solution
7710  const NumericVector<Number> * _saved_current_solution = _current_nl_sys->currentSolution();
7711 
7713  // For now, do not re-compute auxiliary variables. Doing so allows a wild solution increment
7714  // to get to the material models, which may not be able to cope with drastically different
7715  // values. Once more complete dependency checking is in place, auxiliary variables (and
7716  // material properties) will be computed as needed by dampers.
7717  // _aux.compute();
7718  damping = _current_nl_sys->computeDamping(soln, update);
7719 
7720  // restore saved solution
7721  _current_nl_sys->setSolution(*_saved_current_solution);
7722  }
7723 
7724  return damping;
7725 }
Real computeDamping(const NumericVector< Number > &solution, const NumericVector< Number > &update)
Compute damping.
bool _has_dampers
Whether or not this system has any Dampers associated with it.
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:67
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual const NumericVector< Number > *const & currentSolution() const override final
The solution vector that is currently being operated on.
Definition: SolverSystem.h:117
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ computeIndicators()

void FEProblemBase::computeIndicators ( )
virtualinherited

Reimplemented in DumpObjectsProblem.

Definition at line 4469 of file FEProblemBase.C.

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

4470 {
4471  // Initialize indicator aux variable fields
4473  {
4474  TIME_SECTION("computeIndicators", 1, "Computing Indicators");
4475 
4476  // Internal side indicators may lead to creating a much larger sparsity pattern than dictated by
4477  // the actual finite element scheme (e.g. CFEM)
4478  const auto old_do_derivatives = ADReal::do_derivatives;
4479  ADReal::do_derivatives = false;
4480 
4481  std::vector<std::string> fields;
4482 
4483  // Indicator Fields
4484  const auto & indicators = _indicators.getActiveObjects();
4485  for (const auto & indicator : indicators)
4486  fields.push_back(indicator->name());
4487 
4488  // InternalSideIndicator Fields
4489  const auto & internal_indicators = _internal_side_indicators.getActiveObjects();
4490  for (const auto & internal_indicator : internal_indicators)
4491  fields.push_back(internal_indicator->name());
4492 
4493  _aux->zeroVariables(fields);
4494 
4495  // compute Indicators
4496  ComputeIndicatorThread cit(*this);
4498  _aux->solution().close();
4499  _aux->update();
4500 
4501  ComputeIndicatorThread finalize_cit(*this, true);
4503  _aux->solution().close();
4504  _aux->update();
4505 
4506  ADReal::do_derivatives = old_do_derivatives;
4507  }
4508 }
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1235
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
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...
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
MooseObjectWarehouse< Indicator > _indicators
PetscErrorCode PetscInt const PetscInt fields[]
bool hasActiveObjects(THREAD_ID tid=0) const

◆ computeIndicatorsAndMarkers()

void FEProblemBase::computeIndicatorsAndMarkers ( )
virtualinherited

Definition at line 4462 of file FEProblemBase.C.

4463 {
4465  computeMarkers();
4466 }
virtual void computeMarkers()
virtual void computeIndicators()

◆ computeJacobian()

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

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

Definition at line 7255 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobianSys().

7258 {
7259  setCurrentNonlinearSystem(nl_sys_num);
7260 
7261  _fe_matrix_tags.clear();
7262 
7263  auto & tags = getMatrixTags();
7264  for (auto & tag : tags)
7265  _fe_matrix_tags.insert(tag.second);
7266 
7267  computeJacobianInternal(soln, jacobian, _fe_matrix_tags);
7268 }
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:253
std::set< TagID > _fe_matrix_tags

◆ computeJacobianBlock()

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

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 7408 of file FEProblemBase.C.

7412 {
7413  JacobianBlock jac_block(precond_system, jacobian, ivar, jvar);
7414  std::vector<JacobianBlock *> blocks = {&jac_block};
7415  mooseAssert(_current_nl_sys, "This should be non-null");
7417 }
Helper class for holding the preconditioning blocks to fill.
char ** blocks
virtual void computeJacobianBlocks(std::vector< JacobianBlock *> &blocks, const unsigned int nl_sys_num)
Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditio...
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159

◆ computeJacobianBlocks()

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

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 7388 of file FEProblemBase.C.

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

7390 {
7391  TIME_SECTION("computeTransientImplicitJacobian", 2);
7392  setCurrentNonlinearSystem(nl_sys_num);
7393 
7394  if (_displaced_problem)
7395  {
7397  _displaced_problem->updateMesh();
7398  }
7399 
7401 
7405 }
void computeJacobianBlocks(std::vector< JacobianBlock *> &blocks)
Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditio...
char ** blocks
bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.
Definition: SubProblem.h:1096
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:48
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:31
std::shared_ptr< DisplacedProblem > _displaced_problem
void computeSystems(const ExecFlagType &type)
Do generic system computations.

◆ computeJacobianInternal()

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

Form a Jacobian matrix for multiple tags.

It should not be called directly by users.

Definition at line 7271 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobian().

7274 {
7275  TIME_SECTION("computeJacobianInternal", 1);
7276 
7278 
7280 
7281  computeJacobianTags(tags);
7282 
7284 }
TagID systemMatrixTag() const override
Return the Matrix Tag ID for System.
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:67
virtual void associateMatrixToTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
Definition: SystemBase.C:1059
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1071
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.

◆ computeJacobianSys()

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

Form a Jacobian matrix.

It is called by Libmesh.

Definition at line 7233 of file FEProblemBase.C.

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

7236 {
7237  computeJacobian(soln, jacobian, sys.number());
7238 }
unsigned int number() const
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).

◆ computeJacobianTag()

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

Form a Jacobian matrix for a given tag.

Definition at line 7241 of file FEProblemBase.C.

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

7244 {
7246 
7247  _current_nl_sys->associateMatrixToTag(jacobian, tag);
7248 
7249  computeJacobianTags({tag});
7250 
7252 }
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:67
virtual void associateMatrixToTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
Definition: SystemBase.C:1059
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1071
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.

◆ computeJacobianTags()

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

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

Definition at line 7287 of file FEProblemBase.C.

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

7288 {
7289  try
7290  {
7291  try
7292  {
7293  if (!_has_jacobian || !_const_jacobian)
7294  {
7295  TIME_SECTION("computeJacobianTags", 5, "Computing Jacobian");
7296 
7297  for (auto tag : tags)
7298  if (_current_nl_sys->hasMatrix(tag))
7299  {
7300  auto & matrix = _current_nl_sys->getMatrix(tag);
7303  else
7304  matrix.zero();
7305  if (haveADObjects() && !assembly(0, _current_nl_sys->number()).hasStaticCondensation())
7306  // PETSc algorithms require diagonal allocations regardless of whether there is
7307  // non-zero diagonal dependence. With global AD indexing we only add non-zero
7308  // dependence, so PETSc will scream at us unless we artificially add the diagonals.
7309  for (auto index : make_range(matrix.row_start(), matrix.row_stop()))
7310  matrix.add(index, index, 0);
7311  }
7312 
7313  _aux->zeroVariablesForJacobian();
7314 
7315  unsigned int n_threads = libMesh::n_threads();
7316 
7317  // Random interface objects
7318  for (const auto & it : _random_data_objects)
7319  it.second->updateSeeds(EXEC_NONLINEAR);
7320 
7323  if (_displaced_problem)
7324  _displaced_problem->setCurrentlyComputingJacobian(true);
7325 
7328 
7329  for (unsigned int tid = 0; tid < n_threads; tid++)
7330  reinitScalars(tid);
7331 
7333 
7334  _aux->jacobianSetup();
7335 
7336  if (_displaced_problem)
7337  {
7339  _displaced_problem->updateMesh();
7340  }
7341 
7342  for (unsigned int tid = 0; tid < n_threads; tid++)
7343  {
7346  }
7347 
7349 
7351 
7353 
7355 
7357 
7359 
7360  // For explicit Euler calculations for example we often compute the Jacobian one time and
7361  // then re-use it over and over. If we're performing automatic scaling, we don't want to
7362  // use that kernel, diagonal-block only Jacobian for our actual matrix when performing
7363  // solves!
7365  _has_jacobian = true;
7366  }
7367  }
7368  catch (...)
7369  {
7370  handleException("computeJacobianTags");
7371  }
7372  }
7373  catch (const MooseException &)
7374  {
7375  // The buck stops here, we have already handled the exception by
7376  // calling the system's stopSolve() method, it is now up to PETSc to return a
7377  // "diverged" reason during the next solve.
7378  }
7379  catch (...)
7380  {
7381  mooseError("Unexpected exception type");
7382  }
7383 
7384  resetState();
7385 }
virtual void restore_original_nonzero_pattern()
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
bool _has_jacobian
Indicates if the Jacobian was computed.
bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.
Definition: SubProblem.h:1096
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
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
Definition: SystemBase.C:1519
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
virtual void resetState()
Reset state of this object in preparation for the next evaluation.
void jacobianSetup()
Calls the jacobianSetup function for each of the output objects.
virtual void jacobianSetup(THREAD_ID tid=0) const
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
void handleException(const std::string &calling_method)
Handle exceptions.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
void computeJacobianTags(const std::set< TagID > &tags)
Computes multiple (tag associated) Jacobian matricese.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition: SubProblem.h:771
virtual void jacobianSetup(THREAD_ID tid=0) const
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:48
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:31
Provides a way for users to bail out of the current solve.
const bool _restore_original_nonzero_pattern
Whether we should restore the original nonzero pattern for every Jacobian evaluation.
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseObjectWarehouse< Function > _functions
functions
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
bool _const_jacobian
true if the Jacobian is constant
bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
Definition: SubProblem.h:1108
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407
void computeSystems(const ExecFlagType &type)
Do generic system computations.
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.

◆ computeLinearSystemSys()

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

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 7464 of file FEProblemBase.C.

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

7468 {
7469  TIME_SECTION("computeLinearSystemSys", 5);
7470 
7472 
7475 
7476  // We are using the residual tag system for right hand sides so we fetch everything
7477  const auto & vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
7478 
7479  // We filter out tags which do not have associated vectors in the current
7480  // system. This is essential to be able to use system-dependent vector tags.
7483 
7487  compute_gradients);
7488 
7493  // We reset the tags to the default containers for further operations
7498 }
TagID rightHandSideVectorTag() const
Definition: LinearSystem.h:114
virtual TagID systemMatrixTag() const override
Return the Matrix Tag ID for System.
Definition: LinearSystem.h:115
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:964
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:289
virtual void associateMatrixToTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
Definition: SystemBase.C:1059
SparseMatrix< Number > & getSystemMatrix()
Fetching the system matrix from the libmesh system.
Definition: LinearSystem.h:126
std::set< TagID > _linear_matrix_tags
Temporary storage for filtered matrix tags for linear systems.
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1071
virtual const NumericVector< Number > *const & currentSolution() const override final
The solution vector that is currently being operated on.
Definition: SolverSystem.h:117
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:172
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
LinearSystem * _current_linear_sys
The current linear system that we are solving.
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:253
NumericVector< Number > & getRightHandSideVector()
Fetching the right hand side vector from the libmesh system.
Definition: LinearSystem.h:119
void setCurrentLinearSystem(unsigned int sys_num)
Set the current linear system pointer.
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:300
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
const std::string & name() const
std::set< TagID > _linear_vector_tags
Temporary storage for filtered vector tags for linear systems.

◆ 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 
)
inherited

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 7501 of file FEProblemBase.C.

Referenced by FEProblemBase::computeLinearSystemSys().

7505 {
7506  TIME_SECTION("computeLinearSystemTags", 5, "Computing Linear System");
7507 
7509 
7510  for (auto tag : matrix_tags)
7511  {
7512  auto & matrix = _current_linear_sys->getMatrix(tag);
7513  matrix.zero();
7514  }
7515 
7516  unsigned int n_threads = libMesh::n_threads();
7517 
7519 
7520  // Random interface objects
7521  for (const auto & it : _random_data_objects)
7522  it.second->updateSeeds(EXEC_NONLINEAR);
7523 
7526 
7528 
7529  _aux->jacobianSetup();
7530 
7531  for (THREAD_ID tid = 0; tid < n_threads; tid++)
7532  {
7534  }
7535 
7536  try
7537  {
7539  }
7540  catch (MooseException & e)
7541  {
7542  _console << "\nA MooseException was raised during Auxiliary variable computation.\n"
7543  << "The next solve will fail, the timestep will be reduced, and we will try again.\n"
7544  << std::endl;
7545 
7546  // We know the next solve is going to fail, so there's no point in
7547  // computing anything else after this. Plus, using incompletely
7548  // computed AuxVariables in subsequent calculations could lead to
7549  // other errors or unhandled exceptions being thrown.
7550  return;
7551  }
7552 
7555 
7557 
7558  _current_linear_sys->computeLinearSystemTags(vector_tags, matrix_tags, compute_gradients);
7559 
7560  // Reset execution flag as after this point we are no longer on LINEAR
7562 
7563  // These are the relevant parts of resetState()
7566 }
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:67
void jacobianSetup()
Calls the jacobianSetup function for each of the output objects.
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
virtual void zero()=0
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1111
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
LinearSystem * _current_linear_sys
The current linear system that we are solving.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
virtual void jacobianSetup(THREAD_ID tid=0) const
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:31
Provides a way for users to bail out of the current solve.
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
MooseObjectWarehouse< Function > _functions
functions
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
Definition: SubProblem.h:1108
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407
void computeSystems(const ExecFlagType &type)
Do generic system computations.
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.
Definition: LinearSystem.C:116
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ computeMarkers()

void FEProblemBase::computeMarkers ( )
virtualinherited

Reimplemented in DumpObjectsProblem.

Definition at line 4511 of file FEProblemBase.C.

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

4512 {
4513  if (_markers.hasActiveObjects())
4514  {
4515  TIME_SECTION("computeMarkers", 1, "Computing Markers");
4516 
4517  std::vector<std::string> fields;
4518 
4519  // Marker Fields
4520  const auto & markers = _markers.getActiveObjects();
4521  for (const auto & marker : markers)
4522  fields.push_back(marker->name());
4523 
4524  _aux->zeroVariables(fields);
4525 
4527 
4528  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
4529  {
4530  const auto & markers = _markers.getActiveObjects(tid);
4531  for (const auto & marker : markers)
4532  marker->markerSetup();
4533  }
4534 
4535  ComputeMarkerThread cmt(*this);
4537 
4538  _aux->solution().close();
4539  _aux->update();
4540  }
4541 }
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1235
unsigned int n_threads()
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
void updateErrorVectors()
Update the ErrorVectors that have been requested through calls to getErrorVector().
Definition: Adaptivity.C:372
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...
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
Adaptivity _adaptivity
PetscErrorCode PetscInt const PetscInt fields[]
bool hasActiveObjects(THREAD_ID tid=0) const
MooseObjectWarehouse< Marker > _markers
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ computeMultiAppsDT()

Real FEProblemBase::computeMultiAppsDT ( ExecFlagType  type)
inherited

Find the smallest timestep over all MultiApps.

Definition at line 5559 of file FEProblemBase.C.

Referenced by TransientBase::constrainDTFromMultiApp().

5560 {
5561  const auto & multi_apps = _transient_multi_apps[type].getActiveObjects();
5562 
5563  Real smallest_dt = std::numeric_limits<Real>::max();
5564 
5565  for (const auto & multi_app : multi_apps)
5566  smallest_dt = std::min(smallest_dt, multi_app->computeDT());
5567 
5568  return smallest_dt;
5569 }
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling &#39;computeDT&#39;)
auto max(const L &left, const R &right)
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...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
auto min(const L &left, const R &right)

◆ computeNearNullSpace()

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

Definition at line 7569 of file FEProblemBase.C.

Referenced by Moose::compute_nearnullspace().

7571 {
7572  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7573  "I expect these system numbers to be the same");
7574 
7575  sp.clear();
7576  for (unsigned int i = 0; i < subspaceDim("NearNullSpace"); ++i)
7577  {
7578  std::stringstream postfix;
7579  postfix << "_" << i;
7580  std::string modename = "NearNullSpace" + postfix.str();
7581  sp.push_back(&_current_nl_sys->getVector(modename));
7582  }
7583 }
unsigned int subspaceDim(const std::string &prefix) const
Dimension of the subspace spanned by vectors with a given prefix.
unsigned int number() const
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ computeNullSpace()

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

Definition at line 7586 of file FEProblemBase.C.

Referenced by Moose::compute_nullspace().

7588 {
7589  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7590  "I expect these system numbers to be the same");
7591  sp.clear();
7592  for (unsigned int i = 0; i < subspaceDim("NullSpace"); ++i)
7593  {
7594  std::stringstream postfix;
7595  postfix << "_" << i;
7596  sp.push_back(&_current_nl_sys->getVector("NullSpace" + postfix.str()));
7597  }
7598 }
unsigned int subspaceDim(const std::string &prefix) const
Dimension of the subspace spanned by vectors with a given prefix.
unsigned int number() const
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ 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 
)
virtualinherited

Definition at line 7616 of file FEProblemBase.C.

Referenced by Moose::compute_postcheck().

7622 {
7623  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7624  "I expect these system numbers to be the same");
7625 
7626  // This function replaces the old PetscSupport::dampedCheck() function.
7627  //
7628  // 1.) Recreate code in PetscSupport::dampedCheck() for constructing
7629  // ghosted "soln" and "update" vectors.
7630  // 2.) Call FEProblemBase::computeDamping() with these ghost vectors.
7631  // 3.) Recreate the code in PetscSupport::dampedCheck() to actually update
7632  // the solution vector based on the damping, and set the "changed" flags
7633  // appropriately.
7634 
7635  TIME_SECTION("computePostCheck", 2, "Computing Post Check");
7636 
7638 
7639  // MOOSE's FEProblemBase doesn't update the solution during the
7640  // postcheck, but FEProblemBase-derived classes might.
7642  {
7643  // We need ghosted versions of new_soln and search_direction (the
7644  // ones we get from libmesh/PETSc are PARALLEL vectors. To make
7645  // our lives simpler, we use the same ghosting pattern as the
7646  // system's current_local_solution to create new ghosted vectors.
7647 
7648  // Construct zeroed-out clones with the same ghosted dofs as the
7649  // System's current_local_solution.
7650  std::unique_ptr<NumericVector<Number>> ghosted_solution =
7651  sys.current_local_solution->zero_clone(),
7652  ghosted_search_direction =
7653  sys.current_local_solution->zero_clone();
7654 
7655  // Copy values from input vectors into clones with ghosted values.
7656  *ghosted_solution = new_soln;
7657  *ghosted_search_direction = search_direction;
7658 
7659  if (_has_dampers)
7660  {
7661  // Compute the damping coefficient using the ghosted vectors
7662  Real damping = computeDamping(*ghosted_solution, *ghosted_search_direction);
7663 
7664  // If some non-trivial damping was computed, update the new_soln
7665  // vector accordingly.
7666  if (damping < 1.0)
7667  {
7668  new_soln = old_soln;
7669  new_soln.add(-damping, search_direction);
7670  changed_new_soln = true;
7671  }
7672  }
7673 
7674  if (shouldUpdateSolution())
7675  {
7676  // Update the ghosted copy of the new solution, if necessary.
7677  if (changed_new_soln)
7678  *ghosted_solution = new_soln;
7679 
7680  bool updated_solution = updateSolution(new_soln, *ghosted_solution);
7681  if (updated_solution)
7682  changed_new_soln = true;
7683  }
7684  }
7685 
7687  {
7689  _aux->copyCurrentIntoPreviousNL();
7690  }
7691 
7692  // MOOSE doesn't change the search_direction
7693  changed_search_direction = false;
7694 
7696 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.
virtual void setPreviousNewtonSolution(const NumericVector< Number > &soln)
bool _has_dampers
Whether or not this system has any Dampers associated with it.
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
unsigned int number() const
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual bool shouldUpdateSolution()
Check to see whether the problem should update the solution.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
const ExecFlagType EXEC_POSTCHECK
Definition: Moose.C:33
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::unique_ptr< NumericVector< Number > > current_local_solution
virtual bool updateSolution(NumericVector< libMesh::Number > &vec_solution, NumericVector< libMesh::Number > &ghosted_solution)
Update the solution.
virtual void add(const numeric_index_type i, const T value)=0
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:28
virtual Real computeDamping(const NumericVector< libMesh::Number > &soln, const NumericVector< libMesh::Number > &update)

◆ computeResidual() [1/2]

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

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 FEProblemBase::computeResidualL2Norm(), FEProblemBase::computeResidualSys(), ActuallyExplicitEuler::solve(), and ExplicitSSPRungeKutta::solveStage().

◆ computeResidual() [2/2]

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

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

◆ computeResidualAndJacobian()

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

Form a residual and Jacobian with default tags.

Definition at line 6878 of file FEProblemBase.C.

Referenced by ComputeResidualAndJacobian::residual_and_jacobian().

6881 {
6882  try
6883  {
6884  try
6885  {
6886  // vector tags
6888  const auto & residual_vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
6889 
6890  mooseAssert(_fe_vector_tags.empty(),
6891  "This should be empty indicating a clean starting state");
6892  // We filter out tags which do not have associated vectors in the current nonlinear
6893  // system. This is essential to be able to use system-dependent residual tags.
6895 
6897 
6898  // matrix tags
6899  {
6900  _fe_matrix_tags.clear();
6901 
6902  auto & tags = getMatrixTags();
6903  for (auto & tag : tags)
6904  _fe_matrix_tags.insert(tag.second);
6905  }
6906 
6908 
6911 
6912  for (const auto tag : _fe_matrix_tags)
6913  if (_current_nl_sys->hasMatrix(tag))
6914  {
6915  auto & matrix = _current_nl_sys->getMatrix(tag);
6916  matrix.zero();
6917  if (haveADObjects() && !assembly(0, _current_nl_sys->number()).hasStaticCondensation())
6918  // PETSc algorithms require diagonal allocations regardless of whether there is non-zero
6919  // diagonal dependence. With global AD indexing we only add non-zero
6920  // dependence, so PETSc will scream at us unless we artificially add the diagonals.
6921  for (auto index : make_range(matrix.row_start(), matrix.row_stop()))
6922  matrix.add(index, index, 0);
6923  }
6924 
6925  _aux->zeroVariablesForResidual();
6926 
6927  unsigned int n_threads = libMesh::n_threads();
6928 
6930 
6931  // Random interface objects
6932  for (const auto & it : _random_data_objects)
6933  it.second->updateSeeds(EXEC_LINEAR);
6934 
6938  if (_displaced_problem)
6939  {
6940  _displaced_problem->setCurrentlyComputingResidual(true);
6941  _displaced_problem->setCurrentlyComputingJacobian(true);
6942  _displaced_problem->setCurrentlyComputingResidualAndJacobian(true);
6943  }
6944 
6946 
6948 
6949  for (unsigned int tid = 0; tid < n_threads; tid++)
6950  reinitScalars(tid);
6951 
6953 
6954  _aux->residualSetup();
6955 
6956  if (_displaced_problem)
6957  {
6959  _displaced_problem->updateMesh();
6961  updateMortarMesh();
6962  }
6963 
6964  for (THREAD_ID tid = 0; tid < n_threads; tid++)
6965  {
6968  }
6969 
6971 
6973 
6975 
6977 
6980 
6982 
6985  }
6986  catch (...)
6987  {
6988  handleException("computeResidualAndJacobian");
6989  }
6990  }
6991  catch (const MooseException &)
6992  {
6993  // The buck stops here, we have already handled the exception by
6994  // calling the system's stopSolve() method, it is now up to PETSc to return a
6995  // "diverged" reason during the next solve.
6996  }
6997  catch (...)
6998  {
6999  mooseError("Unexpected exception type");
7000  }
7001 
7002  resetState();
7003  _fe_vector_tags.clear();
7004  _fe_matrix_tags.clear();
7005 }
virtual void residualSetup(THREAD_ID tid=0) const
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
TagID systemMatrixTag() const override
Return the Matrix Tag ID for System.
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
void setCurrentlyComputingResidual(bool currently_computing_residual) final
Set whether or not the problem is in the process of computing the residual.
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:964
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:67
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
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:289
virtual void associateMatrixToTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
Definition: SystemBase.C:1059
void setCurrentlyComputingResidualAndJacobian(bool currently_computing_residual_and_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:1493
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1071
void setCurrentlyComputingJacobian(const bool currently_computing_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:689
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
virtual void resetState()
Reset state of this object in preparation for the next evaluation.
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
void computeResidualAndJacobianTags(const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
Form possibly multiple tag-associated vectors and matrices.
void handleException(const std::string &calling_method)
Handle exceptions.
virtual void zero()=0
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1111
MortarData _mortar_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:172
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition: SubProblem.h:771
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:253
TagID residualVectorTag() const override
void residualSetup()
Calls the residualSetup function for each of the output objects.
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:48
virtual void updateMortarMesh()
std::set< TagID > _fe_matrix_tags
Provides a way for users to bail out of the current solve.
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
bool hasDisplacedObjects() const
Returns whether any of the AutomaticMortarGeneration objects are running on a displaced mesh...
Definition: MortarData.h:99
IntRange< T > make_range(T beg, T end)
std::set< TagID > _fe_vector_tags
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
void setCurrentResidualVectorTags(const std::set< TagID > &vector_tags)
Set the current residual vector tag data structure based on the passed in tag IDs.
MooseObjectWarehouse< Function > _functions
functions
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
Definition: SubProblem.h:1108
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407
void computeSystems(const ExecFlagType &type)
Do generic system computations.
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h:209
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeResidualInternal()

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

Form a residual vector for a set of tags.

It should not be called directly by users.

Definition at line 7037 of file FEProblemBase.C.

7040 {
7041  parallel_object_only();
7042 
7043  TIME_SECTION("computeResidualInternal", 1);
7044 
7045  try
7046  {
7048 
7050 
7051  computeResidualTags(tags);
7052 
7054  }
7055  catch (MooseException & e)
7056  {
7057  // If a MooseException propagates all the way to here, it means
7058  // that it was thrown from a MOOSE system where we do not
7059  // (currently) properly support the throwing of exceptions, and
7060  // therefore we have no choice but to error out. It may be
7061  // *possible* to handle exceptions from other systems, but in the
7062  // meantime, we don't want to silently swallow any unhandled
7063  // exceptions here.
7064  mooseError("An unhandled MooseException was raised during residual computation. Please "
7065  "contact the MOOSE team for assistance.");
7066  }
7067 }
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:964
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:67
virtual void computeResidualTags(const std::set< TagID > &tags)
Form multiple residual vectors and each is associated with one tag.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
TagID residualVectorTag() const override
Provides a way for users to bail out of the current solve.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ computeResidualL2Norm() [1/3]

Real FEProblemBase::computeResidualL2Norm ( NonlinearSystemBase sys)
inherited

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

Definition at line 6787 of file FEProblemBase.C.

Referenced by DefaultMultiAppFixedPointConvergence::checkConvergence(), Residual::getValue(), DefaultMultiAppFixedPointConvergence::initialize(), and DefaultMultiAppFixedPointConvergence::preExecute().

6788 {
6789  _current_nl_sys = &sys;
6790  computeResidual(*sys.currentSolution(), sys.RHS(), sys.number());
6791  return sys.RHS().l2_norm();
6792 }
virtual Real l2_norm() const=0
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual const NumericVector< Number > *const & currentSolution() const override final
The solution vector that is currently being operated on.
Definition: SolverSystem.h:117
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
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

◆ computeResidualL2Norm() [2/3]

Real FEProblemBase::computeResidualL2Norm ( LinearSystem sys)
inherited

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

Definition at line 6795 of file FEProblemBase.C.

6796 {
6797  _current_linear_sys = &sys;
6798 
6799  // We assemble the current system to check the current residual
6802  *sys.linearImplicitSystem().rhs,
6803  /*compute fresh gradients*/ true);
6804 
6805  // Unfortunate, but we have to allocate a new vector for the residual
6806  auto residual = sys.linearImplicitSystem().rhs->clone();
6807  residual->scale(-1.0);
6808  residual->add_vector(*sys.currentSolution(), *sys.linearImplicitSystem().matrix);
6809  return residual->l2_norm();
6810 }
libMesh::LinearImplicitSystem & linearImplicitSystem()
Return a reference to the stored linear implicit system.
Definition: LinearSystem.h:86
NumericVector< Number > * rhs
virtual std::unique_ptr< NumericVector< T > > clone() const=0
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. ...
virtual const NumericVector< Number > *const & currentSolution() const override final
The solution vector that is currently being operated on.
Definition: SolverSystem.h:117
LinearSystem * _current_linear_sys
The current linear system that we are solving.
SparseMatrix< Number > * matrix

◆ computeResidualL2Norm() [3/3]

Real FEProblemBase::computeResidualL2Norm ( )
virtualinherited

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 6813 of file FEProblemBase.C.

6814 {
6815  TIME_SECTION("computeResidualL2Norm", 2, "Computing L2 Norm of Residual");
6816 
6817  // We use sum the squared norms of the individual systems and then take the square root of it
6818  Real l2_norm = 0.0;
6819  for (auto sys : _nl)
6820  {
6821  const auto norm = computeResidualL2Norm(*sys);
6822  l2_norm += norm * norm;
6823  }
6824 
6825  for (auto sys : _linear_systems)
6826  {
6827  const auto norm = computeResidualL2Norm(*sys);
6828  l2_norm += norm * norm;
6829  }
6830 
6831  return std::sqrt(l2_norm);
6832 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
auto norm(const T &a) -> decltype(std::abs(a))
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
virtual Real computeResidualL2Norm()
Computes the residual using whatever is sitting in the current solution vector then returns the L2 no...
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ computeResidualSys()

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

This function is called by Libmesh to form a residual.

Definition at line 6835 of file FEProblemBase.C.

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

6838 {
6839  parallel_object_only();
6840 
6841  TIME_SECTION("computeResidualSys", 5);
6842 
6843  computeResidual(soln, residual, sys.number());
6844 }
unsigned int number() const
void computeResidual(libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual)
This function is called by Libmesh to form a residual.

◆ computeResidualTag()

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

Form a residual vector for a given tag.

Definition at line 7008 of file FEProblemBase.C.

7011 {
7012  try
7013  {
7015 
7016  _current_nl_sys->associateVectorToTag(residual, tag);
7017 
7018  computeResidualTags({tag});
7019 
7021  }
7022  catch (MooseException & e)
7023  {
7024  // If a MooseException propagates all the way to here, it means
7025  // that it was thrown from a MOOSE system where we do not
7026  // (currently) properly support the throwing of exceptions, and
7027  // therefore we have no choice but to error out. It may be
7028  // *possible* to handle exceptions from other systems, but in the
7029  // meantime, we don't want to silently swallow any unhandled
7030  // exceptions here.
7031  mooseError("An unhandled MooseException was raised during residual computation. Please "
7032  "contact the MOOSE team for assistance.");
7033  }
7034 }
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:964
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:67
virtual void computeResidualTags(const std::set< TagID > &tags)
Form multiple residual vectors and each is associated with one tag.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
Provides a way for users to bail out of the current solve.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ computeResidualTags()

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

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

Definition at line 7153 of file FEProblemBase.C.

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

7154 {
7155  parallel_object_only();
7156 
7157  try
7158  {
7159  try
7160  {
7161  TIME_SECTION("computeResidualTags", 5, "Computing Residual");
7162 
7163  ADReal::do_derivatives = false;
7164 
7166 
7167  _aux->zeroVariablesForResidual();
7168 
7169  unsigned int n_threads = libMesh::n_threads();
7170 
7172 
7173  // Random interface objects
7174  for (const auto & it : _random_data_objects)
7175  it.second->updateSeeds(EXEC_LINEAR);
7176 
7178 
7180 
7181  for (unsigned int tid = 0; tid < n_threads; tid++)
7182  reinitScalars(tid);
7183 
7185 
7186  _aux->residualSetup();
7187 
7188  if (_displaced_problem)
7189  {
7191  _displaced_problem->updateMesh();
7193  updateMortarMesh();
7194  }
7195 
7196  for (THREAD_ID tid = 0; tid < n_threads; tid++)
7197  {
7200  }
7201 
7203 
7205 
7207 
7209 
7212  }
7213  catch (...)
7214  {
7215  handleException("computeResidualTags");
7216  }
7217  }
7218  catch (const MooseException &)
7219  {
7220  // The buck stops here, we have already handled the exception by
7221  // calling the system's stopSolve() method, it is now up to PETSc to return a
7222  // "diverged" reason during the next solve.
7223  }
7224  catch (...)
7225  {
7226  mooseError("Unexpected exception type");
7227  }
7228 
7229  resetState();
7230 }
virtual void residualSetup(THREAD_ID tid=0) const
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
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
void computeResidualTags(const std::set< TagID > &tags)
Form multiple tag-associated residual vectors for all the given tags.
virtual void resetState()
Reset state of this object in preparation for the next evaluation.
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
void handleException(const std::string &calling_method)
Handle exceptions.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1111
MortarData _mortar_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
void residualSetup()
Calls the residualSetup function for each of the output objects.
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:48
virtual void updateMortarMesh()
Provides a way for users to bail out of the current solve.
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
bool hasDisplacedObjects() const
Returns whether any of the AutomaticMortarGeneration objects are running on a displaced mesh...
Definition: MortarData.h:99
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
void setCurrentResidualVectorTags(const std::set< TagID > &vector_tags)
Set the current residual vector tag data structure based on the passed in tag IDs.
MooseObjectWarehouse< Function > _functions
functions
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407
void computeSystems(const ExecFlagType &type)
Do generic system computations.
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h:209
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeResidualType()

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

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

Definition at line 7070 of file FEProblemBase.C.

7073 {
7074  TIME_SECTION("computeResidualType", 5);
7075 
7076  try
7077  {
7079 
7081 
7083 
7085  }
7086  catch (MooseException & e)
7087  {
7088  // If a MooseException propagates all the way to here, it means
7089  // that it was thrown from a MOOSE system where we do not
7090  // (currently) properly support the throwing of exceptions, and
7091  // therefore we have no choice but to error out. It may be
7092  // *possible* to handle exceptions from other systems, but in the
7093  // meantime, we don't want to silently swallow any unhandled
7094  // exceptions here.
7095  mooseError("An unhandled MooseException was raised during residual computation. Please "
7096  "contact the MOOSE team for assistance.");
7097  }
7098 }
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:964
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:67
virtual void computeResidualTags(const std::set< TagID > &tags)
Form multiple residual vectors and each is associated with one tag.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
TagID residualVectorTag() const override
Provides a way for users to bail out of the current solve.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ computeSystems()

void FEProblemBase::computeSystems ( const ExecFlagType type)
protectedinherited

Do generic system computations.

Definition at line 9298 of file FEProblemBase.C.

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

9299 {
9300  // When performing an adjoint solve in the optimization module, the current solver system is the
9301  // adjoint. However, the adjoint solve requires having accurate time derivative calculations for
9302  // the forward system. The cleanest way to handle such uses is just to compute the time
9303  // derivatives for all solver systems instead of trying to guess which ones we need and don't need
9304  for (auto & solver_sys : _solver_systems)
9305  solver_sys->compute(type);
9306 
9307  _aux->compute(type);
9308 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ computeTransposeNullSpace()

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

Definition at line 7601 of file FEProblemBase.C.

Referenced by Moose::compute_transpose_nullspace().

7603 {
7604  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7605  "I expect these system numbers to be the same");
7606  sp.clear();
7607  for (unsigned int i = 0; i < subspaceDim("TransposeNullSpace"); ++i)
7608  {
7609  std::stringstream postfix;
7610  postfix << "_" << i;
7611  sp.push_back(&_current_nl_sys->getVector("TransposeNullSpace" + postfix.str()));
7612  }
7613 }
unsigned int subspaceDim(const std::string &prefix) const
Dimension of the subspace spanned by vectors with a given prefix.
unsigned int number() const
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ computeUserObjectByName()

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

Compute an user object with the given name.

Definition at line 4761 of file FEProblemBase.C.

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

4764 {
4765  const auto old_exec_flag = _current_execute_on_flag;
4768  .query()
4769  .condition<AttribSystem>("UserObject")
4770  .condition<AttribExecOns>(type)
4771  .condition<AttribName>(name);
4772  computeUserObjectsInternal(type, group, query);
4773  _current_execute_on_flag = old_exec_flag;
4774 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.
QueryCache is a convenient way to construct and pass around (possible partially constructed) warehous...
Definition: TheWarehouse.h:208
void computeUserObjectsInternal(const ExecFlagType &type, const Moose::AuxGroup &group, TheWarehouse::Query &query)
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
query_obj query
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ computeUserObjects()

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

Call compute methods on UserObjects.

Definition at line 4777 of file FEProblemBase.C.

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

4778 {
4780  theWarehouse().query().condition<AttribSystem>("UserObject").condition<AttribExecOns>(type);
4781  computeUserObjectsInternal(type, group, query);
4782 }
QueryCache is a convenient way to construct and pass around (possible partially constructed) warehous...
Definition: TheWarehouse.h:208
void computeUserObjectsInternal(const ExecFlagType &type, const Moose::AuxGroup &group, TheWarehouse::Query &query)
TheWarehouse & theWarehouse() const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
query_obj query
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ computeUserObjectsInternal()

void FEProblemBase::computeUserObjectsInternal ( const ExecFlagType type,
const Moose::AuxGroup group,
TheWarehouse::Query query 
)
protectedinherited

Definition at line 4785 of file FEProblemBase.C.

Referenced by FEProblemBase::computeUserObjectByName(), and FEProblemBase::computeUserObjects().

4788 {
4789  try
4790  {
4791  TIME_SECTION("computeUserObjects", 1, "Computing User Objects");
4792 
4793  // Add group to query
4794  if (group == Moose::PRE_IC)
4795  primary_query.condition<AttribPreIC>(true);
4796  else if (group == Moose::PRE_AUX)
4797  primary_query.condition<AttribPreAux>(type);
4798  else if (group == Moose::POST_AUX)
4799  primary_query.condition<AttribPostAux>(type);
4800 
4801  // query everything first to obtain a list of execution groups
4802  std::vector<UserObject *> uos;
4803  primary_query.clone().queryIntoUnsorted(uos);
4804  std::set<int> execution_groups;
4805  for (const auto & uo : uos)
4806  execution_groups.insert(uo->getParam<int>("execution_order_group"));
4807 
4808  // iterate over execution order groups
4809  for (const auto execution_group : execution_groups)
4810  {
4811  auto query = primary_query.clone().condition<AttribExecutionOrderGroup>(execution_group);
4812 
4813  std::vector<GeneralUserObject *> genobjs;
4814  query.clone().condition<AttribInterfaces>(Interfaces::GeneralUserObject).queryInto(genobjs);
4815 
4816  std::vector<UserObject *> userobjs;
4817  query.clone()
4822  .queryInto(userobjs);
4823 
4824  std::vector<UserObject *> tgobjs;
4825  query.clone()
4827  .queryInto(tgobjs);
4828 
4829  std::vector<UserObject *> nodal;
4830  query.clone().condition<AttribInterfaces>(Interfaces::NodalUserObject).queryInto(nodal);
4831 
4832  std::vector<MortarUserObject *> mortar;
4833  query.clone().condition<AttribInterfaces>(Interfaces::MortarUserObject).queryInto(mortar);
4834 
4835  if (userobjs.empty() && genobjs.empty() && tgobjs.empty() && nodal.empty() && mortar.empty())
4836  continue;
4837 
4838  // Start the timer here since we have at least one active user object
4839  std::string compute_uo_tag = "computeUserObjects(" + Moose::stringify(type) + ")";
4840 
4841  // Perform Residual/Jacobian setups
4842  if (type == EXEC_LINEAR)
4843  {
4844  for (auto obj : userobjs)
4845  obj->residualSetup();
4846  for (auto obj : nodal)
4847  obj->residualSetup();
4848  for (auto obj : mortar)
4849  obj->residualSetup();
4850  for (auto obj : tgobjs)
4851  obj->residualSetup();
4852  for (auto obj : genobjs)
4853  obj->residualSetup();
4854  }
4855  else if (type == EXEC_NONLINEAR)
4856  {
4857  for (auto obj : userobjs)
4858  obj->jacobianSetup();
4859  for (auto obj : nodal)
4860  obj->jacobianSetup();
4861  for (auto obj : mortar)
4862  obj->jacobianSetup();
4863  for (auto obj : tgobjs)
4864  obj->jacobianSetup();
4865  for (auto obj : genobjs)
4866  obj->jacobianSetup();
4867  }
4868 
4869  for (auto obj : userobjs)
4870  obj->initialize();
4871 
4872  // Execute Side/InternalSide/Interface/Elemental/DomainUserObjects
4873  if (!userobjs.empty())
4874  {
4875  // non-nodal user objects have to be run separately before the nodal user objects run
4876  // because some nodal user objects (NodalNormal related) depend on elemental user objects
4877  // :-(
4878  ComputeUserObjectsThread cppt(*this, query);
4880 
4881  // There is one instance in rattlesnake where an elemental user object's finalize depends
4882  // on a side user object having been finalized first :-(
4889  }
4890 
4891  // if any userobject may have written to variables we need to close the aux solution
4892  for (const auto & uo : userobjs)
4893  if (auto euo = dynamic_cast<const ElementUserObject *>(uo);
4894  euo && euo->hasWritableCoupledVariables())
4895  {
4896  _aux->solution().close();
4897  _aux->system().update();
4898  break;
4899  }
4900 
4901  // Execute NodalUserObjects
4902  // BISON has an axial reloc elemental user object that has a finalize func that depends on a
4903  // nodal user object's prev value. So we can't initialize this until after elemental objects
4904  // have been finalized :-(
4905  for (auto obj : nodal)
4906  obj->initialize();
4907  if (query.clone().condition<AttribInterfaces>(Interfaces::NodalUserObject).count() > 0)
4908  {
4909  ComputeNodalUserObjectsThread cnppt(*this, query);
4912  }
4913 
4914  // if any userobject may have written to variables we need to close the aux solution
4915  for (const auto & uo : nodal)
4916  if (auto nuo = dynamic_cast<const NodalUserObject *>(uo);
4917  nuo && nuo->hasWritableCoupledVariables())
4918  {
4919  _aux->solution().close();
4920  _aux->system().update();
4921  break;
4922  }
4923 
4924  // Execute MortarUserObjects
4925  {
4926  for (auto obj : mortar)
4927  obj->initialize();
4928  if (!mortar.empty())
4929  {
4930  auto create_and_run_mortar_functors = [this, type, &mortar](const bool displaced)
4931  {
4932  // go over mortar interfaces and construct functors
4933  const auto & mortar_interfaces = getMortarInterfaces(displaced);
4934  for (const auto & mortar_interface : mortar_interfaces)
4935  {
4936  const auto primary_secondary_boundary_pair = mortar_interface.first;
4937  auto mortar_uos_to_execute =
4938  getMortarUserObjects(primary_secondary_boundary_pair.first,
4939  primary_secondary_boundary_pair.second,
4940  displaced,
4941  mortar);
4942  const auto & mortar_generation_object = mortar_interface.second;
4943 
4944  auto * const subproblem = displaced
4945  ? static_cast<SubProblem *>(_displaced_problem.get())
4946  : static_cast<SubProblem *>(this);
4947  MortarUserObjectThread muot(mortar_uos_to_execute,
4948  mortar_generation_object,
4949  *subproblem,
4950  *this,
4951  displaced,
4952  subproblem->assembly(0, 0));
4953 
4954  muot();
4955  }
4956  };
4957 
4958  create_and_run_mortar_functors(false);
4959  if (_displaced_problem)
4960  create_and_run_mortar_functors(true);
4961  }
4962  for (auto obj : mortar)
4963  obj->finalize();
4964  }
4965 
4966  // Execute threaded general user objects
4967  for (auto obj : tgobjs)
4968  obj->initialize();
4969  std::vector<GeneralUserObject *> tguos_zero;
4970  query.clone()
4971  .condition<AttribThread>(0)
4972  .condition<AttribInterfaces>(Interfaces::ThreadedGeneralUserObject)
4973  .queryInto(tguos_zero);
4974  for (auto obj : tguos_zero)
4975  {
4976  std::vector<GeneralUserObject *> tguos;
4977  auto q = query.clone()
4978  .condition<AttribName>(obj->name())
4979  .condition<AttribInterfaces>(Interfaces::ThreadedGeneralUserObject);
4980  q.queryInto(tguos);
4981 
4983  Threads::parallel_reduce(GeneralUserObjectRange(tguos.begin(), tguos.end()), ctguot);
4984  joinAndFinalize(q);
4985  }
4986 
4987  // Execute general user objects
4989  true);
4990  }
4991  }
4992  catch (...)
4993  {
4994  handleException("computeUserObjectsInternal");
4995  }
4996 }
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1235
void joinAndFinalize(TheWarehouse::Query query, bool isgen=false)
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:313
Thread to compute threaded general user objects.
libMesh::ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1272
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:294
void handleException(const std::string &calling_method)
Handle exceptions.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
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 std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
StoredRange< std::vector< GeneralUserObject * >::iterator, GeneralUserObject * > GeneralUserObjectRange
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:344
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
query_obj query
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:31
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
Class for threaded computation of UserObjects.
std::shared_ptr< DisplacedProblem > _displaced_problem
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, AutomaticMortarGeneration > & getMortarInterfaces(bool on_displaced) const
virtual std::unique_ptr< Attribute > clone() const =0
clone creates and returns and identical (deep) copy of this attribute - i.e.

◆ computingNonlinearResid() [1/4]

bool SubProblem::computingNonlinearResid ( ) const
inlineinherited

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

Definition at line 707 of file SubProblem.h.

bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
Definition: SubProblem.h:1102

◆ computingNonlinearResid() [2/4]

bool SubProblem::computingNonlinearResid
inlineinherited

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

Definition at line 707 of file SubProblem.h.

bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
Definition: SubProblem.h:1102

◆ computingNonlinearResid() [3/4]

virtual void SubProblem::computingNonlinearResid
inlineinherited

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

Definition at line 712 of file SubProblem.h.

713  {
714  _computing_nonlinear_residual = computing_nonlinear_residual;
715  }
bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
Definition: SubProblem.h:1102

◆ computingNonlinearResid() [4/4]

void FEProblemBase::computingNonlinearResid ( bool  computing_nonlinear_residual)
finalvirtualinherited

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

Reimplemented from SubProblem.

Definition at line 8933 of file FEProblemBase.C.

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

8934 {
8935  parallel_object_only();
8936 
8937  if (_displaced_problem)
8938  _displaced_problem->computingNonlinearResid(computing_nonlinear_residual);
8939  _computing_nonlinear_residual = computing_nonlinear_residual;
8940 }
bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
Definition: SubProblem.h:1102
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ computingPreSMOResidual()

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

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 6572 of file FEProblemBase.C.

Referenced by DisplacedProblem::computingPreSMOResidual().

6573 {
6574  return _nl[nl_sys_num]->computingPreSMOResidual();
6575 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ computingScalingJacobian() [1/2]

void FEProblemBase::computingScalingJacobian ( bool  computing_scaling_jacobian)
inlineinherited

Setter for whether we're computing the scaling jacobian.

Definition at line 2345 of file FEProblemBase.h.

Referenced by ComputeJacobianThread::compute(), SolverSystem::compute(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeScaling(), and DisplacedProblem::computingScalingJacobian().

2346  {
2347  _computing_scaling_jacobian = computing_scaling_jacobian;
2348  }
bool _computing_scaling_jacobian
Flag used to indicate whether we are computing the scaling Jacobian.

◆ computingScalingJacobian() [2/2]

bool FEProblemBase::computingScalingJacobian ( ) const
inlinefinaloverridevirtualinherited

Getter for whether we're computing the scaling jacobian.

Implements SubProblem.

Definition at line 2350 of file FEProblemBase.h.

2350 { return _computing_scaling_jacobian; }
bool _computing_scaling_jacobian
Flag used to indicate whether we are computing the scaling Jacobian.

◆ computingScalingResidual() [1/2]

void FEProblemBase::computingScalingResidual ( bool  computing_scaling_residual)
inlineinherited

Setter for whether we're computing the scaling residual.

Definition at line 2355 of file FEProblemBase.h.

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

2356  {
2357  _computing_scaling_residual = computing_scaling_residual;
2358  }
bool _computing_scaling_residual
Flag used to indicate whether we are computing the scaling Residual.

◆ computingScalingResidual() [2/2]

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

Implements SubProblem.

Definition at line 2363 of file FEProblemBase.h.

2363 { return _computing_scaling_residual; }
bool _computing_scaling_residual
Flag used to indicate whether we are computing the scaling Residual.

◆ connectControllableParams()

void MooseBaseParameterInterface::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 33 of file MooseBaseParameterInterface.C.

37 {
38  MooseObjectParameterName primary_name(uniqueName(), parameter);
39  const auto base_type = _factory.getValidParams(object_type).get<std::string>("_moose_base");
40  MooseObjectParameterName secondary_name(base_type, object_name, object_parameter);
42  primary_name, secondary_name);
43 
44  const auto & tags = _pars.get<std::vector<std::string>>("control_tags");
45  for (const auto & tag : tags)
46  {
47  if (!tag.empty())
48  {
49  // Only adds the parameter with the different control tags if the derived class
50  // properly registers the parameter to its own syntax
51  MooseObjectParameterName tagged_name(tag, _moose_base.name(), parameter);
53  tagged_name, secondary_name, /*error_on_empty=*/false);
54  }
55  }
56 }
void addControllableParameterConnection(const MooseObjectParameterName &primary, const MooseObjectParameterName &secondary, bool error_on_empty=true)
Method for linking control parameters of different names.
const MooseBase & _moose_base
The MooseBase object that inherits this class.
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.
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition: MooseApp.C:2865
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Definition: Factory.C:68
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:45
Factory & _factory
The Factory associated with the MooseApp.
MooseObjectName uniqueName() const
The unique name for accessing input parameters of this object in the InputParameterWarehouse.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing an input parameter name.

◆ console()

const ConsoleStream& Problem::console ( ) const
inlineinherited

Return console handle.

Definition at line 48 of file Problem.h.

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

48 { return _console; }
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ constJacobian()

bool FEProblemBase::constJacobian ( ) const
inherited

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 8778 of file FEProblemBase.C.

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

8779 {
8780  return _const_jacobian;
8781 }
bool _const_jacobian
true if the Jacobian is constant

◆ 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 113 of file SubProblem.h.

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

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

◆ coordTransform()

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

Definition at line 9169 of file FEProblemBase.C.

9170 {
9171  return mesh().coordTransform();
9172 }
MooseAppCoordTransform & coordTransform()
Definition: MooseMesh.h:1888
virtual MooseMesh & mesh() override

◆ copySolutionsBackwards()

void FEProblemBase::copySolutionsBackwards ( )
virtualinherited

Definition at line 6578 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

6579 {
6580  TIME_SECTION("copySolutionsBackwards", 3, "Copying Solutions Backward");
6581 
6582  for (auto & sys : _solver_systems)
6583  sys->copySolutionsBackwards();
6584  _aux->copySolutionsBackwards();
6585 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ coupling()

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

Definition at line 165 of file FEProblemBase.h.

Referenced by DiffusionLHDGAssemblyHelper::checkCoupling(), and NonlinearSystemBase::computeJacobianInternal().

165 { return _coupling; }
Moose::CouplingType _coupling
Type of variable coupling.

◆ couplingEntries()

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

◆ couplingMatrix()

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

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

Implements SubProblem.

Definition at line 3262 of file FEProblemBase.h.

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

3263 {
3264  return _cm[i].get();
3265 }
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
Coupling matrix for variables.

◆ 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 
)
inherited

Definition at line 7776 of file FEProblemBase.C.

7784 {
7785  _has_mortar = true;
7786 
7787  if (on_displaced)
7788  return _mortar_data.createMortarInterface(primary_secondary_boundary_pair,
7789  primary_secondary_subdomain_pair,
7791  on_displaced,
7792  periodic,
7793  debug,
7794  correct_edge_dropping,
7795  minimum_projection_angle);
7796  else
7797  return _mortar_data.createMortarInterface(primary_secondary_boundary_pair,
7798  primary_secondary_subdomain_pair,
7799  *this,
7800  on_displaced,
7801  periodic,
7802  debug,
7803  correct_edge_dropping,
7804  minimum_projection_angle);
7805 }
void createMortarInterface(const std::pair< BoundaryID, BoundaryID > &boundary_key, const std::pair< SubdomainID, SubdomainID > &subdomain_key, SubProblem &subproblem, bool on_displaced, bool periodic, const bool debug, const bool correct_edge_dropping, const Real minimum_projection_angle)
Create mortar generation object.
Definition: MortarData.C:22
MortarData _mortar_data
std::shared_ptr< DisplacedProblem > _displaced_problem
bool _has_mortar
Whether the simulation requires mortar coupling.

◆ 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 
)
virtualinherited

Definition at line 6004 of file FEProblemBase.C.

6010 {
6011  if (order == INVALID_ORDER)
6012  {
6013  // automatically determine the integration order
6014  order = _solver_systems[0]->getMinQuadratureOrder();
6015  for (const auto i : make_range(std::size_t(1), _solver_systems.size()))
6016  if (order < _solver_systems[i]->getMinQuadratureOrder())
6017  order = _solver_systems[i]->getMinQuadratureOrder();
6018  if (order < _aux->getMinQuadratureOrder())
6019  order = _aux->getMinQuadratureOrder();
6020  }
6021 
6022  if (volume_order == INVALID_ORDER)
6023  volume_order = order;
6024 
6025  if (face_order == INVALID_ORDER)
6026  face_order = order;
6027 
6028  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
6029  for (const auto i : index_range(_solver_systems))
6030  _assembly[tid][i]->createQRules(
6031  type, order, volume_order, face_order, block, allow_negative_qweights);
6032 
6033  if (_displaced_problem)
6034  _displaced_problem->createQRules(
6035  type, order, volume_order, face_order, block, allow_negative_qweights);
6036 
6037  updateMaxQps();
6038 }
unsigned int n_threads()
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
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)
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
IntRange< T > make_range(T beg, T end)
std::shared_ptr< DisplacedProblem > _displaced_problem
auto index_range(const T &sizable)

◆ createTagSolutions()

void FEProblemBase::createTagSolutions ( )
protectedinherited

Create extra tagged solution vectors.

Definition at line 679 of file FEProblemBase.C.

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

680 {
681  for (auto & vector : getParam<std::vector<TagName>>("extra_tag_solutions"))
682  {
683  auto tag = addVectorTag(vector, Moose::VECTOR_TAG_SOLUTION);
684  for (auto & sys : _solver_systems)
685  sys->addVector(tag, false, libMesh::GHOSTED);
686  _aux->addVector(tag, false, libMesh::GHOSTED);
687  }
688 
690  {
691  // We'll populate the zeroth state of the nonlinear iterations with the current solution for
692  // ease of use in doing things like copying solutions backwards. We're just storing pointers in
693  // the solution states containers so populating the zeroth state does not cost us the memory of
694  // a new vector
696  }
697 
699  for (auto & sys : _solver_systems)
700  sys->associateVectorToTag(*sys->system().current_local_solution.get(), tag);
701  _aux->associateVectorToTag(*_aux->system().current_local_solution.get(), tag);
702 }
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:92
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
bool _previous_nl_solution_required
Indicates we need to save the previous NL iteration variable values.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
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...
const TagName SOLUTION_TAG
Definition: MooseTypes.C:25

◆ createTagVectors()

void FEProblemBase::createTagVectors ( )
protectedinherited

Create extra tagged vectors and matrices.

Definition at line 648 of file FEProblemBase.C.

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

649 {
650  // add vectors and their tags to system
651  auto & vectors = getParam<std::vector<std::vector<TagName>>>("extra_tag_vectors");
652  for (const auto sys_num : index_range(vectors))
653  for (auto & vector : vectors[sys_num])
654  {
655  auto tag = addVectorTag(vector);
656  _solver_systems[sys_num]->addVector(tag, false, libMesh::GHOSTED);
657  }
658 
659  auto & not_zeroed_vectors = getParam<std::vector<std::vector<TagName>>>("not_zeroed_tag_vectors");
660  for (const auto sys_num : index_range(not_zeroed_vectors))
661  for (auto & vector : not_zeroed_vectors[sys_num])
662  {
663  auto tag = addVectorTag(vector);
664  _solver_systems[sys_num]->addVector(tag, false, GHOSTED);
666  }
667 
668  // add matrices and their tags
669  auto & matrices = getParam<std::vector<std::vector<TagName>>>("extra_tag_matrices");
670  for (const auto sys_num : index_range(matrices))
671  for (auto & matrix : matrices[sys_num])
672  {
673  auto tag = addMatrixTag(matrix);
674  _solver_systems[sys_num]->addMatrix(tag);
675  }
676 }
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:92
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
virtual TagID addMatrixTag(TagName tag_name)
Create a Tag.
Definition: SubProblem.C:311
auto index_range(const T &sizable)
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:149

◆ currentLinearSysNum()

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

Implements SubProblem.

Definition at line 9186 of file FEProblemBase.C.

Referenced by DisplacedProblem::currentLinearSysNum().

9187 {
9188  // If we don't have linear systems this should be an invalid number
9189  unsigned int current_linear_sys_num = libMesh::invalid_uint;
9190  if (_linear_systems.size())
9191  current_linear_sys_num = currentLinearSystem().number();
9192 
9193  return current_linear_sys_num;
9194 }
const unsigned int invalid_uint
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
LinearSystem & currentLinearSystem()
Get a non-constant reference to the current linear system.
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ currentLinearSystem() [1/2]

LinearSystem & FEProblemBase::currentLinearSystem ( )
inlineinherited

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

Definition at line 3230 of file FEProblemBase.h.

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

3231 {
3232  mooseAssert(_current_linear_sys, "The linear system is not currently set");
3233  return *_current_linear_sys;
3234 }
LinearSystem * _current_linear_sys
The current linear system that we are solving.

◆ currentLinearSystem() [2/2]

const LinearSystem & FEProblemBase::currentLinearSystem ( ) const
inlineinherited

Get a constant reference to the current linear system.

Definition at line 3237 of file FEProblemBase.h.

3238 {
3239  mooseAssert(_current_linear_sys, "The linear system is not currently set");
3240  return *_current_linear_sys;
3241 }
LinearSystem * _current_linear_sys
The current linear system that we are solving.

◆ currentlyComputingJacobian()

const bool& SubProblem::currentlyComputingJacobian ( ) const
inlineinherited

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

Definition at line 684 of file SubProblem.h.

Referenced by PenetrationLocator::detectPenetration(), ComputeUserObjectsThread::onBoundary(), ComputeUserObjectsThread::onElement(), ComputeUserObjectsThread::printBlockExecutionInformation(), SubProblem::reinitElemFaceRef(), and NEML2Utils::shouldCompute().

bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.
Definition: SubProblem.h:1096

◆ currentlyComputingResidual() [1/2]

const bool& SubProblem::currentlyComputingResidual ( ) const
inlineinherited

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

Definition at line 720 of file SubProblem.h.

bool _currently_computing_residual
Whether the residual is being evaluated.
Definition: SubProblem.h:1105

◆ currentlyComputingResidual() [2/2]

const bool& SubProblem::currentlyComputingResidual
inlineinherited

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

Definition at line 720 of file SubProblem.h.

bool _currently_computing_residual
Whether the residual is being evaluated.
Definition: SubProblem.h:1105

◆ 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 1487 of file SubProblem.h.

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

1488 {
1490 }
bool _currently_computing_residual_and_jacobian
Flag to determine whether the problem is currently computing the residual and Jacobian.
Definition: SubProblem.h:1099

◆ currentNlSysNum()

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

Implements SubProblem.

Definition at line 9175 of file FEProblemBase.C.

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

9176 {
9177  // If we don't have nonlinear systems this should be an invalid number
9178  unsigned int current_nl_sys_num = libMesh::invalid_uint;
9179  if (_nl.size())
9180  current_nl_sys_num = currentNonlinearSystem().number();
9181 
9182  return current_nl_sys_num;
9183 }
const unsigned int invalid_uint
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
NonlinearSystemBase & currentNonlinearSystem()
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159

◆ currentNonlinearSystem() [1/2]

NonlinearSystemBase & FEProblemBase::currentNonlinearSystem ( )
inlineinherited

◆ currentNonlinearSystem() [2/2]

const NonlinearSystemBase & FEProblemBase::currentNonlinearSystem ( ) const
inlineinherited

Definition at line 3207 of file FEProblemBase.h.

3208 {
3209  mooseAssert(_current_nl_sys, "The nonlinear system is not currently set");
3210  return *_current_nl_sys;
3211 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.

◆ currentResidualVectorTags()

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

Return the residual vector tags we are currently computing.

Implements SubProblem.

Definition at line 3278 of file FEProblemBase.h.

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

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

◆ customSetup()

void FEProblemBase::customSetup ( const ExecFlagType exec_type)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 4561 of file FEProblemBase.C.

Referenced by FEProblemBase::execute().

4562 {
4563  SubProblem::customSetup(exec_type);
4564 
4565  if (_line_search)
4566  _line_search->customSetup(exec_type);
4567 
4568  unsigned int n_threads = libMesh::n_threads();
4569  for (THREAD_ID tid = 0; tid < n_threads; tid++)
4570  {
4571  _all_materials.customSetup(exec_type, tid);
4572  _functions.customSetup(exec_type, tid);
4573  }
4574 
4575  _aux->customSetup(exec_type);
4576  for (auto & nl : _nl)
4577  nl->customSetup(exec_type);
4578 
4579  if (_displaced_problem)
4580  _displaced_problem->customSetup(exec_type);
4581 
4582  for (THREAD_ID tid = 0; tid < n_threads; tid++)
4583  {
4584  _internal_side_indicators.customSetup(exec_type, tid);
4585  _indicators.customSetup(exec_type, tid);
4586  _markers.customSetup(exec_type, tid);
4587  }
4588 
4589  std::vector<UserObject *> userobjs;
4590  theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(userobjs);
4591  for (auto obj : userobjs)
4592  obj->customSetup(exec_type);
4593 
4594  _app.getOutputWarehouse().customSetup(exec_type);
4595 }
unsigned int n_threads()
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators
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)
Definition: SubProblem.C:1193
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
TheWarehouse & theWarehouse() const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
MooseObjectWarehouse< Indicator > _indicators
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseObjectWarehouse< Function > _functions
functions
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
MooseObjectWarehouse< Marker > _markers
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407
unsigned int THREAD_ID
Definition: MooseTypes.h:209
std::shared_ptr< LineSearch > _line_search

◆ 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 276 of file Restartable.h.

279 {
280  auto & data_ptr =
281  declareRestartableDataHelper<T>(data_name, context, std::forward<Args>(args)...);
282  return Restartable::ManagedValue<T>(data_ptr);
283 }
Wrapper class for restartable data that is "managed.
Definition: Restartable.h:42

◆ 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 351 of file Restartable.h.

352 {
353  const auto full_name = restartableName(data_name);
354 
356 
357  return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
358 }
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:66
void registerRestartableNameWithFilterOnApp(const std::string &name, Moose::RESTARTABLE_FILTER filter)
Helper function for actually registering the restartable data.
Definition: Restartable.C:59

◆ 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 269 of file Restartable.h.

270 {
271  return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
272 }

◆ 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 294 of file Restartable.h.

297 {
298  return declareRestartableDataHelper<T>(data_name, context, std::forward<Args>(args)...).set();
299 }

◆ 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 323 of file Restartable.h.

326 {
327  return declareRestartableDataWithObjectNameWithContext<T>(
328  data_name, object_name, nullptr, std::forward<Args>(args)...);
329 }

◆ 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 333 of file Restartable.h.

337 {
338  std::string old_name = _restartable_name;
339 
340  _restartable_name = object_name;
341 
342  T & value = declareRestartableDataWithContext<T>(data_name, context, std::forward<Args>(args)...);
343 
344  _restartable_name = old_name;
345 
346  return value;
347 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:243
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 144 of file SubProblem.h.

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

144 { return _default_ghosting; }
bool _default_ghosting
Whether or not to use default libMesh coupling.
Definition: SubProblem.h:1090

◆ diracKernelInfo()

DiracKernelInfo & SubProblem::diracKernelInfo ( )
virtualinherited

Definition at line 748 of file SubProblem.C.

749 {
750  return _dirac_kernel_info;
751 }
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1049

◆ doingPRefinement()

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

Definition at line 1361 of file SubProblem.C.

Referenced by FEProblemBase::meshChanged().

1362 {
1363  return mesh().doingPRefinement();
1364 }
virtual MooseMesh & mesh()=0
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we&#39;re doing is p-refinement.
Definition: MooseMesh.h:1347

◆ dt()

virtual Real& FEProblemBase::dt ( ) const
inlinevirtualinherited

◆ dtOld()

virtual Real& FEProblemBase::dtOld ( ) const
inlinevirtualinherited

Definition at line 518 of file FEProblemBase.h.

Referenced by IterationAdaptiveDT::acceptStep().

518 { return _dt_old; }

◆ duplicateVariableCheck()

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

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

Definition at line 2727 of file FEProblemBase.C.

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

2731 {
2732 
2733  std::set<SubdomainID> subdomainIDs;
2734  if (active_subdomains->size() == 0)
2735  {
2736  const auto subdomains = _mesh.meshSubdomains();
2737  subdomainIDs.insert(subdomains.begin(), subdomains.end());
2738  }
2739  else
2740  subdomainIDs.insert(active_subdomains->begin(), active_subdomains->end());
2741 
2742  for (auto & sys : _solver_systems)
2743  {
2744  SystemBase * curr_sys_ptr = sys.get();
2745  SystemBase * other_sys_ptr = _aux.get();
2746  std::string error_prefix = "";
2747  if (is_aux)
2748  {
2749  curr_sys_ptr = _aux.get();
2750  other_sys_ptr = sys.get();
2751  error_prefix = "aux";
2752  }
2753 
2754  if (other_sys_ptr->hasVariable(var_name))
2755  mooseError("Cannot have an auxiliary variable and a solver variable with the same name: ",
2756  var_name);
2757 
2758  if (curr_sys_ptr->hasVariable(var_name))
2759  {
2760  const Variable & var =
2761  curr_sys_ptr->system().variable(curr_sys_ptr->system().variable_number(var_name));
2762 
2763  // variable type
2764  if (var.type() != type)
2765  {
2766  const auto stringifyType = [](FEType t)
2767  { return Moose::stringify(t.family) + " of order " + Moose::stringify(t.order); };
2768 
2769  mooseError("Mismatching types are specified for ",
2770  error_prefix,
2771  "variable with name '",
2772  var_name,
2773  "': '",
2774  stringifyType(var.type()),
2775  "' and '",
2776  stringifyType(type),
2777  "'");
2778  }
2779 
2780  // block-restriction
2781  if (!(active_subdomains->size() == 0 && var.active_subdomains().size() == 0))
2782  {
2783  const auto varActiveSubdomains = var.active_subdomains();
2784  std::set<SubdomainID> varSubdomainIDs;
2785  if (varActiveSubdomains.size() == 0)
2786  {
2787  const auto subdomains = _mesh.meshSubdomains();
2788  varSubdomainIDs.insert(subdomains.begin(), subdomains.end());
2789  }
2790  else
2791  varSubdomainIDs.insert(varActiveSubdomains.begin(), varActiveSubdomains.end());
2792 
2793  // Is subdomainIDs a subset of varSubdomainIDs? With this we allow the case that the newly
2794  // requested block restriction is only a subset of the existing one.
2795  const auto isSubset = std::includes(varSubdomainIDs.begin(),
2796  varSubdomainIDs.end(),
2797  subdomainIDs.begin(),
2798  subdomainIDs.end());
2799 
2800  if (!isSubset)
2801  {
2802  // helper function: make a string from a set of subdomain ids
2803  const auto stringifySubdomains = [this](std::set<SubdomainID> subdomainIDs)
2804  {
2805  std::stringstream s;
2806  for (auto const i : subdomainIDs)
2807  {
2808  // do we need to insert a comma?
2809  if (s.tellp() != 0)
2810  s << ", ";
2811 
2812  // insert subdomain name and id -or- only the id (if no name is given)
2813  const auto subdomainName = _mesh.getSubdomainName(i);
2814  if (subdomainName.empty())
2815  s << i;
2816  else
2817  s << subdomainName << " (" << i << ")";
2818  }
2819  return s.str();
2820  };
2821 
2822  const std::string msg = "Mismatching block-restrictions are specified for " +
2823  error_prefix + "variable with name '" + var_name + "': {" +
2824  stringifySubdomains(varSubdomainIDs) + "} and {" +
2825  stringifySubdomains(subdomainIDs) + "}";
2826 
2827  mooseError(msg);
2828  }
2829  }
2830 
2831  return true;
2832  }
2833  }
2834 
2835  return false;
2836 }
const Variable & variable(unsigned int var) const
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
Base class for a system (of equations)
Definition: SystemBase.h:84
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1758
unsigned int variable_number(std::string_view var) const
const std::set< subdomain_id_type > & active_subdomains() const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:834
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3166
const FEType & type() const

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 40 of file MooseObject.h.

Referenced by EigenKernel::enabled().

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

◆ errorOnJacobianNonzeroReallocation()

bool FEProblemBase::errorOnJacobianNonzeroReallocation ( ) const
inlineinherited

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

Definition at line 1946 of file FEProblemBase.h.

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

1947  {
1949  }
bool _error_on_jacobian_nonzero_reallocation
Whether to error when the Jacobian is re-allocated, usually because the sparsity pattern changed...

◆ errorPrefix()

std::string MooseBase::errorPrefix ( const std::string &  error_type) const
inherited
Returns
A prefix to be used in errors that contains the input file location associated with this object (if any) and the name and type of the object.

Definition at line 43 of file MooseBase.C.

Referenced by MooseBase::callMooseError(), MooseBaseErrorInterface::mooseDeprecated(), MooseBaseErrorInterface::mooseInfo(), MooseBaseErrorInterface::mooseWarning(), and MooseBaseParameterInterface::paramErrorMsg().

44 {
45  std::stringstream oss;
46  if (const auto node = _params.getHitNode())
47  if (!node->isRoot())
48  oss << node->fileLocation() << ":\n";
49  oss << "The following " << error_type << " occurred in the ";
50  if (const auto base_ptr = _params.getBase())
51  oss << *base_ptr;
52  else
53  oss << "object";
54  oss << " '" << name() << "' of type " << type() << ".\n\n";
55  return oss.str();
56 }
const hit::Node * getHitNode(const std::string &param) const
std::optional< std::string > getBase() const
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & _params
The object&#39;s parameteres.
Definition: MooseBase.h:94
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ es()

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

◆ execMultiApps()

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

Execute the MultiApps associated with the ExecFlagType.

Definition at line 5402 of file FEProblemBase.C.

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

5403 {
5404  // Active MultiApps
5405  const std::vector<MooseSharedPointer<MultiApp>> & multi_apps =
5407 
5408  // Do anything that needs to be done to Apps before transfers
5409  for (const auto & multi_app : multi_apps)
5410  multi_app->preTransfer(_dt, _time);
5411 
5412  // Execute Transfers _to_ MultiApps
5414 
5415  // Execute Transfers _between_ Multiapps
5417 
5418  // Execute MultiApps
5419  if (multi_apps.size())
5420  {
5421  TIME_SECTION("execMultiApps", 1, "Executing MultiApps", false);
5422 
5423  if (_verbose_multiapps)
5424  _console << COLOR_CYAN << "\nExecuting MultiApps on " << Moose::stringify(type)
5425  << COLOR_DEFAULT << std::endl;
5426 
5427  bool success = true;
5428 
5429  for (const auto & multi_app : multi_apps)
5430  {
5431  success = multi_app->solveStep(_dt, _time, auto_advance);
5432  // no need to finish executing the subapps if one fails
5433  if (!success)
5434  break;
5435  }
5436 
5438 
5439  _communicator.min(success);
5440 
5441  if (!success)
5442  return false;
5443 
5444  if (_verbose_multiapps)
5445  _console << COLOR_CYAN << "Finished Executing MultiApps on " << Moose::stringify(type) << "\n"
5446  << COLOR_DEFAULT << std::endl;
5447  }
5448 
5449  // Execute Transfers _from_ MultiApps
5451 
5452  // If we made it here then everything passed
5453  return true;
5454 }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
const Parallel::Communicator & _communicator
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 min(const T &r, T &o, Request &req) const
void parallelBarrierNotify(const libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
Definition: MooseUtils.C:323
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
void execMultiAppTransfers(ExecFlagType type, Transfer::DIRECTION direction)
Execute MultiAppTransfers associated with execution flag and direction.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ execMultiAppTransfers()

void FEProblemBase::execMultiAppTransfers ( ExecFlagType  type,
Transfer::DIRECTION  direction 
)
inherited

Execute MultiAppTransfers associated with execution flag and direction.

Parameters
typeThe execution flag to execute.
directionThe direction (to or from) to transfer.

Definition at line 5302 of file FEProblemBase.C.

Referenced by FEProblemBase::execMultiApps().

5303 {
5304  bool to_multiapp = direction == MultiAppTransfer::TO_MULTIAPP;
5305  bool from_multiapp = direction == MultiAppTransfer::FROM_MULTIAPP;
5306  std::string string_direction;
5307  if (to_multiapp)
5308  string_direction = " To ";
5309  else if (from_multiapp)
5310  string_direction = " From ";
5311  else
5312  string_direction = " Between ";
5313 
5314  const MooseObjectWarehouse<Transfer> & wh = to_multiapp ? _to_multi_app_transfers[type]
5315  : from_multiapp ? _from_multi_app_transfers[type]
5317 
5318  if (wh.hasActiveObjects())
5319  {
5320  TIME_SECTION("execMultiAppTransfers", 1, "Executing Transfers");
5321 
5322  const auto & transfers = wh.getActiveObjects();
5323 
5324  if (_verbose_multiapps)
5325  {
5326  _console << COLOR_CYAN << "\nTransfers on " << Moose::stringify(type) << string_direction
5327  << "MultiApps" << COLOR_DEFAULT << ":" << std::endl;
5328 
5330  {"Name", "Type", "From", "To"});
5331 
5332  // Build Table of Transfer Info
5333  for (const auto & transfer : transfers)
5334  {
5335  auto multiapp_transfer = dynamic_cast<MultiAppTransfer *>(transfer.get());
5336 
5337  table.addRow(multiapp_transfer->name(),
5338  multiapp_transfer->type(),
5339  multiapp_transfer->getFromName(),
5340  multiapp_transfer->getToName());
5341  }
5342 
5343  // Print it
5344  table.print(_console);
5345  }
5346 
5347  for (const auto & transfer : transfers)
5348  {
5349  transfer->setCurrentDirection(direction);
5350  transfer->execute();
5351  }
5352 
5354 
5355  if (_verbose_multiapps)
5356  _console << COLOR_CYAN << "Transfers on " << Moose::stringify(type) << " Are Finished\n"
5357  << COLOR_DEFAULT << std::endl;
5358  }
5359  else if (_multi_apps[type].getActiveObjects().size())
5360  {
5361  if (_verbose_multiapps)
5362  _console << COLOR_CYAN << "\nNo Transfers on " << Moose::stringify(type) << string_direction
5363  << "MultiApps\n"
5364  << COLOR_DEFAULT << std::endl;
5365  }
5366 }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
A class for "pretty printing" a table of data.
Definition: PerfGraph.h:34
void setCurrentDirection(const int direction)
Set this Transfer to be executed in a given direction.
Definition: Transfer.h:89
const Parallel::Communicator & _communicator
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
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...
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
void parallelBarrierNotify(const libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
Definition: MooseUtils.C:323
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
bool hasActiveObjects(THREAD_ID tid=0) const
Base class for all MultiAppTransfer objects.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ execTransfers()

void FEProblemBase::execTransfers ( ExecFlagType  type)
inherited

Execute the Transfers associated with the ExecFlagType.

Note: This does not execute MultiApp Transfers! Those are executed automatically when MultiApps are executed.

Definition at line 5572 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobianTags(), FEProblemBase::computeLinearSystemTags(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualTags(), FEProblemBase::initialSetup(), FixedPointSolve::solve(), and FixedPointSolve::solveStep().

5573 {
5574  if (_transfers[type].hasActiveObjects())
5575  {
5576  TIME_SECTION("execTransfers", 3, "Executing Transfers");
5577 
5578  const auto & transfers = _transfers[type].getActiveObjects();
5579 
5580  for (const auto & transfer : transfers)
5581  transfer->execute();
5582  }
5583 }
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
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...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ execute()

void FEProblemBase::execute ( const ExecFlagType exec_type)
virtualinherited

Convenience function for performing execution of MOOSE systems.

Reimplemented in EigenProblem, and DumpObjectsProblem.

Definition at line 4598 of file FEProblemBase.C.

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

4599 {
4600  // Set the current flag
4601  setCurrentExecuteOnFlag(exec_type);
4602 
4603  if (exec_type != EXEC_INITIAL)
4604  executeControls(exec_type);
4605 
4606  // intentially call this after executing controls because the setups may rely on the controls
4607  // FIXME: we skip the following flags because they have dedicated setup functions in
4608  // SetupInterface and it may not be appropriate to call them here.
4609  if (!(exec_type == EXEC_INITIAL || exec_type == EXEC_TIMESTEP_BEGIN ||
4610  exec_type == EXEC_SUBDOMAIN || exec_type == EXEC_NONLINEAR || exec_type == EXEC_LINEAR))
4611  customSetup(exec_type);
4612 
4613  // Samplers; EXEC_INITIAL is not called because the Sampler::init() method that is called after
4614  // construction makes the first Sampler::execute() call. This ensures that the random number
4615  // generator object is the correct state prior to any other object (e.g., Transfers) attempts to
4616  // extract data from the Sampler. That is, if the Sampler::execute() call is delayed to here
4617  // then it is not in the correct state for other objects.
4618  if (exec_type != EXEC_INITIAL)
4619  executeSamplers(exec_type);
4620 
4621  // Pre-aux UserObjects
4622  computeUserObjects(exec_type, Moose::PRE_AUX);
4623 
4624  // Systems (includes system time derivative and aux kernel calculations)
4625  computeSystems(exec_type);
4626  // With the auxiliary system solution computed, sync the displaced problem auxiliary solution
4627  // before computation of post-aux user objects. The undisplaced auxiliary system current local
4628  // solution is updated (via System::update) within the AuxiliarySystem class's variable
4629  // computation methods (e.g. computeElementalVarsHelper, computeNodalVarsHelper), so it is safe to
4630  // use it here
4631  if (_displaced_problem)
4632  _displaced_problem->syncAuxSolution(*getAuxiliarySystem().currentSolution());
4633 
4634  // Post-aux UserObjects
4635  computeUserObjects(exec_type, Moose::POST_AUX);
4636 
4637  // Return the current flag to None
4639 
4641  {
4642  // we will only check aux variables and postprocessors
4643  // checking more reporter data can be added in the future if needed
4644  std::unique_ptr<NumericVector<Number>> x = _aux->currentSolution()->clone();
4646 
4647  // call THIS execute one more time for checking the possible states
4648  _checking_uo_aux_state = true;
4649  FEProblemBase::execute(exec_type);
4650  _checking_uo_aux_state = false;
4651 
4652  const Real check_tol = 1e-8;
4653 
4654  const Real xnorm = x->l2_norm();
4655  *x -= *_aux->currentSolution();
4656  if (x->l2_norm() > check_tol * xnorm)
4657  {
4658  const auto & sys = _aux->system();
4659  const unsigned int n_vars = sys.n_vars();
4660  std::multimap<Real, std::string, std::greater<Real>> ordered_map;
4661  for (const auto i : make_range(n_vars))
4662  {
4663  const Real vnorm = sys.calculate_norm(*x, i, DISCRETE_L2);
4664  ordered_map.emplace(vnorm, sys.variable_name(i));
4665  }
4666 
4667  std::ostringstream oss;
4668  for (const auto & [error_norm, var_name] : ordered_map)
4669  oss << " {" << var_name << ", " << error_norm << "},\n";
4670 
4671  mooseError("Aux kernels, user objects appear to have states for aux variables on ",
4672  exec_type,
4673  ".\nVariable error norms in descending order:\n",
4674  oss.str());
4675  }
4676 
4678  if (pp_values.size() != new_pp_values.size())
4679  mooseError("Second execution for uo/aux state check should not change the number of "
4680  "real reporter values");
4681 
4682  const Real ppnorm = pp_values.l2_norm();
4683  pp_values -= new_pp_values;
4684  if (pp_values.l2_norm() > check_tol * ppnorm)
4685  {
4686  const auto pp_names = getReporterData().getAllRealReporterFullNames();
4687  std::multimap<Real, std::string, std::greater<Real>> ordered_map;
4688  for (const auto i : index_range(pp_names))
4689  ordered_map.emplace(std::abs(pp_values(i)), pp_names[i]);
4690 
4691  std::ostringstream oss;
4692  for (const auto & [error_norm, pp_name] : ordered_map)
4693  oss << " {" << pp_name << ", " << error_norm << "},\n";
4694 
4695  mooseError("Aux kernels, user objects appear to have states for real reporter values on ",
4696  exec_type,
4697  ".\nErrors of real reporter values in descending order:\n",
4698  oss.str());
4699  }
4700  }
4701 }
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
Definition: EigenADReal.h:42
const bool _uo_aux_state_check
Whether or not checking the state of uo/aux evaluation.
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
void setCurrentExecuteOnFlag(const ExecFlagType &)
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
virtual void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
DenseVector< Real > getAllRealReporterValues() const
Get all real reporter values including postprocessor and vector postprocessor values into a dense vec...
Definition: ReporterData.C:81
unsigned int n_vars
Real l2_norm() const
std::vector< std::string > getAllRealReporterFullNames() const
Get full names of all real reporter values Note: For a postprocessor, the full name is the postproces...
Definition: ReporterData.C:106
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:35
void executeSamplers(const ExecFlagType &exec_type)
Performs setup and execute calls for Sampler objects.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
AuxiliarySystem & getAuxiliarySystem()
bool _checking_uo_aux_state
Flag used to indicate whether we are doing the uo/aux state check in execute.
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:31
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void customSetup(const ExecFlagType &exec_type) override
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual unsigned int size() const override final
std::shared_ptr< DisplacedProblem > _displaced_problem
const ExecFlagType EXEC_SUBDOMAIN
Definition: Moose.C:46
auto index_range(const T &sizable)
void computeSystems(const ExecFlagType &type)
Do generic system computations.
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28

◆ executeAllObjects()

void FEProblemBase::executeAllObjects ( const ExecFlagType exec_type)
virtualinherited

Definition at line 4556 of file FEProblemBase.C.

Referenced by Executor::exec().

4557 {
4558 }

◆ executeControls()

void FEProblemBase::executeControls ( const ExecFlagType exec_type)
inherited

Performs setup and execute calls for Control objects.

Definition at line 4999 of file FEProblemBase.C.

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

5000 {
5001  if (_control_warehouse[exec_type].hasActiveObjects())
5002  {
5003  TIME_SECTION("executeControls", 1, "Executing Controls");
5004 
5006 
5007  auto controls_wh = _control_warehouse[exec_type];
5008  // Add all of the dependencies into the resolver and sort them
5009  for (const auto & it : controls_wh.getActiveObjects())
5010  {
5011  // Make sure an item with no dependencies comes out too!
5012  resolver.addItem(it);
5013 
5014  std::vector<std::string> & dependent_controls = it->getDependencies();
5015  for (const auto & depend_name : dependent_controls)
5016  {
5017  if (controls_wh.hasActiveObject(depend_name))
5018  {
5019  auto dep_control = controls_wh.getActiveObject(depend_name);
5020  resolver.addEdge(dep_control, it);
5021  }
5022  else
5023  mooseError("The Control \"",
5024  depend_name,
5025  "\" was not created, did you make a "
5026  "spelling mistake or forget to include it "
5027  "in your input file?");
5028  }
5029  }
5030 
5031  const auto & ordered_controls = resolver.getSortedValues();
5032 
5033  if (!ordered_controls.empty())
5034  {
5035  _control_warehouse.setup(exec_type);
5036  // Run the controls in the proper order
5037  for (const auto & control : ordered_controls)
5038  control->execute();
5039  }
5040  }
5041 }
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.
const std::vector< T > & getSortedValues()
This function also returns dependency resolved values but with a simpler single vector interface...
void setup(const ExecFlagType &exec_flag, THREAD_ID tid=0) const
void addEdge(const T &a, const T &b)
Add an edge between nodes &#39;a&#39; and &#39;b&#39;.
void addItem(const T &value)
Add an independent item to the set.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Class that represents the dependecy as a graph.

◆ executeSamplers()

void FEProblemBase::executeSamplers ( const ExecFlagType exec_type)
inherited

Performs setup and execute calls for Sampler objects.

Definition at line 5044 of file FEProblemBase.C.

Referenced by FEProblemBase::execute().

5045 {
5046  // TODO: This should be done in a threaded loop, but this should be super quick so for now
5047  // do a serial loop.
5048  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
5049  {
5050  std::vector<Sampler *> objects;
5051  theWarehouse()
5052  .query()
5053  .condition<AttribSystem>("Sampler")
5054  .condition<AttribThread>(tid)
5055  .condition<AttribExecOns>(exec_type)
5056  .queryInto(objects);
5057 
5058  if (!objects.empty())
5059  {
5060  TIME_SECTION("executeSamplers", 1, "Executing Samplers");
5061  FEProblemBase::objectSetupHelper<Sampler>(objects, exec_type);
5062  FEProblemBase::objectExecuteHelper<Sampler>(objects);
5063  }
5064  }
5065 }
unsigned int n_threads()
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ feBackend()

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

◆ finalizeMultiApps()

void FEProblemBase::finalizeMultiApps ( )
inherited

Definition at line 5457 of file FEProblemBase.C.

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

5458 {
5459  const auto & multi_apps = _multi_apps.getActiveObjects();
5460 
5461  for (const auto & multi_app : multi_apps)
5462  multi_app->finalize();
5463 }
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...
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.

◆ finalNonlinearResidual()

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

Reimplemented from SubProblem.

Definition at line 6566 of file FEProblemBase.C.

6567 {
6568  return _nl[nl_sys_num]->finalNonlinearResidual();
6569 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ finishMultiAppStep()

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

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

Optionally recurse through all multi-app levels

Definition at line 5485 of file FEProblemBase.C.

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

5486 {
5487  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5488 
5489  if (multi_apps.size())
5490  {
5491  if (_verbose_multiapps)
5492  _console << COLOR_CYAN << "\nAdvancing MultiApps on " << type.name() << COLOR_DEFAULT
5493  << std::endl;
5494 
5495  for (const auto & multi_app : multi_apps)
5496  multi_app->finishStep(recurse_through_multiapp_levels);
5497 
5499 
5500  if (_verbose_multiapps)
5501  _console << COLOR_CYAN << "Finished Advancing MultiApps on " << type.name() << "\n"
5502  << COLOR_DEFAULT << std::endl;
5503  }
5504 }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
const Parallel::Communicator & _communicator
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 libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
Definition: MooseUtils.C:323
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ forceOutput()

void FEProblemBase::forceOutput ( )
inherited

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 6686 of file FEProblemBase.C.

Referenced by TransientMultiApp::solveStep().

6687 {
6689 }
void forceOutput()
Indicates that the next call to outputStep should be forced This is private, users should utilize FEP...
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407

◆ fvBCsIntegrityCheck() [1/2]

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

Definition at line 2274 of file FEProblemBase.h.

2274 { return _fv_bcs_integrity_check; }
bool _fv_bcs_integrity_check
Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset...

◆ fvBCsIntegrityCheck() [2/2]

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

Definition at line 3268 of file FEProblemBase.h.

3269 {
3271  // the user has requested that we don't check integrity so we will honor that
3272  return;
3273 
3274  _fv_bcs_integrity_check = fv_bcs_integrity_check;
3275 }
bool _fv_bcs_integrity_check
Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset...

◆ geomSearchData()

virtual GeometricSearchData& FEProblemBase::geomSearchData ( )
inlineoverridevirtualinherited

◆ 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 454 of file SubProblem.C.

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

455 {
457 }
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) ...
Definition: SubProblem.h:1075

◆ getActiveFEVariableCoupleableMatrixTags()

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

Definition at line 390 of file SubProblem.C.

391 {
393 }
std::vector< std::set< TagID > > _active_fe_var_coupleable_matrix_tags
Definition: SubProblem.h:1081

◆ getActiveFEVariableCoupleableVectorTags()

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

Definition at line 396 of file SubProblem.C.

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute().

397 {
399 }
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags
Definition: SubProblem.h:1083

◆ getActiveScalarVariableCoupleableMatrixTags()

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

Definition at line 431 of file SubProblem.C.

Referenced by MooseVariableScalar::reinit().

432 {
434 }
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags
Definition: SubProblem.h:1085

◆ getActiveScalarVariableCoupleableVectorTags()

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

Definition at line 437 of file SubProblem.C.

438 {
440 }
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
Definition: SubProblem.h:1087

◆ getActualFieldVariable()

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

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

Implements SubProblem.

Definition at line 5700 of file FEProblemBase.C.

Referenced by MultiAppVariableValueSampleTransfer::execute().

5701 {
5702  for (auto & sys : _solver_systems)
5703  if (sys->hasVariable(var_name))
5704  return sys->getActualFieldVariable<Real>(tid, var_name);
5705  if (_aux->hasVariable(var_name))
5706  return _aux->getActualFieldVariable<Real>(tid, var_name);
5707 
5708  mooseError("Unknown variable " + var_name);
5709 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getArrayVariable()

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

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

Implements SubProblem.

Definition at line 5724 of file FEProblemBase.C.

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

5725 {
5726  for (auto & sys : _solver_systems)
5727  if (sys->hasVariable(var_name))
5728  return sys->getFieldVariable<RealEigenVector>(tid, var_name);
5729  if (_aux->hasVariable(var_name))
5730  return _aux->getFieldVariable<RealEigenVector>(tid, var_name);
5731 
5732  mooseError("Unknown variable " + var_name);
5733 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:146

◆ getAuxiliarySystem()

AuxiliarySystem& FEProblemBase::getAuxiliarySystem ( )
inlineinherited

◆ 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 796 of file SubProblem.C.

797 {
798  return mesh().getAxisymmetricRadialCoord();
799 }
virtual MooseMesh & mesh()=0
unsigned int getAxisymmetricRadialCoord() const
Returns the desired radial direction for RZ coordinate transformation.
Definition: MooseMesh.C:4263

◆ getBndMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getBndMaterialPropertyStorage ( )
inlineinherited

Definition at line 1694 of file FEProblemBase.h.

1694 { return _bnd_material_props; }
MaterialPropertyStorage & _bnd_material_props

◆ getCheckedPointerParam()

template<typename T >
T MooseBaseParameterInterface::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 286 of file MooseBaseParameterInterface.h.

288 {
289  return parameters().getCheckedPointerParam<T>(name, error_string);
290 }
std::string name(const ElemQuality q)
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...
const InputParameters & parameters() const
Get the parameters of the object.

◆ 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 742 of file SubProblem.C.

Referenced by MaterialPropertyDebugOutput::output().

743 {
745 }
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
Definition: SubProblem.h:1185

◆ getControlWarehouse()

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

Reference to the control logic warehouse.

Definition at line 2066 of file FEProblemBase.h.

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

2066 { return _control_warehouse; }
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.

◆ getConvergence()

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

Gets a Convergence object.

Definition at line 2615 of file FEProblemBase.C.

Referenced by TransientBase::convergedToSteadyState(), FEProblemSolve::convergenceSetup(), FixedPointSolve::examineFixedPointConvergence(), FixedPointIterationAdaptiveDT::init(), TransientBase::init(), ParsedConvergence::initializeConvergenceSymbol(), SteffensenSolve::initialSetup(), FixedPointSolve::initialSetup(), Moose::PetscSupport::petscLinearConverged(), Moose::PetscSupport::petscNonlinearConverged(), FixedPointSolve::solve(), and FixedPointSolve::solveStep().

2616 {
2617  auto * const ret = dynamic_cast<Convergence *>(_convergences.getActiveObject(name, tid).get());
2618  if (!ret)
2619  mooseError("The Convergence object '", name, "' does not exist.");
2620 
2621  return *ret;
2622 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MooseObjectWarehouse< Convergence > _convergences
convergence warehouse
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
Base class for convergence criteria.
Definition: Convergence.h:21
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getConvergenceObjects()

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

Gets the Convergence objects.

Definition at line 2625 of file FEProblemBase.C.

2626 {
2627  return _convergences.getActiveObjects(tid);
2628 }
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...
MooseObjectWarehouse< Convergence > _convergences
convergence warehouse

◆ getCoordSystem()

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

Definition at line 1278 of file SubProblem.C.

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

1279 {
1280  return mesh().getCoordSystem(sid);
1281 }
virtual MooseMesh & mesh()=0
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Get the coordinate system type, e.g.
Definition: MooseMesh.C:4144

◆ getCurrentAlgebraicBndNodeRange()

const ConstBndNodeRange & FEProblemBase::getCurrentAlgebraicBndNodeRange ( )
inherited

Definition at line 9327 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeNodalBCs(), NonlinearSystemBase::computeNodalBCsResidualAndJacobian(), NonlinearSystemBase::computeResidualInternal(), and NonlinearSystemBase::setInitialSolution().

9328 {
9330  return *_mesh.getBoundaryNodeRange();
9331 
9333 }
MooseMesh & _mesh
std::unique_ptr< ConstBndNodeRange > _current_algebraic_bnd_node_range
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1286

◆ getCurrentAlgebraicElementRange()

const ConstElemRange & FEProblemBase::getCurrentAlgebraicElementRange ( )
inherited

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 9311 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeDamping(), NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), and NonlinearSystemBase::computeScaling().

9312 {
9315 
9317 }
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1235
std::unique_ptr< libMesh::ConstElemRange > _current_algebraic_elem_range
MooseMesh & _mesh

◆ getCurrentAlgebraicNodeRange()

const ConstNodeRange & FEProblemBase::getCurrentAlgebraicNodeRange ( )
inherited

Definition at line 9319 of file FEProblemBase.C.

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

9320 {
9322  return *_mesh.getLocalNodeRange();
9323 
9325 }
std::unique_ptr< libMesh::ConstNodeRange > _current_algebraic_node_range
libMesh::ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1272
MooseMesh & _mesh

◆ getCurrentExecuteOnFlag()

const ExecFlagType & FEProblemBase::getCurrentExecuteOnFlag ( ) const
inherited

Return/set the current execution flag.

Returns EXEC_NONE when not being executed.

See also
FEProblemBase::execute

Definition at line 4544 of file FEProblemBase.C.

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

4545 {
4546  return _current_execute_on_flag;
4547 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.

◆ getCurrentICState()

unsigned short FEProblemBase::getCurrentICState ( )
inherited

Retrieves the current initial condition state.

Returns
current initial condition state

Definition at line 9370 of file FEProblemBase.C.

Referenced by ComputeInitialConditionThread::operator()().

9371 {
9372  return _current_ic_state;
9373 }
unsigned short _current_ic_state

◆ 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 }
void mooseDeprecated(Args &&... args) const
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
const ParallelParamObject & _parent

◆ 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.
void mooseDeprecated(Args &&... args) const
const ParallelParamObject & _parent

◆ 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.

Referenced by DataFileInterface::getDataFileNameByName().

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  // Throw on error so that if getPath() fails, we can throw an error
50  // with the context of _parent.mooseError()
51  const auto throw_on_error_before = Moose::_throw_on_error;
53  std::optional<std::string> error;
54 
55  // This will search the data paths for this relative path
56  Moose::DataFileUtils::Path found_path;
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  Moose::_throw_on_error = throw_on_error_before;
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 }
Context context
Context for the file (where it came from)
Definition: DataFileUtils.h:48
void mooseInfo(Args &&... args) const
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Representation of a data file path.
Definition: DataFileUtils.h:36
Path getPath(std::string path, const std::optional< std::string > &base=std::optional< std::string >())
Get the data path for a given path, searching the registered data.
Definition: DataFileUtils.C:22
std::optional< std::string > data_name
The name of the data registry the file came from (with context == DATA)
Definition: DataFileUtils.h:50
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool _throw_on_error
Variable to turn on exceptions during mooseError(), should only be used within MOOSE unit tests or wh...
Definition: Moose.C:760
const ParallelParamObject & _parent

◆ getDiracElements()

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

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

Implements SubProblem.

Definition at line 2435 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeDiracContributions().

2436 {
2437  // First add in the undisplaced elements
2438  elems = _dirac_kernel_info.getElements();
2439 
2440  if (_displaced_problem)
2441  {
2442  std::set<const Elem *> displaced_elements;
2443  _displaced_problem->getDiracElements(displaced_elements);
2444 
2445  { // Use the ids from the displaced elements to get the undisplaced elements
2446  // and add them to the list
2447  for (const auto & elem : displaced_elements)
2448  elems.insert(_mesh.elemPtr(elem->id()));
2449  }
2450  }
2451 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
MooseMesh & _mesh
std::shared_ptr< DisplacedProblem > _displaced_problem
std::set< const Elem * > & getElements()
Returns a writeable reference to the _elements container.
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1049

◆ getDiscreteMaterialWarehouse()

const MaterialWarehouse& FEProblemBase::getDiscreteMaterialWarehouse ( ) const
inlineinherited

Definition at line 1917 of file FEProblemBase.h.

1917 { return _discrete_materials; }
MaterialWarehouse _discrete_materials

◆ getDisplacedProblem() [1/2]

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

◆ getDisplacedProblem() [2/2]

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

Definition at line 1636 of file FEProblemBase.h.

1636 { return _displaced_problem; }
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ getDistribution()

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

Definition at line 2685 of file FEProblemBase.C.

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

2686 {
2687  std::vector<Distribution *> objs;
2688  theWarehouse()
2689  .query()
2690  .condition<AttribSystem>("Distribution")
2691  .condition<AttribName>(name)
2692  .queryInto(objs);
2693  if (objs.empty())
2694  mooseError("Unable to find Distribution with name '" + name + "'");
2695  return *(objs[0]);
2696 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getEvaluableElementRange()

const ConstElemRange & FEProblemBase::getEvaluableElementRange ( )
inherited

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 822 of file FEProblemBase.C.

Referenced by NodalPatchRecoveryBase::finalize().

823 {
825  {
826  std::vector<const DofMap *> dof_maps(es().n_systems());
827  for (const auto i : make_range(es().n_systems()))
828  {
829  const auto & sys = es().get_system(i);
830  dof_maps[i] = &sys.get_dof_map();
831  }
833  std::make_unique<ConstElemRange>(_mesh.getMesh().multi_evaluable_elements_begin(dof_maps),
834  _mesh.getMesh().multi_evaluable_elements_end(dof_maps));
835  }
837 }
const T_sys & get_system(std::string_view name) const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3443
virtual libMesh::EquationSystems & es() override
MooseMesh & _mesh
IntRange< T > make_range(T beg, T end)
std::unique_ptr< libMesh::ConstElemRange > _evaluable_local_elem_range

◆ getExecutor()

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

Definition at line 2018 of file FEProblemBase.h.

2018 { return _app.getExecutor(name); }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
Executor * getExecutor() const
Definition: MooseApp.h:361

◆ getFailNextNonlinearConvergenceCheck()

bool FEProblemBase::getFailNextNonlinearConvergenceCheck ( ) const
inlineinherited

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

Definition at line 2406 of file FEProblemBase.h.

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

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

◆ getFailNextSystemConvergenceCheck()

bool FEProblemBase::getFailNextSystemConvergenceCheck ( ) const
inlineinherited

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

Definition at line 2408 of file FEProblemBase.h.

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

bool _fail_next_system_convergence_check

◆ getFunction()

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

Definition at line 2564 of file FEProblemBase.C.

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

2565 {
2566  // This thread lock is necessary since this method will create functions
2567  // for all threads if one is missing.
2568  Threads::spin_mutex::scoped_lock lock(get_function_mutex);
2569 
2570  if (!hasFunction(name, tid))
2571  {
2572  // If we didn't find a function, it might be a default function, attempt to construct one now
2573  std::istringstream ss(name);
2574  Real real_value;
2575 
2576  // First see if it's just a constant. If it is, build a ConstantFunction
2577  if (ss >> real_value && ss.eof())
2578  {
2579  InputParameters params = _factory.getValidParams("ConstantFunction");
2580  params.set<Real>("value") = real_value;
2581  addFunction("ConstantFunction", ss.str(), params);
2582  }
2583  else
2584  {
2586  std::string vars = "x,y,z,t,NaN,pi,e";
2587  if (fp.Parse(name, vars) == -1) // -1 for success
2588  {
2589  // It parsed ok, so build a MooseParsedFunction
2590  InputParameters params = _factory.getValidParams("ParsedFunction");
2591  params.set<std::string>("expression") = name;
2592  addFunction("ParsedFunction", name, params);
2593  }
2594  }
2595 
2596  // Try once more
2597  if (!hasFunction(name, tid))
2598  mooseError("Unable to find function " + name);
2599  }
2600 
2601  auto * const ret = dynamic_cast<Function *>(_functions.getActiveObject(name, tid).get());
2602  if (!ret)
2603  mooseError("No function named ", name, " of appropriate type");
2604 
2605  return *ret;
2606 }
Base class for function objects.
Definition: Function.h:36
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1047
Threads::spin_mutex get_function_mutex
char ** vars
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
virtual void addFunction(const std::string &type, const std::string &name, InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MooseObjectWarehouse< Function > _functions
functions
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)

◆ 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 1214 of file SubProblem.h.

Referenced by FunctorInterface::getFunctorByName().

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

◆ getFVInitialConditionWarehouse()

const FVInitialConditionWarehouse& FEProblemBase::getFVInitialConditionWarehouse ( ) const
inlineinherited

Return FVInitialCondition storage.

Definition at line 1721 of file FEProblemBase.h.

Referenced by ComputeFVInitialConditionThread::operator()(), and ComputeFVInitialConditionThread::printGeneralExecutionInformation().

1721 { return _fv_ics; }
FVInitialConditionWarehouse _fv_ics

◆ 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 
)
inherited

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 9006 of file FEProblemBase.C.

9012 {
9013  if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
9014  {
9015  auto & this_face_mats =
9017  for (std::shared_ptr<MaterialBase> face_mat : this_face_mats)
9018  if (face_mat->ghostable())
9019  {
9020  face_materials.push_back(face_mat);
9021  auto & var_deps = face_mat->getMooseVariableDependencies();
9022  for (auto * var : var_deps)
9023  {
9024  if (!var->isFV())
9025  mooseError(
9026  "Ghostable materials should only have finite volume variables coupled into them.");
9027  else if (face_mat->hasStatefulProperties())
9028  mooseError("Finite volume materials do not currently support stateful properties.");
9029  variables.insert(var);
9030  }
9031  }
9032  }
9033 
9034  if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
9035  {
9036  auto & this_neighbor_mats =
9038  for (std::shared_ptr<MaterialBase> neighbor_mat : this_neighbor_mats)
9039  if (neighbor_mat->ghostable())
9040  {
9041  neighbor_materials.push_back(neighbor_mat);
9042 #ifndef NDEBUG
9043  auto & var_deps = neighbor_mat->getMooseVariableDependencies();
9044  for (auto * var : var_deps)
9045  {
9046  if (!var->isFV())
9047  mooseError(
9048  "Ghostable materials should only have finite volume variables coupled into them.");
9049  else if (neighbor_mat->hasStatefulProperties())
9050  mooseError("Finite volume materials do not currently support stateful properties.");
9051  auto pr = variables.insert(var);
9052  mooseAssert(!pr.second,
9053  "We should not have inserted any new variables dependencies from our "
9054  "neighbor materials that didn't exist for our face materials");
9055  }
9056 #endif
9057  }
9058  }
9059 }
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MaterialWarehouse _materials

◆ getIndicatorWarehouse()

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

Return indicator/marker storage.

Definition at line 1705 of file FEProblemBase.h.

1705 { return _indicators; }
MooseObjectWarehouse< Indicator > _indicators

◆ getInitialConditionWarehouse()

const InitialConditionWarehouse& FEProblemBase::getInitialConditionWarehouse ( ) const
inlineinherited

Return InitialCondition storage.

Definition at line 1716 of file FEProblemBase.h.

Referenced by ComputeBoundaryInitialConditionThread::onNode(), ComputeInitialConditionThread::operator()(), and ComputeInitialConditionThread::printGeneralExecutionInformation().

1716 { return _ics; }
InitialConditionWarehouse _ics

◆ getInterfaceMaterialsWarehouse()

const MaterialWarehouse& FEProblemBase::getInterfaceMaterialsWarehouse ( ) const
inlineinherited

Definition at line 1918 of file FEProblemBase.h.

1918 { return _interface_materials; }
MaterialWarehouse _interface_materials

◆ getInternalSideIndicatorWarehouse()

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

Definition at line 1706 of file FEProblemBase.h.

1707  {
1709  }
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators

◆ getLinearConvergenceNames()

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

Gets the linear convergence object name(s).

Definition at line 9115 of file FEProblemBase.C.

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

9116 {
9118  return *_linear_convergence_names;
9119  mooseError("The linear convergence name(s) have not been set.");
9120 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::optional< std::vector< ConvergenceName > > _linear_convergence_names
Linear system(s) convergence name(s) (if any)

◆ getLinearSystem() [1/2]

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

Get non-constant reference to a linear system.

Parameters
sys_numThe number of the linear system

Definition at line 3214 of file FEProblemBase.h.

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

3215 {
3216  mooseAssert(sys_num < _linear_systems.size(),
3217  "System number greater than the number of linear systems");
3218  return *_linear_systems[sys_num];
3219 }
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ getLinearSystem() [2/2]

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

Get a constant reference to a linear system.

Parameters
sys_numThe number of the linear system

Definition at line 3222 of file FEProblemBase.h.

3223 {
3224  mooseAssert(sys_num < _linear_systems.size(),
3225  "System number greater than the number of linear systems");
3226  return *_linear_systems[sys_num];
3227 }
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ getLinearSystemNames()

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

Definition at line 2487 of file FEProblemBase.h.

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

2487 { return _linear_sys_names; }
const std::vector< LinearSystemName > _linear_sys_names
The linear system names.

◆ getLineSearch()

LineSearch* FEProblemBase::getLineSearch ( )
inlineoverridevirtualinherited

getter for the MOOSE line search

Implements SubProblem.

Definition at line 725 of file FEProblemBase.h.

Referenced by DisplacedProblem::getLineSearch().

725 { return _line_search.get(); }
std::shared_ptr< LineSearch > _line_search

◆ getMarkerWarehouse()

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

Definition at line 1710 of file FEProblemBase.h.

1710 { return _markers; }
MooseObjectWarehouse< Marker > _markers

◆ getMaterial()

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

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 3739 of file FEProblemBase.C.

Referenced by MaterialPropertyInterface::getMaterialByName().

3743 {
3744  switch (type)
3745  {
3747  name += "_neighbor";
3748  break;
3750  name += "_face";
3751  break;
3752  default:
3753  break;
3754  }
3755 
3756  std::shared_ptr<MaterialBase> material = _all_materials[type].getActiveObject(name, tid);
3757  if (!no_warn && material->getParam<bool>("compute") && type == Moose::BLOCK_MATERIAL_DATA)
3758  mooseWarning("You are retrieving a Material object (",
3759  material->name(),
3760  "), but its compute flag is set to true. This indicates that MOOSE is "
3761  "computing this property which may not be desired and produce un-expected "
3762  "results.");
3763 
3764  return material;
3765 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
MaterialWarehouse _all_materials

◆ getMaterialData()

MaterialData & FEProblemBase::getMaterialData ( Moose::MaterialDataType  type,
const THREAD_ID  tid = 0 
) const
inherited

Definition at line 3768 of file FEProblemBase.C.

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

3769 {
3770  switch (type)
3771  {
3773  return _material_props.getMaterialData(tid);
3780  }
3781 
3782  mooseError("FEProblemBase::getMaterialData(): Invalid MaterialDataType ", type);
3783 }
MaterialPropertyStorage & _bnd_material_props
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MaterialPropertyStorage & _neighbor_material_props
const MaterialData & getMaterialData(const THREAD_ID tid) const
MaterialPropertyStorage & _material_props

◆ 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 489 of file SubProblem.C.

Referenced by MaterialPropertyInterface::getMaterialPropertyBlockNames().

490 {
491  std::set<SubdomainID> blocks = getMaterialPropertyBlocks(prop_name);
492  std::vector<SubdomainName> block_names;
493  block_names.reserve(blocks.size());
494  for (const auto & block_id : blocks)
495  {
496  SubdomainName name;
497  name = mesh().getMesh().subdomain_name(block_id);
498  if (name.empty())
499  {
500  std::ostringstream oss;
501  oss << block_id;
502  name = oss.str();
503  }
504  block_names.push_back(name);
505  }
506 
507  return block_names;
508 }
virtual MooseMesh & mesh()=0
char ** blocks
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3443
std::string & subdomain_name(subdomain_id_type id)
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:473

◆ 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 473 of file SubProblem.C.

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

474 {
475  std::set<SubdomainID> blocks;
476 
477  for (const auto & it : _map_block_material_props)
478  {
479  const std::set<std::string> & prop_names = it.second;
480  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
481  if (name_it != prop_names.end())
482  blocks.insert(it.first);
483  }
484 
485  return blocks;
486 }
char ** blocks
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1052

◆ 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 525 of file SubProblem.C.

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

526 {
527  std::set<BoundaryID> boundaries;
528 
529  for (const auto & it : _map_boundary_material_props)
530  {
531  const std::set<std::string> & prop_names = it.second;
532  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
533  if (name_it != prop_names.end())
534  boundaries.insert(it.first);
535  }
536 
537  return boundaries;
538 }
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1055

◆ 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 541 of file SubProblem.C.

Referenced by MaterialPropertyInterface::getMaterialPropertyBoundaryNames().

542 {
543  std::set<BoundaryID> boundaries = getMaterialPropertyBoundaryIDs(prop_name);
544  std::vector<BoundaryName> boundary_names;
545  boundary_names.reserve(boundaries.size());
546  const BoundaryInfo & boundary_info = mesh().getMesh().get_boundary_info();
547 
548  for (const auto & bnd_id : boundaries)
549  {
550  BoundaryName name;
551  if (bnd_id == Moose::ANY_BOUNDARY_ID)
552  name = "ANY_BOUNDARY_ID";
553  else
554  {
555  name = boundary_info.get_sideset_name(bnd_id);
556  if (name.empty())
557  {
558  std::ostringstream oss;
559  oss << bnd_id;
560  name = oss.str();
561  }
562  }
563  boundary_names.push_back(name);
564  }
565 
566  return boundary_names;
567 }
virtual MooseMesh & mesh()=0
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:525
const BoundaryInfo & get_boundary_info() const
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3443
const std::string & get_sideset_name(boundary_id_type id) const
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:21

◆ getMaterialPropertyRegistry()

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

Definition at line 1683 of file FEProblemBase.h.

Referenced by MaterialBase::checkStatefulSanity().

1684  {
1685  return _material_prop_registry;
1686  }
MaterialPropertyRegistry _material_prop_registry

◆ getMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getMaterialPropertyStorage ( )
inlineinherited

Return a reference to the material property storage.

Returns
A const reference to the material property storage

Definition at line 1693 of file FEProblemBase.h.

1693 { return _material_props; }
MaterialPropertyStorage & _material_props

◆ getMaterialWarehouse()

const MaterialWarehouse& FEProblemBase::getMaterialWarehouse ( ) const
inlineinherited

◆ getMatrixTagID()

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

Get a TagID from a TagName.

Reimplemented in DisplacedProblem.

Definition at line 342 of file SubProblem.C.

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

343 {
344  auto tag_name_upper = MooseUtils::toUpper(tag_name);
345 
346  if (!matrixTagExists(tag_name))
347  mooseError("Matrix tag: ",
348  tag_name,
349  " does not exist. ",
350  "If this is a TimeKernel then this may have happened because you didn't "
351  "specify a Transient Executioner.");
352 
353  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
354 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1041
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328

◆ getMatrixTags()

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

Return all matrix tags in the system, where a tag is represented by a map from name to ID.

Definition at line 253 of file SubProblem.h.

Referenced by NonlinearSystemBase::computeJacobian(), FEProblemBase::computeJacobian(), EigenProblem::computeJacobianAB(), NonlinearSystemBase::computeJacobianBlocks(), EigenProblem::computeJacobianTag(), FEProblemBase::computeLinearSystemSys(), and FEProblemBase::computeResidualAndJacobian().

253 { return _matrix_tag_name_to_tag_id; }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1041

◆ getMaxQps()

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

Definition at line 1580 of file FEProblemBase.C.

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

1581 {
1583  mooseError("Max QPS uninitialized");
1584  return _max_qps;
1585 }
auto max(const L &left, const R &right)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
unsigned int _max_qps
Maximum number of quadrature points used in the problem.

◆ getMaxScalarOrder()

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

Definition at line 1588 of file FEProblemBase.C.

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

1589 {
1590  return _max_scalar_order;
1591 }
libMesh::Order _max_scalar_order
Maximum scalar variable order.

◆ getMeshDivision()

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

Get a MeshDivision.

Definition at line 2646 of file FEProblemBase.C.

Referenced by NestedDivision::NestedDivision().

2647 {
2648  auto * const ret = dynamic_cast<MeshDivision *>(_mesh_divisions.getActiveObject(name, tid).get());
2649  if (!ret)
2650  mooseError("No MeshDivision object named ", name, " of appropriate type");
2651  return *ret;
2652 }
Base class for MeshDivision objects.
Definition: MeshDivision.h:35
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
MooseObjectWarehouse< MeshDivision > _mesh_divisions
Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the ...
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getMooseApp()

MooseApp& MooseBase::getMooseApp ( ) const
inlineinherited

Get the MooseApp this class is associated with.

Definition at line 45 of file MooseBase.h.

Referenced by ChainControlSetupAction::act(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), FEProblemBase::advanceState(), ParsedChainControl::buildFunction(), ReporterTransferInterface::checkHasReporterValue(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), Coupleable::checkWritableVar(), ComponentPhysicsInterface::ComponentPhysicsInterface(), MooseBaseParameterInterface::connectControllableParams(), Coupleable::Coupleable(), MortarData::createMortarInterface(), EigenProblem::doFreeNonlinearPowerIterations(), Terminator::execute(), FEProblemSolve::FEProblemSolve(), SolutionInvalidInterface::flagInvalidSolutionInternal(), ChainControl::getChainControlDataSystem(), DefaultConvergenceBase::getSharedExecutionerParam(), ChainControlDataPostprocessor::initialSetup(), MaterialPropertyInterface::MaterialPropertyInterface(), MooseVariableDataFV< OutputType >::MooseVariableDataFV(), ProgressOutput::output(), PetscOutputInterface::petscLinearOutput(), PetscOutputInterface::petscNonlinearOutput(), PetscOutputInterface::PetscOutputInterface(), PostprocessorInterface::postprocessorsAdded(), MultiApp::preTransfer(), Reporter::Reporter(), ReporterInterface::reportersAdded(), and VectorPostprocessorInterface::vectorPostprocessorsAdded().

45 { return _app; }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84

◆ getMortarInterface() [1/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
inherited

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

Definition at line 7808 of file FEProblemBase.C.

7812 {
7814  primary_secondary_boundary_pair, primary_secondary_subdomain_pair, on_displaced);
7815 }
const AutomaticMortarGeneration & getMortarInterface(const std::pair< BoundaryID, BoundaryID > &boundary_key, const std::pair< SubdomainID, SubdomainID > &, bool on_displaced) const
Getter to retrieve the AutomaticMortarGeneration object corresponding to the boundary and subdomain k...
Definition: MortarData.C:116
MortarData _mortar_data

◆ getMortarInterface() [2/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 
)
inherited

Definition at line 7818 of file FEProblemBase.C.

7822 {
7824  primary_secondary_boundary_pair, primary_secondary_subdomain_pair, on_displaced);
7825 }
const AutomaticMortarGeneration & getMortarInterface(const std::pair< BoundaryID, BoundaryID > &boundary_key, const std::pair< SubdomainID, SubdomainID > &, bool on_displaced) const
Getter to retrieve the AutomaticMortarGeneration object corresponding to the boundary and subdomain k...
Definition: MortarData.C:116
MortarData _mortar_data

◆ getMortarInterfaces()

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

Definition at line 7828 of file FEProblemBase.C.

Referenced by FEProblemBase::computeUserObjectsInternal(), and NonlinearSystemBase::initialSetup().

7829 {
7830  return _mortar_data.getMortarInterfaces(on_displaced);
7831 }
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, AutomaticMortarGeneration > & getMortarInterfaces(bool on_displaced) const
Return all automatic mortar generation objects on either the displaced or undisplaced mesh...
Definition: MortarData.h:73
MortarData _mortar_data

◆ getMultiApp()

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

Get a MultiApp object by name.

Definition at line 5296 of file FEProblemBase.C.

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

5297 {
5298  return _multi_apps.getObject(multi_app_name);
5299 }
std::shared_ptr< T > getObject(const std::string &name, THREAD_ID tid=0) const
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.

◆ getMultiAppFixedPointConvergenceName()

const ConvergenceName & FEProblemBase::getMultiAppFixedPointConvergenceName ( ) const
inherited

Gets the MultiApp fixed point convergence object name.

Definition at line 9123 of file FEProblemBase.C.

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

9124 {
9127  else
9128  mooseError("The fixed point convergence name has not been set.");
9129 }
std::optional< ConvergenceName > _multiapp_fixed_point_convergence_name
MultiApp fixed point convergence name.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getMultiAppTransferWarehouse()

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

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

Definition at line 5391 of file FEProblemBase.C.

5392 {
5393  if (direction == MultiAppTransfer::TO_MULTIAPP)
5394  return _to_multi_app_transfers;
5395  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
5397  else
5399 }
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.

◆ getMultiAppWarehouse()

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

Definition at line 2090 of file FEProblemBase.h.

Referenced by MooseApp::errorCheck().

2090 { return _multi_apps; }
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.

◆ getNeighborMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getNeighborMaterialPropertyStorage ( )
inlineinherited

Definition at line 1695 of file FEProblemBase.h.

1696  {
1697  return _neighbor_material_props;
1698  }
MaterialPropertyStorage & _neighbor_material_props

◆ getNonlinearConvergenceNames()

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

Gets the nonlinear system convergence object name(s).

Definition at line 9091 of file FEProblemBase.C.

Referenced by ReferenceResidualProblem::addDefaultNonlinearConvergence(), FEProblemBase::addDefaultNonlinearConvergence(), FEProblemSolve::convergenceSetup(), and Moose::PetscSupport::petscNonlinearConverged().

9092 {
9095  mooseError("The nonlinear system convergence name(s) have not been set.");
9096 }
std::optional< std::vector< ConvergenceName > > _nonlinear_convergence_names
Nonlinear system(s) convergence name(s)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getNonlinearEvaluableElementRange()

const ConstElemRange & FEProblemBase::getNonlinearEvaluableElementRange ( )
inherited

Definition at line 840 of file FEProblemBase.C.

Referenced by ElemSideNeighborLayersTester::execute().

841 {
843  {
844  std::vector<const DofMap *> dof_maps(_nl.size());
845  for (const auto i : index_range(dof_maps))
846  dof_maps[i] = &_nl[i]->dofMap();
848  std::make_unique<ConstElemRange>(_mesh.getMesh().multi_evaluable_elements_begin(dof_maps),
849  _mesh.getMesh().multi_evaluable_elements_end(dof_maps));
850  }
851 
853 }
std::unique_ptr< libMesh::ConstElemRange > _nl_evaluable_local_elem_range
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3443
MooseMesh & _mesh
auto index_range(const T &sizable)

◆ getNonlinearSystem()

NonlinearSystem & FEProblem::getNonlinearSystem ( const unsigned int  nl_sys_num)
inlineoverridevirtual

Reimplemented from FEProblemBase.

Definition at line 48 of file FEProblem.h.

49 {
50  return *_nl_sys[nl_sys_num];
51 }
std::vector< std::shared_ptr< NonlinearSystem > > _nl_sys
Definition: FEProblem.h:39

◆ getNonlinearSystemBase() [1/2]

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

Definition at line 3170 of file FEProblemBase.h.

Referenced by IterationAdaptiveDT::acceptStep(), Adaptivity::adaptMesh(), DisplacedProblem::addTimeIntegrator(), ADKernelTempl< T >::ADKernelTempl(), ElementSubdomainModifierBase::applyIC(), ArrayKernel::ArrayKernel(), Eigenvalue::checkIntegrity(), PseudoTimestep::currentResidualNorm(), DisplacedProblem::DisplacedProblem(), AB2PredictorCorrector::estimateTimeError(), VariableResidual::execute(), MatrixSymmetryCheck::execute(), GreaterThanLessThanPostprocessor::execute(), Executioner::Executioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), NumResidualEvaluations::getValue(), Residual::getValue(), Adaptivity::init(), ReferenceResidualConvergence::initialSetup(), ActivateElementsUserObjectBase::initSolutions(), Kernel::Kernel(), BoundaryElemIntegrityCheckThread::operator()(), DOFMapOutput::output(), SolutionHistory::output(), ConsoleUtils::outputExecutionInformation(), Console::outputSystemInformation(), Moose::PetscSupport::petscSetDefaults(), ReferenceResidualConvergence::ReferenceResidualConvergence(), Moose::PetscSupport::setLineSearchFromParams(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), AB2PredictorCorrector::step(), DisplacedProblem::syncSolutions(), and Console::writeVariableNorms().

3171 {
3172  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
3173  return *_nl[sys_num];
3174 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ getNonlinearSystemBase() [2/2]

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

Definition at line 3177 of file FEProblemBase.h.

3178 {
3179  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
3180  return *_nl[sys_num];
3181 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ getNonlinearSystemNames()

const std::vector<NonlinearSystemName>& FEProblemBase::getNonlinearSystemNames ( ) const
inlineinherited
Returns
the nolinear system names in the problem

Definition at line 2483 of file FEProblemBase.h.

Referenced by PhysicsBase::initializePhysics(), Console::meshChanged(), MultiSystemSolveObject::MultiSystemSolveObject(), ConsoleUtils::outputExecutionInformation(), and Console::outputSystemInformation().

2483 { return _nl_sys_names; }
const std::vector< NonlinearSystemName > _nl_sys_names
The nonlinear system names.

◆ getNumCyclesCompleted()

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

Definition at line 1746 of file FEProblemBase.h.

1746 { return _cycles_completed; }
unsigned int _cycles_completed

◆ getParam() [1/2]

template<typename T >
const T & MooseBaseParameterInterface::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 215 of file MooseBaseParameterInterface.h.

Referenced by CreateDisplacedProblemAction::act(), AddPeriodicBCAction::act(), DiffusionPhysicsBase::addPostprocessors(), ADNodalKernel::ADNodalKernel(), ArrayParsedAux::ArrayParsedAux(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), ComponentPhysicsInterface::ComponentPhysicsInterface(), FunctorAux::computeValue(), FEProblemBase::createTagSolutions(), CutMeshByLevelSetGenerator::CutMeshByLevelSetGenerator(), DebugResidualAux::DebugResidualAux(), AccumulateReporter::declareLateValues(), DerivativeParsedMaterialTempl< is_ad >::DerivativeParsedMaterialTempl(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenKernel::EigenKernel(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), ParsedSubdomainGeneratorBase::functionInitialize(), FVInterfaceKernel::FVInterfaceKernel(), BoundaryLayerSubdomainGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), BlockDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), GeneratedMeshGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), MeshExtruderGenerator::generate(), GenericConstantRankTwoTensorTempl< is_ad >::GenericConstantRankTwoTensorTempl(), GenericConstantSymmetricRankTwoTensorTempl< is_ad >::GenericConstantSymmetricRankTwoTensorTempl(), MooseApp::getCheckpointDirectories(), DataFileInterface::getDataFileName(), ExecutorInterface::getExecutor(), GhostingUserObject::GhostingUserObject(), FixedPointIterationAdaptiveDT::init(), TimeSequenceStepper::init(), IterationAdaptiveDT::init(), AdvancedOutput::init(), AttribThread::initFrom(), AttribSysNum::initFrom(), AttribResidualObject::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MooseMesh::MooseMesh(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MultiSystemSolveObject::MultiSystemSolveObject(), NEML2ModelExecutor::NEML2ModelExecutor(), NestedDivision::NestedDivision(), ConsoleUtils::outputExecutionInformation(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedGenerateNodeset::ParsedGenerateNodeset(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterialTempl< is_ad >::ParsedMaterialTempl(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseConstantByBlockMaterialTempl< is_ad >::PiecewiseConstantByBlockMaterialTempl(), ReferenceResidualInterface::ReferenceResidualInterface(), RenameBlockGenerator::RenameBlockGenerator(), Moose::FV::setInterpolationMethod(), SetupMeshAction::setupMesh(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), and VectorOfPostprocessors::VectorOfPostprocessors().

216 {
217  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0), &_moose_base);
218 }
const MooseBase & _moose_base
The MooseBase object that inherits this class.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseBase *moose_base=nullptr)

◆ getParam() [2/2]

template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > MooseBaseParameterInterface::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 279 of file MooseBaseParameterInterface.h.

280 {
281  return _pars.get<T1, T2>(param1, param2);
282 }
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.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ getPetscOptions()

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

◆ getPositionsObject()

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

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 4366 of file FEProblemBase.C.

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

4367 {
4368  std::vector<Positions *> objs;
4369  theWarehouse()
4370  .query()
4371  .condition<AttribSystem>("UserObject")
4372  .condition<AttribName>(name)
4373  .queryInto(objs);
4374  if (objs.empty())
4375  mooseError("Unable to find Positions object with name '" + name + "'");
4376  mooseAssert(objs.size() == 1, "Should only find one Positions");
4377  return *(objs[0]);
4378 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getPostprocessorValueByName()

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

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 4400 of file FEProblemBase.C.

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

4402 {
4404  t_index);
4405 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
ReporterData _reporter_data
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.
Definition: ReporterData.h:388
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:202
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:134

◆ getRegularMaterialsWarehouse()

const MaterialWarehouse& FEProblemBase::getRegularMaterialsWarehouse ( ) const
inlineinherited

Definition at line 1916 of file FEProblemBase.h.

Referenced by Moose::Mortar::setupMortarMaterials().

1916 { return _materials; }
MaterialWarehouse _materials

◆ getRenamedParam()

template<typename T >
const T & MooseBaseParameterInterface::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 229 of file MooseBaseParameterInterface.h.

231 {
232  // this enables having a default on the new parameter but bypassing it with the old one
233  // Most important: accept new parameter
234  if (isParamSetByUser(new_name) && !isParamValid(old_name))
235  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0), &_moose_base);
236  // Second most: accept old parameter
237  else if (isParamValid(old_name) && !isParamSetByUser(new_name))
238  return InputParameters::getParamHelper(old_name, _pars, static_cast<T *>(0), &_moose_base);
239  // Third most: accept default for new parameter
240  else if (isParamValid(new_name) && !isParamValid(old_name))
241  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0), &_moose_base);
242  // Refuse: no default, no value passed
243  else if (!isParamValid(old_name) && !isParamValid(new_name))
244  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
245  "' is being retrieved without being set.\n"
246  "Did you misspell it?");
247  // Refuse: both old and new parameters set by user
248  else
249  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
250  "' may not be provided alongside former parameter '" + old_name + "'");
251 }
const MooseBase & _moose_base
The MooseBase object that inherits this class.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
bool isParamSetByUser(const std::string &nm) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
std::string blockFullpath() const
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseBase *moose_base=nullptr)

◆ getReporterData() [1/2]

const ReporterData& FEProblemBase::getReporterData ( ) const
inlineinherited

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 1103 of file FEProblemBase.h.

Referenced by ReporterTransferInterface::addReporterTransferMode(), ReporterTransferInterface::checkHasReporterValue(), ReporterTransferInterface::clearVectorReporter(), ConstantPostprocessor::ConstantPostprocessor(), AccumulateReporter::declareAccumulateHelper(), ReporterTransferInterface::declareClone(), AccumulateReporter::declareLateValues(), VectorPostprocessor::declareVector(), ReporterTransferInterface::declareVectorClone(), FEProblemBase::execute(), PostprocessorInterface::getPostprocessorValueByNameInternal(), VectorPostprocessorInterface::getVectorPostprocessorByNameHelper(), VectorPostprocessorInterface::getVectorPostprocessorContextByNameHelper(), PostprocessorInterface::hasPostprocessorByName(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), ReporterPositions::initialize(), ReporterTimes::initialize(), MooseParsedFunctionWrapper::initialize(), ParsedConvergence::initializeSymbols(), JSONOutput::initialSetup(), PostprocessorInterface::isDefaultPostprocessorValueByName(), ReporterDebugOutput::output(), Receiver::Receiver(), ReporterTransferInterface::resizeReporter(), ReporterTransferInterface::sumVectorReporter(), ReporterTransferInterface::transferFromVectorReporter(), ReporterTransferInterface::transferReporter(), and ReporterTransferInterface::transferToVectorReporter().

1103 { return _reporter_data; }
ReporterData _reporter_data

◆ getReporterData() [2/2]

ReporterData& FEProblemBase::getReporterData ( ReporterData::WriteKey  )
inlineinherited

Provides non-const access the ReporterData object that is used to store reporter values.

see ReporterData.h

Definition at line 1110 of file FEProblemBase.h.

1110 { return _reporter_data; }
ReporterData _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 287 of file Restartable.h.

288 {
289  return declareRestartableDataHelper<T>(data_name, nullptr).get();
290 }

◆ getSampler()

Sampler & FEProblemBase::getSampler ( const std::string &  name,
const THREAD_ID  tid = 0 
)
virtualinherited

Definition at line 2709 of file FEProblemBase.C.

Referenced by SamplerInterface::getSampler(), and SamplerInterface::getSamplerByName().

2710 {
2711  std::vector<Sampler *> objs;
2712  theWarehouse()
2713  .query()
2714  .condition<AttribSystem>("Sampler")
2715  .condition<AttribThread>(tid)
2716  .condition<AttribName>(name)
2717  .queryInto(objs);
2718  if (objs.empty())
2719  mooseError(
2720  "Unable to find Sampler with name '" + name +
2721  "', if you are attempting to access this object in the constructor of another object then "
2722  "the object being retrieved must occur prior to the caller within the input file.");
2723  return *(objs[0]);
2724 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getScalarVariable()

MooseVariableScalar & FEProblemBase::getScalarVariable ( const THREAD_ID  tid,
const std::string &  var_name 
)
overridevirtualinherited

Returns the scalar variable reference from whichever system contains it.

Implements SubProblem.

Definition at line 5748 of file FEProblemBase.C.

Referenced by FEProblemBase::addInitialCondition(), EigenProblem::adjustEigenVector(), MultiAppScalarToAuxScalarTransfer::execute(), MooseParsedFunctionWrapper::initialize(), ChainControlParsedFunctionWrapper::initializeFunctionInputs(), TableOutput::outputScalarVariables(), and Exodus::outputScalarVariables().

5749 {
5750  for (auto & sys : _solver_systems)
5751  if (sys->hasScalarVariable(var_name))
5752  return sys->getScalarVariable(tid, var_name);
5753  if (_aux->hasScalarVariable(var_name))
5754  return _aux->getScalarVariable(tid, var_name);
5755 
5756  mooseError("Unknown variable " + var_name);
5757 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ 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 68 of file MooseObject.C.

Referenced by MFEMProblem::addBoundaryCondition(), MFEMProblem::addKernel(), and MFEMProblem::addMFEMSolver().

69 {
70  try
71  {
72  return shared_from_this();
73  }
74  catch (std::bad_weak_ptr &)
75  {
76  mooseError(not_shared_error);
77  }
78 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getSharedPtr() [2/2]

std::shared_ptr< const MooseObject > MooseObject::getSharedPtr ( ) const
inherited

Definition at line 81 of file MooseObject.C.

82 {
83  try
84  {
85  return shared_from_this();
86  }
87  catch (std::bad_weak_ptr &)
88  {
89  mooseError(not_shared_error);
90  }
91 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getSolverSystem() [1/2]

SolverSystem & FEProblemBase::getSolverSystem ( unsigned int  sys_num)
inlineinherited

Get non-constant reference to a solver system.

Parameters
sys_numThe number of the solver system

Definition at line 3184 of file FEProblemBase.h.

Referenced by MooseApp::attachRelationshipManagers(), MooseMesh::cacheFaceInfoVariableOwnership(), MooseMesh::cacheFVElementalDoFs(), MultiSystemSolveObject::MultiSystemSolveObject(), ConsoleUtils::outputSolverSystemInformation(), Moose::PetscSupport::petscSetDefaultKSPNormType(), and Moose::PetscSupport::petscSetDefaultPCSide().

3185 {
3186  mooseAssert(sys_num < _solver_systems.size(),
3187  "System number greater than the number of solver systems");
3188  return *_solver_systems[sys_num];
3189 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.

◆ getSolverSystem() [2/2]

const SolverSystem & FEProblemBase::getSolverSystem ( unsigned int  sys_num) const
inlineinherited

Get a constant reference to a solver system.

Parameters
sys_numThe number of the solver system

Definition at line 3192 of file FEProblemBase.h.

3193 {
3194  mooseAssert(sys_num < _solver_systems.size(),
3195  "System number greater than the number of solver systems");
3196  return *_solver_systems[sys_num];
3197 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.

◆ getSolverSystemNames()

const std::vector<SolverSystemName>& FEProblemBase::getSolverSystemNames ( ) const
inlineinherited
Returns
the solver system names in the problem

Definition at line 2491 of file FEProblemBase.h.

Referenced by ConsoleUtils::outputExecutionInformation().

2491 { return _solver_sys_names; }
std::vector< SolverSystemName > _solver_sys_names
The union of nonlinear and linear system names.

◆ getStandardVariable()

MooseVariable & FEProblemBase::getStandardVariable ( const THREAD_ID  tid,
const std::string &  var_name 
)
overridevirtualinherited

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

Implements SubProblem.

Definition at line 5688 of file FEProblemBase.C.

Referenced by CoupleableMooseVariableDependencyIntermediateInterface::coupledValueByName().

5689 {
5690  for (auto & sys : _solver_systems)
5691  if (sys->hasVariable(var_name))
5692  return sys->getFieldVariable<Real>(tid, var_name);
5693  if (_aux->hasVariable(var_name))
5694  return _aux->getFieldVariable<Real>(tid, var_name);
5695 
5696  mooseError("Unknown variable " + var_name);
5697 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getSteadyStateConvergenceName()

const ConvergenceName & FEProblemBase::getSteadyStateConvergenceName ( ) const
inherited

Gets the steady-state detection convergence object name.

Definition at line 9132 of file FEProblemBase.C.

Referenced by FEProblemBase::addDefaultSteadyStateConvergence(), TransientBase::convergedToSteadyState(), and TransientBase::init().

9133 {
9135  return _steady_state_convergence_name.value();
9136  else
9137  mooseError("The steady convergence name has not been set.");
9138 }
std::optional< ConvergenceName > _steady_state_convergence_name
Steady-state detection convergence name.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getSystem()

System & FEProblemBase::getSystem ( const std::string &  var_name)
overridevirtualinherited

Returns the equation system containing the variable provided.

Implements SubProblem.

Definition at line 5760 of file FEProblemBase.C.

Referenced by FEProblemBase::addObjectParamsHelper(), and MultiApp::appTransferVector().

5761 {
5762  const auto [var_in_sys, sys_num] = determineSolverSystem(var_name);
5763  if (var_in_sys)
5764  return _solver_systems[sys_num]->system();
5765  else if (_aux->hasVariable(var_name) || _aux->hasScalarVariable(var_name))
5766  return _aux->system();
5767  else
5768  mooseError("Unable to find a system containing the variable " + var_name);
5769 }
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::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getSystemBase() [1/2]

const SystemBase & FEProblemBase::getSystemBase ( const unsigned int  sys_num) const
virtualinherited

Get constant reference to a system in this problem.

Parameters
sys_numThe number of the system

Definition at line 8857 of file FEProblemBase.C.

Referenced by PhysicsBase::copyVariablesFromMesh().

8858 {
8859  if (sys_num < _solver_systems.size())
8860  return *_solver_systems[sys_num];
8861 
8862  return *_aux;
8863 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ getSystemBase() [2/2]

SystemBase & FEProblemBase::getSystemBase ( const unsigned int  sys_num)
virtualinherited

Get non-constant reference to a system in this problem.

Parameters
sys_numThe number of the system

Definition at line 8866 of file FEProblemBase.C.

8867 {
8868  if (sys_num < _solver_systems.size())
8869  return *_solver_systems[sys_num];
8870 
8871  return *_aux;
8872 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ getTimeFromStateArg()

Real FEProblemBase::getTimeFromStateArg ( const Moose::StateArg state) const
inherited

Returns the time associated with the requested state.

Definition at line 6713 of file FEProblemBase.C.

Referenced by Function::evaluate(), Function::evaluateDotHelper(), Function::evaluateGradientHelper(), Function::evaluateHelper(), and ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl().

6714 {
6716  // If we are any iteration type other than time (e.g. nonlinear), then temporally we are still
6717  // in the present time
6718  return time();
6719 
6720  switch (state.state)
6721  {
6722  case 0:
6723  return time();
6724 
6725  case 1:
6726  return timeOld();
6727 
6728  default:
6729  mooseError("Unhandled state ", state.state, " in FEProblemBase::getTimeFromStateArg");
6730  }
6731 }
virtual Real & time() const
SolutionIterationType iteration_type
The solution iteration type, e.g. time or nonlinear.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Real & timeOld() const
unsigned int state
The state.

◆ getTransfers() [1/2]

std::vector< std::shared_ptr< Transfer > > FEProblemBase::getTransfers ( ExecFlagType  type,
Transfer::DIRECTION  direction 
) const
inherited

Get Transfers by ExecFlagType and direction.

Definition at line 5369 of file FEProblemBase.C.

5370 {
5371  if (direction == MultiAppTransfer::TO_MULTIAPP)
5373  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
5375  else
5377 }
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
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...
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.

◆ getTransfers() [2/2]

std::vector< std::shared_ptr< Transfer > > FEProblemBase::getTransfers ( Transfer::DIRECTION  direction) const
inherited

Definition at line 5380 of file FEProblemBase.C.

5381 {
5382  if (direction == MultiAppTransfer::TO_MULTIAPP)
5384  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
5386  else
5388 }
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
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...
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.

◆ getUseNonlinear()

virtual bool FEProblem::getUseNonlinear ( ) const
inlinevirtual

Definition at line 27 of file FEProblem.h.

27 { return _use_nonlinear; }
bool _use_nonlinear
Definition: FEProblem.h:38

◆ getUserObject()

template<class T >
T& FEProblemBase::getUserObject ( const std::string &  name,
unsigned int  tid = 0 
) const
inlineinherited

Get the user object by its name.

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

Definition at line 1130 of file FEProblemBase.h.

Referenced by ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), ReporterTransferInterface::hideVariableHelper(), EigenExecutionerBase::init(), Eigenvalue::init(), IntegralPreservingFunctionIC::initialSetup(), and EigenExecutionerBase::inversePowerIteration().

1131  {
1132  std::vector<T *> objs;
1133  theWarehouse()
1134  .query()
1135  .condition<AttribSystem>("UserObject")
1136  .condition<AttribThread>(tid)
1137  .condition<AttribName>(name)
1138  .queryInto(objs);
1139  if (objs.empty())
1140  mooseError("Unable to find user object with name '" + name + "'");
1141  return *(objs[0]);
1142  }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getUserObjectBase()

const UserObject & FEProblemBase::getUserObjectBase ( const std::string &  name,
const THREAD_ID  tid = 0 
) const
inherited

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 4350 of file FEProblemBase.C.

Referenced by MFEMProblem::addBoundaryCondition(), MFEMProblem::addKernel(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), MultiApp::appUserObjectBase(), EigenProblem::checkProblemIntegrity(), FunctorAux::computeValue(), UserObjectInterface::getUserObjectBaseByName(), UserObjectInterface::getUserObjectFromFEProblem(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppConservativeTransfer::initialSetup(), Terminator::initialSetup(), and FunctorIC::value().

4351 {
4352  std::vector<UserObject *> objs;
4353  theWarehouse()
4354  .query()
4355  .condition<AttribSystem>("UserObject")
4356  .condition<AttribThread>(tid)
4357  .condition<AttribName>(name)
4358  .queryInto(objs);
4359  if (objs.empty())
4360  mooseError("Unable to find user object with name '" + name + "'");
4361  mooseAssert(objs.size() == 1, "Should only find one UO");
4362  return *(objs[0]);
4363 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getUserObjectJacobianVariables()

const std::vector<const MooseVariableFEBase *>& FEProblemBase::getUserObjectJacobianVariables ( const THREAD_ID  tid) const
inlineinherited

Definition at line 309 of file FEProblemBase.h.

Referenced by ComputeUserObjectsThread::onBoundary(), and ComputeUserObjectsThread::onElement().

310  {
311  return _uo_jacobian_moose_vars[tid];
312  }
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars

◆ getUserObjects()

const ExecuteMooseObjectWarehouse<UserObject>& FEProblemBase::getUserObjects ( ) const
inlineinherited

Definition at line 1117 of file FEProblemBase.h.

1118  {
1120  "This function is deprecated, use theWarehouse().query() to construct a query instead");
1121  return _all_user_objects;
1122  }
void mooseDeprecated(Args &&... args) const
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects

◆ getVariable() [1/4]

virtual const MooseVariableFieldBase& SubProblem::getVariable
inherited

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.

◆ getVariable() [2/4]

virtual MooseVariableFieldBase& SubProblem::getVariable
inlineinherited

Definition at line 279 of file SubProblem.h.

283  {
284  return const_cast<MooseVariableFieldBase &>(const_cast<const SubProblem *>(this)->getVariable(
285  tid, var_name, expected_var_type, expected_var_field_type));
286  }
This class provides an interface for common operations on field variables of both FE and FV types wit...
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...
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78

◆ getVariable() [3/4]

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
overridevirtualinherited

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 5678 of file FEProblemBase.C.

Referenced by FEProblemBase::addFVInitialCondition(), FEProblemBase::addInitialCondition(), EigenProblem::adjustEigenVector(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), MultiAppGeneralFieldNearestLocationTransfer::buildKDTrees(), MultiAppGeneralFieldShapeEvaluationTransfer::buildMeshFunctions(), CoupleableMooseVariableDependencyIntermediateInterface::coupledArrayValueByName(), CoupleableMooseVariableDependencyIntermediateInterface::coupledValueByName(), NodalNormalsCorner::execute(), NodalNormalsEvaluator::execute(), MultiAppProjectionTransfer::execute(), MultiAppUserObjectTransfer::execute(), NodalNormalsPreprocessor::execute(), MultiAppGeometricInterpolationTransfer::execute(), LazyCoupleable::init(), AdvancedOutput::initAvailableLists(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppProjectionTransfer::initialSetup(), AdvancedOutput::initShowHideLists(), SolutionUserObjectBase::pointValueWrapper(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), MultiAppProjectionTransfer::projectSolution(), MultiAppDofCopyTransfer::transfer(), and MultiAppShapeEvaluationTransfer::transferVariable().

5682 {
5683  return getVariableHelper(
5684  tid, var_name, expected_var_type, expected_var_field_type, _solver_systems, *_aux);
5685 }
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...
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ getVariable() [4/4]

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 
)
inlinevirtualinherited

Definition at line 279 of file SubProblem.h.

283  {
284  return const_cast<MooseVariableFieldBase &>(const_cast<const SubProblem *>(this)->getVariable(
285  tid, var_name, expected_var_type, expected_var_field_type));
286  }
This class provides an interface for common operations on field variables of both FE and FV types wit...
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 (Nonline...
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78

◆ getVariableHelper() [1/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 818 of file SubProblem.C.

824 {
825  // Eventual return value
826  MooseVariableFEBase * var = nullptr;
827 
828  const auto [var_in_sys, sys_num] = determineSolverSystem(var_name);
829 
830  // First check that the variable is found on the expected system.
831  if (expected_var_type == Moose::VarKindType::VAR_ANY)
832  {
833  if (var_in_sys)
834  var = &(systems[sys_num]->getVariable(tid, var_name));
835  else if (aux.hasVariable(var_name))
836  var = &(aux.getVariable(tid, var_name));
837  else
838  mooseError("Unknown variable " + var_name);
839  }
840  else if (expected_var_type == Moose::VarKindType::VAR_SOLVER && var_in_sys &&
841  systems[sys_num]->hasVariable(var_name))
842  var = &(systems[sys_num]->getVariable(tid, var_name));
843  else if (expected_var_type == Moose::VarKindType::VAR_AUXILIARY && aux.hasVariable(var_name))
844  var = &(aux.getVariable(tid, var_name));
845  else
846  {
847  std::string expected_var_type_string =
848  (expected_var_type == Moose::VarKindType::VAR_SOLVER ? "nonlinear" : "auxiliary");
849  mooseError("No ",
850  expected_var_type_string,
851  " variable named ",
852  var_name,
853  " found. "
854  "Did you specify an auxiliary variable when you meant to specify a nonlinear "
855  "variable (or vice-versa)?");
856  }
857 
858  // Now make sure the var found has the expected field type.
859  if ((expected_var_field_type == Moose::VarFieldType::VAR_FIELD_ANY) ||
860  (expected_var_field_type == var->fieldType()))
861  return *var;
862  else
863  {
864  std::string expected_var_field_type_string =
865  MooseUtils::toLower(Moose::stringify(expected_var_field_type));
866  std::string var_field_type_string = MooseUtils::toLower(Moose::stringify(var->fieldType()));
867 
868  mooseError("No ",
869  expected_var_field_type_string,
870  " variable named ",
871  var_name,
872  " found. "
873  "Did you specify a ",
874  var_field_type_string,
875  " variable when you meant to specify a ",
876  expected_var_field_type_string,
877  " variable?");
878  }
879 }
std::string toLower(const std::string &name)
Convert supplied string to lower case.
This class provides an interface for common operations on field variables of both FE and FV types wit...
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
virtual bool hasVariable(const std::string &var_name) const =0
Whether or not this problem has the variable.
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:834
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const =0
virtual Moose::VarFieldType fieldType() const =0
Field type of this variable.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89

◆ getVariableHelper() [2/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 FEProblemBase::getVariable().

◆ getVariableNames()

std::vector< VariableName > FEProblemBase::getVariableNames ( )
virtualinherited

Returns a list of all the variables in the problem (both from the NL and Aux systems.

Definition at line 8617 of file FEProblemBase.C.

Referenced by EigenProblem::adjustEigenVector(), and AdvancedOutput::initAvailableLists().

8618 {
8619  std::vector<VariableName> names;
8620 
8621  for (auto & sys : _solver_systems)
8622  {
8623  const std::vector<VariableName> & var_names = sys->getVariableNames();
8624  names.insert(names.end(), var_names.begin(), var_names.end());
8625  }
8626 
8627  const std::vector<VariableName> & aux_var_names = _aux->getVariableNames();
8628  names.insert(names.end(), aux_var_names.begin(), aux_var_names.end());
8629 
8630  return names;
8631 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ getVectorPostprocessorObjectByName()

const VectorPostprocessor & FEProblemBase::getVectorPostprocessorObjectByName ( const std::string &  object_name,
const THREAD_ID  tid = 0 
) const
inherited

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 4444 of file FEProblemBase.C.

Referenced by VectorPostprocessorInterface::isVectorPostprocessorDistributedByName(), CSV::output(), and XMLOutput::outputVectorPostprocessors().

4446 {
4447  return getUserObject<VectorPostprocessor>(object_name, tid);
4448 }

◆ getVectorPostprocessorValueByName()

const VectorPostprocessorValue & FEProblemBase::getVectorPostprocessorValueByName ( const std::string &  object_name,
const std::string &  vector_name,
std::size_t  t_index = 0 
) const
inherited

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 4425 of file FEProblemBase.C.

Referenced by HistogramVectorPostprocessor::execute().

4428 {
4430  VectorPostprocessorReporterName(object_name, vector_name), t_index);
4431 }
A ReporterName that represents a VectorPostprocessor.
Definition: ReporterName.h:143
ReporterData _reporter_data
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.
Definition: ReporterData.h:388
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:203

◆ getVectorTag()

const VectorTag & SubProblem::getVectorTag ( const TagID  tag_id) const
virtualinherited

Get a VectorTag from a TagID.

Reimplemented in DisplacedProblem.

Definition at line 161 of file SubProblem.C.

Referenced by FEProblemBase::addCachedResidualDirectly(), Assembly::cacheResidual(), Assembly::cacheResidualNodes(), DisplacedProblem::getVectorTag(), SubProblem::getVectorTags(), TaggingInterface::prepareVectorTagInternal(), TaggingInterface::prepareVectorTagLower(), TaggingInterface::prepareVectorTagNeighbor(), FEProblemBase::setResidual(), and FEProblemBase::setResidualNeighbor().

162 {
163  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
164 
165  if (!vectorTagExists(tag_id))
166  mooseError("Vector tag with ID ", tag_id, " does not exist");
167 
168  return _vector_tags[tag_id];
169 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1167
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getVectorTagID()

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

Get a TagID from a TagName.

Reimplemented in DisplacedProblem.

Definition at line 203 of file SubProblem.C.

Referenced by Coupleable::coupledVectorTagArrayGradient(), Coupleable::coupledVectorTagArrayGradients(), Coupleable::coupledVectorTagArrayValues(), Coupleable::coupledVectorTagDofValues(), Coupleable::coupledVectorTagGradient(), Coupleable::coupledVectorTagGradients(), Coupleable::coupledVectorTagValues(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), DisplacedProblem::getVectorTagID(), MooseVariableDataBase< OutputType >::MooseVariableDataBase(), ReferenceResidualConvergence::ReferenceResidualConvergence(), SolverSystem::setSolution(), TaggingInterface::TaggingInterface(), MultiAppDofCopyTransfer::transfer(), TaggingInterface::useVectorTag(), Coupleable::vectorTagDofValueHelper(), and Coupleable::vectorTagValueHelper().

204 {
205  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
206 
207  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
208  const auto search = _vector_tags_name_map.find(tag_name_upper);
209  if (search != _vector_tags_name_map.end())
210  return search->second;
211 
212  std::string message =
213  tag_name_upper == "TIME"
214  ? ".\n\nThis may occur if "
215  "you have a TimeKernel in your problem but did not specify a transient executioner."
216  : "";
217  mooseError("Vector tag '", tag_name_upper, "' does not exist", message);
218 }
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1177
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getVectorTags() [1/2]

std::vector< VectorTag > SubProblem::getVectorTags ( const std::set< TagID > &  tag_ids) const
inherited

Definition at line 172 of file SubProblem.C.

Referenced by FEProblemBase::computeLinearSystemSys(), EigenProblem::computeResidualAB(), FEProblemBase::computeResidualAndJacobian(), NonlinearSystemBase::computeResidualInternal(), EigenProblem::computeResidualTag(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), DisplacedProblem::getVectorTags(), SubProblem::numVectorTags(), ComputeMortarFunctor::operator()(), and FEProblemBase::setCurrentResidualVectorTags().

173 {
174  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
175 
176  std::vector<VectorTag> tags;
177  tags.reserve(tag_ids.size());
178  for (const auto & tag_id : tag_ids)
179  tags.push_back(getVectorTag(tag_id));
180  return tags;
181 }
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:161

◆ getVectorTags() [2/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 184 of file SubProblem.C.

185 {
186  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
187 
189  return _vector_tags;
190  else
191  return _typed_vector_tags[type];
192 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1167
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::vector< std::vector< VectorTag > > _typed_vector_tags
The vector tags associated with each VectorTagType This is kept separate from _vector_tags for quick ...
Definition: SubProblem.h:1174

◆ getVectorVariable()

VectorMooseVariable & FEProblemBase::getVectorVariable ( const THREAD_ID  tid,
const std::string &  var_name 
)
overridevirtualinherited

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

Implements SubProblem.

Definition at line 5712 of file FEProblemBase.C.

5713 {
5714  for (auto & sys : _solver_systems)
5715  if (sys->hasVariable(var_name))
5716  return sys->getFieldVariable<RealVectorValue>(tid, var_name);
5717  if (_aux->hasVariable(var_name))
5718  return _aux->getFieldVariable<RealVectorValue>(tid, var_name);
5719 
5720  mooseError("Unknown variable " + var_name);
5721 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getXFEM()

std::shared_ptr<XFEMInterface> FEProblemBase::getXFEM ( )
inlineinherited

Get a pointer to the XFEM controller object.

Definition at line 1763 of file FEProblemBase.h.

1763 { 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 672 of file SubProblem.h.

Referenced by SystemBase::augmentSendList(), NearestNodeLocator::findNodes(), DisplacedProblem::ghostedElems(), and NearestNodeLocator::updatePatch().

672 { return _ghosted_elems; }
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1093

◆ ghostGhostedBoundaries()

void FEProblemBase::ghostGhostedBoundaries ( )
overridevirtualinherited

Causes the boundaries added using addGhostedBoundary to actually be ghosted.

Implements SubProblem.

Definition at line 2088 of file FEProblemBase.C.

Referenced by DisplacedProblem::ghostGhostedBoundaries(), FEProblemBase::init(), and FEProblemBase::meshChanged().

2089 {
2090  TIME_SECTION("ghostGhostedBoundaries", 3, "Ghosting Ghosted Boundaries");
2091 
2093 
2094  if (_displaced_problem)
2096 }
MooseMesh & _mesh
std::shared_ptr< DisplacedProblem > _displaced_problem
void ghostGhostedBoundaries()
Actually do the ghosting of boundaries that need to be ghosted to this processor. ...
Definition: MooseMesh.C:3309
MooseMesh * _displaced_mesh

◆ 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 460 of file SubProblem.C.

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

461 {
463 }
std::vector< unsigned int > _has_active_elemental_moose_variables
Whether or not there is currently a list of active elemental moose variables.
Definition: SubProblem.h:1079

◆ hasActiveMaterialProperties()

bool FEProblemBase::hasActiveMaterialProperties ( const THREAD_ID  tid) const
inherited

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 5880 of file FEProblemBase.C.

Referenced by ComputeMarkerThread::onElement(), FEProblemBase::reinitMaterials(), FEProblemBase::reinitMaterialsBoundary(), FEProblemBase::reinitMaterialsFace(), FEProblemBase::reinitMaterialsInterface(), and FEProblemBase::reinitMaterialsNeighbor().

5881 {
5882  return _has_active_material_properties[tid];
5883 }
std::vector< unsigned char > _has_active_material_properties
Whether there are active material properties on each thread.

◆ hasAuxiliaryVariable()

bool SubProblem::hasAuxiliaryVariable ( const std::string &  var_name) const
virtualinherited

Whether or not this problem has this auxiliary variable.

Definition at line 811 of file SubProblem.C.

Referenced by SubProblem::getFunctor(), and NearestNodeValueAux::NearestNodeValueAux().

812 {
813  return systemBaseAuxiliary().hasVariable(var_name);
814 }
virtual const SystemBase & systemBaseAuxiliary() const =0
Return the auxiliary system object as a base class reference.
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:834

◆ 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 511 of file SubProblem.C.

512 {
513  auto it = _map_block_material_props.find(bid);
514  if (it == _map_block_material_props.end())
515  return false;
516 
517  if (it->second.count(prop_name) > 0)
518  return true;
519  else
520  return false;
521 }
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1052

◆ 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 570 of file SubProblem.C.

571 {
572  auto it = _map_boundary_material_props.find(bid);
573  if (it == _map_boundary_material_props.end())
574  return false;
575 
576  if (it->second.count(prop_name) > 0)
577  return true;
578  else
579  return false;
580 }
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1055

◆ hasConvergence()

bool FEProblemBase::hasConvergence ( const std::string &  name,
const THREAD_ID  tid = 0 
) const
virtualinherited

Returns true if the problem has a Convergence object of the given name.

Definition at line 2609 of file FEProblemBase.C.

Referenced by ParsedConvergence::initializeSymbols().

2610 {
2611  return _convergences.hasActiveObject(name, tid);
2612 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MooseObjectWarehouse< Convergence > _convergences
convergence warehouse
bool hasActiveObject(const std::string &name, THREAD_ID tid=0) const
Convenience functions for checking/getting specific objects.

◆ hasDampers()

bool FEProblemBase::hasDampers ( )
inlineinherited

Whether or not this system has dampers.

Definition at line 1267 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::preInit(), and NonlinearSystem::solve().

1267 { return _has_dampers; }
bool _has_dampers
Whether or not this system has any Dampers associated with it.

◆ hasException()

virtual bool FEProblemBase::hasException ( )
inlinevirtualinherited

Whether or not an exception has occurred.

Definition at line 475 of file FEProblemBase.h.

Referenced by NonlinearSystem::converged(), ThreadedElementLoop< ConstElemPointerRange >::keepGoing(), and ThreadedNodeLoop< ConstBndNodeRange, ConstBndNodeRange::const_iterator >::keepGoing().

475 { return _has_exception; }
bool _has_exception
Whether or not an exception has occurred.

◆ hasFunction()

bool FEProblemBase::hasFunction ( const std::string &  name,
const THREAD_ID  tid = 0 
)
virtualinherited

Definition at line 2558 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), DiffusionFV::addFVBCs(), DiffusionFV::addFVKernels(), FunctorIC::FunctorIC(), FEProblemBase::getFunction(), FunctionInterface::hasFunctionByName(), MooseParsedFunctionWrapper::initialize(), ChainControlParsedFunctionWrapper::initializeFunctionInputs(), ParsedConvergence::initializeSymbols(), and MooseParsedFunction::initialSetup().

2559 {
2560  return _functions.hasActiveObject(name, tid);
2561 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
bool hasActiveObject(const std::string &name, THREAD_ID tid=0) const
Convenience functions for checking/getting specific objects.
MooseObjectWarehouse< Function > _functions
functions

◆ 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 1270 of file SubProblem.C.

Referenced by FunctorInterface::isFunctor().

1271 {
1272  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1273  auto & functors = _functors[tid];
1274  return (functors.find("wraps_" + name) != functors.end());
1275 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
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.
Definition: SubProblem.h:1144

◆ 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 1320 of file SubProblem.h.

1321 {
1322  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1323  auto & functors = _functors[tid];
1324 
1325  const auto & it = functors.find("wraps_" + name);
1326  constexpr bool requested_functor_is_ad =
1327  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1328 
1329  if (it == functors.end())
1330  return false;
1331  else
1332  return dynamic_cast<Moose::Functor<T> *>(
1333  requested_functor_is_ad ? std::get<2>(it->second).get() : std::get<1>(it->second).get());
1334 }
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1155
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
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.
Definition: SubProblem.h:1144

◆ hasInitialAdaptivity() [1/2]

bool FEProblemBase::hasInitialAdaptivity ( ) const
inlineinherited

Return a Boolean indicating whether initial AMR is turned on.

Definition at line 1751 of file FEProblemBase.h.

1751 { return _adaptivity.getInitialSteps() > 0; }
Adaptivity _adaptivity
unsigned int getInitialSteps() const
Pull out the number of initial steps previously set by calling init()
Definition: Adaptivity.h:98

◆ hasInitialAdaptivity() [2/2]

bool FEProblemBase::hasInitialAdaptivity ( ) const
inlineinherited

Return a Boolean indicating whether initial AMR is turned on.

Definition at line 1756 of file FEProblemBase.h.

1756 { return false; }

◆ hasJacobian()

bool FEProblemBase::hasJacobian ( ) const
inherited

Returns _has_jacobian.

Definition at line 8772 of file FEProblemBase.C.

8773 {
8774  return _has_jacobian;
8775 }
bool _has_jacobian
Indicates if the Jacobian was computed.

◆ hasLinearConvergenceObjects()

bool FEProblemBase::hasLinearConvergenceObjects ( ) const
inherited

Whether we have linear convergence objects.

Definition at line 9099 of file FEProblemBase.C.

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

9100 {
9101  // If false,this means we have not set one, not that we are querying this too early
9102  // TODO: once there is a default linear CV object, error on the 'not set' case
9103  return _linear_convergence_names.has_value();
9104 }
std::optional< std::vector< ConvergenceName > > _linear_convergence_names
Linear system(s) convergence name(s) (if any)

◆ hasLinearVariable()

bool SubProblem::hasLinearVariable ( const std::string &  var_name) const
virtualinherited

Whether or not this problem has this linear variable.

Definition at line 802 of file SubProblem.C.

Referenced by SubProblem::getFunctor().

803 {
804  for (const auto i : make_range(numLinearSystems()))
805  if (systemBaseLinear(i).hasVariable(var_name))
806  return true;
807  return false;
808 }
virtual bool hasVariable(const std::string &var_name) const =0
Whether or not this problem has the variable.
IntRange< T > make_range(T beg, T end)
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.
virtual std::size_t numLinearSystems() const =0

◆ hasMortarCoupling()

virtual bool FEProblemBase::hasMortarCoupling ( ) const
inlinevirtualinherited

Whether the simulation has mortar coupling.

Definition at line 2213 of file FEProblemBase.h.

2213 { return _has_mortar; }
bool _has_mortar
Whether the simulation requires mortar coupling.

◆ hasMultiApp()

bool FEProblemBase::hasMultiApp ( const std::string &  name) const
inherited

Definition at line 5290 of file FEProblemBase.C.

5291 {
5292  return _multi_apps.hasActiveObject(multi_app_name);
5293 }
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
bool hasActiveObject(const std::string &name, THREAD_ID tid=0) const
Convenience functions for checking/getting specific objects.

◆ hasMultiApps() [1/2]

bool FEProblemBase::hasMultiApps ( ) const
inlineinherited

Returns whether or not the current simulation has any multiapps.

Definition at line 1253 of file FEProblemBase.h.

Referenced by DefaultMultiAppFixedPointConvergence::checkConvergence(), FEProblemBase::checkProblemIntegrity(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), FixedPointIterationAdaptiveDT::init(), and DefaultMultiAppFixedPointConvergence::preExecute().

1253 { return _multi_apps.hasActiveObjects(); }
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
bool hasActiveObjects(THREAD_ID tid=0) const

◆ hasMultiApps() [2/2]

bool FEProblemBase::hasMultiApps ( ExecFlagType  type) const
inherited

Definition at line 5284 of file FEProblemBase.C.

5285 {
5286  return _multi_apps[type].hasActiveObjects();
5287 }
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
bool hasActiveObjects(THREAD_ID tid=0) const

◆ hasNeighborCoupling()

virtual bool FEProblemBase::hasNeighborCoupling ( ) const
inlinevirtualinherited

Whether the simulation has neighbor coupling.

Definition at line 2208 of file FEProblemBase.h.

bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.

◆ hasNonlocalCoupling()

virtual bool FEProblemBase::hasNonlocalCoupling ( ) const
inlineoverridevirtualinherited

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 2470 of file FEProblemBase.h.

Referenced by DisplacedProblem::hasNonlocalCoupling().

2470 { return _has_nonlocal_coupling; }
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.

◆ hasPostprocessor()

bool FEProblemBase::hasPostprocessor ( const std::string &  name) const
inherited

Deprecated.

Use hasPostprocessorValueByName

Definition at line 4417 of file FEProblemBase.C.

Referenced by GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl().

4418 {
4419  mooseDeprecated("FEProblemBase::hasPostprocssor is being removed; use "
4420  "hasPostprocessorValueByName instead.");
4422 }
void mooseDeprecated(Args &&... args) const
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
bool hasPostprocessorValueByName(const PostprocessorName &name) const
Whether or not a Postprocessor value exists by a given name.

◆ hasPostprocessorValueByName()

bool FEProblemBase::hasPostprocessorValueByName ( const PostprocessorName &  name) const
inherited

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 4394 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), FunctorAux::computeValue(), FunctorExtremaPositions::FunctorExtremaPositions(), FEProblemBase::hasPostprocessor(), MooseParsedFunction::initialSetup(), and FunctorIC::value().

4395 {
4397 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
ReporterData _reporter_data
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:202
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:134
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.
Definition: ReporterData.h:445

◆ hasScalarVariable()

bool FEProblemBase::hasScalarVariable ( const std::string &  var_name) const
overridevirtualinherited

Returns a Boolean indicating whether any system contains a variable with the name provided.

Implements SubProblem.

Definition at line 5736 of file FEProblemBase.C.

Referenced by FEProblemBase::addInitialCondition(), FEProblemBase::addObjectParamsHelper(), EigenProblem::adjustEigenVector(), FEProblemBase::checkDuplicatePostprocessorVariableNames(), AdvancedOutput::initAvailableLists(), MooseParsedFunctionWrapper::initialize(), ChainControlParsedFunctionWrapper::initializeFunctionInputs(), AdvancedOutput::initShowHideLists(), and Split::setup().

5737 {
5738  for (auto & sys : _solver_systems)
5739  if (sys->hasScalarVariable(var_name))
5740  return true;
5741  if (_aux->hasScalarVariable(var_name))
5742  return true;
5743 
5744  return false;
5745 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ hasScalingVector()

void SubProblem::hasScalingVector ( const unsigned int  nl_sys_num)
inherited

Tells this problem that the assembly associated with the given nonlinear system number involves a scaling vector.

Definition at line 1170 of file SubProblem.C.

Referenced by SystemBase::addScalingVector().

1171 {
1172  for (const THREAD_ID tid : make_range(libMesh::n_threads()))
1173  assembly(tid, nl_sys_num).hasScalingVector();
1174 }
unsigned int n_threads()
void hasScalingVector()
signals this object that a vector containing variable scaling factors should be used when doing resid...
Definition: Assembly.C:4579
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
IntRange< T > make_range(T beg, T end)
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ hasSetMultiAppFixedPointConvergenceName()

bool FEProblemBase::hasSetMultiAppFixedPointConvergenceName ( ) const
inlineinherited

Returns true if the problem has set the fixed point convergence name.

Definition at line 667 of file FEProblemBase.h.

668  {
669  return _multiapp_fixed_point_convergence_name.has_value();
670  }
std::optional< ConvergenceName > _multiapp_fixed_point_convergence_name
MultiApp fixed point convergence name.

◆ hasSetSteadyStateConvergenceName()

bool FEProblemBase::hasSetSteadyStateConvergenceName ( ) const
inlineinherited

Returns true if the problem has set the steady-state detection convergence name.

Definition at line 672 of file FEProblemBase.h.

673  {
674  return _steady_state_convergence_name.has_value();
675  }
std::optional< ConvergenceName > _steady_state_convergence_name
Steady-state detection convergence name.

◆ hasSolverVariable()

bool FEProblemBase::hasSolverVariable ( const std::string &  var_name) const
inherited

Definition at line 5668 of file FEProblemBase.C.

5669 {
5670  for (auto & sys : _solver_systems)
5671  if (sys->hasVariable(var_name))
5672  return true;
5673 
5674  return false;
5675 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.

◆ hasTimeIntegrator()

bool FEProblemBase::hasTimeIntegrator ( ) const
inlineinherited

Returns whether or not this Problem has a TimeIntegrator.

Definition at line 1999 of file FEProblemBase.h.

Referenced by TransientBase::setupTimeIntegrator().

1999 { return _has_time_integrator; }
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)

◆ hasUOAuxStateCheck()

bool FEProblemBase::hasUOAuxStateCheck ( ) const
inlineinherited

Whether or not MOOSE will perform a user object/auxiliary kernel state check.

Definition at line 189 of file FEProblemBase.h.

189 { return _uo_aux_state_check; }
const bool _uo_aux_state_check
Whether or not checking the state of uo/aux evaluation.

◆ hasUserObject()

bool FEProblemBase::hasUserObject ( const std::string &  name) const
inherited

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 4381 of file FEProblemBase.C.

Referenced by MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), FEProblemBase::addPostprocessor(), FEProblemBase::addReporter(), FEProblemBase::addVectorPostprocessor(), FunctorAux::computeValue(), DistributedPositions::DistributedPositions(), UserObjectInterface::hasUserObjectByName(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), ReporterTransferInterface::hideVariableHelper(), ParsedDownSelectionPositions::initialize(), and TransformedPositions::TransformedPositions().

4382 {
4383  std::vector<UserObject *> objs;
4384  theWarehouse()
4385  .query()
4386  .condition<AttribSystem>("UserObject")
4387  .condition<AttribThread>(0)
4388  .condition<AttribName>(name)
4389  .queryInto(objs);
4390  return !objs.empty();
4391 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ hasVariable()

bool FEProblemBase::hasVariable ( const std::string &  var_name) const
overridevirtualinherited

Whether or not this problem has the variable.

Implements SubProblem.

Definition at line 5656 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), FEProblemBase::addFVInitialCondition(), DiffusionFV::addFVKernels(), FEProblemBase::addInitialCondition(), FEProblemBase::addObjectParamsHelper(), MultiAppTransfer::checkVariable(), FunctorIC::FunctorIC(), LazyCoupleable::init(), AdvancedOutput::initAvailableLists(), MooseParsedFunction::initialSetup(), AdvancedOutput::initShowHideLists(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), and Split::setup().

5657 {
5658  for (auto & sys : _solver_systems)
5659  if (sys->hasVariable(var_name))
5660  return true;
5661  if (_aux->hasVariable(var_name))
5662  return true;
5663 
5664  return false;
5665 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ haveADObjects() [1/4]

bool SubProblem::haveADObjects ( ) const
inlineinherited

Method for reading wehther we have any ad objects.

Definition at line 771 of file SubProblem.h.

Referenced by FEProblemBase::computeJacobianTags(), FEProblemBase::computeResidualAndJacobian(), and FEProblemBase::init().

771 { return _have_ad_objects; }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1114

◆ haveADObjects() [2/4]

virtual void SubProblem::haveADObjects
inlineinherited

Method for setting whether we have any ad objects.

Definition at line 767 of file SubProblem.h.

767 { _have_ad_objects = have_ad_objects; }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1114

◆ haveADObjects() [3/4]

bool SubProblem::haveADObjects
inlineinherited

Method for reading wehther we have any ad objects.

Definition at line 771 of file SubProblem.h.

771 { return _have_ad_objects; }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1114

◆ haveADObjects() [4/4]

void FEProblemBase::haveADObjects ( bool  have_ad_objects)
overridevirtualinherited

Method for setting whether we have any ad objects.

Reimplemented from SubProblem.

Definition at line 8849 of file FEProblemBase.C.

8850 {
8851  _have_ad_objects = have_ad_objects;
8852  if (_displaced_problem)
8853  _displaced_problem->SubProblem::haveADObjects(have_ad_objects);
8854 }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1114
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ haveDisplaced()

bool FEProblemBase::haveDisplaced ( ) const
inlinefinaloverridevirtualinherited

Whether we have a displaced problem in our simulation.

Implements SubProblem.

Definition at line 2304 of file FEProblemBase.h.

2304 { return _displaced_problem.get(); }
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ haveFV()

virtual bool FEProblemBase::haveFV ( ) const
inlineoverridevirtualinherited

◆ havePRefinement()

bool SubProblem::havePRefinement ( ) const
inlineinherited

Query whether p-refinement has been requested at any point during the simulation.

Definition at line 1009 of file SubProblem.h.

Referenced by AdvancedOutput::initAvailableLists(), and FEProblemBase::meshChanged().

1009 { return _have_p_refinement; }
bool _have_p_refinement
Whether p-refinement has been requested at any point during the simulation.
Definition: SubProblem.h:1202

◆ haveXFEM()

bool FEProblemBase::haveXFEM ( )
inlineinherited

Find out whether the current analysis is using XFEM.

Definition at line 1766 of file FEProblemBase.h.

Referenced by FEProblemBase::initialSetup(), FixedPointSolve::solveStep(), TransientBase::takeStep(), and FEProblemBase::updateMeshXFEM().

1766 { return _xfem != nullptr; }
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.

◆ identifyVariableGroupsInNL()

bool FEProblemBase::identifyVariableGroupsInNL ( ) const
inlineinherited

Whether to identify variable groups in nonlinear systems.

This affects dof ordering

Definition at line 2475 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::NonlinearSystemBase().

const bool _identify_variable_groups_in_nl
Whether to identify variable groups in nonlinear systems. This affects dof ordering.

◆ ignoreZerosInJacobian()

bool FEProblemBase::ignoreZerosInJacobian ( ) const
inlineinherited

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 1971 of file FEProblemBase.h.

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

1971 { return _ignore_zeros_in_jacobian; }
bool _ignore_zeros_in_jacobian
Whether to ignore zeros in the Jacobian, thereby leading to a reduced sparsity pattern.

◆ immediatelyPrintInvalidSolution()

bool FEProblemBase::immediatelyPrintInvalidSolution ( ) const
inlineinherited

Whether or not the solution invalid warnings are printed out immediately.

Definition at line 1996 of file FEProblemBase.h.

Referenced by SolutionInvalidInterface::flagInvalidSolutionInternal().

const bool & _immediately_print_invalid_solution

◆ incrementMultiAppTStep()

void FEProblemBase::incrementMultiAppTStep ( ExecFlagType  type)
inherited

Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType.

Definition at line 5475 of file FEProblemBase.C.

Referenced by TransientBase::incrementStepOrReject().

5476 {
5477  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5478 
5479  if (multi_apps.size())
5480  for (const auto & multi_app : multi_apps)
5481  multi_app->incrementTStep(_time);
5482 }
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...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.

◆ init()

void FEProblem::init ( )
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 86 of file FEProblem.C.

87 {
88  auto check_threads = [this]()
89  {
90  if (libMesh::n_threads() != 1)
91  mooseError("Static condensation may not be used with multiple threads");
92  };
93 
94  for (const auto nl_sys_index : make_range(_num_nl_sys))
95  {
96  auto & libmesh_sys = _nl_sys[nl_sys_index]->sys();
97  if (libmesh_sys.has_static_condensation())
98  {
99  check_threads();
100  for (const auto tid : make_range(libMesh::n_threads()))
101  _assembly[tid][nl_sys_index]->addStaticCondensation(libmesh_sys.get_static_condensation());
102  }
103  }
104  for (const auto l_sys_index : make_range(_num_linear_sys))
105  {
106  auto & libmesh_sys = _linear_systems[l_sys_index]->linearImplicitSystem();
107  if (libmesh_sys.has_static_condensation())
108  {
109  check_threads();
110  for (const auto tid : make_range(libMesh::n_threads()))
111  _assembly[tid][_num_nl_sys + l_sys_index]->addStaticCondensation(
112  libmesh_sys.get_static_condensation());
113  }
114  }
115 
117 }
std::vector< std::shared_ptr< NonlinearSystem > > _nl_sys
Definition: FEProblem.h:39
const std::size_t _num_nl_sys
The number of nonlinear systems.
unsigned int n_threads()
virtual void init() override
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
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.

◆ initElementStatefulProps()

void FEProblemBase::initElementStatefulProps ( const libMesh::ConstElemRange elem_range,
const bool  threaded 
)
inherited

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 8218 of file FEProblemBase.C.

Referenced by ActivateElementsUserObjectBase::finalize(), ElementSubdomainModifierBase::initElementStatefulProps(), and FEProblemBase::initialSetup().

8219 {
8222  if (threaded)
8223  Threads::parallel_reduce(elem_range, cmt);
8224  else
8225  cmt(elem_range, true);
8226 }
MaterialPropertyStorage & _bnd_material_props
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
MaterialPropertyStorage & _neighbor_material_props
MaterialPropertyStorage & _material_props

◆ initialAdaptMesh()

void FEProblemBase::initialAdaptMesh ( )
virtualinherited

Definition at line 7896 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

7897 {
7898  unsigned int n = adaptivity().getInitialSteps();
7899  _cycles_completed = 0;
7900  if (n)
7901  {
7902  if (!_mesh.interiorLowerDBlocks().empty() || !_mesh.boundaryLowerDBlocks().empty())
7903  mooseError("HFEM does not support mesh adaptivity currently.");
7904 
7905  TIME_SECTION("initialAdaptMesh", 2, "Performing Initial Adaptivity");
7906 
7907  for (unsigned int i = 0; i < n; i++)
7908  {
7910  computeMarkers();
7911 
7913  {
7914  meshChanged(
7915  /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
7916 
7917  // reproject the initial condition
7918  projectSolution();
7919 
7921  }
7922  else
7923  {
7924  _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
7925  return;
7926  }
7927  }
7928  }
7929 }
bool initialAdaptMesh()
Used during initial adaptivity.
Definition: Adaptivity.C:268
virtual void meshChanged()
Deprecated.
const std::set< SubdomainID > & interiorLowerDBlocks() const
Definition: MooseMesh.h:1403
unsigned int _cycles_completed
virtual void computeMarkers()
void projectSolution()
virtual void computeIndicators()
MooseMesh & _mesh
Adaptivity _adaptivity
const std::set< SubdomainID > & boundaryLowerDBlocks() const
Definition: MooseMesh.h:1407
unsigned int getInitialSteps() const
Pull out the number of initial steps previously set by calling init()
Definition: Adaptivity.h:98
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Adaptivity & adaptivity()

◆ initialSetup()

void FEProblemBase::initialSetup ( )
overridevirtualinherited

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.

Definition at line 856 of file FEProblemBase.C.

Referenced by Steady::init(), EigenExecutionerBase::init(), TransientBase::init(), Eigenvalue::init(), and MFEMProblem::initialSetup().

857 {
858  TIME_SECTION("initialSetup", 2, "Performing Initial Setup");
859 
861 
863  mooseError("Checkpoint recovery and restart and exodus restart are all mutually exclusive.");
864 
866  mooseWarning("MOOSE may fail to catch an exception when the \"skip_exception_check\" parameter "
867  "is used. If you receive a terse MPI error during execution, remove this "
868  "parameter and rerun your simulation");
869 
870  // set state flag indicating that we are in or beyond initialSetup.
871  // This can be used to throw errors in methods that _must_ be called at construction time.
872  _started_initial_setup = true;
874 
875  // Setup the solution states (current, old, etc) in each system based on
876  // its default and the states requested of each of its variables
877  for (const auto i : index_range(_solver_systems))
878  {
879  _solver_systems[i]->initSolutionState();
880  if (getDisplacedProblem())
881  getDisplacedProblem()->solverSys(i).initSolutionState();
882  }
883  _aux->initSolutionState();
884  if (getDisplacedProblem())
885  getDisplacedProblem()->auxSys().initSolutionState();
886 
887  // always execute to get the max number of DoF per element and node needed to initialize phi_zero
888  // variables
889  dof_id_type global_max_var_n_dofs_per_elem = 0;
890  for (const auto i : index_range(_solver_systems))
891  {
892  auto & sys = *_solver_systems[i];
893  dof_id_type max_var_n_dofs_per_elem;
894  dof_id_type max_var_n_dofs_per_node;
895  {
896  TIME_SECTION("computingMaxDofs", 3, "Computing Max Dofs Per Element");
897 
898  MaxVarNDofsPerElem mvndpe(*this, sys);
900  max_var_n_dofs_per_elem = mvndpe.max();
901  _communicator.max(max_var_n_dofs_per_elem);
902 
903  MaxVarNDofsPerNode mvndpn(*this, sys);
905  max_var_n_dofs_per_node = mvndpn.max();
906  _communicator.max(max_var_n_dofs_per_node);
907  global_max_var_n_dofs_per_elem =
908  std::max(global_max_var_n_dofs_per_elem, max_var_n_dofs_per_elem);
909  }
910 
911  {
912  TIME_SECTION("assignMaxDofs", 5, "Assigning Maximum Dofs Per Elem");
913 
914  sys.assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
916  if (displaced_problem)
917  displaced_problem->solverSys(i).assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
918 
919  sys.assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
920  if (displaced_problem)
921  displaced_problem->solverSys(i).assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
922  }
923  }
924 
925  {
926  TIME_SECTION("resizingVarValues", 5, "Resizing Variable Values");
927 
928  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
929  {
930  _phi_zero[tid].resize(global_max_var_n_dofs_per_elem, std::vector<Real>(getMaxQps(), 0.));
931  _grad_phi_zero[tid].resize(global_max_var_n_dofs_per_elem,
932  std::vector<RealGradient>(getMaxQps(), RealGradient(0.)));
933  _second_phi_zero[tid].resize(global_max_var_n_dofs_per_elem,
934  std::vector<RealTensor>(getMaxQps(), RealTensor(0.)));
935  }
936  }
937 
938  // Set up stateful material property redistribution, if we suspect
939  // it may be necessary later.
941 
943  {
944  // Only load all of the vectors if we're recovering
946 
947  // This forces stateful material property loading to be an exact one-to-one match
948  if (_app.isRecovering())
950  props->setRecovering();
951 
952  TIME_SECTION("restore", 3, "Restoring from backup");
953 
954  // We could have a cached backup when this app is a sub-app and has been given a Backup
955  if (!_app.hasInitialBackup())
957  else
959 
965  if (_app.isRestarting())
966  {
967  if (_app.hasStartTime())
969  else
970  _time_old = _time;
971  }
972  }
973  else
974  {
976 
977  if (reader)
978  {
979  TIME_SECTION("copyingFromExodus", 3, "Copying Variables From Exodus");
980 
981  for (auto & sys : _solver_systems)
982  sys->copyVars(*reader);
983  _aux->copyVars(*reader);
984  }
985  else
986  {
987  if (_solver_systems[0]->hasVarCopy() || _aux->hasVarCopy())
988  mooseError("Need Exodus reader to restart variables but the reader is not available\n"
989  "Use either FileMesh with an Exodus mesh file or FileMeshGenerator with an "
990  "Exodus mesh file and with use_for_exodus_restart equal to true");
991  }
992  }
993 
994  // Perform output related setups
996 
997  // Flush all output to _console that occur during construction and initialization of objects
999 
1000  // Build Refinement and Coarsening maps for stateful material projections if necessary
1001  if ((_adaptivity.isOn() || _num_grid_steps) &&
1004  {
1006  mooseError("Stateful neighbor material properties do not work with mesh adaptivity");
1007 
1009  }
1010 
1011  if (!_app.isRecovering())
1012  {
1019  {
1020  if (!_app.isUltimateMaster())
1021  mooseError(
1022  "Doing extra refinements when restarting is NOT supported for sub-apps of a MultiApp");
1023 
1025  }
1026  }
1027 
1028  unsigned int n_threads = libMesh::n_threads();
1029 
1030  // Convergence initial setup
1031  {
1032  TIME_SECTION("convergenceInitialSetup", 5, "Initializing Convergence objects");
1033 
1034  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1036  }
1037 
1038  // UserObject initialSetup
1039  std::set<std::string> depend_objects_ic = _ics.getDependObjects();
1040  std::set<std::string> depend_objects_aux = _aux->getDependObjects();
1041 
1042  // This replaces all prior updateDependObjects calls on the old user object warehouses.
1043  TheWarehouse::Query uo_query = theWarehouse().query().condition<AttribSystem>("UserObject");
1044  std::vector<UserObject *> userobjs;
1045  uo_query.queryInto(userobjs);
1047  theWarehouse(), getAuxiliarySystem(), _app.getExecuteOnEnum(), userobjs, depend_objects_ic);
1048 
1049  std::map<int, std::vector<UserObject *>> group_userobjs;
1050  for (auto obj : userobjs)
1051  group_userobjs[obj->getParam<int>("execution_order_group")].push_back(obj);
1052 
1053  for (auto & [group, objs] : group_userobjs)
1054  for (auto obj : objs)
1055  obj->initialSetup();
1056 
1057  // check if jacobian calculation is done in userobject
1058  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
1060 
1061  // Check whether nonlocal couling is required or not
1065 
1066  {
1067  TIME_SECTION("initializingFunctions", 5, "Initializing Functions");
1068 
1069  // Call the initialSetup methods for functions
1070  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1071  {
1072  reinitScalars(tid); // initialize scalars so they are properly sized for use as input into
1073  // ParsedFunctions
1074  _functions.initialSetup(tid);
1075  }
1076  }
1077 
1078  {
1079  TIME_SECTION("initializingRandomObjects", 5, "Initializing Random Objects");
1080 
1081  // Random interface objects
1082  for (const auto & it : _random_data_objects)
1083  it.second->updateSeeds(EXEC_INITIAL);
1084  }
1085 
1086  if (!_app.isRecovering())
1087  {
1089 
1090  {
1091  TIME_SECTION("ICinitialSetup", 5, "Setting Up Initial Conditions");
1092 
1093  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1094  _ics.initialSetup(tid);
1095 
1097  }
1098 
1099  projectSolution();
1100  }
1101 
1102  // Materials
1104  {
1105  TIME_SECTION("materialInitialSetup", 3, "Setting Up Materials");
1106 
1107  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1108  {
1109  // Sort the Material objects, these will be actually computed by MOOSE in reinit methods.
1110  _materials.sort(tid);
1112 
1113  // Call initialSetup on all material objects
1115 
1116  // Discrete materials may insert additional dependencies on materials during the initial
1117  // setup. Therefore we resolve the dependencies once more, now with the additional
1118  // dependencies due to discrete materials.
1120  {
1121  _materials.sort(tid);
1123  }
1124  }
1125 
1126  {
1127  TIME_SECTION("computingInitialStatefulProps", 3, "Computing Initial Material Values");
1128 
1130 
1134  }
1135  }
1136 
1137  // setRestartInPlace() is set because the property maps have now been setup and we can
1138  // dataLoad() them directly in place
1139  // setRecovering() is set because from now on we require a one-to-one mapping of
1140  // stateful properties because we shouldn't be declaring any more
1142  {
1143  props->setRestartInPlace();
1144  props->setRecovering();
1145  }
1146 
1147  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1148  {
1151  _markers.sort(tid);
1152  _markers.initialSetup(tid);
1153  }
1154 
1155 #ifdef LIBMESH_ENABLE_AMR
1156 
1157  if (!_app.isRecovering())
1158  {
1159  unsigned int n = adaptivity().getInitialSteps();
1160  if (n && !_app.isUltimateMaster() && _app.isRestarting())
1161  mooseError("Cannot perform initial adaptivity during restart on sub-apps of a MultiApp!");
1162 
1163  initialAdaptMesh();
1164  }
1165 
1166 #endif // LIBMESH_ENABLE_AMR
1167 
1168  if (!_app.isRecovering() && !_app.isRestarting())
1169  {
1170  // During initial setup the solution is copied to the older solution states (old, older, etc)
1172 
1173  // Check if there are old state initial conditions
1174  auto ics = _ics.getActiveObjects();
1175  auto fv_ics = _fv_ics.getActiveObjects();
1176  auto scalar_ics = _scalar_ics.getActiveObjects();
1177  unsigned short ic_state_max = 0;
1178 
1179  auto findMax = [&ic_state_max](const auto & obj_list)
1180  {
1181  for (auto ic : obj_list.getActiveObjects())
1182  ic_state_max = std::max(ic_state_max, ic->getState());
1183  };
1184  findMax(_ics);
1185  findMax(_fv_ics);
1186  findMax(_scalar_ics);
1187 
1188  // if there are old state ICs, compute them and write to old states accordingly
1189  if (ic_state_max > 0)
1190  {
1191  // state 0 copy (we'll overwrite current state when evaluating ICs and need to restore it once
1192  // we're done with the old/older state ICs)
1193  std::vector<std::unique_ptr<NumericVector<Real>>> state0_sys_buffers(_solver_systems.size());
1194  std::unique_ptr<NumericVector<Real>> state0_aux_buffer;
1195 
1196  // save state 0
1197  for (const auto i : index_range(_solver_systems))
1198  state0_sys_buffers[i] = _solver_systems[i]->solutionState(0).clone();
1199 
1200  state0_aux_buffer = _aux->solutionState(0).clone();
1201 
1202  // compute old state ICs
1203  for (_current_ic_state = 1; _current_ic_state <= ic_state_max; _current_ic_state++)
1204  {
1205  projectSolution();
1206 
1207  for (auto & sys : _solver_systems)
1208  sys->solutionState(_current_ic_state) = sys->solutionState(0);
1209 
1210  _aux->solutionState(_current_ic_state) = _aux->solutionState(0);
1211  }
1212  _current_ic_state = 0;
1213 
1214  // recover state 0
1215  for (const auto i : index_range(_solver_systems))
1216  {
1217  _solver_systems[i]->solutionState(0) = *state0_sys_buffers[i];
1218  _solver_systems[i]->solutionState(0).close();
1219  _solver_systems[i]->update();
1220  }
1221  _aux->solutionState(0) = *state0_aux_buffer;
1222  _aux->solutionState(0).close();
1223  _aux->update();
1224  }
1225  }
1226 
1227  if (!_app.isRecovering())
1228  {
1229  if (haveXFEM())
1230  updateMeshXFEM();
1231  }
1232 
1233  // Call initialSetup on the solver systems
1234  for (auto & sys : _solver_systems)
1235  sys->initialSetup();
1236 
1237  // Auxilary variable initialSetup calls
1238  _aux->initialSetup();
1239 
1240  if (_displaced_problem)
1241  // initialSetup for displaced systems
1242  _displaced_problem->initialSetup();
1243 
1244  for (auto & sys : _solver_systems)
1245  sys->setSolution(*(sys->system().current_local_solution.get()));
1246 
1247  // Update the nearest node searches (has to be called after the problem is all set up)
1248  // We do this here because this sets up the Element's DoFs to ghost
1250 
1252  if (_displaced_mesh)
1254 
1255  // We need to move the mesh in order to build a map between mortar secondary and primary
1256  // interfaces. This map will then be used by the AgumentSparsityOnInterface ghosting functor to
1257  // know which dofs we need ghosted when we call EquationSystems::reinit
1259  {
1260  _displaced_problem->updateMesh();
1261  // if displacements were applied to the mesh, the mortar mesh should be updated too
1262  updateMortarMesh();
1263  }
1264 
1265  // Possibly reinit one more time to get ghosting correct
1267 
1268  if (_displaced_mesh)
1269  _displaced_problem->updateMesh();
1270 
1271  updateGeomSearch(); // Call all of the rest of the geometric searches
1272 
1273  for (auto & sys : _solver_systems)
1274  {
1275  const auto & tis = sys->getTimeIntegrators();
1276 
1277  {
1278  TIME_SECTION("timeIntegratorInitialSetup", 5, "Initializing Time Integrator");
1279  for (auto & ti : tis)
1280  ti->initialSetup();
1281  }
1282  }
1283 
1284  // HUGE NOTE: MultiApp initialSetup() MUST... I repeat MUST be _after_ main-app restartable data
1285  // has been restored
1286 
1287  // Call initialSetup on the MultiApps
1288  if (_multi_apps.hasObjects())
1289  {
1290  TIME_SECTION("initialSetupMultiApps", 2, "Initializing MultiApps", false);
1292  }
1293 
1294  // Call initialSetup on the transfers
1295  {
1296  TIME_SECTION("initialSetupTransfers", 2, "Initializing Transfers");
1297 
1299 
1300  // Call initialSetup on the MultiAppTransfers to be executed on TO_MULTIAPP
1301  const auto & to_multi_app_objects = _to_multi_app_transfers.getActiveObjects();
1302  for (const auto & transfer : to_multi_app_objects)
1303  {
1304  transfer->setCurrentDirection(Transfer::DIRECTION::TO_MULTIAPP);
1305  transfer->initialSetup();
1306  }
1307 
1308  // Call initialSetup on the MultiAppTransfers to be executed on FROM_MULTIAPP
1309  const auto & from_multi_app_objects = _from_multi_app_transfers.getActiveObjects();
1310  for (const auto & transfer : from_multi_app_objects)
1311  {
1312  transfer->setCurrentDirection(Transfer::DIRECTION::FROM_MULTIAPP);
1313  transfer->initialSetup();
1314  }
1315 
1316  // Call initialSetup on the MultiAppTransfers to be executed on BETWEEN_MULTIAPP
1317  const auto & between_multi_app_objects = _between_multi_app_transfers.getActiveObjects();
1318  for (const auto & transfer : between_multi_app_objects)
1319  {
1320  transfer->setCurrentDirection(Transfer::DIRECTION::BETWEEN_MULTIAPP);
1321  transfer->initialSetup();
1322  }
1323  }
1324 
1326  {
1327  TIME_SECTION("BoundaryRestrictedNodeIntegrityCheck", 5);
1328 
1329  // check that variables are defined along boundaries of boundary restricted nodal objects
1330  ConstBndNodeRange & bnd_nodes = *mesh().getBoundaryNodeRange();
1331  BoundaryNodeIntegrityCheckThread bnict(*this, uo_query);
1332  Threads::parallel_reduce(bnd_nodes, bnict);
1333 
1334  // Nodal bcs aren't threaded
1335  const auto & node_to_elem_map = _mesh.nodeToActiveSemilocalElemMap();
1336  for (const auto & bnode : bnd_nodes)
1337  {
1338  const auto boundary_id = bnode->_bnd_id;
1339  const Node * const node = bnode->_node;
1340 
1341  if (node->processor_id() != this->processor_id())
1342  continue;
1343 
1344  // Only check vertices. Variables may not be defined on non-vertex nodes (think first order
1345  // Lagrange on a second order mesh) and user-code can often handle that
1346  const Elem * const an_elem =
1347  _mesh.getMesh().elem_ptr(libmesh_map_find(node_to_elem_map, node->id()).front());
1348  if (!an_elem->is_vertex(an_elem->get_node_index(node)))
1349  continue;
1350 
1351  const auto & bnd_name = _mesh.getBoundaryName(boundary_id);
1352 
1353  for (auto & nl : _nl)
1354  {
1355  const auto & nodal_bcs = nl->getNodalBCWarehouse();
1356  if (!nodal_bcs.hasBoundaryObjects(boundary_id, 0))
1357  continue;
1358 
1359  const auto & bnd_objects = nodal_bcs.getBoundaryObjects(boundary_id, 0);
1360  for (const auto & bnd_object : bnd_objects)
1361  // Skip if this object uses geometric search because coupled variables may be defined on
1362  // paired boundaries instead of the boundary this node is on
1363  if (!bnd_object->requiresGeometricSearch() &&
1364  bnd_object->checkVariableBoundaryIntegrity())
1365  {
1366  std::set<MooseVariableFieldBase *> vars_to_omit = {
1367  &static_cast<MooseVariableFieldBase &>(
1368  const_cast<MooseVariableBase &>(bnd_object->variable()))};
1369 
1371  *bnd_object, bnd_object->checkAllVariables(*node, vars_to_omit), bnd_name);
1372  }
1373  }
1374  }
1375  }
1376 
1378  {
1379  TIME_SECTION("BoundaryRestrictedElemIntegrityCheck", 5);
1380 
1381  // check that variables are defined along boundaries of boundary restricted elemental objects
1382  ConstBndElemRange & bnd_elems = *mesh().getBoundaryElementRange();
1383  BoundaryElemIntegrityCheckThread beict(*this, uo_query);
1384  Threads::parallel_reduce(bnd_elems, beict);
1385  }
1386 
1387  if (!_app.isRecovering())
1388  {
1390 
1392  if (!converged)
1393  mooseError("failed to converge initial MultiApp");
1394 
1395  // We'll backup the Multiapp here
1397 
1398  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1399  reinitScalars(tid);
1400 
1402 
1403  // The FEProblemBase::execute method doesn't call all the systems on EXEC_INITIAL, but it does
1404  // set/unset the current flag. Therefore, this resets the current flag to EXEC_INITIAL so that
1405  // subsequent calls (e.g., executeControls) have the proper flag.
1407  }
1408 
1409  // Here we will initialize the stateful properties once more since they may have been updated
1410  // during initialSetup by calls to computeProperties.
1411  //
1412  // It's really bad that we don't allow this during restart. It means that we can't add new
1413  // stateful materials
1414  // during restart. This is only happening because this _has_ to be below initial userobject
1415  // execution.
1416  // Otherwise this could be done up above... _before_ restoring restartable data... which would
1417  // allow you to have
1418  // this happen during restart. I honestly have no idea why this has to happen after initial user
1419  // object computation.
1420  // THAT is something we should fix... so I've opened this ticket: #5804
1421  if (!_app.isRecovering() && !_app.isRestarting() &&
1424  {
1425  TIME_SECTION("computeMaterials", 2, "Computing Initial Material Properties");
1426 
1428  }
1429 
1430  // Control Logic
1432 
1433  // Scalar variables need to reinited for the initial conditions to be available for output
1434  for (unsigned int tid = 0; tid < n_threads; tid++)
1435  reinitScalars(tid);
1436 
1437  if (_displaced_mesh)
1438  _displaced_problem->syncSolutions();
1439 
1440  // Writes all calls to _console from initialSetup() methods
1442 
1444  {
1446  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
1447  for (auto & assembly : _assembly[tid])
1449  }
1450 
1451  {
1452  TIME_SECTION("lineSearchInitialSetup", 5, "Initializing Line Search");
1453 
1454  if (_line_search)
1455  _line_search->initialSetup();
1456  }
1457 
1458  // Perform Reporter get/declare check
1460 
1461  // We do this late to allow objects to get late restartable data
1464 
1466 }
void sort(THREAD_ID tid=0)
Sort the objects using the DependencyResolver.
void setVariableAllDoFMap(const std::vector< const MooseVariableFEBase *> &moose_vars)
bool _skip_exception_check
If or not skip &#39;exception and stop solve&#39;.
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1235
void reinitBecauseOfGhostingOrNewGeomObjects(bool mortar_changed=false)
Call when it is possible that the needs for ghosted elements has changed.
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:837
MaterialPropertyStorage & _bnd_material_props
void setNonlocalCouplingMatrix()
Set custom coupling matrix for variables requiring nonlocal contribution.
void initialSetup()
Calls the initialSetup function for each of the output objects.
unsigned int n_threads()
QueryCache is a convenient way to construct and pass around (possible partially constructed) warehous...
Definition: TheWarehouse.h:208
std::shared_ptr< DisplacedProblem > displaced_problem
unsigned int get_node_index(const Node *node_ptr) const
bool hasObjects(THREAD_ID tid=0) const
Convenience functions for determining if objects exist.
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToActiveSemilocalElemMap()
If not already created, creates a map from every node to all active semilocal elements to which they ...
Definition: MooseMesh.C:1203
bool hasInitialBackup() const
Definition: MooseApp.h:1018
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
const ExecFlagEnum & getExecuteOnEnum() const
Return the app level ExecFlagEnum, this contains all the available flags for the app.
Definition: MooseApp.h:1011
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
unsigned short _current_ic_state
std::vector< T * > & queryInto(std::vector< T *> &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
Definition: TheWarehouse.h:311
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
const std::string & getBoundaryName(BoundaryID boundary_id)
Return the name of the boundary given the id.
Definition: MooseMesh.C:1787
std::filesystem::path restartFolderBase(const std::filesystem::path &folder_base) const
The file suffix for restartable data.
Definition: MooseApp.C:3052
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
unsigned int _num_grid_steps
Number of steps in a grid sequence.
bool haveXFEM()
Find out whether the current analysis is using XFEM.
This class provides an interface for common operations on field variables of both FE and FV types wit...
const Parallel::Communicator & _communicator
MaterialWarehouse _interface_materials
Real getStartTime() const
Definition: MooseApp.h:326
void setCurrentExecuteOnFlag(const ExecFlagType &)
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...
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:1801
libMesh::ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1272
bool isOn()
Is adaptivity on?
Definition: Adaptivity.h:179
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1093
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
void projectSolution()
auto max(const L &left, const R &right)
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
ScalarInitialConditionWarehouse _scalar_ics
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:453
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
virtual void copySolutionsBackwards()
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
std::vector< VariablePhiGradient > _grad_phi_zero
void initialSetup(THREAD_ID tid)
Initial setup.
virtual void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
ReporterData _reporter_data
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...
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
MooseObjectWarehouse< Convergence > _convergences
convergence warehouse
dof_id_type id() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3443
TheWarehouse & theWarehouse() const
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 checkNonlocalCoupling()
void groupUserObjects(TheWarehouse &w, AuxiliarySystem &aux, const ExecFlagEnum &execute_flags, const std::vector< T *> &objs, const std::set< std::string > &ic_deps)
MortarData _mortar_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
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:113
const bool _boundary_restricted_node_integrity_check
whether to perform checking of boundary restricted nodal object variable dependencies, e.g.
MooseMesh & _mesh
virtual bool updateMeshXFEM()
Update the mesh due to changing XFEM cuts.
void addAnyRedistributers()
void restoreFromInitialBackup(const bool for_restart)
Restores from a "initial" backup, that is, one set in _initial_backup.
Definition: MooseApp.C:1903
Adaptivity _adaptivity
void checkUserObjectJacobianRequirement(THREAD_ID tid)
const bool _force_restart
std::vector< VariablePhiSecond > _second_phi_zero
bool _started_initial_setup
At or beyond initialSteup stage.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
libMesh::ExodusII_IO * getExReaderForRestart() const
Get the Exodus reader to restart variables from an Exodus mesh file.
Definition: MooseApp.h:466
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:3211
AuxiliarySystem & getAuxiliarySystem()
virtual void initialSetup(THREAD_ID tid=0) const
Convenience methods for calling object setup methods.
virtual void updateGeomSearch(GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
void buildRefinementAndCoarseningMaps(Assembly *assembly)
Create the refinement and coarsening maps necessary for projection of stateful material properties wh...
Definition: MooseMesh.C:2457
MooseObjectWarehouse< Indicator > _indicators
void backupMultiApps(ExecFlagType type)
Backup the MultiApps associated with the ExecFlagType.
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
void uniformRefineWithProjection()
Performs uniform refinement on the meshes in the current object.
Definition: Adaptivity.C:301
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
virtual void initialSetup(THREAD_ID tid=0) const
Convenience methods for calling object setup methods that handle the extra neighbor and face objects...
void sort(THREAD_ID tid=0)
virtual const Elem * elem_ptr(const dof_id_type i) const=0
virtual void updateMortarMesh()
void restore(const std::filesystem::path &folder_base, const bool for_restart)
Restore an application from file.
Definition: MooseApp.C:1868
std::vector< VariablePhiValue > _phi_zero
InitialConditionWarehouse _ics
MaterialWarehouse _discrete_materials
virtual void initialSetup()
Definition: SubProblem.C:1217
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
void updateActiveSemiLocalNodeRange(std::set< dof_id_type > &ghosted_elems)
Clears the "semi-local" node list and rebuilds it.
Definition: MooseMesh.C:948
bool hasActiveObjects(THREAD_ID tid=0) const
unsigned int getInitialSteps() const
Pull out the number of initial steps previously set by calling init()
Definition: Adaptivity.h:98
void max(const T &r, T &o, Request &req) const
void setLoadAllVectors(const bool load_all_vectors)
Sets whether or not all vectors are to be loaded.
virtual bool is_vertex(const unsigned int i) const=0
void initNonlocalCoupling()
Create pair of variables requiring nonlocal jacobian contributions.
Definition: Assembly.C:2652
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
bool hasStartTime() const
Definition: MooseApp.h:321
bool hasDisplacedObjects() const
Returns whether any of the AutomaticMortarGeneration objects are running on a displaced mesh...
Definition: MortarData.h:99
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
virtual MooseMesh & mesh() override
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
void mooseConsole()
Send current output buffer to Console output objects.
std::set< std::string > getDependObjects() const
Get a list of dependent UserObjects for this exec type.
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseObjectWarehouse< Function > _functions
functions
bool _has_initialized_stateful
Whether nor not stateful materials have been initialized.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
MaterialPropertyStorage & _neighbor_material_props
std::unique_ptr< Backup > finalizeRestore()
Finalizes (closes) the restoration process done in restore().
Definition: MooseApp.C:1910
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1300
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
void check() const
Perform integrity check for get/declare calls.
Definition: ReporterData.C:162
const bool _boundary_restricted_elem_integrity_check
whether to perform checking of boundary restricted elemental object variable dependencies, e.g.
processor_id_type processor_id() const
MaterialPropertyStorage & _material_props
Adaptivity & adaptivity()
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:1795
Restartable::ManagedValue< RestartableEquationSystems > _req
The EquationSystems object, wrapped for restart.
processor_id_type processor_id() const
std::string getRestartRecoverFileBase() const
The file_base for the recovery file.
Definition: MooseApp.h:517
MooseObjectWarehouse< Marker > _markers
FVInitialConditionWarehouse _fv_ics
virtual void initialAdaptMesh()
MaterialWarehouse _all_materials
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1286
auto index_range(const T &sizable)
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407
MooseMesh * _displaced_mesh
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h:209
MaterialWarehouse _materials
uint8_t dof_id_type
std::shared_ptr< LineSearch > _line_search
unsigned int getMaxQps() const
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28

◆ initNullSpaceVectors()

void FEProblemBase::initNullSpaceVectors ( const InputParameters parameters,
std::vector< std::shared_ptr< NonlinearSystemBase >> &  nl 
)
virtualinherited

Definition at line 731 of file FEProblemBase.C.

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

733 {
734  TIME_SECTION("initNullSpaceVectors", 5, "Initializing Null Space Vectors");
735 
736  unsigned int dimNullSpace = parameters.get<unsigned int>("null_space_dimension");
737  unsigned int dimTransposeNullSpace =
738  parameters.get<unsigned int>("transpose_null_space_dimension");
739  unsigned int dimNearNullSpace = parameters.get<unsigned int>("near_null_space_dimension");
740  for (unsigned int i = 0; i < dimNullSpace; ++i)
741  {
742  std::ostringstream oss;
743  oss << "_" << i;
744  // do not project, since this will be recomputed, but make it ghosted, since the near nullspace
745  // builder might march over all nodes
746  for (auto & nl : nls)
747  nl->addVector("NullSpace" + oss.str(), false, libMesh::GHOSTED);
748  }
749  _subspace_dim["NullSpace"] = dimNullSpace;
750  for (unsigned int i = 0; i < dimTransposeNullSpace; ++i)
751  {
752  std::ostringstream oss;
753  oss << "_" << i;
754  // do not project, since this will be recomputed, but make it ghosted, since the near nullspace
755  // builder might march over all nodes
756  for (auto & nl : nls)
757  nl->addVector("TransposeNullSpace" + oss.str(), false, libMesh::GHOSTED);
758  }
759  _subspace_dim["TransposeNullSpace"] = dimTransposeNullSpace;
760  for (unsigned int i = 0; i < dimNearNullSpace; ++i)
761  {
762  std::ostringstream oss;
763  oss << "_" << i;
764  // do not project, since this will be recomputed, but make it ghosted, since the near-nullspace
765  // builder might march over all semilocal nodes
766  for (auto & nl : nls)
767  nl->addVector("NearNullSpace" + oss.str(), false, libMesh::GHOSTED);
768  }
769  _subspace_dim["NearNullSpace"] = dimNearNullSpace;
770 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
std::map< std::string, unsigned int > _subspace_dim
Dimension of the subspace spanned by the vectors with a given prefix.

◆ initPetscOutputAndSomeSolverSettings()

void FEProblemBase::initPetscOutputAndSomeSolverSettings ( )
virtualinherited

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 6692 of file FEProblemBase.C.

Referenced by FEProblemBase::possiblyRebuildGeomSearchPatches(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), and FEProblemBase::solve().

6693 {
6696 }
void petscSetDefaults(FEProblemBase &problem)
Sets the default options for PETSc.
Definition: PetscSupport.C:488
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
void solveSetup()
Calls the timestepSetup function for each of the output objects.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407

◆ initXFEM()

void FEProblemBase::initXFEM ( std::shared_ptr< XFEMInterface xfem)
inherited

Create XFEM controller object.

Definition at line 7994 of file FEProblemBase.C.

7995 {
7996  _xfem = xfem;
7997  _xfem->setMesh(&_mesh);
7998  if (_displaced_mesh)
7999  _xfem->setDisplacedMesh(_displaced_mesh);
8000 
8001  auto fill_data = [](auto & storage)
8002  {
8003  std::vector<MaterialData *> data(libMesh::n_threads());
8004  for (const auto tid : make_range(libMesh::n_threads()))
8005  data[tid] = &storage.getMaterialData(tid);
8006  return data;
8007  };
8008  _xfem->setMaterialData(fill_data(_material_props));
8009  _xfem->setBoundaryMaterialData(fill_data(_bnd_material_props));
8010 
8011  unsigned int n_threads = libMesh::n_threads();
8012  for (unsigned int i = 0; i < n_threads; ++i)
8013  for (const auto nl_sys_num : index_range(_nl))
8014  {
8015  _assembly[i][nl_sys_num]->setXFEM(_xfem);
8016  if (_displaced_problem)
8017  _displaced_problem->assembly(i, nl_sys_num).setXFEM(_xfem);
8018  }
8019 }
void fill_data(std::map< processor_id_type, std::vector< std::set< unsigned int >>> &data, int M)
MaterialPropertyStorage & _bnd_material_props
unsigned int n_threads()
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MooseMesh & _mesh
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
IntRange< T > make_range(T beg, T end)
std::shared_ptr< DisplacedProblem > _displaced_problem
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.
MaterialPropertyStorage & _material_props
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh

◆ 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 730 of file SubProblem.C.

731 {
732  return _material_property_requested.find(prop_name) != _material_property_requested.end();
733 }
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty* ...
Definition: SubProblem.h:1062

◆ isParamSetByUser()

bool MooseBaseParameterInterface::isParamSetByUser ( const std::string &  nm) const
inlineinherited

Test if the supplied parameter is set by a user, as opposed to not set or set to default.

Parameters
nmThe name of the parameter to test

Definition at line 128 of file MooseBaseParameterInterface.h.

Referenced by SetupDebugAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEBCs(), DiffusionPhysicsBase::addInitialConditions(), MFEMMesh::buildMesh(), LibtorchNeuralNetControl::conditionalParameterError(), DiffusionPhysicsBase::DiffusionPhysicsBase(), ElementSubdomainModifierBase::ElementSubdomainModifierBase(), MooseBaseParameterInterface::getRenamedParam(), DefaultConvergenceBase::getSharedExecutionerParam(), AddVariableAction::init(), PhysicsBase::initializePhysics(), ElementSubdomainModifierBase::initialSetup(), MatrixSymmetryCheck::MatrixSymmetryCheck(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), SolutionInvalidityOutput::output(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PetscExternalPartitioner::partition(), PiecewiseTabularBase::PiecewiseTabularBase(), MooseMesh::prepare(), SolutionUserObjectBase::readXda(), PhysicsBase::reportPotentiallyMissedParameters(), MFEMSolverBase::setPreconditioner(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), TimedSubdomainModifier::TimedSubdomainModifier(), and XYDelaunayGenerator::XYDelaunayGenerator().

128 { return _pars.isParamSetByUser(nm); }
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was set by the user.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ isParamValid()

bool MooseBaseParameterInterface::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 122 of file MooseBaseParameterInterface.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), GridPartitioner::_do_partition(), CopyNodalVarsAction::act(), SetupMeshAction::act(), SetupDebugAction::act(), ComposeTimeStepperAction::act(), CreateDisplacedProblemAction::act(), SetAdaptivityOptionsAction::act(), AddVariableAction::act(), CommonOutputAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEKernels(), DiffusionFV::addFVBCs(), DiffusionFV::addFVKernels(), DiffusionPhysicsBase::addInitialConditions(), CylinderComponent::addMeshGenerators(), AddPeriodicBCAction::AddPeriodicBCAction(), DiffusionPhysicsBase::addPostprocessors(), AdvectiveFluxAux::AdvectiveFluxAux(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayVarReductionAux::ArrayVarReductionAux(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), TimedSubdomainModifier::buildFromFile(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromJSON(), ParsedChainControl::buildFunction(), GeneratedMesh::buildMesh(), MooseMesh::buildTypedMesh(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), LibmeshPartitioner::clone(), SampledOutput::cloneMesh(), CombinerGenerator::CombinerGenerator(), FunctorAux::computeValue(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), FEProblemSolve::convergenceSetup(), CopyMeshPartitioner::CopyMeshPartitioner(), CSVReaderVectorPostprocessor::CSVReaderVectorPostprocessor(), CutMeshByLevelSetGeneratorBase::CutMeshByLevelSetGeneratorBase(), ConstantReporter::declareConstantReporterValues(), DGKernelBase::DGKernelBase(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), Eigenvalue::Eigenvalue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), PIDTransientControl::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), Exodus::Exodus(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FileOutput::FileOutput(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), FunctionDT::FunctionDT(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FVInterfaceKernel::FVInterfaceKernel(), FVMassMatrix::FVMassMatrix(), AddMetaDataGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), ElementGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), BlockDeletionGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), MeshExtruderGenerator::generate(), ParsedExtraElementIDGenerator::generate(), XYZDelaunayGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), SubdomainBoundingBoxGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), PropertyReadFile::getFileNames(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBaseParameterInterface::getRenamedParam(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), Terminator::handleMessage(), HFEMDirichletBC::HFEMDirichletBC(), EigenExecutionerBase::init(), IterationAdaptiveDT::init(), Eigenvalue::init(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), MultiAppCloneReporterTransfer::initialSetup(), SolutionIC::initialSetup(), MultiAppVariableValueSampleTransfer::initialSetup(), PiecewiseTabularBase::initialSetup(), SolutionScalarAux::initialSetup(), ParsedConvergence::initialSetup(), SolutionAux::initialSetup(), Console::initialSetup(), MooseParsedVectorFunction::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedFunction::initialSetup(), SampledOutput::initSample(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MassMatrix::MassMatrix(), MatCoupledForce::MatCoupledForce(), MatDiffusionBase< Real >::MatDiffusionBase(), MeshGeneratorComponent::MeshGeneratorComponent(), MooseMesh::MooseMesh(), MoosePreconditioner::MoosePreconditioner(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MooseVariableFV< Real >::MooseVariableFV(), MortarConstraintBase::MortarConstraintBase(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldNearestLocationTransfer::MultiAppGeneralFieldNearestLocationTransfer(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiSystemSolveObject::MultiSystemSolveObject(), NodeSetsGeneratorBase::NodeSetsGeneratorBase(), EigenExecutionerBase::normalizeSolution(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), ParsedCurveGenerator::ParsedCurveGenerator(), PetscOutput::PetscOutput(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularBase::PiecewiseTabularBase(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), MooseMesh::prepare(), MooseBaseParameterInterface::queryParam(), MultiApp::readCommandLineArguments(), SolutionUserObjectBase::readExodusII(), ReferenceResidualInterface::ReferenceResidualInterface(), RenameBlockGenerator::RenameBlockGenerator(), ReporterPointSource::ReporterPointSource(), PhysicsBase::reportPotentiallyMissedParameters(), ParsedSubdomainMeshGenerator::setBlockName(), MooseMesh::setCoordSystem(), FileOutput::setFileBase(), FileOutput::setFileBaseInternal(), Split::setup(), SideSetsGeneratorBase::setup(), SetupMeshAction::setupMesh(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideSetsGeneratorBase::SideSetsGeneratorBase(), SolutionUserObjectBase::SolutionUserObjectBase(), WebServerControl::startServer(), Terminator::Terminator(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), MultiAppDofCopyTransfer::transfer(), TransformGenerator::TransformGenerator(), TransientBase::TransientBase(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), WebServerControl::WebServerControl(), XYDelaunayGenerator::XYDelaunayGenerator(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

122 { return _pars.isParamValid(name); }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ isSNESMFReuseBaseSetbyUser()

bool FEProblemBase::isSNESMFReuseBaseSetbyUser ( )
inlineinherited

Return a flag to indicate if _snesmf_reuse_base is set by users.

Definition at line 2134 of file FEProblemBase.h.

bool _snesmf_reuse_base_set_by_user
If or not _snesmf_reuse_base is set by user.

◆ isSolverSystemNonlinear()

bool FEProblemBase::isSolverSystemNonlinear ( const unsigned int  sys_num)
inlineinherited

◆ 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.

Referenced by TransientBase::keepGoing().

43 { return _termination_requested; };
bool _termination_requested
True if termination of the solve has been requested.
Definition: Problem.h:58

◆ isTransient()

virtual bool FEProblemBase::isTransient ( ) const
inlineoverridevirtualinherited

◆ jacobianSetup()

void FEProblemBase::jacobianSetup ( )
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 9155 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::jacobianSetup().

9156 {
9158  // We need to setup all the nonlinear systems other than our current one which actually called
9159  // this method (so we have to make sure we don't go in a circle)
9160  for (const auto i : make_range(numNonlinearSystems()))
9161  if (i != currentNlSysNum())
9162  _nl[i]->jacobianSetup();
9163  // We don't setup the aux sys because that's been done elsewhere
9164  if (_displaced_problem)
9165  _displaced_problem->jacobianSetup();
9166 }
virtual std::size_t numNonlinearSystems() const override
virtual void jacobianSetup()
Definition: SubProblem.C:1209
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
virtual unsigned int currentNlSysNum() const override
IntRange< T > make_range(T beg, T end)
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ linearSysNum()

unsigned int FEProblemBase::linearSysNum ( const LinearSystemName &  linear_sys_name) const
overridevirtualinherited
Returns
the linear system number corresponding to the provided linear_sys_name

Implements SubProblem.

Definition at line 6302 of file FEProblemBase.C.

Referenced by Moose::compute_linear_system(), LinearSystem::computeGradients(), FEProblemBase::computeLinearSystemSys(), LinearSystem::computeLinearSystemTags(), and DisplacedProblem::linearSysNum().

6303 {
6304  std::istringstream ss(linear_sys_name);
6305  unsigned int linear_sys_num;
6306  if (!(ss >> linear_sys_num) || !ss.eof())
6307  linear_sys_num = libmesh_map_find(_linear_sys_name_to_num, linear_sys_name);
6308 
6309  return linear_sys_num;
6310 }
std::map< LinearSystemName, unsigned int > _linear_sys_name_to_num
Map from linear system name to number.

◆ lineSearch()

void FEProblemBase::lineSearch ( )
virtualinherited

execute MOOSE line search

Definition at line 2655 of file FEProblemBase.C.

Referenced by ComputeLineSearchObjectWrapper::linesearch().

2656 {
2657  _line_search->lineSearch();
2658 }
std::shared_ptr< LineSearch > _line_search

◆ logAdd()

void FEProblemBase::logAdd ( const std::string &  system,
const std::string &  name,
const std::string &  type,
const InputParameters params 
) const
inherited

Output information about the object just added to the problem.

Definition at line 4180 of file FEProblemBase.C.

Referenced by FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addFunction(), FEProblemBase::addFunctorMaterial(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addMarker(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), FEProblemBase::addOutput(), FEProblemBase::addPredictor(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVariable(), and FEProblemBase::setResidualObjectParamsAndLog().

4184 {
4185  if (_verbose_setup != "false")
4186  _console << "[DBG] Adding " << system << " '" << name << "' of type " << type << std::endl;
4187  if (_verbose_setup == "extra")
4188  _console << params << std::endl;
4189 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
MooseEnum _verbose_setup
Whether or not to be verbose during setup.

◆ markFamilyPRefinement()

void SubProblem::markFamilyPRefinement ( const InputParameters params)
protectedinherited

Mark a variable family for either disabling or enabling p-refinement with valid parameters of a variable.

Definition at line 1367 of file SubProblem.C.

Referenced by FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxVariable(), and FEProblemBase::addVariable().

1368 {
1369  auto family = Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family"));
1370  bool flag = _default_families_without_p_refinement.count(family);
1371  if (params.isParamValid("disable_p_refinement"))
1372  flag = params.get<bool>("disable_p_refinement");
1373 
1374  auto [it, inserted] = _family_for_p_refinement.emplace(family, flag);
1375  if (!inserted && flag != it->second)
1376  mooseError("'disable_p_refinement' not set consistently for variables in ", family);
1377 }
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.
std::unordered_map< FEFamily, bool > _family_for_p_refinement
Indicate whether a family is disabled for p-refinement.
Definition: SubProblem.h:1205
static const std::unordered_set< FEFamily > _default_families_without_p_refinement
The set of variable families by default disable p-refinement.
Definition: SubProblem.h:1207
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ 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 724 of file SubProblem.C.

Referenced by MaterialBase::markMatPropRequested(), and MaterialPropertyInterface::markMatPropRequested().

725 {
726  _material_property_requested.insert(prop_name);
727 }
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty* ...
Definition: SubProblem.h:1062

◆ matrixTagExists() [1/2]

bool SubProblem::matrixTagExists ( const TagName &  tag_name) const
virtualinherited

Check to see if a particular Tag exists.

Reimplemented in DisplacedProblem.

Definition at line 328 of file SubProblem.C.

Referenced by SystemBase::activeMatrixTag(), SystemBase::addMatrix(), SystemBase::associateMatrixToTag(), Coupleable::coupledMatrixTagValue(), Coupleable::coupledMatrixTagValues(), SystemBase::deactiveMatrixTag(), SystemBase::disassociateDefaultMatrixTags(), SystemBase::disassociateMatrixFromTag(), SystemBase::getMatrix(), SubProblem::getMatrixTagID(), SystemBase::matrixTagActive(), DisplacedProblem::matrixTagExists(), SystemBase::removeMatrix(), and TaggingInterface::useMatrixTag().

329 {
330  auto tag_name_upper = MooseUtils::toUpper(tag_name);
331 
332  return _matrix_tag_name_to_tag_id.find(tag_name_upper) != _matrix_tag_name_to_tag_id.end();
333 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1041
std::string toUpper(const std::string &name)
Convert supplied string to upper case.

◆ 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 336 of file SubProblem.C.

337 {
338  return _matrix_tag_id_to_tag_name.find(tag_id) != _matrix_tag_id_to_tag_name.end();
339 }
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:1044

◆ matrixTagName()

TagName SubProblem::matrixTagName ( TagID  tag)
virtualinherited

Retrieve the name associated with a TagID.

Reimplemented in DisplacedProblem.

Definition at line 357 of file SubProblem.C.

Referenced by SystemBase::addMatrix(), DisplacedProblem::matrixTagName(), and SystemBase::removeMatrix().

358 {
359  return _matrix_tag_id_to_tag_name[tag];
360 }
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:1044

◆ mesh() [1/3]

virtual MooseMesh& FEProblemBase::mesh ( )
inlineoverridevirtualinherited

Implements SubProblem.

Reimplemented in MFEMProblem.

Definition at line 151 of file FEProblemBase.h.

Referenced by Adaptivity::adaptMesh(), FEProblemBase::addAnyRedistributers(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), PhysicsBasedPreconditioner::apply(), MultiAppGeneralFieldNearestLocationTransfer::buildKDTrees(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), SampledOutput::cloneMesh(), LinearSystem::computeGradients(), NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), ComputeFullJacobianThread::computeOnInternalFace(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::coordTransform(), MultiApp::createApp(), DMMooseGetEmbedding_Private(), ElementsAlongLine::ElementsAlongLine(), ElementsAlongPlane::ElementsAlongPlane(), MultiAppVariableValueSampleTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), ElementsAlongLine::execute(), ElementsAlongPlane::execute(), IntersectionPointsAlongLine::execute(), WorkBalance::execute(), MultiAppUserObjectTransfer::execute(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), FunctionPeriodicBoundary::FunctionPeriodicBoundary(), MultiApp::getBoundingBox(), Exodus::handleExodusIOMeshRenumbering(), NodePositions::initialize(), FunctorPositions::initialize(), FunctorTimes::initialize(), FunctorExtremaPositions::initialize(), ParsedDownSelectionPositions::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), ImageFunction::initialSetup(), FEProblemBase::initialSetup(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), IntersectionPointsAlongLine::IntersectionPointsAlongLine(), Moose::Mortar::loopOverMortarSegments(), ReporterPointMarker::markerSetup(), MFEMProblem::mesh(), FEProblemBase::mesh(), MultiAppGeometricInterpolationTransfer::MultiAppGeometricInterpolationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), ComputeNodalUserObjectsThread::onNode(), BoundaryNodeIntegrityCheckThread::onNode(), ComputeInitialConditionThread::operator()(), BoundaryElemIntegrityCheckThread::operator()(), ComputeLinearFVGreenGaussGradientVolumeThread::operator()(), Output::Output(), Exodus::outputEmptyTimestep(), ConsoleUtils::outputMeshInformation(), Exodus::outputNodalVariables(), Exodus::outputSetup(), PiecewiseConstantFromCSV::PiecewiseConstantFromCSV(), SolutionUserObjectBase::pointValueGradientWrapper(), SolutionUserObjectBase::pointValueWrapper(), MeshInfo::possiblyAddSidesetInfo(), MeshInfo::possiblyAddSubdomainInfo(), ComputeLinearFVElementalThread::printBlockExecutionInformation(), ComputeLinearFVFaceThread::printBlockExecutionInformation(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), MaterialPropertyDebugOutput::printMaterialMap(), TopResidualDebugOutput::printTopResiduals(), SolutionUserObjectBase::SolutionUserObjectBase(), FixedPointSolve::solve(), TransientMultiApp::solveStep(), Moose::PetscSupport::storePetscOptions(), MultiAppDofCopyTransfer::transfer(), Checkpoint::updateCheckpointFiles(), and SampledOutput::updateSample().

151 { return _mesh; }
MooseMesh & _mesh

◆ mesh() [2/3]

virtual const MooseMesh& FEProblemBase::mesh ( ) const
inlineoverridevirtualinherited

Implements SubProblem.

Reimplemented in MFEMProblem.

Definition at line 152 of file FEProblemBase.h.

152 { return _mesh; }
MooseMesh & _mesh

◆ mesh() [3/3]

const MooseMesh & FEProblemBase::mesh ( bool  use_displaced) const
overridevirtualinherited

Implements SubProblem.

Definition at line 639 of file FEProblemBase.C.

640 {
641  if (use_displaced && !_displaced_problem)
642  mooseWarning("Displaced mesh was requested but the displaced problem does not exist. "
643  "Regular mesh will be returned");
644  return ((use_displaced && _displaced_problem) ? _displaced_problem->mesh() : mesh());
645 }
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
virtual MooseMesh & mesh() override
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ meshChanged() [1/2]

void FEProblemBase::meshChanged ( bool  intermediate_change,
bool  contract_mesh,
bool  clean_refinement_flags 
)
virtualinherited

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 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

Definition at line 8049 of file FEProblemBase.C.

Referenced by SidesetAroundSubdomainUpdater::finalize(), ActivateElementsUserObjectBase::finalize(), Exodus::handleExodusIOMeshRenumbering(), ElementSubdomainModifierBase::modify(), and Adaptivity::uniformRefineWithProjection().

8052 {
8053  TIME_SECTION("meshChanged", 3, "Handling Mesh Changes");
8054 
8057  _mesh.cacheChangedLists(); // Currently only used with adaptivity and stateful material
8058  // properties
8059 
8060  // Clear these out because they corresponded to the old mesh
8061  _ghosted_elems.clear();
8063 
8064  // The mesh changed. We notify the MooseMesh first, because
8065  // callbacks (e.g. for sparsity calculations) triggered by the
8066  // EquationSystems reinit may require up-to-date MooseMesh caches.
8067  _mesh.meshChanged();
8068 
8069  // If we're just going to alter the mesh again, all we need to
8070  // handle here is AMR and projections, not full system reinit
8071  if (intermediate_change)
8072  es().reinit_solutions();
8073  else
8074  es().reinit();
8075 
8076  if (contract_mesh)
8077  // Once vectors are restricted, we can delete children of coarsened elements
8078  _mesh.getMesh().contract();
8079  if (clean_refinement_flags)
8080  {
8081  // Finally clear refinement flags so that if someone tries to project vectors again without
8082  // an intervening mesh refinement to clear flags they won't run into trouble
8083  MeshRefinement refinement(_mesh.getMesh());
8084  refinement.clean_refinement_flags();
8085  }
8086 
8087  if (!intermediate_change)
8088  {
8089  // Since the mesh has changed, we need to make sure that we update any of our
8090  // MOOSE-system specific data.
8091  for (auto & sys : _solver_systems)
8092  sys->reinit();
8093  _aux->reinit();
8094  }
8095 
8096  // Updating MooseMesh first breaks other adaptivity code, unless we
8097  // then *again* update the MooseMesh caches. E.g. the definition of
8098  // "active" and "local" may have been *changed* by refinement and
8099  // repartitioning done in EquationSystems::reinit().
8100  _mesh.meshChanged();
8101 
8102  // If we have finite volume variables, we will need to recompute additional elemental/face
8103  // quantities
8106 
8107  // Let the meshChangedInterface notify the mesh changed event before we update the active
8108  // semilocal nodes, because the set of ghosted elements may potentially be updated during a mesh
8109  // changed event.
8110  for (const auto & mci : _notify_when_mesh_changes)
8111  mci->meshChanged();
8112 
8113  // Since the Mesh changed, update the PointLocator object used by DiracKernels.
8115 
8116  // Need to redo ghosting
8118 
8119  if (_displaced_problem)
8120  {
8121  _displaced_problem->meshChanged(contract_mesh, clean_refinement_flags);
8123  }
8124 
8126 
8129 
8130  // Just like we reinitialized our geometric search objects, we also need to reinitialize our
8131  // mortar meshes. Note that this needs to happen after DisplacedProblem::meshChanged because the
8132  // mortar mesh discretization will depend necessarily on the displaced mesh being re-displaced
8133  updateMortarMesh();
8134 
8135  reinitBecauseOfGhostingOrNewGeomObjects(/*mortar_changed=*/true);
8136 
8137  // We need to create new storage for newly active elements, and copy
8138  // stateful properties from the old elements.
8141  {
8142  if (havePRefinement())
8144 
8145  // Prolong properties onto newly refined elements' children
8146  {
8148  /* refine = */ true, *this, _material_props, _bnd_material_props, _assembly);
8149  const auto & range = *_mesh.refinedElementRange();
8150  Threads::parallel_reduce(range, pmp);
8151 
8152  // Concurrent erasure from the shared hash map is not safe while we are reading from it in
8153  // ProjectMaterialProperties, so we handle erasure here. Moreover, erasure based on key is
8154  // not thread safe in and of itself because it is a read-write operation. Note that we do not
8155  // do the erasure for p-refinement because the coarse level element is the same as our active
8156  // refined level element
8157  if (!doingPRefinement())
8158  for (const auto & elem : range)
8159  {
8163  }
8164  }
8165 
8166  // Restrict properties onto newly coarsened elements
8167  {
8169  /* refine = */ false, *this, _material_props, _bnd_material_props, _assembly);
8170  const auto & range = *_mesh.coarsenedElementRange();
8171  Threads::parallel_reduce(range, pmp);
8172  // Note that we do not do the erasure for p-refinement because the coarse level element is the
8173  // same as our active refined level element
8174  if (!doingPRefinement())
8175  for (const auto & elem : range)
8176  {
8177  auto && coarsened_children = _mesh.coarsenedElementChildren(elem);
8178  for (auto && child : coarsened_children)
8179  {
8183  }
8184  }
8185  }
8186  }
8187 
8190 
8191  _has_jacobian = false; // we have to recompute jacobian when mesh changed
8192 
8193  // Now for backwards compatibility with user code that overrode the old no-arg meshChanged we must
8194  // call it here
8195  meshChanged();
8196 }
void setVariableAllDoFMap(const std::vector< const MooseVariableFEBase *> &moose_vars)
bool isFiniteVolumeInfoDirty() const
Definition: MooseMesh.h:1304
virtual void meshChanged()
Deprecated.
void reinitBecauseOfGhostingOrNewGeomObjects(bool mortar_changed=false)
Call when it is possible that the needs for ghosted elements has changed.
MaterialPropertyStorage & _bnd_material_props
bool _has_jacobian
Indicates if the Jacobian was computed.
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
void eraseProperty(const Elem *elem)
Remove the property storage and element pointer from internal data structures Use this when elements ...
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
void cacheChangedLists()
Cache information about what elements were refined and coarsened in the previous step.
Definition: MooseMesh.C:910
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
ConstElemPointerRange * refinedElementRange() const
Return a range that is suitable for threaded execution over elements that were just refined...
Definition: MooseMesh.C:928
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1093
std::unique_ptr< libMesh::ConstElemRange > _nl_evaluable_local_elem_range
bool _calculate_jacobian_in_uo
bool havePRefinement() const
Query whether p-refinement has been requested at any point during the simulation. ...
Definition: SubProblem.h:1009
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3443
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
Objects to be notified when the mesh changes.
virtual libMesh::EquationSystems & es() override
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
void reinit()
Completely redo all geometric search objects.
bool doingPRefinement() const
Definition: SubProblem.C:1361
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
virtual void updateMortarMesh()
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:940
virtual bool contract()=0
void updateActiveSemiLocalNodeRange(std::set< dof_id_type > &ghosted_elems)
Clears the "semi-local" node list and rebuilds it.
Definition: MooseMesh.C:948
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
std::shared_ptr< DisplacedProblem > _displaced_problem
GeometricSearchData _geometric_search_data
bool _has_initialized_stateful
Whether nor not stateful materials have been initialized.
MaterialPropertyStorage & _neighbor_material_props
ConstElemPointerRange * coarsenedElementRange() const
Return a range that is suitable for threaded execution over elements that were just coarsened...
Definition: MooseMesh.C:934
std::unique_ptr< libMesh::ConstElemRange > _evaluable_local_elem_range
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1049
MaterialPropertyStorage & _material_props
void updatePointLocator(const MooseMesh &mesh)
Called during FEProblemBase::meshChanged() to update the PointLocator object used by the DiracKernels...
MooseMesh * _displaced_mesh
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
Definition: MooseMesh.C:879
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2363
virtual void ghostGhostedBoundaries() override
Causes the boundaries added using addGhostedBoundary to actually be ghosted.
void setupFiniteVolumeMeshData() const
Sets up the additional data needed for finite volume computations.
Definition: MooseMesh.C:4067

◆ meshChanged() [2/2]

virtual void FEProblemBase::meshChanged ( )
inlineprotectedvirtualinherited

Deprecated.

Users should switch to overriding the meshChanged which takes arguments

Definition at line 2503 of file FEProblemBase.h.

Referenced by FEProblemBase::adaptMesh(), FEProblemBase::initialAdaptMesh(), FEProblemBase::meshChanged(), FEProblemBase::timestepSetup(), FEProblemBase::uniformRefine(), and FEProblemBase::updateMeshXFEM().

2503 {}

◆ meshDisplaced()

void FEProblemBase::meshDisplaced ( )
protectedvirtualinherited

Update data after a mesh displaced.

Definition at line 8211 of file FEProblemBase.C.

Referenced by DisplacedProblem::updateMesh().

8212 {
8213  for (const auto & mdi : _notify_when_mesh_displaces)
8214  mdi->meshDisplaced();
8215 }
std::vector< MeshDisplacedInterface * > _notify_when_mesh_displaces
Objects to be notified when the mesh displaces.

◆ mooseDeprecated()

template<typename... Args>
void MooseBaseErrorInterface::mooseDeprecated ( Args &&...  args) const
inlineinherited

Definition at line 91 of file MooseBaseErrorInterface.h.

Referenced by FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::advanceMultiApps(), MultiApp::appProblem(), MooseMesh::buildSideList(), ChangeOverTimestepPostprocessor::ChangeOverTimestepPostprocessor(), AddVariableAction::determineType(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), MooseMesh::elem(), UserForcingFunction::f(), FaceFaceConstraint::FaceFaceConstraint(), FunctionDT::FunctionDT(), RandomICBase::generateRandom(), MooseMesh::getBoundariesToElems(), DataFileInterface::getDataFileName(), DataFileInterface::getDataFileNameByName(), Control::getExecuteOptions(), FEProblemBase::getNonlinearSystem(), FEProblemBase::getUserObjects(), FEProblemBase::hasPostprocessor(), MatDiffusionBase< Real >::MatDiffusionBase(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalScalarKernel::NodalScalarKernel(), MooseMesh::node(), FixedPointSolve::numPicardIts(), RelationshipManager::operator>=(), PercentChangePostprocessor::PercentChangePostprocessor(), ReferenceResidualConvergence::ReferenceResidualConvergence(), Residual::Residual(), MooseMesh::setBoundaryToNormalMap(), Exodus::setOutputDimension(), and UserForcingFunction::UserForcingFunction().

92  {
94  _console, false, true, _moose_base.errorPrefix("deprecation"), std::forward<Args>(args)...);
95  }
std::string errorPrefix(const std::string &error_type) const
Definition: MooseBase.C:43
const MooseBase & _moose_base
The MooseBase class deriving from this interface.
void mooseDeprecatedStream(S &oss, const bool expired, const bool print_title, Args &&... args)
Definition: MooseError.h:239
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ mooseDocumentedError()

template<typename... Args>
void MooseBaseErrorInterface::mooseDocumentedError ( const std::string &  repo_name,
const unsigned int  issue_num,
Args &&...  args 
) const
inlineinherited

Emits a documented error with object name and type.

Documented errors are errors that have an issue associated with them.

The repository name repo_name links a named repository to a URL and should be registered at the application level with registerRepository(). See Moose.C for an example of the "moose" repository registration.

Parameters
repo_nameThe repository name where the issue resides
issue_numThe number of the issue
argsThe error message to be combined

Definition at line 61 of file MooseBaseErrorInterface.h.

Referenced by ArrayDGLowerDKernel::ArrayDGLowerDKernel(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), DGLowerDKernel::DGLowerDKernel(), HFEMDirichletBC::HFEMDirichletBC(), and LowerDIntegratedBC::LowerDIntegratedBC().

64  {
65  std::ostringstream oss;
66  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
67  const auto msg = moose::internal::formatMooseDocumentedError(repo_name, issue_num, oss.str());
68  _moose_base.callMooseError(msg, /* with_prefix = */ true);
69  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:94
const MooseBase & _moose_base
The MooseBase class deriving from this interface.
void callMooseError(std::string msg, const bool with_prefix) const
Calls moose error with the message msg.
Definition: MooseBase.C:33
std::string formatMooseDocumentedError(const std::string &repo_name, const unsigned int issue_num, const std::string &msg)
Formats a documented error.
Definition: MooseError.C:99

◆ mooseError()

template<typename... Args>
void MooseBaseErrorInterface::mooseError ( Args &&...  args) const
inlineinherited

Emits an error prefixed with object name and type.

Definition at line 29 of file MooseBaseErrorInterface.h.

Referenced by CopyMeshPartitioner::_do_partition(), HierarchicalGridPartitioner::_do_partition(), GridPartitioner::_do_partition(), PetscExternalPartitioner::_do_partition(), MultiAppGeneralFieldTransfer::acceptPointInOriginMesh(), AddBoundsVectorsAction::act(), AddMeshGeneratorAction::act(), AddVectorPostprocessorAction::act(), InitProblemAction::act(), CheckFVBCAction::act(), CreateExecutionerAction::act(), AutoCheckpointAction::act(), SetupMeshCompleteAction::act(), CheckIntegrityAction::act(), AddFVICAction::act(), AddICAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), CombineComponentsMeshes::act(), SetupMeshAction::act(), SplitMeshAction::act(), AdaptivityAction::act(), ChainControlSetupAction::act(), DeprecatedBlockAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), AddTimeStepperAction::act(), CreateDisplacedProblemAction::act(), MaterialDerivativeTestAction::act(), SetAdaptivityOptionsAction::act(), MaterialOutputAction::act(), AddMFEMSubMeshAction::act(), CommonOutputAction::act(), AddPeriodicBCAction::act(), Action::Action(), FEProblemBase::adaptMesh(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), MooseVariableFV< Real >::adCurlSln(), MooseVariableFV< Real >::adCurlSlnNeighbor(), AddActionComponentAction::AddActionComponentAction(), MFEMProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), DiffusionCG::addBoundaryConditionsFromComponents(), PhysicsComponentInterface::addBoundaryConditionsFromComponents(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), DistributedRectilinearMeshGenerator::addElement(), FEProblemBase::addFunction(), SubProblem::addFunctor(), FEProblemBase::addFVInitialCondition(), ADDGKernel::ADDGKernel(), FEProblemBase::addHDGKernel(), FEProblemBase::addInitialCondition(), PhysicsComponentInterface::addInitialConditionsFromComponents(), FEProblemBase::addInterfaceKernel(), MFEMProblem::addKernel(), FEProblemBase::addKernel(), addLineSearch(), FEProblemBase::addLineSearch(), MFEMProblem::addMaterial(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), FEProblemBase::addOutput(), SubProblem::addPiecewiseByBlockLambdaFunctor(), DiracKernelBase::addPoint(), DistributedRectilinearMeshGenerator::addPoint(), DiracKernelBase::addPointWithValidId(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MooseMesh::addQuadratureNode(), Action::addRelationshipManager(), FEProblemBase::addReporter(), FEProblemBase::addScalarKernel(), AddVariableAction::addVariable(), FEProblemBase::addVectorPostprocessor(), SubProblem::addVectorTag(), MooseLinearVariableFV< Real >::adError(), ADInterfaceKernelTempl< T >::ADInterfaceKernelTempl(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), MooseVariableScalar::adUDot(), Output::advancedExecuteOn(), AdvectiveFluxAux::AdvectiveFluxAux(), MooseVariableBase::allDofIndices(), NEML2ModelExecutor::applyPredictor(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayConstantIC::ArrayConstantIC(), ArrayDGKernel::ArrayDGKernel(), ArrayDiffusion::ArrayDiffusion(), ArrayFunctionIC::ArrayFunctionIC(), ArrayReaction::ArrayReaction(), ArrayTimeDerivative::ArrayTimeDerivative(), AddPeriodicBCAction::autoTranslationBoundaries(), AuxKernelTempl< Real >::AuxKernelTempl(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), MooseMesh::buildCoarseningMap(), MultiApp::buildComm(), DistributedRectilinearMeshGenerator::buildCube(), TimedSubdomainModifier::buildFromFile(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromJSON(), TimedSubdomainModifier::buildFromParameters(), PiecewiseTabularBase::buildFromXY(), PiecewiseLinearBase::buildInterpolation(), MooseMesh::buildLowerDMesh(), TiledMesh::buildMesh(), GeneratedMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), MeshGeneratorMesh::buildMesh(), ImageMeshGenerator::buildMesh3D(), ImageMesh::buildMesh3D(), MooseMesh::buildRefinementMap(), MaterialBase::buildRequiredMaterials(), MooseMesh::buildSideList(), MooseMesh::buildTypedMesh(), MooseMesh::cacheFaceInfoVariableOwnership(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), PhysicsBase::checkBlockRestrictionIdentical(), ComponentBoundaryConditionInterface::checkBoundaryConditionsAllRequested(), SubProblem::checkBoundaryMatProps(), PhysicsBase::checkComponentType(), IterationCountConvergence::checkConvergence(), MooseMesh::checkCoordinateSystems(), DiffusionLHDGAssemblyHelper::checkCoupling(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), FEProblemBase::checkDuplicatePostprocessorVariableNames(), DefaultConvergenceBase::checkDuplicateSetSharedExecutionerParams(), MooseMesh::checkDuplicateSubdomainNames(), FEProblemBase::checkExceptionAndStopSolve(), NEML2ModelExecutor::checkExecutionStage(), MaterialBase::checkExecutionStage(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), FEProblemBase::checkICRestartError(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), Eigenvalue::checkIntegrity(), DefaultNonlinearConvergence::checkIterationType(), DefaultMultiAppFixedPointConvergence::checkIterationType(), DefaultSteadyStateConvergence::checkIterationType(), ExplicitTimeIntegrator::checkLinearConvergence(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), PostprocessorInterface::checkParam(), FEProblemBase::checkProblemIntegrity(), Sampler::checkReinitStatus(), MultiAppGeneralFieldNearestLocationTransfer::checkRestrictionsForSource(), MultiAppPostprocessorToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppScalarToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppPostprocessorTransfer::checkSiblingsTransferSupported(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), MultiAppMFEMCopyTransfer::checkSiblingsTransferSupported(), MultiAppCopyTransfer::checkSiblingsTransferSupported(), MultiAppTransfer::checkSiblingsTransferSupported(), MaterialBase::checkStatefulSanity(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), FEProblemBase::checkUserObjects(), Moose::PetscSupport::checkUserProvidedPetscOption(), DomainUserObject::checkVariable(), MultiAppTransfer::checkVariable(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), LibmeshPartitioner::clone(), MooseMesh::clone(), CombinerGenerator::CombinerGenerator(), ComparisonPostprocessor::comparisonIsTrue(), MooseVariableFieldBase::componentName(), CompositeFunction::CompositeFunction(), ElementH1ErrorFunctionAux::compute(), NodalPatchRecovery::compute(), FEProblemBase::computeBounds(), VariableCondensationPreconditioner::computeDInverseDiag(), CompositionDT::computeDT(), ArrayDGKernel::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighResidual(), InternalSideIntegralPostprocessor::computeFaceInfoIntegral(), SideIntegralPostprocessor::computeFaceInfoIntegral(), MooseVariableFieldBase::computeFaceValues(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), MooseMesh::computeFiniteVolumeCoords(), HistogramVectorPostprocessor::computeHistogram(), ArrayKernel::computeJacobian(), ArrayIntegratedBC::computeJacobian(), FVFluxKernel::computeJacobian(), NodalConstraint::computeJacobian(), FEProblemBase::computeJacobianTags(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), EigenProblem::computeMatricesTags(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), ArrayKernel::computeOffDiagJacobian(), ArrayIntegratedBC::computeOffDiagJacobian(), FVElementalKernel::computeOffDiagJacobian(), MortarScalarBase::computeOffDiagJacobianScalar(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), MaterialBase::computeProperties(), SideFVFluxBCIntegral::computeQpIntegral(), ScalarKernel::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), NodalEqualValueConstraint::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), NodeElemConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), ScalarKernel::computeQpResidual(), MassMatrix::computeQpResidual(), HDGKernel::computeQpResidual(), DiffusionLHDGDirichletBC::computeQpResidual(), NodalEqualValueConstraint::computeQpResidual(), DiffusionLHDGPrescribedGradientBC::computeQpResidual(), IPHDGBC::computeQpResidual(), KernelValue::computeQpResidual(), TorchScriptMaterial::computeQpValues(), InterfaceQpValueUserObject::computeRealValue(), ArrayKernel::computeResidual(), ArrayIntegratedBC::computeResidual(), FVFluxBC::computeResidual(), FVFluxKernel::computeResidual(), NodalConstraint::computeResidual(), FVFluxKernel::computeResidualAndJacobian(), ResidualObject::computeResidualAndJacobian(), FEProblemBase::computeResidualAndJacobian(), HDGKernel::computeResidualAndJacobianOnSide(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualTag(), FEProblemBase::computeResidualTags(), FEProblemBase::computeResidualType(), KernelScalarBase::computeScalarOffDiagJacobian(), ADKernelScalarBase::computeScalarQpResidual(), ADMortarScalarBase::computeScalarQpResidual(), MortarScalarBase::computeScalarQpResidual(), KernelScalarBase::computeScalarQpResidual(), TimeStepper::computeStep(), ActuallyExplicitEuler::computeTimeDerivatives(), ExplicitEuler::computeTimeDerivatives(), ImplicitEuler::computeTimeDerivatives(), BDF2::computeTimeDerivatives(), NewmarkBeta::computeTimeDerivatives(), CentralDifference::computeTimeDerivatives(), CrankNicolson::computeTimeDerivatives(), LStableDirk2::computeTimeDerivatives(), LStableDirk3::computeTimeDerivatives(), ImplicitMidpoint::computeTimeDerivatives(), ExplicitTVDRK2::computeTimeDerivatives(), AStableDirk4::computeTimeDerivatives(), LStableDirk4::computeTimeDerivatives(), ExplicitRK2::computeTimeDerivatives(), MultiAppGeometricInterpolationTransfer::computeTransformation(), BuildArrayVariableAux::computeValue(), TagVectorArrayVariableAux::computeValue(), NearestNodeValueAux::computeValue(), ProjectionAux::computeValue(), PenetrationAux::computeValue(), ConcentricCircleMesh::ConcentricCircleMesh(), ConditionalEnableControl::ConditionalEnableControl(), TimeStepper::constrainStep(), LibtorchNeuralNetControl::controlNeuralNet(), TransientBase::convergedToSteadyState(), ParsedConvergence::convertRealToBool(), CopyMeshPartitioner::CopyMeshPartitioner(), CoupledForceNodalKernel::CoupledForceNodalKernel(), MultiApp::createApp(), AddVariableAction::createInitialConditionAction(), Function::curl(), MooseVariableFV< Real >::curlPhi(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), SidesetInfoVectorPostprocessor::dataHelper(), DebugResidualAux::DebugResidualAux(), ReporterTransferInterface::declareClone(), MeshGenerator::declareMeshProperty(), ReporterTransferInterface::declareVectorClone(), DefaultSteadyStateConvergence::DefaultSteadyStateConvergence(), FunctorRelationshipManager::delete_remote_elements(), MooseMesh::deleteRemoteElements(), BicubicSplineFunction::derivative(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), MooseMesh::detectPairedSidesets(), FEProblemBase::determineSolverSystem(), DGKernel::DGKernel(), MeshDiagnosticsGenerator::diagnosticsLog(), DistributedPositions::DistributedPositions(), Function::div(), FunctorBinnedValuesDivision::divisionIndex(), MooseVariableFV< Real >::divPhi(), FunctorRelationshipManager::dofmap_reinit(), EigenProblem::doFreeNonlinearPowerIterations(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementIntegerAux::ElementIntegerAux(), ElementMaterialSampler::ElementMaterialSampler(), ElementQualityAux::ElementQualityAux(), ElementSubdomainModifierBase::ElementSubdomainModifierBase(), ElementUOAux::ElementUOAux(), ExtraIDIntegralVectorPostprocessor::elementValue(), DistributedRectilinearMeshGenerator::elemId(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), EigenKernel::enabled(), MooseMesh::errorIfDistributedMesh(), MultiAppTransfer::errorIfObjectExecutesOnTransferInSourceApp(), SideIntegralPostprocessor::errorNoFaceInfo(), SideIntegralFunctorPostprocessorTempl< false >::errorNoFaceInfo(), SolutionUserObjectBase::evalMeshFunction(), SolutionUserObjectBase::evalMeshFunctionGradient(), SolutionUserObjectBase::evalMultiValuedMeshFunction(), SolutionUserObjectBase::evalMultiValuedMeshFunctionGradient(), FixedPointSolve::examineFixedPointConvergence(), MultiAppGeneralFieldTransfer::examineReceivedValueConflicts(), RealToBoolChainControl::execute(), RestartableDataReporter::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), NodalValueSampler::execute(), MultiAppPostprocessorTransfer::execute(), PositionsFunctorValueSampler::execute(), ElementQualityChecker::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), GreaterThanLessThanPostprocessor::execute(), PointValue::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), FindValueOnLine::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppMFEMCopyTransfer::execute(), MultiAppCopyTransfer::execute(), WebServerControl::execute(), MultiAppGeometricInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), InterfaceQpUserObjectBase::execute(), LeastSquaresFit::execute(), VectorPostprocessorComparison::execute(), LeastSquaresFitHistory::execute(), TimeExtremeValue::execute(), Eigenvalue::execute(), DomainUserObject::execute(), FEProblemBase::execute(), FEProblemBase::executeControls(), MultiAppVectorPostprocessorTransfer::executeFromMultiapp(), MultiAppVectorPostprocessorTransfer::executeToMultiapp(), Exodus::Exodus(), ExplicitSSPRungeKutta::ExplicitSSPRungeKutta(), MultiAppGeneralFieldTransfer::extractOutgoingPoints(), NEML2ModelExecutor::extractOutputs(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemSolve::FEProblemSolve(), FileOutput::FileOutput(), NEML2ModelExecutor::fillInputs(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), ElementQualityChecker::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), NearestPointAverage::finalize(), NearestPointIntegralVariablePostprocessor::finalize(), Transfer::find_sys(), BreakMeshByBlockGeneratorBase::findFreeBoundaryId(), FunctionDT::FunctionDT(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVMassMatrix::FVMassMatrix(), FVMatAdvection::FVMatAdvection(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), GapValueAux::GapValueAux(), WorkBalance::gather(), ElementOrderConversionGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), BlockToMeshConverterGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), MoveNodeGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), SideSetsFromNormalsGenerator::generate(), SmoothMeshGenerator::generate(), SubdomainPerElementGenerator::generate(), TiledMeshGenerator::generate(), MeshRepairGenerator::generate(), BreakMeshByBlockGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), MeshDiagnosticsGenerator::generate(), CoarsenBlockGenerator::generate(), SideSetsFromPointsGenerator::generate(), AllSideSetsByNormalsGenerator::generate(), ParsedGenerateNodeset::generate(), MeshCollectionGenerator::generate(), CombinerGenerator::generate(), AdvancedExtruderGenerator::generate(), MeshExtruderGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), StackGenerator::generate(), StitchedMeshGenerator::generate(), XYZDelaunayGenerator::generate(), CutMeshByLevelSetGeneratorBase::generate(), SpiralAnnularMeshGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), PatternedMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), MeshGenerator::generateData(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), MeshGenerator::generateInternal(), CircularBoundaryCorrectionGenerator::generateRadialCorrectionFactor(), RandomICBase::generateRandom(), GenericConstantMaterialTempl< is_ad >::GenericConstantMaterialTempl(), GenericConstantVectorMaterialTempl< is_ad >::GenericConstantVectorMaterialTempl(), GenericFunctionMaterialTempl< is_ad >::GenericFunctionMaterialTempl(), GenericFunctionVectorMaterialTempl< is_ad >::GenericFunctionVectorMaterialTempl(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), DisplacedProblem::getActualFieldVariable(), FEProblemBase::getActualFieldVariable(), DisplacedProblem::getArrayVariable(), FEProblemBase::getArrayVariable(), MooseMesh::getAxisymmetricRadialCoord(), MFEMFESpace::getBasis(), NEML2BatchIndexGenerator::getBatchIndex(), MooseMesh::getBlockConnectedBlocks(), VariableOldValueBounds::getBound(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), ChainControl::getChainControlDataByName(), MooseMesh::getCoarseningMap(), MultiApp::getCommandLineArgs(), MooseVariableBase::getContinuity(), Control::getControllableParameterByName(), FEProblemBase::getConvergence(), MooseMesh::getCoordSystem(), PhysicsBase::getCoupledPhysics(), PropertyReadFile::getData(), DataFileInterface::getDataFilePath(), TransfiniteMeshGenerator::getDiscreteEdge(), FEProblemBase::getDistribution(), MooseVariableBase::getDofIndices(), VariableCondensationPreconditioner::getDofToCondense(), TransfiniteMeshGenerator::getEdge(), GhostingUserObject::getElementalValue(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), PropertyReadFile::getElementData(), MooseMesh::getElementIDIndex(), Material::getElementIDNeighbor(), Material::getElementIDNeighborByName(), MooseMesh::getElemIDMapping(), MooseMesh::getElemIDsOnBlocks(), MultiAppFieldTransfer::getEquationSystem(), MultiApp::getExecutioner(), MFEMVectorFESpace::getFECName(), MultiAppTransfer::getFromMultiApp(), MultiAppTransfer::getFromMultiAppInfo(), FEProblemBase::getFunction(), SubProblem::getFunctor(), FEProblemBase::getFVMatsAndDependencies(), MooseMesh::getGeneralAxisymmetricCoordAxis(), DistributedRectilinearMeshGenerator::getGhostNeighbors(), DistributedRectilinearMeshGenerator::getIndices(), FEProblemBase::getLinearConvergenceNames(), SolutionUserObjectBase::getLocalVarIndex(), Material::getMaterialByName(), FEProblemBase::getMaterialData(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMeshDivision(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), GeneratedMesh::getMinInDimension(), AnnularMesh::getMinInDimension(), MultiAppTransfer::getMultiApp(), FEProblemBase::getMultiAppFixedPointConvergenceName(), DistributedRectilinearMeshGenerator::getNeighbors(), Times::getNextTime(), MooseMesh::getNodeBlockIds(), PropertyReadFile::getNodeData(), MooseMesh::getNodeList(), FEProblemBase::getNonlinearConvergenceNames(), EigenProblem::getNonlinearEigenSystem(), FEProblemBase::getNonlinearSystem(), NEML2ModelExecutor::getOutput(), NEML2ModelExecutor::getOutputDerivative(), NEML2ModelExecutor::getOutputParameterDerivative(), MooseMesh::getPairedBoundaryMapping(), MaterialOutputAction::getParams(), ImageMeshGenerator::GetPixelInfo(), ImageMesh::GetPixelInfo(), PlaneIDMeshGenerator::getPlaneID(), Positions::getPosition(), Positions::getPositions(), FEProblemBase::getPositionsObject(), Positions::getPositionsVector2D(), Positions::getPositionsVector3D(), Positions::getPositionsVector4D(), PostprocessorInterface::getPostprocessorValueByNameInternal(), Times::getPreviousTime(), ComponentMaterialPropertyInterface::getPropertyValue(), InterfaceQpUserObjectBase::getQpValue(), MooseMesh::getRefinementMap(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), FEProblemBase::getSampler(), WebServerControl::getScalarJSONValue(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), MooseObject::getSharedPtr(), InterfaceQpUserObjectBase::getSideAverageValue(), PhysicsBase::getSolverSystem(), DisplacedProblem::getStandardVariable(), FEProblemBase::getStandardVariable(), FEProblemBase::getSteadyStateConvergenceName(), MooseMesh::getSubdomainBoundaryIds(), TimedSubdomainModifier::getSubdomainIDAndCheck(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), Times::getTimeAtIndex(), FEProblemBase::getTimeFromStateArg(), TransientBase::getTimeIntegratorNames(), Times::getTimes(), MultiAppTransfer::getToMultiApp(), MultiAppTransfer::getToMultiAppInfo(), MooseMesh::getUniqueCoordSystem(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), UserObjectInterface::getUserObjectBaseByName(), UserObjectInterface::getUserObjectName(), VectorPostprocessorComponent::getValue(), NumRelationshipManagers::getValue(), Residual::getValue(), SideAverageValue::getValue(), JSONFileReader::getValue(), LineValueSampler::getValue(), FindValueOnLine::getValueAtPoint(), SubProblem::getVariableHelper(), JSONFileReader::getVector(), VectorPostprocessorInterface::getVectorPostprocessorName(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), DisplacedProblem::getVectorVariable(), FEProblemBase::getVectorVariable(), GhostingFromUOAux::GhostingFromUOAux(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), Function::gradient(), FEProblemBase::handleException(), Terminator::handleMessage(), MooseVariableBase::hasDoFsOnNodes(), PostprocessorInterface::hasPostprocessor(), PostprocessorInterface::hasPostprocessorByName(), ReporterInterface::hasReporterValue(), ReporterInterface::hasReporterValueByName(), VectorPostprocessorInterface::hasVectorPostprocessor(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), HDGKernel::HDGKernel(), TransientBase::incrementStepOrReject(), FixedPointIterationAdaptiveDT::init(), CrankNicolson::init(), CSVTimeSequenceStepper::init(), ExplicitTimeIntegrator::init(), EigenExecutionerBase::init(), TransientBase::init(), init(), AddAuxVariableAction::init(), IterationAdaptiveDT::init(), Eigenvalue::init(), AddVariableAction::init(), MooseMesh::init(), Sampler::init(), FEProblemBase::init(), MultiApp::init(), FEProblemBase::initialAdaptMesh(), NestedDivision::initialize(), DistributedPositions::initialize(), ReporterPositions::initialize(), TransformedPositions::initialize(), ElementGroupCentroidPositions::initialize(), FunctorPositions::initialize(), ReporterTimes::initialize(), FunctorTimes::initialize(), ParsedDownSelectionPositions::initialize(), ParsedConvergence::initializeConstantSymbol(), PhysicsBase::initializePhysics(), SteffensenSolve::initialSetup(), MultiAppCloneReporterTransfer::initialSetup(), SolutionIC::initialSetup(), PiecewiseLinearBase::initialSetup(), ChainControlDataPostprocessor::initialSetup(), MultiAppConservativeTransfer::initialSetup(), IntegralPreservingFunctionIC::initialSetup(), PiecewiseLinear::initialSetup(), FullSolveMultiApp::initialSetup(), CoarsenedPiecewiseLinear::initialSetup(), LinearFVAdvection::initialSetup(), SolutionScalarAux::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), LinearFVDiffusion::initialSetup(), LinearFVAnisotropicDiffusion::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), ExplicitTimeIntegrator::initialSetup(), SolutionAux::initialSetup(), ReferenceResidualConvergence::initialSetup(), NodalVariableValue::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), CSV::initialSetup(), MooseParsedFunction::initialSetup(), SolutionUserObjectBase::initialSetup(), FEProblemBase::initialSetup(), SubProblem::initialSetup(), AdvancedOutput::initOutputList(), MFEMProblem::initProblemOperator(), AdvancedOutput::initShowHideLists(), Function::integral(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), InterfaceTimeKernel::InterfaceTimeKernel(), InternalSideIndicatorBase::InternalSideIndicatorBase(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), Sampler::isAdaptiveSamplingCompleted(), MooseMesh::isBoundaryFullyExternalToSubdomains(), MooseVariableBase::isNodal(), IterationAdaptiveDT::IterationAdaptiveDT(), IterationCountConvergence::IterationCountConvergence(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< Real >::LineMaterialSamplerBase(), LineSearch::lineSearch(), LineValueSampler::LineValueSampler(), MultiAppGeneralFieldTransfer::locatePointReceivers(), LowerBoundNodalKernel::LowerBoundNodalKernel(), MooseLinearVariableFV< Real >::lowerDError(), PNGOutput::makePNG(), ReporterPointMarker::markerSetup(), SubProblem::markFamilyPRefinement(), MassMatrix::MassMatrix(), Material::Material(), MaterialRealTensorValueAuxTempl< is_ad >::MaterialRealTensorValueAuxTempl(), MaterialRealVectorValueAuxTempl< T, is_ad, is_functor >::MaterialRealVectorValueAuxTempl(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), Distribution::median(), FunctorRelationshipManager::mesh_reinit(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshRepairGenerator::MeshRepairGenerator(), SetupMeshAction::modifyParamsForUseSplit(), MeshMetaDataInterface::mooseErrorInternal(), MooseLinearVariableFV< Real >::MooseLinearVariableFV(), MooseMesh::MooseMesh(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MooseVariableConstMonomial::MooseVariableConstMonomial(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppMFEMCopyTransfer::MultiAppMFEMCopyTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), FEProblemBase::needsPreviousNewtonIteration(), NewmarkBeta::NewmarkBeta(), NodalConstraint::NodalConstraint(), MooseVariableFV< Real >::nodalDofIndex(), MooseVariableFV< Real >::nodalDofIndexNeighbor(), MooseLinearVariableFV< Real >::nodalError(), MooseVariableFV< Real >::nodalMatrixTagValue(), NodalPatchRecoveryBase::nodalPatchRecovery(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalScalarKernel::NodalScalarKernel(), MooseVariableFV< Real >::nodalValueArray(), MooseVariableFV< Real >::nodalValueOldArray(), MooseVariableFV< Real >::nodalValueOlderArray(), NodalVariableValue::NodalVariableValue(), MooseVariableFV< Real >::nodalVectorTagValue(), DistributedRectilinearMeshGenerator::nodeId(), MooseVariableFV< Real >::numberOfDofsNeighbor(), NumDOFs::NumDOFs(), NumFailedTimeSteps::NumFailedTimeSteps(), DistributedRectilinearMeshGenerator::numNeighbors(), NumNonlinearIterations::NumNonlinearIterations(), NumVars::NumVars(), Output::onInterval(), FunctorRelationshipManager::operator()(), RelationshipManager::operator==(), ActionComponent::outerSurfaceArea(), ActionComponent::outerSurfaceBoundaries(), XDA::output(), SolutionHistory::output(), Exodus::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), Exodus::outputSetup(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), DistributedRectilinearMeshGenerator::paritionSquarely(), PiecewiseBilinear::parse(), ParsedConvergence::ParsedConvergence(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedODEKernel::ParsedODEKernel(), MultiAppConservativeTransfer::performAdjustment(), ExplicitTimeIntegrator::performExplicitSolve(), PetscExternalPartitioner::PetscExternalPartitioner(), MooseVariableFV< Real >::phiLowerSize(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PIDTransientControl::PIDTransientControl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMulticonstant::PiecewiseMulticonstant(), PiecewiseMultiInterpolation::PiecewiseMultiInterpolation(), PiecewiseTabularBase::PiecewiseTabularBase(), CutMeshByLevelSetGeneratorBase::pointPairLevelSetInterception(), SolutionUserObjectBase::pointValueGradientWrapper(), SolutionUserObjectBase::pointValueWrapper(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessorByName(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), ImplicitMidpoint::postResidual(), ExplicitTVDRK2::postResidual(), AStableDirk4::postResidual(), LStableDirk4::postResidual(), ExplicitRK2::postResidual(), EigenProblem::postScaleEigenVector(), VariableCondensationPreconditioner::preallocateCondensedJacobian(), ADKernelValueTempl< T >::precomputeQpJacobian(), Predictor::Predictor(), TransientBase::preExecute(), MooseMesh::prepare(), MooseMesh::prepared(), FixedPointSolve::printFixedPointConvergenceReason(), PseudoTimestep::PseudoTimestep(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObjectBase::readExodusII(), SolutionUserObjectBase::readXda(), CoarsenBlockGenerator::recursiveCoarsen(), FunctorRelationshipManager::redistribute(), ReferenceResidualConvergence::ReferenceResidualConvergence(), Sampler::reinit(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), PhysicsBase::reportPotentiallyMissedParameters(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), PiecewiseMultiInterpolation::sample(), ScalarComponentIC::ScalarComponentIC(), MortarScalarBase::scalarVariable(), DistributedRectilinearMeshGenerator::scaleNodalPositions(), BicubicSplineFunction::secondDerivative(), MooseVariableFV< Real >::secondPhi(), MooseVariableFV< Real >::secondPhiFace(), MooseVariableFV< Real >::secondPhiFaceNeighbor(), MooseVariableFV< Real >::secondPhiNeighbor(), FunctorRelationshipManager::set_mesh(), MooseVariableBase::setActiveTags(), DistributedRectilinearMeshGenerator::setBoundaryNames(), MooseMesh::setCoordSystem(), FEProblemBase::setCoupling(), PiecewiseBase::setData(), FileOutput::setFileBaseInternal(), MooseMesh::setGeneralAxisymmetricCoordAxes(), FEProblemSolve::setInnerSolve(), MeshGenerator::setMeshProperty(), FVPointValueConstraint::setMyElem(), FEProblemBase::setNonlocalCouplingMatrix(), Sampler::setNumberOfCols(), Sampler::setNumberOfRandomSeeds(), Sampler::setNumberOfRows(), Exodus::setOutputDimensionInExodusWriter(), AddPeriodicBCAction::setPeriodicVars(), MFEMSolverBase::setPreconditioner(), MultiAppGeneralFieldTransfer::setSolutionVectorValues(), Split::setup(), TransientMultiApp::setupApp(), SetupMeshAction::setupMesh(), TimeSequenceStepperBase::setupSequence(), TransientBase::setupTimeIntegrator(), TimePeriodBase::setupTimes(), IntegratedBCBase::shouldApply(), PhysicsBase::shouldCreateIC(), PhysicsBase::shouldCreateTimeDerivative(), PhysicsBase::shouldCreateVariable(), SideAdvectiveFluxIntegralTempl< is_ad >::SideAdvectiveFluxIntegralTempl(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), SolutionUserObjectBase::SolutionUserObjectBase(), TimeIntegrator::solve(), FEProblemBase::solverSysNum(), FullSolveMultiApp::solveStep(), SpatialAverageBase::SpatialAverageBase(), UserObject::spatialPoints(), NearestPointAverage::spatialValue(), NearestPointIntegralVariablePostprocessor::spatialValue(), MeshDivisionFunctorReductionVectorPostprocessor::spatialValue(), UserObject::spatialValue(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), WebServerControl::stringifyJSONType(), MultiAppGeometricInterpolationTransfer::subdomainIDsNode(), Constraint::subdomainSetup(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), MaterialBase::subdomainSetup(), FEProblemBase::swapBackMaterialsNeighbor(), DisplacedProblem::systemBaseLinear(), Console::systemInfoFlags(), FEProblemBase::systemNumForVariable(), TerminateChainControl::terminate(), Terminator::Terminator(), CutMeshByLevelSetGeneratorBase::tet4ElemCutter(), ThreadedGeneralUserObject::threadJoin(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), Function::timeDerivative(), TimedSubdomainModifier::TimedSubdomainModifier(), TimeExtremeValue::TimeExtremeValue(), Function::timeIntegral(), MooseLinearVariableFV< Real >::timeIntegratorError(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriodBase::TimePeriodBase(), VectorPostprocessorVisualizationAux::timestepSetup(), MultiAppDofCopyTransfer::transfer(), MultiAppMFEMCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), TransformedPositions::TransformedPositions(), FEProblemBase::trustUserCouplingMatrix(), MooseVariableScalar::uDot(), MooseVariableScalar::uDotDot(), MooseVariableScalar::uDotDotOld(), FEProblemBase::uDotDotOldRequested(), MooseVariableScalar::uDotOld(), FEProblemBase::uDotOldRequested(), Positions::unrollMultiDPositions(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), Checkpoint::updateCheckpointFiles(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObjectBase::updateExodusBracketingTimeIndices(), FEProblemBase::updateMaxQps(), MFEMHypreADS::updateSolver(), MFEMHypreAMS::updateSolver(), MFEMHypreFGMRES::updateSolver(), MFEMGMRESSolver::updateSolver(), MFEMHypreBoomerAMG::updateSolver(), MFEMOperatorJacobiSmoother::updateSolver(), MFEMHyprePCG::updateSolver(), MFEMCGSolver::updateSolver(), MFEMHypreGMRES::updateSolver(), MFEMSuperLU::updateSolver(), UpperBoundNodalKernel::UpperBoundNodalKernel(), NearestPointIntegralVariablePostprocessor::userObjectValue(), NearestPointAverage::userObjectValue(), BoundingBoxIC::value(), PiecewiseConstantFromCSV::value(), IntegralPreservingFunctionIC::value(), Axisymmetric2D3DSolutionFunction::value(), Function::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), AddVariableAction::variableType(), VariableValueVolumeHistogram::VariableValueVolumeHistogram(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), VectorNodalBC::VectorNodalBC(), SubProblem::vectorTagName(), SubProblem::vectorTagType(), MooseParsedGradFunction::vectorValue(), MooseParsedFunction::vectorValue(), Function::vectorValue(), SubProblem::verifyVectorTags(), ActionComponent::volume(), VTKOutput::VTKOutput(), WebServerControl::WebServerControl(), DOFMapOutput::writeStreamToFile(), and Console::writeStreamToFile().

30  {
31  std::ostringstream oss;
32  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
33  _moose_base.callMooseError(oss.str(), /* with_prefix = */ true);
34  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:94
const MooseBase & _moose_base
The MooseBase class deriving from this interface.
void callMooseError(std::string msg, const bool with_prefix) const
Calls moose error with the message msg.
Definition: MooseBase.C:33

◆ mooseErrorNonPrefixed()

template<typename... Args>
void MooseBaseErrorInterface::mooseErrorNonPrefixed ( Args &&...  args) const
inlineinherited

Emits an error without the prefixing included in mooseError().

Definition at line 40 of file MooseBaseErrorInterface.h.

41  {
42  std::ostringstream oss;
43  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
44  _moose_base.callMooseError(oss.str(), /* with_prefix = */ false);
45  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:94
const MooseBase & _moose_base
The MooseBase class deriving from this interface.
void callMooseError(std::string msg, const bool with_prefix) const
Calls moose error with the message msg.
Definition: MooseBase.C:33

◆ mooseInfo()

template<typename... Args>
void MooseBaseErrorInterface::mooseInfo ( Args &&...  args) const
inlineinherited

Definition at line 98 of file MooseBaseErrorInterface.h.

Referenced by SetupRecoverFileBaseAction::act(), AStableDirk4::AStableDirk4(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MultiAppGeneralFieldNearestLocationTransfer::evaluateInterpValuesNearestNode(), PIDTransientControl::execute(), ExplicitRK2::ExplicitRK2(), ExplicitTVDRK2::ExplicitTVDRK2(), DataFileInterface::getDataFilePath(), MFEMScalarFESpace::getFECName(), MultiAppTransfer::getPointInTargetAppFrame(), ImplicitMidpoint::ImplicitMidpoint(), ParsedDownSelectionPositions::initialize(), PropertyReadFile::initialize(), MultiAppGeneralFieldTransfer::initialSetup(), InversePowerMethod::InversePowerMethod(), LStableDirk2::LStableDirk2(), LStableDirk3::LStableDirk3(), LStableDirk4::LStableDirk4(), PNGOutput::makeMeshFunc(), NonlinearEigen::NonlinearEigen(), SolutionInvalidityOutput::output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), ProjectionAux::ProjectionAux(), ReferenceResidualConvergence::ReferenceResidualConvergence(), MFEMDataCollection::registerFields(), FEProblemBase::setRestartFile(), SolutionUserObjectBase::SolutionUserObjectBase(), and SymmetryTransformGenerator::SymmetryTransformGenerator().

99  {
101  _console, _moose_base.errorPrefix("information"), std::forward<Args>(args)...);
102  }
void mooseInfoStream(S &oss, Args &&... args)
Definition: MooseError.h:232
std::string errorPrefix(const std::string &error_type) const
Definition: MooseBase.C:43
const MooseBase & _moose_base
The MooseBase class deriving from this interface.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ mooseWarning()

template<typename... Args>
void MooseBaseErrorInterface::mooseWarning ( Args &&...  args) const
inlineinherited

Emits a warning prefixed with object name and type.

Definition at line 75 of file MooseBaseErrorInterface.h.

Referenced by CopyMeshPartitioner::_do_partition(), AddKernelAction::act(), MeshOnlyAction::act(), AddFunctionAction::act(), MaterialOutputAction::act(), CommonOutputAction::act(), MFEMProblem::addFunction(), MooseMesh::addPeriodicVariable(), DiracKernelBase::addPoint(), BoundaryMarker::BoundaryMarker(), DistributedRectilinearMeshGenerator::buildCube(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), CartesianMeshGenerator::CartesianMeshGenerator(), CheckOutputAction::checkConsoleOutput(), MultiAppTransfer::checkMultiAppExecuteOn(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), SampledOutput::cloneMesh(), MultiAppGeneralFieldTransfer::closestToPosition(), VariableValueElementSubdomainModifier::computeSubdomainID(), GapValueAux::computeValue(), MultiApp::createApp(), DebugResidualAux::DebugResidualAux(), MeshDiagnosticsGenerator::diagnosticsLog(), CylindricalGridDivision::divisionIndex(), SphericalGridDivision::divisionIndex(), CartesianGridDivision::divisionIndex(), ElementMaterialSampler::ElementMaterialSampler(), Postprocessor::evaluateDotWarning(), MeshDivisionFunctorReductionVectorPostprocessor::execute(), ElementQualityChecker::finalize(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), SubdomainPerElementGenerator::generate(), StitchedMeshGenerator::generate(), ParsedGenerateSideset::generate(), MultiAppTransfer::getAppInfo(), FunctorBinnedValuesDivision::getBinIndex(), DataFileInterface::getDataFilePath(), PointSamplerBase::getLocalElemContainingPoint(), FEProblemBase::getMaterial(), LineValueSampler::getValue(), Terminator::handleMessage(), IndicatorMarker::IndicatorMarker(), SphericalGridDivision::initialize(), CylindricalGridDivision::initialize(), ElementGroupCentroidPositions::initialize(), CartesianGridDivision::initialize(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), BoundsBase::initialSetup(), ReferenceResidualConvergence::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), LeastSquaresFit::LeastSquaresFit(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::mesh(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), NewmarkBeta::NewmarkBeta(), NodalPatchRecovery::NodalPatchRecovery(), NonlocalIntegratedBC::NonlocalIntegratedBC(), NonlocalKernel::NonlocalKernel(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PiecewiseConstantFromCSV::PiecewiseConstantFromCSV(), Executioner::problem(), PropertyReadFile::readData(), TestSourceStepper::rejectStep(), PhysicsBase::reportPotentiallyMissedParameters(), MaterialBase::resetQpProperties(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), MooseMesh::setCoordSystem(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), FEProblemBase::sizeZeroes(), TransientMultiApp::solveStep(), Tecplot::Tecplot(), TimeDerivativeAux::TimeDerivativeAux(), Checkpoint::updateCheckpointFiles(), SampledOutput::updateSample(), PiecewiseConstantFromCSV::value(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

76  {
78  _console, _moose_base.errorPrefix("warning"), std::forward<Args>(args)...);
79  }
std::string errorPrefix(const std::string &error_type) const
Definition: MooseBase.C:43
void mooseWarningStream(S &oss, Args &&... args)
Definition: MooseError.h:184
const MooseBase & _moose_base
The MooseBase class deriving from this interface.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ mooseWarningNonPrefixed()

template<typename... Args>
void MooseBaseErrorInterface::mooseWarningNonPrefixed ( Args &&...  args) const
inlineinherited

Emits a warning without the prefixing included in mooseWarning().

Definition at line 85 of file MooseBaseErrorInterface.h.

86  {
87  moose::internal::mooseWarningStream(_console, std::forward<Args>(args)...);
88  }
void mooseWarningStream(S &oss, Args &&... args)
Definition: MooseError.h:184
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ mortarData() [1/2]

const MortarData& FEProblemBase::mortarData ( ) const
inlineinherited

Returns the mortar data object.

Definition at line 2202 of file FEProblemBase.h.

2202 { return _mortar_data; }
MortarData _mortar_data

◆ mortarData() [2/2]

MortarData& FEProblemBase::mortarData ( )
inlineinherited

Definition at line 2203 of file FEProblemBase.h.

2203 { return _mortar_data; }
MortarData _mortar_data

◆ name()

virtual const std::string& MooseBase::name ( ) const
inlinevirtualinherited

Get the name of the class.

Returns
The name of the class

Reimplemented in MooseVariableBase.

Definition at line 57 of file MooseBase.h.

Referenced by AddElementalFieldAction::act(), CopyNodalVarsAction::act(), AdaptivityAction::act(), AddTimeStepperAction::act(), DeprecatedBlockAction::act(), SetupTimeIntegratorAction::act(), AddActionComponentAction::act(), DisplayGhostingAction::act(), MaterialOutputAction::act(), AddPeriodicBCAction::act(), FEProblemBase::addAnyRedistributers(), Executioner::addAttributeReporter(), MFEMProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), MFEMProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), PhysicsComponentInterface::addComponent(), FEProblemBase::addConstraint(), FEProblemBase::addConvergence(), FEProblemBase::addDamper(), Registry::addDataFilePath(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), MFEMProblem::addFESpace(), MFEMProblem::addFunction(), FEProblemBase::addFunction(), SubProblem::addFunctor(), MFEMProblem::addFunctorMaterial(), FEProblemBase::addFunctorMaterial(), FunctorMaterial::addFunctorProperty(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblemBase::addFVBC(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVKernel(), ADDGKernel::ADDGKernel(), FEProblemBase::addHDGKernel(), FEProblemBase::addIndicator(), MFEMProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), MFEMProblem::addKernel(), FEProblemBase::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), ComponentMaterialPropertyInterface::addMaterials(), FEProblemBase::addMeshDivision(), MooseApp::addMeshGenerator(), ComponentMeshTransformHelper::addMeshGenerators(), CylinderComponent::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMPreconditioner(), MFEMProblem::addMFEMSolver(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), ComponentPhysicsInterface::addPhysics(), SubProblem::addPiecewiseByBlockLambdaFunctor(), MFEMProblem::addPostprocessor(), FEProblemBase::addPostprocessor(), InitialConditionBase::addPostprocessorDependencyHelper(), UserObject::addPostprocessorDependencyHelper(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), MFEMProblem::addTransfer(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), InitialConditionBase::addUserObjectDependencyHelper(), UserObject::addUserObjectDependencyHelper(), AuxKernelTempl< Real >::addUserObjectDependencyHelper(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), UserObject::addVectorPostprocessorDependencyHelper(), Output::advancedExecuteOn(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), MooseApp::appBinaryName(), MooseApp::appendMeshGenerator(), Registry::appNameFromAppPath(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayDGKernel::ArrayDGKernel(), PhysicsBase::assignBlocks(), AStableDirk4::AStableDirk4(), AuxKernelTempl< Real >::AuxKernelTempl(), Function::average(), MultiApp::backup(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), MFEMFESpace::buildFEC(), PiecewiseTabularBase::buildFromFile(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), MooseBase::callMooseError(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), PhysicsBase::checkBlockRestrictionIdentical(), PhysicsBase::checkComponentType(), ParsedConvergence::checkConvergence(), DefaultNonlinearConvergence::checkConvergence(), FEProblemBase::checkDependMaterialsHelper(), ReporterTransferInterface::checkHasReporterValue(), FEProblemBase::checkICRestartError(), Material::checkMaterialProperty(), MooseApp::checkMetaDataIntegrity(), Damper::checkMinDamping(), Checkpoint::checkpointInfo(), Coupleable::checkWritableVar(), CompositeFunction::CompositeFunction(), MaterialBase::computeProperties(), FEProblemBase::computeUserObjectByName(), VectorPostprocessorVisualizationAux::computeValue(), MooseBaseParameterInterface::connectControllableParams(), ConstantPostprocessor::ConstantPostprocessor(), CommonOutputAction::create(), MultiApp::createApp(), MooseApp::createExecutors(), MeshGeneratorSystem::createMeshGeneratorOrder(), MooseApp::createRecoverablePerfGraph(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), MaterialBase::declareADProperty(), MeshGenerator::declareMeshesForSubByName(), MeshGenerator::declareNullMeshName(), MaterialBase::declareProperty(), DOFMapOutput::demangle(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), Registry::determineDataFilePath(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DomainUserObject::DomainUserObject(), DumpObjectsProblem::dumpObjectHelper(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementMaterialSampler::ElementMaterialSampler(), ElementValueSampler::ElementValueSampler(), EigenKernel::enabled(), MooseMesh::errorIfDistributedMesh(), MooseBase::errorPrefix(), SolutionUserObjectBase::evalMeshFunction(), SolutionUserObjectBase::evalMeshFunctionGradient(), SolutionUserObjectBase::evalMultiValuedMeshFunction(), SolutionUserObjectBase::evalMultiValuedMeshFunctionGradient(), SideValueSampler::execute(), RestartableDataReporter::execute(), PointValue::execute(), MultiAppNearestNodeTransfer::execute(), WebServerControl::execute(), MultiAppGeneralFieldTransfer::execute(), ActionWarehouse::executeActionsWithAction(), Exodus::Exodus(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase::FEProblemBase(), MultiApp::fillPositions(), PointSamplerBase::finalize(), ChainControl::fullControlDataName(), FunctionDT::FunctionDT(), FunctionIC::functionName(), FVFunctionIC::functionName(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), MooseServer::gatherDocumentSymbols(), BoundaryDeletionGenerator::generate(), UniqueExtraIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), GeneratedMeshGenerator::generate(), BreakMeshByBlockGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), ParsedExtraElementIDGenerator::generate(), StitchedMeshGenerator::generate(), XYDelaunayGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), MeshGenerator::generateInternal(), InterfaceMaterial::getADMaterialProperty(), Material::getADMaterialProperty(), MultiAppTransfer::getAppInfo(), MultiApp::getBoundingBox(), MooseApp::getCheckpointDirectories(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), FEProblemBase::getConvergence(), Registry::getDataFilePath(), UserObject::getDependObjects(), DistributionInterface::getDistribution(), FEProblemBase::getDistribution(), DistributionInterface::getDistributionByName(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), MultiApp::getExecutioner(), MooseApp::getExecutor(), FEProblemBase::getExecutor(), OutputWarehouse::getFileNumbers(), FEProblemBase::getFunction(), SubProblem::getFunctor(), NodalPatchRecovery::getGenericMaterialProperty(), InterfaceMaterial::getGenericMaterialProperty(), Material::getGenericMaterialProperty(), AuxKernelTempl< Real >::getGenericMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialPropertyByName(), Material::getGenericOptionalMaterialProperty(), MaterialBase::getGenericZeroMaterialProperty(), MFEMProblem::getGridFunction(), SolutionUserObjectBase::getLocalVarIndex(), Marker::getMarkerValue(), Material::getMaterial(), FEProblemBase::getMaterial(), Material::getMaterialByName(), NodalPatchRecovery::getMaterialProperty(), InterfaceMaterial::getMaterialProperty(), Material::getMaterialProperty(), AuxKernelTempl< Real >::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), NodalPatchRecovery::getMaterialPropertyOld(), InterfaceMaterial::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), AuxKernelTempl< Real >::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOlder(), InterfaceMaterial::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), AuxKernelTempl< Real >::getMaterialPropertyOlder(), MFEMGeneralUserObject::getMatrixCoefficient(), MFEMGeneralUserObject::getMatrixCoefficientByName(), MeshGenerator::getMesh(), FEProblemBase::getMeshDivision(), MeshGenerator::getMeshesByName(), MooseApp::getMeshGenerator(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), ActionWarehouse::getMooseAppName(), MultiAppTransfer::getMultiApp(), InterfaceMaterial::getNeighborADMaterialProperty(), InterfaceMaterial::getNeighborMaterialProperty(), InterfaceMaterial::getNeighborMaterialPropertyOld(), InterfaceMaterial::getNeighborMaterialPropertyOlder(), MooseServer::getObjectParameters(), Material::getOptionalADMaterialProperty(), Material::getOptionalMaterialProperty(), Material::getOptionalMaterialPropertyOld(), Material::getOptionalMaterialPropertyOlder(), OutputWarehouse::getOutput(), MooseApp::getParam(), FEProblemBase::getPositionsObject(), FEProblemBase::getPostprocessorValueByName(), ComponentMaterialPropertyInterface::getPropertyValue(), ReporterData::getReporterInfo(), MooseApp::getRestartableDataMap(), MooseApp::getRestartableDataMapName(), MooseApp::getRestartableMetaData(), FEProblemBase::getSampler(), MFEMGeneralUserObject::getScalarCoefficient(), MFEMGeneralUserObject::getScalarCoefficientByName(), TransientBase::getTimeStepperName(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), MFEMGeneralUserObject::getVectorCoefficient(), MFEMGeneralUserObject::getVectorCoefficientByName(), Terminator::handleMessage(), Control::hasControllableParameterByName(), FEProblemBase::hasConvergence(), FEProblemBase::hasFunction(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), MooseApp::hasMeshGenerator(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasPostprocessorValueByName(), MooseApp::hasRelationshipManager(), MooseApp::hasRestartableDataMap(), MooseApp::hasRestartableMetaData(), FEProblemBase::hasUserObject(), IterationAdaptiveDT::init(), AddVariableAction::init(), AdvancedOutput::init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), NestedDivision::initialize(), TransformedPositions::initialize(), JSONOutput::initialSetup(), SideFVFluxBCIntegral::initialSetup(), SolutionScalarAux::initialSetup(), MultiAppProjectionTransfer::initialSetup(), NodalVariableValue::initialSetup(), Console::initialSetup(), SolutionUserObjectBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), Function::integral(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MeshGenerator::isChildMeshGenerator(), MeshGenerator::isNullMeshName(), MooseApp::isParamValid(), MeshGenerator::isParentMeshGenerator(), LinearCombinationFunction::LinearCombinationFunction(), FEProblemBase::logAdd(), Marker::Marker(), MaterialBase::markMatPropRequested(), MatDiffusionBase< Real >::MatDiffusionBase(), Material::Material(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshGenerator::meshPropertyPrefix(), OutputWarehouse::mooseConsole(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalValueSampler::NodalValueSampler(), Registry::objData(), MeshGenerator::Comparator::operator()(), ProgressOutput::output(), DOFMapOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), ConsoleUtils::outputExecutionInformation(), MaterialOutputAction::outputHelper(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), TableOutput::outputReporter(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), ParsedCurveGenerator::ParsedCurveGenerator(), MooseServer::parseDocumentForDiagnostics(), ParsedODEKernel::ParsedODEKernel(), ComponentPhysicsInterface::physicsExists(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), MooseApp::possiblyLoadRestartableMetaData(), PhysicsBase::prefix(), MooseMesh::prepare(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), PerfGraphLivePrint::printStats(), MultiApp::readCommandLineArguments(), Receiver::Receiver(), Executor::Result::record(), AppFactory::reg(), Registry::registerObjectsTo(), FEProblemBase::registerRandomInterface(), MooseApp::registerRestartableDataMapName(), MooseApp::registerRestartableNameWithFilter(), GlobalParamsAction::remove(), MaterialBase::resetQpProperties(), MultiApp::restore(), ScalarComponentIC::ScalarComponentIC(), MultiApp::setAppOutputFileBase(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), GlobalParamsAction::setDoubleIndexParam(), OutputWarehouse::setFileNumbers(), GlobalParamsAction::setParam(), FEProblemBase::setPostprocessorValueByName(), FEProblemBase::setResidualObjectParamsAndLog(), GlobalParamsAction::setScalarParam(), MooseMesh::setSubdomainName(), GlobalParamsAction::setTripleIndexParam(), NodeSetsGeneratorBase::setup(), Split::setup(), SideSetsGeneratorBase::setup(), TransientMultiApp::setupApp(), GlobalParamsAction::setVectorParam(), FullSolveMultiApp::showStatusMessage(), SideSetExtruderGenerator::SideSetExtruderGenerator(), TransientMultiApp::solveStep(), UserObject::spatialValue(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), MaterialBase::storeBoundaryZeroMatProp(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), MaterialBase::storeSubdomainZeroMatProp(), SubProblem::storeSubdomainZeroMatProp(), MaterialBase::subdomainSetup(), TaggingInterface::TaggingInterface(), VectorPostprocessorVisualizationAux::timestepSetup(), to_json(), MultiAppDofCopyTransfer::transfer(), TransientMultiApp::TransientMultiApp(), MooseServer::traverseParseTreeAndFillSymbols(), MooseBase::typeAndName(), MooseBaseParameterInterface::uniqueParameterName(), FVFluxBC::uOnGhost(), FVFluxBC::uOnUSub(), UserObject::UserObject(), UserObjectInterface::userObjectName(), ParsedAux::validateGenericVectorNames(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), Convergence::verboseOutput(), AdvancedOutput::wantOutput(), Coupleable::writableCoupledValue(), Coupleable::writableVariable(), Console::write(), and MooseApp::writeRestartableMetaData().

57 { return _name; }
const std::string _name
The name of this class.
Definition: MooseBase.h:90

◆ needBoundaryMaterialOnSide()

bool FEProblemBase::needBoundaryMaterialOnSide ( BoundaryID  bnd_id,
const THREAD_ID  tid 
)
inherited

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 8659 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onBoundary(), and ProjectMaterialProperties::onBoundary().

8660 {
8661  if (_bnd_mat_side_cache[tid].find(bnd_id) == _bnd_mat_side_cache[tid].end())
8662  {
8663  auto & bnd_mat_side_cache = _bnd_mat_side_cache[tid][bnd_id];
8664  bnd_mat_side_cache = false;
8665 
8666  if (_aux->needMaterialOnSide(bnd_id))
8667  {
8668  bnd_mat_side_cache = true;
8669  return true;
8670  }
8671  else
8672  for (auto & nl : _nl)
8673  if (nl->needBoundaryMaterialOnSide(bnd_id, tid))
8674  {
8675  bnd_mat_side_cache = true;
8676  return true;
8677  }
8678 
8679  if (theWarehouse()
8680  .query()
8681  .condition<AttribThread>(tid)
8682  .condition<AttribInterfaces>(Interfaces::SideUserObject)
8683  .condition<AttribBoundaries>(bnd_id)
8684  .count() > 0)
8685  {
8686  bnd_mat_side_cache = true;
8687  return true;
8688  }
8689  }
8690 
8691  return _bnd_mat_side_cache[tid][bnd_id];
8692 }
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
Cache for calculating materials on side.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
TheWarehouse & theWarehouse() const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
AttribBoundaries tracks all boundary IDs associated with an object.
Definition: Attributes.h:188
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ needFV()

virtual void FEProblemBase::needFV ( )
inlineoverridevirtualinherited

marks this problem as including/needing finite volume functionality.

Implements SubProblem.

Definition at line 2467 of file FEProblemBase.h.

Referenced by DiffusionFV::initializePhysicsAdditional(), and DisplacedProblem::needFV().

2467 { _have_fv = true; }
bool _have_fv
Whether we are performing some calculations with finite volume discretizations.

◆ needInterfaceMaterialOnSide()

bool FEProblemBase::needInterfaceMaterialOnSide ( BoundaryID  bnd_id,
const THREAD_ID  tid 
)
inherited

Definition at line 8695 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInterface().

8696 {
8697  if (_interface_mat_side_cache[tid].find(bnd_id) == _interface_mat_side_cache[tid].end())
8698  {
8699  auto & interface_mat_side_cache = _interface_mat_side_cache[tid][bnd_id];
8700  interface_mat_side_cache = false;
8701 
8702  for (auto & nl : _nl)
8703  if (nl->needInterfaceMaterialOnSide(bnd_id, tid))
8704  {
8705  interface_mat_side_cache = true;
8706  return true;
8707  }
8708 
8709  if (theWarehouse()
8710  .query()
8711  .condition<AttribThread>(tid)
8712  .condition<AttribInterfaces>(Interfaces::InterfaceUserObject)
8713  .condition<AttribBoundaries>(bnd_id)
8714  .count() > 0)
8715  {
8716  interface_mat_side_cache = true;
8717  return true;
8718  }
8719  else if (_interface_materials.hasActiveBoundaryObjects(bnd_id, tid))
8720  {
8721  interface_mat_side_cache = true;
8722  return true;
8723  }
8724  }
8725  return _interface_mat_side_cache[tid][bnd_id];
8726 }
MaterialWarehouse _interface_materials
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
TheWarehouse & theWarehouse() const
AttribBoundaries tracks all boundary IDs associated with an object.
Definition: Attributes.h:188
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
std::vector< std::unordered_map< BoundaryID, bool > > _interface_mat_side_cache
Cache for calculating materials on interface.

◆ needSolutionState()

void FEProblemBase::needSolutionState ( unsigned int  oldest_needed,
Moose::SolutionIterationType  iteration_type 
)
inherited

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 705 of file FEProblemBase.C.

Referenced by FEProblemBase::createTagSolutions().

707 {
708  for (const auto i : make_range((unsigned)0, oldest_needed))
709  {
710  for (auto & sys : _solver_systems)
711  sys->needSolutionState(i, iteration_type);
712  _aux->needSolutionState(i, iteration_type);
713  }
714 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
IntRange< T > make_range(T beg, T end)

◆ needsPreviousNewtonIteration() [1/2]

void FEProblemBase::needsPreviousNewtonIteration ( bool  state)
inherited

Set a flag that indicated that user required values for the previous Newton iterate.

Definition at line 8764 of file FEProblemBase.C.

Referenced by Coupleable::coupledGradientPreviousNL(), Coupleable::coupledNodalValuePreviousNL(), Coupleable::coupledSecondPreviousNL(), Coupleable::coupledValuePreviousNL(), and NonlinearSystem::solve().

8765 {
8767  mooseError("Previous nonlinear solution is required but not added through "
8768  "Problem/previous_nl_solution_required=true");
8769 }
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:28

◆ needsPreviousNewtonIteration() [2/2]

bool FEProblemBase::needsPreviousNewtonIteration ( ) const
inherited

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 8758 of file FEProblemBase.C.

8759 {
8761 }
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:28

◆ needSubdomainMaterialOnSide()

bool FEProblemBase::needSubdomainMaterialOnSide ( SubdomainID  subdomain_id,
const THREAD_ID  tid 
)
inherited

Definition at line 8729 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::subdomainChanged(), and ProjectMaterialProperties::subdomainChanged().

8730 {
8731  if (_block_mat_side_cache[tid].find(subdomain_id) == _block_mat_side_cache[tid].end())
8732  {
8733  _block_mat_side_cache[tid][subdomain_id] = false;
8734 
8735  for (auto & nl : _nl)
8736  if (nl->needSubdomainMaterialOnSide(subdomain_id, tid))
8737  {
8738  _block_mat_side_cache[tid][subdomain_id] = true;
8739  return true;
8740  }
8741 
8742  if (theWarehouse()
8743  .query()
8744  .condition<AttribThread>(tid)
8745  .condition<AttribInterfaces>(Interfaces::InternalSideUserObject)
8746  .condition<AttribSubdomains>(subdomain_id)
8747  .count() > 0)
8748  {
8749  _block_mat_side_cache[tid][subdomain_id] = true;
8750  return true;
8751  }
8752  }
8753 
8754  return _block_mat_side_cache[tid][subdomain_id];
8755 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
TheWarehouse & theWarehouse() const
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
Cache for calculating materials on side.
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ needToAddDefaultMultiAppFixedPointConvergence()

bool FEProblemBase::needToAddDefaultMultiAppFixedPointConvergence ( ) const
inlineinherited

Returns true if the problem needs to add the default fixed point convergence.

Definition at line 642 of file FEProblemBase.h.

643  {
645  }
bool _need_to_add_default_multiapp_fixed_point_convergence
Flag that the problem needs to add the default fixed point convergence.

◆ needToAddDefaultNonlinearConvergence()

bool FEProblemBase::needToAddDefaultNonlinearConvergence ( ) const
inlineinherited

Returns true if the problem needs to add the default nonlinear convergence.

Definition at line 637 of file FEProblemBase.h.

638  {
640  }
bool _need_to_add_default_nonlinear_convergence
Flag that the problem needs to add the default nonlinear convergence.

◆ needToAddDefaultSteadyStateConvergence()

bool FEProblemBase::needToAddDefaultSteadyStateConvergence ( ) const
inlineinherited

Returns true if the problem needs to add the default steady-state detection convergence.

Definition at line 647 of file FEProblemBase.h.

648  {
650  }
bool _need_to_add_default_steady_state_convergence
Flag that the problem needs to add the default steady convergence.

◆ neighborSubdomainSetup()

void FEProblemBase::neighborSubdomainSetup ( SubdomainID  subdomain,
const THREAD_ID  tid 
)
virtualinherited

Definition at line 2478 of file FEProblemBase.C.

Referenced by ThreadedFaceLoop< RangeType >::neighborSubdomainChanged().

2479 {
2480  _all_materials.neighborSubdomainSetup(subdomain, tid);
2481 }
virtual void neighborSubdomainSetup(THREAD_ID tid=0) const
MaterialWarehouse _all_materials

◆ newAssemblyArray()

void FEProblemBase::newAssemblyArray ( std::vector< std::shared_ptr< SolverSystem >> &  solver_systems)
virtualinherited

Definition at line 717 of file FEProblemBase.C.

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

718 {
719  unsigned int n_threads = libMesh::n_threads();
720 
721  _assembly.resize(n_threads);
722  for (const auto i : make_range(n_threads))
723  {
724  _assembly[i].resize(solver_systems.size());
725  for (const auto j : index_range(solver_systems))
726  _assembly[i][j] = std::make_unique<Assembly>(*solver_systems[j], i);
727  }
728 }
unsigned int n_threads()
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
IntRange< T > make_range(T beg, T end)
auto index_range(const T &sizable)

◆ nlConverged()

bool SubProblem::nlConverged ( const unsigned int  nl_sys_num)
virtualinherited
Returns
whether the given nonlinear system nl_sys_num is converged.

Reimplemented in MFEMProblem.

Definition at line 716 of file SubProblem.C.

717 {
718  mooseAssert(nl_sys_num < numNonlinearSystems(),
719  "The nonlinear system number is higher than the number of systems we have!");
720  return solverSystemConverged(nl_sys_num);
721 }
virtual std::size_t numNonlinearSystems() const =0
virtual bool solverSystemConverged(const unsigned int sys_num)
Definition: SubProblem.h:100

◆ nLinearIterations()

unsigned int FEProblemBase::nLinearIterations ( const unsigned int  nl_sys_num) const
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 6560 of file FEProblemBase.C.

Referenced by PiecewiseLinearFromVectorPostprocessor::valueInternal().

6561 {
6562  return _nl[nl_sys_num]->nLinearIterations();
6563 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ nlSysNum()

unsigned int FEProblemBase::nlSysNum ( const NonlinearSystemName &  nl_sys_name) const
overridevirtualinherited
Returns
the nonlinear system number corresponding to the provided nl_sys_name

Implements SubProblem.

Definition at line 6291 of file FEProblemBase.C.

Referenced by DisplacedProblem::nlSysNum().

6292 {
6293  std::istringstream ss(nl_sys_name);
6294  unsigned int nl_sys_num;
6295  if (!(ss >> nl_sys_num) || !ss.eof())
6296  nl_sys_num = libmesh_map_find(_nl_sys_name_to_num, nl_sys_name);
6297 
6298  return nl_sys_num;
6299 }
std::map< NonlinearSystemName, unsigned int > _nl_sys_name_to_num
Map from nonlinear system name to number.

◆ nNonlinearIterations()

unsigned int FEProblemBase::nNonlinearIterations ( const unsigned int  nl_sys_num) const
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 6554 of file FEProblemBase.C.

Referenced by PiecewiseLinearFromVectorPostprocessor::valueInternal().

6555 {
6556  return _nl[nl_sys_num]->nNonlinearIterations();
6557 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ nonlocalCouplingEntries()

std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & FEProblemBase::nonlocalCouplingEntries ( const THREAD_ID  tid,
const unsigned int  nl_sys_num 
)
inherited

Definition at line 6148 of file FEProblemBase.C.

Referenced by ComputeFullJacobianThread::computeOnBoundary(), and ComputeFullJacobianThread::computeOnElement().

6149 {
6150  return _assembly[tid][nl_sys]->nonlocalCouplingEntries();
6151 }
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ nonlocalCouplingMatrix()

const libMesh::CouplingMatrix & FEProblemBase::nonlocalCouplingMatrix ( const unsigned  i) const
overridevirtualinherited
Returns
the nonlocal coupling matrix for the i'th nonlinear system

Implements SubProblem.

Definition at line 9391 of file FEProblemBase.C.

Referenced by DisplacedProblem::nonlocalCouplingMatrix().

9392 {
9393  return _nonlocal_cm[i];
9394 }
std::vector< libMesh::CouplingMatrix > _nonlocal_cm
nonlocal coupling matrix

◆ notifyWhenMeshChanges()

void FEProblemBase::notifyWhenMeshChanges ( MeshChangedInterface mci)
inherited

Register an object that derives from MeshChangedInterface to be notified when the mesh changes.

Definition at line 8199 of file FEProblemBase.C.

Referenced by MeshChangedInterface::MeshChangedInterface().

8200 {
8201  _notify_when_mesh_changes.push_back(mci);
8202 }
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
Objects to be notified when the mesh changes.

◆ notifyWhenMeshDisplaces()

void FEProblemBase::notifyWhenMeshDisplaces ( MeshDisplacedInterface mdi)
inherited

Register an object that derives from MeshDisplacedInterface to be notified when the displaced mesh gets updated.

Definition at line 8205 of file FEProblemBase.C.

Referenced by MeshDisplacedInterface::MeshDisplacedInterface().

8206 {
8207  _notify_when_mesh_displaces.push_back(mdi);
8208 }
std::vector< MeshDisplacedInterface * > _notify_when_mesh_displaces
Objects to be notified when the mesh displaces.

◆ numGridSteps()

void FEProblemBase::numGridSteps ( unsigned int  num_grid_steps)
inlineinherited

Set the number of steps in a grid sequences.

Definition at line 2224 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2224 { _num_grid_steps = num_grid_steps; }
unsigned int _num_grid_steps
Number of steps in a grid sequence.

◆ numLinearSystems()

virtual std::size_t FEProblemBase::numLinearSystems ( ) const
inlineoverridevirtualinherited

◆ numMatrixTags()

virtual unsigned int SubProblem::numMatrixTags ( ) const
inlinevirtualinherited

◆ numNonlinearSystems()

virtual std::size_t FEProblemBase::numNonlinearSystems ( ) const
inlineoverridevirtualinherited

◆ numSolverSystems()

virtual std::size_t FEProblemBase::numSolverSystems ( ) const
inlineoverridevirtualinherited

◆ numVectorTags()

unsigned int SubProblem::numVectorTags ( const Moose::VectorTagType  type = Moose::VECTOR_TAG_ANY) const
virtualinherited

The total number of tags, which can be limited to the tag type.

Reimplemented in DisplacedProblem.

Definition at line 195 of file SubProblem.C.

Referenced by NonlinearSystemBase::computeNodalBCs(), NonlinearSystemBase::computeResidualInternal(), ComputeResidualThread::determineObjectWarehouses(), MooseVariableDataBase< OutputType >::MooseVariableDataBase(), MooseVariableScalar::MooseVariableScalar(), DisplacedProblem::numVectorTags(), ComputeNodalKernelBcsThread::pre(), and ComputeNodalKernelsThread::pre().

196 {
197  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
198 
199  return getVectorTags(type).size();
200 }
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:172

◆ objectExecuteHelper()

template<typename T >
void FEProblemBase::objectExecuteHelper ( const std::vector< T *> &  objects)
staticinherited

Definition at line 3137 of file FEProblemBase.h.

3138 {
3139  for (T * obj_ptr : objects)
3140  obj_ptr->execute();
3141 }

◆ objectSetupHelper()

template<typename T >
void FEProblemBase::objectSetupHelper ( const std::vector< T *> &  objects,
const ExecFlagType exec_flag 
)
staticinherited

Helpers for calling the necessary setup/execute functions for the supplied objects.

Definition at line 3103 of file FEProblemBase.h.

3104 {
3105  if (exec_flag == EXEC_INITIAL)
3106  {
3107  for (T * obj_ptr : objects)
3108  obj_ptr->initialSetup();
3109  }
3110 
3111  else if (exec_flag == EXEC_TIMESTEP_BEGIN)
3112  {
3113  for (const auto obj_ptr : objects)
3114  obj_ptr->timestepSetup();
3115  }
3116  else if (exec_flag == EXEC_SUBDOMAIN)
3117  {
3118  for (const auto obj_ptr : objects)
3119  obj_ptr->subdomainSetup();
3120  }
3121 
3122  else if (exec_flag == EXEC_NONLINEAR)
3123  {
3124  for (const auto obj_ptr : objects)
3125  obj_ptr->jacobianSetup();
3126  }
3127 
3128  else if (exec_flag == EXEC_LINEAR)
3129  {
3130  for (const auto obj_ptr : objects)
3131  obj_ptr->residualSetup();
3132  }
3133 }
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:35
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:31
const ExecFlagType EXEC_SUBDOMAIN
Definition: Moose.C:46
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28

◆ onlyAllowDefaultNonlinearConvergence()

virtual bool FEProblemBase::onlyAllowDefaultNonlinearConvergence ( ) const
inlinevirtualinherited

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 691 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

691 { return false; }

◆ onTimestepBegin()

void FEProblemBase::onTimestepBegin ( )
overridevirtualinherited

Implements SubProblem.

Definition at line 6699 of file FEProblemBase.C.

Referenced by TransientBase::takeStep().

6700 {
6701  TIME_SECTION("onTimestepBegin", 2);
6702 
6703  for (auto & nl : _nl)
6704  nl->onTimestepBegin();
6705 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ onTimestepEnd()

void FEProblemBase::onTimestepEnd ( )
overridevirtualinherited

◆ outputStep()

void FEProblemBase::outputStep ( ExecFlagType  type)
virtualinherited

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 6662 of file FEProblemBase.C.

Referenced by TransientBase::endStep(), MFEMSteady::execute(), MFEMTransient::execute(), TransientBase::execute(), SteadyBase::execute(), Eigenvalue::execute(), InversePowerMethod::init(), NonlinearEigen::init(), EigenExecutionerBase::postExecute(), TransientBase::preExecute(), FixedPointSolve::solve(), TransientMultiApp::solveStep(), FixedPointSolve::solveStep(), and MFEMTransient::step().

6663 {
6664  TIME_SECTION("outputStep", 1, "Outputting");
6665 
6667 
6668  for (auto & sys : _solver_systems)
6669  sys->update();
6670  _aux->update();
6671 
6672  if (_displaced_problem)
6673  _displaced_problem->syncSolutions();
6675 
6677 }
void outputStep(ExecFlagType type)
Calls the outputStep method for each output object.
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
void setCurrentExecuteOnFlag(const ExecFlagType &)
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
std::shared_ptr< DisplacedProblem > _displaced_problem
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407

◆ paramError()

template<typename... Args>
void MooseBaseParameterInterface::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 255 of file MooseBaseParameterInterface.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), AutoCheckpointAction::act(), SetupDebugAction::act(), CommonOutputAction::act(), AddPeriodicBCAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), NEML2ModelExecutor::addGatheredParameter(), NEML2ModelExecutor::addGatheredVariable(), ADDGKernel::ADDGKernel(), CylinderComponent::addMeshGenerators(), AddPeriodicBCAction::AddPeriodicBCAction(), ReporterPointSource::addPoints(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADKernelTempl< T >::ADKernelTempl(), ADNodalKernel::ADNodalKernel(), ADPenaltyPeriodicSegmentalConstraint::ADPenaltyPeriodicSegmentalConstraint(), ADPeriodicSegmentalConstraint::ADPeriodicSegmentalConstraint(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), AdvectiveFluxAux::AdvectiveFluxAux(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), ArrayBodyForce::ArrayBodyForce(), ArrayDGKernel::ArrayDGKernel(), ArrayDGLowerDKernel::ArrayDGLowerDKernel(), ArrayDirichletBC::ArrayDirichletBC(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayIntegratedBC::ArrayIntegratedBC(), ArrayKernel::ArrayKernel(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), ArrayParsedAux::ArrayParsedAux(), ArrayPenaltyDirichletBC::ArrayPenaltyDirichletBC(), ArrayVacuumBC::ArrayVacuumBC(), ArrayVarReductionAux::ArrayVarReductionAux(), ParsedSubdomainIDsGenerator::assignElemSubdomainID(), AuxKernelTempl< Real >::AuxKernelTempl(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BlockDeletionGenerator::BlockDeletionGenerator(), BlockWeightedPartitioner::BlockWeightedPartitioner(), BoundsBase::BoundsBase(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BuildArrayVariableAux::BuildArrayVariableAux(), PiecewiseTabularBase::buildFromFile(), MFEMMesh::buildMesh(), CartesianGridDivision::CartesianGridDivision(), checkComponent(), MeshGenerator::checkGetMesh(), ComponentInitialConditionInterface::checkInitialConditionsAllRequested(), BatchMeshGeneratorAction::checkInputParameterType(), PhysicsBase::checkIntegrityEarly(), PostprocessorInterface::checkParam(), FEProblemBase::checkProblemIntegrity(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), Coupleable::checkVar(), MultiAppTransfer::checkVariable(), CircularBoundaryCorrectionGenerator::CircularBoundaryCorrectionGenerator(), CircularBoundaryCorrectionGenerator::circularCenterCalculator(), MultiAppGeneralFieldTransfer::closestToPosition(), CoarsenBlockGenerator::CoarsenBlockGenerator(), CombinerGenerator::CombinerGenerator(), ComponentInitialConditionInterface::ComponentInitialConditionInterface(), ComponentMaterialPropertyInterface::ComponentMaterialPropertyInterface(), CompositionDT::CompositionDT(), FunctorAux::computeValue(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), LibtorchNeuralNetControl::conditionalParameterError(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), ConstantVectorPostprocessor::ConstantVectorPostprocessor(), ContainsPointAux::ContainsPointAux(), CopyValueAux::CopyValueAux(), Coupleable::Coupleable(), CoupledForceTempl< is_ad >::CoupledForceTempl(), CoupledValueFunctionMaterialTempl< is_ad >::CoupledValueFunctionMaterialTempl(), MultiApp::createApp(), MeshGeneratorSystem::createMeshGenerator(), CylindricalGridDivision::CylindricalGridDivision(), ConstantReporter::declareConstantReporterValues(), AccumulateReporter::declareLateValues(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DGLowerDKernel::DGLowerDKernel(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementLengthAux::ElementLengthAux(), ElementLpNormAux::ElementLpNormAux(), ExtraIDIntegralVectorPostprocessor::elementValue(), ElementValueSampler::ElementValueSampler(), ElementVectorL2Error::ElementVectorL2Error(), EqualValueEmbeddedConstraintTempl< is_ad >::EqualValueEmbeddedConstraintTempl(), ReporterPointSource::errorCheck(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), ExtraElementIDAux::ExtraElementIDAux(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::FileMeshGenerator(), FillBetweenCurvesGenerator::FillBetweenCurvesGenerator(), FillBetweenSidesetsGenerator::FillBetweenSidesetsGenerator(), ReporterPointSource::fillPoint(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), InternalSideIndicatorBase::finalize(), 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(), FunctorPositions::FunctorPositions(), FunctorVectorElementalAuxTempl< is_ad >::FunctorVectorElementalAuxTempl(), FVAdvection::FVAdvection(), FVFluxBC::FVFluxBC(), FVInterfaceKernel::FVInterfaceKernel(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), FVTwoVarContinuityConstraint::FVTwoVarContinuityConstraint(), BoundaryDeletionGenerator::generate(), UniqueExtraIDMeshGenerator::generate(), ExtraNodesetGenerator::generate(), AddMetaDataGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), ElementsToTetrahedronsConverter::generate(), FillBetweenCurvesGenerator::generate(), FillBetweenSidesetsGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), BlockToMeshConverterGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), BlockDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), AdvancedExtruderGenerator::generate(), CircularBoundaryCorrectionGenerator::generate(), BreakMeshByElementGenerator::generate(), CombinerGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), ParsedCurveGenerator::generate(), ParsedExtraElementIDGenerator::generate(), StackGenerator::generate(), StitchedMeshGenerator::generate(), XYZDelaunayGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), CutMeshByLevelSetGeneratorBase::generate(), PatternedMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), GeneratedMeshGenerator::GeneratedMeshGenerator(), 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(), Sampler::getNextLocalRow(), FEProblemSolve::getParamFromNonlinearSystemVectorParam(), PostprocessorInterface::getPostprocessorNameInternal(), PostprocessorInterface::getPostprocessorValueInternal(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), UserObjectInterface::getUserObjectBase(), UserObjectInterface::getUserObjectName(), HFEMDirichletBC::HFEMDirichletBC(), AddVariableAction::init(), MultiApp::init(), DistributedPositions::initialize(), BlockWeightedPartitioner::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), PhysicsBase::initializePhysics(), JSONOutput::initialSetup(), MultiAppCloneReporterTransfer::initialSetup(), SolutionIC::initialSetup(), SideFVFluxBCIntegral::initialSetup(), ElementSubdomainModifierBase::initialSetup(), MultiAppVariableValueSamplePostprocessorTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), HistogramVectorPostprocessor::initialSetup(), ReferenceResidualConvergence::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), LibtorchControlValuePostprocessor::initialSetup(), MultiAppGeneralFieldTransfer::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(), MatrixSymmetryCheck::MatrixSymmetryCheck(), PatternedMeshGenerator::mergeSubdomainNameMaps(), MeshCollectionGenerator::MeshCollectionGenerator(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshDivisionAux::MeshDivisionAux(), MeshGenerator::MeshGenerator(), MeshGeneratorComponent::MeshGeneratorComponent(), MFEMGenericFunctorMaterial::MFEMGenericFunctorMaterial(), MFEMGenericFunctorVectorMaterial::MFEMGenericFunctorVectorMaterial(), MooseLinearVariableFV< Real >::MooseLinearVariableFV(), UserObjectInterface::mooseObjectError(), MoosePreconditioner::MoosePreconditioner(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MortarConstraintBase::MortarConstraintBase(), MortarNodalAuxKernelTempl< ComputeValueType >::MortarNodalAuxKernelTempl(), MultiApp::moveApp(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldNearestLocationTransfer::MultiAppGeneralFieldNearestLocationTransfer(), 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(), NestedDivision::NestedDivision(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), NodalValueSampler::NodalValueSampler(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), ParsedPostprocessor::ParsedPostprocessor(), PatternedMeshGenerator::PatternedMeshGenerator(), PenaltyPeriodicSegmentalConstraint::PenaltyPeriodicSegmentalConstraint(), PeriodicSegmentalConstraint::PeriodicSegmentalConstraint(), PIDTransientControl::PIDTransientControl(), PlaneDeletionGenerator::PlaneDeletionGenerator(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), PolyLineMeshGenerator::PolyLineMeshGenerator(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessor(), LibmeshPartitioner::prepareBlocksForSubdomainPartitioner(), ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux(), ProjectionAux::ProjectionAux(), PropertyReadFile::PropertyReadFile(), RandomIC::RandomIC(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObjectBase::readXda(), ReferenceResidualConvergence::ReferenceResidualConvergence(), RefineBlockGenerator::RefineBlockGenerator(), RefineSidesetGenerator::RefineSidesetGenerator(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), FEProblemBase::setLinearConvergenceNames(), FEProblemBase::setNonlinearConvergenceNames(), MooseMesh::setPartitioner(), NodeSetsGeneratorBase::setup(), SideSetsGeneratorBase::setup(), NEML2Action::setupDerivativeMappings(), NEML2Action::setupParameterDerivativeMappings(), TimeSequenceStepperBase::setupSequence(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideValueSampler::SideValueSampler(), SingleRankPartitioner::SingleRankPartitioner(), SphericalGridDivision::SphericalGridDivision(), SymmetryTransformGenerator::SymmetryTransformGenerator(), Terminator::Terminator(), TimeDerivativeAux::TimeDerivativeAux(), Transfer::Transfer(), TransformGenerator::TransformGenerator(), TransientMultiApp::TransientMultiApp(), ParsedCurveGenerator::tSectionSpaceDefiner(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), UserObject::UserObject(), Checkpoint::validateExecuteOn(), ParsedAux::validateGenericVectorNames(), ParsedMaterialBase::validateVectorNames(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), VolumeAux::VolumeAux(), WebServerControl::WebServerControl(), XYDelaunayGenerator::XYDelaunayGenerator(), XYMeshLineCutter::XYMeshLineCutter(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

256 {
257  Moose::show_trace = false;
258  _moose_base.callMooseError(paramErrorMsg(param, std::forward<Args>(args)...),
259  /* with_prefix = */ false);
260  Moose::show_trace = true;
261 }
bool show_trace
Set to true (the default) to print the stack trace with error and warning messages - false to omit it...
Definition: Moose.C:763
const MooseBase & _moose_base
The MooseBase object that inherits this class.
std::string paramErrorMsg(const std::string &param, Args... args) const
void callMooseError(std::string msg, const bool with_prefix) const
Calls moose error with the message msg.
Definition: MooseBase.C:33

◆ parameters()

const InputParameters& MooseBaseParameterInterface::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 62 of file MooseBaseParameterInterface.h.

Referenced by SetupDebugAction::act(), AddActionComponentAction::act(), CommonOutputAction::act(), Action::Action(), FEProblemBase::addAnyRedistributers(), MFEMProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), MFEMProblem::addAuxVariable(), DisplacedProblem::addAuxVariable(), MFEMProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addConvergence(), FEProblemBase::addDamper(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), FEProblemBase::addDefaultMultiAppFixedPointConvergence(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), FEProblemBase::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), FEProblemBase::addDefaultSteadyStateConvergence(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), MFEMProblem::addFESpace(), MFEMProblem::addFunction(), FEProblemBase::addFunction(), MFEMProblem::addFunctorMaterial(), FEProblemBase::addFunctorMaterial(), FEProblemBase::addFVBC(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVKernel(), MFEMProblem::addGridFunction(), FEProblemBase::addHDGKernel(), FEProblemBase::addIndicator(), MFEMProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), DiffusionPhysicsBase::addInitialConditions(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), MFEMProblem::addKernel(), FEProblemBase::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), addLineSearch(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMeshDivision(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), MFEMProblem::addMFEMPreconditioner(), MFEMProblem::addMFEMSolver(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addOutput(), MFEMProblem::addPostprocessor(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), MFEMProblem::addSubMesh(), FEProblemBase::addTimeIntegrator(), MFEMProblem::addTransfer(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), MFEMProblem::addVariable(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), Action::associateWithParameter(), AuxKernelTempl< Real >::AuxKernelTempl(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), MooseMesh::buildTypedMesh(), PostprocessorInterface::checkParam(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), SampledOutput::cloneMesh(), LibtorchNeuralNetControl::conditionalParameterError(), Console::Console(), CommonOutputAction::create(), MultiApp::createApp(), Postprocessor::declareValue(), DumpObjectsProblem::deduceNecessaryParameters(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::DumpObjectsProblem(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), ElementMaterialSampler::ElementMaterialSampler(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), Executor::Executor(), Exodus::Exodus(), FEProblem(), FEProblemBase::FEProblemBase(), FixedPointSolve::FixedPointSolve(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GapValueAux::GapValueAux(), ParsedSubdomainGeneratorBase::generate(), MooseBaseParameterInterface::getCheckedPointerParam(), ActionWarehouse::getCurrentActionName(), ExecutorInterface::getExecutor(), Material::getMaterial(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), UserObjectInterface::getUserObjectName(), VectorPostprocessorInterface::getVectorPostprocessorName(), GhostingUserObject::GhostingUserObject(), AttribSystem::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), FullSolveMultiApp::initialSetup(), FEProblemBase::initNullSpaceVectors(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MFEMCGSolver::MFEMCGSolver(), MFEMGMRESSolver::MFEMGMRESSolver(), MFEMHypreADS::MFEMHypreADS(), MFEMHypreAMS::MFEMHypreAMS(), MFEMHypreBoomerAMG::MFEMHypreBoomerAMG(), MFEMHypreFGMRES::MFEMHypreFGMRES(), MFEMHypreGMRES::MFEMHypreGMRES(), MFEMHyprePCG::MFEMHyprePCG(), MFEMOperatorJacobiSmoother::MFEMOperatorJacobiSmoother(), MFEMSuperLU::MFEMSuperLU(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiApp::MultiApp(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NodeFaceConstraint::NodeFaceConstraint(), OverlayMeshGenerator::OverlayMeshGenerator(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), NEML2Action::printSummary(), ProjectedStatefulMaterialStorageAction::processProperty(), PropertyReadFile::PropertyReadFile(), PseudoTimestep::PseudoTimestep(), RandomIC::RandomIC(), ReferenceResidualConvergence::ReferenceResidualConvergence(), InputParameterWarehouse::removeInputParameters(), setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), FEProblemBase::setResidualObjectParamsAndLog(), SideSetsGeneratorBase::setup(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), Moose::PetscSupport::storePetscOptions(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), Transfer::Transfer(), TransientBase::TransientBase(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

62 { return _pars; }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ paramInfo()

template<typename... Args>
void MooseBaseParameterInterface::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 272 of file MooseBaseParameterInterface.h.

Referenced by GridPartitioner::_do_partition(), ComboMarker::ComboMarker(), FunctorIC::FunctorIC(), and TransientMultiApp::TransientMultiApp().

273 {
274  mooseInfo(paramErrorMsg(param, std::forward<Args>(args)...));
275 }
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:369
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ paramWarning()

template<typename... Args>
void MooseBaseParameterInterface::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 265 of file MooseBaseParameterInterface.h.

Referenced by GridPartitioner::_do_partition(), EigenProblem::checkProblemIntegrity(), CombinerGenerator::copyIntoMesh(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), MultiAppNearestNodeTransfer::execute(), FEProblemSolve::FEProblemSolve(), UniqueExtraIDMeshGenerator::generate(), PlaneIDMeshGenerator::generate(), Terminator::initialSetup(), SampledOutput::initSample(), MooseMesh::MooseMesh(), FEProblemBase::setPreserveMatrixSparsityPattern(), and Terminator::Terminator().

266 {
267  mooseWarning(paramErrorMsg(param, std::forward<Args>(args)...));
268 }
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:336
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ parentOutputPositionChanged()

void FEProblemBase::parentOutputPositionChanged ( )
inherited

Calls parentOutputPositionChanged() on all sub apps.

Definition at line 4451 of file FEProblemBase.C.

Referenced by TransientBase::parentOutputPositionChanged().

4452 {
4453  for (const auto & it : _multi_apps)
4454  {
4455  const auto & objects = it.second.getActiveObjects();
4456  for (const auto & obj : objects)
4457  obj->parentOutputPositionChanged();
4458  }
4459 }
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.

◆ perfGraph()

PerfGraph & PerfGraphInterface::perfGraph ( )
inherited

Get the PerfGraph.

Definition at line 78 of file PerfGraphInterface.C.

Referenced by CommonOutputAction::act(), PerfGraphData::finalize(), and PerfGraphOutput::output().

79 {
80  return _pg_moose_app.perfGraph();
81 }
MooseApp & _pg_moose_app
The MooseApp that owns the PerfGraph.
PerfGraph & perfGraph()
Get the PerfGraph for this app.
Definition: MooseApp.h:172

◆ petscOptionsDatabase()

PetscOptions& FEProblemBase::petscOptionsDatabase ( )
inlineinherited

Definition at line 2142 of file FEProblemBase.h.

Referenced by Eigenvalue::prepareSolverOptions().

2142 { return _petsc_option_data_base; }
PetscOptions _petsc_option_data_base

◆ petscOptionsInserted()

bool& FEProblemBase::petscOptionsInserted ( )
inlineinherited

If PETSc options are already inserted.

Definition at line 2139 of file FEProblemBase.h.

Referenced by Eigenvalue::prepareSolverOptions().

2139 { return _is_petsc_options_inserted; }
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.

◆ possiblyRebuildGeomSearchPatches()

void FEProblemBase::possiblyRebuildGeomSearchPatches ( )
virtualinherited

Definition at line 7834 of file FEProblemBase.C.

Referenced by FEProblemBase::solve().

7835 {
7836  if (_displaced_problem) // Only need to do this if things are moving...
7837  {
7838  TIME_SECTION("possiblyRebuildGeomSearchPatches", 5, "Rebuilding Geometric Search Patches");
7839 
7840  switch (_mesh.getPatchUpdateStrategy())
7841  {
7842  case Moose::Never:
7843  break;
7844  case Moose::Iteration:
7845  // Update the list of ghosted elements at the start of the time step
7848 
7849  _displaced_problem->geomSearchData().updateGhostedElems();
7851 
7852  // The commands below ensure that the sparsity of the Jacobian matrix is
7853  // augmented at the start of the time step using neighbor nodes from the end
7854  // of the previous time step.
7855 
7857 
7858  // This is needed to reinitialize PETSc output
7860 
7861  break;
7862 
7863  case Moose::Auto:
7864  {
7865  Real max = _displaced_problem->geomSearchData().maxPatchPercentage();
7867 
7868  // If we haven't moved very far through the patch
7869  if (max < 0.4)
7870  break;
7871  }
7872  libmesh_fallthrough();
7873 
7874  // Let this fall through if things do need to be updated...
7875  case Moose::Always:
7876  // Flush output here to see the message before the reinitialization, which could take a
7877  // while
7878  _console << "\n\nUpdating geometric search patches\n" << std::endl;
7879 
7882 
7883  _displaced_problem->geomSearchData().clearNearestNodeLocators();
7885 
7887 
7888  // This is needed to reinitialize PETSc output
7890  }
7891  }
7892 }
virtual void initPetscOutputAndSomeSolverSettings()
Reinitialize PETSc output for proper linear/nonlinear iteration display.
void reinitBecauseOfGhostingOrNewGeomObjects(bool mortar_changed=false)
Call when it is possible that the needs for ghosted elements has changed.
const Parallel::Communicator & _communicator
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1093
auto max(const L &left, const R &right)
void updateGhostedElems()
Updates the list of ghosted elements at the start of each time step for the nonlinear iteration patch...
MooseMesh & _mesh
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void updateActiveSemiLocalNodeRange(std::set< dof_id_type > &ghosted_elems)
Clears the "semi-local" node list and rebuilds it.
Definition: MooseMesh.C:948
void max(const T &r, T &o, Request &req) const
std::shared_ptr< DisplacedProblem > _displaced_problem
GeometricSearchData _geometric_search_data
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
const Moose::PatchUpdateType & getPatchUpdateStrategy() const
Get the current patch update strategy.
Definition: MooseMesh.C:3408
void clearNearestNodeLocators()
Clear out the Penetration Locators so they will redo the search.
MooseMesh * _displaced_mesh

◆ postExecute()

void FEProblemBase::postExecute ( )
virtualinherited

Method called at the end of the simulation.

Definition at line 5466 of file FEProblemBase.C.

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

5467 {
5468  const auto & multi_apps = _multi_apps.getActiveObjects();
5469 
5470  for (const auto & multi_app : multi_apps)
5471  multi_app->postExecute();
5472 }
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...
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.

◆ predictorCleanup()

void FEProblemBase::predictorCleanup ( NumericVector< libMesh::Number > &  ghosted_solution)
virtualinherited

Perform cleanup tasks after application of predictor to solution vector.

Parameters
ghosted_solutionGhosted solution vector

Definition at line 7741 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::setInitialSolution().

7742 {
7743 }

◆ prepare() [1/2]

virtual void FEProblemBase::prepare ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtualinherited

◆ prepare() [2/2]

virtual void FEProblemBase::prepare ( const Elem *  elem,
unsigned int  ivar,
unsigned int  jvar,
const std::vector< dof_id_type > &  dof_indices,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

◆ prepareAssembly()

void FEProblemBase::prepareAssembly ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1802 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), NonlinearSystemBase::reinitNodeFace(), and NonlinearSystemBase::setConstraintSecondaryValues().

1803 {
1804  _assembly[tid][_current_nl_sys->number()]->prepare();
1806  _assembly[tid][_current_nl_sys->number()]->prepareNonlocal();
1807 
1809  {
1810  _displaced_problem->prepareAssembly(tid);
1812  _displaced_problem->prepareNonlocal(tid);
1813  }
1814 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ prepareFace()

void FEProblemBase::prepareFace ( const Elem elem,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1716 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onInterface(), and ComputeUserObjectsThread::onInternalSide().

1717 {
1718  for (auto & nl : _nl)
1719  nl->prepareFace(tid, true);
1720  _aux->prepareFace(tid, false);
1721 
1723  _displaced_problem->prepareFace(_displaced_mesh->elemPtr(elem->id()), tid);
1724 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
dof_id_type id() const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ prepareFaceShapes()

void FEProblemBase::prepareFaceShapes ( unsigned int  var,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2061 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onBoundary().

2062 {
2063  _assembly[tid][_current_nl_sys->number()]->copyFaceShapes(var);
2064 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ prepareMaterials()

void FEProblemBase::prepareMaterials ( const std::unordered_set< unsigned int > &  consumer_needed_mat_props,
const SubdomainID  blk_id,
const THREAD_ID  tid 
)
inherited

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 3962 of file FEProblemBase.C.

Referenced by ComputeMarkerThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), NonlinearThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

3965 {
3966  std::set<MooseVariableFEBase *> needed_moose_vars;
3967  std::unordered_set<unsigned int> needed_mat_props;
3968 
3969  if (_all_materials.hasActiveBlockObjects(blk_id, tid))
3970  {
3971  _all_materials.updateVariableDependency(needed_moose_vars, tid);
3972  _all_materials.updateBlockMatPropDependency(blk_id, needed_mat_props, tid);
3973  }
3974 
3975  const auto & ids = _mesh.getSubdomainBoundaryIds(blk_id);
3976  for (const auto id : ids)
3977  {
3978  _materials.updateBoundaryVariableDependency(id, needed_moose_vars, tid);
3979  _materials.updateBoundaryMatPropDependency(id, needed_mat_props, tid);
3980  }
3981 
3982  const auto & current_active_elemental_moose_variables = getActiveElementalMooseVariables(tid);
3983  needed_moose_vars.insert(current_active_elemental_moose_variables.begin(),
3984  current_active_elemental_moose_variables.end());
3985 
3986  needed_mat_props.insert(consumer_needed_mat_props.begin(), consumer_needed_mat_props.end());
3987 
3988  setActiveElementalMooseVariables(needed_moose_vars, tid);
3989  setActiveMaterialProperties(needed_mat_props, tid);
3990 }
void updateVariableDependency(std::set< MooseVariableFieldBase *> &needed_moose_vars, THREAD_ID tid=0) const
Update variable dependency vector.
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 hasActiveBlockObjects(THREAD_ID tid=0) const
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:3492
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
Definition: SubProblem.C:454
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFEBase *> &moose_vars, const THREAD_ID tid) override
Set the MOOSE variables to be reinited on each element.
MooseMesh & _mesh
void updateBoundaryMatPropDependency(std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0) const
void updateBlockMatPropDependency(SubdomainID id, std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0) const
void updateBoundaryVariableDependency(std::set< MooseVariableFieldBase *> &needed_moose_vars, THREAD_ID tid=0) const
MaterialWarehouse _all_materials
MaterialWarehouse _materials

◆ prepareNeighborShapes()

void FEProblemBase::prepareNeighborShapes ( unsigned int  var,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2067 of file FEProblemBase.C.

2068 {
2069  _assembly[tid][_current_nl_sys->number()]->copyNeighborShapes(var);
2070 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ preparePRefinement()

void SubProblem::preparePRefinement ( )
inherited

Prepare DofMap and Assembly classes with our p-refinement information.

Definition at line 1332 of file SubProblem.C.

Referenced by FEProblemBase::init().

1333 {
1334  std::unordered_set<FEFamily> disable_families;
1335  for (const auto & [family, flag] : _family_for_p_refinement)
1336  if (flag)
1337  disable_families.insert(family);
1338 
1339  for (const auto tid : make_range(libMesh::n_threads()))
1340  for (const auto s : make_range(numNonlinearSystems()))
1341  assembly(tid, s).havePRefinement(disable_families);
1342 
1343  auto & eq = es();
1344  for (const auto family : disable_families)
1345  for (const auto i : make_range(eq.n_systems()))
1346  {
1347  auto & system = eq.get_system(i);
1348  auto & dof_map = system.get_dof_map();
1349  for (const auto vg : make_range(system.n_variable_groups()))
1350  {
1351  const auto & var_group = system.variable_group(vg);
1352  if (var_group.type().family == family)
1353  dof_map.should_p_refine(vg, false);
1354  }
1355  }
1356 
1357  _have_p_refinement = true;
1358 }
unsigned int n_threads()
virtual libMesh::EquationSystems & es()=0
std::unordered_map< FEFamily, bool > _family_for_p_refinement
Indicate whether a family is disabled for p-refinement.
Definition: SubProblem.h:1205
void havePRefinement(const std::unordered_set< FEFamily > &disable_p_refinement_for_families)
Indicate that we have p-refinement.
Definition: Assembly.C:4864
bool _have_p_refinement
Whether p-refinement has been requested at any point during the simulation.
Definition: SubProblem.h:1202
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0

◆ prepareShapes()

void FEProblemBase::prepareShapes ( unsigned int  var,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2055 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onElement().

2056 {
2057  _assembly[tid][_current_nl_sys->number()]->copyShapes(var);
2058 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ preserveMatrixSparsityPattern()

bool FEProblemBase::preserveMatrixSparsityPattern ( ) const
inlineinherited

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 1960 of file FEProblemBase.h.

bool _preserve_matrix_sparsity_pattern
Whether to preserve the system matrix / Jacobian sparsity pattern, using 0-valued entries usually...

◆ projectInitialConditionOnCustomRange()

void FEProblemBase::projectInitialConditionOnCustomRange ( libMesh::ConstElemRange elem_range,
ConstBndNodeRange bnd_node_range 
)
inherited

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.

Definition at line 3686 of file FEProblemBase.C.

Referenced by ElementSubdomainModifierBase::applyIC(), and ActivateElementsUserObjectBase::initSolutions().

3688 {
3689  ComputeInitialConditionThread cic(*this);
3690  Threads::parallel_reduce(elem_range, cic);
3691 
3692  // Need to close the solution vector here so that boundary ICs take precendence
3693  for (auto & nl : _nl)
3694  nl->solution().close();
3695  _aux->solution().close();
3696 
3698  Threads::parallel_reduce(bnd_nodes, cbic);
3699 
3700  for (auto & nl : _nl)
3701  nl->solution().close();
3702  _aux->solution().close();
3703 
3704  // Also, load values into the SCALAR dofs
3705  // Note: We assume that all SCALAR dofs are on the
3706  // processor with highest ID
3707  if (processor_id() == (n_processors() - 1) && _scalar_ics.hasActiveObjects())
3708  {
3709  const auto & ics = _scalar_ics.getActiveObjects();
3710  for (const auto & ic : ics)
3711  {
3712  MooseVariableScalar & var = ic->variable();
3713  var.reinit();
3714 
3715  DenseVector<Number> vals(var.order());
3716  ic->compute(vals);
3717 
3718  const unsigned int n_SCALAR_dofs = var.dofIndices().size();
3719  for (unsigned int i = 0; i < n_SCALAR_dofs; i++)
3720  {
3721  const dof_id_type global_index = var.dofIndices()[i];
3722  var.sys().solution().set(global_index, vals(i));
3723  var.setValue(i, vals(i));
3724  }
3725  }
3726  }
3727 
3728  for (auto & nl : _nl)
3729  {
3730  nl->solution().close();
3731  nl->solution().localize(*nl->system().current_local_solution, nl->dofMap().get_send_list());
3732  }
3733 
3734  _aux->solution().close();
3735  _aux->solution().localize(*_aux->sys().current_local_solution, _aux->dofMap().get_send_list());
3736 }
NumericVector< Number > & solution()
Definition: SystemBase.h:195
void reinit(bool reinit_for_derivative_reordering=false)
Fill out the VariableValue arrays from the system solution vector.
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
ScalarInitialConditionWarehouse _scalar_ics
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
processor_id_type n_processors() const
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...
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void setValue(unsigned int i, Number value)
Set the nodal value for this variable (to keep everything up to date.
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
libMesh::Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
bool hasActiveObjects(THREAD_ID tid=0) const
Class for scalar variables (they are different).
virtual void set(const numeric_index_type i, const T value)=0
processor_id_type processor_id() const
SystemBase & sys()
Get the system this variable is part of.
uint8_t dof_id_type

◆ projectSolution()

void FEProblemBase::projectSolution ( )
inherited

Definition at line 3618 of file FEProblemBase.C.

Referenced by FEProblemBase::initialAdaptMesh(), and FEProblemBase::initialSetup().

3619 {
3620  TIME_SECTION("projectSolution", 2, "Projecting Initial Solutions")
3621 
3622  FloatingPointExceptionGuard fpe_guard(_app);
3623 
3624  ConstElemRange & elem_range = *_mesh.getActiveLocalElementRange();
3625  ComputeInitialConditionThread cic(*this);
3626  Threads::parallel_reduce(elem_range, cic);
3627 
3628  if (haveFV())
3629  {
3631  ElemInfoRange elem_info_range(_mesh.ownedElemInfoBegin(), _mesh.ownedElemInfoEnd());
3632 
3633  ComputeFVInitialConditionThread cfvic(*this);
3634  Threads::parallel_reduce(elem_info_range, cfvic);
3635  }
3636 
3637  // Need to close the solution vector here so that boundary ICs take precendence
3638  for (auto & nl : _nl)
3639  nl->solution().close();
3640  _aux->solution().close();
3641 
3642  // now run boundary-restricted initial conditions
3643  ConstBndNodeRange & bnd_nodes = *_mesh.getBoundaryNodeRange();
3645  Threads::parallel_reduce(bnd_nodes, cbic);
3646 
3647  for (auto & nl : _nl)
3648  nl->solution().close();
3649  _aux->solution().close();
3650 
3651  // Also, load values into the SCALAR dofs
3652  // Note: We assume that all SCALAR dofs are on the
3653  // processor with highest ID
3654  if (processor_id() == (n_processors() - 1) && _scalar_ics.hasActiveObjects())
3655  {
3656  const auto & ics = _scalar_ics.getActiveObjects();
3657  for (const auto & ic : ics)
3658  {
3659  MooseVariableScalar & var = ic->variable();
3660  var.reinit();
3661 
3662  DenseVector<Number> vals(var.order());
3663  ic->compute(vals);
3664 
3665  const unsigned int n_SCALAR_dofs = var.dofIndices().size();
3666  for (unsigned int i = 0; i < n_SCALAR_dofs; i++)
3667  {
3668  const dof_id_type global_index = var.dofIndices()[i];
3669  var.sys().solution().set(global_index, vals(i));
3670  var.setValue(i, vals(i));
3671  }
3672  }
3673  }
3674 
3675  for (auto & sys : _solver_systems)
3676  {
3677  sys->solution().close();
3678  sys->solution().localize(*sys->system().current_local_solution, sys->dofMap().get_send_list());
3679  }
3680 
3681  _aux->solution().close();
3682  _aux->solution().localize(*_aux->sys().current_local_solution, _aux->dofMap().get_send_list());
3683 }
NumericVector< Number > & solution()
Definition: SystemBase.h:195
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
void reinit(bool reinit_for_derivative_reordering=false)
Fill out the VariableValue arrays from the system solution vector.
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
Scope guard for starting and stopping Floating Point Exception Trapping.
elem_info_iterator ownedElemInfoBegin()
Iterators to owned faceInfo objects.
Definition: MooseMesh.C:1525
ScalarInitialConditionWarehouse _scalar_ics
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
processor_id_type n_processors() const
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...
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void setValue(unsigned int i, Number value)
Set the nodal value for this variable (to keep everything up to date.
MooseMesh & _mesh
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
libMesh::Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
bool hasActiveObjects(THREAD_ID tid=0) const
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
Class for scalar variables (they are different).
elem_info_iterator ownedElemInfoEnd()
Definition: MooseMesh.C:1533
virtual void set(const numeric_index_type i, const T value)=0
processor_id_type processor_id() const
SystemBase & sys()
Get the system this variable is part of.
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1286
uint8_t dof_id_type

◆ queryParam()

template<typename T >
const T * MooseBaseParameterInterface::queryParam ( const std::string &  name) const
inherited

Query a parameter for the object.

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 222 of file MooseBaseParameterInterface.h.

223 {
224  return isParamValid(name) ? &getParam<T>(name) : nullptr;
225 }
std::string name(const ElemQuality q)
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.

◆ registerRandomInterface()

void FEProblemBase::registerRandomInterface ( RandomInterface random_interface,
const std::string &  name 
)
inherited

Definition at line 8649 of file FEProblemBase.C.

Referenced by RandomInterface::setRandomResetFrequency().

8650 {
8651  auto insert_pair = moose_try_emplace(
8652  _random_data_objects, name, std::make_unique<RandomData>(*this, random_interface));
8653 
8654  auto random_data_ptr = insert_pair.first->second.get();
8655  random_interface.setRandomDataPointer(random_data_ptr);
8656 }
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:93
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
void setRandomDataPointer(RandomData *random_data)

◆ 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 53 of file PerfGraphInterface.C.

55 {
56  const auto timed_section_name = timedSectionName(section_name);
57  if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
58  return moose::internal::getPerfGraphRegistry().registerSection(timed_section_name, level);
59  else
60  return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
61 }
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID The name of the section.
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 64 of file PerfGraphInterface.C.

68 {
69  const auto timed_section_name = timedSectionName(section_name);
70  if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
72  timedSectionName(section_name), level, live_message, print_dots);
73  else
74  return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
75 }
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID The name of the section.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ 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)
protectedinherited

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 5101 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup(), FEProblemBase::meshChanged(), and FEProblemBase::possiblyRebuildGeomSearchPatches().

5102 {
5103  TIME_SECTION("reinitBecauseOfGhostingOrNewGeomObjects",
5104  3,
5105  "Reinitializing Because of Geometric Search Objects");
5106 
5107  // Need to see if _any_ processor has ghosted elems or geometry objects.
5108  bool needs_reinit = !_ghosted_elems.empty();
5109  needs_reinit = needs_reinit || !_geometric_search_data._nearest_node_locators.empty() ||
5110  (_mortar_data.hasObjects() && mortar_changed);
5111  needs_reinit =
5112  needs_reinit || (_displaced_problem &&
5113  (!_displaced_problem->geomSearchData()._nearest_node_locators.empty() ||
5114  (_mortar_data.hasDisplacedObjects() && mortar_changed)));
5115  _communicator.max(needs_reinit);
5116 
5117  if (needs_reinit)
5118  {
5119  // Call reinit to get the ghosted vectors correct now that some geometric search has been done
5120  es().reinit();
5121 
5122  if (_displaced_mesh)
5123  _displaced_problem->es().reinit();
5124  }
5125 }
const Parallel::Communicator & _communicator
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1093
bool hasObjects() const
Returns whether we have any active AutomaticMortarGeneration objects.
Definition: MortarData.h:104
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
virtual libMesh::EquationSystems & es() override
MortarData _mortar_data
void max(const T &r, T &o, Request &req) const
bool hasDisplacedObjects() const
Returns whether any of the AutomaticMortarGeneration objects are running on a displaced mesh...
Definition: MortarData.h:99
std::shared_ptr< DisplacedProblem > _displaced_problem
GeometricSearchData _geometric_search_data
MooseMesh * _displaced_mesh

◆ reinitDirac()

bool FEProblemBase::reinitDirac ( const Elem elem,
const THREAD_ID  tid 
)
overridevirtualinherited

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 2106 of file FEProblemBase.C.

Referenced by ComputeDiracThread::onElement().

2107 {
2108  std::vector<Point> & points = _dirac_kernel_info.getPoints()[elem].first;
2109 
2110  unsigned int n_points = points.size();
2111 
2112  if (n_points)
2113  {
2114  if (n_points > _max_qps)
2115  {
2116  _max_qps = n_points;
2117 
2122  unsigned int max_qpts = getMaxQps();
2123  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
2124  {
2125  // the highest available order in libMesh is 43
2126  _scalar_zero[tid].resize(FORTYTHIRD, 0);
2127  _zero[tid].resize(max_qpts, 0);
2128  _grad_zero[tid].resize(max_qpts, RealGradient(0.));
2129  _second_zero[tid].resize(max_qpts, RealTensor(0.));
2130  _vector_zero[tid].resize(max_qpts, RealGradient(0.));
2131  _vector_curl_zero[tid].resize(max_qpts, RealGradient(0.));
2132  }
2133  }
2134 
2135  for (const auto i : index_range(_nl))
2136  {
2137  _assembly[tid][i]->reinitAtPhysical(elem, points);
2138  _nl[i]->prepare(tid);
2139  }
2140  _aux->prepare(tid);
2141 
2142  reinitElem(elem, tid);
2143  }
2144 
2145  _assembly[tid][_current_nl_sys->number()]->prepare();
2147  _assembly[tid][_current_nl_sys->number()]->prepareNonlocal();
2148 
2149  bool have_points = n_points > 0;
2151  {
2152  have_points |= _displaced_problem->reinitDirac(_displaced_mesh->elemPtr(elem->id()), tid);
2154  _displaced_problem->prepareNonlocal(tid);
2155  }
2156 
2157  return have_points;
2158 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
unsigned int n_threads()
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
std::vector< VariableSecond > _second_zero
std::vector< VectorVariableCurl > _vector_curl_zero
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MultiPointMap & getPoints()
Returns a writeable reference to the _points container.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
dof_id_type id() const
virtual void reinitElem(const Elem *elem, const THREAD_ID tid) override
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::vector< VariableGradient > _grad_zero
std::vector< VariableValue > _scalar_zero
std::vector< VariableValue > _zero
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< VectorVariableValue > _vector_zero
unsigned int _max_qps
Maximum number of quadrature points used in the problem.
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1049
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh
unsigned int getMaxQps() const

◆ reinitElem()

void FEProblemBase::reinitElem ( const Elem elem,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2161 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), ComputeMarkerThread::onElement(), ComputeElemDampingThread::onElement(), ComputeIndicatorThread::onElement(), ComputeMaterialsObjectThread::onElement(), ComputeUserObjectsThread::onElement(), ComputeInitialConditionThread::operator()(), FEProblemBase::reinitDirac(), and FEProblemBase::reinitElemPhys().

2162 {
2163  for (auto & sys : _solver_systems)
2164  sys->reinitElem(elem, tid);
2165  _aux->reinitElem(elem, tid);
2166 
2168  _displaced_problem->reinitElem(_displaced_mesh->elemPtr(elem->id()), tid);
2169 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
dof_id_type id() const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ reinitElemFace() [1/2]

void FEProblemBase::reinitElemFace ( const Elem *  elem,
unsigned int  side,
BoundaryID  ,
const THREAD_ID  tid 
)
inherited

◆ reinitElemFace() [2/2]

virtual void FEProblemBase::reinitElemFace ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

◆ 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 
)
overridevirtualinherited

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 8976 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments().

8982 {
8983  SubProblem::reinitElemFaceRef(elem, side, tolerance, pts, weights, tid);
8984 
8985  if (_displaced_problem)
8986  _displaced_problem->reinitElemFaceRef(
8987  _displaced_mesh->elemPtr(elem->id()), side, tolerance, pts, weights, tid);
8988 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
dof_id_type id() const
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:882
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ reinitElemNeighborAndLowerD()

void FEProblemBase::reinitElemNeighborAndLowerD ( const Elem elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2347 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInternalSide(), and NonlinearThread::onInternalSide().

2350 {
2351  reinitNeighbor(elem, side, tid);
2352 
2353  const Elem * lower_d_elem = _mesh.getLowerDElem(elem, side);
2354  if (lower_d_elem && _mesh.interiorLowerDBlocks().count(lower_d_elem->subdomain_id()) > 0)
2355  reinitLowerDElem(lower_d_elem, tid);
2356  else
2357  {
2358  // with mesh refinement, lower-dimensional element might be defined on neighbor side
2359  auto & neighbor = _assembly[tid][0]->neighbor();
2360  auto & neighbor_side = _assembly[tid][0]->neighborSide();
2361  const Elem * lower_d_elem_neighbor = _mesh.getLowerDElem(neighbor, neighbor_side);
2362  if (lower_d_elem_neighbor &&
2363  _mesh.interiorLowerDBlocks().count(lower_d_elem_neighbor->subdomain_id()) > 0)
2364  {
2365  auto qps = _assembly[tid][0]->qPointsFaceNeighbor().stdVector();
2366  std::vector<Point> reference_points;
2367  FEMap::inverse_map(
2368  lower_d_elem_neighbor->dim(), lower_d_elem_neighbor, qps, reference_points);
2369  reinitLowerDElem(lower_d_elem_neighbor, tid, &reference_points);
2370  }
2371  }
2372 
2373  if (_displaced_problem &&
2375  _displaced_problem->reinitElemNeighborAndLowerD(
2376  _displaced_mesh->elemPtr(elem->id()), side, tid);
2377 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
const std::set< SubdomainID > & interiorLowerDBlocks() const
Definition: MooseMesh.h:1403
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
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:1698
dof_id_type id() const
MooseMesh & _mesh
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
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
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
subdomain_id_type subdomain_id() const
virtual unsigned short dim() const=0
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void reinitNeighbor(const Elem *elem, unsigned int side, const THREAD_ID tid) override
MooseMesh * _displaced_mesh

◆ reinitElemPhys()

void FEProblemBase::reinitElemPhys ( const Elem elem,
const std::vector< Point > &  phys_points_in_elem,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2172 of file FEProblemBase.C.

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute().

2175 {
2176  mooseAssert(_mesh.queryElemPtr(elem->id()) == elem,
2177  "Are you calling this method with a displaced mesh element?");
2178 
2179  for (const auto i : index_range(_solver_systems))
2180  {
2181  _assembly[tid][i]->reinitAtPhysical(elem, phys_points_in_elem);
2182  _solver_systems[i]->prepare(tid);
2183  _assembly[tid][i]->prepare();
2185  _assembly[tid][i]->prepareNonlocal();
2186  }
2187  _aux->prepare(tid);
2188 
2189  reinitElem(elem, tid);
2190 }
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
virtual Elem * queryElemPtr(const dof_id_type i)
Definition: MooseMesh.C:3120
dof_id_type id() const
virtual void reinitElem(const Elem *elem, const THREAD_ID tid) override
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
auto index_range(const T &sizable)

◆ 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 1284 of file SubProblem.C.

1285 {
1286  for (const auto nl : make_range(numNonlinearSystems()))
1287  assembly(tid, nl).reinitFVFace(fi);
1288 }
void reinitFVFace(const FaceInfo &fi)
Definition: Assembly.C:1860
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0

◆ 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 
)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 2220 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onBoundary(), NonlinearThread::prepareFace(), and FEProblemBase::reinitElemNeighborAndLowerD().

2224 {
2225  SubProblem::reinitLowerDElem(lower_d_elem, tid, pts, weights);
2226 
2228  _displaced_problem->reinitLowerDElem(
2229  _displaced_mesh->elemPtr(lower_d_elem->id()), tid, pts, weights);
2230 }
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:957
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
dof_id_type id() const
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ reinitMaterials()

void FEProblemBase::reinitMaterials ( SubdomainID  blk_id,
const THREAD_ID  tid,
bool  swap_stateful = true 
)
inherited

Definition at line 3993 of file FEProblemBase.C.

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

3994 {
3995  if (hasActiveMaterialProperties(tid))
3996  {
3997  auto && elem = _assembly[tid][0]->elem();
3998  unsigned int n_points = _assembly[tid][0]->qRule()->n_points();
3999 
4000  auto & material_data = _material_props.getMaterialData(tid);
4001  material_data.resize(n_points);
4002 
4003  // Only swap if requested
4004  if (swap_stateful)
4005  material_data.swap(*elem);
4006 
4007  if (_discrete_materials.hasActiveBlockObjects(blk_id, tid))
4008  material_data.reset(_discrete_materials.getActiveBlockObjects(blk_id, tid));
4009 
4010  if (_materials.hasActiveBlockObjects(blk_id, tid))
4011  material_data.reinit(_materials.getActiveBlockObjects(blk_id, tid));
4012  }
4013 }
bool hasActiveBlockObjects(THREAD_ID tid=0) const
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
MaterialWarehouse _discrete_materials
const MaterialData & getMaterialData(const THREAD_ID tid) const
MaterialPropertyStorage & _material_props
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.
Definition: MaterialData.C:21
MaterialWarehouse _materials

◆ reinitMaterialsBoundary()

void FEProblemBase::reinitMaterialsBoundary ( BoundaryID  boundary_id,
const THREAD_ID  tid,
bool  swap_stateful = true,
const std::deque< MaterialBase *> *  reinit_mats = nullptr 
)
inherited

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

Definition at line 4086 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), and NonlinearThread::prepareFace().

4090 {
4091  if (hasActiveMaterialProperties(tid))
4092  {
4093  auto && elem = _assembly[tid][0]->elem();
4094  unsigned int side = _assembly[tid][0]->side();
4095  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4096 
4097  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4098  bnd_material_data.resize(n_points);
4099 
4100  if (swap_stateful && !bnd_material_data.isSwapped())
4101  bnd_material_data.swap(*elem, side);
4102 
4103  if (_discrete_materials.hasActiveBoundaryObjects(boundary_id, tid))
4104  bnd_material_data.reset(_discrete_materials.getActiveBoundaryObjects(boundary_id, tid));
4105 
4106  if (reinit_mats)
4107  bnd_material_data.reinit(*reinit_mats);
4108  else if (_materials.hasActiveBoundaryObjects(boundary_id, tid))
4109  bnd_material_data.reinit(_materials.getActiveBoundaryObjects(boundary_id, tid));
4110  }
4111 }
MaterialPropertyStorage & _bnd_material_props
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
MaterialWarehouse _discrete_materials
const MaterialData & getMaterialData(const THREAD_ID tid) const
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.
Definition: MaterialData.C:21
MaterialWarehouse _materials

◆ reinitMaterialsFace()

void FEProblemBase::reinitMaterialsFace ( SubdomainID  blk_id,
const THREAD_ID  tid,
bool  swap_stateful = true,
const std::deque< MaterialBase *> *  reinit_mats = nullptr 
)
inherited

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
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

Definition at line 4016 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and NonlinearThread::prepareFace().

4020 {
4021  if (hasActiveMaterialProperties(tid))
4022  {
4023  auto && elem = _assembly[tid][0]->elem();
4024  unsigned int side = _assembly[tid][0]->side();
4025  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4026 
4027  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4028  bnd_material_data.resize(n_points);
4029 
4030  if (swap_stateful && !bnd_material_data.isSwapped())
4031  bnd_material_data.swap(*elem, side);
4032 
4033  if (_discrete_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4034  bnd_material_data.reset(
4035  _discrete_materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4036 
4037  if (reinit_mats)
4038  bnd_material_data.reinit(*reinit_mats);
4039  else if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4040  bnd_material_data.reinit(
4041  _materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4042  }
4043 }
MaterialPropertyStorage & _bnd_material_props
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
MaterialWarehouse _discrete_materials
const MaterialData & getMaterialData(const THREAD_ID tid) const
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.
Definition: MaterialData.C:21
MaterialWarehouse _materials

◆ reinitMaterialsInterface()

void FEProblemBase::reinitMaterialsInterface ( BoundaryID  boundary_id,
const THREAD_ID  tid,
bool  swap_stateful = true 
)
inherited

Definition at line 4114 of file FEProblemBase.C.

Referenced by NonlinearThread::onInterface(), and ComputeUserObjectsThread::onInterface().

4117 {
4118  if (hasActiveMaterialProperties(tid))
4119  {
4120  const Elem * const & elem = _assembly[tid][0]->elem();
4121  unsigned int side = _assembly[tid][0]->side();
4122  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4123 
4124  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4125  bnd_material_data.resize(n_points);
4126 
4127  if (swap_stateful && !bnd_material_data.isSwapped())
4128  bnd_material_data.swap(*elem, side);
4129 
4130  if (_interface_materials.hasActiveBoundaryObjects(boundary_id, tid))
4131  bnd_material_data.reinit(_interface_materials.getActiveBoundaryObjects(boundary_id, tid));
4132  }
4133 }
MaterialPropertyStorage & _bnd_material_props
MaterialWarehouse _interface_materials
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
const MaterialData & getMaterialData(const THREAD_ID tid) const
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.
Definition: MaterialData.C:21

◆ reinitMaterialsNeighbor()

void FEProblemBase::reinitMaterialsNeighbor ( SubdomainID  blk_id,
const THREAD_ID  tid,
bool  swap_stateful = true,
const std::deque< MaterialBase *> *  reinit_mats = nullptr 
)
inherited

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
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

Definition at line 4046 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and NonlinearSystemBase::reinitNodeFace().

4050 {
4051  if (hasActiveMaterialProperties(tid))
4052  {
4053  // NOTE: this will not work with h-adaptivity
4054  // lindsayad: why not?
4055 
4056  const Elem * neighbor = _assembly[tid][0]->neighbor();
4057  unsigned int neighbor_side = neighbor->which_neighbor_am_i(_assembly[tid][0]->elem());
4058 
4059  mooseAssert(neighbor, "neighbor should be non-null");
4060  mooseAssert(blk_id == neighbor->subdomain_id(),
4061  "The provided blk_id " << blk_id << " and neighbor subdomain ID "
4062  << neighbor->subdomain_id() << " do not match.");
4063 
4064  unsigned int n_points = _assembly[tid][0]->qRuleNeighbor()->n_points();
4065 
4066  auto & neighbor_material_data = _neighbor_material_props.getMaterialData(tid);
4067  neighbor_material_data.resize(n_points);
4068 
4069  // Only swap if requested
4070  if (swap_stateful)
4071  neighbor_material_data.swap(*neighbor, neighbor_side);
4072 
4073  if (_discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4074  neighbor_material_data.reset(
4075  _discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4076 
4077  if (reinit_mats)
4078  neighbor_material_data.reinit(*reinit_mats);
4079  else if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4080  neighbor_material_data.reinit(
4081  _materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4082  }
4083 }
unsigned int which_neighbor_am_i(const Elem *e) const
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
MaterialWarehouse _discrete_materials
subdomain_id_type subdomain_id() const
MaterialPropertyStorage & _neighbor_material_props
const MaterialData & getMaterialData(const THREAD_ID tid) const
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.
Definition: MaterialData.C:21
MaterialWarehouse _materials

◆ 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 994 of file SubProblem.C.

Referenced by Moose::Mortar::loopOverMortarSegments().

995 {
996  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
997  assembly(tid, nl_sys_num).reinitMortarElem(elem);
998 }
void reinitMortarElem(const Elem *elem)
reinitialize a mortar segment mesh element in order to get a proper JxW
Definition: Assembly.C:2407
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0

◆ reinitMortarUserObjects()

void FEProblemBase::reinitMortarUserObjects ( BoundaryID  primary_boundary_id,
BoundaryID  secondary_boundary_id,
bool  displaced 
)
inherited

Call reinit on mortar user objects with matching primary boundary ID, secondary boundary ID, and displacement characteristics.

Definition at line 9241 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments().

9244 {
9245  const auto mortar_uos =
9246  getMortarUserObjects(primary_boundary_id, secondary_boundary_id, displaced);
9247  for (auto * const mortar_uo : mortar_uos)
9248  {
9249  mortar_uo->setNormals();
9250  mortar_uo->reinit();
9251  }
9252 }
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...

◆ reinitNeighbor()

void FEProblemBase::reinitNeighbor ( const Elem elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2308 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInterface(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and FEProblemBase::reinitElemNeighborAndLowerD().

2309 {
2310  setNeighborSubdomainID(elem, side, tid);
2311 
2312  const Elem * neighbor = elem->neighbor_ptr(side);
2313  unsigned int neighbor_side = neighbor->which_neighbor_am_i(elem);
2314 
2315  for (const auto i : index_range(_nl))
2316  {
2317  _assembly[tid][i]->reinitElemAndNeighbor(elem, side, neighbor, neighbor_side);
2318  _nl[i]->prepareNeighbor(tid);
2319  // Called during stateful material property evaluation outside of solve
2320  _assembly[tid][i]->prepareNeighbor();
2321  }
2322  _aux->prepareNeighbor(tid);
2323 
2324  for (auto & nl : _nl)
2325  {
2326  nl->reinitElemFace(elem, side, tid);
2327  nl->reinitNeighborFace(neighbor, neighbor_side, tid);
2328  }
2329  _aux->reinitElemFace(elem, side, tid);
2330  _aux->reinitNeighborFace(neighbor, neighbor_side, tid);
2331 
2333  {
2334  // There are cases like for cohesive zone modeling without significant sliding where we cannot
2335  // use FEInterface::inverse_map in Assembly::reinitElemAndNeighbor in the displaced problem
2336  // because the physical points coming from the element don't actually lie on the neighbor.
2337  // Moreover, what's the point of doing another physical point inversion in other cases? We only
2338  // care about the reference points which we can just take from the undisplaced computation
2339  const auto & displaced_ref_pts = _assembly[tid][0]->qRuleNeighbor()->get_points();
2340 
2341  _displaced_problem->reinitNeighbor(
2342  _displaced_mesh->elemPtr(elem->id()), side, tid, &displaced_ref_pts);
2343  }
2344 }
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
dof_id_type id() const
unsigned int which_neighbor_am_i(const Elem *e) const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
const Elem * neighbor_ptr(unsigned int i) const
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, const THREAD_ID tid) override
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh

◆ 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 
)
overridevirtualinherited

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 8991 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments().

8997 {
8998  SubProblem::reinitNeighborFaceRef(neighbor_elem, neighbor_side, tolerance, pts, weights, tid);
8999 
9000  if (_displaced_problem)
9001  _displaced_problem->reinitNeighborFaceRef(
9002  _displaced_mesh->elemPtr(neighbor_elem->id()), neighbor_side, tolerance, pts, weights, tid);
9003 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
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:921
dof_id_type id() const
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ reinitNeighborLowerDElem()

void SubProblem::reinitNeighborLowerDElem ( const Elem elem,
const THREAD_ID  tid = 0 
)
inherited

reinitialize a neighboring lower dimensional element

Definition at line 987 of file SubProblem.C.

Referenced by Moose::Mortar::loopOverMortarSegments().

988 {
989  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
990  assembly(tid, nl_sys_num).reinitNeighborLowerDElem(elem);
991 }
void reinitNeighborLowerDElem(const Elem *elem)
reinitialize a neighboring lower dimensional element
Definition: Assembly.C:2386
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0

◆ reinitNeighborPhys() [1/2]

virtual void FEProblemBase::reinitNeighborPhys ( const Elem *  neighbor,
unsigned int  neighbor_side,
const std::vector< Point > &  physical_points,
const THREAD_ID  tid 
)
overridevirtualinherited

◆ reinitNeighborPhys() [2/2]

virtual void FEProblemBase::reinitNeighborPhys ( const Elem *  neighbor,
const std::vector< Point > &  physical_points,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

◆ reinitNode()

void FEProblemBase::reinitNode ( const Node node,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2233 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), NonlinearSystemBase::computeResidualInternal(), ComputeNodalUserObjectsThread::onNode(), ComputeNodalDampingThread::onNode(), ComputeNodalKernelsThread::onNode(), and ComputeNodalKernelJacobiansThread::onNode().

2234 {
2236  _displaced_problem->reinitNode(&_displaced_mesh->nodeRef(node->id()), tid);
2237 
2238  for (const auto i : index_range(_nl))
2239  {
2240  _assembly[tid][i]->reinit(node);
2241  _nl[i]->reinitNode(node, tid);
2242  }
2243  _aux->reinitNode(node, tid);
2244 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:831
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
dof_id_type id() const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh

◆ reinitNodeFace()

void FEProblemBase::reinitNodeFace ( const Node node,
BoundaryID  bnd_id,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2247 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeNodalBCs(), NonlinearSystemBase::computeNodalBCsResidualAndJacobian(), NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), ComputeNodalKernelBcsThread::onNode(), ComputeNodalKernelBCJacobiansThread::onNode(), NonlinearSystemBase::reinitNodeFace(), NonlinearSystemBase::setConstraintSecondaryValues(), and NonlinearSystemBase::setInitialSolution().

2248 {
2250  _displaced_problem->reinitNodeFace(&_displaced_mesh->nodeRef(node->id()), bnd_id, tid);
2251 
2252  for (const auto i : index_range(_nl))
2253  {
2254  _assembly[tid][i]->reinit(node);
2255  _nl[i]->reinitNodeFace(node, bnd_id, tid);
2256  }
2257  _aux->reinitNodeFace(node, bnd_id, tid);
2258 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:831
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
dof_id_type id() const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
std::shared_ptr< DisplacedProblem > _displaced_problem
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh

◆ reinitNodes()

void FEProblemBase::reinitNodes ( const std::vector< dof_id_type > &  nodes,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2261 of file FEProblemBase.C.

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

2262 {
2264  _displaced_problem->reinitNodes(nodes, tid);
2265 
2266  for (auto & nl : _nl)
2267  nl->reinitNodes(nodes, tid);
2268  _aux->reinitNodes(nodes, tid);
2269 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ reinitNodesNeighbor()

void FEProblemBase::reinitNodesNeighbor ( const std::vector< dof_id_type > &  nodes,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2272 of file FEProblemBase.C.

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

2273 {
2275  _displaced_problem->reinitNodesNeighbor(nodes, tid);
2276 
2277  for (auto & nl : _nl)
2278  nl->reinitNodesNeighbor(nodes, tid);
2279  _aux->reinitNodesNeighbor(nodes, tid);
2280 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ reinitOffDiagScalars()

void FEProblemBase::reinitOffDiagScalars ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 2300 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians(), NonlinearSystemBase::constraintJacobians(), and NonlinearThread::onElement().

2301 {
2302  _assembly[tid][_current_nl_sys->number()]->prepareOffDiagScalar();
2303  if (_displaced_problem)
2304  _displaced_problem->reinitOffDiagScalars(tid);
2305 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ reinitScalars()

void FEProblemBase::reinitScalars ( const THREAD_ID  tid,
bool  reinit_for_derivative_reordering = false 
)
overridevirtualinherited

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 2283 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeResidualAndJacobian(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::computeResidualTags(), NonlinearSystemBase::computeScalarKernelsJacobians(), AuxiliarySystem::computeScalarVars(), and FEProblemBase::initialSetup().

2284 {
2285  TIME_SECTION("reinitScalars", 3, "Reinitializing Scalar Variables");
2286 
2288  _displaced_problem->reinitScalars(tid, reinit_for_derivative_reordering);
2289 
2290  for (auto & nl : _nl)
2291  nl->reinitScalars(tid, reinit_for_derivative_reordering);
2292  _aux->reinitScalars(tid, reinit_for_derivative_reordering);
2293 
2294  // This is called outside of residual/Jacobian call-backs
2295  for (auto & assembly : _assembly[tid])
2297 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void prepareScalar()
Definition: Assembly.C:2950
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ removeAlgebraicGhostingFunctor()

void SubProblem::removeAlgebraicGhostingFunctor ( libMesh::GhostingFunctor algebraic_gf)
inherited

Remove an algebraic ghosting functor from this problem's DofMaps.

Definition at line 1067 of file SubProblem.C.

1068 {
1069  EquationSystems & eq = es();
1070  const auto n_sys = eq.n_systems();
1071  DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1072 
1073  const bool found_in_root_sys =
1074  std::find(nl_dof_map.algebraic_ghosting_functors_begin(),
1075  nl_dof_map.algebraic_ghosting_functors_end(),
1076  &algebraic_gf) != nl_dof_map.algebraic_ghosting_functors_end();
1077 
1078 #ifndef NDEBUG
1079  const bool found_in_our_map =
1080  _root_alg_gf_to_sys_clones.find(&algebraic_gf) != _root_alg_gf_to_sys_clones.end();
1081  mooseAssert(found_in_root_sys == found_in_our_map,
1082  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1083  "it in our gf to clones map");
1084 #endif
1085 
1086  if (found_in_root_sys) // libMesh yells if we try to remove
1087  // something that's not there
1088  nl_dof_map.remove_algebraic_ghosting_functor(algebraic_gf);
1089 
1090  auto it = _root_alg_gf_to_sys_clones.find(&algebraic_gf);
1091  if (it == _root_alg_gf_to_sys_clones.end())
1092  return;
1093 
1094  auto & clones_vec = it->second;
1095  mooseAssert((n_sys - 1) == clones_vec.size(),
1096  "The size of the gf clones vector doesn't match the number of systems minus one");
1097  if (clones_vec.empty())
1098  {
1099  mooseAssert(n_sys == 1, "The clones vector should only be empty if there is only one system");
1100  return;
1101  }
1102 
1103  for (const auto i : make_range(n_sys))
1104  eq.get_system(i + 1).get_dof_map().remove_algebraic_ghosting_functor(*clones_vec[i]);
1105 
1106  _root_alg_gf_to_sys_clones.erase(it->first);
1107 }
unsigned int n_systems() const
const T_sys & get_system(std::string_view name) const
virtual libMesh::EquationSystems & es()=0
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.
Definition: SubProblem.h:1192
std::set< GhostingFunctor *>::const_iterator algebraic_ghosting_functors_end() const
IntRange< T > make_range(T beg, T end)
void remove_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor)
std::set< GhostingFunctor *>::const_iterator algebraic_ghosting_functors_begin() const

◆ removeCouplingGhostingFunctor()

void SubProblem::removeCouplingGhostingFunctor ( libMesh::GhostingFunctor coupling_gf)
inherited

Remove a coupling ghosting functor from this problem's DofMaps.

Definition at line 1110 of file SubProblem.C.

1111 {
1112  EquationSystems & eq = es();
1113  const auto num_nl_sys = numNonlinearSystems();
1114  if (!num_nl_sys)
1115  return;
1116 
1117  DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1118  const bool found_in_root_sys = std::find(nl_dof_map.coupling_functors_begin(),
1119  nl_dof_map.coupling_functors_end(),
1120  &coupling_gf) != nl_dof_map.coupling_functors_end();
1121 
1122 #ifndef NDEBUG
1123  const bool found_in_our_map =
1125  mooseAssert(found_in_root_sys == found_in_our_map,
1126  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1127  "it in our gf to clones map");
1128 #endif
1129 
1130  if (found_in_root_sys) // libMesh yells if we try to remove
1131  // something that's not there
1132  nl_dof_map.remove_coupling_functor(coupling_gf);
1133 
1134  auto it = _root_coupling_gf_to_sys_clones.find(&coupling_gf);
1135  if (it == _root_coupling_gf_to_sys_clones.end())
1136  return;
1137 
1138  auto & clones_vec = it->second;
1139  mooseAssert((num_nl_sys - 1) == clones_vec.size(),
1140  "The size of the gf clones vector doesn't match the number of systems minus one");
1141  if (clones_vec.empty())
1142  {
1143  mooseAssert(num_nl_sys == 1,
1144  "The clones vector should only be empty if there is only one nonlinear system");
1145  return;
1146  }
1147 
1148  for (const auto i : make_range(num_nl_sys))
1149  eq.get_system(i + 1).get_dof_map().remove_coupling_functor(*clones_vec[i]);
1150 
1151  _root_coupling_gf_to_sys_clones.erase(it->first);
1152 }
std::set< GhostingFunctor *>::const_iterator coupling_functors_begin() const
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.
Definition: SubProblem.h:1199
const T_sys & get_system(std::string_view name) const
virtual libMesh::EquationSystems & es()=0
void remove_coupling_functor(GhostingFunctor &coupling_functor)
IntRange< T > make_range(T beg, T end)
std::set< GhostingFunctor *>::const_iterator coupling_functors_end() const
virtual std::size_t numNonlinearSystems() const =0

◆ reportMooseObjectDependency()

void FEProblemBase::reportMooseObjectDependency ( MooseObject a,
MooseObject b 
)
inherited

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 5095 of file FEProblemBase.C.

5096 {
5097  //<< "Object " << a->name() << " -> " << b->name() << std::endl;
5098 }

◆ resetFailNextNonlinearConvergenceCheck()

void FEProblemBase::resetFailNextNonlinearConvergenceCheck ( )
inlineinherited

Tell the problem that the nonlinear convergence check(s) may proceed as normal.

Definition at line 2416 of file FEProblemBase.h.

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

void resetFailNextSystemConvergenceCheck()
Tell the problem that the system convergence check(s) may proceed as normal.

◆ resetFailNextSystemConvergenceCheck()

void FEProblemBase::resetFailNextSystemConvergenceCheck ( )
inlineinherited

Tell the problem that the system convergence check(s) may proceed as normal.

Definition at line 2418 of file FEProblemBase.h.

Referenced by Moose::PetscSupport::petscLinearConverged(), and FEProblemBase::resetFailNextNonlinearConvergenceCheck().

bool _fail_next_system_convergence_check

◆ residualSetup()

void FEProblemBase::residualSetup ( )
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 9141 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::residualSetup().

9142 {
9144  // We need to setup all the nonlinear systems other than our current one which actually called
9145  // this method (so we have to make sure we don't go in a circle)
9146  for (const auto i : make_range(numNonlinearSystems()))
9147  if (i != currentNlSysNum())
9148  _nl[i]->residualSetup();
9149  // We don't setup the aux sys because that's been done elsewhere
9150  if (_displaced_problem)
9151  _displaced_problem->residualSetup();
9152 }
virtual std::size_t numNonlinearSystems() const override
virtual void residualSetup()
Definition: SubProblem.C:1201
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
virtual unsigned int currentNlSysNum() const override
IntRange< T > make_range(T beg, T end)
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ resizeMaterialData()

void FEProblemBase::resizeMaterialData ( Moose::MaterialDataType  data_type,
unsigned int  nqp,
const THREAD_ID  tid 
)
inherited

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 9062 of file FEProblemBase.C.

9065 {
9066  getMaterialData(data_type, tid).resize(nqp);
9067 }
MPI_Datatype data_type
MaterialData & getMaterialData(Moose::MaterialDataType type, const THREAD_ID tid=0) const
void resize(unsigned int n_qpoints)
Resize the data to hold properties for n_qpoints quadrature points.
Definition: MaterialData.C:21

◆ 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 66 of file Restartable.C.

Referenced by Restartable::declareRecoverableData(), and Restartable::declareRestartableDataHelper().

67 {
68  return _restartable_system_name + "/" + _restartable_name + "/" + data_name;
69 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:243
const std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:230

◆ restoreMultiApps()

void FEProblemBase::restoreMultiApps ( ExecFlagType  type,
bool  force = false 
)
inherited

Restore the MultiApps associated with the ExecFlagType.

Parameters
forceForce restoration because something went wrong with the solve

Definition at line 5531 of file FEProblemBase.C.

Referenced by TransientBase::incrementStepOrReject(), and FixedPointSolve::solve().

5532 {
5533  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5534 
5535  if (multi_apps.size())
5536  {
5537  if (_verbose_multiapps)
5538  {
5539  if (force)
5540  _console << COLOR_CYAN << "\nRestoring Multiapps on " << type.name()
5541  << " because of solve failure!" << COLOR_DEFAULT << std::endl;
5542  else
5543  _console << COLOR_CYAN << "\nRestoring MultiApps on " << type.name() << COLOR_DEFAULT
5544  << std::endl;
5545  }
5546 
5547  for (const auto & multi_app : multi_apps)
5548  multi_app->restore(force);
5549 
5551 
5552  if (_verbose_multiapps)
5553  _console << COLOR_CYAN << "Finished Restoring MultiApps on " << type.name() << "\n"
5554  << COLOR_DEFAULT << std::endl;
5555  }
5556 }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
const Parallel::Communicator & _communicator
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 libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
Definition: MooseUtils.C:323
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ restoreOldSolutions()

void FEProblemBase::restoreOldSolutions ( )
virtualinherited

Restore old solutions from the backup vectors and deallocate them.

Definition at line 6652 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration().

6653 {
6654  TIME_SECTION("restoreOldSolutions", 5, "Restoring Old Solutions");
6655 
6656  for (auto & sys : _solver_systems)
6657  sys->restoreOldSolutions();
6658  _aux->restoreOldSolutions();
6659 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ restoreOriginalNonzeroPattern()

bool FEProblemBase::restoreOriginalNonzeroPattern ( ) const
inlineinherited
Returns
Whether the original matrix nonzero pattern is restored before each Jacobian assembly

Definition at line 1940 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::computeJacobianInternal().

const bool _restore_original_nonzero_pattern
Whether we should restore the original nonzero pattern for every Jacobian evaluation.

◆ restoreSolutions()

void FEProblemBase::restoreSolutions ( )
virtualinherited

Definition at line 6618 of file FEProblemBase.C.

Referenced by ActivateElementsUserObjectBase::initSolutions(), TimeStepper::rejectStep(), and FEProblemBase::updateMeshXFEM().

6619 {
6620  TIME_SECTION("restoreSolutions", 5, "Restoring Solutions");
6621 
6622  for (auto & sys : _solver_systems)
6623  {
6624  if (_verbose_restore)
6625  _console << "Restoring solutions on system " << sys->name() << "..." << std::endl;
6626  sys->restoreSolutions();
6627  }
6628 
6629  if (_verbose_restore)
6630  _console << "Restoring solutions on Auxiliary system..." << std::endl;
6631  _aux->restoreSolutions();
6632 
6633  if (_verbose_restore)
6634  _console << "Restoring postprocessor, vector-postprocessor, and reporter data..." << std::endl;
6636 
6637  if (_displaced_problem)
6638  _displaced_problem->updateMesh();
6639 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
bool _verbose_restore
Whether or not to be verbose on solution restoration post a failed time step.
ReporterData _reporter_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::shared_ptr< DisplacedProblem > _displaced_problem
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
void restoreState(bool verbose=false)
When a time step fails, this method is called to revert the current reporter values to their old stat...
Definition: ReporterData.C:24

◆ safeAccessTaggedMatrices()

virtual bool SubProblem::safeAccessTaggedMatrices ( ) const
inlinevirtualinherited

Is it safe to access the tagged matrices.

Reimplemented in DisplacedProblem.

Definition at line 731 of file SubProblem.h.

Referenced by MooseVariableScalar::reinit(), and DisplacedProblem::safeAccessTaggedMatrices().

bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
Definition: SubProblem.h:1108

◆ safeAccessTaggedVectors()

virtual bool SubProblem::safeAccessTaggedVectors ( ) const
inlinevirtualinherited

Is it safe to access the tagged vectors.

Reimplemented in DisplacedProblem.

Definition at line 734 of file SubProblem.h.

Referenced by MooseVariableScalar::reinit(), and DisplacedProblem::safeAccessTaggedVectors().

734 { return _safe_access_tagged_vectors; }
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1111

◆ saveOldSolutions()

void FEProblemBase::saveOldSolutions ( )
virtualinherited

Allocate vectors and save old solutions into them.

Definition at line 6642 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration().

6643 {
6644  TIME_SECTION("saveOldSolutions", 5, "Saving Old Solutions");
6645 
6646  for (auto & sys : _solver_systems)
6647  sys->saveOldSolutions();
6648  _aux->saveOldSolutions();
6649 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ 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 300 of file SubProblem.C.

Referenced by FEProblemBase::computeLinearSystemSys().

303 {
304  selected_tags.clear();
305  for (const auto & matrix_tag_pair : input_matrix_tags)
306  if (system.hasMatrix(matrix_tag_pair.second))
307  selected_tags.insert(matrix_tag_pair.second);
308 }
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351

◆ 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 289 of file SubProblem.C.

Referenced by FEProblemBase::computeLinearSystemSys(), FEProblemBase::computeResidualAndJacobian(), and ComputeResidualAndJacobianThread::determineObjectWarehouses().

292 {
293  selected_tags.clear();
294  for (const auto & vector_tag : input_vector_tags)
295  if (system.hasVector(vector_tag._id))
296  selected_tags.insert(vector_tag._id);
297 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907

◆ setActiveElementalMooseVariables()

void FEProblemBase::setActiveElementalMooseVariables ( const std::set< MooseVariableFEBase *> &  moose_vars,
const THREAD_ID  tid 
)
overridevirtualinherited

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 5810 of file FEProblemBase.C.

Referenced by FEProblemBase::prepareMaterials(), ComputeMarkerThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeDiracThread::subdomainChanged(), NonlinearThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

5812 {
5814 
5815  if (_displaced_problem)
5816  _displaced_problem->setActiveElementalMooseVariables(moose_vars, tid);
5817 }
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:443
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::setActiveFEVariableCoupleableMatrixTags ( std::set< TagID > &  mtags,
const THREAD_ID  tid 
)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5772 of file FEProblemBase.C.

5773 {
5775 
5776  if (_displaced_problem)
5777  _displaced_problem->setActiveFEVariableCoupleableMatrixTags(mtags, tid);
5778 }
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:363
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setActiveFEVariableCoupleableVectorTags()

void FEProblemBase::setActiveFEVariableCoupleableVectorTags ( std::set< TagID > &  vtags,
const THREAD_ID  tid 
)
overridevirtualinherited

◆ setActiveMaterialProperties()

void FEProblemBase::setActiveMaterialProperties ( const std::unordered_set< unsigned int > &  mat_prop_ids,
const THREAD_ID  tid 
)
inherited

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 5865 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), FEProblemBase::prepareMaterials(), NodalPatchRecovery::reinitPatch(), NonlinearSystemBase::setConstraintSecondaryValues(), and ComputeDiracThread::subdomainChanged().

5867 {
5868  // mark active properties in every material
5869  for (auto & mat : _all_materials.getObjects(tid))
5870  mat->setActiveProperties(mat_prop_ids);
5871  for (auto & mat : _all_materials[Moose::FACE_MATERIAL_DATA].getObjects(tid))
5872  mat->setActiveProperties(mat_prop_ids);
5873  for (auto & mat : _all_materials[Moose::NEIGHBOR_MATERIAL_DATA].getObjects(tid))
5874  mat->setActiveProperties(mat_prop_ids);
5875 
5876  _has_active_material_properties[tid] = !mat_prop_ids.empty();
5877 }
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...
std::vector< unsigned char > _has_active_material_properties
Whether there are active material properties on each thread.
MaterialWarehouse _all_materials

◆ setActiveScalarVariableCoupleableMatrixTags()

void FEProblemBase::setActiveScalarVariableCoupleableMatrixTags ( std::set< TagID > &  mtags,
const THREAD_ID  tid 
)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5790 of file FEProblemBase.C.

Referenced by AuxiliarySystem::setScalarVariableCoupleableTags().

5792 {
5794 
5795  if (_displaced_problem)
5796  _displaced_problem->setActiveScalarVariableCoupleableMatrixTags(mtags, tid);
5797 }
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:402
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::setActiveScalarVariableCoupleableVectorTags ( std::set< TagID > &  vtags,
const THREAD_ID  tid 
)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5800 of file FEProblemBase.C.

Referenced by AuxiliarySystem::setScalarVariableCoupleableTags().

5802 {
5804 
5805  if (_displaced_problem)
5806  _displaced_problem->setActiveScalarVariableCoupleableVectorTags(vtags, tid);
5807 }
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
Definition: SubProblem.C:409
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setAxisymmetricCoordAxis()

void FEProblemBase::setAxisymmetricCoordAxis ( const MooseEnum rz_coord_axis)
inherited

Definition at line 816 of file FEProblemBase.C.

Referenced by FEProblemBase::FEProblemBase().

817 {
818  _mesh.setAxisymmetricCoordAxis(rz_coord_axis);
819 }
MooseMesh & _mesh
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
For axisymmetric simulations, set the symmetry coordinate axis.
Definition: MooseMesh.C:4182

◆ setConstJacobian()

void FEProblemBase::setConstJacobian ( bool  state)
inlineinherited

Set flag that Jacobian is constant (for optimization purposes)

Parameters
stateTrue if the Jacobian is constant, false otherwise

Definition at line 1819 of file FEProblemBase.h.

Referenced by ExplicitEuler::preSolve(), ExplicitTVDRK2::preSolve(), and ExplicitRK2::preSolve().

1819 { _const_jacobian = state; }
bool _const_jacobian
true if the Jacobian is constant

◆ setCoordSystem()

void FEProblemBase::setCoordSystem ( const std::vector< SubdomainName > &  blocks,
const MultiMooseEnum coord_sys 
)
inherited

Definition at line 808 of file FEProblemBase.C.

Referenced by FEProblemBase::FEProblemBase().

810 {
811  TIME_SECTION("setCoordSystem", 5, "Setting Coordinate System");
812  _mesh.setCoordSystem(blocks, coord_sys);
813 }
char ** blocks
MooseMesh & _mesh
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:4076

◆ setCoupling()

void FEProblemBase::setCoupling ( Moose::CouplingType  type)
inherited

Set the coupling between variables TODO: allow user-defined coupling.

Parameters
typeType of coupling

Definition at line 6041 of file FEProblemBase.C.

Referenced by FEProblemBase::init(), FEProblemBase::setCouplingMatrix(), and Moose::SlepcSupport::setEigenProblemSolverParams().

6042 {
6044  {
6046  mooseError("Someone told us (the FEProblemBase) to trust the user coupling matrix, but we "
6047  "haven't been provided a coupling matrix!");
6048 
6049  // We've been told to trust the user coupling matrix, so we're going to leave things alone
6050  return;
6051  }
6052 
6053  _coupling = type;
6054 }
bool _trust_user_coupling_matrix
Whether to trust the user coupling matrix no matter what.
Moose::CouplingType _coupling
Type of variable coupling.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ setCouplingMatrix() [1/2]

void FEProblemBase::setCouplingMatrix ( std::unique_ptr< libMesh::CouplingMatrix cm,
const unsigned int  nl_sys_num 
)
inherited

Set custom coupling matrix.

Parameters
cmcoupling matrix to be set
nl_sys_numwhich nonlinear system we are setting the coupling matrix for

Definition at line 6065 of file FEProblemBase.C.

Referenced by MoosePreconditioner::setCouplingMatrix().

6066 {
6068  _cm[i] = std::move(cm);
6069 }
void setCoupling(Moose::CouplingType type)
Set the coupling between variables TODO: allow user-defined coupling.
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
Coupling matrix for variables.

◆ setCouplingMatrix() [2/2]

void FEProblemBase::setCouplingMatrix ( libMesh::CouplingMatrix cm,
const unsigned int  nl_sys_num 
)
inherited

Definition at line 6057 of file FEProblemBase.C.

6058 {
6059  // TODO: Deprecate method
6061  _cm[i].reset(cm);
6062 }
void setCoupling(Moose::CouplingType type)
Set the coupling between variables TODO: allow user-defined coupling.
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
Coupling matrix for variables.

◆ setCurrentAlgebraicBndNodeRange()

void FEProblemBase::setCurrentAlgebraicBndNodeRange ( ConstBndNodeRange range)
inherited

Definition at line 9358 of file FEProblemBase.C.

9359 {
9360  if (!range)
9361  {
9363  return;
9364  }
9365 
9366  _current_algebraic_bnd_node_range = std::make_unique<ConstBndNodeRange>(*range);
9367 }
std::unique_ptr< ConstBndNodeRange > _current_algebraic_bnd_node_range

◆ setCurrentAlgebraicElementRange()

void FEProblemBase::setCurrentAlgebraicElementRange ( libMesh::ConstElemRange range)
inherited

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 9336 of file FEProblemBase.C.

9337 {
9338  if (!range)
9339  {
9341  return;
9342  }
9343 
9344  _current_algebraic_elem_range = std::make_unique<ConstElemRange>(*range);
9345 }
std::unique_ptr< libMesh::ConstElemRange > _current_algebraic_elem_range

◆ setCurrentAlgebraicNodeRange()

void FEProblemBase::setCurrentAlgebraicNodeRange ( libMesh::ConstNodeRange range)
inherited

Definition at line 9347 of file FEProblemBase.C.

9348 {
9349  if (!range)
9350  {
9352  return;
9353  }
9354 
9355  _current_algebraic_node_range = std::make_unique<ConstNodeRange>(*range);
9356 }
std::unique_ptr< libMesh::ConstNodeRange > _current_algebraic_node_range

◆ setCurrentBoundaryID()

void FEProblemBase::setCurrentBoundaryID ( BoundaryID  bid,
const THREAD_ID  tid 
)
overridevirtualinherited

sets the current boundary ID in assembly

Reimplemented from SubProblem.

Definition at line 9272 of file FEProblemBase.C.

9273 {
9275  if (_displaced_problem)
9276  _displaced_problem->setCurrentBoundaryID(bid, tid);
9277 }
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid)
sets the current boundary ID in assembly
Definition: SubProblem.C:789
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setCurrentExecuteOnFlag()

void FEProblemBase::setCurrentExecuteOnFlag ( const ExecFlagType flag)
inherited

Definition at line 4550 of file FEProblemBase.C.

Referenced by FEProblemBase::execute(), FEProblemBase::initialSetup(), and FEProblemBase::outputStep().

4551 {
4552  _current_execute_on_flag = flag;
4553 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.

◆ setCurrentLinearSystem()

void FEProblemBase::setCurrentLinearSystem ( unsigned int  sys_num)
inherited

Set the current linear system pointer.

Parameters
sys_numThe number of linear system

Definition at line 9289 of file FEProblemBase.C.

Referenced by FEProblemBase::computeLinearSystemSys(), LinearSystem::computeLinearSystemTags(), and FEProblemBase::solveLinearSystem().

9290 {
9291  mooseAssert(sys_num < _linear_systems.size(),
9292  "System number greater than the number of linear systems");
9293  _current_linear_sys = _linear_systems[sys_num].get();
9295 }
LinearSystem * _current_linear_sys
The current linear system that we are solving.
SolverSystem * _current_solver_sys
The current solver system.
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ setCurrentLowerDElem()

void FEProblemBase::setCurrentLowerDElem ( const Elem *const  lower_d_elem,
const THREAD_ID  tid 
)
overridevirtualinherited

Set the current lower dimensional element.

This can be null

Reimplemented from SubProblem.

Definition at line 9263 of file FEProblemBase.C.

9264 {
9265  SubProblem::setCurrentLowerDElem(lower_d_elem, tid);
9266  if (_displaced_problem)
9267  _displaced_problem->setCurrentLowerDElem(
9268  lower_d_elem ? _displaced_mesh->elemPtr(lower_d_elem->id()) : nullptr, tid);
9269 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
virtual void setCurrentLowerDElem(const Elem *const lower_d_elem, const THREAD_ID tid)
Set the current lower dimensional element.
Definition: SubProblem.C:1380
dof_id_type id() const
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ 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 689 of file SubProblem.h.

Referenced by FEProblemBase::computeResidualAndJacobian(), and FEProblemBase::resetState().

690  {
691  _currently_computing_jacobian = currently_computing_jacobian;
692  }
bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.
Definition: SubProblem.h:1096

◆ setCurrentlyComputingResidual()

void FEProblemBase::setCurrentlyComputingResidual ( bool  currently_computing_residual)
finalvirtualinherited

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

Reimplemented from SubProblem.

Definition at line 8943 of file FEProblemBase.C.

Referenced by FEProblemBase::computeResidualAndJacobian(), NonlinearSystemBase::computeResidualTags(), and FEProblemBase::resetState().

8944 {
8945  if (_displaced_problem)
8946  _displaced_problem->setCurrentlyComputingResidual(currently_computing_residual);
8947  _currently_computing_residual = currently_computing_residual;
8948 }
std::shared_ptr< DisplacedProblem > _displaced_problem
bool _currently_computing_residual
Whether the residual is being evaluated.
Definition: SubProblem.h:1105

◆ 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 1493 of file SubProblem.h.

Referenced by FEProblemBase::computeResidualAndJacobian(), and FEProblemBase::resetState().

1495 {
1496  _currently_computing_residual_and_jacobian = currently_computing_residual_and_jacobian;
1497 }
bool _currently_computing_residual_and_jacobian
Flag to determine whether the problem is currently computing the residual and Jacobian.
Definition: SubProblem.h:1099

◆ setCurrentNonlinearSystem()

void FEProblemBase::setCurrentNonlinearSystem ( const unsigned int  nl_sys_num)
inherited

Definition at line 9280 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobian(), EigenProblem::computeJacobianAB(), EigenProblem::computeJacobianBlocks(), FEProblemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), EigenProblem::computeJacobianTag(), EigenProblem::computeMatricesTags(), EigenProblem::computeResidualTag(), NonlinearSystemBase::computeResidualTags(), FEProblem(), EigenProblem::solve(), and FEProblemBase::solve().

9281 {
9282  mooseAssert(nl_sys_num < _nl.size(),
9283  "System number greater than the number of nonlinear systems");
9284  _current_nl_sys = _nl[nl_sys_num].get();
9286 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
SolverSystem * _current_solver_sys
The current solver system.

◆ setCurrentResidualVectorTags()

void FEProblemBase::setCurrentResidualVectorTags ( const std::set< TagID > &  vector_tags)
inlineinherited

Set the current residual vector tag data structure based on the passed in tag IDs.

Definition at line 3284 of file FEProblemBase.h.

Referenced by FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualTags(), and CrankNicolson::init().

3285 {
3287 }
std::vector< VectorTag > _current_residual_vector_tags
A data member to store the residual vector tag(s) passed into computeResidualTag(s).
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:172

◆ setCurrentSubdomainID()

void FEProblemBase::setCurrentSubdomainID ( const Elem elem,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1763 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), ElementalVariableValue::execute(), and ComputeInitialConditionThread::operator()().

1764 {
1765  SubdomainID did = elem->subdomain_id();
1766  for (const auto i : index_range(_solver_systems))
1767  {
1768  _assembly[tid][i]->setCurrentSubdomainID(did);
1769  if (_displaced_problem &&
1771  _displaced_problem->assembly(tid, i).setCurrentSubdomainID(did);
1772  }
1773 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
subdomain_id_type subdomain_id() const
std::shared_ptr< DisplacedProblem > _displaced_problem
auto index_range(const T &sizable)

◆ setErrorOnJacobianNonzeroReallocation()

void FEProblemBase::setErrorOnJacobianNonzeroReallocation ( bool  state)
inlineinherited

Definition at line 1951 of file FEProblemBase.h.

1952  {
1954  }
bool _error_on_jacobian_nonzero_reallocation
Whether to error when the Jacobian is re-allocated, usually because the sparsity pattern changed...

◆ setException()

void FEProblemBase::setException ( const std::string &  message)
virtualinherited

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 6409 of file FEProblemBase.C.

Referenced by ComputeThreadedGeneralUserObjectsThread::caughtMooseException(), ThreadedNodeLoop< ConstBndNodeRange, ConstBndNodeRange::const_iterator >::caughtMooseException(), ThreadedFaceLoop< RangeType >::caughtMooseException(), NonlinearSystemBase::computeDamping(), AuxiliarySystem::computeElementalVarsHelper(), AuxiliarySystem::computeMortarNodalVars(), FEProblemBase::handleException(), ComputeMortarFunctor::operator()(), and DisplacedProblem::updateMesh().

6410 {
6411  _has_exception = true;
6412  _exception_message = message;
6413 }
bool _has_exception
Whether or not an exception has occurred.
std::string _exception_message
The error message to go with an exception.

◆ setExecutionPrinting()

void FEProblemBase::setExecutionPrinting ( const ExecFlagEnum print_exec)
inlineinherited

Definition at line 2424 of file FEProblemBase.h.

2424 { _print_execution_on = print_exec; }
ExecFlagEnum _print_execution_on
When to print the execution of loops.

◆ setFailNextNonlinearConvergenceCheck()

void FEProblemBase::setFailNextNonlinearConvergenceCheck ( )
inlineinherited

Skip further residual evaluations and fail the next nonlinear convergence check(s)

Definition at line 2411 of file FEProblemBase.h.

Referenced by Terminator::execute().

void setFailNextSystemConvergenceCheck()
Tell the problem that the system(s) cannot be considered converged next time convergence is checked...

◆ setFailNextSystemConvergenceCheck()

void FEProblemBase::setFailNextSystemConvergenceCheck ( )
inlineinherited

Tell the problem that the system(s) cannot be considered converged next time convergence is checked.

Definition at line 2413 of file FEProblemBase.h.

Referenced by FEProblemBase::setFailNextNonlinearConvergenceCheck().

bool _fail_next_system_convergence_check

◆ setFunctorOutput()

void SubProblem::setFunctorOutput ( bool  set_output)
inlineinherited

Setter for debug functor output.

Definition at line 924 of file SubProblem.h.

924 { _output_functors = set_output; }
bool _output_functors
Whether to output a list of the functors used and requested (currently only at initialSetup) ...
Definition: SubProblem.h:1164

◆ setIgnoreZerosInJacobian()

void FEProblemBase::setIgnoreZerosInJacobian ( bool  state)
inlineinherited

Set whether the zeros in the Jacobian should be dropped from the sparsity pattern.

Definition at line 1974 of file FEProblemBase.h.

1974 { _ignore_zeros_in_jacobian = state; }
bool _ignore_zeros_in_jacobian
Whether to ignore zeros in the Jacobian, thereby leading to a reduced sparsity pattern.

◆ setInputParametersFEProblem()

void FEProblem::setInputParametersFEProblem ( InputParameters parameters)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 120 of file FEProblem.C.

121 {
122  // set _fe_problem
124  // set _fe_problem
125  parameters.set<FEProblem *>("_fe_problem") = this;
126 }
virtual void setInputParametersFEProblem(InputParameters &parameters)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblem.h:20
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
const InputParameters & parameters() const
Get the parameters of the object.

◆ setKernelCoverageCheck() [1/2]

void FEProblemBase::setKernelCoverageCheck ( CoverageCheckMode  mode)
inlineinherited

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 1825 of file FEProblemBase.h.

1825 { _kernel_coverage_check = mode; }
CoverageCheckMode _kernel_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active kernel...

◆ setKernelCoverageCheck() [2/2]

void FEProblemBase::setKernelCoverageCheck ( bool  flag)
inlineinherited

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 1831 of file FEProblemBase.h.

1832  {
1834  }
CoverageCheckMode _kernel_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active kernel...

◆ setLinearConvergenceNames()

void FEProblemBase::setLinearConvergenceNames ( const std::vector< ConvergenceName > &  convergence_names)
inherited

Sets the linear convergence object name(s) if there is one.

Definition at line 9107 of file FEProblemBase.C.

Referenced by FEProblemSolve::FEProblemSolve().

9108 {
9109  if (convergence_names.size() != numLinearSystems())
9110  paramError("linear_convergence", "There must be one convergence object per linear system");
9111  _linear_convergence_names = convergence_names;
9112 }
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 ...
std::optional< std::vector< ConvergenceName > > _linear_convergence_names
Linear system(s) convergence name(s) (if any)
virtual std::size_t numLinearSystems() const override

◆ setMaterialCoverageCheck() [1/2]

void FEProblemBase::setMaterialCoverageCheck ( CoverageCheckMode  mode)
inlineinherited

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 1842 of file FEProblemBase.h.

1842 { _material_coverage_check = mode; }
CoverageCheckMode _material_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active material...

◆ setMaterialCoverageCheck() [2/2]

void FEProblemBase::setMaterialCoverageCheck ( bool  flag)
inlineinherited

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 1850 of file FEProblemBase.h.

1851  {
1853  }
CoverageCheckMode _material_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active material...

◆ setMultiAppFixedPointConvergenceName()

void FEProblemBase::setMultiAppFixedPointConvergenceName ( const ConvergenceName &  convergence_name)
inherited

Sets the MultiApp fixed point convergence object name if there is one.

Definition at line 9079 of file FEProblemBase.C.

Referenced by FixedPointSolve::FixedPointSolve().

9080 {
9081  _multiapp_fixed_point_convergence_name = convergence_name;
9082 }
std::optional< ConvergenceName > _multiapp_fixed_point_convergence_name
MultiApp fixed point convergence name.

◆ setNeedToAddDefaultMultiAppFixedPointConvergence()

void FEProblemBase::setNeedToAddDefaultMultiAppFixedPointConvergence ( )
inlineinherited

Sets _need_to_add_default_multiapp_fixed_point_convergence to true.

Definition at line 657 of file FEProblemBase.h.

Referenced by FixedPointSolve::FixedPointSolve().

658  {
660  }
bool _need_to_add_default_multiapp_fixed_point_convergence
Flag that the problem needs to add the default fixed point convergence.

◆ setNeedToAddDefaultNonlinearConvergence()

void FEProblemBase::setNeedToAddDefaultNonlinearConvergence ( )
inlineinherited

Sets _need_to_add_default_nonlinear_convergence to true.

Definition at line 652 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

653  {
655  }
bool _need_to_add_default_nonlinear_convergence
Flag that the problem needs to add the default nonlinear convergence.

◆ setNeedToAddDefaultSteadyStateConvergence()

void FEProblemBase::setNeedToAddDefaultSteadyStateConvergence ( )
inlineinherited

Sets _need_to_add_default_steady_state_convergence to true.

Definition at line 662 of file FEProblemBase.h.

Referenced by TransientBase::TransientBase().

663  {
665  }
bool _need_to_add_default_steady_state_convergence
Flag that the problem needs to add the default steady convergence.

◆ setNeighborSubdomainID() [1/2]

virtual void FEProblemBase::setNeighborSubdomainID ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtualinherited

◆ setNeighborSubdomainID() [2/2]

virtual void FEProblemBase::setNeighborSubdomainID ( const Elem *  elem,
const THREAD_ID  tid 
)
virtualinherited

◆ setNonlinearConvergenceNames()

void FEProblemBase::setNonlinearConvergenceNames ( const std::vector< ConvergenceName > &  convergence_names)
inherited

Sets the nonlinear convergence object name(s) if there is one.

Definition at line 9070 of file FEProblemBase.C.

Referenced by FEProblemSolve::FEProblemSolve().

9071 {
9072  if (convergence_names.size() != numNonlinearSystems())
9073  paramError("nonlinear_convergence",
9074  "There must be one convergence object per nonlinear system");
9075  _nonlinear_convergence_names = convergence_names;
9076 }
virtual std::size_t numNonlinearSystems() const override
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 ...
std::optional< std::vector< ConvergenceName > > _nonlinear_convergence_names
Nonlinear system(s) convergence name(s)

◆ setNonlocalCouplingMatrix()

void FEProblemBase::setNonlocalCouplingMatrix ( )
inherited

Set custom coupling matrix for variables requiring nonlocal contribution.

Definition at line 6082 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

6083 {
6084  TIME_SECTION("setNonlocalCouplingMatrix", 5, "Setting Nonlocal Coupling Matrix");
6085 
6086  if (_nl.size() > 1)
6087  mooseError("Nonlocal kernels are weirdly stored on the FEProblem so we don't currently support "
6088  "multiple nonlinear systems with nonlocal kernels.");
6089 
6090  for (const auto nl_sys_num : index_range(_nl))
6091  {
6092  auto & nl = _nl[nl_sys_num];
6093  auto & nonlocal_cm = _nonlocal_cm[nl_sys_num];
6094  unsigned int n_vars = nl->nVariables();
6095  nonlocal_cm.resize(n_vars);
6096  const auto & vars = nl->getVariables(0);
6097  const auto & nonlocal_kernel = _nonlocal_kernels.getObjects();
6098  const auto & nonlocal_integrated_bc = _nonlocal_integrated_bcs.getObjects();
6099  for (const auto & ivar : vars)
6100  {
6101  for (const auto & kernel : nonlocal_kernel)
6102  {
6103  for (unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
6104  if (i == kernel->variable().number())
6105  for (const auto & jvar : vars)
6106  {
6107  const auto it = _var_dof_map.find(jvar->name());
6108  if (it != _var_dof_map.end())
6109  {
6110  unsigned int j = jvar->number();
6111  nonlocal_cm(i, j) = 1;
6112  }
6113  }
6114  }
6115  for (const auto & integrated_bc : nonlocal_integrated_bc)
6116  {
6117  for (unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
6118  if (i == integrated_bc->variable().number())
6119  for (const auto & jvar : vars)
6120  {
6121  const auto it = _var_dof_map.find(jvar->name());
6122  if (it != _var_dof_map.end())
6123  {
6124  unsigned int j = jvar->number();
6125  nonlocal_cm(i, j) = 1;
6126  }
6127  }
6128  }
6129  }
6130  }
6131 }
char ** vars
std::map< std::string, std::vector< dof_id_type > > _var_dof_map
Definition: SubProblem.h:674
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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...
unsigned int n_vars
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::vector< libMesh::CouplingMatrix > _nonlocal_cm
nonlocal coupling matrix
auto index_range(const T &sizable)
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
nonlocal integrated_bcs
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
nonlocal kernels

◆ setParallelBarrierMessaging()

void FEProblemBase::setParallelBarrierMessaging ( bool  flag)
inlineinherited

Toggle parallel barrier messaging (defaults to on).

Definition at line 1858 of file FEProblemBase.h.

1858 { _parallel_barrier_messaging = flag; }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.

◆ setPostprocessorValueByName()

void FEProblemBase::setPostprocessorValueByName ( const PostprocessorName &  name,
const PostprocessorValue value,
std::size_t  t_index = 0 
)
inherited

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 4408 of file FEProblemBase.C.

Referenced by MultiAppPostprocessorTransfer::execute(), PIDTransientControl::execute(), FEProblemBase::joinAndFinalize(), SecantSolve::transformPostprocessors(), SteffensenSolve::transformPostprocessors(), and PicardSolve::transformPostprocessors().

4411 {
4413  PostprocessorReporterName(name), value, t_index);
4414 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
ReporterData _reporter_data
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:202
void setReporterValue(const ReporterName &reporter_name, const T &value, const std::size_t time_index=0)
Method for setting Reporter values that already exist.
Definition: ReporterData.h:481
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:134

◆ setPreserveMatrixSparsityPattern()

void FEProblemBase::setPreserveMatrixSparsityPattern ( bool  preserve)
inherited

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 3786 of file FEProblemBase.C.

3787 {
3788  if (_ignore_zeros_in_jacobian && preserve)
3789  paramWarning(
3790  "ignore_zeros_in_jacobian",
3791  "We likely cannot preserve the sparsity pattern if ignoring zeros in the Jacobian, which "
3792  "leads to removing those entries from the Jacobian sparsity pattern");
3794 }
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...
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...

◆ 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 
)
overridevirtualinherited

Definition at line 1897 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals().

1898 {
1899  _assembly[tid][_current_nl_sys->number()]->setResidual(
1900  residual,
1902  getVectorTag(_nl[_current_nl_sys->number()]->residualVectorTag()));
1903  if (_displaced_problem)
1904  _displaced_problem->setResidual(residual, tid);
1905 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:161
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ 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 
)
overridevirtualinherited

Definition at line 1908 of file FEProblemBase.C.

1909 {
1910  _assembly[tid][_current_nl_sys->number()]->setResidualNeighbor(
1912  if (_displaced_problem)
1913  _displaced_problem->setResidualNeighbor(residual, tid);
1914 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
TagID residualVectorTag() const override
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:161
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:815

◆ setRestartFile()

void FEProblemBase::setRestartFile ( const std::string &  file_name)
inherited

Communicate to the Resurector the name of the restart filer.

Parameters
file_nameThe file name for restarting from

Definition at line 8602 of file FEProblemBase.C.

Referenced by Executioner::Executioner(), and FEProblemBase::FEProblemBase().

8603 {
8604  if (_app.isRecovering())
8605  {
8606  mooseInfo("Restart file ", file_name, " is NOT being used since we are performing recovery.");
8607  }
8608  else
8609  {
8610  _app.setRestart(true);
8611  _app.setRestartRecoverFileBase(file_name);
8612  mooseInfo("Using ", file_name, " for restart.");
8613  }
8614 }
void mooseInfo(Args &&... args) const
void setRestartRecoverFileBase(const std::string &file_base)
mutator for recover_base (set by RecoverBaseAction)
Definition: MooseApp.h:529
void setRestart(bool value)
Sets the restart/recover flags.
Definition: MooseApp.C:2877
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:1795

◆ setSNESMFReuseBase()

void FEProblemBase::setSNESMFReuseBase ( bool  reuse,
bool  set_by_user 
)
inlineinherited

If or not to reuse the base vector for matrix-free calculation.

Definition at line 2113 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2114  {
2115  _snesmf_reuse_base = reuse, _snesmf_reuse_base_set_by_user = set_by_user;
2116  }
bool _snesmf_reuse_base_set_by_user
If or not _snesmf_reuse_base is set by user.
bool _snesmf_reuse_base
If or not to resuse the base vector for matrix-free calculation.

◆ setSteadyStateConvergenceName()

void FEProblemBase::setSteadyStateConvergenceName ( const ConvergenceName &  convergence_name)
inherited

Sets the steady-state detection convergence object name if there is one.

Definition at line 9085 of file FEProblemBase.C.

Referenced by TransientBase::TransientBase().

9086 {
9087  _steady_state_convergence_name = convergence_name;
9088 }
std::optional< ConvergenceName > _steady_state_convergence_name
Steady-state detection convergence name.

◆ setUDotDotOldRequested()

virtual void FEProblemBase::setUDotDotOldRequested ( const bool  u_dotdot_old_requested)
inlinevirtualinherited

Set boolean flag to true to store old solution second time derivative.

Definition at line 2161 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

2162  {
2163  _u_dotdot_old_requested = u_dotdot_old_requested;
2164  }
bool _u_dotdot_old_requested
Whether old solution second time derivative needs to be stored.

◆ setUDotDotRequested()

virtual void FEProblemBase::setUDotDotRequested ( const bool  u_dotdot_requested)
inlinevirtualinherited

Set boolean flag to true to store solution second time derivative.

Definition at line 2149 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

2150  {
2151  _u_dotdot_requested = u_dotdot_requested;
2152  }
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.

◆ setUDotOldRequested()

virtual void FEProblemBase::setUDotOldRequested ( const bool  u_dot_old_requested)
inlinevirtualinherited

Set boolean flag to true to store old solution time derivative.

Definition at line 2155 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

2156  {
2157  _u_dot_old_requested = u_dot_old_requested;
2158  }
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.

◆ setUDotRequested()

virtual void FEProblemBase::setUDotRequested ( const bool  u_dot_requested)
inlinevirtualinherited

Set boolean flag to true to store solution time derivative.

Definition at line 2146 of file FEProblemBase.h.

Referenced by TimeIntegrator::TimeIntegrator().

2146 { _u_dot_requested = u_dot_requested; }
bool _u_dot_requested
Whether solution time derivative needs to be stored.

◆ setupDampers()

void FEProblemBase::setupDampers ( )
inherited

Definition at line 5152 of file FEProblemBase.C.

5153 {
5154  for (auto & nl : _nl)
5155  nl->setupDampers();
5156 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ setUseNonlinear()

virtual void FEProblem::setUseNonlinear ( bool  use_nonlinear)
inlinevirtual

Definition at line 28 of file FEProblem.h.

28 { _use_nonlinear = use_nonlinear; }
bool _use_nonlinear
Definition: FEProblem.h:38

◆ setVariableAllDoFMap()

void FEProblemBase::setVariableAllDoFMap ( const std::vector< const MooseVariableFEBase *> &  moose_vars)
inherited

Definition at line 1671 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup(), and FEProblemBase::meshChanged().

1672 {
1673  for (unsigned int i = 0; i < moose_vars.size(); ++i)
1674  {
1675  VariableName var_name = moose_vars[i]->name();
1676  auto & sys = _solver_systems[moose_vars[i]->sys().number()];
1677  sys->setVariableGlobalDoFs(var_name);
1678  _var_dof_map[var_name] = sys->getVariableGlobalDoFs();
1679  }
1680 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::map< std::string, std::vector< dof_id_type > > _var_dof_map
Definition: SubProblem.h:674

◆ setVectorPostprocessorValueByName()

void FEProblemBase::setVectorPostprocessorValueByName ( const std::string &  object_name,
const std::string &  vector_name,
const VectorPostprocessorValue value,
std::size_t  t_index = 0 
)
inherited

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 4434 of file FEProblemBase.C.

4438 {
4440  VectorPostprocessorReporterName(object_name, vector_name), value, t_index);
4441 }
A ReporterName that represents a VectorPostprocessor.
Definition: ReporterName.h:143
ReporterData _reporter_data
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
void setReporterValue(const ReporterName &reporter_name, const T &value, const std::size_t time_index=0)
Method for setting Reporter values that already exist.
Definition: ReporterData.h:481
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:203

◆ setVerboseProblem()

void FEProblemBase::setVerboseProblem ( bool  verbose)
inherited

Make the problem be verbose.

Definition at line 9255 of file FEProblemBase.C.

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

9256 {
9257  _verbose_setup = verbose ? "true" : "false";
9258  _verbose_multiapps = verbose;
9259  _verbose_restore = verbose;
9260 }
bool _verbose_restore
Whether or not to be verbose on solution restoration post a failed time step.
MooseEnum _verbose_setup
Whether or not to be verbose during setup.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ shouldPrintExecution()

bool FEProblemBase::shouldPrintExecution ( const THREAD_ID  tid) const
inherited

Check whether the problem should output execution orders at this time.

Definition at line 9197 of file FEProblemBase.C.

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

9198 {
9199  // For now, only support printing from thread 0
9200  if (tid != 0)
9201  return false;
9202 
9205  return true;
9206  else
9207  return false;
9208 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.
const ExecFlagType EXEC_ALWAYS
Definition: Moose.C:47
ExecFlagEnum _print_execution_on
When to print the execution of loops.
bool isValueSet(const std::string &value) const
Methods for seeing if a value is set in the MultiMooseEnum.

◆ shouldSolve()

bool FEProblemBase::shouldSolve ( ) const
inlineinherited

Definition at line 2197 of file FEProblemBase.h.

Referenced by MFEMSteady::execute(), and FEProblemSolve::solve().

2197 { return _solve; }
const bool & _solve
Whether or not to actually solve the nonlinear system.

◆ shouldUpdateSolution()

bool FEProblemBase::shouldUpdateSolution ( )
virtualinherited

Check to see whether the problem should update the solution.

Returns
true if the problem should update the solution, false otherwise

Definition at line 7728 of file FEProblemBase.C.

Referenced by FEProblemBase::computePostCheck(), and NonlinearSystem::solve().

7729 {
7730  return false;
7731 }

◆ showInvalidSolutionConsole()

bool FEProblemBase::showInvalidSolutionConsole ( ) const
inlineinherited

Whether or not to print out the invalid solutions summary table in console.

Definition at line 1991 of file FEProblemBase.h.

Referenced by SolverSystem::checkInvalidSolution().

const bool _show_invalid_solution_console

◆ sizeZeroes()

void FEProblemBase::sizeZeroes ( unsigned int  size,
const THREAD_ID  tid 
)
virtualinherited

Definition at line 2099 of file FEProblemBase.C.

2100 {
2101  mooseDoOnce(mooseWarning(
2102  "This function is deprecated and no longer performs any function. Please do not call it."));
2103 }
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.

◆ skipExceptionCheck()

void FEProblemBase::skipExceptionCheck ( bool  skip_exception_check)
inlineinherited

Set a flag that indicates if we want to skip exception and stop solve.

Definition at line 2126 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2127  {
2128  _skip_exception_check = skip_exception_check;
2129  }
bool _skip_exception_check
If or not skip &#39;exception and stop solve&#39;.

◆ solve()

void FEProblemBase::solve ( const unsigned int  nl_sys_num)
virtualinherited

Reimplemented in DumpObjectsProblem, EigenProblem, and ExternalProblem.

Definition at line 6347 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration(), EigenExecutionerBase::nonlinearSolve(), FEProblemSolve::solve(), and AB2PredictorCorrector::step().

6348 {
6349  TIME_SECTION("solve", 1, "Solving", false);
6350 
6351  setCurrentNonlinearSystem(nl_sys_num);
6352 
6353  // This prevents stale dof indices from lingering around and possibly leading to invalid reads
6354  // and writes. Dof indices may be made stale through operations like mesh adaptivity
6356  if (_displaced_problem)
6357  _displaced_problem->clearAllDofIndices();
6358 
6359  // Setup the output system for printing linear/nonlinear iteration information and some solver
6360  // settings, including setting matrix prefixes. This must occur before petscSetOptions
6362 
6363 #if PETSC_RELEASE_LESS_THAN(3, 12, 0)
6365  _petsc_options, _solver_params); // Make sure the PETSc options are setup for this app
6366 #else
6367  // Now this database will be the default
6368  // Each app should have only one database
6369  if (!_app.isUltimateMaster())
6370  LibmeshPetscCall(PetscOptionsPush(_petsc_option_data_base));
6371  // We did not add PETSc options to database yet
6373  {
6374  // Insert options for all systems all at once
6377  }
6378 #endif
6379 
6380  // set up DM which is required if use a field split preconditioner
6381  // We need to setup DM every "solve()" because libMesh destroy SNES after solve()
6382  // Do not worry, DM setup is very cheap
6384 
6386 
6387  // reset flag so that residual evaluation does not get skipped
6388  // and the next non-linear iteration does not automatically fail with
6389  // "DIVERGED_NANORINF", when we throw an exception and stop solve
6391 
6392  if (_solve)
6393  {
6396  }
6397 
6398  // sync solutions in displaced problem
6399  if (_displaced_problem)
6400  _displaced_problem->syncSolutions();
6401 
6402 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
6403  if (!_app.isUltimateMaster())
6404  LibmeshPetscCall(PetscOptionsPop());
6405 #endif
6406 }
virtual void initPetscOutputAndSomeSolverSettings()
Reinitialize PETSc output for proper linear/nonlinear iteration display.
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:837
std::vector< SolverParams > _solver_params
void setupDM()
Setup the PETSc DM object (when appropriate)
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.
PetscOptions _petsc_option_data_base
void clearAllDofIndices()
Clear dof indices from variables in nl and aux systems.
Definition: SubProblem.C:1177
void update()
Update the system (doing libMesh magic)
Definition: SystemBase.C:1245
const bool & _solve
Whether or not to actually solve the nonlinear system.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
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.
Definition: PetscSupport.C:272
virtual void solve() override=0
Solve the system (using libMesh magic)
std::shared_ptr< DisplacedProblem > _displaced_problem
bool _fail_next_system_convergence_check
virtual void possiblyRebuildGeomSearchPatches()
Moose::PetscSupport::PetscOptions _petsc_options
PETSc option storage.

◆ solveLinearSystem()

void FEProblemBase::solveLinearSystem ( const unsigned int  linear_sys_num,
const Moose::PetscSupport::PetscOptions po = nullptr 
)
virtualinherited

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 6505 of file FEProblemBase.C.

Referenced by FEProblemSolve::solve().

6507 {
6508  TIME_SECTION("solve", 1, "Solving", false);
6509 
6510  setCurrentLinearSystem(linear_sys_num);
6511 
6512  const Moose::PetscSupport::PetscOptions & options = po ? *po : _petsc_options;
6513  auto & solver_params = _solver_params[numNonlinearSystems() + linear_sys_num];
6514 
6515  // Set custom convergence criteria
6517 
6518 #if PETSC_RELEASE_LESS_THAN(3, 12, 0)
6519  LibmeshPetscCall(Moose::PetscSupport::petscSetOptions(
6520  options, solver_params)); // Make sure the PETSc options are setup for this app
6521 #else
6522  // Now this database will be the default
6523  // Each app should have only one database
6524  if (!_app.isUltimateMaster())
6525  LibmeshPetscCall(PetscOptionsPush(_petsc_option_data_base));
6526 
6527  // We did not add PETSc options to database yet
6529  {
6530  Moose::PetscSupport::petscSetOptions(options, solver_params, this);
6532  }
6533 #endif
6534 
6535  if (_solve)
6537 
6538 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
6539  if (!_app.isUltimateMaster())
6540  LibmeshPetscCall(PetscOptionsPop());
6541 #endif
6542 }
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:837
virtual std::size_t numNonlinearSystems() const override
void petscSetDefaults(FEProblemBase &problem)
Sets the default options for PETSc.
Definition: PetscSupport.C:488
std::vector< SolverParams > _solver_params
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.
A struct for storing the various types of petsc options and values.
Definition: PetscSupport.h:39
PetscOptions _petsc_option_data_base
const bool & _solve
Whether or not to actually solve the nonlinear system.
LinearSystem * _current_linear_sys
The current linear system that we are solving.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
virtual void solve() override
Solve the system (using libMesh magic)
Definition: LinearSystem.C:274
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.
Definition: PetscSupport.C:272
void setCurrentLinearSystem(unsigned int sys_num)
Set the current linear system pointer.
Moose::PetscSupport::PetscOptions _petsc_options
PETSc option storage.

◆ solverParams() [1/2]

SolverParams & FEProblemBase::solverParams ( unsigned int  solver_sys_num = 0)
inherited

Get the solver parameters.

Definition at line 8634 of file FEProblemBase.C.

Referenced by NonlinearEigenSystem::attachPreconditioner(), SolverSystem::compute(), SlepcEigenSolverConfiguration::configure_solver(), Eigenvalue::Eigenvalue(), ExplicitTimeIntegrator::ExplicitTimeIntegrator(), FEProblemSolve::FEProblemSolve(), ExplicitTimeIntegrator::init(), EigenProblem::init(), FEProblemBase::init(), EigenProblem::isNonlinearEigenvalueSolver(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionA(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionAB(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionB(), Moose::SlepcSupport::mooseSlepcEigenFormJacobianA(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), ConsoleUtils::outputExecutionInformation(), Moose::PetscSupport::petscSetDefaults(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Eigenvalue::prepareSolverOptions(), NonlinearSystem::residualAndJacobianTogether(), Moose::SlepcSupport::setEigenProblemSolverParams(), Moose::PetscSupport::setLineSearchFromParams(), Moose::PetscSupport::setMFFDTypeFromParams(), Moose::PetscSupport::setSinglePetscOption(), Moose::PetscSupport::setSolveTypeFromParams(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), EigenProblem::solve(), FEProblemBase::solverParams(), EigenProblem::solverTypeString(), FEProblemBase::solverTypeString(), and Moose::SlepcSupport::storeSolveType().

8635 {
8636  mooseAssert(solver_sys_num < numSolverSystems(),
8637  "Solver system number '" << solver_sys_num << "' is out of bounds. We have '"
8638  << numSolverSystems() << "' solver systems");
8639  return _solver_params[solver_sys_num];
8640 }
std::vector< SolverParams > _solver_params
virtual std::size_t numSolverSystems() const override

◆ solverParams() [2/2]

const SolverParams & FEProblemBase::solverParams ( unsigned int  solver_sys_num = 0) const
inherited

const version

Definition at line 8643 of file FEProblemBase.C.

8644 {
8645  return const_cast<FEProblemBase *>(this)->solverParams(solver_sys_num);
8646 }
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
SolverParams & solverParams(unsigned int solver_sys_num=0)
Get the solver parameters.

◆ solverSysNum()

unsigned int FEProblemBase::solverSysNum ( const SolverSystemName &  solver_sys_name) const
overridevirtualinherited
Returns
the solver system number corresponding to the provided solver_sys_name

Implements SubProblem.

Definition at line 6313 of file FEProblemBase.C.

Referenced by FEProblemBase::addVariable(), MultiSystemSolveObject::MultiSystemSolveObject(), and DisplacedProblem::solverSysNum().

6314 {
6315  std::istringstream ss(solver_sys_name);
6316  unsigned int solver_sys_num;
6317  if (!(ss >> solver_sys_num) || !ss.eof())
6318  {
6319  const auto & search = _solver_sys_name_to_num.find(solver_sys_name);
6320  if (search == _solver_sys_name_to_num.end())
6321  mooseError("The solver system number was requested for system '" + solver_sys_name,
6322  "' but this system does not exist in the Problem. Systems can be added to the "
6323  "problem using the 'nl_sys_names' parameter.\nSystems in the Problem: " +
6325  solver_sys_num = search->second;
6326  }
6327 
6328  return solver_sys_num;
6329 }
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::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ solverSystemConverged()

bool FEProblemBase::solverSystemConverged ( const unsigned int  sys_num)
overridevirtualinherited
Returns
whether the given solver system sys_num is converged

Reimplemented from SubProblem.

Reimplemented in EigenProblem.

Definition at line 6545 of file FEProblemBase.C.

6546 {
6547  if (_solve)
6548  return _solver_systems[sys_num]->converged();
6549  else
6550  return true;
6551 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
const bool & _solve
Whether or not to actually solve the nonlinear system.

◆ solverTypeString()

std::string FEProblemBase::solverTypeString ( unsigned int  solver_sys_num = 0)
virtualinherited

Return solver type as a human readable string.

Reimplemented in MFEMProblem, and EigenProblem.

Definition at line 9376 of file FEProblemBase.C.

Referenced by ConsoleUtils::outputExecutionInformation().

9377 {
9378  return Moose::stringify(solverParams(solver_sys_num)._type);
9379 }
const std::string _type
The type of this class.
Definition: MooseBase.h:87
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
SolverParams & solverParams(unsigned int solver_sys_num=0)
Get the solver parameters.

◆ startedInitialSetup()

virtual bool FEProblemBase::startedInitialSetup ( )
inlinevirtualinherited

Returns true if we are in or beyond the initialSetup stage.

Definition at line 509 of file FEProblemBase.h.

Referenced by NEML2ModelExecutor::checkExecutionStage(), MaterialBase::checkExecutionStage(), and MaterialPropertyInterface::checkExecutionStage().

509 { return _started_initial_setup; }
bool _started_initial_setup
At or beyond initialSteup stage.

◆ 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 615 of file SubProblem.C.

Referenced by MaterialPropertyInterface::checkMaterialProperty().

618 {
619  _map_boundary_material_props_check[boundary_id].insert(std::make_pair(requestor, name));
620 }
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
Definition: SubProblem.h:1071
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57

◆ 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 589 of file SubProblem.C.

Referenced by MaterialBase::registerPropName().

590 {
591  _map_boundary_material_props[boundary_id].insert(name);
592 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1055

◆ 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 601 of file SubProblem.C.

Referenced by MaterialBase::storeBoundaryZeroMatProp().

602 {
603  _zero_boundary_material_props[boundary_id].insert(name);
604 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:1059

◆ 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 607 of file SubProblem.C.

Referenced by MaterialPropertyInterface::checkMaterialProperty().

610 {
611  _map_block_material_props_check[block_id].insert(std::make_pair(requestor, name));
612 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
Definition: SubProblem.h:1070

◆ 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 583 of file SubProblem.C.

Referenced by MaterialBase::registerPropName().

584 {
585  _map_block_material_props[block_id].insert(name);
586 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1052

◆ 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 595 of file SubProblem.C.

Referenced by MaterialBase::storeSubdomainZeroMatProp().

596 {
597  _zero_block_material_props[block_id].insert(name);
598 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:1058

◆ subdomainSetup()

void FEProblemBase::subdomainSetup ( SubdomainID  subdomain,
const THREAD_ID  tid 
)
virtualinherited

Definition at line 2463 of file FEProblemBase.C.

Referenced by ComputeMarkerThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeDiracThread::subdomainChanged(), NonlinearThread::subdomainChanged(), ComputeUserObjectsThread::subdomainChanged(), and ThreadedFaceLoop< RangeType >::subdomainChanged().

2464 {
2465  _all_materials.subdomainSetup(subdomain, tid);
2466  // Call the subdomain methods of the output system, these are not threaded so only call it once
2467  if (tid == 0)
2469 
2470  for (auto & nl : _nl)
2471  nl->subdomainSetup(subdomain, tid);
2472 
2473  // FIXME: call displaced_problem->subdomainSetup() ?
2474  // When adding possibility with materials being evaluated on displaced mesh
2475 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
void subdomainSetup()
Calls the subdomainSetup function for each of the output objects.
virtual void subdomainSetup(THREAD_ID tid=0) const
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407

◆ subspaceDim()

unsigned int FEProblemBase::subspaceDim ( const std::string &  prefix) const
inlineinherited

Dimension of the subspace spanned by vectors with a given prefix.

Parameters
prefixPrefix of the vectors spanning the subspace.

Definition at line 1900 of file FEProblemBase.h.

Referenced by FEProblemBase::computeNearNullSpace(), FEProblemBase::computeNullSpace(), and FEProblemBase::computeTransposeNullSpace().

1901  {
1902  if (_subspace_dim.count(prefix))
1903  return _subspace_dim.find(prefix)->second;
1904  else
1905  return 0;
1906  }
std::map< std::string, unsigned int > _subspace_dim
Dimension of the subspace spanned by the vectors with a given prefix.

◆ swapBackMaterials()

void FEProblemBase::swapBackMaterials ( const THREAD_ID  tid)
virtualinherited

Definition at line 4136 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), LineMaterialSamplerBase< Real >::execute(), ComputeMarkerThread::onElement(), ComputeElemAuxVarsThread< AuxKernelType >::onElement(), ComputeIndicatorThread::onElement(), NonlinearThread::onElement(), and ComputeUserObjectsThread::onElement().

4137 {
4138  auto && elem = _assembly[tid][0]->elem();
4140 }
void swapBack(const Elem &elem, unsigned int side=0)
material properties for given element (and possible side)
Definition: MaterialData.C:58
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
const MaterialData & getMaterialData(const THREAD_ID tid) const
MaterialPropertyStorage & _material_props

◆ swapBackMaterialsFace()

void FEProblemBase::swapBackMaterialsFace ( const THREAD_ID  tid)
virtualinherited

Definition at line 4143 of file FEProblemBase.C.

Referenced by NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and ComputeElemAuxBcsThread< AuxKernelType >::operator()().

4144 {
4145  auto && elem = _assembly[tid][0]->elem();
4146  unsigned int side = _assembly[tid][0]->side();
4147  _bnd_material_props.getMaterialData(tid).swapBack(*elem, side);
4148 }
MaterialPropertyStorage & _bnd_material_props
void swapBack(const Elem &elem, unsigned int side=0)
material properties for given element (and possible side)
Definition: MaterialData.C:58
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
const MaterialData & getMaterialData(const THREAD_ID tid) const

◆ swapBackMaterialsNeighbor()

void FEProblemBase::swapBackMaterialsNeighbor ( const THREAD_ID  tid)
virtualinherited

Definition at line 4151 of file FEProblemBase.C.

Referenced by NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and ComputeElemAuxBcsThread< AuxKernelType >::operator()().

4152 {
4153  // NOTE: this will not work with h-adaptivity
4154  const Elem * neighbor = _assembly[tid][0]->neighbor();
4155  unsigned int neighbor_side =
4156  neighbor ? neighbor->which_neighbor_am_i(_assembly[tid][0]->elem()) : libMesh::invalid_uint;
4157 
4158  if (!neighbor)
4159  {
4160  if (haveFV())
4161  {
4162  // If neighbor is null, then we're on the neighbor side of a mesh boundary, e.g. we're off
4163  // the mesh in ghost-land. If we're using the finite volume method, then variable values and
4164  // consequently material properties have well-defined values in this ghost region outside of
4165  // the mesh and we really do want to reinit our neighbor materials in this case. Since we're
4166  // off in ghost land it's safe to do swaps with `MaterialPropertyStorage` using the elem and
4167  // elem_side keys
4168  neighbor = _assembly[tid][0]->elem();
4169  neighbor_side = _assembly[tid][0]->side();
4170  mooseAssert(neighbor, "We should have an appropriate value for elem coming from Assembly");
4171  }
4172  else
4173  mooseError("neighbor is null in Assembly!");
4174  }
4175 
4176  _neighbor_material_props.getMaterialData(tid).swapBack(*neighbor, neighbor_side);
4177 }
const unsigned int invalid_uint
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
void swapBack(const Elem &elem, unsigned int side=0)
material properties for given element (and possible side)
Definition: MaterialData.C:58
unsigned int which_neighbor_am_i(const Elem *e) const
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MaterialPropertyStorage & _neighbor_material_props
const MaterialData & getMaterialData(const THREAD_ID tid) const

◆ systemBaseAuxiliary() [1/2]

const SystemBase & FEProblemBase::systemBaseAuxiliary ( ) const
overridevirtualinherited

Return the auxiliary system object as a base class reference.

Implements SubProblem.

Definition at line 8921 of file FEProblemBase.C.

Referenced by PhysicsBase::copyVariablesFromMesh(), and MFEMProblem::getAuxVariableNames().

8922 {
8923  return *_aux;
8924 }
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ systemBaseAuxiliary() [2/2]

SystemBase & FEProblemBase::systemBaseAuxiliary ( )
overridevirtualinherited

Implements SubProblem.

Definition at line 8927 of file FEProblemBase.C.

8928 {
8929  return *_aux;
8930 }
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ systemBaseLinear() [1/2]

const SystemBase & FEProblemBase::systemBaseLinear ( unsigned int  sys_num) const
overridevirtualinherited

Get a constant base class reference to a linear system.

Parameters
sys_numThe number of the linear system

Implements SubProblem.

Definition at line 8889 of file FEProblemBase.C.

8890 {
8891  mooseAssert(sys_num < _linear_systems.size(),
8892  "System number greater than the number of linear systems");
8893  return *_linear_systems[sys_num];
8894 }
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ systemBaseLinear() [2/2]

SystemBase & FEProblemBase::systemBaseLinear ( unsigned int  sys_num)
overridevirtualinherited

Get a non-constant base class reference to a linear system.

Parameters
sys_numThe number of the linear system

Implements SubProblem.

Definition at line 8897 of file FEProblemBase.C.

8898 {
8899  mooseAssert(sys_num < _linear_systems.size(),
8900  "System number greater than the number of linear systems");
8901  return *_linear_systems[sys_num];
8902 }
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ systemBaseNonlinear() [1/2]

const SystemBase & FEProblemBase::systemBaseNonlinear ( const unsigned int  sys_num) const
overridevirtualinherited

Return the nonlinear system object as a base class reference given the system number.

Implements SubProblem.

Definition at line 8875 of file FEProblemBase.C.

8876 {
8877  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
8878  return *_nl[sys_num];
8879 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ systemBaseNonlinear() [2/2]

SystemBase & FEProblemBase::systemBaseNonlinear ( const unsigned int  sys_num)
overridevirtualinherited

Implements SubProblem.

Definition at line 8882 of file FEProblemBase.C.

8883 {
8884  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
8885  return *_nl[sys_num];
8886 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ systemBaseSolver() [1/2]

const SystemBase & FEProblemBase::systemBaseSolver ( const unsigned int  sys_num) const
overridevirtualinherited

Return the solver system object as a base class reference given the system number.

Implements SubProblem.

Definition at line 8905 of file FEProblemBase.C.

8906 {
8907  mooseAssert(sys_num < _solver_systems.size(),
8908  "System number greater than the number of solver systems");
8909  return *_solver_systems[sys_num];
8910 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.

◆ systemBaseSolver() [2/2]

SystemBase & FEProblemBase::systemBaseSolver ( const unsigned int  sys_num)
overridevirtualinherited

Implements SubProblem.

Definition at line 8913 of file FEProblemBase.C.

8914 {
8915  mooseAssert(sys_num < _solver_systems.size(),
8916  "System number greater than the number of solver systems");
8917  return *_solver_systems[sys_num];
8918 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.

◆ systemNumForVariable()

unsigned int FEProblemBase::systemNumForVariable ( const VariableName &  variable_name) const
inherited
Returns
the system number for the provided variable_name Can be nonlinear or auxiliary

Definition at line 6332 of file FEProblemBase.C.

6333 {
6334  for (const auto & solver_sys : _solver_systems)
6335  if (solver_sys->hasVariable(variable_name))
6336  return solver_sys->number();
6337  mooseAssert(_aux, "Should have an auxiliary system");
6338  if (_aux->hasVariable(variable_name))
6339  return _aux->number();
6340 
6341  mooseError("Variable '",
6342  variable_name,
6343  "' was not found in any solver (nonlinear/linear) or auxiliary system");
6344 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ terminateSolve()

virtual void Problem::terminateSolve ( )
inlinevirtualinherited

Allow objects to request clean termination of the solve.

Definition at line 37 of file Problem.h.

Referenced by Terminator::execute(), and TerminateChainControl::terminate().

37 { _termination_requested = true; };
bool _termination_requested
True if termination of the solve has been requested.
Definition: Problem.h:58

◆ theWarehouse()

TheWarehouse& FEProblemBase::theWarehouse ( ) const
inlineinherited

Definition at line 2108 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addDGKernel(), NonlinearSystemBase::addDiracKernel(), NonlinearSystemBase::addHDGKernel(), NonlinearSystemBase::addInterfaceKernel(), NonlinearSystemBase::addKernel(), NonlinearSystemBase::addNodalKernel(), FEProblemBase::addObject(), NonlinearSystemBase::addScalarKernel(), NonlinearSystemBase::addSplit(), FEProblemBase::addUserObject(), NonlinearSystemBase::checkKernelCoverage(), FEProblemBase::checkUserObjectJacobianRequirement(), FEProblemBase::checkUserObjects(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::computeUserObjectByName(), FEProblemBase::computeUserObjects(), LinearSystem::containsTimeKernel(), NonlinearSystemBase::customSetup(), FEProblemBase::customSetup(), ComputeResidualThread::determineObjectWarehouses(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), FEProblemBase::executeSamplers(), ComputeLinearFVElementalThread::fetchBlockSystemContributionObjects(), ComputeLinearFVFaceThread::fetchBlockSystemContributionObjects(), FEProblemBase::getDistribution(), FEProblemBase::getMortarUserObjects(), FEProblemBase::getPositionsObject(), FEProblemBase::getSampler(), CompositionDT::getTimeSteppers(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), FEProblemBase::hasUserObject(), SideFVFluxBCIntegral::initialSetup(), ExplicitTimeIntegrator::initialSetup(), NonlinearSystemBase::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), FEProblemBase::needBoundaryMaterialOnSide(), FEProblemBase::needInterfaceMaterialOnSide(), FEProblemBase::needSubdomainMaterialOnSide(), JSONOutput::outputReporters(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), ComputeLinearFVElementalThread::setupSystemContributionObjects(), ComputeLinearFVFaceThread::setupSystemContributionObjects(), NonlinearThread::subdomainChanged(), NonlinearSystemBase::timestepSetup(), and FEProblemBase::timestepSetup().

2108 { return _app.theWarehouse(); }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
TheWarehouse & theWarehouse()
Definition: MooseApp.h:130

◆ time()

virtual Real& FEProblemBase::time ( ) const
inlinevirtualinherited

◆ 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 47 of file PerfGraphInterface.C.

Referenced by PerfGraphInterface::registerTimedSection().

48 {
49  return _prefix.empty() ? "" : (_prefix + "::") + section_name;
50 }
const std::string _prefix
A prefix to use for all sections.

◆ timeOld()

virtual Real& FEProblemBase::timeOld ( ) const
inlinevirtualinherited

◆ timeStep()

virtual int& FEProblemBase::timeStep ( ) const
inlinevirtualinherited

◆ timestepSetup()

void FEProblemBase::timestepSetup ( )
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 1478 of file FEProblemBase.C.

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

1479 {
1481 
1482  if (_t_step > 1 && _num_grid_steps)
1483  {
1484  libMesh::MeshRefinement mesh_refinement(_mesh);
1485  std::unique_ptr<libMesh::MeshRefinement> displaced_mesh_refinement(nullptr);
1486  if (_displaced_mesh)
1487  displaced_mesh_refinement = std::make_unique<libMesh::MeshRefinement>(*_displaced_mesh);
1488 
1489  for (MooseIndex(_num_grid_steps) i = 0; i < _num_grid_steps; ++i)
1490  {
1491  if (_displaced_problem)
1492  // If the DisplacedProblem is active, undisplace the DisplacedMesh in preparation for
1493  // refinement. We can't safely refine the DisplacedMesh directly, since the Hilbert keys
1494  // computed on the inconsistenly-displaced Mesh are different on different processors,
1495  // leading to inconsistent Hilbert keys. We must do this before the undisplaced Mesh is
1496  // coarsensed, so that the element and node numbering is still consistent. We also have to
1497  // make sure this is done during every step of coarsening otherwise different partitions
1498  // will be generated for the reference and displaced meshes (even for replicated)
1499  _displaced_problem->undisplaceMesh();
1500 
1501  mesh_refinement.uniformly_coarsen();
1502  if (_displaced_mesh)
1503  displaced_mesh_refinement->uniformly_coarsen();
1504 
1505  // Mark this as an intermediate change because we do not yet want to reinit_systems. E.g. we
1506  // need things to happen in the following order for the undisplaced problem:
1507  // u1) EquationSystems::reinit_solutions. This will restrict the solution vectors and then
1508  // contract the mesh
1509  // u2) MooseMesh::meshChanged. This will update the node/side lists and other
1510  // things which needs to happen after the contraction
1511  // u3) GeometricSearchData::reinit. Once the node/side lists are updated we can perform our
1512  // geometric searches which will aid in determining sparsity patterns
1513  //
1514  // We do these things for the displaced problem (if it exists)
1515  // d1) EquationSystems::reinit. Restrict the displaced problem vector copies and then contract
1516  // the mesh. It's safe to do a full reinit with the displaced because there are no
1517  // matrices that sparsity pattern calculations will be conducted for
1518  // d2) MooseMesh::meshChanged. This will update the node/side lists and other
1519  // things which needs to happen after the contraction
1520  // d3) UpdateDisplacedMeshThread::operator(). Re-displace the mesh using the *displaced*
1521  // solution vector copy because we don't know the state of the reference solution vector.
1522  // It's safe to use the displaced copy because we are outside of a non-linear solve,
1523  // and there is no concern about differences between solution and current_local_solution
1524  // d4) GeometricSearchData::reinit. With the node/side lists updated and the mesh
1525  // re-displaced, we can perform our geometric searches, which will aid in determining the
1526  // sparsity pattern of the matrix held by the libMesh::ImplicitSystem held by the
1527  // NonlinearSystem held by this
1528  meshChanged(
1529  /*intermediate_change=*/true, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
1530  }
1531 
1532  // u4) Now that all the geometric searches have been done (both undisplaced and displaced),
1533  // we're ready to update the sparsity pattern
1534  es().reinit_systems();
1535  }
1536 
1537  if (_line_search)
1538  _line_search->timestepSetup();
1539 
1540  // Random interface objects
1541  for (const auto & it : _random_data_objects)
1542  it.second->updateSeeds(EXEC_TIMESTEP_BEGIN);
1543 
1544  unsigned int n_threads = libMesh::n_threads();
1545  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1546  {
1549  }
1550 
1551  _aux->timestepSetup();
1552  for (auto & sys : _solver_systems)
1553  sys->timestepSetup();
1554 
1555  if (_displaced_problem)
1556  // timestepSetup for displaced systems
1557  _displaced_problem->timestepSetup();
1558 
1559  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1560  {
1563  _markers.timestepSetup(tid);
1564  }
1565 
1566  std::vector<UserObject *> userobjs;
1567  theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(userobjs);
1568  for (auto obj : userobjs)
1569  obj->timestepSetup();
1570 
1571  // Timestep setup of output objects
1573 
1576  _has_nonlocal_coupling = true;
1577 }
virtual void meshChanged()
Deprecated.
unsigned int n_threads()
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
virtual void timestepSetup(THREAD_ID tid=0) const
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
unsigned int _num_grid_steps
Number of steps in a grid sequence.
virtual void reinit_systems()
TheWarehouse & theWarehouse() const
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:35
virtual void timestepSetup(THREAD_ID tid=0) const
virtual libMesh::EquationSystems & es() override
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
MooseObjectWarehouse< Indicator > _indicators
virtual void timestepSetup()
Definition: SubProblem.C:1185
bool hasActiveObjects(THREAD_ID tid=0) const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseObjectWarehouse< Function > _functions
functions
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
MooseObjectWarehouse< Marker > _markers
MaterialWarehouse _all_materials
void timestepSetup()
Calls the timestepSetup function for each of the output objects.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2407
MooseMesh * _displaced_mesh
unsigned int THREAD_ID
Definition: MooseTypes.h:209
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
nonlocal integrated_bcs
std::shared_ptr< LineSearch > _line_search
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
nonlocal kernels

◆ transient()

virtual void FEProblemBase::transient ( bool  trans)
inlinevirtualinherited

◆ trustUserCouplingMatrix()

void FEProblemBase::trustUserCouplingMatrix ( )
inherited

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 6072 of file FEProblemBase.C.

Referenced by SingleMatrixPreconditioner::SingleMatrixPreconditioner().

6073 {
6075  mooseError("Someone told us (the FEProblemBase) to trust the user coupling matrix, but we "
6076  "haven't been provided a coupling matrix!");
6077 
6079 }
bool _trust_user_coupling_matrix
Whether to trust the user coupling matrix no matter what.
Moose::CouplingType _coupling
Type of variable coupling.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ 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 51 of file MooseBase.h.

Referenced by CreateProblemDefaultAction::act(), SetupDebugAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addConvergence(), FEProblemBase::addDistribution(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), MFEMProblem::addFunction(), FEProblemBase::addFunction(), FEProblemBase::addMeshDivision(), MooseApp::addMeshGenerator(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addObject(), MFEMProblem::addPostprocessor(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addTimeIntegrator(), MooseServer::addValuesToList(), DisplacedProblem::addVectorTag(), SubProblem::addVectorTag(), FEProblemBase::advanceMultiApps(), MooseApp::appendMeshGenerator(), AuxKernelTempl< Real >::AuxKernelTempl(), FEProblemBase::backupMultiApps(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BoundaryPreservedMarker::BoundaryPreservedMarker(), DistributedRectilinearMeshGenerator::buildCube(), MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildLowerDMesh(), MooseMesh::buildPRefinementAndCoarseningMaps(), PhysicsBase::checkComponentType(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), ADDGKernel::computeElemNeighJacobian(), DGKernel::computeElemNeighJacobian(), ElemElemConstraint::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighJacobian(), ADDGKernel::computeElemNeighResidual(), DGKernel::computeElemNeighResidual(), ElemElemConstraint::computeElemNeighResidual(), ArrayDGKernel::computeElemNeighResidual(), LowerDIntegratedBC::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDJacobian(), DGLowerDKernel::computeLowerDJacobian(), ArrayDGLowerDKernel::computeLowerDJacobian(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayHFEMDirichletBC::computeLowerDQpJacobian(), ArrayHFEMDiffusion::computeLowerDQpJacobian(), HFEMDirichletBC::computeLowerDQpJacobian(), HFEMDiffusion::computeLowerDQpJacobian(), ArrayHFEMDirichletBC::computeLowerDQpOffDiagJacobian(), HFEMDirichletBC::computeLowerDQpOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDQpOffDiagJacobian(), ArrayDGLowerDKernel::computeLowerDQpOffDiagJacobian(), FEProblemBase::computeMultiAppsDT(), ADDGKernel::computeOffDiagElemNeighJacobian(), DGKernel::computeOffDiagElemNeighJacobian(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), DGConvection::computeQpJacobian(), ScalarKernel::computeQpJacobian(), InterfaceDiffusion::computeQpJacobian(), ArrayDGDiffusion::computeQpJacobian(), InterfaceReaction::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGDiffusion::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), HFEMTestJump::computeQpOffDiagJacobian(), HFEMTrialJump::computeQpOffDiagJacobian(), ArrayDGKernel::computeQpOffDiagJacobian(), HFEMDiffusion::computeQpResidual(), ArrayHFEMDiffusion::computeQpResidual(), DGConvection::computeQpResidual(), ScalarKernel::computeQpResidual(), InterfaceDiffusion::computeQpResidual(), ADMatInterfaceReaction::computeQpResidual(), InterfaceReaction::computeQpResidual(), ADDGAdvection::computeQpResidual(), ArrayDGDiffusion::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), DGDiffusion::computeQpResidual(), ADDGDiffusion::computeQpResidual(), HFEMTrialJump::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), HFEMTestJump::computeQpResidual(), FEProblemBase::computeSystems(), FEProblemBase::computeUserObjectByName(), FEProblemBase::computeUserObjects(), FEProblemBase::computeUserObjectsInternal(), DisplacedProblem::createQRules(), FEProblemBase::createQRules(), MooseApp::createRecoverablePerfGraph(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), FEProblemBase::duplicateVariableCheck(), MooseBase::errorPrefix(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), FEProblemBase::execTransfers(), WebServerControl::execute(), SteadyBase::execute(), ActionWarehouse::executeActionsWithAction(), FEProblemBase::finishMultiAppStep(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), MooseServer::gatherDocumentReferencesLocations(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateInternal(), MultiAppTransfer::getAppInfo(), TransfiniteMeshGenerator::getEdge(), ElementGenerator::getElemType(), MooseServer::getInputLookupDefinitionNodes(), FEProblemBase::getMaterial(), FEProblemBase::getMaterialData(), MaterialOutputAction::getParams(), ReporterData::getReporterInfo(), FEProblemBase::getTransfers(), DisplacedProblem::getVectorTags(), SubProblem::getVectorTags(), CommonOutputAction::hasConsole(), FEProblemBase::hasMultiApps(), AdvancedOutput::hasOutput(), FEProblemBase::incrementMultiAppTStep(), AdvancedOutput::initAvailableLists(), FunctorPositions::initialize(), FunctorTimes::initialize(), MultiAppConservativeTransfer::initialSetup(), LinearFVDiffusion::initialSetup(), LinearFVAnisotropicDiffusion::initialSetup(), LinearFVAdvection::initialSetup(), ArrayDGDiffusion::initQpResidual(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), FEProblemBase::logAdd(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MFEMProblem::mesh(), MooseObject::MooseObject(), MultiAppMFEMCopyTransfer::MultiAppMFEMCopyTransfer(), DisplacedProblem::numVectorTags(), SubProblem::numVectorTags(), Console::output(), AdvancedOutput::output(), ConsoleUtils::outputExecutionInformation(), SampledOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), MooseServer::parseDocumentForDiagnostics(), MooseMesh::prepare(), ProjectedStatefulMaterialStorageAction::processProperty(), MooseApp::recursivelyCreateExecutors(), SolutionInvalidInterface::registerInvalidSolutionInternal(), FEProblemBase::restoreMultiApps(), MeshRepairGenerator::separateSubdomainsByElementType(), FEProblemBase::setCoupling(), MooseApp::setupOptions(), WebServerControl::startServer(), MooseBase::typeAndName(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), UserObjectInterface::userObjectType(), and AdvancedOutput::wantOutput().

51 { return _type; }
const std::string _type
The type of this class.
Definition: MooseBase.h:87

◆ 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 27 of file MooseBase.C.

Referenced by MaterialPropertyStorage::addProperty(), MeshGeneratorSystem::dataDrivenError(), ReporterContext< std::vector< T > >::finalize(), and ReporterData::getReporterInfo().

28 {
29  return type() + std::string(" \"") + name() + std::string("\"");
30 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ uDotDotOldRequested()

virtual bool FEProblemBase::uDotDotOldRequested ( )
inlinevirtualinherited

Get boolean flag to check whether old solution second time derivative needs to be stored.

Definition at line 2184 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors().

2185  {
2187  mooseError("FEProblemBase: When requesting old second time derivative of solution, current "
2188  "second time derivation of solution should also be stored. Please set "
2189  "`u_dotdot_requested` to true using setUDotDotRequested.");
2190  return _u_dotdot_old_requested;
2191  }
bool _u_dotdot_old_requested
Whether old solution second time derivative needs to be stored.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.

◆ uDotDotRequested()

virtual bool FEProblemBase::uDotDotRequested ( )
inlinevirtualinherited

Get boolean flag to check whether solution second time derivative needs to be stored.

Definition at line 2170 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors(), and FEProblemBase::addTimeIntegrator().

2170 { return _u_dotdot_requested; }
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.

◆ uDotOldRequested()

virtual bool FEProblemBase::uDotOldRequested ( )
inlinevirtualinherited

Get boolean flag to check whether old solution time derivative needs to be stored.

Definition at line 2173 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors().

2174  {
2176  mooseError("FEProblemBase: When requesting old time derivative of solution, current time "
2177  "derivative of solution should also be stored. Please set `u_dot_requested` to "
2178  "true using setUDotRequested.");
2179 
2180  return _u_dot_old_requested;
2181  }
bool _u_dot_requested
Whether solution time derivative needs to be stored.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.

◆ uDotRequested()

virtual bool FEProblemBase::uDotRequested ( )
inlinevirtualinherited

Get boolean flag to check whether solution time derivative needs to be stored.

Definition at line 2167 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors().

2167 { return _u_dot_requested; }
bool _u_dot_requested
Whether solution time derivative needs to be stored.

◆ uniformRefine()

void FEProblemBase::uniformRefine ( )
inherited

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 8951 of file FEProblemBase.C.

Referenced by FEProblemSolve::solve().

8952 {
8953  // ResetDisplacedMeshThread::onNode looks up the reference mesh by ID, so we need to make sure
8954  // we undisplace before adapting the reference mesh
8955  if (_displaced_problem)
8956  _displaced_problem->undisplaceMesh();
8957 
8959  if (_displaced_problem)
8961 
8962  meshChanged(
8963  /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
8964 }
virtual void meshChanged()
Deprecated.
static void uniformRefine(MooseMesh *mesh, unsigned int level=libMesh::invalid_uint)
Performs uniform refinement of the passed Mesh object.
Definition: Adaptivity.C:274
MooseMesh & _mesh
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ uniqueName()

MooseObjectName MooseBaseParameterInterface::uniqueName ( ) const
inlineinherited

The unique name for accessing input parameters of this object in the InputParameterWarehouse.

Definition at line 67 of file MooseBaseParameterInterface.h.

Referenced by MooseBaseParameterInterface::connectControllableParams(), and Action::uniqueActionName().

68  {
69  return MooseObjectName(_pars.get<std::string>("_unique_name"));
70  }
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.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing the names of MooseObject by tag and object name.

◆ uniqueParameterName()

MooseObjectParameterName MooseBaseParameterInterface::uniqueParameterName ( const std::string &  parameter_name) const
inlineinherited

The unique parameter name of a valid parameter of this object for accessing parameter controls.

Definition at line 52 of file MooseBaseParameterInterface.h.

53  {
55  _pars.get<std::string>("_moose_base"), _moose_base.name(), parameter_name);
56  }
const MooseBase & _moose_base
The MooseBase object that inherits this class.
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.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing an input parameter name.

◆ updateActiveObjects()

void FEProblemBase::updateActiveObjects ( )
virtualinherited

Update the active objects in the warehouses.

Reimplemented in DumpObjectsProblem.

Definition at line 5068 of file FEProblemBase.C.

Referenced by MooseEigenSystem::eigenKernelOnCurrent(), MooseEigenSystem::eigenKernelOnOld(), and FixedPointSolve::solveStep().

5069 {
5070  TIME_SECTION("updateActiveObjects", 5, "Updating Active Objects");
5071 
5072  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
5073  {
5074  for (auto & nl : _nl)
5075  nl->updateActive(tid);
5076  _aux->updateActive(tid);
5079  _markers.updateActive(tid);
5081  _materials.updateActive(tid);
5083  }
5084 
5092 }
unsigned int n_threads()
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.
void updateActive(THREAD_ID tid=0) override
Updates the active objects storage.
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling &#39;computeDT&#39;)
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
virtual void updateActive(THREAD_ID tid=0)
Update the active status of Kernels.
MooseObjectWarehouse< Indicator > _indicators
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
MaterialWarehouse _discrete_materials
virtual void updateActive(THREAD_ID tid=0) override
Update the active status of Kernels.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
MooseObjectWarehouse< Marker > _markers
MaterialWarehouse _all_materials
unsigned int THREAD_ID
Definition: MooseTypes.h:209
MaterialWarehouse _materials

◆ updateGeomSearch()

void FEProblemBase::updateGeomSearch ( GeometricSearchData::GeometricSearchType  type = GeometricSearchData::ALL)
overridevirtualinherited

Implements SubProblem.

Definition at line 7755 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::augmentSparsity(), and FEProblemBase::initialSetup().

7756 {
7757  TIME_SECTION("updateGeometricSearch", 3, "Updating Geometric Search");
7758 
7760 
7761  if (_displaced_problem)
7762  _displaced_problem->updateGeomSearch(type);
7763 }
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
void update(GeometricSearchType type=ALL)
Update all of the search objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
GeometricSearchData _geometric_search_data

◆ updateMeshXFEM()

bool FEProblemBase::updateMeshXFEM ( )
virtualinherited

Update the mesh due to changing XFEM cuts.

Definition at line 8022 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup(), and FixedPointSolve::solveStep().

8023 {
8024  TIME_SECTION("updateMeshXFEM", 5, "Updating XFEM");
8025 
8026  bool updated = false;
8027  if (haveXFEM())
8028  {
8029  if (_xfem->updateHeal())
8030  // XFEM exodiff tests rely on a given numbering because they cannot use map = true due to
8031  // having coincident elements. While conceptually speaking we do not need to contract the
8032  // mesh, we need its call to renumber_nodes_and_elements in order to preserve these tests
8033  meshChanged(
8034  /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/false);
8035 
8036  updated = _xfem->update(_time, _nl, *_aux);
8037  if (updated)
8038  {
8039  meshChanged(
8040  /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/false);
8041  _xfem->initSolution(_nl, *_aux);
8042  restoreSolutions();
8043  }
8044  }
8045  return updated;
8046 }
virtual void meshChanged()
Deprecated.
bool haveXFEM()
Find out whether the current analysis is using XFEM.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
virtual void restoreSolutions()
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.

◆ updateMortarMesh()

void FEProblemBase::updateMortarMesh ( )
virtualinherited

Definition at line 7766 of file FEProblemBase.C.

Referenced by FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualTags(), FEProblemBase::init(), FEProblemBase::initialSetup(), and FEProblemBase::meshChanged().

7767 {
7768  TIME_SECTION("updateMortarMesh", 5, "Updating Mortar Mesh");
7769 
7770  FloatingPointExceptionGuard fpe_guard(_app);
7771 
7772  _mortar_data.update();
7773 }
Scope guard for starting and stopping Floating Point Exception Trapping.
MortarData _mortar_data
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
void update()
Builds mortar segment meshes for each mortar interface.
Definition: MortarData.C:149

◆ updateSolution()

bool FEProblemBase::updateSolution ( NumericVector< libMesh::Number > &  vec_solution,
NumericVector< libMesh::Number > &  ghosted_solution 
)
virtualinherited

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 7734 of file FEProblemBase.C.

Referenced by FEProblemBase::computePostCheck().

7736 {
7737  return false;
7738 }

◆ useSNESMFReuseBase()

bool FEProblemBase::useSNESMFReuseBase ( )
inlineinherited

Return a flag that indicates if we are reusing the vector base.

Definition at line 2121 of file FEProblemBase.h.

Referenced by NonlinearSystem::potentiallySetupFiniteDifferencing().

2121 { return _snesmf_reuse_base; }
bool _snesmf_reuse_base
If or not to resuse the base vector for matrix-free calculation.

◆ validParams()

InputParameters FEProblem::validParams ( )
static

Definition at line 26 of file FEProblem.C.

Referenced by ReferenceResidualProblem::validParams().

27 {
29  params.addClassDescription("A normal (default) Problem object that contains a single "
30  "NonlinearSystem and a single AuxiliarySystem object.");
31 
32  return params;
33 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
static InputParameters 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 136 of file SubProblem.C.

137 {
138  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
139 
140  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
141  for (const auto & vector_tag : _vector_tags)
142  if (vector_tag._name == tag_name_upper)
143  return true;
144 
145  return false;
146 }
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1167
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241

◆ vectorTagName()

TagName SubProblem::vectorTagName ( const TagID  tag) const
virtualinherited

Retrieve the name associated with a TagID.

Reimplemented in DisplacedProblem.

Definition at line 221 of file SubProblem.C.

Referenced by SystemBase::closeTaggedVector(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), SystemBase::removeVector(), NonlinearSystemBase::residualGhosted(), DisplacedProblem::vectorTagName(), and SystemBase::zeroTaggedVector().

222 {
223  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
224  if (!vectorTagExists(tag_id))
225  mooseError("Vector tag with ID ", tag_id, " does not exist");
226 
227  return _vector_tags[tag_id]._name;
228 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1167
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ 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 155 of file SubProblem.C.

Referenced by SystemBase::zeroTaggedVector().

156 {
157  return _not_zeroed_tagged_vectors.count(tag);
158 }
std::unordered_set< TagID > _not_zeroed_tagged_vectors
the list of vector tags that will not be zeroed when all other tags are
Definition: SubProblem.h:1117

◆ vectorTagType()

Moose::VectorTagType SubProblem::vectorTagType ( const TagID  tag_id) const
virtualinherited

Reimplemented in DisplacedProblem.

Definition at line 231 of file SubProblem.C.

Referenced by MooseVariableScalar::reinit(), TaggingInterface::TaggingInterface(), and DisplacedProblem::vectorTagType().

232 {
233  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
234  if (!vectorTagExists(tag_id))
235  mooseError("Vector tag with ID ", tag_id, " does not exist");
236 
237  return _vector_tags[tag_id]._type;
238 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1167
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:241
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ verboseMultiApps()

bool FEProblemBase::verboseMultiApps ( ) const
inlineinherited

Whether or not to use verbose printing for MultiApps.

Definition at line 1866 of file FEProblemBase.h.

Referenced by MultiApp::backup(), MultiApp::createApp(), MultiApp::restore(), FullSolveMultiApp::showStatusMessage(), and TransientMultiApp::solveStep().

1866 { return _verbose_multiapps; }
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ verifyVectorTags()

bool SubProblem::verifyVectorTags ( ) const
protectedinherited

Verify the integrity of _vector_tags and _typed_vector_tags.

Definition at line 241 of file SubProblem.C.

Referenced by SubProblem::addVectorTag(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), SubProblem::getVectorTags(), SubProblem::numVectorTags(), SubProblem::vectorTagExists(), SubProblem::vectorTagName(), and SubProblem::vectorTagType().

242 {
243  for (TagID tag_id = 0; tag_id < _vector_tags.size(); ++tag_id)
244  {
245  const auto & vector_tag = _vector_tags[tag_id];
246 
247  if (vector_tag._id != tag_id)
248  mooseError("Vector tag ", vector_tag._id, " id mismatch in _vector_tags");
249  if (vector_tag._type == Moose::VECTOR_TAG_ANY)
250  mooseError("Vector tag '", vector_tag._name, "' has type VECTOR_TAG_ANY");
251 
252  const auto search = _vector_tags_name_map.find(vector_tag._name);
253  if (search == _vector_tags_name_map.end())
254  mooseError("Vector tag ", vector_tag._id, " is not in _vector_tags_name_map");
255  else if (search->second != tag_id)
256  mooseError("Vector tag ", vector_tag._id, " has incorrect id in _vector_tags_name_map");
257 
258  unsigned int found_in_type = 0;
259  for (TagTypeID tag_type_id = 0; tag_type_id < _typed_vector_tags[vector_tag._type].size();
260  ++tag_type_id)
261  {
262  const auto & vector_tag_type = _typed_vector_tags[vector_tag._type][tag_type_id];
263  if (vector_tag_type == vector_tag)
264  {
265  ++found_in_type;
266  if (vector_tag_type._type_id != tag_type_id)
267  mooseError("Type ID for Vector tag ", tag_id, " is incorrect");
268  }
269  }
270 
271  if (found_in_type == 0)
272  mooseError("Vector tag ", tag_id, " not found in _typed_vector_tags");
273  if (found_in_type > 1)
274  mooseError("Vector tag ", tag_id, " found multiple times in _typed_vector_tags");
275  }
276 
277  unsigned int num_typed_vector_tags = 0;
278  for (const auto & typed_vector_tags : _typed_vector_tags)
279  num_typed_vector_tags += typed_vector_tags.size();
280  if (num_typed_vector_tags != _vector_tags.size())
281  mooseError("Size mismatch between _vector_tags and _typed_vector_tags");
282  if (_vector_tags_name_map.size() != _vector_tags.size())
283  mooseError("Size mismatch between _vector_tags and _vector_tags_name_map");
284 
285  return true;
286 }
unsigned int TagTypeID
Definition: MooseTypes.h:211
unsigned int TagID
Definition: MooseTypes.h:210
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1167
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1177
std::vector< std::vector< VectorTag > > _typed_vector_tags
The vector tags associated with each VectorTagType This is kept separate from _vector_tags for quick ...
Definition: SubProblem.h:1174
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

Member Data Documentation

◆ _action_factory

ActionFactory& MooseBaseParameterInterface::_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 1075 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
inherited

◆ _ad_second_zero

std::vector<MooseArray<ADRealTensorValue> > FEProblemBase::_ad_second_zero
inherited

◆ _ad_zero

std::vector<MooseArray<ADReal> > FEProblemBase::_ad_zero
inherited

◆ _adaptivity

Adaptivity FEProblemBase::_adaptivity
protectedinherited

◆ _all_materials

MaterialWarehouse FEProblemBase::_all_materials
protectedinherited

◆ _all_user_objects

ExecuteMooseObjectWarehouse<UserObject> FEProblemBase::_all_user_objects
protectedinherited

◆ _app

MooseApp& MooseBase::_app
protectedinherited

The MOOSE application this is associated with.

Definition at line 84 of file MooseBase.h.

◆ _assembly

std::vector<std::vector<std::unique_ptr<Assembly> > > FEProblemBase::_assembly
protectedinherited

The Assembly objects.

The first index corresponds to the thread ID and the second index corresponds to the nonlinear system number

Definition at line 2648 of file FEProblemBase.h.

Referenced by FEProblemBase::addCachedResidualDirectly(), FEProblemBase::addJacobian(), FEProblemBase::addJacobianBlockTags(), FEProblemBase::addJacobianLowerD(), FEProblemBase::addJacobianNeighbor(), FEProblemBase::addJacobianNeighborLowerD(), FEProblemBase::addJacobianOffDiagScalar(), FEProblemBase::addJacobianScalar(), FEProblemBase::addResidual(), FEProblemBase::addResidualLower(), FEProblemBase::addResidualNeighbor(), FEProblemBase::addResidualScalar(), FEProblemBase::assembly(), FEProblemBase::bumpAllQRuleOrder(), FEProblemBase::bumpVolumeQRuleOrder(), FEProblemBase::couplingEntries(), FEProblemBase::createQRules(), init(), FEProblemBase::init(), FEProblemBase::initElementStatefulProps(), FEProblemBase::initialSetup(), FEProblemBase::initXFEM(), FEProblemBase::meshChanged(), FEProblemBase::newAssemblyArray(), FEProblemBase::nonlocalCouplingEntries(), FEProblemBase::prepareAssembly(), FEProblemBase::prepareFaceShapes(), FEProblemBase::prepareNeighborShapes(), FEProblemBase::prepareShapes(), FEProblemBase::reinitDirac(), FEProblemBase::reinitElemNeighborAndLowerD(), FEProblemBase::reinitElemPhys(), FEProblemBase::reinitMaterials(), FEProblemBase::reinitMaterialsBoundary(), FEProblemBase::reinitMaterialsFace(), FEProblemBase::reinitMaterialsInterface(), FEProblemBase::reinitMaterialsNeighbor(), FEProblemBase::reinitNeighbor(), FEProblemBase::reinitNode(), FEProblemBase::reinitNodeFace(), FEProblemBase::reinitOffDiagScalars(), FEProblemBase::reinitScalars(), FEProblemBase::setCurrentSubdomainID(), FEProblemBase::setResidual(), FEProblemBase::setResidualNeighbor(), FEProblemBase::swapBackMaterials(), FEProblemBase::swapBackMaterialsFace(), and FEProblemBase::swapBackMaterialsNeighbor().

◆ _aux

std::shared_ptr<AuxiliarySystem> FEProblemBase::_aux
protectedinherited

The auxiliary system.

Definition at line 2638 of file FEProblemBase.h.

Referenced by FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addIndicator(), FEProblemBase::addMarker(), FEProblemBase::addMultiApp(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::advanceState(), FEProblemBase::checkExceptionAndStopSolve(), FEProblemBase::computeBounds(), FEProblemBase::computeIndicators(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeLinearSystemTags(), FEProblemBase::computeMarkers(), FEProblemBase::computePostCheck(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualTags(), FEProblemBase::computeSystems(), FEProblemBase::computeUserObjectsInternal(), FEProblemBase::copySolutionsBackwards(), FEProblemBase::createQRules(), FEProblemBase::createTagSolutions(), FEProblemBase::customSetup(), FEProblemBase::determineSolverSystem(), DumpObjectsProblem::DumpObjectsProblem(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), FEProblemBase::execute(), ExternalProblem::ExternalProblem(), FEProblem(), FEProblemBase::getActualFieldVariable(), FEProblemBase::getArrayVariable(), FEProblemBase::getAuxiliarySystem(), FEProblemBase::getScalarVariable(), FEProblemBase::getStandardVariable(), FEProblemBase::getSystem(), FEProblemBase::getSystemBase(), FEProblemBase::getVariable(), FEProblemBase::getVariableNames(), FEProblemBase::getVectorVariable(), FEProblemBase::hasScalarVariable(), FEProblemBase::hasVariable(), FEProblemBase::init(), FEProblemBase::initialSetup(), FEProblemBase::meshChanged(), FEProblemBase::needBoundaryMaterialOnSide(), FEProblemBase::needSolutionState(), FEProblemBase::outputStep(), FEProblemBase::prepareFace(), FEProblemBase::projectInitialConditionOnCustomRange(), FEProblemBase::projectSolution(), FEProblemBase::reinitDirac(), FEProblemBase::reinitElem(), FEProblemBase::reinitElemPhys(), FEProblemBase::reinitNeighbor(), FEProblemBase::reinitNode(), FEProblemBase::reinitNodeFace(), FEProblemBase::reinitNodes(), FEProblemBase::reinitNodesNeighbor(), FEProblemBase::reinitScalars(), FEProblemBase::restoreOldSolutions(), FEProblemBase::restoreSolutions(), FEProblemBase::saveOldSolutions(), FEProblemBase::systemBaseAuxiliary(), FEProblemBase::systemNumForVariable(), FEProblemBase::timestepSetup(), FEProblemBase::updateActiveObjects(), and FEProblemBase::updateMeshXFEM().

◆ _aux_evaluable_local_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_aux_evaluable_local_elem_range
protectedinherited

Definition at line 2918 of file FEProblemBase.h.

◆ _between_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_between_multi_app_transfers
protectedinherited

◆ _block_mat_side_cache

std::vector<std::unordered_map<SubdomainID, bool> > FEProblemBase::_block_mat_side_cache
protectedinherited

Cache for calculating materials on side.

Definition at line 2725 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::needSubdomainMaterialOnSide().

◆ _bnd_mat_side_cache

std::vector<std::unordered_map<BoundaryID, bool> > FEProblemBase::_bnd_mat_side_cache
protectedinherited

Cache for calculating materials on side.

Definition at line 2728 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::needBoundaryMaterialOnSide().

◆ _bnd_material_props

MaterialPropertyStorage& FEProblemBase::_bnd_material_props
protectedinherited

◆ _boundary_restricted_elem_integrity_check

const bool FEProblemBase::_boundary_restricted_elem_integrity_check
protectedinherited

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 2857 of file FEProblemBase.h.

Referenced by FEProblemBase::initialSetup().

◆ _boundary_restricted_node_integrity_check

const bool FEProblemBase::_boundary_restricted_node_integrity_check
protectedinherited

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 2853 of file FEProblemBase.h.

Referenced by FEProblemBase::initialSetup().

◆ _calculate_jacobian_in_uo

bool FEProblemBase::_calculate_jacobian_in_uo
protectedinherited

◆ _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
protectedinherited

◆ _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 1102 of file SubProblem.h.

Referenced by SubProblem::computingNonlinearResid(), and FEProblemBase::computingNonlinearResid().

◆ _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(), MeshOnlyAction::act(), SetupDebugAction::act(), MaterialOutputAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), DefaultSteadyStateConvergence::checkConvergence(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualConvergence::checkRelativeConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), LinearSystem::computeLinearSystemTags(), FEProblemBase::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MFEMSteady::execute(), MessageFromInput::execute(), SteadyBase::execute(), Eigenvalue::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), CoarsenBlockGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), DefaultMultiAppFixedPointConvergence::initialize(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseBaseErrorInterface::mooseDeprecated(), MooseBaseErrorInterface::mooseInfo(), MooseBaseErrorInterface::mooseWarning(), MooseBaseErrorInterface::mooseWarningNonPrefixed(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), ReporterDebugOutput::output(), PerfGraphOutput::output(), SolutionInvalidityOutput::output(), MaterialPropertyDebugOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), PicardSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), NEML2Action::printSummary(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), FEProblemBase::restoreSolutions(), NonlinearSystemBase::setInitialSolution(), MooseApp::setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), EigenProblem::solve(), FEProblemSolve::solve(), FixedPointSolve::solve(), NonlinearSystem::solve(), LinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), LStableDirk4::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), FixedPointSolve::solveStep(), PerfGraphLivePrint::start(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), TransientBase::takeStep(), TerminateChainControl::terminate(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _const_jacobian

bool FEProblemBase::_const_jacobian
protectedinherited

true if the Jacobian is constant

Definition at line 2825 of file FEProblemBase.h.

Referenced by FEProblemBase::computeJacobianTags(), FEProblemBase::constJacobian(), and FEProblemBase::setConstJacobian().

◆ _control_warehouse

ExecuteMooseObjectWarehouse<Control> FEProblemBase::_control_warehouse
protectedinherited

The control logic warehouse.

Definition at line 2903 of file FEProblemBase.h.

Referenced by FEProblemBase::executeControls(), FEProblemBase::getControlWarehouse(), and FEProblemBase::updateActiveObjects().

◆ _convergences

MooseObjectWarehouse<Convergence> FEProblemBase::_convergences
protectedinherited

◆ _coupling

Moose::CouplingType FEProblemBase::_coupling
protectedinherited

◆ _current_algebraic_bnd_node_range

std::unique_ptr<ConstBndNodeRange> FEProblemBase::_current_algebraic_bnd_node_range
protectedinherited

◆ _current_algebraic_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_current_algebraic_elem_range
protectedinherited

◆ _current_algebraic_node_range

std::unique_ptr<libMesh::ConstNodeRange> FEProblemBase::_current_algebraic_node_range
protectedinherited

◆ _current_execute_on_flag

ExecFlagType FEProblemBase::_current_execute_on_flag
protectedinherited

◆ _current_ic_state

unsigned short FEProblemBase::_current_ic_state
protectedinherited

◆ _current_linear_sys

LinearSystem* FEProblemBase::_current_linear_sys
protectedinherited

◆ _current_nl_sys

NonlinearSystemBase* FEProblemBase::_current_nl_sys
protectedinherited

The current nonlinear system that we are solving.

Definition at line 2620 of file FEProblemBase.h.

Referenced by FEProblemBase::addCachedResidualDirectly(), FEProblemBase::addJacobian(), FEProblemBase::addJacobianBlockTags(), FEProblemBase::addJacobianLowerD(), FEProblemBase::addJacobianNeighbor(), FEProblemBase::addJacobianNeighborLowerD(), FEProblemBase::addJacobianOffDiagScalar(), FEProblemBase::addJacobianScalar(), FEProblemBase::addResidual(), FEProblemBase::addResidualLower(), FEProblemBase::addResidualNeighbor(), FEProblemBase::addResidualScalar(), FEProblemBase::checkExceptionAndStopSolve(), FEProblemBase::computeBounds(), FEProblemBase::computeDamping(), FEProblemBase::computeJacobianBlock(), EigenProblem::computeJacobianBlocks(), FEProblemBase::computeJacobianBlocks(), FEProblemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTag(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeNearNullSpace(), FEProblemBase::computeNullSpace(), FEProblemBase::computePostCheck(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualL2Norm(), FEProblemBase::computeResidualTag(), FEProblemBase::computeResidualTags(), FEProblemBase::computeResidualType(), FEProblemBase::computeTransposeNullSpace(), FEProblemBase::currentNonlinearSystem(), EigenProblem::doFreeNonlinearPowerIterations(), EigenProblem::EigenProblem(), FEProblemBase::prepareAssembly(), FEProblemBase::prepareFaceShapes(), FEProblemBase::prepareNeighborShapes(), FEProblemBase::prepareShapes(), FEProblemBase::reinitDirac(), FEProblemBase::reinitOffDiagScalars(), FEProblemBase::setCurrentNonlinearSystem(), FEProblemBase::setResidual(), FEProblemBase::setResidualNeighbor(), EigenProblem::solve(), and FEProblemBase::solve().

◆ _current_solver_sys

SolverSystem* FEProblemBase::_current_solver_sys
protectedinherited

The current solver system.

Definition at line 2623 of file FEProblemBase.h.

Referenced by FEProblemBase::setCurrentLinearSystem(), and FEProblemBase::setCurrentNonlinearSystem().

◆ _currently_computing_jacobian

bool SubProblem::_currently_computing_jacobian
protectedinherited

◆ _currently_computing_residual

bool SubProblem::_currently_computing_residual
protectedinherited

◆ _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 1099 of file SubProblem.h.

Referenced by SubProblem::currentlyComputingResidualAndJacobian(), and SubProblem::setCurrentlyComputingResidualAndJacobian().

◆ _cycles_completed

unsigned int FEProblemBase::_cycles_completed
protectedinherited

◆ _default_ghosting

bool SubProblem::_default_ghosting
protectedinherited

Whether or not to use default libMesh coupling.

Definition at line 1090 of file SubProblem.h.

Referenced by SubProblem::defaultGhosting().

◆ _dirac_kernel_info

DiracKernelInfo SubProblem::_dirac_kernel_info
protectedinherited

◆ _discrete_materials

MaterialWarehouse FEProblemBase::_discrete_materials
protectedinherited

◆ _displaced_mesh

MooseMesh* FEProblemBase::_displaced_mesh
protectedinherited

◆ _displaced_problem

std::shared_ptr<DisplacedProblem> FEProblemBase::_displaced_problem
protectedinherited

Definition at line 2792 of file FEProblemBase.h.

Referenced by FEProblemBase::adaptMesh(), FEProblemBase::addAnyRedistributers(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addCachedJacobian(), FEProblemBase::addCachedResidual(), FEProblemBase::addCachedResidualDirectly(), FEProblemBase::addConstraint(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDisplacedProblem(), FEProblemBase::addFunction(), FEProblemBase::addFunctorMaterial(), FEProblemBase::addFVKernel(), FEProblemBase::addGhostedBoundary(), FEProblemBase::addIndicator(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addJacobian(), FEProblemBase::addJacobianBlockTags(), FEProblemBase::addJacobianLowerD(), FEProblemBase::addJacobianNeighbor(), FEProblemBase::addJacobianNeighborLowerD(), FEProblemBase::addMarker(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addResidual(), FEProblemBase::addResidualLower(), FEProblemBase::addResidualNeighbor(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVariable(), FEProblemBase::advanceState(), FEProblemBase::automaticScaling(), FEProblemBase::bumpAllQRuleOrder(), FEProblemBase::bumpVolumeQRuleOrder(), FEProblemBase::cacheJacobian(), FEProblemBase::cacheJacobianNeighbor(), FEProblemBase::cacheResidual(), FEProblemBase::cacheResidualNeighbor(), FEProblemBase::checkDisplacementOrders(), FEProblemBase::clearActiveElementalMooseVariables(), FEProblemBase::clearActiveFEVariableCoupleableMatrixTags(), FEProblemBase::clearActiveFEVariableCoupleableVectorTags(), FEProblemBase::clearActiveScalarVariableCoupleableMatrixTags(), FEProblemBase::clearActiveScalarVariableCoupleableVectorTags(), FEProblemBase::clearDiracInfo(), EigenProblem::computeJacobianBlocks(), FEProblemBase::computeJacobianBlocks(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualTags(), FEProblemBase::computeUserObjectsInternal(), FEProblemBase::computingNonlinearResid(), FEProblemBase::createMortarInterface(), FEProblemBase::createQRules(), FEProblemBase::customSetup(), FEProblemBase::execute(), FEProblemBase::getDiracElements(), FEProblemBase::getDisplacedProblem(), FEProblemBase::getMortarUserObjects(), FEProblemBase::ghostGhostedBoundaries(), FEProblemBase::haveADObjects(), FEProblemBase::haveDisplaced(), FEProblemBase::init(), FEProblemBase::initialSetup(), FEProblemBase::initXFEM(), FEProblemBase::jacobianSetup(), FEProblemBase::mesh(), FEProblemBase::meshChanged(), FEProblemBase::outputStep(), FEProblemBase::possiblyRebuildGeomSearchPatches(), FEProblemBase::prepareAssembly(), FEProblemBase::prepareFace(), FEProblemBase::reinitBecauseOfGhostingOrNewGeomObjects(), FEProblemBase::reinitDirac(), FEProblemBase::reinitElem(), FEProblemBase::reinitElemFaceRef(), FEProblemBase::reinitElemNeighborAndLowerD(), FEProblemBase::reinitLowerDElem(), FEProblemBase::reinitNeighbor(), FEProblemBase::reinitNeighborFaceRef(), FEProblemBase::reinitNode(), FEProblemBase::reinitNodeFace(), FEProblemBase::reinitNodes(), FEProblemBase::reinitNodesNeighbor(), FEProblemBase::reinitOffDiagScalars(), FEProblemBase::reinitScalars(), FEProblemBase::resetState(), FEProblemBase::residualSetup(), FEProblemBase::restoreSolutions(), FEProblemBase::setActiveElementalMooseVariables(), FEProblemBase::setActiveFEVariableCoupleableMatrixTags(), FEProblemBase::setActiveFEVariableCoupleableVectorTags(), FEProblemBase::setActiveScalarVariableCoupleableMatrixTags(), FEProblemBase::setActiveScalarVariableCoupleableVectorTags(), FEProblemBase::setCurrentBoundaryID(), FEProblemBase::setCurrentLowerDElem(), FEProblemBase::setCurrentlyComputingResidual(), FEProblemBase::setCurrentSubdomainID(), FEProblemBase::setResidual(), FEProblemBase::setResidualNeighbor(), FEProblemBase::setResidualObjectParamsAndLog(), EigenProblem::solve(), FEProblemBase::solve(), FEProblemBase::timestepSetup(), FEProblemBase::uniformRefine(), and FEProblemBase::updateGeomSearch().

◆ _dt

Real& FEProblemBase::_dt
protectedinherited

◆ _dt_old

Real& FEProblemBase::_dt_old
protectedinherited

Definition at line 2580 of file FEProblemBase.h.

Referenced by FEProblemBase::dtOld(), and FEProblemBase::FEProblemBase().

◆ _enabled

const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects.

Definition at line 51 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _evaluable_local_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_evaluable_local_elem_range
protectedinherited

◆ _exception_message

std::string FEProblemBase::_exception_message
protectedinherited

The error message to go with an exception.

Definition at line 2897 of file FEProblemBase.h.

Referenced by FEProblemBase::checkExceptionAndStopSolve(), and FEProblemBase::setException().

◆ _factory

Factory& SubProblem::_factory
protectedinherited

◆ _fe_matrix_tags

std::set<TagID> FEProblemBase::_fe_matrix_tags
protectedinherited

◆ _fe_vector_tags

std::set<TagID> FEProblemBase::_fe_vector_tags
protectedinherited

◆ _from_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_from_multi_app_transfers
protectedinherited

◆ _functions

MooseObjectWarehouse<Function> FEProblemBase::_functions
protectedinherited

◆ _fv_bcs_integrity_check

bool FEProblemBase::_fv_bcs_integrity_check
protectedinherited

Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset.

Definition at line 2864 of file FEProblemBase.h.

Referenced by FEProblemBase::fvBCsIntegrityCheck().

◆ _fv_ics

FVInitialConditionWarehouse FEProblemBase::_fv_ics
protectedinherited

◆ _geometric_search_data

GeometricSearchData FEProblemBase::_geometric_search_data
protectedinherited

◆ _ghosted_elems

std::set<dof_id_type> SubProblem::_ghosted_elems
protectedinherited

◆ _grad_phi_zero

std::vector<VariablePhiGradient> FEProblemBase::_grad_phi_zero
inherited

◆ _grad_zero

std::vector<VariableGradient> FEProblemBase::_grad_zero
inherited

◆ _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 1079 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
protectedinherited

◆ _has_constraints

bool FEProblemBase::_has_constraints
protectedinherited

Whether or not this system has any Constraints.

Definition at line 2810 of file FEProblemBase.h.

Referenced by FEProblemBase::addConstraint(), NonlinearSystemBase::computeJacobianInternal(), and NonlinearSystemBase::computeResidualInternal().

◆ _has_dampers

bool FEProblemBase::_has_dampers
protectedinherited

Whether or not this system has any Dampers associated with it.

Definition at line 2807 of file FEProblemBase.h.

Referenced by FEProblemBase::addDamper(), FEProblemBase::computeDamping(), FEProblemBase::computePostCheck(), and FEProblemBase::hasDampers().

◆ _has_exception

bool FEProblemBase::_has_exception
protectedinherited

Whether or not an exception has occurred.

Definition at line 2882 of file FEProblemBase.h.

Referenced by FEProblemBase::checkExceptionAndStopSolve(), FEProblemBase::hasException(), and FEProblemBase::setException().

◆ _has_initialized_stateful

bool FEProblemBase::_has_initialized_stateful
protectedinherited

Whether nor not stateful materials have been initialized.

Definition at line 2822 of file FEProblemBase.h.

Referenced by FEProblemBase::initialSetup(), and FEProblemBase::meshChanged().

◆ _has_jacobian

bool FEProblemBase::_has_jacobian
protectedinherited

Indicates if the Jacobian was computed.

Definition at line 2828 of file FEProblemBase.h.

Referenced by FEProblemBase::computeJacobianTags(), FEProblemBase::hasJacobian(), and FEProblemBase::meshChanged().

◆ _has_nonlocal_coupling

bool FEProblemBase::_has_nonlocal_coupling
protectedinherited

◆ _has_time_integrator

bool FEProblemBase::_has_time_integrator
protectedinherited

Indicates whether or not this executioner has a time integrator (during setup)

Definition at line 2879 of file FEProblemBase.h.

Referenced by FEProblemBase::addTimeIntegrator(), and FEProblemBase::hasTimeIntegrator().

◆ _have_ad_objects

bool SubProblem::_have_ad_objects
protectedinherited

AD flag indicating whether any AD objects have been added.

Definition at line 1114 of file SubProblem.h.

Referenced by DisplacedProblem::haveADObjects(), SubProblem::haveADObjects(), and FEProblemBase::haveADObjects().

◆ _ics

InitialConditionWarehouse FEProblemBase::_ics
protectedinherited

◆ _indicators

MooseObjectWarehouse<Indicator> FEProblemBase::_indicators
protectedinherited

◆ _initialized

bool FEProblemBase::_initialized
protectedinherited

Definition at line 2551 of file FEProblemBase.h.

Referenced by FEProblemBase::init().

◆ _input_file_saved

bool FEProblemBase::_input_file_saved
protectedinherited

whether input file has been written

Definition at line 2804 of file FEProblemBase.h.

◆ _interface_mat_side_cache

std::vector<std::unordered_map<BoundaryID, bool> > FEProblemBase::_interface_mat_side_cache
protectedinherited

Cache for calculating materials on interface.

Definition at line 2731 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::needInterfaceMaterialOnSide().

◆ _interface_materials

MaterialWarehouse FEProblemBase::_interface_materials
protectedinherited

◆ _internal_side_indicators

MooseObjectWarehouse<InternalSideIndicatorBase> FEProblemBase::_internal_side_indicators
protectedinherited

◆ _is_petsc_options_inserted

bool FEProblemBase::_is_petsc_options_inserted
protectedinherited

If or not PETSc options have been added to database.

Definition at line 2912 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), FEProblemBase::petscOptionsInserted(), FEProblemBase::solve(), and FEProblemBase::solveLinearSystem().

◆ _kernel_coverage_blocks

std::vector<SubdomainName> FEProblemBase::_kernel_coverage_blocks
protectedinherited

Definition at line 2849 of file FEProblemBase.h.

Referenced by FEProblemBase::checkProblemIntegrity().

◆ _kernel_coverage_check

CoverageCheckMode FEProblemBase::_kernel_coverage_check
protectedinherited

Determines whether and which subdomains are to be checked to ensure that they have an active kernel.

Definition at line 2848 of file FEProblemBase.h.

Referenced by FEProblemBase::checkProblemIntegrity(), and FEProblemBase::setKernelCoverageCheck().

◆ _line_search

std::shared_ptr<LineSearch> FEProblemBase::_line_search
protectedinherited

◆ _linear_convergence_names

std::optional<std::vector<ConvergenceName> > FEProblemBase::_linear_convergence_names
protectedinherited

Linear system(s) convergence name(s) (if any)

Definition at line 2556 of file FEProblemBase.h.

Referenced by FEProblemBase::getLinearConvergenceNames(), FEProblemBase::hasLinearConvergenceObjects(), and FEProblemBase::setLinearConvergenceNames().

◆ _linear_matrix_tags

std::set<TagID> FEProblemBase::_linear_matrix_tags
protectedinherited

Temporary storage for filtered matrix tags for linear systems.

Definition at line 2570 of file FEProblemBase.h.

Referenced by FEProblemBase::computeLinearSystemSys().

◆ _linear_sys_name_to_num

std::map<LinearSystemName, unsigned int> FEProblemBase::_linear_sys_name_to_num
protectedinherited

Map from linear system name to number.

Definition at line 2599 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::linearSysNum().

◆ _linear_sys_names

const std::vector<LinearSystemName> FEProblemBase::_linear_sys_names
protectedinherited

◆ _linear_systems

std::vector<std::shared_ptr<LinearSystem> > FEProblemBase::_linear_systems
protectedinherited

◆ _linear_vector_tags

std::set<TagID> FEProblemBase::_linear_vector_tags
protectedinherited

Temporary storage for filtered vector tags for linear systems.

Definition at line 2567 of file FEProblemBase.h.

Referenced by FEProblemBase::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 1052 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 1070 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 1055 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
protectedinherited

◆ _material_coverage_blocks

std::vector<SubdomainName> FEProblemBase::_material_coverage_blocks
protectedinherited

Definition at line 2861 of file FEProblemBase.h.

Referenced by FEProblemBase::checkProblemIntegrity().

◆ _material_coverage_check

CoverageCheckMode FEProblemBase::_material_coverage_check
protectedinherited

Determines whether and which subdomains are to be checked to ensure that they have an active material.

Definition at line 2860 of file FEProblemBase.h.

Referenced by FEProblemBase::checkProblemIntegrity(), and FEProblemBase::setMaterialCoverageCheck().

◆ _material_dependency_check

const bool FEProblemBase::_material_dependency_check
protectedinherited

Determines whether a check to verify material dependencies on every subdomain.

Definition at line 2867 of file FEProblemBase.h.

Referenced by FEProblemBase::checkProblemIntegrity().

◆ _material_prop_registry

MaterialPropertyRegistry FEProblemBase::_material_prop_registry
protectedinherited

Definition at line 2675 of file FEProblemBase.h.

Referenced by FEProblemBase::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 1062 of file SubProblem.h.

Referenced by SubProblem::isMatPropRequested(), and SubProblem::markMatPropRequested().

◆ _material_props

MaterialPropertyStorage& FEProblemBase::_material_props
protectedinherited

◆ _materials

MaterialWarehouse FEProblemBase::_materials
protectedinherited

◆ _matrix_tag_id_to_tag_name

std::map<TagID, TagName> SubProblem::_matrix_tag_id_to_tag_name
protectedinherited

Reverse map.

Definition at line 1044 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
protectedinherited

Maximum number of quadrature points used in the problem.

Definition at line 2873 of file FEProblemBase.h.

Referenced by FEProblemBase::getMaxQps(), FEProblemBase::reinitDirac(), and FEProblemBase::updateMaxQps().

◆ _max_scalar_order

libMesh::Order FEProblemBase::_max_scalar_order
protectedinherited

Maximum scalar variable order.

Definition at line 2876 of file FEProblemBase.h.

Referenced by FEProblemBase::addAuxScalarVariable(), and FEProblemBase::getMaxScalarOrder().

◆ _mesh

MooseMesh& FEProblemBase::_mesh
protectedinherited

Definition at line 2521 of file FEProblemBase.h.

Referenced by FEProblemBase::adaptMesh(), FEProblemBase::addAnyRedistributers(), FEProblemBase::addAuxVariable(), FEProblemBase::addGhostedBoundary(), FEProblemBase::addGhostedElem(), FEProblemBase::addVariable(), FEProblemBase::checkCoordinateSystems(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkProblemIntegrity(), FEProblemBase::checkUserObjects(), FEProblemBase::computeIndicators(), FEProblemBase::computeMarkers(), FEProblemBase::computeUserObjectsInternal(), DumpObjectsProblem::dumpVariableHelper(), FEProblemBase::duplicateVariableCheck(), FEProblemBase::getCurrentAlgebraicBndNodeRange(), FEProblemBase::getCurrentAlgebraicElementRange(), FEProblemBase::getCurrentAlgebraicNodeRange(), FEProblemBase::getDiracElements(), FEProblemBase::getEvaluableElementRange(), FEProblemBase::getNonlinearEvaluableElementRange(), FEProblemBase::ghostGhostedBoundaries(), FEProblemBase::init(), FEProblemBase::initialAdaptMesh(), FEProblemBase::initialSetup(), FEProblemBase::initXFEM(), MFEMProblem::mesh(), FEProblemBase::mesh(), FEProblemBase::meshChanged(), FEProblemBase::possiblyRebuildGeomSearchPatches(), FEProblemBase::prepareMaterials(), FEProblemBase::projectSolution(), FEProblemBase::reinitElemNeighborAndLowerD(), FEProblemBase::reinitElemPhys(), FEProblemBase::setAxisymmetricCoordAxis(), FEProblemBase::setCoordSystem(), FEProblemBase::timestepSetup(), FEProblemBase::uniformRefine(), and FEProblemBase::updateMaxQps().

◆ _mesh_divisions

MooseObjectWarehouse<MeshDivision> FEProblemBase::_mesh_divisions
protectedinherited

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 2653 of file FEProblemBase.h.

Referenced by FEProblemBase::addMeshDivision(), and FEProblemBase::getMeshDivision().

◆ _mortar_data

MortarData FEProblemBase::_mortar_data
protectedinherited

◆ _multi_apps

ExecuteMooseObjectWarehouse<MultiApp> FEProblemBase::_multi_apps
protectedinherited

◆ _multiapp_fixed_point_convergence_name

std::optional<ConvergenceName> FEProblemBase::_multiapp_fixed_point_convergence_name
protectedinherited

◆ _name

const std::string MooseBase::_name
protectedinherited

The name of this class.

Definition at line 90 of file MooseBase.h.

Referenced by AddBCAction::act(), AddConstraintAction::act(), AddKernelAction::act(), AddDamperAction::act(), AddDiracKernelAction::act(), PartitionerAction::act(), AddMultiAppAction::act(), AddFVInitialConditionAction::act(), AddInterfaceKernelAction::act(), AddIndicatorAction::act(), AddUserObjectAction::act(), AddDGKernelAction::act(), AddMarkerAction::act(), AddMeshGeneratorAction::act(), AddInitialConditionAction::act(), AddNodalKernelAction::act(), AddFVInterfaceKernelAction::act(), AddPostprocessorAction::act(), AddMaterialAction::act(), AddScalarKernelAction::act(), AddTransferAction::act(), AddFunctorMaterialAction::act(), AddVectorPostprocessorAction::act(), ReadExecutorParamsAction::act(), AddPositionsAction::act(), AddReporterAction::act(), AddTimesAction::act(), AddFieldSplitAction::act(), AddFVKernelAction::act(), AddFVBCAction::act(), AddFunctionAction::act(), AddConvergenceAction::act(), AddMeshDivisionAction::act(), AddHDGKernelAction::act(), AddTimeStepperAction::act(), AddDistributionAction::act(), SetupPreconditionerAction::act(), SetupTimeIntegratorAction::act(), AddOutputAction::act(), AddLinearFVBCAction::act(), AddLinearFVKernelAction::act(), AddCorrectorAction::act(), AddMeshModifiersAction::act(), AddSamplerAction::act(), AddControlAction::act(), AddMFEMSolverAction::act(), AddMFEMPreconditionerAction::act(), AddMFEMSubMeshAction::act(), AddMFEMFESpaceAction::act(), AddPeriodicBCAction::act(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromXY(), PiecewiseLinearBase::buildInterpolation(), CombinerGenerator::CombinerGenerator(), Executor::Executor(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), FunctionDT::FunctionDT(), FillBetweenCurvesGenerator::generate(), FillBetweenPointVectorsGenerator::generate(), FillBetweenSidesetsGenerator::generate(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::name(), 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
protectedinherited

Flag that the problem needs to add the default fixed point convergence.

Definition at line 2585 of file FEProblemBase.h.

Referenced by FEProblemBase::needToAddDefaultMultiAppFixedPointConvergence(), and FEProblemBase::setNeedToAddDefaultMultiAppFixedPointConvergence().

◆ _need_to_add_default_nonlinear_convergence

bool FEProblemBase::_need_to_add_default_nonlinear_convergence
protectedinherited

Flag that the problem needs to add the default nonlinear convergence.

Definition at line 2583 of file FEProblemBase.h.

Referenced by FEProblemBase::needToAddDefaultNonlinearConvergence(), and FEProblemBase::setNeedToAddDefaultNonlinearConvergence().

◆ _need_to_add_default_steady_state_convergence

bool FEProblemBase::_need_to_add_default_steady_state_convergence
protectedinherited

Flag that the problem needs to add the default steady convergence.

Definition at line 2587 of file FEProblemBase.h.

Referenced by FEProblemBase::needToAddDefaultSteadyStateConvergence(), and FEProblemBase::setNeedToAddDefaultSteadyStateConvergence().

◆ _needs_old_newton_iter

bool FEProblemBase::_needs_old_newton_iter
protectedinherited

Indicates that we need to compute variable values for previous Newton iteration.

Definition at line 2831 of file FEProblemBase.h.

◆ _neighbor_material_props

MaterialPropertyStorage& FEProblemBase::_neighbor_material_props
protectedinherited

◆ _nl

std::vector<std::shared_ptr<NonlinearSystemBase> > FEProblemBase::_nl
private

The nonlinear systems.

Definition at line 2614 of file FEProblemBase.h.

◆ _nl_evaluable_local_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_nl_evaluable_local_elem_range
protectedinherited

◆ _nl_sys

std::vector<std::shared_ptr<NonlinearSystem> > FEProblem::_nl_sys
protected

Definition at line 39 of file FEProblem.h.

Referenced by FEProblem(), getNonlinearSystem(), and init().

◆ _nl_sys_name_to_num

std::map<NonlinearSystemName, unsigned int> FEProblemBase::_nl_sys_name_to_num
protectedinherited

Map from nonlinear system name to number.

Definition at line 2617 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::nlSysNum().

◆ _nl_sys_names

const std::vector<NonlinearSystemName> FEProblemBase::_nl_sys_names
protectedinherited

◆ _nonlinear_convergence_names

std::optional<std::vector<ConvergenceName> > FEProblemBase::_nonlinear_convergence_names
protectedinherited

Nonlinear system(s) convergence name(s)

Definition at line 2554 of file FEProblemBase.h.

Referenced by FEProblemBase::getNonlinearConvergenceNames(), and FEProblemBase::setNonlinearConvergenceNames().

◆ _nonlocal_integrated_bcs

MooseObjectWarehouse<IntegratedBCBase> FEProblemBase::_nonlocal_integrated_bcs
protectedinherited

◆ _nonlocal_kernels

MooseObjectWarehouse<KernelBase> FEProblemBase::_nonlocal_kernels
protectedinherited

◆ _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 1117 of file SubProblem.h.

Referenced by SubProblem::addNotZeroedVectorTag(), and SubProblem::vectorTagNotZeroed().

◆ _notify_when_mesh_changes

std::vector<MeshChangedInterface *> FEProblemBase::_notify_when_mesh_changes
protectedinherited

Objects to be notified when the mesh changes.

Definition at line 2734 of file FEProblemBase.h.

Referenced by FEProblemBase::meshChanged(), and FEProblemBase::notifyWhenMeshChanges().

◆ _notify_when_mesh_displaces

std::vector<MeshDisplacedInterface *> FEProblemBase::_notify_when_mesh_displaces
protectedinherited

Objects to be notified when the mesh displaces.

Definition at line 2737 of file FEProblemBase.h.

Referenced by FEProblemBase::meshDisplaced(), and FEProblemBase::notifyWhenMeshDisplaces().

◆ _num_linear_sys

const std::size_t FEProblemBase::_num_linear_sys
protectedinherited

The number of linear systems.

Definition at line 2593 of file FEProblemBase.h.

Referenced by FEProblem(), FEProblemBase::FEProblemBase(), init(), FEProblemBase::numLinearSystems(), and FEProblemBase::numSolverSystems().

◆ _num_nl_sys

const std::size_t FEProblemBase::_num_nl_sys
protectedinherited

◆ _parallel_barrier_messaging

bool FEProblemBase::_parallel_barrier_messaging
protectedinherited

◆ _pars

const InputParameters& MooseBaseParameterInterface::_pars
protectedinherited

Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

Definition at line 173 of file MooseBaseParameterInterface.h.

Referenced by AddFVICAction::act(), AddICAction::act(), CreateProblemDefaultAction::act(), CreateProblemAction::act(), SetupMeshAction::act(), ComposeTimeStepperAction::act(), SetupDebugAction::act(), AddAuxKernelAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), FunctorMaterial::addFunctorPropertyByBlocks(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), PiecewiseTabularBase::buildFromFile(), PNGOutput::calculateRescalingValues(), MooseBaseParameterInterface::connectControllableParams(), Console::Console(), MaterialBase::declareADProperty(), MaterialBase::declareProperty(), FEProblemSolve::FEProblemSolve(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), FileMeshGenerator::generate(), MaterialBase::getGenericZeroMaterialProperty(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBaseParameterInterface::getParam(), MooseBaseParameterInterface::getRenamedParam(), MeshGenerator::hasGenerateData(), AddVariableAction::init(), AdvancedOutput::initExecutionTypes(), Console::initialSetup(), MooseBaseParameterInterface::isParamSetByUser(), MooseBaseParameterInterface::isParamValid(), MultiApp::keepSolutionDuringRestore(), MooseBaseParameterInterface::MooseBaseParameterInterface(), MooseBaseParameterInterface::paramErrorMsg(), GlobalParamsAction::parameters(), MooseBaseParameterInterface::parameters(), MooseMesh::prepare(), Eigenvalue::prepareSolverOptions(), MooseMesh::setCoordSystem(), MooseMesh::setPartitionerHelper(), SetupMeshAction::setupMesh(), TransientBase::setupTimeIntegrator(), MooseBaseParameterInterface::uniqueName(), and MooseBaseParameterInterface::uniqueParameterName().

◆ _petsc_option_data_base

PetscOptions FEProblemBase::_petsc_option_data_base
protectedinherited

◆ _petsc_options

Moose::PetscSupport::PetscOptions FEProblemBase::_petsc_options
protectedinherited

PETSc option storage.

Definition at line 2906 of file FEProblemBase.h.

Referenced by FEProblemBase::getPetscOptions(), FEProblemBase::solve(), and FEProblemBase::solveLinearSystem().

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 124 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::perfGraph().

◆ _phi_zero

std::vector<VariablePhiValue> FEProblemBase::_phi_zero
inherited

◆ _point_zero

std::vector<Point> FEProblemBase::_point_zero
inherited

Definition at line 2058 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase().

◆ _prefix

const std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 127 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::timedSectionName().

◆ _previous_nl_solution_required

bool FEProblemBase::_previous_nl_solution_required
protectedinherited

Indicates we need to save the previous NL iteration variable values.

Definition at line 2834 of file FEProblemBase.h.

Referenced by FEProblemBase::createTagSolutions().

◆ _random_data_objects

std::map<std::string, std::unique_ptr<RandomData> > FEProblemBase::_random_data_objects
protectedinherited

◆ _real_zero

std::vector<Real> FEProblemBase::_real_zero
inherited

Convenience zeros.

Definition at line 2047 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase().

◆ _reinit_displaced_elem

bool FEProblemBase::_reinit_displaced_elem
protectedinherited

◆ _reinit_displaced_face

bool FEProblemBase::_reinit_displaced_face
protectedinherited

◆ _reinit_displaced_neighbor

bool FEProblemBase::_reinit_displaced_neighbor
protectedinherited

◆ _reporter_data

ReporterData FEProblemBase::_reporter_data
protectedinherited

◆ _restartable_app

MooseApp& Restartable::_restartable_app
protectedinherited

Reference to the application.

Definition at line 227 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp(), and Restartable::registerRestartableNameWithFilterOnApp().

◆ _restartable_read_only

const bool Restartable::_restartable_read_only
protectedinherited

Flag for toggling read only status (see ReporterData)

Definition at line 236 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 230 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 233 of file Restartable.h.

Referenced by Restartable::declareRestartableDataHelper().

◆ _safe_access_tagged_matrices

bool SubProblem::_safe_access_tagged_matrices
protectedinherited

◆ _safe_access_tagged_vectors

bool SubProblem::_safe_access_tagged_vectors
protectedinherited

◆ _scalar_ics

ScalarInitialConditionWarehouse FEProblemBase::_scalar_ics
protectedinherited

◆ _scalar_zero

std::vector<VariableValue> FEProblemBase::_scalar_zero
inherited

◆ _second_phi_zero

std::vector<VariablePhiSecond> FEProblemBase::_second_phi_zero
inherited

◆ _second_zero

std::vector<VariableSecond> FEProblemBase::_second_zero
inherited

◆ _skip_exception_check

bool FEProblemBase::_skip_exception_check
protectedinherited

If or not skip 'exception and stop solve'.

Definition at line 2816 of file FEProblemBase.h.

Referenced by FEProblemBase::checkExceptionAndStopSolve(), FEProblemBase::initialSetup(), and FEProblemBase::skipExceptionCheck().

◆ _snesmf_reuse_base

bool FEProblemBase::_snesmf_reuse_base
protectedinherited

If or not to resuse the base vector for matrix-free calculation.

Definition at line 2813 of file FEProblemBase.h.

Referenced by FEProblemBase::setSNESMFReuseBase(), and FEProblemBase::useSNESMFReuseBase().

◆ _snesmf_reuse_base_set_by_user

bool FEProblemBase::_snesmf_reuse_base_set_by_user
protectedinherited

If or not _snesmf_reuse_base is set by user.

Definition at line 2819 of file FEProblemBase.h.

Referenced by FEProblemBase::isSNESMFReuseBaseSetbyUser(), and FEProblemBase::setSNESMFReuseBase().

◆ _solve

const bool& FEProblemBase::_solve
protectedinherited

◆ _solver_params

std::vector<SolverParams> FEProblemBase::_solver_params
protectedinherited

◆ _solver_sys_name_to_num

std::map<SolverSystemName, unsigned int> FEProblemBase::_solver_sys_name_to_num
protectedinherited

Map connecting solver system names with their respective systems.

Definition at line 2632 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::solverSysNum().

◆ _solver_sys_names

std::vector<SolverSystemName> FEProblemBase::_solver_sys_names
protectedinherited

◆ _solver_systems

std::vector<std::shared_ptr<SolverSystem> > FEProblemBase::_solver_systems
protectedinherited

Combined container to base pointer of every solver system.

Definition at line 2626 of file FEProblemBase.h.

Referenced by FEProblemBase::addAuxKernel(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addVariable(), FEProblemBase::advanceState(), FEProblemBase::computeSystems(), FEProblemBase::copySolutionsBackwards(), FEProblemBase::createQRules(), FEProblemBase::createTagSolutions(), FEProblemBase::createTagVectors(), FEProblemBase::determineSolverSystem(), DumpObjectsProblem::DumpObjectsProblem(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), ExternalProblem::ExternalProblem(), FEProblem(), FEProblemBase::getActualFieldVariable(), FEProblemBase::getArrayVariable(), FEProblemBase::getScalarVariable(), FEProblemBase::getSolverSystem(), FEProblemBase::getStandardVariable(), FEProblemBase::getSystem(), FEProblemBase::getSystemBase(), FEProblemBase::getVariable(), FEProblemBase::getVariableNames(), FEProblemBase::getVectorVariable(), FEProblemBase::hasScalarVariable(), FEProblemBase::hasSolverVariable(), FEProblemBase::hasVariable(), FEProblemBase::init(), FEProblemBase::initialSetup(), FEProblemBase::meshChanged(), FEProblemBase::needSolutionState(), FEProblemBase::outputStep(), FEProblemBase::projectSolution(), FEProblemBase::reinitElem(), FEProblemBase::reinitElemPhys(), FEProblemBase::restoreOldSolutions(), FEProblemBase::restoreSolutions(), FEProblemBase::saveOldSolutions(), FEProblemBase::setCurrentSubdomainID(), Moose::PetscSupport::setSinglePetscOption(), FEProblemBase::setVariableAllDoFMap(), FEProblemBase::solverSystemConverged(), FEProblemBase::systemBaseSolver(), FEProblemBase::systemNumForVariable(), and FEProblemBase::timestepSetup().

◆ _solver_var_to_sys_num

std::map<SolverVariableName, unsigned int> FEProblemBase::_solver_var_to_sys_num
protectedinherited

Map connecting variable names with their respective solver systems.

Definition at line 2629 of file FEProblemBase.h.

Referenced by FEProblemBase::addVariable(), and FEProblemBase::determineSolverSystem().

◆ _steady_state_convergence_name

std::optional<ConvergenceName> FEProblemBase::_steady_state_convergence_name
protectedinherited

◆ _subspace_dim

std::map<std::string, unsigned int> FEProblemBase::_subspace_dim
protectedinherited

Dimension of the subspace spanned by the vectors with a given prefix.

Definition at line 2644 of file FEProblemBase.h.

Referenced by FEProblemBase::initNullSpaceVectors(), and FEProblemBase::subspaceDim().

◆ _t_step

int& FEProblemBase::_t_step
protectedinherited

◆ _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
protectedinherited

◆ _time_old

Real& FEProblemBase::_time_old
protectedinherited

◆ _to_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_to_multi_app_transfers
protectedinherited

◆ _transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_transfers
protectedinherited

◆ _transient

bool FEProblemBase::_transient
protectedinherited

Definition at line 2575 of file FEProblemBase.h.

Referenced by FEProblemBase::isTransient(), and FEProblemBase::transient().

◆ _transient_multi_apps

ExecuteMooseObjectWarehouse<TransientMultiApp> FEProblemBase::_transient_multi_apps
protectedinherited

Storage for TransientMultiApps (only needed for calling 'computeDT')

Definition at line 2707 of file FEProblemBase.h.

Referenced by FEProblemBase::addMultiApp(), FEProblemBase::computeMultiAppsDT(), and FEProblemBase::updateActiveObjects().

◆ _type

const std::string MooseBase::_type
protectedinherited

◆ _uo_aux_state_check

const bool FEProblemBase::_uo_aux_state_check
protectedinherited

Whether or not checking the state of uo/aux evaluation.

Definition at line 2870 of file FEProblemBase.h.

Referenced by FEProblemBase::execute(), and FEProblemBase::hasUOAuxStateCheck().

◆ _uo_jacobian_moose_vars

std::vector<std::vector<const MooseVariableFEBase *> > FEProblemBase::_uo_jacobian_moose_vars
protectedinherited

◆ _use_hash_table_matrix_assembly

const bool FEProblemBase::_use_hash_table_matrix_assembly
protectedinherited

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 2933 of file FEProblemBase.h.

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

◆ _use_nonlinear

bool FEProblem::_use_nonlinear
protected

Definition at line 38 of file FEProblem.h.

Referenced by FEProblem(), getUseNonlinear(), and setUseNonlinear().

◆ _using_ad_mat_props

bool FEProblemBase::_using_ad_mat_props
protectedinherited

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 2926 of file FEProblemBase.h.

◆ _using_default_nl

const bool FEProblemBase::_using_default_nl
protectedinherited

Boolean to check if we have the default nonlinear system.

Definition at line 2605 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
inherited

◆ _vector_zero

std::vector<VectorVariableValue> FEProblemBase::_vector_zero
inherited

◆ _verbose_multiapps

bool FEProblemBase::_verbose_multiapps
protectedinherited

◆ _verbose_restore

bool FEProblemBase::_verbose_restore
protectedinherited

Whether or not to be verbose on solution restoration post a failed time step.

Definition at line 2894 of file FEProblemBase.h.

Referenced by FEProblemBase::restoreSolutions(), and FEProblemBase::setVerboseProblem().

◆ _verbose_setup

MooseEnum FEProblemBase::_verbose_setup
protectedinherited

Whether or not to be verbose during setup.

Definition at line 2888 of file FEProblemBase.h.

Referenced by FEProblemBase::logAdd(), and FEProblemBase::setVerboseProblem().

◆ _xfem

std::shared_ptr<XFEMInterface> FEProblemBase::_xfem
protectedinherited

Pointer to XFEM controller.

Definition at line 2788 of file FEProblemBase.h.

Referenced by FEProblemBase::getXFEM(), FEProblemBase::haveXFEM(), FEProblemBase::initXFEM(), and FEProblemBase::updateMeshXFEM().

◆ _zero

std::vector<VariableValue> FEProblemBase::_zero
inherited

◆ _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 1058 of file SubProblem.h.

Referenced by SubProblem::checkBlockMatProps(), FEProblemBase::checkDependMaterialsHelper(), and SubProblem::storeSubdomainZeroMatProp().

◆ _zero_boundary_material_props

std::map<BoundaryID, std::set<MaterialPropertyName> > SubProblem::_zero_boundary_material_props
protectedinherited

The documentation for this class was generated from the following files: