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

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

#include <FEProblemBase.h>

Inheritance diagram for FEProblemBase:
[legend]

Classes

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

Public Types

enum  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

 FEProblemBase (const InputParameters &parameters)
 
virtual ~FEProblemBase ()
 
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...
 
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...
 
const RestartableEquationSystemsgetRestartableEquationSystems () const
 Get the RestartableEquationSystems object. 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
 
Moose::Kokkos::AssemblykokkosAssembly ()
 
const Moose::Kokkos::AssemblykokkosAssembly () const
 
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 prepareFace (const Elem *elem, const THREAD_ID tid) override
 
virtual void prepare (const Elem *elem, unsigned int ivar, unsigned int jvar, const std::vector< dof_id_type > &dof_indices, const THREAD_ID tid) override
 
virtual void setCurrentSubdomainID (const Elem *elem, const THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, const THREAD_ID tid)
 
virtual void prepareAssembly (const THREAD_ID tid) override
 
virtual void 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 init () override
 
virtual void solve (const unsigned int nl_sys_num)
 
void initKokkos ()
 Construct Kokkos assembly and systems and allocate Kokkos material property storages. More...
 
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 addKokkosFunction (const std::string &type, const std::string &name, InputParameters &parameters)
 Add a Kokkos function to the problem. More...
 
virtual bool hasKokkosFunction (const std::string &name)
 Get whether a Kokkos function exists. More...
 
virtual Moose::Kokkos::Function getKokkosFunction (const std::string &name)
 Get a Kokkos function in an abstract type. More...
 
template<typename T >
T & getKokkosFunction (const std::string &name)
 Get a Kokkos function in a concrete type. More...
 
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 addLineSearch (const InputParameters &)
 add a MOOSE line search 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 NonlinearSystemgetNonlinearSystem (const unsigned int sys_num)
 
Moose::Kokkos::Array< Moose::Kokkos::System > & getKokkosSystems ()
 Get all Kokkos systems that are associated with MOOSE nonlinear and auxiliary systems. More...
 
const Moose::Kokkos::Array< Moose::Kokkos::System > & getKokkosSystems () const
 
Moose::Kokkos::SystemgetKokkosSystem (const unsigned int sys_num)
 Get the Kokkos system of a specified number that is associated with MOOSE nonlinear and auxiliary systems. More...
 
const Moose::Kokkos::SystemgetKokkosSystem (const unsigned int sys_num) const
 
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...
 
SystemBasegetSystemBase (const std::string &sys_name)
 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 addKokkosKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosNodalKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosBoundaryCondition (const std::string &bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addConstraint (const std::string &c_name, const std::string &name, InputParameters &parameters)
 
virtual void setInputParametersFEProblem (InputParameters &parameters)
 
virtual void addAuxVariable (const std::string &var_type, const std::string &var_name, InputParameters &params)
 Canonical method for adding an auxiliary variable. 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)
 
virtual void addKokkosAuxKernel (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, const std::optional< std::set< VariableName >> &target_vars=std::nullopt)
 Project initial conditions for custom elem_range and bnd_node_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step. More...
 
void projectFunctionOnCustomRange (ConstElemRange &elem_range, Number(*func)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &), Gradient(*func_grad)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &), const libMesh::Parameters &params, const VariableName &target_var)
 Project a function onto a range of elements for a given variable. 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)
 
virtual void addKokkosMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
void prepareMaterials (const std::unordered_set< unsigned int > &consumer_needed_mat_props, const SubdomainID blk_id, const THREAD_ID tid)
 Add the MooseVariables and the material properties that the current materials depend on to the dependency list. 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 reinitMaterialsFaceOnBoundary (const BoundaryID boundary_id, const SubdomainID blk_id, const THREAD_ID tid, const bool swap_stateful=true, const std::deque< MaterialBase *> *const reinit_mats=nullptr)
 reinit materials on element faces on a boundary (internal or external) This specific routine helps us not reinit when don't need to More...
 
void reinitMaterialsNeighborOnBoundary (const BoundaryID boundary_id, const SubdomainID blk_id, const THREAD_ID tid, const bool swap_stateful=true, const std::deque< MaterialBase *> *const reinit_mats=nullptr)
 reinit materials on neighbor element (usually faces) on a boundary (internal or external) This specific routine helps us not reinit when don't need to 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)
 
void prepareKokkosMaterials (const std::unordered_set< unsigned int > &consumer_needed_mat_props)
 
void reinitKokkosMaterials ()
 
virtual void swapBackMaterials (const THREAD_ID tid)
 
virtual void swapBackMaterialsFace (const THREAD_ID tid)
 
virtual void swapBackMaterialsNeighbor (const THREAD_ID tid)
 
void setActiveMaterialProperties (const std::unordered_set< unsigned int > &mat_prop_ids, const THREAD_ID tid)
 Record and set the material properties required by the current computing thread. 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 setResidualNeighbor (NumericVector< libMesh::Number > &residual, const THREAD_ID tid) override
 
virtual void addJacobian (const THREAD_ID tid) override
 
virtual void addJacobianNeighbor (const THREAD_ID tid) override
 
virtual void addJacobianNeighborLowerD (const THREAD_ID tid) override
 
virtual void addJacobianLowerD (const THREAD_ID tid) override
 
virtual void addJacobianBlockTags (libMesh::SparseMatrix< libMesh::Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, const std::set< TagID > &tags, const THREAD_ID tid)
 
virtual void addJacobianNeighbor (libMesh::SparseMatrix< libMesh::Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices, const std::set< TagID > &tags, const THREAD_ID tid) override
 
virtual void addJacobianScalar (const THREAD_ID tid=0)
 
virtual void addJacobianOffDiagScalar (unsigned int ivar, const THREAD_ID tid=0)
 
virtual void cacheJacobian (const THREAD_ID tid) override
 
virtual void cacheJacobianNeighbor (const THREAD_ID tid) override
 
virtual void addCachedJacobian (const THREAD_ID tid) override
 
virtual void prepareShapes (unsigned int var, const THREAD_ID tid) override
 
virtual void prepareFaceShapes (unsigned int var, const THREAD_ID tid) override
 
virtual void prepareNeighborShapes (unsigned int var, const THREAD_ID tid) override
 
virtual void addDisplacedProblem (std::shared_ptr< DisplacedProblem > displaced_problem)
 
virtual std::shared_ptr< const 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 >, std::unique_ptr< 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...
 
void initKokkosStatefulProps ()
 
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
 
const MaterialWarehousegetKokkosMaterialsWarehouse () 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 MooseObject *object=nullptr) const
 
MaterialDatagetKokkosMaterialData (Moose::MaterialDataType type, const MooseObject *object=nullptr) const
 
const std::set< const MooseObject * > & getMaterialPropertyStorageConsumers (Moose::MaterialDataType type) const
 
const std::set< const MooseObject * > & getKokkosMaterialPropertyStorageConsumers (Moose::MaterialDataType type) const
 
bool restoreOriginalNonzeroPattern () const
 
bool errorOnJacobianNonzeroReallocation () const
 Will return True if the user wants to get an error when a nonzero is reallocated in the Jacobian by PETSc. 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...
 
bool shouldSolve () const
 
const MortarInterfaceWarehousemortarData () const
 Returns the mortar data object. More...
 
MortarInterfaceWarehousemortarData ()
 
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...
 
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 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
 
void createTagMatrices (CreateTaggedMatrixKey)
 
bool hasKokkosObjects () const
 
bool hasKokkosResidualObjects () 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=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 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 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...
 
const bool & currentlyComputingResidual () const
 Returns true if the problem is in the process of computing the residual. More...
 
virtual void automaticScaling (bool automatic_scaling)
 Automatic scaling setter. More...
 
bool automaticScaling () const
 Automatic scaling getter. 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 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 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 ()
 
virtual void setResidual (libMesh::NumericVector< libMesh::Number > &residual, const THREAD_ID tid)=0
 
virtual void setResidualNeighbor (libMesh::NumericVector< libMesh::Number > &residual, const THREAD_ID tid)=0
 
virtual void addJacobianNeighbor (libMesh::SparseMatrix< libMesh::Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices, const std::set< TagID > &tags, const THREAD_ID tid)=0
 
void 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...
 
bool computingNonlinearResid () const
 Returns true if the problem is in the process of computing the nonlinear residual. More...
 
const bool & currentlyComputingResidual () const
 Returns true if the problem is in the process of computing the residual. 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
 
bool haveADObjects () const
 Method for reading wehther we have any ad objects. More...
 
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...
 
bool automaticScaling () const
 Automatic scaling getter. 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...
 
void setChainControlDataOutput (bool set_output)
 Setter for debug chain control data 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
 
bool isKokkosObject () const
 Get whether this object is a Kokkos functor The parameter is set by the Kokkos base classes: More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this class is associated with. More...
 
const std::string & type () const
 Get the type of this class. More...
 
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...
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. 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 &name) const
 Test if the supplied parameter is set by a user, as opposed to not set or set to default. 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 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 paramWarning (const std::string &param, Args... args) const
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args) const
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 Deprecated message prefix; the error type is no longer used. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 Emits an error prefixed with object name and type and optionally a file path to the top-level block parameter if available. More...
 
template<typename... Args>
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
template<typename... Args>
void mooseErrorNonPrefixed (Args &&... args) const
 Emits an error without the prefixing included in mooseError(). More...
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 Emits a warning prefixed with object name and type. More...
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 Emits a warning without the prefixing included in mooseWarning(). More...
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
 External method for calling moose error with added object context. More...
 
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 ()
 
Moose::Kokkos::MaterialPropertyStoragegetKokkosMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStoragegetKokkosBndMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStoragegetKokkosNeighborMaterialPropertyStorage ()
 
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 needInternalNeighborSideMaterial (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...
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node)
 External method for calling moose error with added object context. 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
 
 usingCombinedWarningSolutionWarnings
 
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
 

Static Public Attributes

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

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...
 
template<bool warning>
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 Set solution invalid mark for the given solution ID. More...
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 Call to register a named section for timing. 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

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::vector< std::shared_ptr< NonlinearSystemBase > > _nl
 The 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...
 
Moose::Kokkos::Array< Moose::Kokkos::System_kokkos_systems
 
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...
 
Moose::Kokkos::Assembly _kokkos_assembly
 
MooseObjectWarehouse< MeshDivision_mesh_divisions
 Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the Problem Time (and people's uses) will tell where this fits best. More...
 
MooseObjectWarehouse< Function_functions
 functions More...
 
MooseObjectWarehouse< Moose::FunctionBase_kokkos_functions
 
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
 
Moose::Kokkos::MaterialPropertyStorage_kokkos_material_props
 
Moose::Kokkos::MaterialPropertyStorage_kokkos_bnd_material_props
 
Moose::Kokkos::MaterialPropertyStorage_kokkos_neighbor_material_props
 
MooseObjectWarehouse< Marker_markers
 
ReporterData _reporter_data
 
ExecuteMooseObjectWarehouse< 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
 
std::unique_ptr< MortarInterfaceWarehouse_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...
 
ActionFactory_action_factory
 Builds Actions. More...
 
const std::string & _type
 The type of this class. More...
 
const std::string & _name
 The name of this class. More...
 
const InputParameters_pars
 The object's parameters. 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
 
MaterialWarehouse _kokkos_materials
 
MooseObjectWarehouse< Indicator_indicators
 
MooseObjectWarehouse< InternalSideIndicatorBase_internal_side_indicators
 
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
 Data structures of the requested material properties. More...
 
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
 

Private Member Functions

void setResidualObjectParamsAndLog (const std::string &ro_name, const std::string &name, InputParameters &parameters, const unsigned int nl_sys_num, const std::string &base_name, bool &reinit_displaced)
 Set the subproblem and system parameters for residual objects and log their addition. More...
 
void setAuxKernelParamsAndLog (const std::string &ak_name, const std::string &name, InputParameters &parameters, const std::string &base_name)
 Set the subproblem and system parameters for auxiliary kernels and log their addition. More...
 
void handleException (const std::string &calling_method)
 Handle exceptions. More...
 
std::vector< MortarUserObject * > getMortarUserObjects (BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced, const std::vector< MortarUserObject *> &mortar_uo_superset)
 Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID, and displaced parameters, given some initial set. More...
 
std::vector< MortarUserObject * > getMortarUserObjects (BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced)
 Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID, and displaced parameters from the entire active mortar user object set. More...
 
virtual std::pair< bool, unsigned intdetermineSolverSystem (const std::string &var_name, bool error_if_not_found=false) const override
 Determine what solver system the provided variable name lies in. More...
 
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. More...
 
void addAnyRedistributers ()
 
void updateMaxQps ()
 
void joinAndFinalize (TheWarehouse::Query query, bool isgen=false)
 
virtual void resetState ()
 Reset state of this object in preparation for the next evaluation. More...
 

Static Private Member Functions

static SolverParams makeLinearSolverParams ()
 Make basic solver params for linear solves. More...
 

Private Attributes

Restartable::ManagedValue< RestartableEquationSystems_req
 The EquationSystems object, wrapped for restart. More...
 
bool _error_on_jacobian_nonzero_reallocation
 Whether to error when the Jacobian is re-allocated, usually because the sparsity pattern changed. More...
 
const bool _restore_original_nonzero_pattern
 Whether we should restore the original nonzero pattern for every Jacobian evaluation. More...
 
bool _ignore_zeros_in_jacobian
 Whether to ignore zeros in the Jacobian, thereby leading to a reduced sparsity pattern. More...
 
bool _preserve_matrix_sparsity_pattern
 Whether to preserve the system matrix / Jacobian sparsity pattern, using 0-valued entries usually. More...
 
const bool _force_restart
 
const bool _allow_ics_during_restart
 
const bool _skip_nl_system_check
 
bool _fail_next_system_convergence_check
 
const bool _allow_invalid_solution
 
const bool _show_invalid_solution_console
 
const bool & _immediately_print_invalid_solution
 
bool _started_initial_setup
 At or beyond initialSteup stage. More...
 
bool _has_internal_edge_residual_objects
 Whether the problem has dgkernels or interface kernels. More...
 
bool _u_dot_requested
 Whether solution time derivative needs to be stored. More...
 
bool _u_dotdot_requested
 Whether solution second time derivative needs to be stored. More...
 
bool _u_dot_old_requested
 Whether old solution time derivative needs to be stored. More...
 
bool _u_dotdot_old_requested
 Whether old solution second time derivative needs to be stored. More...
 
bool _has_mortar
 Whether the simulation requires mortar coupling. More...
 
unsigned int _num_grid_steps
 Number of steps in a grid sequence. More...
 
bool _trust_user_coupling_matrix = false
 Whether to trust the user coupling matrix no matter what. More...
 
bool _computing_scaling_jacobian = false
 Flag used to indicate whether we are computing the scaling Jacobian. More...
 
bool _computing_scaling_residual = false
 Flag used to indicate whether we are computing the scaling Residual. More...
 
bool _checking_uo_aux_state = false
 Flag used to indicate whether we are doing the uo/aux state check in execute. More...
 
ExecFlagEnum _print_execution_on
 When to print the execution of loops. More...
 
const bool _identify_variable_groups_in_nl
 Whether to identify variable groups in nonlinear systems. This affects dof ordering. More...
 
std::vector< VectorTag_current_residual_vector_tags
 A data member to store the residual vector tag(s) passed into computeResidualTag(s). More...
 
bool _have_fv = false
 Whether we are performing some calculations with finite volume discretizations. More...
 
const bool _regard_general_exceptions_as_errors
 If we catch an exception during residual/Jacobian evaluaton for which we don't have specific handling, immediately error instead of allowing the time step to be cut. More...
 
std::vector< libMesh::CouplingMatrix_nonlocal_cm
 nonlocal coupling matrix More...
 
bool _requires_nonlocal_coupling
 nonlocal coupling requirement flag More...
 
bool _has_kokkos_objects = false
 Whether we have any Kokkos objects. More...
 
bool _has_kokkos_residual_objects = false
 Whether we have any Kokkos residual objects. More...
 

Friends

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

Detailed Description

Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.

Definition at line 150 of file FEProblemBase.h.

Member Typedef Documentation

◆ DataFileParameterType

using DataFileInterface::DataFileParameterType = DataFileName
inherited

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

Definition at line 27 of file DataFileInterface.h.

Member Enumeration Documentation

◆ CoverageCheckMode

Enumerator
FALSE 
TRUE 
OFF 
ON 
SKIP_LIST 
ONLY_LIST 

Definition at line 158 of file FEProblemBase.h.

159  {
160  FALSE,
161  TRUE,
162  OFF,
163  ON,
164  SKIP_LIST,
165  ONLY_LIST,
166  };

Constructor & Destructor Documentation

◆ FEProblemBase()

FEProblemBase::FEProblemBase ( const InputParameters parameters)

Definition at line 398 of file FEProblemBase.C.

400  Restartable(this, "FEProblemBase"),
401  _mesh(*getCheckedPointerParam<MooseMesh *>("mesh")),
402  _req(declareManagedRestartableDataWithContext<RestartableEquationSystems>(
403  "equation_systems", nullptr, _mesh)),
404  _initialized(false),
405  _solve(getParam<bool>("solve")),
406  _transient(false),
407  _time(declareRestartableData<Real>("time")),
408  _time_old(declareRestartableData<Real>("time_old")),
409  _t_step(declareRecoverableData<int>("t_step")),
410  _dt(declareRestartableData<Real>("dt")),
411  _dt_old(declareRestartableData<Real>("dt_old")),
415  _linear_sys_names(getParam<std::vector<LinearSystemName>>("linear_sys_names")),
418  _current_linear_sys(nullptr),
419  _using_default_nl(!isParamSetByUser("nl_sys_names")),
421  ? getParam<std::vector<NonlinearSystemName>>("nl_sys_names")
422  : std::vector<NonlinearSystemName>()),
423  _num_nl_sys(_nl_sys_names.size()),
424  _nl(_num_nl_sys, nullptr),
425  _current_nl_sys(nullptr),
427  _aux(nullptr),
429 #ifdef MOOSE_KOKKOS_ENABLED
430  _kokkos_assembly(*this),
431 #endif
432  _mesh_divisions(/*threaded=*/true),
434  "material_props", &_mesh, _material_prop_registry, *this)),
436  "bnd_material_props", &_mesh, _material_prop_registry, *this)),
438  "neighbor_material_props", &_mesh, _material_prop_registry, *this)),
439 #ifdef MOOSE_KOKKOS_ENABLED
442  "kokkos_material_props", &_mesh, _material_prop_registry, *this)),
445  "kokkos_bnd_material_props", &_mesh, _material_prop_registry, *this)),
448  "kokkos_neighbor_material_props", &_mesh, _material_prop_registry, *this)),
449 #endif
451  // TODO: delete the following line after apps have been updated to not call getUserObjects
452  _all_user_objects(_app.getExecuteOnEnum()),
453  _multi_apps(_app.getExecuteOnEnum()),
454  _transient_multi_apps(_app.getExecuteOnEnum()),
455  _transfers(_app.getExecuteOnEnum(), /*threaded=*/false),
456  _to_multi_app_transfers(_app.getExecuteOnEnum(), /*threaded=*/false),
457  _from_multi_app_transfers(_app.getExecuteOnEnum(), /*threaded=*/false),
458  _between_multi_app_transfers(_app.getExecuteOnEnum(), /*threaded=*/false),
459 #ifdef LIBMESH_ENABLE_AMR
460  _adaptivity(*this),
462 #endif
463  _displaced_mesh(nullptr),
465  _mortar_data(std::make_unique<MortarInterfaceWarehouse>(*this)),
466  _reinit_displaced_elem(false),
467  _reinit_displaced_face(false),
469  _input_file_saved(false),
470  _has_dampers(false),
471  _has_constraints(false),
472  _snesmf_reuse_base(true),
473  _skip_exception_check(false),
476  _const_jacobian(false),
477  _has_jacobian(false),
478  _needs_old_newton_iter(false),
479  _previous_nl_solution_required(getParam<bool>("previous_nl_solution_required")),
480  _has_nonlocal_coupling(false),
483  getParam<MooseEnum>("kernel_coverage_check").getEnum<CoverageCheckMode>()),
484  _kernel_coverage_blocks(getParam<std::vector<SubdomainName>>("kernel_coverage_block_list")),
486  getParam<bool>("boundary_restricted_node_integrity_check")),
488  getParam<bool>("boundary_restricted_elem_integrity_check")),
490  getParam<MooseEnum>("material_coverage_check").getEnum<CoverageCheckMode>()),
491  _material_coverage_blocks(getParam<std::vector<SubdomainName>>("material_coverage_block_list")),
492  _fv_bcs_integrity_check(getParam<bool>("fv_bcs_integrity_check")),
493  _material_dependency_check(getParam<bool>("material_dependency_check")),
494  _uo_aux_state_check(getParam<bool>("check_uo_aux_state")),
495  _max_qps(std::numeric_limits<unsigned int>::max()),
497  _has_time_integrator(false),
498  _has_exception(false),
499  _parallel_barrier_messaging(getParam<bool>("parallel_barrier_messaging")),
500  _verbose_setup(getParam<MooseEnum>("verbose_setup")),
501  _verbose_multiapps(getParam<bool>("verbose_multiapps")),
502  _verbose_restore(getParam<bool>("verbose_restore")),
504  _control_warehouse(_app.getExecuteOnEnum(), /*threaded=*/false),
506  _line_search(nullptr),
507  _using_ad_mat_props(false),
509  _use_hash_table_matrix_assembly(getParam<bool>("use_hash_table_matrix_assembly")),
511  isParamValid("error_on_jacobian_nonzero_reallocation")
512  ? getParam<bool>("error_on_jacobian_nonzero_reallocation")
514  _restore_original_nonzero_pattern(isParamValid("restore_original_nonzero_pattern")
515  ? getParam<bool>("restore_original_nonzero_pattern")
517  _ignore_zeros_in_jacobian(getParam<bool>("ignore_zeros_in_jacobian")),
519  _force_restart(getParam<bool>("force_restart")),
520  _allow_ics_during_restart(getParam<bool>("allow_initial_conditions_with_restart")),
521  _skip_nl_system_check(getParam<bool>("skip_nl_system_check")),
523  _allow_invalid_solution(getParam<bool>("allow_invalid_solution")),
524  _show_invalid_solution_console(getParam<bool>("show_invalid_solution_console")),
525  _immediately_print_invalid_solution(getParam<bool>("immediately_print_invalid_solution")),
526  _started_initial_setup(false),
528  _u_dot_requested(false),
529  _u_dotdot_requested(false),
530  _u_dot_old_requested(false),
532  _has_mortar(false),
533  _num_grid_steps(0),
535  _identify_variable_groups_in_nl(getParam<bool>("identify_variable_groups_in_nl")),
536  _regard_general_exceptions_as_errors(getParam<bool>("regard_general_exceptions_as_errors")),
538 {
539  auto checkCoverageCheckConflict =
540  [this](const std::string & coverage_check,
541  const CoverageCheckMode & coverage_check_mode,
542  const std::vector<SubdomainName> & coverage_blocks) -> void
543  {
544  if (coverage_check_mode != CoverageCheckMode::FALSE &&
545  coverage_check_mode != CoverageCheckMode::OFF)
546  if (coverage_blocks.size() > 1)
547  if (std::find(coverage_blocks.begin(), coverage_blocks.end(), "ANY_BLOCK_ID") !=
548  coverage_blocks.end())
549  paramError(coverage_check,
550  "The list of blocks used for ",
551  coverage_check,
552  " cannot contain 'ANY_BLOCK_ID' along with other blocks. ");
553  };
554 
555  checkCoverageCheckConflict(
556  "kernel_coverage_check", _kernel_coverage_check, _kernel_coverage_blocks);
557  checkCoverageCheckConflict(
558  "material_coverage_check", _material_coverage_check, _material_coverage_blocks);
559 
560  // Initialize static do_derivatives member. We initialize this to true so that all the
561  // default AD things that we setup early in the simulation actually get their derivative
562  // vectors initalized. We will toggle this to false when doing residual evaluations
563  ADReal::do_derivatives = true;
564 
565  // Disable refinement/coarsening in EquationSystems::reinit because we already do this ourselves
567 
569  // Default constructor fine for nonlinear because it will be populated later by framework
570  // executioner/solve object parameters
571  _solver_params.resize(_num_nl_sys);
572  for (const auto i : index_range(_nl_sys_names))
573  {
574  const auto & name = _nl_sys_names[i];
577  _solver_sys_names.push_back(name);
578  }
579 
580  for (const auto i : index_range(_linear_sys_names))
581  {
582  const auto & name = _linear_sys_names[i];
585  _solver_sys_names.push_back(name);
586  // Unlike for nonlinear these are basically dummy parameters
588  }
589 
590  _nonlocal_cm.resize(numSolverSystems());
591  _cm.resize(numSolverSystems());
592 
593  _time = 0.0;
594  _time_old = 0.0;
595  _t_step = 0;
596  _dt = 0;
597  _dt_old = _dt;
598 
599  unsigned int n_threads = libMesh::n_threads();
600 
601  _real_zero.resize(n_threads, 0.);
602  _scalar_zero.resize(n_threads);
603  _zero.resize(n_threads);
604  _phi_zero.resize(n_threads);
605  _ad_zero.resize(n_threads);
606  _grad_zero.resize(n_threads);
607  _ad_grad_zero.resize(n_threads);
608  _grad_phi_zero.resize(n_threads);
609  _second_zero.resize(n_threads);
610  _ad_second_zero.resize(n_threads);
611  _second_phi_zero.resize(n_threads);
612  _point_zero.resize(n_threads);
613  _vector_zero.resize(n_threads);
614  _vector_curl_zero.resize(n_threads);
615  _uo_jacobian_moose_vars.resize(n_threads);
616 
617  _has_active_material_properties.resize(n_threads, 0);
618 
619  _block_mat_side_cache.resize(n_threads);
620  _bnd_mat_side_cache.resize(n_threads);
621  _interface_mat_side_cache.resize(n_threads);
622 
623  es().parameters.set<FEProblemBase *>("_fe_problem_base") = this;
624 
625  if (isParamValid("restart_file_base"))
626  {
627  std::string restart_file_base = getParam<FileNameNoExtension>("restart_file_base");
628 
629  // This check reverts to old behavior of providing "restart_file_base=" to mean
630  // don't restart... BISON currently relies on this. It could probably be removed.
631  // The new MooseUtils::convertLatestCheckpoint will error out if a checkpoint file
632  // is not found, which I think makes sense. Which means, without this, if you
633  // set "restart_file_base=", you'll get a "No checkpoint file found" error
634  if (restart_file_base.size())
635  {
636  restart_file_base = MooseUtils::convertLatestCheckpoint(restart_file_base);
637  setRestartFile(restart_file_base);
638  }
639  }
640 
641  // // Generally speaking, the mesh is prepared for use, and consequently remote elements are deleted
642  // // well before our Problem(s) are constructed. Historically, in MooseMesh we have a bunch of
643  // // needs_prepare type flags that make it so we never call prepare_for_use (and consequently
644  // // delete_remote_elements) again. So the below line, historically, has had no impact. HOWEVER:
645  // // I've added some code in SetupMeshCompleteAction for deleting remote elements post
646  // // EquationSystems::init. If I execute that code without default ghosting, then I get > 40 MOOSE
647  // // test failures, so we clearly have some simulations that are not yet covered properly by
648  // // relationship managers. Until that is resolved, I am going to retain default geometric ghosting
649  // if (!_default_ghosting)
650  // _mesh.getMesh().remove_ghosting_functor(_mesh.getMesh().default_ghosting());
651 
652 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
653  // Main app should hold the default database to handle system petsc options
654  if (!_app.isUltimateMaster())
655  LibmeshPetscCall(PetscOptionsCreate(&_petsc_option_data_base));
656 #endif
657 
658  if (!_solve)
659  {
660  // If we are not solving, we do not care about seeing unused petsc options
661  Moose::PetscSupport::setSinglePetscOption("-options_left", "0");
662  // We don't want petscSetOptions being called in solve and clearing the option that was just set
664  }
665 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
std::map< NonlinearSystemName, unsigned int > _nl_sys_name_to_num
Map from nonlinear system name to number.
std::vector< Point > _point_zero
bool _u_dot_requested
Whether solution time derivative needs to be stored.
const bool _regard_general_exceptions_as_errors
If we catch an exception during residual/Jacobian evaluaton for which we don&#39;t have specific handling...
const std::size_t _num_nl_sys
The number of nonlinear systems.
bool _skip_exception_check
If or not skip &#39;exception and stop solve&#39;.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
std::map< LinearSystemName, unsigned int > _linear_sys_name_to_num
Map from linear system name to number.
std::vector< MooseArray< ADRealTensorValue > > _ad_second_zero
bool _need_to_add_default_steady_state_convergence
Flag that the problem needs to add the default steady convergence.
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:42
static SolverParams makeLinearSolverParams()
Make basic solver params for linear solves.
bool _snesmf_reuse_base_set_by_user
If or not _snesmf_reuse_base is set by user.
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:820
MaterialPropertyStorage & _bnd_material_props
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
bool _error_on_jacobian_nonzero_reallocation
Whether to error when the Jacobian is re-allocated, usually because the sparsity pattern changed...
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseBase.h:439
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseBase.h:388
bool _has_jacobian
Indicates if the Jacobian was computed.
bool _has_dampers
Whether or not this system has any Dampers associated with it.
std::vector< SubdomainName > _kernel_coverage_blocks
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
std::vector< MooseArray< ADRealVectorValue > > _ad_grad_zero
std::vector< SolverParams > _solver_params
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.
unsigned int _cycles_completed
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
unsigned short _current_ic_state
const bool _uo_aux_state_check
Whether or not checking the state of uo/aux evaluation.
const ExecFlagType EXEC_NONE
Definition: Moose.C:29
Stores the stateful material properties computed by materials.
T & declareRestartableDataWithContext(const std::string &data_name, void *context, Args &&... args)
Declare a piece of data as "restartable" and initialize it.
Definition: Restartable.h:301
PetscOptions _petsc_option_data_base
std::vector< SubdomainName > _material_coverage_blocks
std::vector< VariableSecond > _second_zero
std::vector< MooseArray< ADReal > > _ad_zero
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.
std::vector< VectorVariableCurl > _vector_curl_zero
bool _has_exception
Whether or not an exception has occurred.
unsigned int _num_grid_steps
Number of steps in a grid sequence.
bool _needs_old_newton_iter
Indicates that we need to compute variable values for previous Newton iteration.
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)
MaterialPropertyRegistry _material_prop_registry
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling &#39;computeDT&#39;)
Moose::Kokkos::Assembly _kokkos_assembly
bool _ignore_zeros_in_jacobian
Whether to ignore zeros in the Jacobian, thereby leading to a reduced sparsity pattern.
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
std::map< SolverSystemName, unsigned int > _solver_sys_name_to_num
Map connecting solver system names with their respective systems.
std::string convertLatestCheckpoint(std::string orig)
Definition: MooseUtils.C:157
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
Cache for calculating materials on side.
ExecFlagEnum _print_execution_on
When to print the execution of loops.
auto max(const L &left, const R &right)
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
const bool _skip_nl_system_check
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
bool _calculate_jacobian_in_uo
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::vector< VariablePhiGradient > _grad_phi_zero
std::vector< SolverSystemName > _solver_sys_names
The union of nonlinear and linear system names.
bool _verbose_restore
Whether or not to be verbose on solution restoration post a failed time step.
bool _previous_nl_solution_required
Indicates we need to save the previous NL iteration variable values.
ReporterData _reporter_data
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const bool & _immediately_print_invalid_solution
const bool & _solve
Whether or not to actually solve the nonlinear system.
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
bool _input_file_saved
whether input file has been written
Moose::CouplingType _coupling
Type of variable coupling.
const bool _allow_ics_during_restart
SubProblem(const InputParameters &parameters)
Definition: SubProblem.C:60
virtual libMesh::EquationSystems & es() override
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
Cache for calculating materials on side.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const bool _allow_invalid_solution
const bool _boundary_restricted_node_integrity_check
whether to perform checking of boundary restricted nodal object variable dependencies, e.g.
MooseMesh & _mesh
bool _u_dotdot_old_requested
Whether old solution second time derivative needs to be stored.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
Adaptivity _adaptivity
LinearSystem * _current_linear_sys
The current linear system that we are solving.
const bool _force_restart
std::vector< VariablePhiSecond > _second_phi_zero
bool _started_initial_setup
At or beyond initialSteup stage.
bool errorOnJacobianNonzeroReallocation() const
Will return True if the user wants to get an error when a nonzero is reallocated in the Jacobian by P...
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
INVALID_ORDER
MooseObjectWarehouse< MeshDivision > _mesh_divisions
Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the ...
bool _fv_bcs_integrity_check
Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset...
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const bool _show_invalid_solution_console
bool _snesmf_reuse_base
If or not to resuse the base vector for matrix-free calculation.
friend class Restartable
bool _need_to_add_default_multiapp_fixed_point_convergence
Flag that the problem needs to add the default fixed point convergence.
const std::vector< NonlinearSystemName > _nl_sys_names
The nonlinear system names.
Moose::Kokkos::MaterialPropertyStorage & _kokkos_material_props
std::vector< VariablePhiValue > _phi_zero
std::vector< unsigned char > _has_active_material_properties
Whether there are active material properties on each thread.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
void setSinglePetscOption(const std::string &name, const std::string &value="", FEProblemBase *const problem=nullptr)
A wrapper function for dealing with different versions of PetscOptionsSetValue.
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
std::vector< VariableGradient > _grad_zero
const bool _identify_variable_groups_in_nl
Whether to identify variable groups in nonlinear systems. This affects dof ordering.
const bool _restore_original_nonzero_pattern
Whether we should restore the original nonzero pattern for every Jacobian evaluation.
T & set(const std::string &)
void setRestartFile(const std::string &file_name)
Communicate to the Resurector the name of the restart filer.
std::vector< VariableValue > _scalar_zero
bool _using_ad_mat_props
Automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material ...
const std::vector< LinearSystemName > _linear_sys_names
The linear system names.
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
const bool _material_dependency_check
Determines whether a check to verify material dependencies on every subdomain.
std::vector< VariableValue > _zero
GeometricSearchData _geometric_search_data
std::vector< VectorVariableValue > _vector_zero
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
Coupling matrix for variables.
bool _has_initialized_stateful
Whether nor not stateful materials have been initialized.
unsigned int _max_qps
Maximum number of quadrature points used in the problem.
bool _preserve_matrix_sparsity_pattern
Whether to preserve the system matrix / Jacobian sparsity pattern, using 0-valued entries usually...
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
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:199
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
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.
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.
bool _has_constraints
Whether or not this system has any Constraints.
bool _need_to_add_default_nonlinear_convergence
Flag that the problem needs to add the default nonlinear convergence.
CoverageCheckMode _kernel_coverage_check
Determines whether and which subdomains are to be checked to ensure that they have an active kernel...
bool _fail_next_system_convergence_check
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.
const bool _boundary_restricted_elem_integrity_check
whether to perform checking of boundary restricted elemental object variable dependencies, e.g.
bool _const_jacobian
true if the Jacobian is constant
Moose::Kokkos::MaterialPropertyStorage & _kokkos_bnd_material_props
MaterialPropertyStorage & _material_props
libMesh::Order _max_scalar_order
Maximum scalar variable order.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
virtual std::size_t numSolverSystems() const override
Restartable::ManagedValue< RestartableEquationSystems > _req
The EquationSystems object, wrapped for restart.
std::vector< libMesh::CouplingMatrix > _nonlocal_cm
nonlocal coupling matrix
std::vector< std::unordered_map< BoundaryID, bool > > _interface_mat_side_cache
Cache for calculating materials on interface.
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
Definition: MooseBase.h:205
Moose::Kokkos::MaterialPropertyStorage & _kokkos_neighbor_material_props
const bool _using_default_nl
Boolean to check if we have the default nonlinear system.
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.
void ErrorVector unsigned int
auto index_range(const T &sizable)
MooseEnum _verbose_setup
Whether or not to be verbose during setup.
MooseMesh * _displaced_mesh
bool _has_mortar
Whether the simulation requires mortar coupling.
std::shared_ptr< LineSearch > _line_search
std::vector< Real > _real_zero
Convenience zeros.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ ~FEProblemBase()

FEProblemBase::~FEProblemBase ( )
virtual

Definition at line 804 of file FEProblemBase.C.

805 {
806  // Flush the Console stream, the underlying call to Console::mooseConsole
807  // relies on a call to Output::checkInterval that has references to
808  // _time, etc. If it is not flushed here memory problems arise if you have
809  // an unflushed stream and start destructing things.
810  _console << std::flush;
811 
812  unsigned int n_threads = libMesh::n_threads();
813  for (unsigned int i = 0; i < n_threads; i++)
814  {
815  _zero[i].release();
816  _phi_zero[i].release();
817  _scalar_zero[i].release();
818  _grad_zero[i].release();
819  _grad_phi_zero[i].release();
820  _second_zero[i].release();
821  _second_phi_zero[i].release();
822  _vector_zero[i].release();
823  _vector_curl_zero[i].release();
824  _ad_zero[i].release();
825  _ad_grad_zero[i].release();
826  _ad_second_zero[i].release();
827  }
828 
829 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
830  if (!_app.isUltimateMaster())
831  {
832  auto ierr = PetscOptionsDestroy(&_petsc_option_data_base);
833  // Don't throw on destruction
834  CHKERRABORT(this->comm().get(), ierr);
835  }
836 #endif
837 }
std::vector< MooseArray< ADRealTensorValue > > _ad_second_zero
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:820
unsigned int n_threads()
std::vector< MooseArray< ADRealVectorValue > > _ad_grad_zero
PetscOptions _petsc_option_data_base
const Parallel::Communicator & comm() const
std::vector< VariableSecond > _second_zero
std::vector< MooseArray< ADReal > > _ad_zero
std::vector< VectorVariableCurl > _vector_curl_zero
std::vector< VariablePhiGradient > _grad_phi_zero
std::vector< VariablePhiSecond > _second_phi_zero
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
std::vector< VariablePhiValue > _phi_zero
std::vector< VariableGradient > _grad_zero
std::vector< VariableValue > _scalar_zero
std::vector< VariableValue > _zero
std::vector< VectorVariableValue > _vector_zero
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

Member Function Documentation

◆ _setCLIOption()

void Problem::_setCLIOption ( )
inlineinherited

For Internal Use.

Definition at line 32 of file Problem.h.

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

◆ acceptInvalidSolution()

bool FEProblemBase::acceptInvalidSolution ( ) const

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

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

Definition at line 3974 of file FEProblemBase.C.

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

3975 {
3976  return allowInvalidSolution() || // invalid solutions are always allowed
3977  !_app.solutionInvalidity().hasInvalidSolutionError(); // if not allowed, check for errors
3978 }
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:179
bool allowInvalidSolution() const
Whether to accept / allow an invalid solution.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357

◆ adaptivity()

Adaptivity& FEProblemBase::adaptivity ( )
inline

Definition at line 1943 of file FEProblemBase.h.

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

1943 { return _adaptivity; }
Adaptivity _adaptivity

◆ adaptMesh()

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

Reimplemented in DumpObjectsProblem.

Definition at line 8225 of file FEProblemBase.C.

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

8226 {
8227  // reset cycle counter
8228  _cycles_completed = 0;
8229 
8231  return false;
8232 
8233  TIME_SECTION("adaptMesh", 3, "Adapting Mesh");
8234 
8235  unsigned int cycles_per_step = _adaptivity.getCyclesPerStep();
8236 
8237  bool mesh_changed = false;
8238 
8239  for (unsigned int i = 0; i < cycles_per_step; ++i)
8240  {
8241  if (!_mesh.interiorLowerDBlocks().empty() || !_mesh.boundaryLowerDBlocks().empty())
8242  mooseError("HFEM does not support mesh adaptivity currently.");
8243 
8244  // Markers were already computed once by Executioner
8245  if (_adaptivity.getRecomputeMarkersFlag() && i > 0)
8246  computeMarkers();
8247 
8248  bool mesh_changed_this_step;
8249  mesh_changed_this_step = _adaptivity.adaptMesh();
8250 
8251  if (mesh_changed_this_step)
8252  {
8253  mesh_changed = true;
8254 
8255  meshChanged(
8256  /*intermediate_change=*/true, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
8258  }
8259  else
8260  {
8261  // If the mesh didn't change, we still need to update the displaced mesh
8262  // to undo the undisplacement performed in Adaptivity::adaptMesh
8263  if (_displaced_problem)
8264  _displaced_problem->updateMesh();
8265 
8266  _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
8267  break;
8268  }
8269 
8270  // Show adaptivity progress
8271  _console << std::flush;
8272  }
8273 
8274  // We're done with all intermediate changes; now get systems ready
8275  // for real if necessary.
8276  if (mesh_changed)
8277  es().reinit_systems();
8278 
8279  // Execute multi-apps that need to run after adaptivity, but before the next timestep.
8281 
8282  return mesh_changed;
8283 }
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:1421
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:1425
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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:58

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

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

◆ addAnyRedistributers()

void FEProblemBase::addAnyRedistributers ( )
private

Definition at line 6151 of file FEProblemBase.C.

Referenced by initialSetup().

6152 {
6153 #ifdef LIBMESH_ENABLE_AMR
6154  if ((_adaptivity.isOn() || _num_grid_steps) &&
6157  {
6158  // Even on a serialized Mesh, we don't keep our material
6159  // properties serialized, so we'll rely on the callback to
6160  // redistribute() to redistribute properties at the same time
6161  // libMesh is redistributing elements.
6162  auto add_redistributer = [this](MooseMesh & mesh,
6163  const std::string & redistributer_name,
6164  const bool use_displaced_mesh)
6165  {
6166  InputParameters redistribute_params = RedistributeProperties::validParams();
6167  redistribute_params.set<MooseApp *>(MooseBase::app_param) = &_app;
6168  redistribute_params.set<std::string>("for_whom") = this->name();
6169  redistribute_params.set<MooseMesh *>("mesh") = &mesh;
6170  redistribute_params.set<Moose::RelationshipManagerType>("rm_type") =
6172  redistribute_params.set<bool>("use_displaced_mesh") = use_displaced_mesh;
6173  redistribute_params.setHitNode(*parameters().getHitNode(), {});
6174 
6175  std::shared_ptr<RedistributeProperties> redistributer =
6177  "RedistributeProperties", redistributer_name, redistribute_params);
6178 
6181 
6183  redistributer->addMaterialPropertyStorage(_bnd_material_props);
6184 
6186  redistributer->addMaterialPropertyStorage(_neighbor_material_props);
6187 
6188  mesh.getMesh().add_ghosting_functor(redistributer);
6189  };
6190 
6191  add_redistributer(_mesh, "mesh_property_redistributer", false);
6192  if (_displaced_problem)
6193  add_redistributer(_displaced_problem->mesh(), "displaced_mesh_property_redistributer", true);
6194  }
6195 #endif // LIBMESH_ENABLE_AMR
6196 }
static const std::string app_param
The name of the parameter that contains the MooseApp.
Definition: MooseBase.h:59
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
MaterialPropertyStorage & _bnd_material_props
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:1012
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for MOOSE-based applications.
Definition: MooseApp.h:103
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int _num_grid_steps
Number of steps in a grid sequence.
bool isOn()
Is adaptivity on?
Definition: Adaptivity.h:179
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
virtual std::unique_ptr< Base > create()=0
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3528
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:92
MooseMesh & _mesh
Adaptivity _adaptivity
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
void addMaterialPropertyStorage(MaterialPropertyStorage &mat_props)
Pushes the given pair ( mat_data , mat_props ) onto our list of _materials data to redistribute each ...
virtual MooseMesh & mesh() override
std::shared_ptr< DisplacedProblem > _displaced_problem
void setHitNode(const std::string &param, const hit::Node &node, const SetParamHitNodeKey)
Sets the hit node associated with the parameter param to node.
MaterialPropertyStorage & _neighbor_material_props
const hit::Node * getHitNode() const
Definition: MooseBase.h:136
MaterialPropertyStorage & _material_props
static InputParameters validParams()
RedistributeProperties is used for its redistribute() callback, which ensures that any stateful prope...
void add_ghosting_functor(GhostingFunctor &ghosting_functor)

◆ addAuxArrayVariable()

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

Definition at line 3282 of file FEProblemBase.C.

3286 {
3287  parallel_object_only();
3288 
3289  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
3290 
3291  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true, active_subdomains))
3292  return;
3293 
3294  InputParameters params = _factory.getValidParams("ArrayMooseVariable");
3295  params.set<FEProblemBase *>("_fe_problem_base") = this;
3297  params.set<MooseEnum>("order") = type.order.get_order();
3298  params.set<MooseEnum>("family") = Moose::stringify(type.family);
3299  params.set<unsigned int>("components") = components;
3300 
3301  if (active_subdomains)
3302  for (const SubdomainID & id : *active_subdomains)
3303  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
3304 
3305  logAdd("Variable", var_name, "ArrayMooseVariable", params);
3306  _aux->addVariable("ArrayMooseVariable", var_name, params);
3307  if (_displaced_problem)
3308  _displaced_problem->addAuxVariable("ArrayMooseVariable", var_name, params);
3309 
3310  markFamilyPRefinement(params);
3311 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
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:763
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:1372
void mooseDeprecated(Args &&... args) const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
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 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 3348 of file FEProblemBase.C.

3351 {
3352  parallel_object_only();
3353 
3354  setAuxKernelParamsAndLog(kernel_name, name, parameters, "AuxKernel");
3355 
3356  _aux->addKernel(kernel_name, name, parameters);
3357 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
void setAuxKernelParamsAndLog(const std::string &ak_name, const std::string &name, InputParameters &parameters, const std::string &base_name)
Set the subproblem and system parameters for auxiliary kernels and log their addition.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ addAuxScalarKernel()

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

Definition at line 3360 of file FEProblemBase.C.

3363 {
3364  parallel_object_only();
3365 
3366  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3367  {
3368  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3369  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3370  }
3371  else
3372  {
3373  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3374  {
3375  // We allow AuxScalarKernels 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 AuxScalarKernel.
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") = _aux.get();
3385  }
3386 
3387  logAdd("AuxScalarKernel", name, kernel_name, parameters);
3388  _aux->addScalarKernel(kernel_name, name, parameters);
3389 }
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.
Definition: MooseBase.h:131
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
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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

◆ addAuxScalarVariable()

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

Definition at line 3314 of file FEProblemBase.C.

3318 {
3319  parallel_object_only();
3320 
3321  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
3322 
3323  if (order > _max_scalar_order)
3324  _max_scalar_order = order;
3325 
3326  FEType type(order, SCALAR);
3327  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true, active_subdomains))
3328  return;
3329 
3330  InputParameters params = _factory.getValidParams("MooseVariableScalar");
3331  params.set<FEProblemBase *>("_fe_problem_base") = this;
3333 
3334  params.set<MooseEnum>("order") = type.order.get_order();
3335  params.set<MooseEnum>("family") = "SCALAR";
3336  params.set<std::vector<Real>>("scaling") = {1};
3337  if (active_subdomains)
3338  for (const SubdomainID & id : *active_subdomains)
3339  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
3340 
3341  logAdd("ScalarVariable", var_name, "MooseVariableScalar", params);
3342  _aux->addVariable("MooseVariableScalar", var_name, params);
3343  if (_displaced_problem)
3344  _displaced_problem->addAuxVariable("MooseVariableScalar", var_name, params);
3345 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
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:763
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseDeprecated(Args &&... args) const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
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 
)
virtual

Canonical method for adding an auxiliary variable.

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

Reimplemented in MFEMProblem.

Definition at line 3211 of file FEProblemBase.C.

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

3214 {
3215  parallel_object_only();
3216 
3217  const auto order = Utility::string_to_enum<Order>(params.get<MooseEnum>("order"));
3218  const auto family = Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family"));
3219  const auto fe_type = FEType(order, family);
3220 
3221  const auto active_subdomains_vector =
3222  _mesh.getSubdomainIDs(params.get<std::vector<SubdomainName>>("block"));
3223  const std::set<SubdomainID> active_subdomains(active_subdomains_vector.begin(),
3224  active_subdomains_vector.end());
3225 
3226  if (duplicateVariableCheck(var_name, fe_type, /* is_aux = */ true, &active_subdomains))
3227  return;
3228 
3229  params.set<FEProblemBase *>("_fe_problem_base") = this;
3231 
3232  logAdd("AuxVariable", var_name, var_type, params);
3233  _aux->addVariable(var_type, var_name, params);
3234  if (_displaced_problem)
3235  // MooseObjects need to be unique so change the name here
3236  _displaced_problem->addAuxVariable(var_type, var_name, params);
3237 
3238  markFamilyPRefinement(params);
3239 }
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:1787
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:763
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:1372
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 
)
virtual

Definition at line 3242 of file FEProblemBase.C.

3245 {
3246  parallel_object_only();
3247 
3248  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
3249 
3250  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true, active_subdomains))
3251  return;
3252 
3253  std::string var_type;
3254  if (type == FEType(0, MONOMIAL))
3255  var_type = "MooseVariableConstMonomial";
3256  else if (type.family == SCALAR)
3257  var_type = "MooseVariableScalar";
3258  else if (FEInterface::field_type(type) == TYPE_VECTOR)
3259  var_type = "VectorMooseVariable";
3260  else
3261  var_type = "MooseVariable";
3262 
3263  InputParameters params = _factory.getValidParams(var_type);
3264  params.set<FEProblemBase *>("_fe_problem_base") = this;
3266  params.set<MooseEnum>("order") = type.order.get_order();
3267  params.set<MooseEnum>("family") = Moose::stringify(type.family);
3268 
3269  if (active_subdomains)
3270  for (const SubdomainID & id : *active_subdomains)
3271  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
3272 
3273  logAdd("AuxVariable", var_name, var_type, params);
3274  _aux->addVariable(var_type, var_name, params);
3275  if (_displaced_problem)
3276  _displaced_problem->addAuxVariable("MooseVariable", var_name, params);
3277 
3278  markFamilyPRefinement(params);
3279 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
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:763
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:1372
void mooseDeprecated(Args &&... args) const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
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 
)
virtual

Reimplemented in MFEMProblem.

Definition at line 3140 of file FEProblemBase.C.

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

3143 {
3144  parallel_object_only();
3145 
3146  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3147  if (!isSolverSystemNonlinear(nl_sys_num))
3148  mooseError(
3149  "You are trying to add a BoundaryCondition to a linear variable/system, which is not "
3150  "supported at the moment!");
3151 
3153  bc_name, name, parameters, nl_sys_num, "BoundaryCondition", _reinit_displaced_face);
3154  _nl[nl_sys_num]->addBoundaryCondition(bc_name, name, parameters);
3155 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
void setResidualObjectParamsAndLog(const std::string &ro_name, const std::string &name, InputParameters &parameters, const unsigned int nl_sys_num, const std::string &base_name, bool &reinit_displaced)
Set the subproblem and system parameters for residual objects and log their addition.
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ addCachedJacobian()

void FEProblemBase::addCachedJacobian ( const THREAD_ID  tid)
overridevirtual

◆ addCachedResidual()

void FEProblemBase::addCachedResidual ( const THREAD_ID  tid)
overridevirtual

◆ addCachedResidualDirectly()

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

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

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

Definition at line 1948 of file FEProblemBase.C.

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

1949 {
1951  _assembly[tid][_current_nl_sys->number()]->addCachedResidualDirectly(
1953 
1955  _assembly[tid][_current_nl_sys->number()]->addCachedResidualDirectly(
1957 
1958  // We do this because by adding the cached residual directly, we cannot ensure that all of the
1959  // cached residuals are emptied after only the two add calls above
1960  _assembly[tid][_current_nl_sys->number()]->clearCachedResiduals(Assembly::GlobalDataKey{});
1961 
1962  if (_displaced_problem)
1963  _displaced_problem->addCachedResidualDirectly(residual, tid);
1964 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:924
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:1157
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:162
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:844

◆ addConstraint()

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

Definition at line 3158 of file FEProblemBase.C.

3161 {
3162  parallel_object_only();
3163 
3164  _has_constraints = true;
3165 
3166  auto determine_var_param_name = [&parameters, this]()
3167  {
3168  if (parameters.isParamValid("variable"))
3169  return "variable";
3170  else
3171  {
3172  // must be a mortar constraint
3173  const bool has_secondary_var = parameters.isParamValid("secondary_variable");
3174  const bool has_primary_var = parameters.isParamValid("primary_variable");
3175  if (!has_secondary_var && !has_primary_var)
3176  mooseError(
3177  "Either a 'secondary_variable' or 'primary_variable' parameter must be supplied for '",
3179  "'");
3180  return has_secondary_var ? "secondary_variable" : "primary_variable";
3181  }
3182  };
3183 
3184  const auto nl_sys_num =
3185  determineSolverSystem(parameters.varName(determine_var_param_name(), name), true).second;
3186  if (!isSolverSystemNonlinear(nl_sys_num))
3187  mooseError("You are trying to add a Constraint to a linear variable/system, which is not "
3188  "supported at the moment!");
3189 
3190  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3191  {
3192  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3193  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3194  _reinit_displaced_face = true;
3195  }
3196  else
3197  {
3198  // It might _want_ to use a displaced mesh... but we're not so set it to false
3199  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3200  parameters.set<bool>("use_displaced_mesh") = false;
3201 
3202  parameters.set<SubProblem *>("_subproblem") = this;
3203  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3204  }
3205 
3206  logAdd("Constraint", name, c_name, parameters);
3207  _nl[nl_sys_num]->addConstraint(c_name, name, parameters);
3208 }
const std::string & getObjectName() const
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
std::shared_ptr< DisplacedProblem > _displaced_problem
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 737 of file SubProblem.C.

Referenced by MaterialPropertyInterface::addConsumedPropertyName().

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

◆ addConvergence()

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

Adds a Convergence object.

Definition at line 2579 of file FEProblemBase.C.

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

2582 {
2583  parallel_object_only();
2584 
2585  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2586  {
2587  std::shared_ptr<Convergence> conv = _factory.create<Convergence>(type, name, parameters, tid);
2588  _convergences.addObject(conv, tid);
2589  }
2590 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
unsigned int n_threads()
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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:93
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:237

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

1058 {
1059  const auto num_nl_sys = numNonlinearSystems();
1060  if (!num_nl_sys)
1061  return;
1062 
1063  systemBaseNonlinear(0).system().get_dof_map().add_coupling_functor(coupling_gf, to_mesh);
1064  cloneCouplingGhostingFunctor(coupling_gf, to_mesh);
1065 }
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:1036
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 
)
virtual

Definition at line 5380 of file FEProblemBase.C.

5383 {
5384  parallel_object_only();
5385 
5386  const auto nl_sys_num =
5387  parameters.isParamValid("variable")
5388  ? determineSolverSystem(parameters.varName("variable", name), true).second
5389  : (unsigned int)0;
5390 
5391  if (!isSolverSystemNonlinear(nl_sys_num))
5392  mooseError("You are trying to add a DGKernel to a linear variable/system, which is not "
5393  "supported at the moment!");
5394 
5395  parameters.set<SubProblem *>("_subproblem") = this;
5396  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
5397 
5398  _has_dampers = true;
5399  logAdd("Damper", name, damper_name, parameters);
5400  _nl[nl_sys_num]->addDamper(damper_name, name, parameters);
5401 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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)

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

2606 {
2607  const std::string class_name = "DefaultMultiAppFixedPointConvergence";
2608  InputParameters params = _factory.getValidParams(class_name);
2609  params.applyParameters(params_to_apply);
2610  params.applyParameters(parameters());
2611  params.set<bool>("added_as_default") = true;
2613 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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.

◆ addDefaultNonlinearConvergence()

void FEProblemBase::addDefaultNonlinearConvergence ( const InputParameters params)
virtual

Adds the default nonlinear Convergence associated with the problem.

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

Parameters
[in]paramsParameters to apply to Convergence parameters

Reimplemented in ReferenceResidualProblem.

Definition at line 2593 of file FEProblemBase.C.

2594 {
2595  const std::string class_name = "DefaultNonlinearConvergence";
2596  InputParameters params = _factory.getValidParams(class_name);
2597  params.applyParameters(params_to_apply);
2598  params.applyParameters(parameters());
2599  params.set<bool>("added_as_default") = true;
2600  for (const auto & conv_name : getNonlinearConvergenceNames())
2601  addConvergence(class_name, conv_name, params);
2602 }
const std::vector< ConvergenceName > & getNonlinearConvergenceNames() const
Gets the nonlinear system convergence object name(s).
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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.

◆ addDefaultSteadyStateConvergence()

void FEProblemBase::addDefaultSteadyStateConvergence ( const InputParameters params)

Adds the default steady-state detection Convergence.

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

Parameters
[in]paramsParameters to apply to Convergence parameters

Definition at line 2616 of file FEProblemBase.C.

2617 {
2618  const std::string class_name = "DefaultSteadyStateConvergence";
2619  InputParameters params = _factory.getValidParams(class_name);
2620  params.applyParameters(params_to_apply);
2621  params.applyParameters(parameters());
2622  params.set<bool>("added_as_default") = true;
2623  addConvergence(class_name, getSteadyStateConvergenceName(), params);
2624 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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.

◆ addDGKernel()

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

Definition at line 3432 of file FEProblemBase.C.

3435 {
3436  parallel_object_only();
3437 
3438  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3439  if (!isSolverSystemNonlinear(nl_sys_num))
3440  mooseError("You are trying to add a DGKernel to a linear variable/system, which is not "
3441  "supported at the moment!");
3442 
3443  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3444  {
3445  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3446  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3448  }
3449  else
3450  {
3451  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3452  {
3453  // We allow DGKernels to request that they use_displaced_mesh,
3454  // but then be overridden when no displacements variables are
3455  // provided in the Mesh block. If that happened, update the value
3456  // of use_displaced_mesh appropriately for this DGKernel.
3457  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3458  parameters.set<bool>("use_displaced_mesh") = false;
3459  }
3460 
3461  parameters.set<SubProblem *>("_subproblem") = this;
3462  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3463  }
3464 
3465  logAdd("DGKernel", name, dg_kernel_name, parameters);
3466  _nl[nl_sys_num]->addDGKernel(dg_kernel_name, name, parameters);
3467 
3469 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
std::shared_ptr< DisplacedProblem > _displaced_problem
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 
)
virtual

Definition at line 3392 of file FEProblemBase.C.

3395 {
3396  parallel_object_only();
3397 
3398  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3399  if (!isSolverSystemNonlinear(nl_sys_num))
3400  mooseError("You are trying to add a DiracKernel to a linear variable/system, which is not "
3401  "supported at the moment!");
3402 
3403  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3404  {
3405  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3406  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3407  _reinit_displaced_elem = true;
3408  }
3409  else
3410  {
3411  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3412  {
3413  // We allow DiracKernels to request that they use_displaced_mesh,
3414  // but then be overridden when no displacements variables are
3415  // provided in the Mesh block. If that happened, update the value
3416  // of use_displaced_mesh appropriately for this DiracKernel.
3417  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3418  parameters.set<bool>("use_displaced_mesh") = false;
3419  }
3420 
3421  parameters.set<SubProblem *>("_subproblem") = this;
3422  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3423  }
3424 
3425  logAdd("DiracKernel", name, kernel_name, parameters);
3426  _nl[nl_sys_num]->addDiracKernel(kernel_name, name, parameters);
3427 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addDisplacedProblem()

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

Definition at line 8045 of file FEProblemBase.C.

8046 {
8047  parallel_object_only();
8048 
8051 }
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 
)
virtual

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

Definition at line 2745 of file FEProblemBase.C.

2748 {
2749  parameters.set<std::string>("type") = type;
2750  addObject<Distribution>(type, name, parameters, /* threaded = */ false);
2751 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93

◆ addFunction()

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

Reimplemented in MFEMProblem.

Definition at line 2553 of file FEProblemBase.C.

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

2556 {
2557  parallel_object_only();
2558 
2559  parameters.set<SubProblem *>("_subproblem") = this;
2560 
2561  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2562  {
2563  std::shared_ptr<Function> func = _factory.create<Function>(type, name, parameters, tid);
2564  logAdd("Function", name, type, parameters);
2565  _functions.addObject(func, tid);
2566 
2567  if (auto * const functor = dynamic_cast<Moose::FunctorBase<Real> *>(func.get()))
2568  {
2569  this->addFunctor(name, *functor, tid);
2570  if (_displaced_problem)
2571  _displaced_problem->addFunctor(name, *functor, tid);
2572  }
2573  else
2574  mooseError("Unrecognized function functor type");
2575  }
2576 }
Base class for function objects.
Definition: Function.h:29
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
unsigned int n_threads()
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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:1380
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.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
virtual std::unique_ptr< Base > create()=0
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
std::shared_ptr< DisplacedProblem > _displaced_problem
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:237

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

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

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

◆ addFunctorMaterial()

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

Reimplemented in MFEMProblem.

Definition at line 3981 of file FEProblemBase.C.

3984 {
3985  parallel_object_only();
3986 
3987  auto add_functor_materials = [&](const auto & parameters, const auto & name)
3988  {
3989  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3990  {
3991  // Create the general Block/Boundary MaterialBase object
3992  std::shared_ptr<MaterialBase> material =
3993  _factory.create<MaterialBase>(functor_material_name, name, parameters, tid);
3994  logAdd("FunctorMaterial", name, functor_material_name, parameters);
3995  _all_materials.addObject(material, tid);
3996  _materials.addObject(material, tid);
3997  }
3998  };
3999 
4000  parameters.set<SubProblem *>("_subproblem") = this;
4001  add_functor_materials(parameters, name);
4002  if (_displaced_problem)
4003  {
4004  auto disp_params = parameters;
4005  disp_params.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4006  add_functor_materials(disp_params, name + "_displaced");
4007  }
4008 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
unsigned int n_threads()
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
virtual std::unique_ptr< Base > create()=0
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem
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:237
MaterialWarehouse _materials

◆ addFVBC()

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

Definition at line 3486 of file FEProblemBase.C.

Referenced by DiffusionFV::addFVBCs().

3489 {
3490  addObject<FVBoundaryCondition>(fv_bc_name, name, parameters);
3491 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103

◆ addFVInitialCondition()

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

Add an initial condition for a finite volume variables.

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

Definition at line 3655 of file FEProblemBase.C.

3658 {
3659  parallel_object_only();
3660 
3661  // before we start to mess with the initial condition, we need to check parameters for errors.
3663  const std::string & var_name = parameters.get<VariableName>("variable");
3664 
3665  // Forbid initial conditions on a restarted problem, as they would override the restart
3666  checkICRestartError(ic_name, name, var_name);
3667 
3668  parameters.set<SubProblem *>("_subproblem") = this;
3669 
3670  // field IC
3671  if (hasVariable(var_name))
3672  {
3673  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
3674  {
3675  auto & var = getVariable(
3677  parameters.set<SystemBase *>("_sys") = &var.sys();
3678  std::shared_ptr<FVInitialConditionBase> ic;
3679  if (var.isFV())
3680  ic = _factory.create<FVInitialCondition>(ic_name, name, parameters, tid);
3681  else
3682  mooseError(
3683  "Your variable for an FVInitialCondition needs to be an a finite volume variable!");
3684  _fv_ics.addObject(ic, tid);
3685  }
3686  }
3687  else
3688  mooseError("Variable '",
3689  var_name,
3690  "' requested in finite volume initial condition '",
3691  name,
3692  "' does not exist.");
3693 }
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:1049
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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 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...
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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:237

◆ addFVInterfaceKernel()

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

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

Definition at line 3494 of file FEProblemBase.C.

3497 {
3500  addObject<FVInterfaceKernel>(
3501  fv_ik_name, name, parameters, /*threaded=*/true, /*variable_param_name=*/"variable1");
3502 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103

◆ addFVKernel()

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

Definition at line 3472 of file FEProblemBase.C.

Referenced by DiffusionFV::addFVKernels().

3475 {
3476  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3477  // FVElementalKernels are computed in the historically finite element threaded loops. They rely
3478  // on Assembly data like _current_elem. When we call reinit on the FEProblemBase we will only
3479  // reinit the DisplacedProblem and its associated Assembly objects if we mark this boolean as
3480  // true
3481  _reinit_displaced_elem = true;
3482  addObject<FVKernel>(fv_kernel_name, name, parameters);
3483 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addGhostedBoundary()

void FEProblemBase::addGhostedBoundary ( BoundaryID  boundary_id)
overridevirtual

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

Implements SubProblem.

Definition at line 2150 of file FEProblemBase.C.

Referenced by DisplacedProblem::addGhostedBoundary().

2151 {
2152  _mesh.addGhostedBoundary(boundary_id);
2153  if (_displaced_problem)
2154  _displaced_mesh->addGhostedBoundary(boundary_id);
2155 }
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:3309
MooseMesh * _displaced_mesh

◆ addGhostedElem()

void FEProblemBase::addGhostedElem ( dof_id_type  elem_id)
overridevirtual

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

Implements SubProblem.

Definition at line 2143 of file FEProblemBase.C.

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

2144 {
2145  if (_mesh.elemPtr(elem_id)->processor_id() != processor_id())
2146  _ghosted_elems.insert(elem_id);
2147 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3193
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1095
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 
)
virtual

Definition at line 3054 of file FEProblemBase.C.

3057 {
3058  parallel_object_only();
3059  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3060  if (!isSolverSystemNonlinear(nl_sys_num))
3061  mooseError("You are trying to add a HDGKernel to a linear variable/system, which is not "
3062  "supported at the moment!");
3064  kernel_name, name, parameters, nl_sys_num, "HDGKernel", _reinit_displaced_elem);
3065 
3066  _nl[nl_sys_num]->addHDGKernel(kernel_name, name, parameters);
3067 }
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.
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
void setResidualObjectParamsAndLog(const std::string &ro_name, const std::string &name, InputParameters &parameters, const unsigned int nl_sys_num, const std::string &base_name, bool &reinit_displaced)
Set the subproblem and system parameters for residual objects and log their addition.
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ addIndicator()

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

Definition at line 5411 of file FEProblemBase.C.

5414 {
5415  parallel_object_only();
5416 
5417  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5418  {
5419  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5420  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5421  _reinit_displaced_elem = true;
5422  }
5423  else
5424  {
5425  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5426  {
5427  // We allow Indicators to request that they use_displaced_mesh,
5428  // but then be overridden when no displacements variables are
5429  // provided in the Mesh block. If that happened, update the value
5430  // of use_displaced_mesh appropriately for this Indicator.
5431  if (parameters.have_parameter<bool>("use_displaced_mesh"))
5432  parameters.set<bool>("use_displaced_mesh") = false;
5433  }
5434 
5435  parameters.set<SubProblem *>("_subproblem") = this;
5436  parameters.set<SystemBase *>("_sys") = _aux.get();
5437  }
5438 
5439  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
5440  {
5441  std::shared_ptr<Indicator> indicator =
5442  _factory.create<Indicator>(indicator_name, name, parameters, tid);
5443  logAdd("Indicator", name, indicator_name, parameters);
5444  std::shared_ptr<InternalSideIndicatorBase> isi =
5446  if (isi)
5448  else
5449  _indicators.addObject(indicator, tid);
5450  }
5451 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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
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:237

◆ addInitialCondition()

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

Reimplemented in MFEMProblem.

Definition at line 3595 of file FEProblemBase.C.

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

3598 {
3599  parallel_object_only();
3600 
3601  // before we start to mess with the initial condition, we need to check parameters for errors.
3603  const std::string & var_name = parameters.get<VariableName>("variable");
3604 
3605  // Forbid initial conditions on a restarted problem, as they would override the restart
3606  checkICRestartError(ic_name, name, var_name);
3607 
3608  parameters.set<SubProblem *>("_subproblem") = this;
3609 
3610  // field IC
3611  if (hasVariable(var_name))
3612  {
3613  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
3614  {
3617  parameters.set<SystemBase *>("_sys") = &var.sys();
3618  std::shared_ptr<InitialConditionBase> ic;
3619  if (dynamic_cast<MooseVariable *>(&var))
3620  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3621  else if (dynamic_cast<VectorMooseVariable *>(&var))
3622  ic = _factory.create<VectorInitialCondition>(ic_name, name, parameters, tid);
3623  else if (dynamic_cast<ArrayMooseVariable *>(&var))
3624  ic = _factory.create<ArrayInitialCondition>(ic_name, name, parameters, tid);
3625  else if (dynamic_cast<MooseVariableFVReal *>(&var))
3626  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3627  else if (dynamic_cast<MooseLinearVariableFVReal *>(&var))
3628  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3629  else
3630  mooseError("Your FE variable in initial condition ",
3631  name,
3632  " must be either of scalar or vector type");
3633  logAdd("IC", name, ic_name, parameters);
3634  _ics.addObject(ic, tid);
3635  }
3636  }
3637 
3638  // scalar IC
3639  else if (hasScalarVariable(var_name))
3640  {
3641  MooseVariableScalar & var = getScalarVariable(0, var_name);
3642  parameters.set<SystemBase *>("_sys") = &var.sys();
3643  std::shared_ptr<ScalarInitialCondition> ic =
3645  logAdd("ScalarIC", name, ic_name, parameters);
3646  _scalar_ics.addObject(ic);
3647  }
3648 
3649  else
3650  mooseError(
3651  "Variable '", var_name, "' requested in initial condition '", name, "' does not exist.");
3652 }
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:1049
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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 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
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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:237

◆ addInterfaceKernel()

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

Definition at line 3523 of file FEProblemBase.C.

3526 {
3527  parallel_object_only();
3528 
3529  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3530  if (!isSolverSystemNonlinear(nl_sys_num))
3531  mooseError("You are trying to add a InterfaceKernel to a linear variable/system, which is not "
3532  "supported at the moment!");
3533 
3534  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3535  {
3536  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3537  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3539  }
3540  else
3541  {
3542  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3543  {
3544  // We allow InterfaceKernels to request that they use_displaced_mesh,
3545  // but then be overridden when no displacements variables are
3546  // provided in the Mesh block. If that happened, update the value
3547  // of use_displaced_mesh appropriately for this InterfaceKernel.
3548  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3549  parameters.set<bool>("use_displaced_mesh") = false;
3550  }
3551 
3552  parameters.set<SubProblem *>("_subproblem") = this;
3553  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3554  }
3555 
3556  logAdd("InterfaceKernel", name, interface_kernel_name, parameters);
3557  _nl[nl_sys_num]->addInterfaceKernel(interface_kernel_name, name, parameters);
3558 
3560 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
std::shared_ptr< DisplacedProblem > _displaced_problem
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 
)
virtual

Definition at line 4019 of file FEProblemBase.C.

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

◆ addJacobian()

void FEProblemBase::addJacobian ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1987 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1988 {
1989  _assembly[tid][_current_nl_sys->number()]->addJacobian(Assembly::GlobalDataKey{});
1991  _assembly[tid][_current_nl_sys->number()]->addJacobianNonlocal(Assembly::GlobalDataKey{});
1992  if (_displaced_problem)
1993  {
1994  _displaced_problem->addJacobian(tid);
1996  _displaced_problem->addJacobianNonlocal(tid);
1997  }
1998 }
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:1157
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:844

◆ addJacobianBlockTags()

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

Definition at line 2062 of file FEProblemBase.C.

Referenced by ComputeJacobianBlocksThread::postElement().

2069 {
2070  _assembly[tid][_current_nl_sys->number()]->addJacobianBlockTags(
2071  jacobian, ivar, jvar, dof_map, dof_indices, Assembly::GlobalDataKey{}, tags);
2072 
2074  if (_nonlocal_cm[_current_nl_sys->number()](ivar, jvar) != 0)
2075  {
2076  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
2077  _assembly[tid][_current_nl_sys->number()]->addJacobianBlockNonlocalTags(
2078  jacobian,
2079  ivar,
2080  jvar,
2081  dof_map,
2082  dof_indices,
2083  jv.allDofIndices(),
2085  tags);
2086  }
2087 
2088  if (_displaced_problem)
2089  {
2090  _displaced_problem->addJacobianBlockTags(jacobian, ivar, jvar, dof_map, dof_indices, tags, tid);
2092  if (_nonlocal_cm[_current_nl_sys->number()](ivar, jvar) != 0)
2093  {
2094  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
2095  _displaced_problem->addJacobianBlockNonlocal(
2096  jacobian, ivar, jvar, dof_map, dof_indices, jv.allDofIndices(), tags, tid);
2097  }
2098  }
2099 }
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:1157
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:90
std::vector< libMesh::CouplingMatrix > _nonlocal_cm
nonlocal coupling matrix
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:844

◆ addJacobianLowerD()

void FEProblemBase::addJacobianLowerD ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 2017 of file FEProblemBase.C.

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

2018 {
2019  _assembly[tid][_current_nl_sys->number()]->addJacobianLowerD(Assembly::GlobalDataKey{});
2020  if (_displaced_problem)
2021  _displaced_problem->addJacobianLowerD(tid);
2022 }
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:1157
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:844

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

Implements SubProblem.

Definition at line 2001 of file FEProblemBase.C.

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

2002 {
2003  _assembly[tid][_current_nl_sys->number()]->addJacobianNeighbor(Assembly::GlobalDataKey{});
2004  if (_displaced_problem)
2005  _displaced_problem->addJacobianNeighbor(tid);
2006 }
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:1157
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:844

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

◆ addJacobianNeighborLowerD()

void FEProblemBase::addJacobianNeighborLowerD ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 2009 of file FEProblemBase.C.

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

2010 {
2011  _assembly[tid][_current_nl_sys->number()]->addJacobianNeighborLowerD(Assembly::GlobalDataKey{});
2012  if (_displaced_problem)
2013  _displaced_problem->addJacobianNeighborLowerD(tid);
2014 }
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:1157
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:844

◆ addJacobianOffDiagScalar()

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

Definition at line 2031 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

2032 {
2033  _assembly[tid][_current_nl_sys->number()]->addJacobianOffDiagScalar(ivar,
2035 }
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:1157
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:844

◆ addJacobianScalar()

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

Definition at line 2025 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

2026 {
2027  _assembly[tid][_current_nl_sys->number()]->addJacobianScalar(Assembly::GlobalDataKey{});
2028 }
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:1157
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:844

◆ addKernel()

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

Reimplemented in MFEMProblem.

Definition at line 3038 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEKernels().

3041 {
3042  parallel_object_only();
3043  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3044  if (!isSolverSystemNonlinear(nl_sys_num))
3045  mooseError("You are trying to add a Kernel to a linear variable/system, which is not "
3046  "supported at the moment!");
3048  kernel_name, name, parameters, nl_sys_num, "Kernel", _reinit_displaced_elem);
3049 
3050  _nl[nl_sys_num]->addKernel(kernel_name, name, parameters);
3051 }
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.
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
void setResidualObjectParamsAndLog(const std::string &ro_name, const std::string &name, InputParameters &parameters, const unsigned int nl_sys_num, const std::string &base_name, bool &reinit_displaced)
Set the subproblem and system parameters for residual objects and log their addition.
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ addKokkosAuxKernel()

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

◆ addKokkosBoundaryCondition()

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

◆ addKokkosFunction()

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

Add a Kokkos function to the problem.

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

Referenced by getKokkosFunction().

◆ addKokkosKernel()

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

◆ addKokkosMaterial()

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

◆ addKokkosNodalKernel()

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

◆ addLinearFVBC()

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

Definition at line 3513 of file FEProblemBase.C.

3516 {
3517  addObject<LinearFVBoundaryCondition>(bc_name, name, parameters);
3518 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103

◆ addLinearFVKernel()

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

Definition at line 3505 of file FEProblemBase.C.

3508 {
3509  addObject<LinearFVKernel>(kernel_name, name, parameters);
3510 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103

◆ addLineSearch()

virtual void FEProblemBase::addLineSearch ( const InputParameters )
inlinevirtual

add a MOOSE line search

Reimplemented in DumpObjectsProblem, and FEProblem.

Definition at line 777 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

778  {
779  mooseError("Line search not implemented for this problem type yet.");
780  }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ addMarker()

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

Definition at line 5454 of file FEProblemBase.C.

5457 {
5458  parallel_object_only();
5459 
5460  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5461  {
5462  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5463  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5464  _reinit_displaced_elem = true;
5465  }
5466  else
5467  {
5468  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5469  {
5470  // We allow Markers to request that they use_displaced_mesh,
5471  // but then be overridden when no displacements variables are
5472  // provided in the Mesh block. If that happened, update the value
5473  // of use_displaced_mesh appropriately for this Marker.
5474  if (parameters.have_parameter<bool>("use_displaced_mesh"))
5475  parameters.set<bool>("use_displaced_mesh") = false;
5476  }
5477 
5478  parameters.set<SubProblem *>("_subproblem") = this;
5479  parameters.set<SystemBase *>("_sys") = _aux.get();
5480  }
5481 
5482  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
5483  {
5484  std::shared_ptr<Marker> marker = _factory.create<Marker>(marker_name, name, parameters, tid);
5485  logAdd("Marker", name, marker_name, parameters);
5486  _markers.addObject(marker, tid);
5487  }
5488 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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
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:237

◆ addMaterial()

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

Reimplemented in MFEMProblem.

Definition at line 4011 of file FEProblemBase.C.

Referenced by ComponentMaterialPropertyInterface::addMaterials().

4014 {
4015  addMaterialHelper({&_materials}, mat_name, name, parameters);
4016 }
virtual void addMaterialHelper(std::vector< MaterialWarehouse *> warehouse, const std::string &material_name, const std::string &name, InputParameters &parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
MaterialWarehouse _materials

◆ addMaterialHelper()

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

Definition at line 4027 of file FEProblemBase.C.

Referenced by addInterfaceMaterial(), and addMaterial().

4031 {
4032  parallel_object_only();
4033 
4034  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4035  {
4036  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4038  }
4039  else
4040  {
4041  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
4042  {
4043  // We allow Materials to request that they use_displaced_mesh,
4044  // but then be overridden when no displacements variables are
4045  // provided in the Mesh block. If that happened, update the value
4046  // of use_displaced_mesh appropriately for this Material.
4047  if (parameters.have_parameter<bool>("use_displaced_mesh"))
4048  parameters.set<bool>("use_displaced_mesh") = false;
4049  }
4050 
4051  parameters.set<SubProblem *>("_subproblem") = this;
4052  }
4053 
4054  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
4055  {
4056  // Create the general Block/Boundary MaterialBase object
4057  std::shared_ptr<MaterialBase> material =
4058  _factory.create<MaterialBase>(mat_name, name, parameters, tid);
4059  logAdd("Material", name, mat_name, parameters);
4060  bool discrete = !material->getParam<bool>("compute");
4061 
4062  // If the object is boundary restricted or if it is a functor material we do not create the
4063  // neighbor and face objects
4064  if (material->boundaryRestricted() || dynamic_cast<FunctorMaterial *>(material.get()))
4065  {
4066  _all_materials.addObject(material, tid);
4067  if (discrete)
4068  _discrete_materials.addObject(material, tid);
4069  else
4070  for (auto && warehouse : warehouses)
4071  warehouse->addObject(material, tid);
4072  }
4073 
4074  // Non-boundary restricted require face and neighbor objects
4075  else
4076  {
4077  // TODO: we only need to do this if we have needs for face materials (e.g.
4078  // FV, DG, etc.) - but currently we always do it. Figure out how to fix
4079  // this.
4080 
4081  // The name of the object being created, this is changed multiple times as objects are
4082  // created below
4083  std::string object_name;
4084 
4085  // Create a copy of the supplied parameters to the setting for "_material_data_type" isn't
4086  // used from a previous tid loop
4087  InputParameters current_parameters = parameters;
4088 
4089  // face material
4090  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
4092  object_name = name + "_face";
4093  std::shared_ptr<MaterialBase> face_material =
4094  _factory.create<MaterialBase>(mat_name, object_name, current_parameters, tid);
4095 
4096  // neighbor material
4097  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
4099  current_parameters.set<bool>("_neighbor") = true;
4100  object_name = name + "_neighbor";
4101  std::shared_ptr<MaterialBase> neighbor_material =
4102  _factory.create<MaterialBase>(mat_name, object_name, current_parameters, tid);
4103 
4104  // Store the material objects
4105  _all_materials.addObjects(material, neighbor_material, face_material, tid);
4106 
4107  if (discrete)
4108  _discrete_materials.addObjects(material, neighbor_material, face_material, tid);
4109  else
4110  for (auto && warehouse : warehouses)
4111  warehouse->addObjects(material, neighbor_material, face_material, tid);
4112 
4113  // Names of all controllable parameters for this Material object
4114  const std::string & base = parameters.getBase();
4115  MooseObjectParameterName name(MooseObjectName(base, material->name()), "*");
4116  const auto param_names =
4118 
4119  // Connect parameters of the primary Material object to those on the face and neighbor
4120  // objects
4121  for (const auto & p_name : param_names)
4122  {
4123  MooseObjectParameterName primary_name(MooseObjectName(base, material->name()),
4124  p_name.parameter());
4125  MooseObjectParameterName face_name(MooseObjectName(base, face_material->name()),
4126  p_name.parameter());
4127  MooseObjectParameterName neighbor_name(MooseObjectName(base, neighbor_material->name()),
4128  p_name.parameter());
4130  primary_name, face_name, false);
4132  primary_name, neighbor_name, false);
4133  }
4134  }
4135  }
4136 }
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:1049
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:2983
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:740
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.
const std::string & getBase() const
std::vector< MooseObjectParameterName > getControllableParameterNames(const MooseObjectParameterName &input) const
Return a vector of parameters names matching the supplied name.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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:357
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
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:237

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

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

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

◆ addMeshDivision()

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

Add a MeshDivision.

Definition at line 2700 of file FEProblemBase.C.

2703 {
2704  parallel_object_only();
2705  parameters.set<FEProblemBase *>("_fe_problem_base") = this;
2706  parameters.set<SubProblem *>("_subproblem") = this;
2707  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2708  {
2709  std::shared_ptr<MeshDivision> func = _factory.create<MeshDivision>(type, name, parameters, tid);
2710  _mesh_divisions.addObject(func, tid);
2711  }
2712 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
unsigned int n_threads()
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
virtual std::unique_ptr< Base > create()=0
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
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
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:237

◆ addMultiApp()

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

Add a MultiApp to the problem.

Definition at line 5491 of file FEProblemBase.C.

5494 {
5495  parallel_object_only();
5496 
5497  parameters.set<MPI_Comm>("_mpi_comm") = _communicator.get();
5498 
5499  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5500  {
5501  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5502  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5503  _reinit_displaced_elem = true;
5504  }
5505  else
5506  {
5507  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5508  {
5509  // We allow MultiApps to request that they use_displaced_mesh,
5510  // but then be overridden when no displacements variables are
5511  // provided in the Mesh block. If that happened, update the value
5512  // of use_displaced_mesh appropriately for this MultiApp.
5513  if (parameters.have_parameter<bool>("use_displaced_mesh"))
5514  parameters.set<bool>("use_displaced_mesh") = false;
5515  }
5516 
5517  parameters.set<SubProblem *>("_subproblem") = this;
5518  parameters.set<SystemBase *>("_sys") = _aux.get();
5519  }
5520 
5521  std::shared_ptr<MultiApp> multi_app = _factory.create<MultiApp>(multi_app_name, name, parameters);
5522  logAdd("MultiApp", name, multi_app_name, parameters);
5523  multi_app->setupPositions();
5524 
5525  _multi_apps.addObject(multi_app);
5526 
5527  // Store TransientMultiApp objects in another container, this is needed for calling computeDT
5528  std::shared_ptr<TransientMultiApp> trans_multi_app =
5530  if (trans_multi_app)
5531  _transient_multi_apps.addObject(trans_multi_app);
5532 }
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:1049
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.
Definition: MooseBase.h:131
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
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
virtual std::unique_ptr< Base > create()=0
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
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
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 
)
virtual

Definition at line 3070 of file FEProblemBase.C.

3073 {
3074  parallel_object_only();
3075 
3076  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3077  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3078  {
3079  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3080  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3081  _reinit_displaced_elem = true;
3082  }
3083  else
3084  {
3085  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3086  {
3087  // We allow NodalKernels to request that they use_displaced_mesh,
3088  // but then be overridden when no displacements variables are
3089  // provided in the Mesh block. If that happened, update the value
3090  // of use_displaced_mesh appropriately for this NodalKernel.
3091  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3092  parameters.set<bool>("use_displaced_mesh") = false;
3093  }
3094 
3095  parameters.set<SubProblem *>("_subproblem") = this;
3096  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3097  }
3098  logAdd("NodalKernel", name, kernel_name, parameters);
3099  _nl[nl_sys_num]->addNodalKernel(kernel_name, name, parameters);
3100 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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

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

Referenced by createTagVectors().

151 {
152  _not_zeroed_tagged_vectors.insert(tag);
153 }
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:1119

◆ addObject()

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

Method for creating and adding an object to the warehouse.

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

Definition at line 3450 of file FEProblemBase.h.

3455 {
3456  parallel_object_only();
3457 
3458  logAdd(MooseUtils::prettyCppType<T>(), name, type, parameters);
3459  // Add the _subproblem and _sys parameters depending on use_displaced_mesh
3460  addObjectParamsHelper(parameters, name, var_param_name);
3461 
3462  const auto n_threads = threaded ? libMesh::n_threads() : 1;
3463  std::vector<std::shared_ptr<T>> objects(n_threads);
3464  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
3465  {
3466  std::shared_ptr<T> obj = _factory.create<T>(type, name, parameters, tid);
3467  theWarehouse().add(obj);
3468  objects[tid] = std::move(obj);
3469  }
3470 
3471  return objects;
3472 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
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
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Definition: Factory.C:142
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.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
TheWarehouse & theWarehouse() const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
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().
unsigned int THREAD_ID
Definition: MooseTypes.h:237

◆ addObjectParamsHelper()

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

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

This is needed due to header includes/forward declaration issues

Definition at line 4421 of file FEProblemBase.C.

Referenced by addObject(), and addUserObject().

4424 {
4425  // Due to objects like SolutionUserObject which manipulate libmesh objects
4426  // and variables directly at the back end, we need a default option here
4427  // which is going to be the pointer to the first solver system within this
4428  // problem
4429  unsigned int sys_num = 0;
4430  if (parameters.isParamValid(var_param_name))
4431  {
4432  const auto variable_name = parameters.varName(var_param_name, object_name);
4433  if (this->hasVariable(variable_name) || this->hasScalarVariable(variable_name))
4434  sys_num = getSystem(variable_name).number();
4435  }
4436  if (parameters.isParamValid("solver_sys"))
4437  {
4438  const auto var_sys_num = sys_num;
4439  sys_num = getSystemBase(parameters.get<SolverSystemName>("solver_sys")).number();
4440  if (sys_num != var_sys_num && parameters.isParamValid(var_param_name))
4441  mooseError("We dont support setting 'variable' to a variable that is not set to the same "
4442  "system as the 'solver_sys' parameter");
4443  }
4444 
4445  if (_displaced_problem && parameters.have_parameter<bool>("use_displaced_mesh") &&
4446  parameters.get<bool>("use_displaced_mesh"))
4447  {
4448  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4449  if (sys_num == _aux->number())
4450  parameters.set<SystemBase *>("_sys") = &_displaced_problem->systemBaseAuxiliary();
4451  else
4452  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(sys_num);
4453  }
4454  else
4455  {
4456  // The object requested use_displaced_mesh, but it was overridden
4457  // due to there being no displacements variables in the [Mesh] block.
4458  // If that happened, update the value of use_displaced_mesh appropriately.
4459  if (!_displaced_problem && parameters.have_parameter<bool>("use_displaced_mesh") &&
4460  parameters.get<bool>("use_displaced_mesh"))
4461  parameters.set<bool>("use_displaced_mesh") = false;
4462 
4463  parameters.set<SubProblem *>("_subproblem") = this;
4464 
4465  if (sys_num == _aux->number())
4466  parameters.set<SystemBase *>("_sys") = _aux.get();
4467  else
4468  parameters.set<SystemBase *>("_sys") = _solver_systems[sys_num].get();
4469  }
4470 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
unsigned int number() const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1157
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
virtual const SystemBase & getSystemBase(const unsigned int sys_num) const
Get constant reference to a system in this problem.
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
std::shared_ptr< DisplacedProblem > _displaced_problem
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 
)

Adds an Output object.

Definition at line 9100 of file FEProblemBase.C.

9103 {
9104  parallel_object_only();
9105 
9106  // Get a reference to the OutputWarehouse
9107  OutputWarehouse & output_warehouse = _app.getOutputWarehouse();
9108 
9109  // Reject the reserved names for objects not built by MOOSE
9110  if (!parameters.get<bool>("_built_by_moose") && output_warehouse.isReservedName(object_name))
9111  mooseError("The name '", object_name, "' is a reserved name for output objects");
9112 
9113  // Check that an object by the same name does not already exist; this must be done before the
9114  // object is created to avoid getting misleading errors from the Parser
9115  if (output_warehouse.hasOutput(object_name))
9116  mooseError("An output object named '", object_name, "' already exists");
9117 
9118  // Add a pointer to the FEProblemBase class
9119  parameters.addPrivateParam<FEProblemBase *>("_fe_problem_base", this);
9120 
9121  // Create common parameter exclude list
9122  std::vector<std::string> exclude;
9123  if (object_type == "Console")
9124  {
9125  exclude.push_back("execute_on");
9126 
9127  // --show-input should enable the display of the input file on the screen
9128  if (_app.getParam<bool>("show_input") && parameters.get<bool>("output_screen"))
9129  parameters.set<ExecFlagEnum>("execute_input_on") = EXEC_INITIAL;
9130  }
9131  // Need this because Checkpoint::validParams changes the default value of
9132  // execute_on
9133  else if (object_type == "Checkpoint")
9134  exclude.push_back("execute_on");
9135 
9136  // Apply the common parameters loaded with Outputs input syntax
9137  const InputParameters * common = output_warehouse.getCommonParameters();
9138  if (common)
9139  parameters.applyParameters(*common, exclude);
9140  if (common && std::find(exclude.begin(), exclude.end(), "execute_on") != exclude.end() &&
9141  common->isParamSetByUser("execute_on") && object_type != "Console")
9143  "'execute_on' parameter specified in [Outputs] block is ignored for object '" +
9144  object_name +
9145  "'.\nDefine this object in its own sub-block of [Outputs] to modify its "
9146  "execution schedule.");
9147 
9148  // Set the correct value for the binary flag for XDA/XDR output
9149  if (object_type == "XDR")
9150  parameters.set<bool>("_binary") = true;
9151  else if (object_type == "XDA")
9152  parameters.set<bool>("_binary") = false;
9153 
9154  // Adjust the checkpoint suffix if auto recovery was enabled
9155  if (object_name == "auto_recovery_checkpoint")
9156  parameters.set<std::string>("suffix") = "auto_recovery";
9157 
9158  // Create the object and add it to the warehouse
9159  std::shared_ptr<Output> output = _factory.create<Output>(object_type, object_name, parameters);
9160  logAdd("Output", object_name, object_type, parameters);
9161  output_warehouse.addOutput(output);
9162 }
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:42
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseBase.h:388
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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:398
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:357
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 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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2525
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:30

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

Referenced by FunctorMaterial::addFunctorPropertyByBlocks().

1349 {
1350  auto & pbblf_functors = _pbblf_functors[tid];
1351 
1352  auto [it, first_time_added] =
1353  pbblf_functors.emplace(name,
1354  std::make_unique<PiecewiseByBlockLambdaFunctor<T>>(
1355  name, my_lammy, clearance_schedule, mesh, block_ids));
1356 
1357  auto * functor = dynamic_cast<PiecewiseByBlockLambdaFunctor<T> *>(it->second.get());
1358  if (!functor)
1359  {
1360  if (first_time_added)
1361  mooseError("This should be impossible. If this was the first time we added the functor, then "
1362  "the dynamic cast absolutely should have succeeded");
1363  else
1364  mooseError("Attempted to add a lambda functor with the name '",
1365  name,
1366  "' but another lambda functor of that name returns a different type");
1367  }
1368 
1369  if (first_time_added)
1370  addFunctor(name, *functor, tid);
1371  else
1372  // The functor already exists
1373  functor->setFunctor(mesh, block_ids, my_lammy);
1374 
1375  return *functor;
1376 }
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:1380
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::vector< std::map< std::string, std::unique_ptr< Moose::FunctorAbstract > > > _pbblf_functors
Container to hold PiecewiseByBlockLambdaFunctors.
Definition: SubProblem.h:1149
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ addPostprocessor()

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

Reimplemented in MFEMProblem.

Definition at line 4473 of file FEProblemBase.C.

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

4476 {
4477  // Check for name collision
4478  if (hasUserObject(name))
4479  mooseError("A ",
4481  " already exists. You may not add a Postprocessor by the same name.");
4482 
4483  addUserObject(pp_name, name, parameters);
4484 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::string typeAndName() const
Get the class&#39;s combined type and name; useful in error handling.
Definition: MooseBase.C: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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
Get the user object by its name.

◆ addPredictor()

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

Definition at line 7049 of file FEProblemBase.C.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector().

7052 {
7053  parallel_object_only();
7054 
7056  mooseError("Vector bounds cannot be used with LinearSystems!");
7057 
7058  parameters.set<SubProblem *>("_subproblem") = this;
7059  std::shared_ptr<Predictor> predictor = _factory.create<Predictor>(type, name, parameters);
7060  logAdd("Predictor", name, type, parameters);
7061 
7062  for (auto & nl : _nl)
7063  nl->setPredictor(predictor);
7064 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
virtual std::size_t numNonlinearSystems() const override
Base class for predictors.
Definition: Predictor.h:28
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
virtual std::unique_ptr< Base > create()=0
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
virtual std::size_t numLinearSystems() const override

◆ addReporter()

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

Add a Reporter object to the simulation.

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

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

Definition at line 4501 of file FEProblemBase.C.

Referenced by MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer().

4504 {
4505  // Check for name collision
4506  if (hasUserObject(name))
4507  mooseError("A ",
4509  " already exists. You may not add a Reporter by the same name.");
4510 
4512 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
std::string typeAndName() const
Get the class&#39;s combined type and name; useful in error handling.
Definition: MooseBase.C: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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
Get the user object by its name.

◆ addResidual()

void FEProblemBase::addResidual ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1887 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1888 {
1889  _assembly[tid][_current_nl_sys->number()]->addResidual(Assembly::GlobalDataKey{},
1891 
1892  if (_displaced_problem)
1893  _displaced_problem->addResidual(tid);
1894 }
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:1157
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:844

◆ addResidualLower()

void FEProblemBase::addResidualLower ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1907 of file FEProblemBase.C.

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

1908 {
1909  _assembly[tid][_current_nl_sys->number()]->addResidualLower(Assembly::GlobalDataKey{},
1911 
1912  if (_displaced_problem)
1913  _displaced_problem->addResidualLower(tid);
1914 }
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:1157
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:844

◆ addResidualNeighbor()

void FEProblemBase::addResidualNeighbor ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1897 of file FEProblemBase.C.

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

1898 {
1899  _assembly[tid][_current_nl_sys->number()]->addResidualNeighbor(Assembly::GlobalDataKey{},
1901 
1902  if (_displaced_problem)
1903  _displaced_problem->addResidualNeighbor(tid);
1904 }
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:1157
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:844

◆ addResidualScalar()

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

Definition at line 1917 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeResidualInternal().

1918 {
1919  _assembly[tid][_current_nl_sys->number()]->addResidualScalar(Assembly::GlobalDataKey{},
1921 }
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:1157
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:844

◆ addSampler()

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

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

Definition at line 2768 of file FEProblemBase.C.

2771 {
2772  const auto samplers = addObject<Sampler>(type, name, parameters);
2773  for (auto & sampler : samplers)
2774  sampler->init();
2775 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93

◆ addScalarKernel()

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

Definition at line 3103 of file FEProblemBase.C.

3106 {
3107  parallel_object_only();
3108 
3109  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3110  if (!isSolverSystemNonlinear(nl_sys_num))
3111  mooseError("You are trying to add a ScalarKernel to a linear variable/system, which is not "
3112  "supported at the moment!");
3113 
3114  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3115  {
3116  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3117  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3118  }
3119  else
3120  {
3121  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3122  {
3123  // We allow ScalarKernels to request that they use_displaced_mesh,
3124  // but then be overridden when no displacements variables are
3125  // provided in the Mesh block. If that happened, update the value
3126  // of use_displaced_mesh appropriately for this ScalarKernel.
3127  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3128  parameters.set<bool>("use_displaced_mesh") = false;
3129  }
3130 
3131  parameters.set<SubProblem *>("_subproblem") = this;
3132  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3133  }
3134 
3135  logAdd("ScalarKernel", name, kernel_name, parameters);
3136  _nl[nl_sys_num]->addScalarKernel(kernel_name, name, parameters);
3137 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addTimeIntegrator()

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

Definition at line 7014 of file FEProblemBase.C.

Referenced by TransientBase::setupTimeIntegrator().

7017 {
7018  parallel_object_only();
7019 
7020  parameters.set<SubProblem *>("_subproblem") = this;
7021  logAdd("TimeIntegrator", name, type, parameters);
7022  _aux->addTimeIntegrator(type, name + ":aux", parameters);
7023  for (auto & sys : _solver_systems)
7024  sys->addTimeIntegrator(type, name + ":" + sys->name(), parameters);
7025  _has_time_integrator = true;
7026 
7027  // add vectors to store u_dot, u_dotdot, udot_old, u_dotdot_old and
7028  // solution vectors older than 2 time steps, if requested by the time
7029  // integrator
7030  _aux->addDotVectors();
7031  for (auto & nl : _nl)
7032  {
7033  nl->addDotVectors();
7034 
7035  auto tag_udot = nl->getTimeIntegrators()[0]->uDotFactorTag();
7036  if (!nl->hasVector(tag_udot))
7037  nl->associateVectorToTag(*nl->solutionUDot(), tag_udot);
7038  auto tag_udotdot = nl->getTimeIntegrators()[0]->uDotDotFactorTag();
7039  if (!nl->hasVector(tag_udotdot) && uDotDotRequested())
7040  nl->associateVectorToTag(*nl->solutionUDotDot(), tag_udotdot);
7041  }
7042 
7043  if (_displaced_problem)
7044  // Time integrator does not exist when displaced problem is created.
7045  _displaced_problem->addTimeIntegrator();
7046 }
virtual bool uDotDotRequested()
Get boolean flag to check whether solution second time derivative needs to be stored.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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)
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addTransfer()

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

Add a Transfer to the problem.

Reimplemented in MFEMProblem.

Definition at line 5837 of file FEProblemBase.C.

Referenced by MFEMProblem::addTransfer().

5840 {
5841  parallel_object_only();
5842 
5843  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5844  {
5845  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5846  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5847  _reinit_displaced_elem = true;
5848  }
5849  else
5850  {
5851  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5852  {
5853  // We allow Transfers to request that they use_displaced_mesh,
5854  // but then be overridden when no displacements variables are
5855  // provided in the Mesh block. If that happened, update the value
5856  // of use_displaced_mesh appropriately for this Transfer.
5857  if (parameters.have_parameter<bool>("use_displaced_mesh"))
5858  parameters.set<bool>("use_displaced_mesh") = false;
5859  }
5860 
5861  parameters.set<SubProblem *>("_subproblem") = this;
5862  parameters.set<SystemBase *>("_sys") = _aux.get();
5863  }
5864 
5865  // Handle the "SAME_AS_MULTIAPP" execute option. The get method is used to test for the
5866  // flag so the set by user flag is not reset, calling set with the true flag causes the set
5867  // by user status to be reset, which should only be done if the EXEC_SAME_AS_MULTIAPP is
5868  // being applied to the object.
5870  {
5871  ExecFlagEnum & exec_enum = parameters.set<ExecFlagEnum>("execute_on", true);
5872  std::shared_ptr<MultiApp> multiapp;
5873  if (parameters.isParamValid("multi_app"))
5874  multiapp = getMultiApp(parameters.get<MultiAppName>("multi_app"));
5875  // This catches the sibling transfer case, where we want to be executing only as often as the
5876  // receiving application. A transfer 'to' a multiapp is executed before that multiapp
5877  else if (parameters.isParamValid("to_multi_app"))
5878  multiapp = getMultiApp(parameters.get<MultiAppName>("to_multi_app"));
5879  else if (parameters.isParamValid("from_multi_app"))
5880  multiapp = getMultiApp(parameters.get<MultiAppName>("from_multi_app"));
5881  // else do nothing because the user has provided invalid input. They should get a nice error
5882  // about this during transfer construction. This necessitates checking for null in this next
5883  // line, however
5884  if (multiapp)
5885  exec_enum = multiapp->getParam<ExecFlagEnum>("execute_on");
5886  }
5887 
5888  // Create the Transfer objects
5889  std::shared_ptr<Transfer> transfer = _factory.create<Transfer>(transfer_name, name, parameters);
5890  logAdd("Transfer", name, transfer_name, parameters);
5891 
5892  // Add MultiAppTransfer object
5893  std::shared_ptr<MultiAppTransfer> multi_app_transfer =
5895  if (multi_app_transfer)
5896  {
5897  if (multi_app_transfer->directions().isValueSet(MultiAppTransfer::TO_MULTIAPP))
5898  _to_multi_app_transfers.addObject(multi_app_transfer);
5899  if (multi_app_transfer->directions().isValueSet(MultiAppTransfer::FROM_MULTIAPP))
5900  _from_multi_app_transfers.addObject(multi_app_transfer);
5901  if (multi_app_transfer->directions().isValueSet(MultiAppTransfer::BETWEEN_MULTIAPP))
5902  _between_multi_app_transfers.addObject(multi_app_transfer);
5903  }
5904  else
5905  _transfers.addObject(transfer);
5906 }
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:1049
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.
Definition: MooseBase.h:131
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
std::shared_ptr< MultiApp > getMultiApp(const std::string &multi_app_name) const
Get a MultiApp object by name.
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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:53
std::shared_ptr< DisplacedProblem > _displaced_problem
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 
)
virtual

Definition at line 4515 of file FEProblemBase.C.

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

4518 {
4519  parallel_object_only();
4520 
4521  std::vector<std::shared_ptr<UserObject>> uos;
4522 
4523  // Add the _subproblem and _sys parameters depending on use_displaced_mesh
4525 
4526  for (const auto tid : make_range(libMesh::n_threads()))
4527  {
4528  // Create the UserObject
4529  std::shared_ptr<UserObject> user_object =
4530  _factory.create<UserObject>(user_object_name, name, parameters, tid);
4531  logAdd("UserObject", name, user_object_name, parameters);
4532  uos.push_back(user_object);
4533 
4534  if (tid != 0)
4535  user_object->setPrimaryThreadCopy(uos[0].get());
4536 
4537  // TODO: delete this line after apps have been updated to not call getUserObjects
4538  _all_user_objects.addObject(user_object, tid);
4539 
4540  theWarehouse().add(user_object);
4541 
4542  // Attempt to create all the possible UserObject types
4543  auto euo = std::dynamic_pointer_cast<ElementUserObject>(user_object);
4544  auto suo = std::dynamic_pointer_cast<SideUserObject>(user_object);
4545  auto isuo = std::dynamic_pointer_cast<InternalSideUserObject>(user_object);
4546  auto iuo = std::dynamic_pointer_cast<InterfaceUserObjectBase>(user_object);
4547  auto nuo = std::dynamic_pointer_cast<NodalUserObject>(user_object);
4548  auto duo = std::dynamic_pointer_cast<DomainUserObject>(user_object);
4549  auto guo = std::dynamic_pointer_cast<GeneralUserObject>(user_object);
4550  auto tguo = std::dynamic_pointer_cast<ThreadedGeneralUserObject>(user_object);
4551  auto muo = std::dynamic_pointer_cast<MortarUserObject>(user_object);
4552 
4553  // Account for displaced mesh use
4554  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4555  {
4556  // Whether to re-init or not depends on the attributes of the base classes.
4557  // For example, InterfaceUOBase has "_current_side_elem" and "_neighbor_elem"
4558  // so it needs to reinit on displaced neighbors and faces
4559  // _reinit_displaced_elem -> _current_elem will be reinited
4560  // _reinit_displaced_face -> _current_elem, lowerD if any and _current_side_elem to be
4561  // reinited _reinit_displaced_neighbor -> _current_elem, lowerD if any and _current_neighbor
4562  // to be reinited Note that as soon as you use materials on the displaced mesh, all three get
4563  // turned on.
4564  if (euo || nuo || duo)
4565  _reinit_displaced_elem = true;
4566  if (suo || duo || isuo || iuo)
4567  _reinit_displaced_face = true;
4568  if (iuo || duo || isuo)
4570  }
4571 
4572  // These objects only require one thread
4573  if ((guo && !tguo) || muo)
4574  break;
4575  }
4576 
4577  // Add as a Functor if it is one. We usually need to add the user object from thread 0 as the
4578  // registered functor for all threads because when user objects are thread joined, generally only
4579  // the primary thread copy ends up with all the data
4580  for (const auto tid : make_range(libMesh::n_threads()))
4581  {
4582  const decltype(uos)::size_type uo_index = uos.front()->needThreadedCopy() ? tid : 0;
4583  if (const auto functor = dynamic_cast<Moose::FunctorBase<Real> *>(uos[uo_index].get()))
4584  {
4585  this->addFunctor(name, *functor, tid);
4586  if (_displaced_problem)
4587  _displaced_problem->addFunctor(name, *functor, tid);
4588  }
4589  }
4590 
4591  return uos;
4592 }
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:1049
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
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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:1380
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.
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
A user object that runs over all the nodes and does an aggregation step to compute a single value...
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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
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 
)
virtual

Canonical method for adding a non-linear variable.

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

Reimplemented in MFEMProblem.

Definition at line 2907 of file FEProblemBase.C.

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

2910 {
2911  parallel_object_only();
2912 
2913  const auto order = Utility::string_to_enum<Order>(params.get<MooseEnum>("order"));
2914  const auto family = Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family"));
2915  const auto fe_type = FEType(order, family);
2916 
2917  const auto active_subdomains_vector =
2918  _mesh.getSubdomainIDs(params.get<std::vector<SubdomainName>>("block"));
2919  const std::set<SubdomainID> active_subdomains(active_subdomains_vector.begin(),
2920  active_subdomains_vector.end());
2921 
2922  if (duplicateVariableCheck(var_name, fe_type, /* is_aux = */ false, &active_subdomains))
2923  return;
2924 
2925  params.set<FEProblemBase *>("_fe_problem_base") = this;
2926  params.set<Moose::VarKindType>("_var_kind") = Moose::VarKindType::VAR_SOLVER;
2927  SolverSystemName sys_name = params.get<SolverSystemName>("solver_sys");
2928 
2929  const auto solver_system_number = solverSysNum(sys_name);
2930  logAdd("Variable", var_name, var_type, params);
2931  _solver_systems[solver_system_number]->addVariable(var_type, var_name, params);
2932  if (_displaced_problem)
2933  // MooseObjects need to be unique so change the name here
2934  _displaced_problem->addVariable(var_type, var_name, params, solver_system_number);
2935 
2936  _solver_var_to_sys_num[var_name] = solver_system_number;
2937 
2938  markFamilyPRefinement(params);
2939 }
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:1787
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:763
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:1372
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 
)
virtual

Definition at line 4487 of file FEProblemBase.C.

Referenced by ExtraIDIntegralReporter::ExtraIDIntegralReporter().

4490 {
4491  // Check for name collision
4492  if (hasUserObject(name))
4493  mooseError("A ",
4495  " already exists. You may not add a VectorPostprocessor by the same name.");
4496 
4497  addUserObject(pp_name, name, parameters);
4498 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::string typeAndName() const
Get the class&#39;s combined type and name; useful in error handling.
Definition: MooseBase.C: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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
Get the user object by its name.

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

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

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

◆ advanceMultiApps()

void FEProblemBase::advanceMultiApps ( ExecFlagType  type)
inline

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

Definition at line 1519 of file FEProblemBase.h.

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

◆ advanceState()

void FEProblemBase::advanceState ( )
virtual

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

Reimplemented in DumpObjectsProblem.

Definition at line 6853 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().

6854 {
6855  TIME_SECTION("advanceState", 5, "Advancing State");
6856 
6857  for (auto & sys : _solver_systems)
6858  sys->copyOldSolutions();
6859  _aux->copyOldSolutions();
6860 
6861  if (_displaced_problem)
6862  {
6863  for (const auto i : index_range(_solver_systems))
6864  _displaced_problem->solverSys(i).copyOldSolutions();
6865  _displaced_problem->auxSys().copyOldSolutions();
6866  }
6867 
6869 
6871 
6874 
6877 
6880 
6881 #ifdef MOOSE_KOKKOS_ENABLED
6884 
6887 
6890 #endif
6891 }
void shift()
Shift the material properties in time.
MaterialPropertyStorage & _bnd_material_props
void shift()
Shift current, old, and older material property data storages.
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:87
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
Moose::Kokkos::MaterialPropertyStorage & _kokkos_material_props
ChainControlDataSystem & getChainControlDataSystem()
Gets the system that manages the ChainControls.
Definition: MooseApp.h:845
std::shared_ptr< DisplacedProblem > _displaced_problem
MaterialPropertyStorage & _neighbor_material_props
Moose::Kokkos::MaterialPropertyStorage & _kokkos_bnd_material_props
MaterialPropertyStorage & _material_props
Moose::Kokkos::MaterialPropertyStorage & _kokkos_neighbor_material_props
auto index_range(const T &sizable)

◆ allowInvalidSolution()

bool FEProblemBase::allowInvalidSolution ( ) const
inline

Whether to accept / allow an invalid solution.

Definition at line 2229 of file FEProblemBase.h.

Referenced by acceptInvalidSolution().

2229 { return _allow_invalid_solution; }
const bool _allow_invalid_solution

◆ allowOutput() [1/2]

void FEProblemBase::allowOutput ( bool  state)

Ability to enable/disable all output calls.

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

Definition at line 6960 of file FEProblemBase.C.

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

6961 {
6963 }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
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:2525

◆ allowOutput() [2/2]

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

Definition at line 3401 of file FEProblemBase.h.

3402 {
3403  _app.getOutputWarehouse().allowOutput<T>(state);
3404 }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
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:2525

◆ areCoupled()

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

Definition at line 6393 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

6396 {
6397  return (*_cm[nl_sys])(ivar, jvar);
6398 }
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 
)
inlineoverridevirtual

Implements SubProblem.

Definition at line 3549 of file FEProblemBase.h.

Referenced by ArrayNodalBC::computeJacobian(), VectorNodalBC::computeJacobian(), NodalBC::computeJacobian(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeNodalBCsResidualAndJacobian(), VectorNodalBC::computeOffDiagJacobian(), ArrayNodalBC::computeOffDiagJacobian(), NodalBC::computeOffDiagJacobian(), NonlinearSystemBase::constraintJacobians(), initialSetup(), ComputeBoundaryInitialConditionThread::onNode(), MaxQpsThread::operator()(), and reinitScalars().

3550 {
3551  mooseAssert(tid < _assembly.size(), "Assembly objects not initialized");
3552  mooseAssert(sys_num < _assembly[tid].size(),
3553  "System number larger than the assembly container size");
3554  return *_assembly[tid][sys_num];
3555 }
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ assembly() [2/2]

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

Implements SubProblem.

Definition at line 3558 of file FEProblemBase.h.

3559 {
3560  mooseAssert(tid < _assembly.size(), "Assembly objects not initialized");
3561  mooseAssert(sys_num < _assembly[tid].size(),
3562  "System number larger than the assembly container size");
3563  return *_assembly[tid][sys_num];
3564 }
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 1163 of file SubProblem.C.

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

1164 {
1165  // Currently going to assume that we are applying or not applying automatic scaling consistently
1166  // across nonlinear systems
1168 }
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]

bool SubProblem::automaticScaling

Automatic scaling getter.

Returns
A boolean representing whether we are performing automatic scaling

Definition at line 1163 of file SubProblem.C.

1164 {
1165  // Currently going to assume that we are applying or not applying automatic scaling consistently
1166  // across nonlinear systems
1168 }
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() [3/4]

void SubProblem::automaticScaling

Automatic scaling setter.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Definition at line 1156 of file SubProblem.C.

1157 {
1158  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1159  systemBaseNonlinear(nl_sys_num).automaticScaling(automatic_scaling);
1160 }
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() [4/4]

void FEProblemBase::automaticScaling ( bool  automatic_scaling)
overridevirtual

Automatic scaling setter.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Reimplemented from SubProblem.

Definition at line 9295 of file FEProblemBase.C.

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

9296 {
9297  if (_displaced_problem)
9298  _displaced_problem->automaticScaling(automatic_scaling);
9299 
9300  SubProblem::automaticScaling(automatic_scaling);
9301 }
bool automaticScaling() const
Automatic scaling getter.
Definition: SubProblem.C:1163
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ backupMultiApps()

void FEProblemBase::backupMultiApps ( ExecFlagType  type)

Backup the MultiApps associated with the ExecFlagType.

Definition at line 5758 of file FEProblemBase.C.

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

5759 {
5760  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5761 
5762  if (multi_apps.size())
5763  {
5764  TIME_SECTION("backupMultiApps", 5, "Backing Up MultiApp");
5765 
5766  if (_verbose_multiapps)
5767  _console << COLOR_CYAN << "\nBacking Up MultiApps on " << type.name() << COLOR_DEFAULT
5768  << std::endl;
5769 
5770  for (const auto & multi_app : multi_apps)
5771  multi_app->backup();
5772 
5774 
5775  if (_verbose_multiapps)
5776  _console << COLOR_CYAN << "Finished Backing Up MultiApps on " << type.name() << "\n"
5777  << COLOR_DEFAULT << std::endl;
5778  }
5779 }
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...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
void parallelBarrierNotify(const Parallel::Communicator &comm, bool messaging)
Definition: MooseUtils.C:327
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ bumpAllQRuleOrder()

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

Definition at line 6250 of file FEProblemBase.C.

6251 {
6252  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
6253  for (const auto i : index_range(_nl))
6254  _assembly[tid][i]->bumpAllQRuleOrder(order, block);
6255 
6256  if (_displaced_problem)
6257  _displaced_problem->bumpAllQRuleOrder(order, block);
6258 
6259  updateMaxQps();
6260 }
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 
)

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

6238 {
6239  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
6240  for (const auto i : index_range(_nl))
6241  _assembly[tid][i]->bumpVolumeQRuleOrder(order, block);
6242 
6243  if (_displaced_problem)
6244  _displaced_problem->bumpVolumeQRuleOrder(order, block);
6245 
6246  updateMaxQps();
6247 }
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)
overridevirtual

Reimplemented from SubProblem.

Definition at line 2038 of file FEProblemBase.C.

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

2039 {
2041  if (_displaced_problem)
2042  _displaced_problem->cacheJacobian(tid);
2043 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void cacheJacobian(const THREAD_ID tid)
Definition: SubProblem.C:1317

◆ cacheJacobianNeighbor()

void FEProblemBase::cacheJacobianNeighbor ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 2046 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

2047 {
2049  if (_displaced_problem)
2050  _displaced_problem->cacheJacobianNeighbor(tid);
2051 }
virtual void cacheJacobianNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1325
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ cacheResidual()

void FEProblemBase::cacheResidual ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 1924 of file FEProblemBase.C.

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

1925 {
1927  if (_displaced_problem)
1928  _displaced_problem->cacheResidual(tid);
1929 }
virtual void cacheResidual(const THREAD_ID tid)
Definition: SubProblem.C:1296
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ cacheResidualNeighbor()

void FEProblemBase::cacheResidualNeighbor ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 1932 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals().

1933 {
1935  if (_displaced_problem)
1936  _displaced_problem->cacheResidualNeighbor(tid);
1937 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void cacheResidualNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1303

◆ callMooseError() [1/2]

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

External method for calling moose error with added object context.

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

Definition at line 105 of file MooseBase.C.

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

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

◆ callMooseError() [2/2]

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

External method for calling moose error with added object context.

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

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

Definition at line 113 of file MooseBase.C.

118 {
119  if (!node)
120  node = MooseBase::getHitNode(params);
121 
122  std::string multiapp_prefix = "";
123  if (app)
124  {
125  if (!app->isUltimateMaster())
126  multiapp_prefix = app->name();
128  }
129 
130  if (with_prefix)
131  // False here because the hit context will get processed by the node
132  msg = messagePrefix(params, false) + msg;
133 
134  moose::internal::mooseErrorRaw(msg, multiapp_prefix, node);
135 }
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:820
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
void mooseErrorRaw(std::string msg, const std::string &prefix="", const hit::Node *node=nullptr)
Main callback for emitting a moose error.
Definition: MooseError.C:53
void mooseConsole()
Send current output buffer to Console output objects.
const hit::Node * getHitNode() const
Definition: MooseBase.h:136
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2525
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:256

◆ checkBlockMatProps()

void SubProblem::checkBlockMatProps ( )
virtualinherited

Checks block material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 624 of file SubProblem.C.

Referenced by checkProblemIntegrity().

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

◆ checkBoundaryMatProps()

void SubProblem::checkBoundaryMatProps ( )
virtualinherited

Checks boundary material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 666 of file SubProblem.C.

Referenced by checkProblemIntegrity().

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

◆ checkCoordinateSystems()

void FEProblemBase::checkCoordinateSystems ( )
protected

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

Definition at line 8904 of file FEProblemBase.C.

Referenced by checkProblemIntegrity().

8905 {
8907 }
MooseMesh & _mesh
void checkCoordinateSystems()
Performs a sanity check for every element in the mesh.
Definition: MooseMesh.C:4387

◆ checkDependMaterialsHelper()

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

Helper method for checking Material object dependency.

See also
checkProblemIntegrity

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

Definition at line 8783 of file FEProblemBase.C.

Referenced by checkProblemIntegrity().

8785 {
8786  for (const auto & it : materials_map)
8787  {
8789  std::set<std::string> block_depend_props, block_supplied_props;
8790 
8791  for (const auto & mat1 : it.second)
8792  {
8793  auto & alldeps = mat1->getMatPropDependencies(); // includes requested stateful props
8794  for (auto & dep : alldeps)
8795  block_depend_props.insert(_material_prop_registry.getName(dep));
8796 
8797  // See if any of the active materials supply this property
8798  for (const auto & mat2 : it.second)
8799  {
8800  const std::set<std::string> & supplied_props = mat2->MaterialBase::getSuppliedItems();
8801  block_supplied_props.insert(supplied_props.begin(), supplied_props.end());
8802  }
8803  }
8804 
8805  // Add zero material properties specific to this block and unrestricted
8806  block_supplied_props.insert(_zero_block_material_props[it.first].begin(),
8807  _zero_block_material_props[it.first].end());
8808 
8809  // Error check to make sure all properties consumed by materials are supplied on this block
8810  std::set<std::string> difference;
8811  std::set_difference(block_depend_props.begin(),
8812  block_depend_props.end(),
8813  block_supplied_props.begin(),
8814  block_supplied_props.end(),
8815  std::inserter(difference, difference.end()));
8816 
8817  if (!difference.empty())
8818  {
8819  std::ostringstream oss;
8820  oss << "One or more Material Properties were not supplied on block ";
8821  const std::string & subdomain_name = _mesh.getSubdomainName(it.first);
8822  if (subdomain_name.length() > 0)
8823  oss << subdomain_name << " (" << it.first << ")";
8824  else
8825  oss << it.first;
8826  oss << ":\n";
8827  for (const auto & name : difference)
8828  oss << name << "\n";
8829  mooseError(oss.str());
8830  }
8831  }
8832 
8833  // This loop checks that materials are not supplied by multiple Material objects
8834  for (const auto & it : materials_map)
8835  {
8836  const auto & materials = it.second;
8837  std::set<std::string> inner_supplied, outer_supplied;
8838 
8839  for (const auto & outer_mat : materials)
8840  {
8841  // Storage for properties for this material (outer) and all other materials (inner)
8842  outer_supplied = outer_mat->getSuppliedItems();
8843  inner_supplied.clear();
8844 
8845  // Property to material map for error reporting
8846  std::map<std::string, std::set<std::string>> prop_to_mat;
8847  for (const auto & name : outer_supplied)
8848  prop_to_mat[name].insert(outer_mat->name());
8849 
8850  for (const auto & inner_mat : materials)
8851  {
8852  if (outer_mat == inner_mat)
8853  continue;
8854 
8855  // Check whether these materials are an AD pair
8856  auto outer_mat_type = outer_mat->type();
8857  auto inner_mat_type = inner_mat->type();
8858  removeSubstring(outer_mat_type, "<RESIDUAL>");
8859  removeSubstring(outer_mat_type, "<JACOBIAN>");
8860  removeSubstring(inner_mat_type, "<RESIDUAL>");
8861  removeSubstring(inner_mat_type, "<JACOBIAN>");
8862  if (outer_mat_type == inner_mat_type && outer_mat_type != outer_mat->type() &&
8863  inner_mat_type != inner_mat->type())
8864  continue;
8865 
8866  inner_supplied.insert(inner_mat->getSuppliedItems().begin(),
8867  inner_mat->getSuppliedItems().end());
8868 
8869  for (const auto & inner_supplied_name : inner_supplied)
8870  prop_to_mat[inner_supplied_name].insert(inner_mat->name());
8871  }
8872 
8873  // Test that a property isn't supplied on multiple blocks
8874  std::set<std::string> intersection;
8875  std::set_intersection(outer_supplied.begin(),
8876  outer_supplied.end(),
8877  inner_supplied.begin(),
8878  inner_supplied.end(),
8879  std::inserter(intersection, intersection.end()));
8880 
8881  if (!intersection.empty())
8882  {
8883  std::ostringstream oss;
8884  oss << "The following material properties are declared on block " << it.first
8885  << " by multiple materials:\n";
8886  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << "Material Property"
8887  << "Material Objects\n";
8888  for (const auto & outer_name : intersection)
8889  {
8890  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << outer_name;
8891  for (const auto & inner_name : prop_to_mat[outer_name])
8892  oss << inner_name << " ";
8893  oss << '\n';
8894  }
8895 
8896  mooseError(oss.str());
8897  break;
8898  }
8899  }
8900  }
8901 }
std::string indent(unsigned int spaces)
Create empty string for indenting.
Definition: ConsoleUtils.C:41
MaterialPropertyRegistry _material_prop_registry
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1813
void removeSubstring(std::string &main, const std::string &sub)
Definition: MooseUtils.C:1201
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
MooseMesh & _mesh
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:1060
const std::string & getName(const unsigned int id) const
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
for(PetscInt i=0;i< nvars;++i)

◆ checkDisplacementOrders()

void FEProblemBase::checkDisplacementOrders ( )
protected

Verify that SECOND order mesh uses SECOND order displacements.

Definition at line 8707 of file FEProblemBase.C.

Referenced by checkProblemIntegrity().

8708 {
8709  if (_displaced_problem)
8710  {
8711  bool mesh_has_second_order_elements = false;
8712  for (const auto & elem : as_range(_displaced_mesh->activeLocalElementsBegin(),
8714  {
8715  if (elem->default_order() == SECOND)
8716  {
8717  mesh_has_second_order_elements = true;
8718  break;
8719  }
8720  }
8721 
8722  // We checked our local elements, so take the max over all processors.
8723  _displaced_mesh->comm().max(mesh_has_second_order_elements);
8724 
8725  // If the Mesh has second order elements, make sure the
8726  // displacement variables are second-order.
8727  if (mesh_has_second_order_elements)
8728  {
8729  const std::vector<std::string> & displacement_variables =
8730  _displaced_problem->getDisplacementVarNames();
8731 
8732  for (const auto & var_name : displacement_variables)
8733  {
8734  MooseVariableFEBase & mv =
8735  _displaced_problem->getVariable(/*tid=*/0,
8736  var_name,
8739  if (mv.order() != SECOND)
8740  mooseError("Error: mesh has SECOND order elements, so all displacement variables must be "
8741  "SECOND order.");
8742  }
8743  }
8744  }
8745 }
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:3131
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
std::shared_ptr< DisplacedProblem > _displaced_problem
const MeshBase::element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:3137
MooseMesh * _displaced_mesh

◆ checkDuplicatePostprocessorVariableNames()

void FEProblemBase::checkDuplicatePostprocessorVariableNames ( )

Definition at line 1535 of file FEProblemBase.C.

Referenced by checkProblemIntegrity().

1536 {
1537  for (const auto & pp : _reporter_data.getPostprocessorNames())
1538  if (hasScalarVariable(pp))
1539  mooseError("Postprocessor \"" + pp +
1540  "\" has the same name as a scalar variable in the system.");
1541 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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)
virtual

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

Notes:

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

Definition at line 6681 of file FEProblemBase.C.

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

6682 {
6684  return;
6685 
6686  TIME_SECTION("checkExceptionAndStopSolve", 5);
6687 
6688  // See if any processor had an exception. If it did, get back the
6689  // processor that the exception occurred on.
6690  unsigned int processor_id;
6691 
6693 
6694  if (_has_exception)
6695  {
6697 
6700  {
6701  // Print the message
6702  if (_communicator.rank() == 0 && print_message)
6703  {
6704  _console << "\n" << _exception_message << "\n";
6705  if (isTransient())
6706  _console
6707  << "To recover, the solution will fail and then be re-attempted with a reduced time "
6708  "step.\n"
6709  << std::endl;
6710  }
6711 
6712  // Stop the solve -- this entails setting
6713  // SNESSetFunctionDomainError() or directly inserting NaNs in the
6714  // residual vector to let PETSc >= 3.6 return DIVERGED_NANORINF.
6715  if (_current_nl_sys)
6717 
6718  if (_current_linear_sys)
6720 
6721  // and close Aux system (we MUST do this here; see #11525)
6722  _aux->solution().close();
6723 
6724  // We've handled this exception, so we no longer have one.
6725  _has_exception = false;
6726 
6727  // Force the next non-linear convergence check to fail (and all further residual evaluation
6728  // to be skipped).
6730 
6731  // Repropagate the exception, so it can be caught at a higher level, typically
6732  // this is NonlinearSystem::computeResidual().
6734  }
6735  else
6736  mooseError("The following parallel-communicated exception was detected during " +
6737  Moose::stringify(_current_execute_on_flag) + " evaluation:\n" +
6739  "\nBecause this did not occur during residual evaluation, there"
6740  " is no way to handle this, so the solution is aborting.\n");
6741  }
6742 }
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:339
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:31
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:35
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:33
Provides a way for users to bail out of the current solve.
virtual void stopSolve(const ExecFlagType &exec_flag, const std::set< TagID > &vector_tags_to_close)=0
Quit the current solve as soon as possible.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
std::set< TagID > _fe_vector_tags
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

◆ checkICRestartError()

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

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

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

Definition at line 3563 of file FEProblemBase.C.

Referenced by addFVInitialCondition(), and addInitialCondition().

3566 {
3568  {
3569  std::string restart_method = "";
3570  if (_app.isRestarting())
3571  restart_method =
3572  "a checkpoint restart, by IC object '" + ic_name + "' for variable '" + name + "'";
3573  else if (_app.getExReaderForRestart())
3574  {
3575  std::vector<std::string> restarted_vars = _app.getExReaderForRestart()->get_elem_var_names();
3576  const auto nodal_vars = _app.getExReaderForRestart()->get_nodal_var_names();
3577  const auto global_vars = _app.getExReaderForRestart()->get_global_var_names();
3578  restarted_vars.insert(restarted_vars.end(), nodal_vars.begin(), nodal_vars.end());
3579  restarted_vars.insert(restarted_vars.end(), global_vars.begin(), global_vars.end());
3580 
3581  if (std::find(restarted_vars.begin(), restarted_vars.end(), var_name) != restarted_vars.end())
3582  restart_method = "an Exodus restart, by IC object '" + ic_name + "' for variable '" + name +
3583  "' that is also being restarted";
3584  }
3585  if (!restart_method.empty())
3586  mooseError(
3587  "Initial conditions have been specified during ",
3588  restart_method,
3589  ".\nThis is only allowed if you specify 'allow_initial_conditions_with_restart' to "
3590  "the [Problem], as initial conditions can override restarted fields");
3591  }
3592 }
const std::vector< std::string > & get_global_var_names()
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:42
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:1890
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const bool _allow_ics_during_restart
libMesh::ExodusII_IO * getExReaderForRestart() const
Get the Exodus reader to restart variables from an Exodus mesh file.
Definition: MooseApp.h:443
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
const std::vector< std::string > & get_elem_var_names()
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
const std::vector< std::string > & get_nodal_var_names()

◆ checkingUOAuxState()

bool FEProblemBase::checkingUOAuxState ( ) const
inline

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

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

Definition at line 215 of file FEProblemBase.h.

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

215 { 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 ( )
Returns
Flag indicating nonlocal coupling exists or not.

Definition at line 1664 of file FEProblemBase.C.

Referenced by initialSetup().

1665 {
1666  TIME_SECTION("checkNonlocalCoupling", 5, "Checking Nonlocal Coupling");
1667 
1668  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
1669  for (auto & nl : _nl)
1670  {
1671  const auto & all_kernels = nl->getKernelWarehouse();
1672  const auto & kernels = all_kernels.getObjects(tid);
1673  for (const auto & kernel : kernels)
1674  {
1675  std::shared_ptr<NonlocalKernel> nonlocal_kernel =
1677  if (nonlocal_kernel)
1678  {
1681  _nonlocal_kernels.addObject(kernel, tid);
1682  }
1683  }
1684  const MooseObjectWarehouse<IntegratedBCBase> & all_integrated_bcs =
1685  nl->getIntegratedBCWarehouse();
1686  const auto & integrated_bcs = all_integrated_bcs.getObjects(tid);
1687  for (const auto & integrated_bc : integrated_bcs)
1688  {
1689  std::shared_ptr<NonlocalIntegratedBC> nonlocal_integrated_bc =
1691  if (nonlocal_integrated_bc)
1692  {
1695  _nonlocal_integrated_bcs.addObject(integrated_bc, tid);
1696  }
1697  }
1698  }
1699 }
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:237
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
nonlocal integrated_bcs
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
nonlocal kernels

◆ checkNonlocalCouplingRequirement()

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

Implements SubProblem.

Definition at line 9725 of file FEProblemBase.C.

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

9726 {
9728 }
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag

◆ checkProblemIntegrity()

void FEProblemBase::checkProblemIntegrity ( )
virtual

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

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

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

unsigned int is necessary to print SubdomainIDs in the statement below

vector is necessary to get the subdomain names

Reimplemented in EigenProblem.

Definition at line 8535 of file FEProblemBase.C.

Referenced by EigenProblem::checkProblemIntegrity().

8536 {
8537  TIME_SECTION("checkProblemIntegrity", 5);
8538 
8539  // Subdomains specified by the "Problem/block" parameter
8540  const auto & subdomain_names = getParam<std::vector<SubdomainName>>("block");
8541  auto mesh_subdomains_vec = MooseMeshUtils::getSubdomainIDs(_mesh, subdomain_names);
8542  std::set<SubdomainID> mesh_subdomains(mesh_subdomains_vec.begin(), mesh_subdomains_vec.end());
8543 
8544  // Check kernel coverage of subdomains (blocks) in the mesh
8547  {
8548  std::set<SubdomainID> blocks;
8551  blocks = mesh_subdomains;
8553  {
8554  blocks = mesh_subdomains;
8555  for (const auto & subdomain_name : _kernel_coverage_blocks)
8556  {
8557  const auto id = _mesh.getSubdomainID(subdomain_name);
8558  if (id == Moose::INVALID_BLOCK_ID)
8559  paramError("kernel_coverage_block_list",
8560  "Subdomain \"",
8561  subdomain_name,
8562  "\" not found in mesh.");
8563  blocks.erase(id);
8564  }
8565  }
8567  for (const auto & subdomain_name : _kernel_coverage_blocks)
8568  {
8569  const auto id = _mesh.getSubdomainID(subdomain_name);
8570  if (id == Moose::INVALID_BLOCK_ID)
8571  paramError("kernel_coverage_block_list",
8572  "Subdomain \"",
8573  subdomain_name,
8574  "\" not found in mesh.");
8575  blocks.insert(id);
8576  }
8577  if (!blocks.empty())
8578  for (auto & nl : _nl)
8579  nl->checkKernelCoverage(blocks);
8580  }
8581 
8582  // Check materials
8583  {
8584 #ifdef LIBMESH_ENABLE_AMR
8585  if ((_adaptivity.isOn() || _num_grid_steps) &&
8588  {
8589  _console << "Using EXPERIMENTAL Stateful Material Property projection with Adaptivity!\n"
8590  << std::flush;
8591  }
8592 #endif
8593 
8594  std::set<SubdomainID> local_mesh_subs(mesh_subdomains);
8595 
8598  {
8603  bool check_material_coverage = false;
8604  std::set<SubdomainID> ids = _all_materials.getActiveBlocks();
8605  for (const auto & id : ids)
8606  {
8607  local_mesh_subs.erase(id);
8608  check_material_coverage = true;
8609  }
8610 
8611  // did the user limit the subdomains to be checked?
8613  {
8614  for (const auto & subdomain_name : _material_coverage_blocks)
8615  {
8616  const auto id = _mesh.getSubdomainID(subdomain_name);
8617  if (id == Moose::INVALID_BLOCK_ID)
8618  paramError("material_coverage_block_list",
8619  "Subdomain \"" + subdomain_name + "\" not found in mesh.");
8620  local_mesh_subs.erase(id);
8621  }
8622  }
8624  {
8625  std::set<SubdomainID> blocks(local_mesh_subs);
8626  for (const auto & subdomain_name : _material_coverage_blocks)
8627  {
8628  const auto id = _mesh.getSubdomainID(subdomain_name);
8629  if (id == Moose::INVALID_BLOCK_ID)
8630  paramError("material_coverage_block_list",
8631  "Subdomain \"" + subdomain_name + "\" not found in mesh.");
8632  blocks.erase(id);
8633  }
8634  for (const auto id : blocks)
8635  local_mesh_subs.erase(id);
8636  }
8637 
8638  // also exclude mortar spaces from the material check
8639  auto && mortar_subdomain_ids = _mortar_data->getMortarSubdomainIDs();
8640  for (auto subdomain_id : mortar_subdomain_ids)
8641  local_mesh_subs.erase(subdomain_id);
8642 
8643  // Check Material Coverage
8644  if (check_material_coverage && !local_mesh_subs.empty())
8645  {
8646  std::stringstream extra_subdomain_ids;
8648  std::copy(local_mesh_subs.begin(),
8649  local_mesh_subs.end(),
8650  std::ostream_iterator<unsigned int>(extra_subdomain_ids, " "));
8652  std::vector<SubdomainID> local_mesh_subs_vec(local_mesh_subs.begin(),
8653  local_mesh_subs.end());
8654 
8655  mooseError("The following blocks from your input mesh do not contain an active material: " +
8656  extra_subdomain_ids.str() +
8657  "(names: " + Moose::stringify(_mesh.getSubdomainNames(local_mesh_subs_vec)) +
8658  ")\nWhen ANY mesh block contains a Material object, "
8659  "all blocks must contain a Material object.\n");
8660  }
8661  }
8662 
8663  // Check material properties on blocks and boundaries
8666 
8667  // Check that material properties exist when requested by other properties on a given block
8668  const auto & materials = _all_materials.getActiveObjects();
8669  for (const auto & material : materials)
8670  material->checkStatefulSanity();
8671 
8672  // auto mats_to_check = _materials.getActiveBlockObjects();
8673  // const auto & discrete_materials = _discrete_materials.getActiveBlockObjects();
8674  // for (const auto & map_it : discrete_materials)
8675  // for (const auto & container_element : map_it.second)
8676  // mats_to_check[map_it.first].push_back(container_element);
8679  }
8680 
8681  checkUserObjects();
8682 
8683  // Verify that we don't have any Element type/Coordinate Type conflicts
8685 
8686  // Coordinate transforms are only intended for use with MultiApps at this time. If you are not
8687  // using multiapps but still require these, contact a moose developer
8689  !hasMultiApps())
8690  mooseError("Coordinate transformation parameters, listed below, are only to be used in the "
8691  "context of application to application field transfers at this time. The mesh is "
8692  "not modified by these parameters within an application.\n"
8693  "You should likely use a 'TransformGenerator' in the [Mesh] block to achieve the "
8694  "desired mesh modification.\n\n",
8696 
8697  // If using displacements, verify that the order of the displacement
8698  // variables matches the order of the elements in the displaced
8699  // mesh.
8701 
8702  // Check for postprocessor names with same name as a scalar variable
8704 }
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:820
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.
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseBase.h:439
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.
std::vector< subdomain_id_type > getSubdomainIDs(const libMesh::MeshBase &mesh, const std::vector< SubdomainName > &subdomain_name)
Get the associated subdomainIDs for the subdomain names that are passed in.
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:666
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.
MooseMesh & _mesh
virtual void checkBlockMatProps()
Checks block material properties integrity.
Definition: SubProblem.C:624
Adaptivity _adaptivity
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
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:1819
MooseAppCoordTransform & coordTransform()
Definition: MooseMesh.h:1931
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1781
void checkCoordinateSystems()
Verify that there are no element type/coordinate type conflicts.

◆ checkUserObjectJacobianRequirement()

void FEProblemBase::checkUserObjectJacobianRequirement ( THREAD_ID  tid)

Definition at line 1702 of file FEProblemBase.C.

Referenced by initialSetup().

1703 {
1704  std::set<const MooseVariableFEBase *> uo_jacobian_moose_vars;
1705  {
1706  std::vector<ShapeElementUserObject *> objs;
1707  theWarehouse()
1708  .query()
1710  .condition<AttribThread>(tid)
1711  .queryInto(objs);
1712 
1713  for (const auto & uo : objs)
1714  {
1715  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1716  const auto & mv_deps = uo->jacobianMooseVariables();
1717  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1718  }
1719  }
1720  {
1721  std::vector<ShapeSideUserObject *> objs;
1722  theWarehouse()
1723  .query()
1725  .condition<AttribThread>(tid)
1726  .queryInto(objs);
1727  for (const auto & uo : objs)
1728  {
1729  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1730  const auto & mv_deps = uo->jacobianMooseVariables();
1731  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1732  }
1733  }
1734 
1735  _uo_jacobian_moose_vars[tid].assign(uo_jacobian_moose_vars.begin(), uo_jacobian_moose_vars.end());
1736  std::sort(
1737  _uo_jacobian_moose_vars[tid].begin(), _uo_jacobian_moose_vars[tid].end(), sortMooseVariables);
1738 }
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 ( )
protected

Definition at line 8748 of file FEProblemBase.C.

Referenced by checkProblemIntegrity().

8749 {
8750  // Check user_objects block coverage
8751  std::set<SubdomainID> mesh_subdomains = _mesh.meshSubdomains();
8752  std::set<SubdomainID> user_objects_blocks;
8753 
8754  // gather names of all user_objects that were defined in the input file
8755  // and the blocks that they are defined on
8756  std::set<std::string> names;
8757 
8758  std::vector<UserObject *> objects;
8760 
8761  for (const auto & obj : objects)
8762  names.insert(obj->name());
8763 
8764  // See if all referenced blocks are covered
8765  std::set<SubdomainID> difference;
8766  std::set_difference(user_objects_blocks.begin(),
8767  user_objects_blocks.end(),
8768  mesh_subdomains.begin(),
8769  mesh_subdomains.end(),
8770  std::inserter(difference, difference.end()));
8771 
8772  if (!difference.empty())
8773  {
8774  std::ostringstream oss;
8775  oss << "One or more UserObjects is referencing a nonexistent block:\n";
8776  for (const auto & id : difference)
8777  oss << id << "\n";
8778  mooseError(oss.str());
8779  }
8780 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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:3251

◆ clearActiveElementalMooseVariables()

void FEProblemBase::clearActiveElementalMooseVariables ( const THREAD_ID  tid)
overridevirtual

Clear the active elemental MooseVariableFEBase.

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

Parameters
tidThe thread id

Reimplemented from SubProblem.

Definition at line 6079 of file FEProblemBase.C.

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

6080 {
6082 
6083  if (_displaced_problem)
6084  _displaced_problem->clearActiveElementalMooseVariables(tid);
6085 }
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid)
Clear the active elemental MooseVariableFieldBase.
Definition: SubProblem.C:467
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveFEVariableCoupleableMatrixTags ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6088 of file FEProblemBase.C.

6089 {
6091 
6092  if (_displaced_problem)
6093  _displaced_problem->clearActiveFEVariableCoupleableMatrixTags(tid);
6094 }
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:385
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableVectorTags()

void FEProblemBase::clearActiveFEVariableCoupleableVectorTags ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6097 of file FEProblemBase.C.

6098 {
6100 
6101  if (_displaced_problem)
6102  _displaced_problem->clearActiveFEVariableCoupleableVectorTags(tid);
6103 }
virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:379
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveMaterialProperties()

void FEProblemBase::clearActiveMaterialProperties ( const THREAD_ID  tid)

Clear the active material properties.

Should be called at the end of every computing thread

Parameters
tidThe thread id

Definition at line 6145 of file FEProblemBase.C.

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

6146 {
6148 }
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)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6106 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

6107 {
6109 
6110  if (_displaced_problem)
6111  _displaced_problem->clearActiveScalarVariableCoupleableMatrixTags(tid);
6112 }
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:426
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::clearActiveScalarVariableCoupleableVectorTags ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6115 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

6116 {
6118 
6119  if (_displaced_problem)
6120  _displaced_problem->clearActiveScalarVariableCoupleableVectorTags(tid);
6121 }
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:420
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearAllDofIndices()

void SubProblem::clearAllDofIndices ( )
inherited

Clear dof indices from variables in nl and aux systems.

Definition at line 1178 of file SubProblem.C.

Referenced by solve().

1179 {
1180  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1183 }
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:1613

◆ clearCurrentJacobianMatrixTags()

void FEProblemBase::clearCurrentJacobianMatrixTags ( )
inline

Clear the current Jacobian matrix tag data structure ...

if someone creates it

Definition at line 2708 of file FEProblemBase.h.

Referenced by resetState().

2708 {}

◆ clearCurrentResidualVectorTags()

void FEProblemBase::clearCurrentResidualVectorTags ( )
inline

Clear the current residual vector tag data structure.

Definition at line 3595 of file FEProblemBase.h.

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

3596 {
3598 }
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 ( )
overridevirtual

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

Implements SubProblem.

Definition at line 2523 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeDiracContributions().

2524 {
2526 
2527  if (_displaced_problem)
2528  _displaced_problem->clearDiracInfo();
2529 }
void clearPoints()
Remove all of the current points and elements.
std::shared_ptr< DisplacedProblem > _displaced_problem
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1051

◆ computeBounds()

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

Definition at line 7715 of file FEProblemBase.C.

Referenced by Moose::compute_bounds().

7718 {
7719  try
7720  {
7721  try
7722  {
7723  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7724  "I expect these system numbers to be the same");
7725 
7726  if (!_current_nl_sys->hasVector("lower_bound") || !_current_nl_sys->hasVector("upper_bound"))
7727  return;
7728 
7729  TIME_SECTION("computeBounds", 1, "Computing Bounds");
7730 
7731  NumericVector<Number> & _lower = _current_nl_sys->getVector("lower_bound");
7732  NumericVector<Number> & _upper = _current_nl_sys->getVector("upper_bound");
7733  _lower.swap(lower);
7734  _upper.swap(upper);
7735  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
7737 
7738  _aux->residualSetup();
7740  _lower.swap(lower);
7741  _upper.swap(upper);
7742  }
7743  catch (...)
7744  {
7745  handleException("computeBounds");
7746  }
7747  }
7748  catch (MooseException & e)
7749  {
7750  mooseError("Irrecoverable exception: " + std::string(e.what()));
7751  }
7752  catch (...)
7753  {
7754  mooseError("Unexpected exception type");
7755  }
7756 }
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:924
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:1157
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:31
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:933
MaterialWarehouse _all_materials
void computeSystems(const ExecFlagType &type)
Do generic system computations.
unsigned int THREAD_ID
Definition: MooseTypes.h:237
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeDamping()

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

Definition at line 7998 of file FEProblemBase.C.

Referenced by computePostCheck().

8000 {
8001  // Default to no damping
8002  Real damping = 1.0;
8003 
8004  if (_has_dampers)
8005  {
8006  TIME_SECTION("computeDamping", 1, "Computing Damping");
8007 
8008  // Save pointer to the current solution
8009  const NumericVector<Number> * _saved_current_solution = _current_nl_sys->currentSolution();
8010 
8012  // For now, do not re-compute auxiliary variables. Doing so allows a wild solution increment
8013  // to get to the material models, which may not be able to cope with drastically different
8014  // values. Once more complete dependency checking is in place, auxiliary variables (and
8015  // material properties) will be computed as needed by dampers.
8016  // _aux.compute();
8017  damping = _current_nl_sys->computeDamping(soln, update);
8018 
8019  // restore saved solution
8020  _current_nl_sys->setSolution(*_saved_current_solution);
8021  }
8022 
8023  return damping;
8024 }
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 ( )
virtual

Reimplemented in DumpObjectsProblem.

Definition at line 4714 of file FEProblemBase.C.

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

4715 {
4716  // Initialize indicator aux variable fields
4718  {
4719  TIME_SECTION("computeIndicators", 1, "Computing Indicators");
4720 
4721  // Internal side indicators may lead to creating a much larger sparsity pattern than dictated by
4722  // the actual finite element scheme (e.g. CFEM)
4723  const auto old_do_derivatives = ADReal::do_derivatives;
4724  ADReal::do_derivatives = false;
4725 
4726  std::vector<std::string> fields;
4727 
4728  // Indicator Fields
4729  const auto & indicators = _indicators.getActiveObjects();
4730  for (const auto & indicator : indicators)
4731  fields.push_back(indicator->name());
4732 
4733  // InternalSideIndicator Fields
4734  const auto & internal_indicators = _internal_side_indicators.getActiveObjects();
4735  for (const auto & internal_indicator : internal_indicators)
4736  fields.push_back(internal_indicator->name());
4737 
4738  _aux->zeroVariables(fields);
4739 
4740  // compute Indicators
4741  ComputeIndicatorThread cit(*this);
4743  _aux->solution().close();
4744  _aux->update();
4745 
4746  ComputeIndicatorThread finalize_cit(*this, true);
4748  _aux->solution().close();
4749  _aux->update();
4750 
4751  ADReal::do_derivatives = old_do_derivatives;
4752  }
4753 }
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1288
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 ( )
virtual

Definition at line 4707 of file FEProblemBase.C.

4708 {
4710  computeMarkers();
4711 }
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 
)
virtual

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

Definition at line 7546 of file FEProblemBase.C.

Referenced by computeJacobianSys().

7549 {
7550  setCurrentNonlinearSystem(nl_sys_num);
7551 
7552  _fe_matrix_tags.clear();
7553 
7554  auto & tags = getMatrixTags();
7555  for (auto & tag : tags)
7556  _fe_matrix_tags.insert(tag.second);
7557 
7558  computeJacobianInternal(soln, jacobian, _fe_matrix_tags);
7559 }
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 
)
virtual

Really not a good idea to use this.

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

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

Definition at line 7703 of file FEProblemBase.C.

7707 {
7708  JacobianBlock jac_block(precond_system, jacobian, ivar, jvar);
7709  std::vector<JacobianBlock *> blocks = {&jac_block};
7710  mooseAssert(_current_nl_sys, "This should be non-null");
7712 }
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:1157

◆ computeJacobianBlocks()

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

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

Used by Physics-based preconditioning

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

Reimplemented in EigenProblem.

Definition at line 7683 of file FEProblemBase.C.

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

7685 {
7686  TIME_SECTION("computeTransientImplicitJacobian", 2);
7687  setCurrentNonlinearSystem(nl_sys_num);
7688 
7689  if (_displaced_problem)
7690  {
7692  _displaced_problem->updateMesh();
7693  }
7694 
7696 
7700 }
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:1098
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:52
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:33
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 
)
virtual

Form a Jacobian matrix for multiple tags.

It should not be called directly by users.

Definition at line 7562 of file FEProblemBase.C.

Referenced by computeJacobian().

7565 {
7566  TIME_SECTION("computeJacobianInternal", 1);
7567 
7569 
7571 
7572  computeJacobianTags(tags);
7573 
7575 }
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:1076
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1088
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 
)
virtual

Form a Jacobian matrix.

It is called by Libmesh.

Definition at line 7524 of file FEProblemBase.C.

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

7527 {
7528  computeJacobian(soln, jacobian, sys.number());
7529 }
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 
)
virtual

Form a Jacobian matrix for a given tag.

Definition at line 7532 of file FEProblemBase.C.

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

7535 {
7537 
7538  _current_nl_sys->associateMatrixToTag(jacobian, tag);
7539 
7540  computeJacobianTags({tag});
7541 
7543 }
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:1076
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1088
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)
virtual

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

Definition at line 7578 of file FEProblemBase.C.

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

7579 {
7580  try
7581  {
7582  try
7583  {
7584  if (!_has_jacobian || !_const_jacobian)
7585  {
7586  TIME_SECTION("computeJacobianTags", 5, "Computing Jacobian");
7587 
7588  for (auto tag : tags)
7589  if (_current_nl_sys->hasMatrix(tag))
7590  {
7591  auto & matrix = _current_nl_sys->getMatrix(tag);
7594  else
7595  matrix.zero();
7597  // PETSc algorithms require diagonal allocations regardless of whether there is
7598  // non-zero diagonal dependence. With global AD indexing we only add non-zero
7599  // dependence, so PETSc will scream at us unless we artificially add the diagonals.
7600  for (auto index : make_range(matrix.row_start(), matrix.row_stop()))
7601  matrix.add(index, index, 0);
7602  }
7603 
7604  _aux->zeroVariablesForJacobian();
7605 
7606  unsigned int n_threads = libMesh::n_threads();
7607 
7608  // Random interface objects
7609  for (const auto & it : _random_data_objects)
7610  it.second->updateSeeds(EXEC_NONLINEAR);
7611 
7614  if (_displaced_problem)
7615  _displaced_problem->setCurrentlyComputingJacobian(true);
7616 
7619 
7620  for (unsigned int tid = 0; tid < n_threads; tid++)
7621  reinitScalars(tid);
7622 
7624 
7625  _aux->jacobianSetup();
7626 
7627  if (_displaced_problem)
7628  {
7630  _displaced_problem->updateMesh();
7631  }
7632 
7633  for (unsigned int tid = 0; tid < n_threads; tid++)
7634  {
7637  }
7638 
7639 #ifdef MOOSE_KOKKOS_ENABLED
7641 #endif
7642 
7644 
7646 
7648 
7650 
7652 
7654 
7655  // For explicit Euler calculations for example we often compute the Jacobian one time and
7656  // then re-use it over and over. If we're performing automatic scaling, we don't want to
7657  // use that kernel, diagonal-block only Jacobian for our actual matrix when performing
7658  // solves!
7660  _has_jacobian = true;
7661  }
7662  }
7663  catch (...)
7664  {
7665  handleException("computeJacobianTags");
7666  }
7667  }
7668  catch (const MooseException &)
7669  {
7670  // The buck stops here, we have already handled the exception by
7671  // calling the system's stopSolve() method, it is now up to PETSc to return a
7672  // "diverged" reason during the next solve.
7673  }
7674  catch (...)
7675  {
7676  mooseError("Unexpected exception type");
7677  }
7678 
7679  resetState();
7680 }
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:1098
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:1552
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:360
bool has_static_condensation() const
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
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:357
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:52
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:33
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:1024
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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:1110
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2525
void computeSystems(const ExecFlagType &type)
Do generic system computations.
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
virtual libMesh::System & system() override
Get the reference to the libMesh system.

◆ computeLinearSystemSys()

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

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

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

Definition at line 7759 of file FEProblemBase.C.

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

7763 {
7764  TIME_SECTION("computeLinearSystemSys", 5);
7765 
7767 
7770 
7771  // We are using the residual tag system for right hand sides so we fetch everything
7772  const auto & vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
7773 
7774  // We filter out tags which do not have associated vectors in the current
7775  // system. This is essential to be able to use system-dependent vector tags.
7778 
7782  compute_gradients);
7783 
7788  // We reset the tags to the default containers for further operations
7793 }
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:981
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:290
virtual void associateMatrixToTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
Definition: SystemBase.C:1076
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:1088
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:173
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:301
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 
)

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

Referenced by computeLinearSystemSys().

7800 {
7801  TIME_SECTION("computeLinearSystemTags", 5, "Computing Linear System");
7802 
7804 
7805  for (auto tag : matrix_tags)
7806  {
7807  auto & matrix = _current_linear_sys->getMatrix(tag);
7808  matrix.zero();
7809  }
7810 
7811  unsigned int n_threads = libMesh::n_threads();
7812 
7814 
7815  // Random interface objects
7816  for (const auto & it : _random_data_objects)
7817  it.second->updateSeeds(EXEC_NONLINEAR);
7818 
7821 
7823 
7824  _aux->jacobianSetup();
7825 
7826  for (THREAD_ID tid = 0; tid < n_threads; tid++)
7827  {
7829  }
7830 
7831 #ifdef MOOSE_KOKKOS_ENABLED
7833 #endif
7834 
7835  try
7836  {
7838  }
7839  catch (MooseException & e)
7840  {
7841  _console << "\nA MooseException was raised during Auxiliary variable computation.\n"
7842  << "The next solve will fail, the timestep will be reduced, and we will try again.\n"
7843  << std::endl;
7844 
7845  // We know the next solve is going to fail, so there's no point in
7846  // computing anything else after this. Plus, using incompletely
7847  // computed AuxVariables in subsequent calculations could lead to
7848  // other errors or unhandled exceptions being thrown.
7849  return;
7850  }
7851 
7854 
7856 
7857  _current_linear_sys->computeLinearSystemTags(vector_tags, matrix_tags, compute_gradients);
7858 
7859  // Reset execution flag as after this point we are no longer on LINEAR
7861 
7862  // These are the relevant parts of resetState()
7865 }
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
const ExecFlagType EXEC_NONE
Definition: Moose.C:29
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:67
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
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:1113
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:357
virtual void jacobianSetup(THREAD_ID tid=0) const
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:33
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:1024
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:1110
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2525
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:154
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h:237

◆ computeMarkers()

void FEProblemBase::computeMarkers ( )
virtual

Reimplemented in DumpObjectsProblem.

Definition at line 4756 of file FEProblemBase.C.

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

4757 {
4758  if (_markers.hasActiveObjects())
4759  {
4760  TIME_SECTION("computeMarkers", 1, "Computing Markers");
4761 
4762  std::vector<std::string> fields;
4763 
4764  // Marker Fields
4765  const auto & markers = _markers.getActiveObjects();
4766  for (const auto & marker : markers)
4767  fields.push_back(marker->name());
4768 
4769  _aux->zeroVariables(fields);
4770 
4772 
4773  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
4774  {
4775  const auto & markers = _markers.getActiveObjects(tid);
4776  for (const auto & marker : markers)
4777  marker->markerSetup();
4778  }
4779 
4780  ComputeMarkerThread cmt(*this);
4782 
4783  _aux->solution().close();
4784  _aux->update();
4785  }
4786 }
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1288
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:237

◆ computeMultiAppsDT()

Real FEProblemBase::computeMultiAppsDT ( ExecFlagType  type)

Find the smallest timestep over all MultiApps.

Definition at line 5810 of file FEProblemBase.C.

Referenced by TransientBase::constrainDTFromMultiApp().

5811 {
5812  const auto & multi_apps = _transient_multi_apps[type].getActiveObjects();
5813 
5814  Real smallest_dt = std::numeric_limits<Real>::max();
5815 
5816  for (const auto & multi_app : multi_apps)
5817  smallest_dt = std::min(smallest_dt, multi_app->computeDT());
5818 
5819  return smallest_dt;
5820 }
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:93
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 
)
virtual

Definition at line 7868 of file FEProblemBase.C.

Referenced by Moose::compute_nearnullspace().

7870 {
7871  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7872  "I expect these system numbers to be the same");
7873 
7874  sp.clear();
7875  for (unsigned int i = 0; i < subspaceDim("NearNullSpace"); ++i)
7876  {
7877  std::stringstream postfix;
7878  postfix << "_" << i;
7879  std::string modename = "NearNullSpace" + postfix.str();
7880  sp.push_back(&_current_nl_sys->getVector(modename));
7881  }
7882 }
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:1157
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:933

◆ computeNullSpace()

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

Definition at line 7885 of file FEProblemBase.C.

Referenced by Moose::compute_nullspace().

7887 {
7888  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7889  "I expect these system numbers to be the same");
7890  sp.clear();
7891  for (unsigned int i = 0; i < subspaceDim("NullSpace"); ++i)
7892  {
7893  std::stringstream postfix;
7894  postfix << "_" << i;
7895  sp.push_back(&_current_nl_sys->getVector("NullSpace" + postfix.str()));
7896  }
7897 }
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:1157
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:933

◆ computePostCheck()

void FEProblemBase::computePostCheck ( libMesh::NonlinearImplicitSystem sys,
const NumericVector< libMesh::Number > &  old_soln,
NumericVector< libMesh::Number > &  search_direction,
NumericVector< libMesh::Number > &  new_soln,
bool &  changed_search_direction,
bool &  changed_new_soln 
)
virtual

Definition at line 7915 of file FEProblemBase.C.

Referenced by Moose::compute_postcheck().

7921 {
7922  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7923  "I expect these system numbers to be the same");
7924 
7925  // This function replaces the old PetscSupport::dampedCheck() function.
7926  //
7927  // 1.) Recreate code in PetscSupport::dampedCheck() for constructing
7928  // ghosted "soln" and "update" vectors.
7929  // 2.) Call FEProblemBase::computeDamping() with these ghost vectors.
7930  // 3.) Recreate the code in PetscSupport::dampedCheck() to actually update
7931  // the solution vector based on the damping, and set the "changed" flags
7932  // appropriately.
7933 
7934  TIME_SECTION("computePostCheck", 2, "Computing Post Check");
7935 
7937 
7938  // MOOSE's FEProblemBase doesn't update the solution during the
7939  // postcheck, but FEProblemBase-derived classes might.
7941  {
7942  // We need ghosted versions of new_soln and search_direction (the
7943  // ones we get from libmesh/PETSc are PARALLEL vectors. To make
7944  // our lives simpler, we use the same ghosting pattern as the
7945  // system's current_local_solution to create new ghosted vectors.
7946 
7947  // Construct zeroed-out clones with the same ghosted dofs as the
7948  // System's current_local_solution.
7949  std::unique_ptr<NumericVector<Number>> ghosted_solution =
7950  sys.current_local_solution->zero_clone(),
7951  ghosted_search_direction =
7952  sys.current_local_solution->zero_clone();
7953 
7954  // Copy values from input vectors into clones with ghosted values.
7955  *ghosted_solution = new_soln;
7956  *ghosted_search_direction = search_direction;
7957 
7958  if (_has_dampers)
7959  {
7960  // Compute the damping coefficient using the ghosted vectors
7961  Real damping = computeDamping(*ghosted_solution, *ghosted_search_direction);
7962 
7963  // If some non-trivial damping was computed, update the new_soln
7964  // vector accordingly.
7965  if (damping < 1.0)
7966  {
7967  new_soln = old_soln;
7968  new_soln.add(-damping, search_direction);
7969  changed_new_soln = true;
7970  }
7971  }
7972 
7973  if (shouldUpdateSolution())
7974  {
7975  // Update the ghosted copy of the new solution, if necessary.
7976  if (changed_new_soln)
7977  *ghosted_solution = new_soln;
7978 
7979  bool updated_solution = updateSolution(new_soln, *ghosted_solution);
7980  if (updated_solution)
7981  changed_new_soln = true;
7982  }
7983  }
7984 
7986  {
7988  _aux->copyCurrentIntoPreviousNL();
7989  }
7990 
7991  // MOOSE doesn't change the search_direction
7992  changed_search_direction = false;
7993 
7995 }
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:29
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:1157
const ExecFlagType EXEC_POSTCHECK
Definition: Moose.C:35
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 
)

This function is called by Libmesh to form a residual.

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

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

◆ computeResidual() [2/2]

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

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

◆ computeResidualAndJacobian()

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

Form a residual and Jacobian with default tags.

Definition at line 7158 of file FEProblemBase.C.

Referenced by ComputeResidualAndJacobian::residual_and_jacobian().

7161 {
7162  try
7163  {
7164  try
7165  {
7166  // vector tags
7168  const auto & residual_vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
7169 
7170  mooseAssert(_fe_vector_tags.empty(),
7171  "This should be empty indicating a clean starting state");
7172  // We filter out tags which do not have associated vectors in the current nonlinear
7173  // system. This is essential to be able to use system-dependent residual tags.
7175 
7177 
7178  // matrix tags
7179  {
7180  _fe_matrix_tags.clear();
7181 
7182  auto & tags = getMatrixTags();
7183  for (auto & tag : tags)
7184  _fe_matrix_tags.insert(tag.second);
7185  }
7186 
7188 
7191 
7192  for (const auto tag : _fe_matrix_tags)
7193  if (_current_nl_sys->hasMatrix(tag))
7194  {
7195  auto & matrix = _current_nl_sys->getMatrix(tag);
7196  matrix.zero();
7198  // PETSc algorithms require diagonal allocations regardless of whether there is non-zero
7199  // diagonal dependence. With global AD indexing we only add non-zero
7200  // dependence, so PETSc will scream at us unless we artificially add the diagonals.
7201  for (auto index : make_range(matrix.row_start(), matrix.row_stop()))
7202  matrix.add(index, index, 0);
7203  }
7204 
7205  _aux->zeroVariablesForResidual();
7206 
7207  unsigned int n_threads = libMesh::n_threads();
7208 
7210 
7211  // Random interface objects
7212  for (const auto & it : _random_data_objects)
7213  it.second->updateSeeds(EXEC_LINEAR);
7214 
7218  if (_displaced_problem)
7219  {
7220  _displaced_problem->setCurrentlyComputingResidual(true);
7221  _displaced_problem->setCurrentlyComputingJacobian(true);
7222  _displaced_problem->setCurrentlyComputingResidualAndJacobian(true);
7223  }
7224 
7226 
7228 
7229  for (unsigned int tid = 0; tid < n_threads; tid++)
7230  reinitScalars(tid);
7231 
7233 
7234  _aux->residualSetup();
7235 
7236  if (_displaced_problem)
7237  {
7239  _displaced_problem->updateMesh();
7240  if (_mortar_data->hasDisplacedObjects())
7241  updateMortarMesh();
7242  }
7243 
7244  for (THREAD_ID tid = 0; tid < n_threads; tid++)
7245  {
7248  }
7249 
7250 #ifdef MOOSE_KOKKOS_ENABLED
7252 #endif
7253 
7255 
7257 
7259 
7261 
7264 
7266 
7269  }
7270  catch (...)
7271  {
7272  handleException("computeResidualAndJacobian");
7273  }
7274  }
7275  catch (const MooseException &)
7276  {
7277  // The buck stops here, we have already handled the exception by
7278  // calling the system's stopSolve() method, it is now up to PETSc to return a
7279  // "diverged" reason during the next solve.
7280  }
7281  catch (...)
7282  {
7283  mooseError("Unexpected exception type");
7284  }
7285 
7286  resetState();
7287  _fe_vector_tags.clear();
7288  _fe_matrix_tags.clear();
7289 }
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:981
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:360
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:290
virtual void associateMatrixToTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
Definition: SystemBase.C:1076
bool has_static_condensation() const
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:1498
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1088
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 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:1113
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:173
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:357
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:31
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:52
virtual void updateMortarMesh()
std::set< TagID > _fe_matrix_tags
Provides a way for users to bail out of the current solve.
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1024
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
std::set< TagID > _fe_vector_tags
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:1110
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2525
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:237
virtual void residualSetup(THREAD_ID tid=0) const
virtual libMesh::System & system() override
Get the reference to the libMesh system.

◆ computeResidualInternal()

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

Form a residual vector for a set of tags.

It should not be called directly by users.

Definition at line 7321 of file FEProblemBase.C.

7324 {
7325  parallel_object_only();
7326 
7327  TIME_SECTION("computeResidualInternal", 1);
7328 
7329  try
7330  {
7332 
7334 
7335  computeResidualTags(tags);
7336 
7338  }
7339  catch (MooseException & e)
7340  {
7341  // If a MooseException propagates all the way to here, it means
7342  // that it was thrown from a MOOSE system where we do not
7343  // (currently) properly support the throwing of exceptions, and
7344  // therefore we have no choice but to error out. It may be
7345  // *possible* to handle exceptions from other systems, but in the
7346  // meantime, we don't want to silently swallow any unhandled
7347  // exceptions here.
7348  mooseError("An unhandled MooseException was raised during residual computation. Please "
7349  "contact the MOOSE team for assistance.");
7350  }
7351 }
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:981
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ computeResidualL2Norm() [1/3]

Real FEProblemBase::computeResidualL2Norm ( NonlinearSystemBase sys)

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

Definition at line 7067 of file FEProblemBase.C.

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

7068 {
7069  _current_nl_sys = &sys;
7070  computeResidual(*sys.currentSolution(), sys.RHS(), sys.number());
7071  return sys.RHS().l2_norm();
7072 }
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:1157
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)

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

Definition at line 7075 of file FEProblemBase.C.

7076 {
7077  _current_linear_sys = &sys;
7078 
7079  // We assemble the current system to check the current residual
7082  *sys.linearImplicitSystem().rhs,
7083  /*compute fresh gradients*/ true);
7084 
7085  // Unfortunate, but we have to allocate a new vector for the residual
7086  auto residual = sys.linearImplicitSystem().rhs->clone();
7087  residual->scale(-1.0);
7088  residual->add_vector(*sys.currentSolution(), *sys.linearImplicitSystem().matrix);
7089  return residual->l2_norm();
7090 }
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 ( )
virtual

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

Returns
The L2 norm of the residual

Reimplemented in EigenProblem.

Definition at line 7093 of file FEProblemBase.C.

7094 {
7095  TIME_SECTION("computeResidualL2Norm", 2, "Computing L2 Norm of Residual");
7096 
7097  // We use sum the squared norms of the individual systems and then take the square root of it
7098  Real l2_norm = 0.0;
7099  for (auto sys : _nl)
7100  {
7101  const auto norm = computeResidualL2Norm(*sys);
7102  l2_norm += norm * norm;
7103  }
7104 
7105  for (auto sys : _linear_systems)
7106  {
7107  const auto norm = computeResidualL2Norm(*sys);
7108  l2_norm += norm * norm;
7109  }
7110 
7111  return std::sqrt(l2_norm);
7112 }
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 
)
virtual

This function is called by Libmesh to form a residual.

Definition at line 7115 of file FEProblemBase.C.

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

7118 {
7119  parallel_object_only();
7120 
7121  TIME_SECTION("computeResidualSys", 5);
7122 
7123  computeResidual(soln, residual, sys.number());
7124 }
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 
)
virtual

Form a residual vector for a given tag.

Definition at line 7292 of file FEProblemBase.C.

7295 {
7296  try
7297  {
7299 
7300  _current_nl_sys->associateVectorToTag(residual, tag);
7301 
7302  computeResidualTags({tag});
7303 
7305  }
7306  catch (MooseException & e)
7307  {
7308  // If a MooseException propagates all the way to here, it means
7309  // that it was thrown from a MOOSE system where we do not
7310  // (currently) properly support the throwing of exceptions, and
7311  // therefore we have no choice but to error out. It may be
7312  // *possible* to handle exceptions from other systems, but in the
7313  // meantime, we don't want to silently swallow any unhandled
7314  // exceptions here.
7315  mooseError("An unhandled MooseException was raised during residual computation. Please "
7316  "contact the MOOSE team for assistance.");
7317  }
7318 }
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:981
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ computeResidualTags()

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

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

Definition at line 7440 of file FEProblemBase.C.

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

7441 {
7442  parallel_object_only();
7443 
7444  try
7445  {
7446  try
7447  {
7448  TIME_SECTION("computeResidualTags", 5, "Computing Residual");
7449 
7450  ADReal::do_derivatives = false;
7451 
7453 
7454  _aux->zeroVariablesForResidual();
7455 
7456  unsigned int n_threads = libMesh::n_threads();
7457 
7459 
7460  // Random interface objects
7461  for (const auto & it : _random_data_objects)
7462  it.second->updateSeeds(EXEC_LINEAR);
7463 
7465 
7467 
7468  for (unsigned int tid = 0; tid < n_threads; tid++)
7469  reinitScalars(tid);
7470 
7472 
7473  _aux->residualSetup();
7474 
7475  if (_displaced_problem)
7476  {
7478  _displaced_problem->updateMesh();
7479  if (_mortar_data->hasDisplacedObjects())
7480  updateMortarMesh();
7481  }
7482 
7483  for (THREAD_ID tid = 0; tid < n_threads; tid++)
7484  {
7487  }
7488 
7489 #ifdef MOOSE_KOKKOS_ENABLED
7491 #endif
7492 
7494 
7496 
7498 
7500 
7503  }
7504  catch (...)
7505  {
7506  handleException("computeResidualTags");
7507  }
7508  }
7509  catch (const MooseException &)
7510  {
7511  // The buck stops here, we have already handled the exception by
7512  // calling the system's stopSolve() method, it is now up to PETSc to return a
7513  // "diverged" reason during the next solve.
7514  }
7515  catch (...)
7516  {
7517  mooseError("Unexpected exception type");
7518  }
7519 
7520  resetState();
7521 }
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
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
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:1113
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:357
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:31
void residualSetup()
Calls the residualSetup function for each of the output objects.
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:52
virtual void updateMortarMesh()
Provides a way for users to bail out of the current solve.
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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:2525
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:237
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeResidualType()

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

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

Definition at line 7354 of file FEProblemBase.C.

7357 {
7358  TIME_SECTION("computeResidualType", 5);
7359 
7360  try
7361  {
7363 
7365 
7367 
7369  }
7370  catch (MooseException & e)
7371  {
7372  // If a MooseException propagates all the way to here, it means
7373  // that it was thrown from a MOOSE system where we do not
7374  // (currently) properly support the throwing of exceptions, and
7375  // therefore we have no choice but to error out. It may be
7376  // *possible* to handle exceptions from other systems, but in the
7377  // meantime, we don't want to silently swallow any unhandled
7378  // exceptions here.
7379  mooseError("An unhandled MooseException was raised during residual computation. Please "
7380  "contact the MOOSE team for assistance.");
7381  }
7382 }
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:981
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ computeSystems()

void FEProblemBase::computeSystems ( const ExecFlagType type)
protected

Do generic system computations.

Definition at line 9626 of file FEProblemBase.C.

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

9627 {
9628  // When performing an adjoint solve in the optimization module, the current solver system is the
9629  // adjoint. However, the adjoint solve requires having accurate time derivative calculations for
9630  // the forward system. The cleanest way to handle such uses is just to compute the time
9631  // derivatives for all solver systems instead of trying to guess which ones we need and don't need
9632  for (auto & solver_sys : _solver_systems)
9633  solver_sys->compute(type);
9634 
9635  _aux->compute(type);
9636 }
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:93

◆ computeTransposeNullSpace()

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

Definition at line 7900 of file FEProblemBase.C.

Referenced by Moose::compute_transpose_nullspace().

7902 {
7903  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7904  "I expect these system numbers to be the same");
7905  sp.clear();
7906  for (unsigned int i = 0; i < subspaceDim("TransposeNullSpace"); ++i)
7907  {
7908  std::stringstream postfix;
7909  postfix << "_" << i;
7910  sp.push_back(&_current_nl_sys->getVector("TransposeNullSpace" + postfix.str()));
7911  }
7912 }
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:1157
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:933

◆ computeUserObjectByName()

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

Compute an user object with the given name.

Definition at line 5010 of file FEProblemBase.C.

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

5013 {
5014  const auto old_exec_flag = _current_execute_on_flag;
5017  .query()
5018  .condition<AttribSystem>("UserObject")
5019  .condition<AttribExecOns>(type)
5020  .condition<AttribName>(name);
5021  computeUserObjectsInternal(type, group, query);
5022  _current_execute_on_flag = old_exec_flag;
5023 }
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)
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
TheWarehouse & theWarehouse() const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
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 
)
virtual

Call compute methods on UserObjects.

Definition at line 5026 of file FEProblemBase.C.

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

5027 {
5029  theWarehouse().query().condition<AttribSystem>("UserObject").condition<AttribExecOns>(type);
5030  computeUserObjectsInternal(type, group, query);
5031 }
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:93
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 
)
protected

Definition at line 5034 of file FEProblemBase.C.

Referenced by computeUserObjectByName(), and computeUserObjects().

5037 {
5038  try
5039  {
5040  TIME_SECTION("computeUserObjects", 1, "Computing User Objects");
5041 
5042  // Add group to query
5043  if (group == Moose::PRE_IC)
5044  primary_query.condition<AttribPreIC>(true);
5045  else if (group == Moose::PRE_AUX)
5046  primary_query.condition<AttribPreAux>(type);
5047  else if (group == Moose::POST_AUX)
5048  primary_query.condition<AttribPostAux>(type);
5049 
5050  // query everything first to obtain a list of execution groups
5051  std::vector<UserObject *> uos;
5052  primary_query.clone().queryIntoUnsorted(uos);
5053  std::set<int> execution_groups;
5054  for (const auto & uo : uos)
5055  execution_groups.insert(uo->getParam<int>("execution_order_group"));
5056 
5057  // iterate over execution order groups
5058  for (const auto execution_group : execution_groups)
5059  {
5060  auto query = primary_query.clone().condition<AttribExecutionOrderGroup>(execution_group);
5061 
5062  std::vector<GeneralUserObject *> genobjs;
5063  query.clone().condition<AttribInterfaces>(Interfaces::GeneralUserObject).queryInto(genobjs);
5064 
5065  std::vector<UserObject *> userobjs;
5066  query.clone()
5071  .queryInto(userobjs);
5072 
5073  std::vector<UserObject *> tgobjs;
5074  query.clone()
5076  .queryInto(tgobjs);
5077 
5078  std::vector<UserObject *> nodal;
5079  query.clone().condition<AttribInterfaces>(Interfaces::NodalUserObject).queryInto(nodal);
5080 
5081  std::vector<MortarUserObject *> mortar;
5082  query.clone().condition<AttribInterfaces>(Interfaces::MortarUserObject).queryInto(mortar);
5083 
5084  if (userobjs.empty() && genobjs.empty() && tgobjs.empty() && nodal.empty() && mortar.empty())
5085  continue;
5086 
5087  // Start the timer here since we have at least one active user object
5088  std::string compute_uo_tag = "computeUserObjects(" + Moose::stringify(type) + ")";
5089 
5090  // Perform Residual/Jacobian setups
5091  if (type == EXEC_LINEAR)
5092  {
5093  for (auto obj : userobjs)
5094  obj->residualSetup();
5095  for (auto obj : nodal)
5096  obj->residualSetup();
5097  for (auto obj : mortar)
5098  obj->residualSetup();
5099  for (auto obj : tgobjs)
5100  obj->residualSetup();
5101  for (auto obj : genobjs)
5102  obj->residualSetup();
5103  }
5104  else if (type == EXEC_NONLINEAR)
5105  {
5106  for (auto obj : userobjs)
5107  obj->jacobianSetup();
5108  for (auto obj : nodal)
5109  obj->jacobianSetup();
5110  for (auto obj : mortar)
5111  obj->jacobianSetup();
5112  for (auto obj : tgobjs)
5113  obj->jacobianSetup();
5114  for (auto obj : genobjs)
5115  obj->jacobianSetup();
5116  }
5117 
5118  for (auto obj : userobjs)
5119  obj->initialize();
5120 
5121  // Execute Side/InternalSide/Interface/Elemental/DomainUserObjects
5122  if (!userobjs.empty())
5123  {
5124  // non-nodal user objects have to be run separately before the nodal user objects run
5125  // because some nodal user objects (NodalNormal related) depend on elemental user objects
5126  // :-(
5127  ComputeUserObjectsThread cppt(*this, query);
5129 
5130  // There is one instance in rattlesnake where an elemental user object's finalize depends
5131  // on a side user object having been finalized first :-(
5138  }
5139 
5140  // if any userobject may have written to variables we need to close the aux solution
5141  for (const auto & uo : userobjs)
5142  if (auto euo = dynamic_cast<const ElementUserObject *>(uo);
5143  euo && euo->hasWritableCoupledVariables())
5144  {
5145  _aux->solution().close();
5146  _aux->system().update();
5147  break;
5148  }
5149 
5150  // Execute NodalUserObjects
5151  // BISON has an axial reloc elemental user object that has a finalize func that depends on a
5152  // nodal user object's prev value. So we can't initialize this until after elemental objects
5153  // have been finalized :-(
5154  for (auto obj : nodal)
5155  obj->initialize();
5156  if (query.clone().condition<AttribInterfaces>(Interfaces::NodalUserObject).count() > 0)
5157  {
5158  ComputeNodalUserObjectsThread cnppt(*this, query);
5161  }
5162 
5163  // if any userobject may have written to variables we need to close the aux solution
5164  for (const auto & uo : nodal)
5165  if (auto nuo = dynamic_cast<const NodalUserObject *>(uo);
5166  nuo && nuo->hasWritableCoupledVariables())
5167  {
5168  _aux->solution().close();
5169  _aux->system().update();
5170  break;
5171  }
5172 
5173  // Execute MortarUserObjects
5174  {
5175  for (auto obj : mortar)
5176  obj->initialize();
5177  if (!mortar.empty())
5178  {
5179  auto create_and_run_mortar_functors = [this, type, &mortar](const bool displaced)
5180  {
5181  // go over mortar interfaces and construct functors
5182  const auto & mortar_interfaces = getMortarInterfaces(displaced);
5183  for (const auto & [primary_secondary_boundary_pair, mortar_generation_ptr] :
5184  mortar_interfaces)
5185  {
5186  auto mortar_uos_to_execute =
5187  getMortarUserObjects(primary_secondary_boundary_pair.first,
5188  primary_secondary_boundary_pair.second,
5189  displaced,
5190  mortar);
5191 
5192  auto * const subproblem = displaced
5193  ? static_cast<SubProblem *>(_displaced_problem.get())
5194  : static_cast<SubProblem *>(this);
5195  MortarUserObjectThread muot(mortar_uos_to_execute,
5196  *mortar_generation_ptr,
5197  *subproblem,
5198  *this,
5199  displaced,
5200  subproblem->assembly(0, 0));
5201 
5202  muot();
5203  }
5204  };
5205 
5206  create_and_run_mortar_functors(false);
5207  if (_displaced_problem)
5208  create_and_run_mortar_functors(true);
5209  }
5210  for (auto obj : mortar)
5211  obj->finalize();
5212  }
5213 
5214  // Execute threaded general user objects
5215  for (auto obj : tgobjs)
5216  obj->initialize();
5217  std::vector<GeneralUserObject *> tguos_zero;
5218  query.clone()
5219  .condition<AttribThread>(0)
5220  .condition<AttribInterfaces>(Interfaces::ThreadedGeneralUserObject)
5221  .queryInto(tguos_zero);
5222  for (auto obj : tguos_zero)
5223  {
5224  std::vector<GeneralUserObject *> tguos;
5225  auto q = query.clone()
5226  .condition<AttribName>(obj->name())
5227  .condition<AttribInterfaces>(Interfaces::ThreadedGeneralUserObject);
5228  q.queryInto(tguos);
5229 
5231  Threads::parallel_reduce(GeneralUserObjectRange(tguos.begin(), tguos.end()), ctguot);
5232  joinAndFinalize(q);
5233  }
5234 
5235  // Execute general user objects
5237  true);
5238  }
5239  }
5240  catch (...)
5241  {
5242  handleException("computeUserObjectsInternal");
5243  }
5244 }
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1288
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:1325
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.
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, std::unique_ptr< AutomaticMortarGeneration > > & getMortarInterfaces(bool on_displaced) const
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:93
StoredRange< std::vector< GeneralUserObject * >::iterator, GeneralUserObject * > GeneralUserObjectRange
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:31
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:33
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
Class for threaded computation of UserObjects.
std::shared_ptr< DisplacedProblem > _displaced_problem
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:1104

◆ computingNonlinearResid() [2/4]

bool SubProblem::computingNonlinearResid
inline

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:1104

◆ computingNonlinearResid() [3/4]

virtual void SubProblem::computingNonlinearResid
inline

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:1104

◆ computingNonlinearResid() [4/4]

void FEProblemBase::computingNonlinearResid ( bool  computing_nonlinear_residual)
finalvirtual

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

Reimplemented from SubProblem.

Definition at line 9261 of file FEProblemBase.C.

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

9262 {
9263  parallel_object_only();
9264 
9265  if (_displaced_problem)
9266  _displaced_problem->computingNonlinearResid(computing_nonlinear_residual);
9267  _computing_nonlinear_residual = computing_nonlinear_residual;
9268 }
bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
Definition: SubProblem.h:1104
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ computingPreSMOResidual()

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

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

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

Implements SubProblem.

Definition at line 6837 of file FEProblemBase.C.

Referenced by DisplacedProblem::computingPreSMOResidual().

6838 {
6839  return _nl[nl_sys_num]->computingPreSMOResidual();
6840 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ computingScalingJacobian() [1/2]

void FEProblemBase::computingScalingJacobian ( bool  computing_scaling_jacobian)
inline

Setter for whether we're computing the scaling jacobian.

Definition at line 2588 of file FEProblemBase.h.

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

2589  {
2590  _computing_scaling_jacobian = computing_scaling_jacobian;
2591  }
bool _computing_scaling_jacobian
Flag used to indicate whether we are computing the scaling Jacobian.

◆ computingScalingJacobian() [2/2]

bool FEProblemBase::computingScalingJacobian ( ) const
inlinefinaloverridevirtual

Getter for whether we're computing the scaling jacobian.

Implements SubProblem.

Definition at line 2593 of file FEProblemBase.h.

2593 { 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)
inline

Setter for whether we're computing the scaling residual.

Definition at line 2598 of file FEProblemBase.h.

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

2599  {
2600  _computing_scaling_residual = computing_scaling_residual;
2601  }
bool _computing_scaling_residual
Flag used to indicate whether we are computing the scaling Residual.

◆ computingScalingResidual() [2/2]

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

Implements SubProblem.

Definition at line 2606 of file FEProblemBase.h.

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

◆ connectControllableParams()

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

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

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

Definition at line 77 of file MooseBase.C.

81 {
82  auto & factory = _app.getFactory();
83  auto & ip_warehouse = _app.getInputParameterWarehouse();
84 
85  MooseObjectParameterName primary_name(uniqueName(), parameter);
86  const auto base_type = factory.getValidParams(object_type).getBase();
87  MooseObjectParameterName secondary_name(base_type, object_name, object_parameter);
88  ip_warehouse.addControllableParameterConnection(primary_name, secondary_name);
89 
90  const auto & tags = _pars.get<std::vector<std::string>>("control_tags");
91  for (const auto & tag : tags)
92  {
93  if (!tag.empty())
94  {
95  // Only adds the parameter with the different control tags if the derived class
96  // properly registers the parameter to its own syntax
97  MooseObjectParameterName tagged_name(tag, name(), parameter);
98  ip_warehouse.addControllableParameterConnection(
99  tagged_name, secondary_name, /*error_on_empty=*/false);
100  }
101  }
102 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
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:2983
MooseObjectName uniqueName() const
Definition: MooseBase.C:69
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
Definition: MooseApp.h:401
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
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(), ComputeFVInitialConditionThread::printGeneralExecutionInformation(), ComputeInitialConditionThread::printGeneralExecutionInformation(), ComputeNodalUserObjectsThread::printGeneralExecutionInformation(), ComputeNodalKernelBcsThread::printGeneralExecutionInformation(), ComputeNodalKernelBCJacobiansThread::printGeneralExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeNodalKernelsThread::printGeneralExecutionInformation(), ComputeNodalDampingThread::printGeneralExecutionInformation(), ComputeMarkerThread::printGeneralExecutionInformation(), ComputeDiracThread::printGeneralExecutionInformation(), ComputeIndicatorThread::printGeneralExecutionInformation(), ComputeNodalKernelJacobiansThread::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

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

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

9095 {
9096  return _const_jacobian;
9097 }
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 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 ( )
Returns
the coordinate transformation object that describes how to transform this problem's coordinate system into the canonical/reference coordinate system

Definition at line 9497 of file FEProblemBase.C.

9498 {
9499  return mesh().coordTransform();
9500 }
MooseAppCoordTransform & coordTransform()
Definition: MooseMesh.h:1931
virtual MooseMesh & mesh() override

◆ copySolutionsBackwards()

void FEProblemBase::copySolutionsBackwards ( )
virtual

Definition at line 6843 of file FEProblemBase.C.

Referenced by initialSetup().

6844 {
6845  TIME_SECTION("copySolutionsBackwards", 3, "Copying Solutions Backward");
6846 
6847  for (auto & sys : _solver_systems)
6848  sys->copySolutionsBackwards();
6849  _aux->copySolutionsBackwards();
6850 }
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
inline

Definition at line 183 of file FEProblemBase.h.

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

183 { 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 
)

◆ couplingMatrix()

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

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

Implements SubProblem.

Definition at line 3567 of file FEProblemBase.h.

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

3568 {
3569  return _cm[i].get();
3570 }
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 
)

Definition at line 8075 of file FEProblemBase.C.

8083 {
8084  _has_mortar = true;
8085 
8086  if (on_displaced)
8087  return _mortar_data->createMortarInterface(primary_secondary_boundary_pair,
8088  primary_secondary_subdomain_pair,
8090  on_displaced,
8091  periodic,
8092  debug,
8093  correct_edge_dropping,
8094  minimum_projection_angle);
8095  else
8096  return _mortar_data->createMortarInterface(primary_secondary_boundary_pair,
8097  primary_secondary_subdomain_pair,
8098  *this,
8099  on_displaced,
8100  periodic,
8101  debug,
8102  correct_edge_dropping,
8103  minimum_projection_angle);
8104 }
std::unique_ptr< MortarInterfaceWarehouse > _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 
)
virtual

Definition at line 6263 of file FEProblemBase.C.

6269 {
6270  if (order == INVALID_ORDER)
6271  {
6272  // automatically determine the integration order
6273  order = _solver_systems[0]->getMinQuadratureOrder();
6274  for (const auto i : make_range(std::size_t(1), _solver_systems.size()))
6275  if (order < _solver_systems[i]->getMinQuadratureOrder())
6276  order = _solver_systems[i]->getMinQuadratureOrder();
6277  if (order < _aux->getMinQuadratureOrder())
6278  order = _aux->getMinQuadratureOrder();
6279  }
6280 
6281  if (volume_order == INVALID_ORDER)
6282  volume_order = order;
6283 
6284  if (face_order == INVALID_ORDER)
6285  face_order = order;
6286 
6287  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
6288  for (const auto i : index_range(_solver_systems))
6289  _assembly[tid][i]->createQRules(
6290  type, order, volume_order, face_order, block, allow_negative_qweights);
6291 
6292  if (_displaced_problem)
6293  _displaced_problem->createQRules(
6294  type, order, volume_order, face_order, block, allow_negative_qweights);
6295 
6296  updateMaxQps();
6297 }
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:93
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)

◆ createTagMatrices()

void FEProblemBase::createTagMatrices ( CreateTaggedMatrixKey  )

Definition at line 699 of file FEProblemBase.C.

700 {
701  auto & matrices = getParam<std::vector<std::vector<TagName>>>("extra_tag_matrices");
702  for (const auto sys_num : index_range(matrices))
703  for (auto & matrix : matrices[sys_num])
704  {
705  auto tag = addMatrixTag(matrix);
706  _solver_systems[sys_num]->addMatrix(tag);
707  }
708 
709  for (auto & sys : _solver_systems)
710  sys->sizeVariableMatrixData();
711  _aux->sizeVariableMatrixData();
712 }
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:312
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
auto index_range(const T &sizable)

◆ createTagSolutions()

void FEProblemBase::createTagSolutions ( )
protected

Create extra tagged solution vectors.

Definition at line 715 of file FEProblemBase.C.

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

716 {
717  for (auto & vector : getParam<std::vector<TagName>>("extra_tag_solutions"))
718  {
719  auto tag = addVectorTag(vector, Moose::VECTOR_TAG_SOLUTION);
720  for (auto & sys : _solver_systems)
721  sys->addVector(tag, false, libMesh::GHOSTED);
722  _aux->addVector(tag, false, libMesh::GHOSTED);
723  }
724 
726  {
727  // We'll populate the zeroth state of the nonlinear iterations with the current solution for
728  // ease of use in doing things like copying solutions backwards. We're just storing pointers in
729  // the solution states containers so populating the zeroth state does not cost us the memory of
730  // a new vector
732  }
733 
735  for (auto & sys : _solver_systems)
736  sys->associateVectorToTag(*sys->system().current_local_solution.get(), tag);
737  _aux->associateVectorToTag(*_aux->system().current_local_solution.get(), tag);
738 }
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseBase.h:388
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:93
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.
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 ( )
protected

Create extra tagged vectors and matrices.

Definition at line 677 of file FEProblemBase.C.

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

678 {
679  // add vectors and their tags to system
680  auto & vectors = getParam<std::vector<std::vector<TagName>>>("extra_tag_vectors");
681  for (const auto sys_num : index_range(vectors))
682  for (auto & vector : vectors[sys_num])
683  {
684  auto tag = addVectorTag(vector);
685  _solver_systems[sys_num]->addVector(tag, false, libMesh::GHOSTED);
686  }
687 
688  auto & not_zeroed_vectors = getParam<std::vector<std::vector<TagName>>>("not_zeroed_tag_vectors");
689  for (const auto sys_num : index_range(not_zeroed_vectors))
690  for (auto & vector : not_zeroed_vectors[sys_num])
691  {
692  auto tag = addVectorTag(vector);
693  _solver_systems[sys_num]->addVector(tag, false, GHOSTED);
695  }
696 }
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:93
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
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:150

◆ currentLinearSysNum()

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

Implements SubProblem.

Definition at line 9514 of file FEProblemBase.C.

Referenced by DisplacedProblem::currentLinearSysNum().

9515 {
9516  // If we don't have linear systems this should be an invalid number
9517  unsigned int current_linear_sys_num = libMesh::invalid_uint;
9518  if (_linear_systems.size())
9519  current_linear_sys_num = currentLinearSystem().number();
9520 
9521  return current_linear_sys_num;
9522 }
const unsigned int invalid_uint
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1157
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 ( )
inline

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

Definition at line 3535 of file FEProblemBase.h.

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

3536 {
3537  mooseAssert(_current_linear_sys, "The linear system is not currently set");
3538  return *_current_linear_sys;
3539 }
LinearSystem * _current_linear_sys
The current linear system that we are solving.

◆ currentLinearSystem() [2/2]

const LinearSystem & FEProblemBase::currentLinearSystem ( ) const
inline

Get a constant reference to the current linear system.

Definition at line 3542 of file FEProblemBase.h.

3543 {
3544  mooseAssert(_current_linear_sys, "The linear system is not currently set");
3545  return *_current_linear_sys;
3546 }
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:1098

◆ 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:1107

◆ currentlyComputingResidual() [2/2]

const bool& SubProblem::currentlyComputingResidual
inline

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:1107

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

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

1493 {
1495 }
bool _currently_computing_residual_and_jacobian
Flag to determine whether the problem is currently computing the residual and Jacobian.
Definition: SubProblem.h:1101

◆ currentNlSysNum()

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

Implements SubProblem.

Definition at line 9503 of file FEProblemBase.C.

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

9504 {
9505  // If we don't have nonlinear systems this should be an invalid number
9506  unsigned int current_nl_sys_num = libMesh::invalid_uint;
9507  if (_nl.size())
9508  current_nl_sys_num = currentNonlinearSystem().number();
9509 
9510  return current_nl_sys_num;
9511 }
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:1157

◆ currentNonlinearSystem() [1/2]

NonlinearSystemBase & FEProblemBase::currentNonlinearSystem ( )
inline

◆ currentNonlinearSystem() [2/2]

const NonlinearSystemBase & FEProblemBase::currentNonlinearSystem ( ) const
inline

Definition at line 3512 of file FEProblemBase.h.

3513 {
3514  mooseAssert(_current_nl_sys, "The nonlinear system is not currently set");
3515  return *_current_nl_sys;
3516 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.

◆ currentResidualVectorTags()

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

Return the residual vector tags we are currently computing.

Implements SubProblem.

Definition at line 3583 of file FEProblemBase.h.

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

3584 {
3586 }
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)
overridevirtual

Reimplemented from SubProblem.

Definition at line 4806 of file FEProblemBase.C.

Referenced by execute().

4807 {
4808  SubProblem::customSetup(exec_type);
4809 
4810  if (_line_search)
4811  _line_search->customSetup(exec_type);
4812 
4813  unsigned int n_threads = libMesh::n_threads();
4814  for (THREAD_ID tid = 0; tid < n_threads; tid++)
4815  {
4816  _all_materials.customSetup(exec_type, tid);
4817  _functions.customSetup(exec_type, tid);
4818  }
4819 
4820 #ifdef MOOSE_KOKKOS_ENABLED
4821  _kokkos_functions.customSetup(exec_type);
4822 #endif
4823 
4824  _aux->customSetup(exec_type);
4825  for (auto & nl : _nl)
4826  nl->customSetup(exec_type);
4827 
4828  if (_displaced_problem)
4829  _displaced_problem->customSetup(exec_type);
4830 
4831  for (THREAD_ID tid = 0; tid < n_threads; tid++)
4832  {
4833  _internal_side_indicators.customSetup(exec_type, tid);
4834  _indicators.customSetup(exec_type, tid);
4835  _markers.customSetup(exec_type, tid);
4836  }
4837 
4838  std::vector<UserObject *> userobjs;
4839  theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(userobjs);
4840  for (auto obj : userobjs)
4841  obj->customSetup(exec_type);
4842 
4843  _app.getOutputWarehouse().customSetup(exec_type);
4844 }
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.
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
virtual void customSetup(const ExecFlagType &exec_type)
Definition: SubProblem.C:1196
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:357
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:2525
unsigned int THREAD_ID
Definition: MooseTypes.h:237
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 283 of file Restartable.h.

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

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

◆ declareRestartableData()

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

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

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

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

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

Definition at line 276 of file Restartable.h.

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

◆ declareRestartableDataWithContext()

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

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

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

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

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

Definition at line 301 of file Restartable.h.

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

◆ declareRestartableDataWithObjectName()

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 330 of file Restartable.h.

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

◆ declareRestartableDataWithObjectNameWithContext()

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 340 of file Restartable.h.

344 {
345  std::string old_name = _restartable_name;
346 
347  _restartable_name = object_name;
348 
349  T & value = declareRestartableDataWithContext<T>(data_name, context, std::forward<Args>(args)...);
350 
351  _restartable_name = old_name;
352 
353  return value;
354 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:250
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 DisplacedSystem::DisplacedSystem(), and NonlinearSystemBase::NonlinearSystemBase().

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

◆ determineSolverSystem()

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

Determine what solver system the provided variable name lies in.

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

Implements SubProblem.

Definition at line 2942 of file FEProblemBase.C.

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

2944 {
2945  auto map_it = _solver_var_to_sys_num.find(var_name);
2946  const bool var_in_sys = map_it != _solver_var_to_sys_num.end();
2947  if (var_in_sys)
2948  mooseAssert(_solver_systems[map_it->second]->hasVariable(var_name) ||
2949  _solver_systems[map_it->second]->hasScalarVariable(var_name),
2950  "If the variable is in our FEProblem solver system map, then it must be in the "
2951  "solver system we expect");
2952  else if (error_if_not_found)
2953  {
2954  if (_aux->hasVariable(var_name) || _aux->hasScalarVariable(var_name))
2955  mooseError("No solver variable named ",
2956  var_name,
2957  " found. Did you specify an auxiliary variable when you meant to specify a "
2958  "solver variable?");
2959  else
2960  mooseError("Unknown variable '",
2961  var_name,
2962  "'. It does not exist in the solver system(s) or auxiliary system");
2963  }
2964 
2965  return std::make_pair(var_in_sys, var_in_sys ? map_it->second : libMesh::invalid_uint);
2966 }
const unsigned int invalid_uint
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.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ diracKernelInfo()

DiracKernelInfo & SubProblem::diracKernelInfo ( )
virtualinherited

Definition at line 749 of file SubProblem.C.

750 {
751  return _dirac_kernel_info;
752 }
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1051

◆ doingPRefinement()

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

Definition at line 1366 of file SubProblem.C.

Referenced by meshChanged().

1367 {
1368  return mesh().doingPRefinement();
1369 }
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:1365

◆ dt()

virtual Real& FEProblemBase::dt ( ) const
inlinevirtual

◆ dtOld()

virtual Real& FEProblemBase::dtOld ( ) const
inlinevirtual

Definition at line 551 of file FEProblemBase.h.

Referenced by IterationAdaptiveDT::acceptStep().

551 { 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 
)
protected

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

Definition at line 2796 of file FEProblemBase.C.

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

2800 {
2801  std::set<SubdomainID> subdomainIDs;
2802  if (active_subdomains->size() == 0)
2803  {
2804  const auto subdomains = _mesh.meshSubdomains();
2805  subdomainIDs.insert(subdomains.begin(), subdomains.end());
2806  }
2807  else
2808  subdomainIDs.insert(active_subdomains->begin(), active_subdomains->end());
2809 
2810  for (auto & sys : _solver_systems)
2811  {
2812  SystemBase * curr_sys_ptr = sys.get();
2813  SystemBase * other_sys_ptr = _aux.get();
2814  std::string error_prefix = "";
2815  if (is_aux)
2816  {
2817  curr_sys_ptr = _aux.get();
2818  other_sys_ptr = sys.get();
2819  error_prefix = "aux";
2820  }
2821 
2822  if (other_sys_ptr->hasVariable(var_name))
2823  mooseError("Cannot have an auxiliary variable and a solver variable with the same name: ",
2824  var_name);
2825 
2826  if (curr_sys_ptr->hasVariable(var_name))
2827  {
2828  const Variable & var =
2829  curr_sys_ptr->system().variable(curr_sys_ptr->system().variable_number(var_name));
2830 
2831  // variable type
2832  if (var.type() != type)
2833  {
2834  const auto stringifyType = [](FEType t)
2835  { return Moose::stringify(t.family) + " of order " + Moose::stringify(t.order); };
2836 
2837  mooseError("Mismatching types are specified for ",
2838  error_prefix,
2839  "variable with name '",
2840  var_name,
2841  "': '",
2842  stringifyType(var.type()),
2843  "' and '",
2844  stringifyType(type),
2845  "'");
2846  }
2847 
2848  // block-restriction
2849  if (!(active_subdomains->size() == 0 && var.active_subdomains().size() == 0))
2850  {
2851  const auto varActiveSubdomains = var.active_subdomains();
2852  std::set<SubdomainID> varSubdomainIDs;
2853  if (varActiveSubdomains.size() == 0)
2854  {
2855  const auto subdomains = _mesh.meshSubdomains();
2856  varSubdomainIDs.insert(subdomains.begin(), subdomains.end());
2857  }
2858  else
2859  varSubdomainIDs.insert(varActiveSubdomains.begin(), varActiveSubdomains.end());
2860 
2861  // Is subdomainIDs a subset of varSubdomainIDs? With this we allow the case that the newly
2862  // requested block restriction is only a subset of the existing one.
2863  const auto isSubset = std::includes(varSubdomainIDs.begin(),
2864  varSubdomainIDs.end(),
2865  subdomainIDs.begin(),
2866  subdomainIDs.end());
2867 
2868  if (!isSubset)
2869  {
2870  // helper function: make a string from a set of subdomain ids
2871  const auto stringifySubdomains = [this](std::set<SubdomainID> subdomainIDs)
2872  {
2873  std::stringstream s;
2874  for (auto const i : subdomainIDs)
2875  {
2876  // do we need to insert a comma?
2877  if (s.tellp() != 0)
2878  s << ", ";
2879 
2880  // insert subdomain name and id -or- only the id (if no name is given)
2881  const auto subdomainName = _mesh.getSubdomainName(i);
2882  if (subdomainName.empty())
2883  s << i;
2884  else
2885  s << subdomainName << " (" << i << ")";
2886  }
2887  return s.str();
2888  };
2889 
2890  const std::string msg = "Mismatching block-restrictions are specified for " +
2891  error_prefix + "variable with name '" + var_name + "': {" +
2892  stringifySubdomains(varSubdomainIDs) + "} and {" +
2893  stringifySubdomains(subdomainIDs) + "}";
2894 
2895  mooseError(msg);
2896  }
2897  }
2898 
2899  return true;
2900  }
2901  }
2902 
2903  return false;
2904 }
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:1813
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:93
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:851
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3251
const FEType & type() const

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 49 of file MooseObject.h.

Referenced by EigenKernel::enabled().

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

◆ errorOnJacobianNonzeroReallocation()

bool FEProblemBase::errorOnJacobianNonzeroReallocation ( ) const
inline

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

Definition at line 2189 of file FEProblemBase.h.

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

2190  {
2192  }
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 &  ) const
inlineinherited

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

Definition at line 264 of file MooseBase.h.

264 { return messagePrefix(); }
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:256

◆ es()

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

◆ execMultiApps()

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

Execute the MultiApps associated with the ExecFlagType.

Definition at line 5653 of file FEProblemBase.C.

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

5654 {
5655  // Active MultiApps
5656  const std::vector<MooseSharedPointer<MultiApp>> & multi_apps =
5658 
5659  // Do anything that needs to be done to Apps before transfers
5660  for (const auto & multi_app : multi_apps)
5661  multi_app->preTransfer(_dt, _time);
5662 
5663  // Execute Transfers _to_ MultiApps
5665 
5666  // Execute Transfers _between_ Multiapps
5668 
5669  // Execute MultiApps
5670  if (multi_apps.size())
5671  {
5672  TIME_SECTION("execMultiApps", 1, "Executing MultiApps", false);
5673 
5674  if (_verbose_multiapps)
5675  _console << COLOR_CYAN << "\nExecuting MultiApps on " << Moose::stringify(type)
5676  << COLOR_DEFAULT << std::endl;
5677 
5678  bool success = true;
5679 
5680  for (const auto & multi_app : multi_apps)
5681  {
5682  success = multi_app->solveStep(_dt, _time, auto_advance);
5683  // no need to finish executing the subapps if one fails
5684  if (!success)
5685  break;
5686  }
5687 
5689 
5690  _communicator.min(success);
5691 
5692  if (!success)
5693  return false;
5694 
5695  if (_verbose_multiapps)
5696  _console << COLOR_CYAN << "Finished Executing MultiApps on " << Moose::stringify(type) << "\n"
5697  << COLOR_DEFAULT << std::endl;
5698  }
5699 
5700  // Execute Transfers _from_ MultiApps
5702 
5703  // If we made it here then everything passed
5704  return true;
5705 }
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
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h: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.
void parallelBarrierNotify(const Parallel::Communicator &comm, bool messaging)
Definition: MooseUtils.C:327
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ execMultiAppTransfers()

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

Execute MultiAppTransfers associated with execution flag and direction.

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

Definition at line 5553 of file FEProblemBase.C.

Referenced by execMultiApps().

5554 {
5555  bool to_multiapp = direction == MultiAppTransfer::TO_MULTIAPP;
5556  bool from_multiapp = direction == MultiAppTransfer::FROM_MULTIAPP;
5557  std::string string_direction;
5558  if (to_multiapp)
5559  string_direction = " To ";
5560  else if (from_multiapp)
5561  string_direction = " From ";
5562  else
5563  string_direction = " Between ";
5564 
5565  const MooseObjectWarehouse<Transfer> & wh = to_multiapp ? _to_multi_app_transfers[type]
5566  : from_multiapp ? _from_multi_app_transfers[type]
5568 
5569  if (wh.hasActiveObjects())
5570  {
5571  TIME_SECTION("execMultiAppTransfers", 1, "Executing Transfers");
5572 
5573  const auto & transfers = wh.getActiveObjects();
5574 
5575  if (_verbose_multiapps)
5576  {
5577  _console << COLOR_CYAN << "\nTransfers on " << Moose::stringify(type) << string_direction
5578  << "MultiApps" << COLOR_DEFAULT << ":" << std::endl;
5579 
5581  {"Name", "Type", "From", "To"});
5582 
5583  // Build Table of Transfer Info
5584  for (const auto & transfer : transfers)
5585  {
5586  auto multiapp_transfer = dynamic_cast<MultiAppTransfer *>(transfer.get());
5587 
5588  table.addRow(multiapp_transfer->name(),
5589  multiapp_transfer->type(),
5590  multiapp_transfer->getFromName(),
5591  multiapp_transfer->getToName());
5592  }
5593 
5594  // Print it
5595  table.print(_console);
5596  }
5597 
5598  for (const auto & transfer : transfers)
5599  {
5600  transfer->setCurrentDirection(direction);
5601  transfer->execute();
5602  }
5603 
5605 
5606  if (_verbose_multiapps)
5607  _console << COLOR_CYAN << "Transfers on " << Moose::stringify(type) << " Are Finished\n"
5608  << COLOR_DEFAULT << std::endl;
5609  }
5610  else if (_multi_apps[type].getActiveObjects().size())
5611  {
5612  if (_verbose_multiapps)
5613  _console << COLOR_CYAN << "\nNo Transfers on " << Moose::stringify(type) << string_direction
5614  << "MultiApps\n"
5615  << COLOR_DEFAULT << std::endl;
5616  }
5617 }
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.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h: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.
void parallelBarrierNotify(const Parallel::Communicator &comm, bool messaging)
Definition: MooseUtils.C:327
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ execTransfers()

void FEProblemBase::execTransfers ( ExecFlagType  type)

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

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

5824 {
5825  if (_transfers[type].hasActiveObjects())
5826  {
5827  TIME_SECTION("execTransfers", 3, "Executing Transfers");
5828 
5829  const auto & transfers = _transfers[type].getActiveObjects();
5830 
5831  for (const auto & transfer : transfers)
5832  transfer->execute();
5833  }
5834 }
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:93

◆ execute()

void FEProblemBase::execute ( const ExecFlagType exec_type)
virtual

Convenience function for performing execution of MOOSE systems.

Reimplemented in EigenProblem, and DumpObjectsProblem.

Definition at line 4847 of file FEProblemBase.C.

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

4848 {
4849  // Set the current flag
4850  setCurrentExecuteOnFlag(exec_type);
4851 
4852  if (exec_type != EXEC_INITIAL)
4853  executeControls(exec_type);
4854 
4855  // intentially call this after executing controls because the setups may rely on the controls
4856  // FIXME: we skip the following flags because they have dedicated setup functions in
4857  // SetupInterface and it may not be appropriate to call them here.
4858  if (!(exec_type == EXEC_INITIAL || exec_type == EXEC_TIMESTEP_BEGIN ||
4859  exec_type == EXEC_SUBDOMAIN || exec_type == EXEC_NONLINEAR || exec_type == EXEC_LINEAR))
4860  customSetup(exec_type);
4861 
4862  // Samplers; EXEC_INITIAL is not called because the Sampler::init() method that is called after
4863  // construction makes the first Sampler::execute() call. This ensures that the random number
4864  // generator object is the correct state prior to any other object (e.g., Transfers) attempts to
4865  // extract data from the Sampler. That is, if the Sampler::execute() call is delayed to here
4866  // then it is not in the correct state for other objects.
4867  if (exec_type != EXEC_INITIAL)
4868  executeSamplers(exec_type);
4869 
4870  // Pre-aux UserObjects
4871  computeUserObjects(exec_type, Moose::PRE_AUX);
4872 
4873  // Systems (includes system time derivative and aux kernel calculations)
4874  computeSystems(exec_type);
4875  // With the auxiliary system solution computed, sync the displaced problem auxiliary solution
4876  // before computation of post-aux user objects. The undisplaced auxiliary system current local
4877  // solution is updated (via System::update) within the AuxiliarySystem class's variable
4878  // computation methods (e.g. computeElementalVarsHelper, computeNodalVarsHelper), so it is safe to
4879  // use it here
4880  if (_displaced_problem)
4881  _displaced_problem->syncAuxSolution(*getAuxiliarySystem().currentSolution());
4882 
4883  // Post-aux UserObjects
4884  computeUserObjects(exec_type, Moose::POST_AUX);
4885 
4886  // Return the current flag to None
4888 
4890  {
4891  // we will only check aux variables and postprocessors
4892  // checking more reporter data can be added in the future if needed
4893  std::unique_ptr<NumericVector<Number>> x = _aux->currentSolution()->clone();
4895 
4896  // call THIS execute one more time for checking the possible states
4897  _checking_uo_aux_state = true;
4898  FEProblemBase::execute(exec_type);
4899  _checking_uo_aux_state = false;
4900 
4901  const Real check_tol = 1e-8;
4902 
4903  const Real xnorm = x->l2_norm();
4904  *x -= *_aux->currentSolution();
4905  if (x->l2_norm() > check_tol * xnorm)
4906  {
4907  const auto & sys = _aux->system();
4908  const unsigned int n_vars = sys.n_vars();
4909  std::multimap<Real, std::string, std::greater<Real>> ordered_map;
4910  for (const auto i : make_range(n_vars))
4911  {
4912  const Real vnorm = sys.calculate_norm(*x, i, DISCRETE_L2);
4913  ordered_map.emplace(vnorm, sys.variable_name(i));
4914  }
4915 
4916  std::ostringstream oss;
4917  for (const auto & [error_norm, var_name] : ordered_map)
4918  oss << " {" << var_name << ", " << error_norm << "},\n";
4919 
4920  mooseError("Aux kernels, user objects appear to have states for aux variables on ",
4921  exec_type,
4922  ".\nVariable error norms in descending order:\n",
4923  oss.str());
4924  }
4925 
4927  if (pp_values.size() != new_pp_values.size())
4928  mooseError("Second execution for uo/aux state check should not change the number of "
4929  "real reporter values");
4930 
4931  const Real ppnorm = pp_values.l2_norm();
4932  pp_values -= new_pp_values;
4933  if (pp_values.l2_norm() > check_tol * ppnorm)
4934  {
4935  const auto pp_names = getReporterData().getAllRealReporterFullNames();
4936  std::multimap<Real, std::string, std::greater<Real>> ordered_map;
4937  for (const auto i : index_range(pp_names))
4938  ordered_map.emplace(std::abs(pp_values(i)), pp_names[i]);
4939 
4940  std::ostringstream oss;
4941  for (const auto & [error_norm, pp_name] : ordered_map)
4942  oss << " {" << pp_name << ", " << error_norm << "},\n";
4943 
4944  mooseError("Aux kernels, user objects appear to have states for real reporter values on ",
4945  exec_type,
4946  ".\nErrors of real reporter values in descending order:\n",
4947  oss.str());
4948  }
4949  }
4950 }
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
Definition: EigenADReal.h:50
const bool _uo_aux_state_check
Whether or not checking the state of uo/aux evaluation.
const ExecFlagType EXEC_NONE
Definition: Moose.C:29
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:37
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:31
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:33
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
virtual unsigned int size() const override final
std::shared_ptr< DisplacedProblem > _displaced_problem
const ExecFlagType EXEC_SUBDOMAIN
Definition: Moose.C:50
auto index_range(const T &sizable)
void computeSystems(const ExecFlagType &type)
Do generic system computations.
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:30

◆ executeAllObjects()

void FEProblemBase::executeAllObjects ( const ExecFlagType exec_type)
virtual

Definition at line 4801 of file FEProblemBase.C.

Referenced by Executor::exec().

4802 {
4803 }

◆ executeControls()

void FEProblemBase::executeControls ( const ExecFlagType exec_type)

Performs setup and execute calls for Control objects.

Definition at line 5247 of file FEProblemBase.C.

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

5248 {
5249  if (_control_warehouse[exec_type].hasActiveObjects())
5250  {
5251  TIME_SECTION("executeControls", 1, "Executing Controls");
5252 
5254 
5255  auto controls_wh = _control_warehouse[exec_type];
5256  // Add all of the dependencies into the resolver and sort them
5257  for (const auto & it : controls_wh.getActiveObjects())
5258  {
5259  // Make sure an item with no dependencies comes out too!
5260  resolver.addItem(it);
5261 
5262  std::vector<std::string> & dependent_controls = it->getDependencies();
5263  for (const auto & depend_name : dependent_controls)
5264  {
5265  if (controls_wh.hasActiveObject(depend_name))
5266  {
5267  auto dep_control = controls_wh.getActiveObject(depend_name);
5268  resolver.addEdge(dep_control, it);
5269  }
5270  else
5271  mooseError("The Control \"",
5272  depend_name,
5273  "\" was not created, did you make a "
5274  "spelling mistake or forget to include it "
5275  "in your input file?");
5276  }
5277  }
5278 
5279  const auto & ordered_controls = resolver.getSortedValues();
5280 
5281  if (!ordered_controls.empty())
5282  {
5283  _control_warehouse.setup(exec_type);
5284  // Run the controls in the proper order
5285  for (const auto & control : ordered_controls)
5286  control->execute();
5287  }
5288  }
5289 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
Class that represents the dependecy as a graph.

◆ executeSamplers()

void FEProblemBase::executeSamplers ( const ExecFlagType exec_type)

Performs setup and execute calls for Sampler objects.

Definition at line 5292 of file FEProblemBase.C.

Referenced by execute().

5293 {
5294  // TODO: This should be done in a threaded loop, but this should be super quick so for now
5295  // do a serial loop.
5296  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
5297  {
5298  std::vector<Sampler *> objects;
5299  theWarehouse()
5300  .query()
5301  .condition<AttribSystem>("Sampler")
5302  .condition<AttribThread>(tid)
5303  .condition<AttribExecOns>(exec_type)
5304  .queryInto(objects);
5305 
5306  if (!objects.empty())
5307  {
5308  TIME_SECTION("executeSamplers", 1, "Executing Samplers");
5309  FEProblemBase::objectSetupHelper<Sampler>(objects, exec_type);
5310  FEProblemBase::objectExecuteHelper<Sampler>(objects);
5311  }
5312  }
5313 }
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:237

◆ feBackend()

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

◆ finalizeMultiApps()

void FEProblemBase::finalizeMultiApps ( )

Definition at line 5708 of file FEProblemBase.C.

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

5709 {
5710  const auto & multi_apps = _multi_apps.getActiveObjects();
5711 
5712  for (const auto & multi_app : multi_apps)
5713  multi_app->finalize();
5714 }
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
overridevirtual

Reimplemented from SubProblem.

Definition at line 6831 of file FEProblemBase.C.

6832 {
6833  return _nl[nl_sys_num]->finalNonlinearResidual();
6834 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ finishMultiAppStep()

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

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

Optionally recurse through all multi-app levels

Definition at line 5736 of file FEProblemBase.C.

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

5737 {
5738  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5739 
5740  if (multi_apps.size())
5741  {
5742  if (_verbose_multiapps)
5743  _console << COLOR_CYAN << "\nAdvancing MultiApps on " << type.name() << COLOR_DEFAULT
5744  << std::endl;
5745 
5746  for (const auto & multi_app : multi_apps)
5747  multi_app->finishStep(recurse_through_multiapp_levels);
5748 
5750 
5751  if (_verbose_multiapps)
5752  _console << COLOR_CYAN << "Finished Advancing MultiApps on " << type.name() << "\n"
5753  << COLOR_DEFAULT << std::endl;
5754  }
5755 }
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...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
void parallelBarrierNotify(const Parallel::Communicator &comm, bool messaging)
Definition: MooseUtils.C:327
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ flagInvalidSolutionInternal()

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

Set solution invalid mark for the given solution ID.

Definition at line 41 of file SolutionInvalidInterface.C.

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

◆ forceOutput()

void FEProblemBase::forceOutput ( )

Indicates that the next call to outputStep should be forced.

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

Forced output will NOT override the allowOutput flag.

Definition at line 6966 of file FEProblemBase.C.

Referenced by TransientMultiApp::solveStep().

6967 {
6969 }
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:357
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2525

◆ fvBCsIntegrityCheck() [1/2]

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

Definition at line 2517 of file FEProblemBase.h.

2517 { 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)
inline
Parameters
fv_bcs_integrity_checkWhether to perform a boundary condition integrity check for finite volume

Definition at line 3573 of file FEProblemBase.h.

3574 {
3576  // the user has requested that we don't check integrity so we will honor that
3577  return;
3578 
3579  _fv_bcs_integrity_check = fv_bcs_integrity_check;
3580 }
bool _fv_bcs_integrity_check
Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset...

◆ geomSearchData()

virtual GeometricSearchData& FEProblemBase::geomSearchData ( )
inlineoverridevirtual

◆ getActiveElementalMooseVariables()

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

Get the MOOSE variables to be reinited on each element.

Parameters
tidThe thread id

Definition at line 455 of file SubProblem.C.

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

456 {
458 }
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:1077

◆ getActiveFEVariableCoupleableMatrixTags()

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

Definition at line 391 of file SubProblem.C.

392 {
394 }
std::vector< std::set< TagID > > _active_fe_var_coupleable_matrix_tags
Definition: SubProblem.h:1083

◆ getActiveFEVariableCoupleableVectorTags()

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

Definition at line 397 of file SubProblem.C.

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute().

398 {
400 }
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags
Definition: SubProblem.h:1085

◆ getActiveScalarVariableCoupleableMatrixTags()

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

Definition at line 432 of file SubProblem.C.

Referenced by MooseVariableScalar::reinit().

433 {
435 }
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags
Definition: SubProblem.h:1087

◆ getActiveScalarVariableCoupleableVectorTags()

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

Definition at line 438 of file SubProblem.C.

439 {
441 }
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
Definition: SubProblem.h:1089

◆ getActualFieldVariable()

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

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

Implements SubProblem.

Definition at line 5953 of file FEProblemBase.C.

Referenced by MultiAppVariableValueSampleTransfer::execute().

5954 {
5955  for (auto & sys : _solver_systems)
5956  if (sys->hasVariable(var_name))
5957  return sys->getActualFieldVariable<Real>(tid, var_name);
5958  if (_aux->hasVariable(var_name))
5959  return _aux->getActualFieldVariable<Real>(tid, var_name);
5960 
5961  mooseError("Unknown variable " + var_name);
5962 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getArrayVariable()

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

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

Implements SubProblem.

Definition at line 5977 of file FEProblemBase.C.

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

5978 {
5979  for (auto & sys : _solver_systems)
5980  if (sys->hasVariable(var_name))
5981  return sys->getFieldVariable<RealEigenVector>(tid, var_name);
5982  if (_aux->hasVariable(var_name))
5983  return _aux->getFieldVariable<RealEigenVector>(tid, var_name);
5984 
5985  mooseError("Unknown variable " + var_name);
5986 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:147

◆ getAuxiliarySystem()

AuxiliarySystem& FEProblemBase::getAuxiliarySystem ( )
inline

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

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

◆ getBase()

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

Definition at line 147 of file MooseBase.h.

Referenced by Factory::copyConstruct(), and MooseBase::uniqueParameterName().

147 { return _pars.getBase(); }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
const std::string & getBase() const

◆ getBndMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getBndMaterialPropertyStorage ( )
inline

Definition at line 1887 of file FEProblemBase.h.

1887 { return _bnd_material_props; }
MaterialPropertyStorage & _bnd_material_props

◆ getCheckedPointerParam()

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

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

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

Definition at line 432 of file MooseBase.h.

433 {
434  return _pars.getCheckedPointerParam<T>(name, error_string);
435 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
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 std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103

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

Referenced by MaterialPropertyDebugOutput::output().

744 {
746 }
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
Definition: SubProblem.h:1190

◆ getControlWarehouse()

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

Reference to the control logic warehouse.

Definition at line 2309 of file FEProblemBase.h.

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

2309 { 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
virtual

Gets a Convergence object.

Definition at line 2684 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().

2685 {
2686  auto * const ret = dynamic_cast<Convergence *>(_convergences.getActiveObject(name, tid).get());
2687  if (!ret)
2688  mooseError("The Convergence object '", name, "' does not exist.");
2689 
2690  return *ret;
2691 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getConvergenceObjects()

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

Gets the Convergence objects.

Definition at line 2694 of file FEProblemBase.C.

2695 {
2696  return _convergences.getActiveObjects(tid);
2697 }
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 1283 of file SubProblem.C.

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

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

◆ getCurrentAlgebraicBndNodeRange()

const ConstBndNodeRange & FEProblemBase::getCurrentAlgebraicBndNodeRange ( )

Definition at line 9655 of file FEProblemBase.C.

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

9656 {
9658  return *_mesh.getBoundaryNodeRange();
9659 
9661 }
MooseMesh & _mesh
std::unique_ptr< ConstBndNodeRange > _current_algebraic_bnd_node_range
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1339

◆ getCurrentAlgebraicElementRange()

const ConstElemRange & FEProblemBase::getCurrentAlgebraicElementRange ( )

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

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

Definition at line 9639 of file FEProblemBase.C.

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

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

◆ getCurrentAlgebraicNodeRange()

const ConstNodeRange & FEProblemBase::getCurrentAlgebraicNodeRange ( )

Definition at line 9647 of file FEProblemBase.C.

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

9648 {
9650  return *_mesh.getLocalNodeRange();
9651 
9653 }
std::unique_ptr< libMesh::ConstNodeRange > _current_algebraic_node_range
libMesh::ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1325
MooseMesh & _mesh

◆ getCurrentExecuteOnFlag()

const ExecFlagType & FEProblemBase::getCurrentExecuteOnFlag ( ) const

Return/set the current execution flag.

Returns EXEC_NONE when not being executed.

See also
FEProblemBase::execute

Definition at line 4789 of file FEProblemBase.C.

Referenced by MultiAppGeneralFieldTransfer::acceptPointInOriginMesh(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), 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(), PositionsFunctorValueSampler::initialize(), DistributedPositions::initialize(), TransformedPositions::initialize(), ParsedDownSelectionPositions::initialize(), MultiAppGeneralFieldTransfer::locatePointReceivers(), ComputeUserObjectsThread::printBlockExecutionInformation(), ComputeFVInitialConditionThread::printGeneralExecutionInformation(), ComputeInitialConditionThread::printGeneralExecutionInformation(), ComputeNodalUserObjectsThread::printGeneralExecutionInformation(), ComputeNodalKernelBcsThread::printGeneralExecutionInformation(), ComputeNodalKernelsThread::printGeneralExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeNodalKernelBCJacobiansThread::printGeneralExecutionInformation(), ComputeMarkerThread::printGeneralExecutionInformation(), ComputeNodalDampingThread::printGeneralExecutionInformation(), ComputeDiracThread::printGeneralExecutionInformation(), ComputeIndicatorThread::printGeneralExecutionInformation(), ComputeNodalKernelJacobiansThread::printGeneralExecutionInformation(), ComputeThreadedGeneralUserObjectsThread::printGeneralExecutionInformation(), ComputeUserObjectsThread::printGeneralExecutionInformation(), ComputeLinearFVElementalThread::printGeneralExecutionInformation(), ComputeLinearFVFaceThread::printGeneralExecutionInformation(), NonlinearThread::printGeneralExecutionInformation(), MultiApp::restore(), SolutionInvalidityOutput::shouldOutput(), ElementReporter::shouldStore(), NodalReporter::shouldStore(), and GeneralReporter::shouldStore().

4790 {
4791  return _current_execute_on_flag;
4792 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.

◆ getCurrentICState()

unsigned short FEProblemBase::getCurrentICState ( )

Retrieves the current initial condition state.

Returns
current initial condition state

Definition at line 9698 of file FEProblemBase.C.

Referenced by ComputeInitialConditionThread::operator()().

9699 {
9700  return _current_ic_state;
9701 }
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 }
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseBase.h:388
void mooseDeprecated(Args &&... args) const
Definition: MooseBase.h:314
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
Definition: MooseBase.h:314
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  // This will search the data paths for this relative path
50  std::optional<std::string> error;
51  Moose::DataFileUtils::Path found_path;
52  {
53  // Throw on error so that if getPath() fails, we can throw an error
54  // with the context of _parent.mooseError()
55  Moose::ScopedThrowOnError scoped_throw_on_error;
56 
57  try
58  {
59  found_path = Moose::DataFileUtils::getPath(relative_path);
60  }
61  catch (std::exception & e)
62  {
63  error = e.what();
64  }
65  }
66 
67  if (error)
68  _parent.mooseError(*error);
69 
70  mooseAssert(found_path.context == Moose::DataFileUtils::Context::DATA,
71  "Should only ever obtain data");
72  mooseAssert(found_path.data_name, "Should be set");
73 
74  const std::string msg =
75  "Using data file '" + found_path.path + "' from " + *found_path.data_name + " data";
76  _parent.mooseInfo(msg);
77 
78  return found_path.path;
79 }
void mooseInfo(Args &&... args) const
Definition: MooseBase.h:321
Context context
Context for the file (where it came from)
Definition: DataFileUtils.h:48
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
Scoped helper for setting Moose::_throw_on_error during this scope.
Definition: Moose.h:297
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Definition: MooseBase.h:299
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
const ParallelParamObject & _parent

◆ getDiracElements()

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

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

Implements SubProblem.

Definition at line 2504 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeDiracContributions().

2505 {
2506  // First add in the undisplaced elements
2507  elems = _dirac_kernel_info.getElements();
2508 
2509  if (_displaced_problem)
2510  {
2511  std::set<const Elem *> displaced_elements;
2512  _displaced_problem->getDiracElements(displaced_elements);
2513 
2514  { // Use the ids from the displaced elements to get the undisplaced elements
2515  // and add them to the list
2516  for (const auto & elem : displaced_elements)
2517  elems.insert(_mesh.elemPtr(elem->id()));
2518  }
2519  }
2520 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3193
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:1051

◆ getDiscreteMaterialWarehouse()

const MaterialWarehouse& FEProblemBase::getDiscreteMaterialWarehouse ( ) const
inline

Definition at line 2129 of file FEProblemBase.h.

2129 { return _discrete_materials; }
MaterialWarehouse _discrete_materials

◆ getDisplacedProblem() [1/2]

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

◆ getDisplacedProblem() [2/2]

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

Definition at line 1828 of file FEProblemBase.h.

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

◆ getDistribution()

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

Definition at line 2754 of file FEProblemBase.C.

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

2755 {
2756  std::vector<Distribution *> objs;
2757  theWarehouse()
2758  .query()
2759  .condition<AttribSystem>("Distribution")
2760  .condition<AttribName>(name)
2761  .queryInto(objs);
2762  if (objs.empty())
2763  mooseError("Unable to find Distribution with name '" + name + "'");
2764  return *(objs[0]);
2765 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getEvaluableElementRange()

const ConstElemRange & FEProblemBase::getEvaluableElementRange ( )

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

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

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

Definition at line 854 of file FEProblemBase.C.

Referenced by NodalPatchRecoveryBase::gatherRequestList().

855 {
857  {
858  std::vector<const DofMap *> dof_maps(es().n_systems());
859  for (const auto i : make_range(es().n_systems()))
860  {
861  const auto & sys = es().get_system(i);
862  dof_maps[i] = &sys.get_dof_map();
863  }
865  std::make_unique<ConstElemRange>(_mesh.getMesh().multi_evaluable_elements_begin(dof_maps),
866  _mesh.getMesh().multi_evaluable_elements_end(dof_maps));
867  }
869 }
const T_sys & get_system(std::string_view name) const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3528
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)
inlinevirtual

Definition at line 2261 of file FEProblemBase.h.

2261 { return _app.getExecutor(name); }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
Executor * getExecutor() const
Definition: MooseApp.h:335

◆ getFailNextNonlinearConvergenceCheck()

bool FEProblemBase::getFailNextNonlinearConvergenceCheck ( ) const
inline

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

Definition at line 2649 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
inline

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

Definition at line 2651 of file FEProblemBase.h.

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

bool _fail_next_system_convergence_check

◆ getFunction()

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

Definition at line 2633 of file FEProblemBase.C.

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

2634 {
2635  // This thread lock is necessary since this method will create functions
2636  // for all threads if one is missing.
2637  Threads::spin_mutex::scoped_lock lock(get_function_mutex);
2638 
2639  if (!hasFunction(name, tid))
2640  {
2641  // If we didn't find a function, it might be a default function, attempt to construct one now
2642  std::istringstream ss(name);
2643  Real real_value;
2644 
2645  // First see if it's just a constant. If it is, build a ConstantFunction
2646  if (ss >> real_value && ss.eof())
2647  {
2648  InputParameters params = _factory.getValidParams("ConstantFunction");
2649  params.set<Real>("value") = real_value;
2650  addFunction("ConstantFunction", ss.str(), params);
2651  }
2652  else
2653  {
2655  std::string vars = "x,y,z,t,NaN,pi,e";
2656  if (fp.Parse(name, vars) == -1) // -1 for success
2657  {
2658  // It parsed ok, so build a MooseParsedFunction
2659  InputParameters params = _factory.getValidParams("ParsedFunction");
2660  params.set<std::string>("expression") = name;
2661  addFunction("ParsedFunction", name, params);
2662  }
2663  }
2664 
2665  // Try once more
2666  if (!hasFunction(name, tid))
2667  mooseError("Unable to find function " + name);
2668  }
2669 
2670  auto * const ret = dynamic_cast<Function *>(_functions.getActiveObject(name, tid).get());
2671  if (!ret)
2672  mooseError("No function named ", name, " of appropriate type");
2673 
2674  return *ret;
2675 }
Base class for function objects.
Definition: Function.h:29
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
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...
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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 1219 of file SubProblem.h.

Referenced by FunctorInterface::getFunctorByName().

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

◆ getFVInitialConditionWarehouse()

const FVInitialConditionWarehouse& FEProblemBase::getFVInitialConditionWarehouse ( ) const
inline

Return FVInitialCondition storage.

Definition at line 1929 of file FEProblemBase.h.

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

1929 { 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 
)

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

9340 {
9341  if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
9342  {
9343  auto & this_face_mats =
9345  for (std::shared_ptr<MaterialBase> face_mat : this_face_mats)
9346  if (face_mat->ghostable())
9347  {
9348  face_materials.push_back(face_mat);
9349  auto & var_deps = face_mat->getMooseVariableDependencies();
9350  for (auto * var : var_deps)
9351  {
9352  if (!var->isFV())
9353  mooseError(
9354  "Ghostable materials should only have finite volume variables coupled into them.");
9355  else if (face_mat->hasStatefulProperties())
9356  mooseError("Finite volume materials do not currently support stateful properties.");
9357  variables.insert(var);
9358  }
9359  }
9360  }
9361 
9362  if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
9363  {
9364  auto & this_neighbor_mats =
9366  for (std::shared_ptr<MaterialBase> neighbor_mat : this_neighbor_mats)
9367  if (neighbor_mat->ghostable())
9368  {
9369  neighbor_materials.push_back(neighbor_mat);
9370 #ifndef NDEBUG
9371  auto & var_deps = neighbor_mat->getMooseVariableDependencies();
9372  for (auto * var : var_deps)
9373  {
9374  if (!var->isFV())
9375  mooseError(
9376  "Ghostable materials should only have finite volume variables coupled into them.");
9377  else if (neighbor_mat->hasStatefulProperties())
9378  mooseError("Finite volume materials do not currently support stateful properties.");
9379  auto pr = variables.insert(var);
9380  mooseAssert(!pr.second,
9381  "We should not have inserted any new variables dependencies from our "
9382  "neighbor materials that didn't exist for our face materials");
9383  }
9384 #endif
9385  }
9386  }
9387 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
MaterialWarehouse _materials

◆ getHitNode()

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

Definition at line 136 of file MooseBase.h.

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

136 { return getHitNode(_pars); }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
const hit::Node * getHitNode() const
Definition: MooseBase.h:136

◆ getIndicatorWarehouse()

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

Return indicator/marker storage.

Definition at line 1913 of file FEProblemBase.h.

1913 { return _indicators; }
MooseObjectWarehouse< Indicator > _indicators

◆ getInitialConditionWarehouse()

const InitialConditionWarehouse& FEProblemBase::getInitialConditionWarehouse ( ) const
inline

Return InitialCondition storage.

Definition at line 1924 of file FEProblemBase.h.

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

1924 { return _ics; }
InitialConditionWarehouse _ics

◆ getInterfaceMaterialsWarehouse()

const MaterialWarehouse& FEProblemBase::getInterfaceMaterialsWarehouse ( ) const
inline

Definition at line 2130 of file FEProblemBase.h.

2130 { return _interface_materials; }
MaterialWarehouse _interface_materials

◆ getInternalSideIndicatorWarehouse()

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

Definition at line 1914 of file FEProblemBase.h.

1915  {
1917  }
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators

◆ getKokkosBndMaterialPropertyStorage()

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

Definition at line 1898 of file FEProblemBase.h.

1899  {
1901  }
Moose::Kokkos::MaterialPropertyStorage & _kokkos_bnd_material_props

◆ getKokkosFunction() [1/2]

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

Get a Kokkos function in an abstract type.

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

◆ getKokkosFunction() [2/2]

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

Get a Kokkos function in a concrete type.

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

Definition at line 3603 of file FEProblemBase.h.

3604 {
3605  if (!hasKokkosFunction(name))
3606  {
3607  // If we didn't find a function, it might be a default function, attempt to construct one now
3608  std::istringstream ss(name);
3609  Real real_value;
3610 
3611  // First see if it's just a constant. If it is, build a ConstantFunction
3612  if (ss >> real_value && ss.eof())
3613  {
3614  InputParameters params = _factory.getValidParams("KokkosConstantFunction");
3615  params.set<Real>("value") = real_value;
3616  addKokkosFunction("KokkosConstantFunction", ss.str(), params);
3617  }
3618 
3619  // Try once more
3620  if (!hasKokkosFunction(name))
3621  mooseError("Unable to find Kokkos function '" + name, "'");
3622  }
3623 
3624  auto * const ret = dynamic_cast<T *>(_kokkos_functions.getActiveObject(name).get());
3625  if (!ret)
3626  mooseError("No Kokkos function named '", name, "' of appropriate type");
3627 
3628  return *ret;
3629 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1049
virtual bool hasKokkosFunction(const std::string &name)
Get whether a Kokkos function exists.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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...
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void addKokkosFunction(const std::string &type, const std::string &name, InputParameters &parameters)
Add a Kokkos function to the problem.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getKokkosMaterialData()

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

Referenced by BlockRestrictable::initializeBlockRestrictable().

◆ getKokkosMaterialPropertyStorage()

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

Definition at line 1894 of file FEProblemBase.h.

1895  {
1896  return _kokkos_material_props;
1897  }
Moose::Kokkos::MaterialPropertyStorage & _kokkos_material_props

◆ getKokkosMaterialPropertyStorageConsumers()

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

◆ getKokkosMaterialsWarehouse()

const MaterialWarehouse& FEProblemBase::getKokkosMaterialsWarehouse ( ) const
inline

Definition at line 2136 of file FEProblemBase.h.

2136 { return _kokkos_materials; }
MaterialWarehouse _kokkos_materials

◆ getKokkosNeighborMaterialPropertyStorage()

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

Definition at line 1902 of file FEProblemBase.h.

1903  {
1905  }
Moose::Kokkos::MaterialPropertyStorage & _kokkos_neighbor_material_props

◆ getKokkosSystem() [1/2]

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

Get the Kokkos system of a specified number that is associated with MOOSE nonlinear and auxiliary systems.

Parameters
sys_numThe system number
Returns
The Kokkos system{@

◆ getKokkosSystem() [2/2]

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

◆ getKokkosSystems() [1/2]

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

Get all Kokkos systems that are associated with MOOSE nonlinear and auxiliary systems.

Returns
The array of Kokkos systems{@

Definition at line 830 of file FEProblemBase.h.

830 { return _kokkos_systems; }
Moose::Kokkos::Array< Moose::Kokkos::System > _kokkos_systems

◆ getKokkosSystems() [2/2]

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

Definition at line 831 of file FEProblemBase.h.

832  {
833  return _kokkos_systems;
834  }
Moose::Kokkos::Array< Moose::Kokkos::System > _kokkos_systems

◆ getLinearConvergenceNames()

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

Gets the linear convergence object name(s).

Definition at line 9443 of file FEProblemBase.C.

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

9444 {
9446  return *_linear_convergence_names;
9447  mooseError("The linear convergence name(s) have not been set.");
9448 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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)
inline

Get non-constant reference to a linear system.

Parameters
sys_numThe number of the linear system

Definition at line 3519 of file FEProblemBase.h.

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

3520 {
3521  mooseAssert(sys_num < _linear_systems.size(),
3522  "System number greater than the number of linear systems");
3523  return *_linear_systems[sys_num];
3524 }
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
inline

Get a constant reference to a linear system.

Parameters
sys_numThe number of the linear system

Definition at line 3527 of file FEProblemBase.h.

3528 {
3529  mooseAssert(sys_num < _linear_systems.size(),
3530  "System number greater than the number of linear systems");
3531  return *_linear_systems[sys_num];
3532 }
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ getLinearSystemNames()

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

Definition at line 2730 of file FEProblemBase.h.

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

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

◆ getLineSearch()

LineSearch* FEProblemBase::getLineSearch ( )
inlineoverridevirtual

getter for the MOOSE line search

Implements SubProblem.

Definition at line 790 of file FEProblemBase.h.

Referenced by DisplacedProblem::getLineSearch().

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

◆ getMarkerWarehouse()

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

Definition at line 1918 of file FEProblemBase.h.

1918 { 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 
)

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

Referenced by MaterialPropertyInterface::getMaterialByName().

3893 {
3894  switch (type)
3895  {
3897  name += "_neighbor";
3898  break;
3900  name += "_face";
3901  break;
3902  default:
3903  break;
3904  }
3905 
3906  std::shared_ptr<MaterialBase> material = _all_materials[type].getActiveObject(name, tid);
3907  if (!no_warn && material->getParam<bool>("compute") && type == Moose::BLOCK_MATERIAL_DATA)
3908  mooseWarning("You are retrieving a Material object (",
3909  material->name(),
3910  "), but its compute flag is set to true. This indicates that MOOSE is "
3911  "computing this property which may not be desired and produce un-expected "
3912  "results.");
3913 
3914  return material;
3915 }
void mooseWarning(Args &&... args) const
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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:93
MaterialWarehouse _all_materials

◆ getMaterialData()

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

Definition at line 3918 of file FEProblemBase.C.

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

3921 {
3922  switch (type)
3923  {
3925  if (object)
3926  _material_props.addConsumer(type, object);
3927  return _material_props.getMaterialData(tid);
3929  if (object)
3935  if (object)
3938  }
3939 
3940  mooseError("FEProblemBase::getMaterialData(): Invalid MaterialDataType ", type);
3941 }
MaterialPropertyStorage & _bnd_material_props
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
void addConsumer(Moose::MaterialDataType type, const MooseObject *object)
Add object as the consumer of storage of type type.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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 490 of file SubProblem.C.

Referenced by MaterialPropertyInterface::getMaterialPropertyBlockNames().

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

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

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

475 {
476  std::set<SubdomainID> blocks;
477 
478  for (const auto & it : _map_block_material_props)
479  {
480  const std::set<std::string> & prop_names = it.second;
481  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
482  if (name_it != prop_names.end())
483  blocks.insert(it.first);
484  }
485 
486  return blocks;
487 }
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:1054

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

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

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

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

Referenced by MaterialPropertyInterface::getMaterialPropertyBoundaryNames().

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

Definition at line 1876 of file FEProblemBase.h.

Referenced by MaterialBase::checkStatefulSanity().

1877  {
1878  return _material_prop_registry;
1879  }
MaterialPropertyRegistry _material_prop_registry

◆ getMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getMaterialPropertyStorage ( )
inline

Return a reference to the material property storage.

Returns
A const reference to the material property storage

Definition at line 1886 of file FEProblemBase.h.

1886 { return _material_props; }
MaterialPropertyStorage & _material_props

◆ getMaterialPropertyStorageConsumers()

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

Definition at line 3944 of file FEProblemBase.C.

3945 {
3946  switch (type)
3947  {
3956  }
3957 
3958  mooseError("FEProblemBase::getMaterialPropertyStorageConsumers(): Invalid MaterialDataType ",
3959  type);
3960 }
MaterialPropertyStorage & _bnd_material_props
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
const std::set< const MooseObject * > & getConsumers(Moose::MaterialDataType type) const
MaterialPropertyStorage & _neighbor_material_props
MaterialPropertyStorage & _material_props

◆ getMaterialWarehouse()

const MaterialWarehouse& FEProblemBase::getMaterialWarehouse ( ) const
inline

◆ getMatrixTagID()

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

Get a TagID from a TagName.

Reimplemented in DisplacedProblem.

Definition at line 343 of file SubProblem.C.

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

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

◆ 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(), computeJacobian(), EigenProblem::computeJacobianAB(), NonlinearSystemBase::computeJacobianBlocks(), EigenProblem::computeJacobianTag(), computeLinearSystemSys(), and 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:1043

◆ getMaxQps()

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

Definition at line 1650 of file FEProblemBase.C.

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

1651 {
1653  mooseError("Max QPS uninitialized");
1654  return _max_qps;
1655 }
auto max(const L &left, const R &right)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
unsigned int _max_qps
Maximum number of quadrature points used in the problem.

◆ getMaxScalarOrder()

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

Definition at line 1658 of file FEProblemBase.C.

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

1659 {
1660  return _max_scalar_order;
1661 }
libMesh::Order _max_scalar_order
Maximum scalar variable order.

◆ getMeshDivision()

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

Get a MeshDivision.

Definition at line 2715 of file FEProblemBase.C.

Referenced by NestedDivision::NestedDivision().

2716 {
2717  auto * const ret = dynamic_cast<MeshDivision *>(_mesh_divisions.getActiveObject(name, tid).get());
2718  if (!ret)
2719  mooseError("No MeshDivision object named ", name, " of appropriate type");
2720  return *ret;
2721 }
Base class for MeshDivision objects.
Definition: MeshDivision.h:35
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getMooseApp()

MooseApp& MooseBase::getMooseApp ( ) const
inlineinherited

Get the MooseApp this class is associated with.

Definition at line 87 of file MooseBase.h.

Referenced by ChainControlSetupAction::act(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), advanceState(), ParsedChainControl::buildFunction(), ReporterTransferInterface::checkHasReporterValue(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), Coupleable::checkWritableVar(), ComponentPhysicsInterface::ComponentPhysicsInterface(), Coupleable::Coupleable(), MortarInterfaceWarehouse::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(), MultiApp::restore(), and VectorPostprocessorInterface::vectorPostprocessorsAdded().

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

◆ 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

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

Definition at line 8107 of file FEProblemBase.C.

8111 {
8112  return _mortar_data->getMortarInterface(
8113  primary_secondary_boundary_pair, primary_secondary_subdomain_pair, on_displaced);
8114 }
std::unique_ptr< MortarInterfaceWarehouse > _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 
)

Definition at line 8117 of file FEProblemBase.C.

8121 {
8122  return _mortar_data->getMortarInterface(
8123  primary_secondary_boundary_pair, primary_secondary_subdomain_pair, on_displaced);
8124 }
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data

◆ getMortarInterfaces()

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

Definition at line 9732 of file FEProblemBase.C.

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

9733 {
9734  return _mortar_data->getMortarInterfaces(on_displaced);
9735 }
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data

◆ getMortarUserObjects() [1/2]

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

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

Definition at line 9539 of file FEProblemBase.C.

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

9543 {
9544  std::vector<MortarUserObject *> mortar_uos;
9545  auto * const subproblem = displaced ? static_cast<SubProblem *>(_displaced_problem.get())
9546  : static_cast<SubProblem *>(this);
9547  for (auto * const obj : mortar_uo_superset)
9548  if (obj->onInterface(primary_boundary_id, secondary_boundary_id) &&
9549  (&obj->getSubProblem() == subproblem))
9550  mortar_uos.push_back(obj);
9551 
9552  return mortar_uos;
9553 }
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ getMortarUserObjects() [2/2]

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

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

Definition at line 9556 of file FEProblemBase.C.

9559 {
9560  std::vector<MortarUserObject *> mortar_uos;
9561  theWarehouse()
9562  .query()
9564  .queryInto(mortar_uos);
9565  return getMortarUserObjects(primary_boundary_id, secondary_boundary_id, displaced, mortar_uos);
9566 }
TheWarehouse & theWarehouse() const
std::vector< MortarUserObject * > getMortarUserObjects(BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced, const std::vector< MortarUserObject *> &mortar_uo_superset)
Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID...
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

◆ getMultiApp()

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

Get a MultiApp object by name.

Definition at line 5547 of file FEProblemBase.C.

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

5548 {
5549  return _multi_apps.getObject(multi_app_name);
5550 }
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

Gets the MultiApp fixed point convergence object name.

Definition at line 9451 of file FEProblemBase.C.

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

9452 {
9455  else
9456  mooseError("The fixed point convergence name has not been set.");
9457 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getMultiAppTransferWarehouse()

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

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

Definition at line 5642 of file FEProblemBase.C.

5643 {
5644  if (direction == MultiAppTransfer::TO_MULTIAPP)
5645  return _to_multi_app_transfers;
5646  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
5648  else
5650 }
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 ( )
inline

Definition at line 2333 of file FEProblemBase.h.

Referenced by MooseApp::errorCheck().

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

◆ getNeighborMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getNeighborMaterialPropertyStorage ( )
inline

Definition at line 1888 of file FEProblemBase.h.

1889  {
1890  return _neighbor_material_props;
1891  }
MaterialPropertyStorage & _neighbor_material_props

◆ getNonlinearConvergenceNames()

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

Gets the nonlinear system convergence object name(s).

Definition at line 9419 of file FEProblemBase.C.

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

9420 {
9423  mooseError("The nonlinear system convergence name(s) have not been set.");
9424 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getNonlinearEvaluableElementRange()

const ConstElemRange & FEProblemBase::getNonlinearEvaluableElementRange ( )

Definition at line 872 of file FEProblemBase.C.

Referenced by ElemSideNeighborLayersTester::execute().

873 {
875  {
876  std::vector<const DofMap *> dof_maps(_nl.size());
877  for (const auto i : index_range(dof_maps))
878  dof_maps[i] = &_nl[i]->dofMap();
880  std::make_unique<ConstElemRange>(_mesh.getMesh().multi_evaluable_elements_begin(dof_maps),
881  _mesh.getMesh().multi_evaluable_elements_end(dof_maps));
882  }
883 
885 }
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:3528
MooseMesh & _mesh
auto index_range(const T &sizable)

◆ getNonlinearSystem()

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

Reimplemented in FEProblem.

Definition at line 2730 of file FEProblemBase.C.

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

2731 {
2732  mooseDeprecated("FEProblemBase::getNonlinearSystem() is deprecated, please use "
2733  "FEProblemBase::getNonlinearSystemBase() \n");
2734 
2735  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
2736  auto nl_sys = std::dynamic_pointer_cast<NonlinearSystem>(_nl[sys_num]);
2737 
2738  if (!nl_sys)
2739  mooseError("This is not a NonlinearSystem");
2740 
2741  return *nl_sys;
2742 }
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.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
void mooseDeprecated(Args &&... args) const
Nonlinear system to be solved.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getNonlinearSystemBase() [1/2]

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

Definition at line 3475 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().

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

◆ getNonlinearSystemBase() [2/2]

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

Definition at line 3482 of file FEProblemBase.h.

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

◆ getNonlinearSystemNames()

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

Definition at line 2726 of file FEProblemBase.h.

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

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

◆ getNumCyclesCompleted()

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

Definition at line 1954 of file FEProblemBase.h.

1954 { return _cycles_completed; }
unsigned int _cycles_completed

◆ getParam() [1/2]

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

Retrieve a parameter for the object.

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

Definition at line 388 of file MooseBase.h.

Referenced by CreateDisplacedProblemAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), addOutput(), DiffusionPhysicsBase::addPostprocessors(), ArrayParsedAux::ArrayParsedAux(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), Boundary2DDelaunayGenerator::Boundary2DDelaunayGenerator(), ComponentPhysicsInterface::ComponentPhysicsInterface(), FunctorAux::computeValue(), Console::Console(), createTagSolutions(), CutMeshByLevelSetGenerator::CutMeshByLevelSetGenerator(), DebugResidualAux::DebugResidualAux(), AccumulateReporter::declareLateValues(), DerivativeParsedMaterialTempl< is_ad >::DerivativeParsedMaterialTempl(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenKernel::EigenKernel(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), FEProblemSolve::FEProblemSolve(), ParsedVectorReporter::finalize(), 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(), GeometricSearchInterface::GeometricSearchInterface(), 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(), SampledOutput::initSample(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MooseMesh::MooseMesh(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MultiSystemSolveObject::MultiSystemSolveObject(), NEML2ModelExecutor::NEML2ModelExecutor(), NestedDivision::NestedDivision(), PerfGraphOutput::output(), Console::outputSystemInformation(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedGenerateNodeset::ParsedGenerateNodeset(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterialTempl< is_ad >::ParsedMaterialTempl(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), ParsedReporterBase::ParsedReporterBase(), ParsedVectorReporter::ParsedVectorReporter(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseConstantByBlockMaterialTempl< is_ad >::PiecewiseConstantByBlockMaterialTempl(), ReferenceResidualInterface::ReferenceResidualInterface(), RenameBlockGenerator::RenameBlockGenerator(), Moose::FV::setInterpolationMethod(), SetupMeshAction::setupMesh(), Output::setWallTimeIntervalFromCommandLineParam(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), and VectorOfPostprocessors::VectorOfPostprocessors().

389 {
390  return InputParameters::getParamHelper<T>(name, _pars);
391 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103

◆ getParam() [2/2]

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

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

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

Definition at line 425 of file MooseBase.h.

426 {
427  return _pars.get<T1, T2>(param1, param2);
428 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
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.

◆ getPetscOptions()

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

◆ getPositionsObject()

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

Get the Positions object by its name.

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

Definition at line 4611 of file FEProblemBase.C.

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

4612 {
4613  std::vector<Positions *> objs;
4614  theWarehouse()
4615  .query()
4616  .condition<AttribSystem>("UserObject")
4617  .condition<AttribName>(name)
4618  .queryInto(objs);
4619  if (objs.empty())
4620  mooseError("Unable to find Positions object with name '" + name + "'");
4621  mooseAssert(objs.size() == 1, "Should only find one Positions");
4622  return *(objs[0]);
4623 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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

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 4645 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(), Exodus::outputPostprocessors(), TableOutput::outputPostprocessorsRow(), EigenProblem::postScaleEigenVector(), and TableOutput::shouldOutputPostprocessorsRow().

4647 {
4649  t_index);
4650 }
ReporterData _reporter_data
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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:230
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:143

◆ getRegularMaterialsWarehouse()

const MaterialWarehouse& FEProblemBase::getRegularMaterialsWarehouse ( ) const
inline

Definition at line 2128 of file FEProblemBase.h.

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

2128 { return _materials; }
MaterialWarehouse _materials

◆ getRenamedParam()

template<typename T >
const T & MooseBase::getRenamedParam ( const std::string &  old_name,
const std::string &  new_name 
) const
inherited

Retrieve a renamed parameter for the object.

This helper makes sure we check both names before erroring, and that only one parameter is passed to avoid silent errors

Parameters
old_namethe old name for the parameter
new_namethe new name for the parameter

Definition at line 402 of file MooseBase.h.

403 {
404  // Most important: accept new parameter
405  if (isParamSetByUser(new_name) && !isParamValid(old_name))
406  return getParam<T>(new_name);
407  // Second most: accept old parameter
408  if (isParamValid(old_name) && !isParamSetByUser(new_name))
409  return getParam<T>(old_name);
410  // Third most: accept default for new parameter
411  if (isParamValid(new_name) && !isParamValid(old_name))
412  return getParam<T>(new_name);
413  // Refuse: no default, no value passed
414  if (!isParamValid(old_name) && !isParamValid(new_name))
415  mooseError("parameter '" + new_name +
416  "' is being retrieved without being set.\nDid you misspell it?");
417  // Refuse: both old and new parameters set by user
418  else
419  mooseError("Parameter '" + new_name + "' may not be provided alongside former parameter '" +
420  old_name + "'");
421 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:199
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
Definition: MooseBase.h:205

◆ getReporterData() [1/2]

const ReporterData& FEProblemBase::getReporterData ( ) const
inline

Provides const access the ReporterData object.

NOTE: There is a private non-const version of this function that uses a key object only constructable by the correct interfaces. This was done by design to encourage the use of the Reporter and ReporterInterface classes.

Definition at line 1295 of file FEProblemBase.h.

Referenced by ReporterTransferInterface::addReporterTransferMode(), ReporterTransferInterface::checkHasReporterValue(), ReporterTransferInterface::clearVectorReporter(), ConstantPostprocessor::ConstantPostprocessor(), AccumulateReporter::declareAccumulateHelper(), ReporterTransferInterface::declareClone(), AccumulateReporter::declareLateValues(), VectorPostprocessor::declareVector(), ReporterTransferInterface::declareVectorClone(), 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().

1295 { return _reporter_data; }
ReporterData _reporter_data

◆ getReporterData() [2/2]

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

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

see ReporterData.h

Definition at line 1302 of file FEProblemBase.h.

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

295 {
296  return declareRestartableDataHelper<T>(data_name, nullptr).get();
297 }

◆ getRestartableEquationSystems()

const RestartableEquationSystems & FEProblemBase::getRestartableEquationSystems ( ) const

Get the RestartableEquationSystems object.

Definition at line 6025 of file FEProblemBase.C.

6026 {
6027  return _req.get();
6028 }
const T & get() const
Get the restartable value.
Definition: Restartable.h:58
Restartable::ManagedValue< RestartableEquationSystems > _req
The EquationSystems object, wrapped for restart.

◆ getSampler()

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

Definition at line 2778 of file FEProblemBase.C.

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

2779 {
2780  std::vector<Sampler *> objs;
2781  theWarehouse()
2782  .query()
2783  .condition<AttribSystem>("Sampler")
2784  .condition<AttribThread>(tid)
2785  .condition<AttribName>(name)
2786  .queryInto(objs);
2787  if (objs.empty())
2788  mooseError(
2789  "Unable to find Sampler with name '" + name +
2790  "', if you are attempting to access this object in the constructor of another object then "
2791  "the object being retrieved must occur prior to the caller within the input file.");
2792  return *(objs[0]);
2793 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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 
)
overridevirtual

Returns the scalar variable reference from whichever system contains it.

Implements SubProblem.

Definition at line 6001 of file FEProblemBase.C.

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

6002 {
6003  for (auto & sys : _solver_systems)
6004  if (sys->hasScalarVariable(var_name))
6005  return sys->getScalarVariable(tid, var_name);
6006  if (_aux->hasScalarVariable(var_name))
6007  return _aux->getScalarVariable(tid, var_name);
6008 
6009  mooseError("Unknown variable " + var_name);
6010 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

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

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

73 {
74  try
75  {
76  return shared_from_this();
77  }
78  catch (std::bad_weak_ptr &)
79  {
80  mooseError(not_shared_error);
81  }
82 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getSharedPtr() [2/2]

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

Definition at line 85 of file MooseObject.C.

86 {
87  try
88  {
89  return shared_from_this();
90  }
91  catch (std::bad_weak_ptr &)
92  {
93  mooseError(not_shared_error);
94  }
95 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getSolverSystem() [1/2]

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

Get non-constant reference to a solver system.

Parameters
sys_numThe number of the solver system

Definition at line 3489 of file FEProblemBase.h.

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

3490 {
3491  mooseAssert(sys_num < _solver_systems.size(),
3492  "System number greater than the number of solver systems");
3493  return *_solver_systems[sys_num];
3494 }
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
inline

Get a constant reference to a solver system.

Parameters
sys_numThe number of the solver system

Definition at line 3497 of file FEProblemBase.h.

3498 {
3499  mooseAssert(sys_num < _solver_systems.size(),
3500  "System number greater than the number of solver systems");
3501  return *_solver_systems[sys_num];
3502 }
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
inline
Returns
the solver system names in the problem

Definition at line 2734 of file FEProblemBase.h.

Referenced by ConsoleUtils::outputExecutionInformation().

2734 { 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 
)
overridevirtual

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

Implements SubProblem.

Definition at line 5941 of file FEProblemBase.C.

Referenced by CoupleableMooseVariableDependencyIntermediateInterface::coupledValueByName(), projectFunctionOnCustomRange(), LinearFVKernel::requestVariableCellGradient(), and ElementSubdomainModifierBase::storeOverriddenDofValues().

5942 {
5943  for (auto & sys : _solver_systems)
5944  if (sys->hasVariable(var_name))
5945  return sys->getFieldVariable<Real>(tid, var_name);
5946  if (_aux->hasVariable(var_name))
5947  return _aux->getFieldVariable<Real>(tid, var_name);
5948 
5949  mooseError("Unknown variable " + var_name);
5950 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getSteadyStateConvergenceName()

const ConvergenceName & FEProblemBase::getSteadyStateConvergenceName ( ) const

Gets the steady-state detection convergence object name.

Definition at line 9460 of file FEProblemBase.C.

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

9461 {
9463  return _steady_state_convergence_name.value();
9464  else
9465  mooseError("The steady convergence name has not been set.");
9466 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getSystem()

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

Returns the equation system containing the variable provided.

Implements SubProblem.

Definition at line 6013 of file FEProblemBase.C.

Referenced by addObjectParamsHelper(), MultiApp::appTransferVector(), ElementSubdomainModifierBase::gatherPatchElements(), projectFunctionOnCustomRange(), and ElementSubdomainModifierBase::storeOverriddenDofValues().

6014 {
6015  const auto [var_in_sys, sys_num] = determineSolverSystem(var_name);
6016  if (var_in_sys)
6017  return _solver_systems[sys_num]->system();
6018  else if (_aux->hasVariable(var_name) || _aux->hasScalarVariable(var_name))
6019  return _aux->system();
6020  else
6021  mooseError("Unable to find a system containing the variable " + var_name);
6022 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getSystemBase() [1/3]

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

Get constant reference to a system in this problem.

Parameters
sys_numThe number of the system

Definition at line 9173 of file FEProblemBase.C.

Referenced by addObjectParamsHelper(), PhysicsBase::copyVariablesFromMesh(), getSystemBase(), projectFunctionOnCustomRange(), and ElementSubdomainModifierBase::restoreOverriddenDofValues().

9174 {
9175  if (sys_num < _solver_systems.size())
9176  return *_solver_systems[sys_num];
9177 
9178  return *_aux;
9179 }
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/3]

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

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

Parameters
sys_numThe number of the system

Definition at line 9194 of file FEProblemBase.C.

9195 {
9196  if (sys_num < _solver_systems.size())
9197  return *_solver_systems[sys_num];
9198 
9199  return *_aux;
9200 }
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() [3/3]

SystemBase & FEProblemBase::getSystemBase ( const std::string &  sys_name)

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

Parameters
sys_nameThe name of the system

Definition at line 9182 of file FEProblemBase.C.

9183 {
9184  if (std::find(_solver_sys_names.begin(), _solver_sys_names.end(), sys_name) !=
9185  _solver_sys_names.end())
9186  return getSystemBase(solverSysNum(sys_name));
9187  else if (sys_name == "aux0")
9188  return *_aux;
9189  else
9190  mooseError("System '" + sys_name + "' was requested from problem but does not exist.");
9191 }
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:42
std::vector< SolverSystemName > _solver_sys_names
The union of nonlinear and linear system names.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
virtual const SystemBase & getSystemBase(const unsigned int sys_num) const
Get constant reference to a system in this problem.
unsigned int solverSysNum(const SolverSystemName &solver_sys_name) const override
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getTimeFromStateArg()

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

Returns the time associated with the requested state.

Definition at line 6993 of file FEProblemBase.C.

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

6994 {
6996  // If we are any iteration type other than time (e.g. nonlinear), then temporally we are still
6997  // in the present time
6998  return time();
6999 
7000  switch (state.state)
7001  {
7002  case 0:
7003  return time();
7004 
7005  case 1:
7006  return timeOld();
7007 
7008  default:
7009  mooseError("Unhandled state ", state.state, " in FEProblemBase::getTimeFromStateArg");
7010  }
7011 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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

Get Transfers by ExecFlagType and direction.

Definition at line 5620 of file FEProblemBase.C.

5621 {
5622  if (direction == MultiAppTransfer::TO_MULTIAPP)
5624  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
5626  else
5628 }
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:93
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

Definition at line 5631 of file FEProblemBase.C.

5632 {
5633  if (direction == MultiAppTransfer::TO_MULTIAPP)
5635  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
5637  else
5639 }
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.

◆ getUserObject()

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

Get the user object by its name.

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

Definition at line 1322 of file FEProblemBase.h.

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

1323  {
1324  std::vector<T *> objs;
1325  theWarehouse()
1326  .query()
1327  .condition<AttribSystem>("UserObject")
1328  .condition<AttribThread>(tid)
1329  .condition<AttribName>(name)
1330  .queryInto(objs);
1331  if (objs.empty())
1332  mooseError("Unable to find user object with name '" + name + "'");
1333  return *(objs[0]);
1334  }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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

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

Referenced by MFEMProblem::addBoundaryCondition(), MFEMProblem::addKernel(), addPostprocessor(), addReporter(), addVectorPostprocessor(), 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().

4596 {
4597  std::vector<UserObject *> objs;
4598  theWarehouse()
4599  .query()
4600  .condition<AttribSystem>("UserObject")
4601  .condition<AttribThread>(tid)
4602  .condition<AttribName>(name)
4603  .queryInto(objs);
4604  if (objs.empty())
4605  mooseError("Unable to find user object with name '" + name + "'");
4606  mooseAssert(objs.size() == 1, "Should only find one UO");
4607  return *(objs[0]);
4608 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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
inline

Definition at line 330 of file FEProblemBase.h.

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

331  {
332  return _uo_jacobian_moose_vars[tid];
333  }
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars

◆ getUserObjects()

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

Definition at line 1309 of file FEProblemBase.h.

1310  {
1312  "This function is deprecated, use theWarehouse().query() to construct a query instead");
1313  return _all_user_objects;
1314  }
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
void mooseDeprecated(Args &&... args) const

◆ getVariable() [1/4]

virtual const MooseVariableFieldBase& SubProblem::getVariable

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
inline

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
overridevirtual

Returns the variable reference for requested variable which must be of the expected_var_type (Nonlinear vs.

Auxiliary) and expected_var_field_type (standard, scalar, vector). The default values of VAR_ANY and VAR_FIELD_ANY should be used when "any" type of variable is acceptable. Throws an error if the variable in question is not in the expected System or of the expected type.

Implements SubProblem.

Definition at line 5931 of file FEProblemBase.C.

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

5935 {
5936  return getVariableHelper(
5937  tid, var_name, expected_var_type, expected_var_field_type, _solver_systems, *_aux);
5938 }
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 819 of file SubProblem.C.

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

◆ 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 getVariable().

◆ getVariableNames()

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

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

Definition at line 8925 of file FEProblemBase.C.

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

8926 {
8927  std::vector<VariableName> names;
8928 
8929  for (auto & sys : _solver_systems)
8930  {
8931  const std::vector<VariableName> & var_names = sys->getVariableNames();
8932  names.insert(names.end(), var_names.begin(), var_names.end());
8933  }
8934 
8935  const std::vector<VariableName> & aux_var_names = _aux->getVariableNames();
8936  names.insert(names.end(), aux_var_names.begin(), aux_var_names.end());
8937 
8938  return names;
8939 }
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

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

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

4691 {
4692  return getUserObject<VectorPostprocessor>(object_name, tid);
4693 }

◆ getVectorPostprocessorValueByName()

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

Get a read-only reference to the vector value associated with the VectorPostprocessor.

Parameters
object_nameThe name of the VPP object.
vector_nameThe namve of the decalred vector within the object.
Returns
Referent to the vector of data.

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

Definition at line 4670 of file FEProblemBase.C.

Referenced by HistogramVectorPostprocessor::execute().

4673 {
4675  VectorPostprocessorReporterName(object_name, vector_name), t_index);
4676 }
A ReporterName that represents a VectorPostprocessor.
Definition: ReporterName.h:152
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:231

◆ getVectorTag()

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

Get a VectorTag from a TagID.

Reimplemented in DisplacedProblem.

Definition at line 162 of file SubProblem.C.

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

163 {
164  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
165 
166  if (!vectorTagExists(tag_id))
167  mooseError("Vector tag with ID ", tag_id, " does not exist");
168 
169  return _vector_tags[tag_id];
170 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1172
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:242
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getVectorTagID()

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

Get a TagID from a TagName.

Reimplemented in DisplacedProblem.

Definition at line 204 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(), TagVectorAux::TagVectorAux(), MultiAppDofCopyTransfer::transfer(), TaggingInterface::useVectorTag(), Coupleable::vectorTagDofValueHelper(), and Coupleable::vectorTagValueHelper().

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

◆ getVectorTags() [1/2]

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

Definition at line 173 of file SubProblem.C.

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

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

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

186 {
187  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
188 
190  return _vector_tags;
191  else
192  return _typed_vector_tags[type];
193 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1172
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:242
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
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:1179

◆ getVectorVariable()

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

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

Implements SubProblem.

Definition at line 5965 of file FEProblemBase.C.

5966 {
5967  for (auto & sys : _solver_systems)
5968  if (sys->hasVariable(var_name))
5969  return sys->getFieldVariable<RealVectorValue>(tid, var_name);
5970  if (_aux->hasVariable(var_name))
5971  return _aux->getFieldVariable<RealVectorValue>(tid, var_name);
5972 
5973  mooseError("Unknown variable " + var_name);
5974 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ getXFEM()

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

Get a pointer to the XFEM controller object.

Definition at line 1971 of file FEProblemBase.h.

1971 { 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:1095

◆ ghostGhostedBoundaries()

void FEProblemBase::ghostGhostedBoundaries ( )
overridevirtual

Causes the boundaries added using addGhostedBoundary to actually be ghosted.

Implements SubProblem.

Definition at line 2158 of file FEProblemBase.C.

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

2159 {
2160  TIME_SECTION("ghostGhostedBoundaries", 3, "Ghosting Ghosted Boundaries");
2161 
2163 
2164  if (_displaced_problem)
2166 }
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:3394
MooseMesh * _displaced_mesh

◆ handleException()

void FEProblemBase::handleException ( const std::string &  calling_method)
private

Handle exceptions.

Note that the result of this call will be a thrown MooseException. The caller of this method must determine how to handle the thrown exception

Definition at line 7385 of file FEProblemBase.C.

Referenced by computeBounds(), computeJacobianTags(), computeResidualAndJacobian(), computeResidualTags(), and computeUserObjectsInternal().

7386 {
7387  auto create_exception_message =
7388  [&calling_method](const std::string & exception_type, const auto & exception)
7389  {
7390  return std::string("A " + exception_type + " was raised during FEProblemBase::" +
7391  calling_method + "\n" + std::string(exception.what()));
7392  };
7393 
7394  try
7395  {
7396  throw;
7397  }
7398  catch (const MooseException & e)
7399  {
7400  setException(create_exception_message("MooseException", e));
7401  }
7402  catch (const MetaPhysicL::LogicError & e)
7403  {
7405  }
7406  catch (const libMesh::PetscSolverException & e)
7407  {
7408  // One PETSc solver exception that we cannot currently recover from are new nonzero errors. In
7409  // particular I have observed the following scenario in a parallel test:
7410  // - Both processes throw because of a new nonzero during MOOSE's computeJacobianTags
7411  // - We potentially handle the exceptions nicely here
7412  // - When the matrix is closed in libMesh's libmesh_petsc_snes_solver, there is a new nonzero
7413  // throw which we do not catch here in MOOSE and the simulation terminates. This only appears
7414  // in parallel (and not all the time; a test I was examining threw with distributed mesh, but
7415  // not with replicated). In serial there are no new throws from libmesh_petsc_snes_solver.
7416  // So for uniformity of behavior across serial/parallel, we will choose to abort here and always
7417  // produce a non-zero exit code
7418  mooseError(create_exception_message("libMesh::PetscSolverException", e));
7419  }
7420  catch (const std::exception & e)
7421  {
7422  // This might be libMesh detecting a degenerate Jacobian or matrix
7423  if (strstr(e.what(), "Jacobian") || strstr(e.what(), "singular") ||
7424  strstr(e.what(), "det != 0"))
7425  setException(create_exception_message("libMesh DegenerateMap", e));
7426  else
7427  {
7428  const auto message = create_exception_message("std::exception", e);
7430  mooseError(message);
7431  else
7432  setException(message);
7433  }
7434  }
7435 
7437 }
const bool _regard_general_exceptions_as_errors
If we catch an exception during residual/Jacobian evaluaton for which we don&#39;t have specific handling...
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...
void translateMetaPhysicLError(const MetaPhysicL::LogicError &)
emit a relatively clear error message when we catch a MetaPhysicL logic error
Definition: MooseError.C:141
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class...
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

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

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

462 {
464 }
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:1081

◆ hasActiveMaterialProperties()

bool FEProblemBase::hasActiveMaterialProperties ( const THREAD_ID  tid) const

Method to check whether or not a list of active material roperties has been set.

This method is called by reinitMaterials to determine whether Material computeProperties methods need to be called. If the return is False, this check prevents unnecessary material property computation

Parameters
tidThe thread id
Returns
True if there has been a list of active material properties set, False otherwise

Definition at line 6139 of file FEProblemBase.C.

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

6140 {
6141  return _has_active_material_properties[tid];
6142 }
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 812 of file SubProblem.C.

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

813 {
814  return systemBaseAuxiliary().hasVariable(var_name);
815 }
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:851

◆ hasBase()

bool MooseBase::hasBase ( ) const
inlineinherited
Returns
Whether or not this object has a registered base (set via InputParameters::registerBase())

Definition at line 142 of file MooseBase.h.

142 { return _pars.hasBase(); }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
bool hasBase() const

◆ hasBlockMaterialProperty()

bool SubProblem::hasBlockMaterialProperty ( SubdomainID  block_id,
const std::string &  prop_name 
)
virtualinherited

Check if a material property is defined on a block.

Definition at line 512 of file SubProblem.C.

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

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

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

◆ hasConvergence()

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

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

Definition at line 2678 of file FEProblemBase.C.

Referenced by ParsedConvergence::initializeSymbols().

2679 {
2680  return _convergences.hasActiveObject(name, tid);
2681 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 ( )
inline

Whether or not this system has dampers.

Definition at line 1459 of file FEProblemBase.h.

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

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

◆ hasException()

virtual bool FEProblemBase::hasException ( )
inlinevirtual

Whether or not an exception has occurred.

Definition at line 508 of file FEProblemBase.h.

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

508 { 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 
)
virtual

Definition at line 2627 of file FEProblemBase.C.

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

2628 {
2629  return _functions.hasActiveObject(name, tid);
2630 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 1275 of file SubProblem.C.

Referenced by FunctorInterface::isFunctor().

1276 {
1277  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1278  auto & functors = _functors[tid];
1279  return (functors.find("wraps_" + name) != functors.end());
1280 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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:1146

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

1326 {
1327  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1328  auto & functors = _functors[tid];
1329 
1330  const auto & it = functors.find("wraps_" + name);
1331  constexpr bool requested_functor_is_ad =
1332  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1333 
1334  if (it == functors.end())
1335  return false;
1336  else
1337  return dynamic_cast<Moose::Functor<T> *>(
1338  requested_functor_is_ad ? std::get<2>(it->second).get() : std::get<1>(it->second).get());
1339 }
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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:1146
const Elem & get(const ElemType type_in)

◆ hasInitialAdaptivity() [1/2]

bool FEProblemBase::hasInitialAdaptivity ( ) const
inline

Return a Boolean indicating whether initial AMR is turned on.

Definition at line 1959 of file FEProblemBase.h.

1959 { 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
inline

Return a Boolean indicating whether initial AMR is turned on.

Definition at line 1964 of file FEProblemBase.h.

1964 { return false; }

◆ hasJacobian()

bool FEProblemBase::hasJacobian ( ) const

Returns _has_jacobian.

Definition at line 9088 of file FEProblemBase.C.

9089 {
9090  return _has_jacobian;
9091 }
bool _has_jacobian
Indicates if the Jacobian was computed.

◆ hasKokkosFunction()

virtual bool FEProblemBase::hasKokkosFunction ( const std::string &  name)
virtual

Get whether a Kokkos function exists.

Parameters
nameThe Kokkos function name
Returns
Whether a Kokkos function exists

Referenced by getKokkosFunction().

◆ hasKokkosObjects()

bool FEProblemBase::hasKokkosObjects ( ) const
inline
Returns
whether any Kokkos object was added in the problem

Definition at line 2756 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::preInit(), and MooseMesh::update().

2756 { return _has_kokkos_objects; }
bool _has_kokkos_objects
Whether we have any Kokkos objects.

◆ hasKokkosResidualObjects()

bool FEProblemBase::hasKokkosResidualObjects ( ) const
inline
Returns
whether any Kokkos residual object was added in the problem

Definition at line 2760 of file FEProblemBase.h.

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

2760 { return _has_kokkos_residual_objects; }
bool _has_kokkos_residual_objects
Whether we have any Kokkos residual objects.

◆ hasLinearConvergenceObjects()

bool FEProblemBase::hasLinearConvergenceObjects ( ) const

Whether we have linear convergence objects.

Definition at line 9427 of file FEProblemBase.C.

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

9428 {
9429  // If false,this means we have not set one, not that we are querying this too early
9430  // TODO: once there is a default linear CV object, error on the 'not set' case
9431  return _linear_convergence_names.has_value();
9432 }
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 803 of file SubProblem.C.

Referenced by SubProblem::getFunctor().

804 {
805  for (const auto i : make_range(numLinearSystems()))
806  if (systemBaseLinear(i).hasVariable(var_name))
807  return true;
808  return false;
809 }
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
inlinevirtual

Whether the simulation has mortar coupling.

Definition at line 2456 of file FEProblemBase.h.

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

◆ hasMultiApp()

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

Definition at line 5541 of file FEProblemBase.C.

5542 {
5543  return _multi_apps.hasActiveObject(multi_app_name);
5544 }
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
inline

Returns whether or not the current simulation has any multiapps.

Definition at line 1445 of file FEProblemBase.h.

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

1445 { 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

Definition at line 5535 of file FEProblemBase.C.

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

◆ hasNeighborCoupling()

virtual bool FEProblemBase::hasNeighborCoupling ( ) const
inlinevirtual

Whether the simulation has neighbor coupling.

Definition at line 2451 of file FEProblemBase.h.

bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.

◆ hasNonlocalCoupling()

virtual bool FEProblemBase::hasNonlocalCoupling ( ) const
inlineoverridevirtual

Whether the simulation has active nonlocal coupling which should be accounted for in the Jacobian.

For this to return true, there must be at least one active nonlocal kernel or boundary condition

Implements SubProblem.

Definition at line 2713 of file FEProblemBase.h.

Referenced by DisplacedProblem::hasNonlocalCoupling().

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

◆ hasPostprocessor()

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

Deprecated.

Use hasPostprocessorValueByName

Definition at line 4662 of file FEProblemBase.C.

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

4663 {
4664  mooseDeprecated("FEProblemBase::hasPostprocssor is being removed; use "
4665  "hasPostprocessorValueByName instead.");
4667 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
void mooseDeprecated(Args &&... args) const
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

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

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

4640 {
4642 }
ReporterData _reporter_data
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:230
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:143
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
overridevirtual

Returns a Boolean indicating whether any system contains a variable with the name provided.

Implements SubProblem.

Definition at line 5989 of file FEProblemBase.C.

Referenced by addInitialCondition(), addObjectParamsHelper(), EigenProblem::adjustEigenVector(), checkDuplicatePostprocessorVariableNames(), AdvancedOutput::initAvailableLists(), MooseParsedFunctionWrapper::initialize(), ChainControlParsedFunctionWrapper::initializeFunctionInputs(), AdvancedOutput::initShowHideLists(), and Split::setup().

5990 {
5991  for (auto & sys : _solver_systems)
5992  if (sys->hasScalarVariable(var_name))
5993  return true;
5994  if (_aux->hasScalarVariable(var_name))
5995  return true;
5996 
5997  return false;
5998 }
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 1171 of file SubProblem.C.

Referenced by SystemBase::addScalingVector().

1172 {
1173  for (const THREAD_ID tid : make_range(libMesh::n_threads()))
1174  assembly(tid, nl_sys_num).hasScalingVector();
1175 }
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:4550
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:237

◆ hasSetMultiAppFixedPointConvergenceName()

bool FEProblemBase::hasSetMultiAppFixedPointConvergenceName ( ) const
inline

Returns true if the problem has set the fixed point convergence name.

Definition at line 732 of file FEProblemBase.h.

733  {
734  return _multiapp_fixed_point_convergence_name.has_value();
735  }
std::optional< ConvergenceName > _multiapp_fixed_point_convergence_name
MultiApp fixed point convergence name.

◆ hasSetSteadyStateConvergenceName()

bool FEProblemBase::hasSetSteadyStateConvergenceName ( ) const
inline

Returns true if the problem has set the steady-state detection convergence name.

Definition at line 737 of file FEProblemBase.h.

738  {
739  return _steady_state_convergence_name.has_value();
740  }
std::optional< ConvergenceName > _steady_state_convergence_name
Steady-state detection convergence name.

◆ hasSolverVariable()

bool FEProblemBase::hasSolverVariable ( const std::string &  var_name) const

Definition at line 5921 of file FEProblemBase.C.

5922 {
5923  for (auto & sys : _solver_systems)
5924  if (sys->hasVariable(var_name))
5925  return true;
5926 
5927  return false;
5928 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.

◆ hasTimeIntegrator()

bool FEProblemBase::hasTimeIntegrator ( ) const
inline

Returns whether or not this Problem has a TimeIntegrator.

Definition at line 2242 of file FEProblemBase.h.

Referenced by TransientBase::setupTimeIntegrator().

2242 { 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
inline

Whether or not MOOSE will perform a user object/auxiliary kernel state check.

Definition at line 207 of file FEProblemBase.h.

207 { 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

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

Referenced by MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), addPostprocessor(), addReporter(), addVectorPostprocessor(), FunctorAux::computeValue(), DistributedPositions::DistributedPositions(), UserObjectInterface::hasUserObjectByName(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), ReporterTransferInterface::hideVariableHelper(), ParsedDownSelectionPositions::initialize(), and TransformedPositions::TransformedPositions().

4627 {
4628  std::vector<UserObject *> objs;
4629  theWarehouse()
4630  .query()
4631  .condition<AttribSystem>("UserObject")
4632  .condition<AttribThread>(0)
4633  .condition<AttribName>(name)
4634  .queryInto(objs);
4635  return !objs.empty();
4636 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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
overridevirtual

Whether or not this problem has the variable.

Implements SubProblem.

Definition at line 5909 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), addFVInitialCondition(), DiffusionFV::addFVKernels(), addInitialCondition(), addObjectParamsHelper(), MultiAppTransfer::checkVariable(), FunctorIC::FunctorIC(), LazyCoupleable::init(), AdvancedOutput::initAvailableLists(), MooseParsedFunction::initialSetup(), AdvancedOutput::initShowHideLists(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), and Split::setup().

5910 {
5911  for (auto & sys : _solver_systems)
5912  if (sys->hasVariable(var_name))
5913  return true;
5914  if (_aux->hasVariable(var_name))
5915  return true;
5916 
5917  return false;
5918 }
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 computeJacobianTags(), computeResidualAndJacobian(), and init().

771 { return _have_ad_objects; }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1116

◆ haveADObjects() [2/4]

virtual void SubProblem::haveADObjects
inline

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:1116

◆ haveADObjects() [3/4]

bool SubProblem::haveADObjects
inline

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:1116

◆ haveADObjects() [4/4]

void FEProblemBase::haveADObjects ( bool  have_ad_objects)
overridevirtual

Method for setting whether we have any ad objects.

Reimplemented from SubProblem.

Definition at line 9165 of file FEProblemBase.C.

9166 {
9167  _have_ad_objects = have_ad_objects;
9168  if (_displaced_problem)
9169  _displaced_problem->SubProblem::haveADObjects(have_ad_objects);
9170 }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1116
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ haveDisplaced()

bool FEProblemBase::haveDisplaced ( ) const
inlinefinaloverridevirtual

Whether we have a displaced problem in our simulation.

Implements SubProblem.

Definition at line 2547 of file FEProblemBase.h.

2547 { return _displaced_problem.get(); }
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ haveFV()

virtual bool FEProblemBase::haveFV ( ) const
inlineoverridevirtual

◆ havePRefinement()

bool SubProblem::havePRefinement ( ) const
inlineinherited

Query whether p-refinement has been requested at any point during the simulation.

Definition at line 1011 of file SubProblem.h.

Referenced by AdvancedOutput::initAvailableLists(), and meshChanged().

1011 { return _have_p_refinement; }
bool _have_p_refinement
Whether p-refinement has been requested at any point during the simulation.
Definition: SubProblem.h:1207

◆ haveXFEM()

bool FEProblemBase::haveXFEM ( )
inline

Find out whether the current analysis is using XFEM.

Definition at line 1974 of file FEProblemBase.h.

Referenced by initialSetup(), FixedPointSolve::solveStep(), TransientBase::takeStep(), and updateMeshXFEM().

1974 { return _xfem != nullptr; }
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.

◆ identifyVariableGroupsInNL()

bool FEProblemBase::identifyVariableGroupsInNL ( ) const
inline

Whether to identify variable groups in nonlinear systems.

This affects dof ordering

Definition at line 2718 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
inline

Will return true if zeros in the Jacobian are to be dropped from the sparsity pattern.

Note that this can make preserving the matrix sparsity pattern impossible.

Definition at line 2214 of file FEProblemBase.h.

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

2214 { 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
inline

Whether or not the solution invalid warnings are printed out immediately.

Definition at line 2239 of file FEProblemBase.h.

Referenced by SolutionInvalidInterface::flagInvalidSolutionInternal().

const bool & _immediately_print_invalid_solution

◆ incrementMultiAppTStep()

void FEProblemBase::incrementMultiAppTStep ( ExecFlagType  type)

Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType.

Definition at line 5726 of file FEProblemBase.C.

Referenced by TransientBase::incrementStepOrReject().

5727 {
5728  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5729 
5730  if (multi_apps.size())
5731  for (const auto & multi_app : multi_apps)
5732  multi_app->incrementTStep(_time);
5733 }
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:93
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.

◆ init()

void FEProblemBase::init ( )
overridevirtual

Implements Problem.

Reimplemented in FEProblem, and EigenProblem.

Definition at line 6413 of file FEProblemBase.C.

Referenced by EigenProblem::init(), and FEProblem::init().

6414 {
6415  if (_initialized)
6416  return;
6417 
6418  TIME_SECTION("init", 2, "Initializing");
6419 
6420  // call executioner's preProblemInit so that it can do some setups before problem init
6422 
6423  // If we have AD and we are doing global AD indexing, then we should by default set the matrix
6424  // coupling to full. If the user has told us to trust their coupling matrix, then this call will
6425  // not do anything
6428 
6429  for (const auto i : index_range(_nl))
6430  {
6431  auto & nl = _nl[i];
6432  auto & cm = _cm[i];
6433 
6434  unsigned int n_vars = nl->nVariables();
6435  {
6436  TIME_SECTION("fillCouplingMatrix", 3, "Filling Coupling Matrix");
6437 
6438  switch (_coupling)
6439  {
6440  case Moose::COUPLING_DIAG:
6441  cm = std::make_unique<CouplingMatrix>(n_vars);
6442  for (unsigned int i = 0; i < n_vars; i++)
6443  (*cm)(i, i) = 1;
6444  break;
6445 
6446  // for full jacobian
6447  case Moose::COUPLING_FULL:
6448  cm = std::make_unique<CouplingMatrix>(n_vars);
6449  for (unsigned int i = 0; i < n_vars; i++)
6450  for (unsigned int j = 0; j < n_vars; j++)
6451  (*cm)(i, j) = 1;
6452  break;
6453 
6455  // do nothing, _cm was already set through couplingMatrix() call
6456  break;
6457  }
6458  }
6459 
6460  nl->dofMap()._dof_coupling = cm.get();
6461 
6462  // If there are no variables, make sure to pass a nullptr coupling
6463  // matrix, to avoid warnings about non-nullptr yet empty
6464  // CouplingMatrices.
6465  if (n_vars == 0)
6466  nl->dofMap()._dof_coupling = nullptr;
6467 
6468  nl->dofMap().attach_extra_sparsity_function(&extraSparsity, nl.get());
6469  nl->dofMap().attach_extra_send_list_function(&extraSendList, nl.get());
6470  _aux->dofMap().attach_extra_send_list_function(&extraSendList, _aux.get());
6471 
6472  if (!_skip_nl_system_check && _solve && n_vars == 0)
6473  mooseError("No variables specified in nonlinear system '", nl->name(), "'.");
6474  }
6475 
6476  ghostGhostedBoundaries(); // We do this again right here in case new boundaries have been added
6477 
6478  // We may have added element/nodes to the mesh in ghostGhostedBoundaries so we need to update
6479  // all of our mesh information. We need to make sure that mesh information is up-to-date before
6480  // EquationSystems::init because that will call through to updateGeomSearch (for sparsity
6481  // augmentation) and if we haven't added back boundary node information before that latter call,
6482  // then we're screwed. We'll get things like "Unable to find closest node!"
6483  _mesh.meshChanged();
6484  if (_displaced_problem)
6486 
6487  if (_mesh.doingPRefinement())
6488  {
6490  if (_displaced_problem)
6491  _displaced_problem->preparePRefinement();
6492  }
6493 
6494  // do not assemble system matrix for JFNK solve
6495  for (auto & nl : _nl)
6496  if (solverParams(nl->number())._type == Moose::ST_JFNK)
6497  nl->turnOffJacobian();
6498 
6499  for (auto & sys : _solver_systems)
6500  sys->preInit();
6501  _aux->preInit();
6502 
6503  // Build the mortar segment meshes, if they haven't been already, for a couple reasons:
6504  // 1) Get the ghosting correct for both static and dynamic meshes
6505  // 2) Make sure the mortar mesh is built for mortar constraints that live on the static mesh
6506  //
6507  // It is worth-while to note that mortar meshes that live on a dynamic mesh will be built
6508  // during residual and Jacobian evaluation because when displacements are solution variables
6509  // the mortar mesh will move and change during the course of a non-linear solve. We DO NOT
6510  // redo ghosting during non-linear solve, so for purpose 1) the below call has to be made
6511  if (!_mortar_data->initialized())
6512  updateMortarMesh();
6513 
6514  {
6515  TIME_SECTION("EquationSystems::Init", 2, "Initializing Equation Systems");
6516  es().init();
6517  }
6518 
6519  for (auto & sys : _solver_systems)
6520  sys->postInit();
6521  _aux->postInit();
6522 
6523  // Now that the equation system and the dof distribution is done, we can generate the
6524  // finite volume-related parts if needed.
6525  if (haveFV())
6527 
6528  for (auto & sys : _solver_systems)
6529  sys->update();
6530  _aux->update();
6531 
6532  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
6533  for (const auto i : index_range(_nl))
6534  {
6535  mooseAssert(
6536  _cm[i],
6537  "Coupling matrix not set for system "
6538  << i
6539  << ". This should only happen if a preconditioner was not setup for this system");
6540  _assembly[tid][i]->init(_cm[i].get());
6541  }
6542 
6543  if (_displaced_problem)
6544  _displaced_problem->init();
6545 
6546 #ifdef MOOSE_KOKKOS_ENABLED
6547  if (_has_kokkos_objects)
6548  initKokkos();
6549 #endif
6550 
6551  _initialized = true;
6552 }
void extraSparsity(libMesh::SparsityPattern::Graph &sparsity, std::vector< dof_id_type > &n_nz, std::vector< dof_id_type > &n_oz, void *context)
Free function used for a libMesh callback.
Definition: SystemBase.C:48
unsigned int n_threads()
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
void setCoupling(Moose::CouplingType type)
Set the coupling between variables TODO: allow user-defined coupling.
bool _has_kokkos_objects
Whether we have any Kokkos objects.
bool globalADIndexing()
Whether we are using global AD indexing.
Definition: ADUtils.h:28
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
void preparePRefinement()
Prepare DofMap and Assembly classes with our p-refinement information.
Definition: SubProblem.C:1337
const bool _skip_nl_system_check
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const bool & _solve
Whether or not to actually solve the nonlinear system.
unsigned int n_vars
Moose::CouplingType _coupling
Type of variable coupling.
void extraSendList(std::vector< dof_id_type > &send_list, void *context)
///< Type of coordinate system
Definition: SystemBase.C:40
Jacobian-Free Newton Krylov.
Definition: MooseTypes.h:894
virtual libMesh::EquationSystems & es() override
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition: SubProblem.h:771
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition: MooseApp.C:2206
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
virtual void updateMortarMesh()
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
virtual void preProblemInit()
Perform initializations during executing actions right before init_problem task.
Definition: Executioner.h:57
void initKokkos()
Construct Kokkos assembly and systems and allocate Kokkos material property storages.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
SolverParams & solverParams(unsigned int solver_sys_num=0)
Get the solver parameters.
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
Coupling matrix for variables.
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we&#39;re doing is p-refinement.
Definition: MooseMesh.h:1365
auto index_range(const T &sizable)
const std::string & _type
The type of this class.
Definition: MooseBase.h:360
MooseMesh * _displaced_mesh
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
Definition: MooseMesh.C:909
unsigned int THREAD_ID
Definition: MooseTypes.h:237
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:4152

◆ initElementStatefulProps()

void FEProblemBase::initElementStatefulProps ( const libMesh::ConstElemRange elem_range,
const bool  threaded 
)

Initialize stateful properties for elements in a specific elem_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step.

Definition at line 8519 of file FEProblemBase.C.

Referenced by ActivateElementsUserObjectBase::finalize(), ElementSubdomainModifierBase::initElementStatefulProps(), and initialSetup().

8520 {
8523  if (threaded)
8524  Threads::parallel_reduce(elem_range, cmt);
8525  else
8526  cmt(elem_range, true);
8527 
8528 #ifdef MOOSE_KOKKOS_ENABLED
8529  if (_has_kokkos_objects)
8531 #endif
8532 }
MaterialPropertyStorage & _bnd_material_props
bool _has_kokkos_objects
Whether we have any Kokkos objects.
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
void initKokkosStatefulProps()

◆ initialAdaptMesh()

void FEProblemBase::initialAdaptMesh ( )
virtual

Definition at line 8189 of file FEProblemBase.C.

Referenced by initialSetup().

8190 {
8191  unsigned int n = adaptivity().getInitialSteps();
8192  _cycles_completed = 0;
8193  if (n)
8194  {
8195  if (!_mesh.interiorLowerDBlocks().empty() || !_mesh.boundaryLowerDBlocks().empty())
8196  mooseError("HFEM does not support mesh adaptivity currently.");
8197 
8198  TIME_SECTION("initialAdaptMesh", 2, "Performing Initial Adaptivity");
8199 
8200  for (unsigned int i = 0; i < n; i++)
8201  {
8203  computeMarkers();
8204 
8206  {
8207  meshChanged(
8208  /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
8209 
8210  // reproject the initial condition
8211  projectSolution();
8212 
8214  }
8215  else
8216  {
8217  _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
8218  return;
8219  }
8220  }
8221  }
8222 }
bool initialAdaptMesh()
Used during initial adaptivity.
Definition: Adaptivity.C:268
virtual void meshChanged()
Deprecated.
const std::set< SubdomainID > & interiorLowerDBlocks() const
Definition: MooseMesh.h:1421
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:1425
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Adaptivity & adaptivity()

◆ initialSetup()

void FEProblemBase::initialSetup ( )
overridevirtual

If this is a restart run, the user may want to override the start time, which we already set in the constructor. "_time" however will have been "restored" from the restart file. We need to honor the original request of the developer now that the restore has been completed.

If we are not recovering but we are doing restart (_app.getExodusFileRestart() == true) with additional uniform refinements. We have to delay the refinement until this point in time so that the equation systems are initialized and projections can be performed.

Reimplemented from SubProblem.

Definition at line 888 of file FEProblemBase.C.

Referenced by Steady::init(), EigenExecutionerBase::init(), TransientBase::init(), Eigenvalue::init(), and MFEMProblem::initialSetup().

889 {
890  TIME_SECTION("initialSetup", 2, "Performing Initial Setup");
891 
893 
895  mooseError("Checkpoint recovery and restart and exodus restart are all mutually exclusive.");
896 
898  mooseWarning("MOOSE may fail to catch an exception when the \"skip_exception_check\" parameter "
899  "is used. If you receive a terse MPI error during execution, remove this "
900  "parameter and rerun your simulation");
901 
902  // set state flag indicating that we are in or beyond initialSetup.
903  // This can be used to throw errors in methods that _must_ be called at construction time.
904  _started_initial_setup = true;
906 
907  // Setup the solution states (current, old, etc) in each system based on
908  // its default and the states requested of each of its variables
909  for (const auto i : index_range(_solver_systems))
910  {
911  _solver_systems[i]->initSolutionState();
912  if (getDisplacedProblem())
913  getDisplacedProblem()->solverSys(i).initSolutionState();
914  }
915  _aux->initSolutionState();
916  if (getDisplacedProblem())
917  getDisplacedProblem()->auxSys().initSolutionState();
918 
919  // always execute to get the max number of DoF per element and node needed to initialize phi_zero
920  // variables
921  dof_id_type global_max_var_n_dofs_per_elem = 0;
922  for (const auto i : index_range(_solver_systems))
923  {
924  auto & sys = *_solver_systems[i];
925  dof_id_type max_var_n_dofs_per_elem;
926  dof_id_type max_var_n_dofs_per_node;
927  {
928  TIME_SECTION("computingMaxDofs", 3, "Computing Max Dofs Per Element");
929 
930  MaxVarNDofsPerElem mvndpe(*this, sys);
932  max_var_n_dofs_per_elem = mvndpe.max();
933  _communicator.max(max_var_n_dofs_per_elem);
934 
935  MaxVarNDofsPerNode mvndpn(*this, sys);
937  max_var_n_dofs_per_node = mvndpn.max();
938  _communicator.max(max_var_n_dofs_per_node);
939  global_max_var_n_dofs_per_elem =
940  std::max(global_max_var_n_dofs_per_elem, max_var_n_dofs_per_elem);
941  }
942 
943  {
944  TIME_SECTION("assignMaxDofs", 5, "Assigning Maximum Dofs Per Elem");
945 
946  sys.assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
948  if (displaced_problem)
949  displaced_problem->solverSys(i).assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
950 
951  sys.assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
952  if (displaced_problem)
953  displaced_problem->solverSys(i).assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
954  }
955  }
956 
957  {
958  TIME_SECTION("resizingVarValues", 5, "Resizing Variable Values");
959 
960  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
961  {
962  _phi_zero[tid].resize(global_max_var_n_dofs_per_elem, std::vector<Real>(getMaxQps(), 0.));
963  _grad_phi_zero[tid].resize(global_max_var_n_dofs_per_elem,
964  std::vector<RealGradient>(getMaxQps(), RealGradient(0.)));
965  _second_phi_zero[tid].resize(global_max_var_n_dofs_per_elem,
966  std::vector<RealTensor>(getMaxQps(), RealTensor(0.)));
967  }
968  }
969 
970  // Set up stateful material property redistribution, if we suspect
971  // it may be necessary later.
973 
975  {
976  // Only load all of the vectors if we're recovering
978 
979  // This forces stateful material property loading to be an exact one-to-one match
980  if (_app.isRecovering())
981  {
983  props->setRecovering();
984 
985 #ifdef MOOSE_KOKKOS_ENABLED
986  for (auto props :
988  props->setRecovering();
989 #endif
990  }
991 
992  TIME_SECTION("restore", 3, "Restoring from backup");
993 
994  // We could have a cached backup when this app is a sub-app and has been given a Backup
995  if (!_app.hasInitialBackup())
997  else
999 
1005  if (_app.isRestarting())
1006  {
1007  if (_app.hasStartTime())
1009  else
1010  _time_old = _time;
1011  }
1012  }
1013  else
1014  {
1016 
1017  if (reader)
1018  {
1019  TIME_SECTION("copyingFromExodus", 3, "Copying Variables From Exodus");
1020 
1021  for (auto & sys : _solver_systems)
1022  sys->copyVars(*reader);
1023  _aux->copyVars(*reader);
1024  }
1025  else
1026  {
1027  if (_solver_systems[0]->hasVarCopy() || _aux->hasVarCopy())
1028  mooseError("Need Exodus reader to restart variables but the reader is not available\n"
1029  "Use either FileMesh with an Exodus mesh file or FileMeshGenerator with an "
1030  "Exodus mesh file and with use_for_exodus_restart equal to true");
1031  }
1032  }
1033 
1034  // Perform output related setups
1036 
1037  // Flush all output to _console that occur during construction and initialization of objects
1039 
1040  // Build Refinement and Coarsening maps for stateful material projections if necessary
1041  if ((_adaptivity.isOn() || _num_grid_steps) &&
1044  {
1046  mooseError("Stateful neighbor material properties do not work with mesh adaptivity");
1047 
1049  }
1050 
1051  if (!_app.isRecovering())
1052  {
1059  {
1060  if (!_app.isUltimateMaster())
1061  mooseError(
1062  "Doing extra refinements when restarting is NOT supported for sub-apps of a MultiApp");
1063 
1065  }
1066  }
1067 
1068  unsigned int n_threads = libMesh::n_threads();
1069 
1070  // Convergence initial setup
1071  {
1072  TIME_SECTION("convergenceInitialSetup", 5, "Initializing Convergence objects");
1073 
1074  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1076  }
1077 
1078  // UserObject initialSetup
1079  std::set<std::string> depend_objects_ic = _ics.getDependObjects();
1080  std::set<std::string> depend_objects_aux = _aux->getDependObjects();
1081 
1082  // This replaces all prior updateDependObjects calls on the old user object warehouses.
1083  TheWarehouse::Query uo_query = theWarehouse().query().condition<AttribSystem>("UserObject");
1084  std::vector<UserObject *> userobjs;
1085  uo_query.queryInto(userobjs);
1087  theWarehouse(), getAuxiliarySystem(), _app.getExecuteOnEnum(), userobjs, depend_objects_ic);
1088 
1089  std::map<int, std::vector<UserObject *>> group_userobjs;
1090  for (auto obj : userobjs)
1091  group_userobjs[obj->getParam<int>("execution_order_group")].push_back(obj);
1092 
1093  for (auto & [group, objs] : group_userobjs)
1094  for (auto obj : objs)
1095  obj->initialSetup();
1096 
1097  // check if jacobian calculation is done in userobject
1098  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
1100 
1101  // Check whether nonlocal couling is required or not
1105 
1106  {
1107  TIME_SECTION("initializingFunctions", 5, "Initializing Functions");
1108 
1109  // Call the initialSetup methods for functions
1110  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1111  {
1112  reinitScalars(tid); // initialize scalars so they are properly sized for use as input into
1113  // ParsedFunctions
1114  _functions.initialSetup(tid);
1115  }
1116 
1117 #ifdef MOOSE_KOKKOS_ENABLED
1119 #endif
1120  }
1121 
1122  {
1123  TIME_SECTION("initializingRandomObjects", 5, "Initializing Random Objects");
1124 
1125  // Random interface objects
1126  for (const auto & it : _random_data_objects)
1127  it.second->updateSeeds(EXEC_INITIAL);
1128  }
1129 
1130  if (!_app.isRecovering())
1131  {
1133 
1134  {
1135  TIME_SECTION("ICinitialSetup", 5, "Setting Up Initial Conditions");
1136 
1137  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1138  _ics.initialSetup(tid);
1139 
1141  }
1142 
1143  projectSolution();
1144  }
1145 
1146  // Materials
1148  {
1149  TIME_SECTION("materialInitialSetup", 3, "Setting Up Materials");
1150 
1151  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1152  {
1153  // Sort the Material objects, these will be actually computed by MOOSE in reinit methods.
1154  _materials.sort(tid);
1156 
1157  // Call initialSetup on all material objects
1159 
1160  // Discrete materials may insert additional dependencies on materials during the initial
1161  // setup. Therefore we resolve the dependencies once more, now with the additional
1162  // dependencies due to discrete materials.
1164  {
1165  _materials.sort(tid);
1167  }
1168  }
1169 
1170 #ifdef MOOSE_KOKKOS_ENABLED
1171  _kokkos_materials.sort(0, true);
1172 #endif
1173 
1174  {
1175  TIME_SECTION("computingInitialStatefulProps", 3, "Computing Initial Material Values");
1176 
1178 
1182 #ifdef MOOSE_KOKKOS_ENABLED
1187 #endif
1188  }
1189  }
1190 
1191  // setRestartInPlace() is set because the property maps have now been setup and we can
1192  // dataLoad() them directly in place
1193  // setRecovering() is set because from now on we require a one-to-one mapping of
1194  // stateful properties because we shouldn't be declaring any more
1196  {
1197  props->setRestartInPlace();
1198  props->setRecovering();
1199  }
1200 
1201  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1202  {
1205  _markers.sort(tid);
1206  _markers.initialSetup(tid);
1207  }
1208 
1209 #ifdef LIBMESH_ENABLE_AMR
1210 
1211  if (!_app.isRecovering())
1212  {
1213  unsigned int n = adaptivity().getInitialSteps();
1214  if (n && !_app.isUltimateMaster() && _app.isRestarting())
1215  mooseError("Cannot perform initial adaptivity during restart on sub-apps of a MultiApp!");
1216 
1217  initialAdaptMesh();
1218  }
1219 
1220 #endif // LIBMESH_ENABLE_AMR
1221 
1222  if (!_app.isRecovering() && !_app.isRestarting())
1223  {
1224  // During initial setup the solution is copied to the older solution states (old, older, etc)
1226 
1227  // Check if there are old state initial conditions
1228  auto ics = _ics.getActiveObjects();
1229  auto fv_ics = _fv_ics.getActiveObjects();
1230  auto scalar_ics = _scalar_ics.getActiveObjects();
1231  unsigned short ic_state_max = 0;
1232 
1233  auto findMax = [&ic_state_max](const auto & obj_list)
1234  {
1235  for (auto ic : obj_list.getActiveObjects())
1236  ic_state_max = std::max(ic_state_max, ic->getState());
1237  };
1238  findMax(_ics);
1239  findMax(_fv_ics);
1240  findMax(_scalar_ics);
1241 
1242  // if there are old state ICs, compute them and write to old states accordingly
1243  if (ic_state_max > 0)
1244  {
1245  // state 0 copy (we'll overwrite current state when evaluating ICs and need to restore it once
1246  // we're done with the old/older state ICs)
1247  std::vector<std::unique_ptr<NumericVector<Real>>> state0_sys_buffers(_solver_systems.size());
1248  std::unique_ptr<NumericVector<Real>> state0_aux_buffer;
1249 
1250  // save state 0
1251  for (const auto i : index_range(_solver_systems))
1252  state0_sys_buffers[i] = _solver_systems[i]->solutionState(0).clone();
1253 
1254  state0_aux_buffer = _aux->solutionState(0).clone();
1255 
1256  // compute old state ICs
1257  for (_current_ic_state = 1; _current_ic_state <= ic_state_max; _current_ic_state++)
1258  {
1259  projectSolution();
1260 
1261  for (auto & sys : _solver_systems)
1262  sys->solutionState(_current_ic_state) = sys->solutionState(0);
1263 
1264  _aux->solutionState(_current_ic_state) = _aux->solutionState(0);
1265  }
1266  _current_ic_state = 0;
1267 
1268  // recover state 0
1269  for (const auto i : index_range(_solver_systems))
1270  {
1271  _solver_systems[i]->solutionState(0) = *state0_sys_buffers[i];
1272  _solver_systems[i]->solutionState(0).close();
1273  _solver_systems[i]->update();
1274  }
1275  _aux->solutionState(0) = *state0_aux_buffer;
1276  _aux->solutionState(0).close();
1277  _aux->update();
1278  }
1279  }
1280 
1281  if (!_app.isRecovering())
1282  {
1283  if (haveXFEM())
1284  updateMeshXFEM();
1285  }
1286 
1287  // Call initialSetup on the solver systems
1288  for (auto & sys : _solver_systems)
1289  sys->initialSetup();
1290 
1291  // Auxilary variable initialSetup calls
1292  _aux->initialSetup();
1293 
1294  if (_displaced_problem)
1295  // initialSetup for displaced systems
1296  _displaced_problem->initialSetup();
1297 
1298  for (auto & sys : _solver_systems)
1299  sys->setSolution(*(sys->system().current_local_solution.get()));
1300 
1301  // Update the nearest node searches (has to be called after the problem is all set up)
1302  // We do this here because this sets up the Element's DoFs to ghost
1304 
1306  if (_displaced_mesh)
1308 
1309  // We need to move the mesh in order to build a map between mortar secondary and primary
1310  // interfaces. This map will then be used by the AgumentSparsityOnInterface ghosting functor to
1311  // know which dofs we need ghosted when we call EquationSystems::reinit
1312  if (_displaced_problem && _mortar_data->hasDisplacedObjects())
1313  {
1314  _displaced_problem->updateMesh();
1315  // if displacements were applied to the mesh, the mortar mesh should be updated too
1316  updateMortarMesh();
1317  }
1318 
1319  // Possibly reinit one more time to get ghosting correct
1321 
1322  if (_displaced_mesh)
1323  _displaced_problem->updateMesh();
1324 
1325  updateGeomSearch(); // Call all of the rest of the geometric searches
1326 
1327  for (auto & sys : _solver_systems)
1328  {
1329  const auto & tis = sys->getTimeIntegrators();
1330 
1331  {
1332  TIME_SECTION("timeIntegratorInitialSetup", 5, "Initializing Time Integrator");
1333  for (auto & ti : tis)
1334  ti->initialSetup();
1335  }
1336  }
1337 
1338  // HUGE NOTE: MultiApp initialSetup() MUST... I repeat MUST be _after_ main-app restartable data
1339  // has been restored
1340 
1341  // Call initialSetup on the MultiApps
1342  if (_multi_apps.hasObjects())
1343  {
1344  TIME_SECTION("initialSetupMultiApps", 2, "Initializing MultiApps", false);
1346  }
1347 
1348  // Call initialSetup on the transfers
1349  {
1350  TIME_SECTION("initialSetupTransfers", 2, "Initializing Transfers");
1351 
1353 
1354  // Call initialSetup on the MultiAppTransfers to be executed on TO_MULTIAPP
1355  const auto & to_multi_app_objects = _to_multi_app_transfers.getActiveObjects();
1356  for (const auto & transfer : to_multi_app_objects)
1357  {
1358  transfer->setCurrentDirection(Transfer::DIRECTION::TO_MULTIAPP);
1359  transfer->initialSetup();
1360  }
1361 
1362  // Call initialSetup on the MultiAppTransfers to be executed on FROM_MULTIAPP
1363  const auto & from_multi_app_objects = _from_multi_app_transfers.getActiveObjects();
1364  for (const auto & transfer : from_multi_app_objects)
1365  {
1366  transfer->setCurrentDirection(Transfer::DIRECTION::FROM_MULTIAPP);
1367  transfer->initialSetup();
1368  }
1369 
1370  // Call initialSetup on the MultiAppTransfers to be executed on BETWEEN_MULTIAPP
1371  const auto & between_multi_app_objects = _between_multi_app_transfers.getActiveObjects();
1372  for (const auto & transfer : between_multi_app_objects)
1373  {
1374  transfer->setCurrentDirection(Transfer::DIRECTION::BETWEEN_MULTIAPP);
1375  transfer->initialSetup();
1376  }
1377  }
1378 
1380  {
1381  TIME_SECTION("BoundaryRestrictedNodeIntegrityCheck", 5);
1382 
1383  // check that variables are defined along boundaries of boundary restricted nodal objects
1384  ConstBndNodeRange & bnd_nodes = *mesh().getBoundaryNodeRange();
1385  BoundaryNodeIntegrityCheckThread bnict(*this, uo_query);
1386  Threads::parallel_reduce(bnd_nodes, bnict);
1387 
1388  // Nodal bcs aren't threaded
1389  const auto & node_to_elem_map = _mesh.nodeToActiveSemilocalElemMap();
1390  for (const auto & bnode : bnd_nodes)
1391  {
1392  const auto boundary_id = bnode->_bnd_id;
1393  const Node * const node = bnode->_node;
1394 
1395  if (node->processor_id() != this->processor_id())
1396  continue;
1397 
1398  // Only check vertices. Variables may not be defined on non-vertex nodes (think first order
1399  // Lagrange on a second order mesh) and user-code can often handle that
1400  const Elem * const an_elem =
1401  _mesh.getMesh().elem_ptr(libmesh_map_find(node_to_elem_map, node->id()).front());
1402  if (!an_elem->is_vertex(an_elem->get_node_index(node)))
1403  continue;
1404 
1405  const auto & bnd_name = _mesh.getBoundaryName(boundary_id);
1406 
1407  for (auto & nl : _nl)
1408  {
1409  const auto & nodal_bcs = nl->getNodalBCWarehouse();
1410  if (!nodal_bcs.hasBoundaryObjects(boundary_id, 0))
1411  continue;
1412 
1413  const auto & bnd_objects = nodal_bcs.getBoundaryObjects(boundary_id, 0);
1414  for (const auto & bnd_object : bnd_objects)
1415  // Skip if this object uses geometric search because coupled variables may be defined on
1416  // paired boundaries instead of the boundary this node is on
1417  if (!bnd_object->requiresGeometricSearch() &&
1418  bnd_object->checkVariableBoundaryIntegrity())
1419  {
1420  std::set<MooseVariableFieldBase *> vars_to_omit = {
1421  &static_cast<MooseVariableFieldBase &>(
1422  const_cast<MooseVariableBase &>(bnd_object->variable()))};
1423 
1425  *bnd_object, bnd_object->checkAllVariables(*node, vars_to_omit), bnd_name);
1426  }
1427  }
1428  }
1429  }
1430 
1432  {
1433  TIME_SECTION("BoundaryRestrictedElemIntegrityCheck", 5);
1434 
1435  // check that variables are defined along boundaries of boundary restricted elemental objects
1436  ConstBndElemRange & bnd_elems = *mesh().getBoundaryElementRange();
1437  BoundaryElemIntegrityCheckThread beict(*this, uo_query);
1438  Threads::parallel_reduce(bnd_elems, beict);
1439  }
1440 
1441  if (!_app.isRecovering())
1442  {
1444 
1446  if (!converged)
1447  mooseError("failed to converge initial MultiApp");
1448 
1449  // We'll backup the Multiapp here
1451 
1452  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1453  reinitScalars(tid);
1454 
1456 
1457  // The FEProblemBase::execute method doesn't call all the systems on EXEC_INITIAL, but it does
1458  // set/unset the current flag. Therefore, this resets the current flag to EXEC_INITIAL so that
1459  // subsequent calls (e.g., executeControls) have the proper flag.
1461  }
1462 
1463  // Here we will initialize the stateful properties once more since they may have been updated
1464  // during initialSetup by calls to computeProperties.
1465  //
1466  // It's really bad that we don't allow this during restart. It means that we can't add new
1467  // stateful materials
1468  // during restart. This is only happening because this _has_ to be below initial userobject
1469  // execution.
1470  // Otherwise this could be done up above... _before_ restoring restartable data... which would
1471  // allow you to have
1472  // this happen during restart. I honestly have no idea why this has to happen after initial user
1473  // object computation.
1474  // THAT is something we should fix... so I've opened this ticket: #5804
1475  if (!_app.isRecovering() && !_app.isRestarting())
1476  {
1479  {
1480  TIME_SECTION("computeMaterials", 2, "Computing Initial Material Properties");
1481 
1483  }
1484 #ifdef MOOSE_KOKKOS_ENABLED
1488  {
1489  TIME_SECTION("computeMaterials", 2, "Computing Initial Material Properties");
1490 
1492  }
1493 #endif
1494  }
1495 
1496  // Control Logic
1498 
1499  // Scalar variables need to reinited for the initial conditions to be available for output
1500  for (unsigned int tid = 0; tid < n_threads; tid++)
1501  reinitScalars(tid);
1502 
1503  if (_displaced_mesh)
1504  _displaced_problem->syncSolutions();
1505 
1506  // Writes all calls to _console from initialSetup() methods
1508 
1510  {
1512  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
1513  for (auto & assembly : _assembly[tid])
1515  }
1516 
1517  {
1518  TIME_SECTION("lineSearchInitialSetup", 5, "Initializing Line Search");
1519 
1520  if (_line_search)
1521  _line_search->initialSetup();
1522  }
1523 
1524  // Perform Reporter get/declare check
1526 
1527  // We do this late to allow objects to get late restartable data
1530 
1532 }
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:1288
void reinitBecauseOfGhostingOrNewGeomObjects(bool mortar_changed=false)
Call when it is possible that the needs for ghosted elements has changed.
const std::string & getBoundaryName(BoundaryID boundary_id) const
Return the name of the boundary given the id.
Definition: MooseMesh.C:1842
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:820
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:1256
bool hasInitialBackup() const
Definition: MooseApp.h:1001
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:994
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:29
std::filesystem::path restartFolderBase(const std::filesystem::path &folder_base) const
The file suffix for restartable data.
Definition: MooseApp.C:3170
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.
MaterialWarehouse _kokkos_materials
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:300
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.
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:1890
libMesh::ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1325
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:1095
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:430
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 mooseWarning(Args &&... args) const
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
void sort(THREAD_ID tid=0, bool sort_all_objects=false)
By default, this method only sorts block and boundary-wise object storages that are used by the MOOSE...
dof_id_type id() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3528
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)
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:1992
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:443
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:3296
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:2512
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...
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:1957
Moose::Kokkos::MaterialPropertyStorage & _kokkos_material_props
std::vector< VariablePhiValue > _phi_zero
InitialConditionWarehouse _ics
MaterialWarehouse _discrete_materials
virtual void initialSetup()
Definition: SubProblem.C:1220
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
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:978
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:2649
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:295
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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:1999
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1353
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.
Moose::Kokkos::MaterialPropertyStorage & _kokkos_bnd_material_props
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:1884
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:494
MooseObjectWarehouse< Marker > _markers
FVInitialConditionWarehouse _fv_ics
virtual void initialAdaptMesh()
Moose::Kokkos::MaterialPropertyStorage & _kokkos_neighbor_material_props
MaterialWarehouse _all_materials
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1339
auto index_range(const T &sizable)
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2525
MooseMesh * _displaced_mesh
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
Base variable class.
unsigned int THREAD_ID
Definition: MooseTypes.h:237
MaterialWarehouse _materials
uint8_t dof_id_type
std::shared_ptr< LineSearch > _line_search
unsigned int getMaxQps() const
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:30

◆ initKokkos()

void FEProblemBase::initKokkos ( )

Construct Kokkos assembly and systems and allocate Kokkos material property storages.

Referenced by init().

◆ initKokkosStatefulProps()

void FEProblemBase::initKokkosStatefulProps ( )

◆ initNullSpaceVectors()

void FEProblemBase::initNullSpaceVectors ( const InputParameters parameters,
std::vector< std::shared_ptr< NonlinearSystemBase >> &  nl 
)
virtual

Definition at line 763 of file FEProblemBase.C.

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

765 {
766  TIME_SECTION("initNullSpaceVectors", 5, "Initializing Null Space Vectors");
767 
768  unsigned int dimNullSpace = parameters.get<unsigned int>("null_space_dimension");
769  unsigned int dimTransposeNullSpace =
770  parameters.get<unsigned int>("transpose_null_space_dimension");
771  unsigned int dimNearNullSpace = parameters.get<unsigned int>("near_null_space_dimension");
772  for (unsigned int i = 0; i < dimNullSpace; ++i)
773  {
774  std::ostringstream oss;
775  oss << "_" << i;
776  // do not project, since this will be recomputed, but make it ghosted, since the near nullspace
777  // builder might march over all nodes
778  for (auto & nl : nls)
779  nl->addVector("NullSpace" + oss.str(), false, libMesh::GHOSTED);
780  }
781  _subspace_dim["NullSpace"] = dimNullSpace;
782  for (unsigned int i = 0; i < dimTransposeNullSpace; ++i)
783  {
784  std::ostringstream oss;
785  oss << "_" << i;
786  // do not project, since this will be recomputed, but make it ghosted, since the near nullspace
787  // builder might march over all nodes
788  for (auto & nl : nls)
789  nl->addVector("TransposeNullSpace" + oss.str(), false, libMesh::GHOSTED);
790  }
791  _subspace_dim["TransposeNullSpace"] = dimTransposeNullSpace;
792  for (unsigned int i = 0; i < dimNearNullSpace; ++i)
793  {
794  std::ostringstream oss;
795  oss << "_" << i;
796  // do not project, since this will be recomputed, but make it ghosted, since the near-nullspace
797  // builder might march over all semilocal nodes
798  for (auto & nl : nls)
799  nl->addVector("NearNullSpace" + oss.str(), false, libMesh::GHOSTED);
800  }
801  _subspace_dim["NearNullSpace"] = dimNearNullSpace;
802 }
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.
Definition: MooseBase.h:131
std::map< std::string, unsigned int > _subspace_dim
Dimension of the subspace spanned by the vectors with a given prefix.

◆ initPetscOutputAndSomeSolverSettings()

void FEProblemBase::initPetscOutputAndSomeSolverSettings ( )
virtual

Reinitialize PETSc output for proper linear/nonlinear iteration display.

This also may be used for some PETSc-related solver settings

Reimplemented in EigenProblem.

Definition at line 6972 of file FEProblemBase.C.

Referenced by possiblyRebuildGeomSearchPatches(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), LStableDirk4::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), and solve().

6973 {
6976 }
void petscSetDefaults(FEProblemBase &problem)
Sets the default options for PETSc.
Definition: PetscSupport.C:450
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
void solveSetup()
Calls the timestepSetup function for each of the output objects.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2525

◆ initXFEM()

void FEProblemBase::initXFEM ( std::shared_ptr< XFEMInterface xfem)

Create XFEM controller object.

Definition at line 8287 of file FEProblemBase.C.

8288 {
8289  _xfem = xfem;
8290  _xfem->setMesh(&_mesh);
8291  if (_displaced_mesh)
8292  _xfem->setDisplacedMesh(_displaced_mesh);
8293 
8294  auto fill_data = [](auto & storage)
8295  {
8296  std::vector<MaterialData *> data(libMesh::n_threads());
8297  for (const auto tid : make_range(libMesh::n_threads()))
8298  data[tid] = &storage.getMaterialData(tid);
8299  return data;
8300  };
8301  _xfem->setMaterialData(fill_data(_material_props));
8302  _xfem->setBoundaryMaterialData(fill_data(_bnd_material_props));
8303 
8304  unsigned int n_threads = libMesh::n_threads();
8305  for (unsigned int i = 0; i < n_threads; ++i)
8306  for (const auto nl_sys_num : index_range(_nl))
8307  {
8308  _assembly[i][nl_sys_num]->setXFEM(_xfem);
8309  if (_displaced_problem)
8310  _displaced_problem->assembly(i, nl_sys_num).setXFEM(_xfem);
8311  }
8312 }
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

◆ isKokkosObject()

bool MooseObject::isKokkosObject ( ) const
inlineinherited

Get whether this object is a Kokkos functor The parameter is set by the Kokkos base classes:

Definition at line 65 of file MooseObject.h.

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

const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
static const std::string kokkos_object_param
The name of the parameter that indicates an object is a Kokkos functor.
Definition: MooseBase.h:64
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

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

732 {
733  return _material_property_requested.find(prop_name) != _material_property_requested.end();
734 }
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty* ...
Definition: SubProblem.h:1064

◆ isParamSetByUser()

bool MooseBase::isParamSetByUser ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is set by a user, as opposed to not set or set to default.

Parameters
nameThe name of the parameter to test

Definition at line 205 of file MooseBase.h.

Referenced by SetupDebugAction::act(), DiffusionCG::addFEBCs(), DiffusionPhysicsBase::addInitialConditions(), MFEMMesh::buildMesh(), MFEMDomainSubMesh::buildSubMesh(), MFEMBoundarySubMesh::buildSubMesh(), LibtorchNeuralNetControl::conditionalParameterError(), ConservativeAdvectionBCTempl< false >::ConservativeAdvectionBCTempl(), MooseApp::copyInputs(), DiffusionPhysicsBase::DiffusionPhysicsBase(), MooseApp::errorCheck(), MFEMVectorFESpace::getFECName(), MooseBase::getRenamedParam(), DefaultConvergenceBase::getSharedExecutionerParam(), AddVariableAction::init(), PhysicsBase::initializePhysics(), ElementSubdomainModifierBase::initialSetup(), MatrixSymmetryCheck::MatrixSymmetryCheck(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), SolutionInvalidityOutput::output(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PetscExternalPartitioner::partition(), MooseMesh::prepare(), SolutionUserObjectBase::readXda(), PhysicsBase::reportPotentiallyMissedParameters(), MooseApp::runInputFile(), MooseApp::runInputs(), MFEMSolverBase::setPreconditioner(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), TagVectorAux::TagVectorAux(), TimedSubdomainModifier::TimedSubdomainModifier(), XYDelaunayGenerator::XYDelaunayGenerator(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

206  {
207  return _pars.isParamSetByUser(name);
208  }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was set by the user.

◆ isParamValid()

bool MooseBase::isParamValid ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 199 of file MooseBase.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), GridPartitioner::_do_partition(), CopyNodalVarsAction::act(), SetupMeshAction::act(), SetupDebugAction::act(), ComposeTimeStepperAction::act(), SetAdaptivityOptionsAction::act(), AddVariableAction::act(), CreateDisplacedProblemAction::act(), CommonOutputAction::act(), 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(), Boundary2DDelaunayGenerator::Boundary2DDelaunayGenerator(), TimedSubdomainModifier::buildFromFile(), ParsedChainControl::buildFunction(), GeneratedMesh::buildMesh(), MooseMesh::buildTypedMesh(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), LibmeshPartitioner::clone(), SampledOutput::cloneMesh(), CombinerGenerator::CombinerGenerator(), FunctorAux::computeValue(), ConservativeAdvectionBCTempl< false >::ConservativeAdvectionBCTempl(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), FEProblemSolve::convergenceSetup(), CopyMeshPartitioner::CopyMeshPartitioner(), CSVReaderVectorPostprocessor::CSVReaderVectorPostprocessor(), CutMeshByLevelSetGeneratorBase::CutMeshByLevelSetGeneratorBase(), ConstantReporter::declareConstantReporterValue(), 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(), FEProblemSolve::FEProblemSolve(), 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(), GeneratedMeshGenerator::generate(), BlockDeletionGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), SideSetsFromNodeSetsGenerator::generate(), MeshExtruderGenerator::generate(), ParsedExtraElementIDGenerator::generate(), XYZDelaunayGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), SubdomainBoundingBoxGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), PropertyReadFile::getFileNames(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBase::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(), ParsedConvergence::initialSetup(), SolutionScalarAux::initialSetup(), PiecewiseTabularBase::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(), MeshGeneratorComponent::MeshGeneratorComponent(), MFEMProblemSolve::MFEMProblemSolve(), 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(), MooseBase::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(), MooseApp::setupOptions(), Output::setWallTimeIntervalFromCommandLineParam(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideSetsGeneratorBase::SideSetsGeneratorBase(), SolutionUserObjectBase::SolutionUserObjectBase(), Terminator::Terminator(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), MultiAppDofCopyTransfer::transfer(), TransformGenerator::TransformGenerator(), TransientBase::TransientBase(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), XYDelaunayGenerator::XYDelaunayGenerator(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

199 { return _pars.isParamValid(name); }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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 ( )
inline

Return a flag to indicate if _snesmf_reuse_base is set by users.

Definition at line 2377 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)
inline

Check if the solver system is nonlinear.

Definition at line 2621 of file FEProblemBase.h.

Referenced by addBoundaryCondition(), addConstraint(), addDamper(), addDGKernel(), addDiracKernel(), addHDGKernel(), addInterfaceKernel(), addKernel(), addScalarKernel(), and ConsoleUtils::outputExecutionInformation().

2621 { return sys_num < _num_nl_sys; }
const std::size_t _num_nl_sys
The number of nonlinear systems.

◆ 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 WebServerControl::execute(), and 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
inlineoverridevirtual

◆ jacobianSetup()

void FEProblemBase::jacobianSetup ( )
overridevirtual

Reimplemented from SubProblem.

Definition at line 9483 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::jacobianSetup().

9484 {
9486  // We need to setup all the nonlinear systems other than our current one which actually called
9487  // this method (so we have to make sure we don't go in a circle)
9488  for (const auto i : make_range(numNonlinearSystems()))
9489  if (i != currentNlSysNum())
9490  _nl[i]->jacobianSetup();
9491  // We don't setup the aux sys because that's been done elsewhere
9492  if (_displaced_problem)
9493  _displaced_problem->jacobianSetup();
9494 }
virtual std::size_t numNonlinearSystems() const override
virtual void jacobianSetup()
Definition: SubProblem.C:1212
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

◆ joinAndFinalize()

void FEProblemBase::joinAndFinalize ( TheWarehouse::Query  query,
bool  isgen = false 
)
private

Definition at line 4954 of file FEProblemBase.C.

Referenced by computeUserObjectsInternal().

4955 {
4956  std::vector<UserObject *> objs;
4957  query.queryInto(objs);
4958  if (!isgen)
4959  {
4960  // join all threaded user objects (i.e. not regular general user objects) to the primary
4961  // thread
4962  for (auto obj : objs)
4963  if (obj->primaryThreadCopy())
4964  obj->primaryThreadCopy()->threadJoin(*obj);
4965  }
4966 
4967  query.condition<AttribThread>(0).queryInto(objs);
4968 
4969  // finalize objects and retrieve/store any postprocessor values
4970  for (auto obj : objs)
4971  {
4972  if (isgen && dynamic_cast<ThreadedGeneralUserObject *>(obj))
4973  continue;
4974  if (isgen)
4975  {
4976  // general user objects are not run in their own threaded loop object - so run them here
4977  if (shouldPrintExecution(0))
4978  _console << "[DBG] Initializing, executing & finalizing general UO '" << obj->name()
4979  << "' on " << _current_execute_on_flag.name() << std::endl;
4980  obj->initialize();
4981  obj->execute();
4982  }
4983 
4984  obj->finalize();
4985 
4986  // These have to be stored piecemeal (with every call to this function) because general
4987  // postprocessors (which run last after other userobjects have been completed) might depend on
4988  // them being stored. This wouldn't be a problem if all userobjects satisfied the dependency
4989  // resolver interface and could be sorted appropriately with the general userobjects, but they
4990  // don't.
4991  auto pp = dynamic_cast<const Postprocessor *>(obj);
4992  if (pp)
4993  {
4994  _reporter_data.finalize(obj->name());
4995  setPostprocessorValueByName(obj->name(), pp->getValue());
4996  }
4997 
4998  auto vpp = dynamic_cast<VectorPostprocessor *>(obj);
4999  if (vpp)
5000  _reporter_data.finalize(obj->name());
5001 
5002  // Update Reporter data
5003  auto reporter = dynamic_cast<Reporter *>(obj);
5004  if (reporter)
5005  _reporter_data.finalize(obj->name());
5006  }
5007 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.
const std::string & name() const
Definition: MooseEnumItem.h:35
void setPostprocessorValueByName(const PostprocessorName &name, const PostprocessorValue &value, std::size_t t_index=0)
Set the value of a PostprocessorValue.
Reporter objects allow for the declaration of arbitrary data types that are aggregate values for a si...
Definition: Reporter.h:47
ReporterData _reporter_data
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
void finalize(const std::string &object_name)
Helper function for performing post calculation actions via the ReporterContext objects.
Definition: ReporterData.C:48
Base class for all Postprocessors.
Definition: Postprocessor.h:23
query_obj query
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Base class for Postprocessors that produce a vector of values.

◆ kokkosAssembly() [1/2]

Moose::Kokkos::Assembly& FEProblemBase::kokkosAssembly ( )
inline

Definition at line 339 of file FEProblemBase.h.

339 { return _kokkos_assembly; }
Moose::Kokkos::Assembly _kokkos_assembly

◆ kokkosAssembly() [2/2]

const Moose::Kokkos::Assembly& FEProblemBase::kokkosAssembly ( ) const
inline

Definition at line 340 of file FEProblemBase.h.

340 { return _kokkos_assembly; }
Moose::Kokkos::Assembly _kokkos_assembly

◆ linearSysNum()

unsigned int FEProblemBase::linearSysNum ( const LinearSystemName &  linear_sys_name) const
overridevirtual
Returns
the linear system number corresponding to the provided linear_sys_name

Implements SubProblem.

Definition at line 6566 of file FEProblemBase.C.

Referenced by Moose::compute_linear_system(), LinearSystem::computeGradients(), computeLinearSystemSys(), LinearSystem::computeLinearSystemTags(), and DisplacedProblem::linearSysNum().

6567 {
6568  std::istringstream ss(linear_sys_name);
6569  unsigned int linear_sys_num;
6570  if (!(ss >> linear_sys_num) || !ss.eof())
6571  linear_sys_num = libmesh_map_find(_linear_sys_name_to_num, linear_sys_name);
6572 
6573  return linear_sys_num;
6574 }
std::map< LinearSystemName, unsigned int > _linear_sys_name_to_num
Map from linear system name to number.

◆ lineSearch()

void FEProblemBase::lineSearch ( )
virtual

execute MOOSE line search

Definition at line 2724 of file FEProblemBase.C.

Referenced by ComputeLineSearchObjectWrapper::linesearch().

2725 {
2726  _line_search->lineSearch();
2727 }
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

Output information about the object just added to the problem.

Definition at line 4409 of file FEProblemBase.C.

Referenced by addAuxArrayVariable(), addAuxScalarKernel(), addAuxScalarVariable(), addAuxVariable(), addConstraint(), addDamper(), addDGKernel(), addDiracKernel(), addFunction(), addFunctorMaterial(), addIndicator(), addInitialCondition(), addInterfaceKernel(), addMarker(), addMaterialHelper(), addMultiApp(), addNodalKernel(), addObject(), addOutput(), addPredictor(), addScalarKernel(), addTimeIntegrator(), addTransfer(), addUserObject(), addVariable(), setAuxKernelParamsAndLog(), and setResidualObjectParamsAndLog().

4413 {
4414  if (_verbose_setup != "false")
4415  _console << "[DBG] Adding " << system << " '" << name << "' of type " << type << std::endl;
4416  if (_verbose_setup == "extra")
4417  _console << params << std::endl;
4418 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
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.

◆ makeLinearSolverParams()

SolverParams FEProblemBase::makeLinearSolverParams ( )
staticprivate

Make basic solver params for linear solves.

Definition at line 9710 of file FEProblemBase.C.

Referenced by FEProblemBase().

9711 {
9712  SolverParams solver_params;
9713  solver_params._type = Moose::SolveType::ST_LINEAR;
9715  return solver_params;
9716 }
Moose::LineSearchType _line_search
Definition: SolverParams.h:20
Solving a linear problem.
Definition: MooseTypes.h:897
Moose::SolveType _type
Definition: SolverParams.h:19

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

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

1373 {
1374  auto family = Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family"));
1375  bool flag = _default_families_without_p_refinement.count(family);
1376  if (params.isParamValid("disable_p_refinement"))
1377  flag = params.get<bool>("disable_p_refinement");
1378 
1379  auto [it, inserted] = _family_for_p_refinement.emplace(family, flag);
1380  if (!inserted && flag != it->second)
1381  mooseError("'disable_p_refinement' not set consistently for variables in ", family);
1382 }
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:1210
static const std::unordered_set< FEFamily > _default_families_without_p_refinement
The set of variable families by default disable p-refinement.
Definition: SubProblem.h:1212
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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 725 of file SubProblem.C.

Referenced by MaterialBase::markMatPropRequested(), and MaterialPropertyInterface::markMatPropRequested().

726 {
727  _material_property_requested.insert(prop_name);
728 }
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty* ...
Definition: SubProblem.h:1064

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

Referenced by SystemBase::addMatrix(), SystemBase::associateMatrixToTag(), Coupleable::coupledMatrixTagValue(), Coupleable::coupledMatrixTagValues(), SystemBase::disassociateDefaultMatrixTags(), SystemBase::disassociateMatrixFromTag(), SystemBase::getMatrix(), SubProblem::getMatrixTagID(), SystemBase::matrixTagActive(), DisplacedProblem::matrixTagExists(), SystemBase::removeMatrix(), and TaggingInterface::useMatrixTag().

330 {
331  auto tag_name_upper = MooseUtils::toUpper(tag_name);
332 
333  return _matrix_tag_name_to_tag_id.find(tag_name_upper) != _matrix_tag_name_to_tag_id.end();
334 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1043
std::string toUpper(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 337 of file SubProblem.C.

338 {
339  return _matrix_tag_id_to_tag_name.find(tag_id) != _matrix_tag_id_to_tag_name.end();
340 }
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:1046

◆ matrixTagName()

TagName SubProblem::matrixTagName ( TagID  tag)
virtualinherited

Retrieve the name associated with a TagID.

Reimplemented in DisplacedProblem.

Definition at line 358 of file SubProblem.C.

Referenced by SystemBase::addMatrix(), DisplacedProblem::matrixTagName(), and SystemBase::removeMatrix().

359 {
360  return _matrix_tag_id_to_tag_name[tag];
361 }
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:1046

◆ mesh() [1/3]

virtual MooseMesh& FEProblemBase::mesh ( )
inlineoverridevirtual

Implements SubProblem.

Reimplemented in MFEMProblem.

Definition at line 169 of file FEProblemBase.h.

Referenced by Adaptivity::adaptMesh(), 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(), 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(), FunctorPositions::initialize(), FunctorTimes::initialize(), ParsedDownSelectionPositions::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), ImageFunction::initialSetup(), initialSetup(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), IntersectionPointsAlongLine::IntersectionPointsAlongLine(), Moose::Mortar::loopOverMortarSegments(), ReporterPointMarker::markerSetup(), MFEMProblem::mesh(), 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().

169 { return _mesh; }
MooseMesh & _mesh

◆ mesh() [2/3]

virtual const MooseMesh& FEProblemBase::mesh ( ) const
inlineoverridevirtual

Implements SubProblem.

Reimplemented in MFEMProblem.

Definition at line 170 of file FEProblemBase.h.

170 { return _mesh; }
MooseMesh & _mesh

◆ mesh() [3/3]

const MooseMesh & FEProblemBase::mesh ( bool  use_displaced) const
overridevirtual

Implements SubProblem.

Definition at line 668 of file FEProblemBase.C.

669 {
670  if (use_displaced && !_displaced_problem)
671  mooseWarning("Displaced mesh was requested but the displaced problem does not exist. "
672  "Regular mesh will be returned");
673  return ((use_displaced && _displaced_problem) ? _displaced_problem->mesh() : mesh());
674 }
void mooseWarning(Args &&... args) const
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 
)
virtual

Update data after a mesh change.

Iff intermediate_change is true, only perform updates as necessary to prepare for another mesh change immediately-subsequent. An example of data that is not updated during an intermediate change is libMesh System matrix data. An example of data that 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 8345 of file FEProblemBase.C.

Referenced by SidesetAroundSubdomainUpdater::finalize(), ActivateElementsUserObjectBase::finalize(), Exodus::handleExodusIOMeshRenumbering(), ElementSubdomainModifierBase::modify(), and Adaptivity::uniformRefineWithProjection().

8348 {
8349  TIME_SECTION("meshChanged", 3, "Handling Mesh Changes");
8350 
8353  _mesh.cacheChangedLists(); // Currently only used with adaptivity and stateful material
8354  // properties
8355 
8356  // Clear these out because they corresponded to the old mesh
8357  _ghosted_elems.clear();
8359 
8360  // The mesh changed. We notify the MooseMesh first, because
8361  // callbacks (e.g. for sparsity calculations) triggered by the
8362  // EquationSystems reinit may require up-to-date MooseMesh caches.
8363  _mesh.meshChanged();
8364 
8365  // If we're just going to alter the mesh again, all we need to
8366  // handle here is AMR and projections, not full system reinit
8367  if (intermediate_change)
8368  es().reinit_solutions();
8369  else
8370  es().reinit();
8371 
8372  if (contract_mesh)
8373  // Once vectors are restricted, we can delete children of coarsened elements
8374  _mesh.getMesh().contract();
8375  if (clean_refinement_flags)
8376  {
8377  // Finally clear refinement flags so that if someone tries to project vectors again without
8378  // an intervening mesh refinement to clear flags they won't run into trouble
8379  MeshRefinement refinement(_mesh.getMesh());
8380  refinement.clean_refinement_flags();
8381  }
8382 
8383  if (!intermediate_change)
8384  {
8385  // Since the mesh has changed, we need to make sure that we update any of our
8386  // MOOSE-system specific data.
8387  for (auto & sys : _solver_systems)
8388  sys->reinit();
8389  _aux->reinit();
8390  }
8391 
8392  // Updating MooseMesh first breaks other adaptivity code, unless we
8393  // then *again* update the MooseMesh caches. E.g. the definition of
8394  // "active" and "local" may have been *changed* by refinement and
8395  // repartitioning done in EquationSystems::reinit().
8396  _mesh.meshChanged();
8397 
8398  // If we have finite volume variables, we will need to recompute additional elemental/face
8399  // quantities
8402 
8403  // Let the meshChangedInterface notify the mesh changed event before we update the active
8404  // semilocal nodes, because the set of ghosted elements may potentially be updated during a mesh
8405  // changed event.
8406  for (const auto & mci : _notify_when_mesh_changes)
8407  mci->meshChanged();
8408 
8409  // Since the Mesh changed, update the PointLocator object used by DiracKernels.
8411 
8412  // Need to redo ghosting
8414 
8415  if (_displaced_problem)
8416  {
8417  _displaced_problem->meshChanged(contract_mesh, clean_refinement_flags);
8419  }
8420 
8422 
8425 
8426  // Just like we reinitialized our geometric search objects, we also need to reinitialize our
8427  // mortar meshes. Note that this needs to happen after DisplacedProblem::meshChanged because the
8428  // mortar mesh discretization will depend necessarily on the displaced mesh being re-displaced
8429  updateMortarMesh();
8430 
8431  // Nonlinear systems hold the mortar mesh functors. The domains of definition of the mortar
8432  // functors might have changed when the mesh changed.
8433  for (auto & nl_sys : _nl)
8434  nl_sys->reinitMortarFunctors();
8435 
8436  reinitBecauseOfGhostingOrNewGeomObjects(/*mortar_changed=*/true);
8437 
8438  // We need to create new storage for newly active elements, and copy
8439  // stateful properties from the old elements.
8442  {
8443  if (havePRefinement())
8445 
8446  // Prolong properties onto newly refined elements' children
8447  {
8449  /* refine = */ true, *this, _material_props, _bnd_material_props, _assembly);
8450  const auto & range = *_mesh.refinedElementRange();
8451  Threads::parallel_reduce(range, pmp);
8452 
8453  // Concurrent erasure from the shared hash map is not safe while we are reading from it in
8454  // ProjectMaterialProperties, so we handle erasure here. Moreover, erasure based on key is
8455  // not thread safe in and of itself because it is a read-write operation. Note that we do not
8456  // do the erasure for p-refinement because the coarse level element is the same as our active
8457  // refined level element
8458  if (!doingPRefinement())
8459  for (const auto & elem : range)
8460  {
8464  }
8465  }
8466 
8467  // Restrict properties onto newly coarsened elements
8468  {
8470  /* refine = */ false, *this, _material_props, _bnd_material_props, _assembly);
8471  const auto & range = *_mesh.coarsenedElementRange();
8472  Threads::parallel_reduce(range, pmp);
8473  // Note that we do not do the erasure for p-refinement because the coarse level element is the
8474  // same as our active refined level element
8475  if (!doingPRefinement())
8476  for (const auto & elem : range)
8477  {
8478  auto && coarsened_children = _mesh.coarsenedElementChildren(elem);
8479  for (auto && child : coarsened_children)
8480  {
8484  }
8485  }
8486  }
8487  }
8488 
8491 
8492  _has_jacobian = false; // we have to recompute jacobian when mesh changed
8493 
8494  // Now for backwards compatibility with user code that overrode the old no-arg meshChanged we must
8495  // call it here
8496  meshChanged();
8497 }
void setVariableAllDoFMap(const std::vector< const MooseVariableFEBase *> &moose_vars)
bool isFiniteVolumeInfoDirty() const
Definition: MooseMesh.h:1322
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:940
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:958
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1095
std::unique_ptr< libMesh::ConstElemRange > _nl_evaluable_local_elem_range
bool _calculate_jacobian_in_uo
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool havePRefinement() const
Query whether p-refinement has been requested at any point during the simulation. ...
Definition: SubProblem.h:1011
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3528
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:1366
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:970
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:978
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:964
std::unique_ptr< libMesh::ConstElemRange > _evaluable_local_elem_range
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:1051
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:909
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2418
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:4152

◆ meshChanged() [2/2]

virtual void FEProblemBase::meshChanged ( )
inlineprotectedvirtual

Deprecated.

Users should switch to overriding the meshChanged which takes arguments

Definition at line 2767 of file FEProblemBase.h.

Referenced by adaptMesh(), initialAdaptMesh(), meshChanged(), timestepSetup(), uniformRefine(), and updateMeshXFEM().

2767 {}

◆ meshDisplaced()

void FEProblemBase::meshDisplaced ( )
protectedvirtual

Update data after a mesh displaced.

Definition at line 8512 of file FEProblemBase.C.

Referenced by DisplacedProblem::updateMesh().

8513 {
8514  for (const auto & mdi : _notify_when_mesh_displaces)
8515  mdi->meshDisplaced();
8516 }
std::vector< MeshDisplacedInterface * > _notify_when_mesh_displaces
Objects to be notified when the mesh displaces.

◆ messagePrefix()

std::string MooseBase::messagePrefix ( const bool  hit_prefix = true) const
inlineinherited
Returns
A prefix to be used in messages that contain the input file location associated with this object (if any) and the name and type of the object.

Definition at line 256 of file MooseBase.h.

Referenced by MooseBase::callMooseError(), MooseBase::errorPrefix(), MooseBase::mooseDeprecated(), MooseBase::mooseInfo(), and MooseBase::mooseWarning().

257  {
258  return messagePrefix(_pars, hit_prefix);
259  }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:256

◆ mooseDeprecated() [1/2]

template<typename... Args>
void SolutionInvalidInterface::mooseDeprecated ( Args &&...  args) const
inlineinherited

Definition at line 87 of file SolutionInvalidInterface.h.

Referenced by addAuxArrayVariable(), addAuxScalarVariable(), addAuxVariable(), advanceMultiApps(), MultiApp::appProblem(), ChangeOverTimestepPostprocessor::ChangeOverTimestepPostprocessor(), AddVariableAction::determineType(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), MooseMesh::elem(), UserForcingFunction::f(), FaceFaceConstraint::FaceFaceConstraint(), FunctionDT::FunctionDT(), RandomICBase::generateRandom(), MooseMesh::getBoundariesToElems(), Control::getExecuteOptions(), getNonlinearSystem(), getUserObjects(), hasPostprocessor(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalScalarKernel::NodalScalarKernel(), MooseMesh::node(), FixedPointSolve::numPicardIts(), RelationshipManager::operator>=(), PercentChangePostprocessor::PercentChangePostprocessor(), ReferenceResidualConvergence::ReferenceResidualConvergence(), Residual::Residual(), MooseMesh::setBoundaryToNormalMap(), Exodus::setOutputDimension(), TagVectorAux::TagVectorAux(), UserForcingFunction::UserForcingFunction(), and VariableResidual::VariableResidual().

88  {
89  _si_moose_base.MooseBase::mooseDeprecated(std::forward<Args>(args)...);
90  flagSolutionWarningMultipleRegistration(_si_moose_base.name() + ": deprecation");
91  }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

◆ mooseDeprecated() [2/2]

template<typename... Args>
void MooseBase::mooseDeprecated ( Args &&...  args) const
inlineinherited

Definition at line 314 of file MooseBase.h.

Referenced by DataFileInterface::getDataFileName(), DataFileInterface::getDataFileNameByName(), MooseApp::getRecoverFileBase(), MooseApp::hasRecoverFileBase(), and MooseApp::setupOptions().

315  {
317  _console, false, true, messagePrefix(true), std::forward<Args>(args)...);
318  }
void mooseDeprecatedStream(S &oss, const bool expired, const bool print_title, Args &&... args)
Definition: MooseError.h:265
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:256

◆ mooseDocumentedError()

template<typename... Args>
void MooseBase::mooseDocumentedError ( const std::string &  repo_name,
const unsigned int  issue_num,
Args &&...  args 
) const
inlineinherited

Definition at line 277 of file MooseBase.h.

Referenced by ArrayDGLowerDKernel::ArrayDGLowerDKernel(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), DGLowerDKernel::DGLowerDKernel(), HFEMDirichletBC::HFEMDirichletBC(), and LowerDIntegratedBC::LowerDIntegratedBC().

280  {
282  repo_name, issue_num, argumentsToString(std::forward<Args>(args)...)),
283  /* with_prefix = */ true);
284  }
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
External method for calling moose error with added object context.
Definition: MooseBase.C:105
std::string formatMooseDocumentedError(const std::string &repo_name, const unsigned int issue_num, const std::string &msg)
Formats a documented error.
Definition: MooseError.C:128

◆ mooseError()

template<typename... Args>
void MooseBase::mooseError ( Args &&...  args) const
inlineinherited

Emits an error prefixed with object name and type and optionally a file path to the top-level block parameter if available.

Definition at line 271 of file MooseBase.h.

Referenced by CopyMeshPartitioner::_do_partition(), HierarchicalGridPartitioner::_do_partition(), GridPartitioner::_do_partition(), PetscExternalPartitioner::_do_partition(), MultiAppGeneralFieldTransfer::acceptPointInOriginMesh(), AutoCheckpointAction::act(), AddVectorPostprocessorAction::act(), CheckIntegrityAction::act(), CreateExecutionerAction::act(), AddBoundsVectorsAction::act(), AddMeshGeneratorAction::act(), AddFVICAction::act(), AddICAction::act(), InitProblemAction::act(), CheckFVBCAction::act(), SetupMeshCompleteAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), CombineComponentsMeshes::act(), SetupMeshAction::act(), SplitMeshAction::act(), AdaptivityAction::act(), AddTimeStepperAction::act(), ChainControlSetupAction::act(), CSGOnlyAction::act(), DeprecatedBlockAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), CreateDisplacedProblemAction::act(), SetAdaptivityOptionsAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), AddMFEMSubMeshAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), Action::Action(), adaptMesh(), ADArrayReaction::ADArrayReaction(), MooseVariableFV< Real >::adCurlSln(), MooseVariableFV< Real >::adCurlSlnNeighbor(), AddActionComponentAction::AddActionComponentAction(), MFEMProblem::addBoundaryCondition(), addBoundaryCondition(), DiffusionCG::addBoundaryConditionsFromComponents(), PhysicsComponentInterface::addBoundaryConditionsFromComponents(), addConstraint(), addDamper(), addDGKernel(), addDiracKernel(), DistributedRectilinearMeshGenerator::addElement(), MooseApp::addExecutor(), addFunction(), SubProblem::addFunctor(), addFVInitialCondition(), ADDGKernel::ADDGKernel(), addHDGKernel(), addInitialCondition(), PhysicsComponentInterface::addInitialConditionsFromComponents(), addInterfaceKernel(), MFEMProblem::addKernel(), addKernel(), FEProblem::addLineSearch(), addLineSearch(), MFEMProblem::addMaterial(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), addObjectParamsHelper(), addOutput(), SubProblem::addPiecewiseByBlockLambdaFunctor(), DiracKernelBase::addPoint(), DistributedRectilinearMeshGenerator::addPoint(), DiracKernelBase::addPointWithValidId(), addPostprocessor(), addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MooseMesh::addQuadratureNode(), Action::addRelationshipManager(), addReporter(), addScalarKernel(), WebServerControl::addServerAction(), AddVariableAction::addVariable(), addVectorPostprocessor(), SubProblem::addVectorTag(), MooseLinearVariableFV< Real >::adError(), ADInterfaceKernelTempl< T >::ADInterfaceKernelTempl(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), MooseVariableScalar::adUDot(), Output::advancedExecuteOn(), AdvectiveFluxAux::AdvectiveFluxAux(), MooseVariableBase::allDofIndices(), NEML2ModelExecutor::applyPredictor(), MooseApp::appNameToLibName(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayConstantIC::ArrayConstantIC(), ArrayDGKernel::ArrayDGKernel(), ArrayDiffusion::ArrayDiffusion(), ArrayFunctionIC::ArrayFunctionIC(), ArrayReaction::ArrayReaction(), ArrayTimeDerivative::ArrayTimeDerivative(), MooseApp::attachRelationshipManagers(), AddPeriodicBCAction::autoTranslationBoundaries(), AuxKernelBase::AuxKernelBase(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), Boundary2DDelaunayGenerator::Boundary2DDelaunayGenerator(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), MooseMesh::buildCoarseningMap(), MultiApp::buildComm(), DistributedRectilinearMeshGenerator::buildCube(), PiecewiseTabularInterface::buildFromFile(), TimedSubdomainModifier::buildFromFile(), PiecewiseTabularInterface::buildFromJSON(), TimedSubdomainModifier::buildFromParameters(), PiecewiseTabularInterface::buildFromXY(), PiecewiseLinearBase::buildInterpolation(), MooseMesh::buildLowerDMesh(), TiledMesh::buildMesh(), GeneratedMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), MeshGeneratorMesh::buildMesh(), ImageMeshGenerator::buildMesh3D(), ImageMesh::buildMesh3D(), MooseMesh::buildRefinementMap(), MaterialBase::buildRequiredMaterials(), 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(), checkDependMaterialsHelper(), checkDisplacementOrders(), checkDuplicatePostprocessorVariableNames(), DefaultConvergenceBase::checkDuplicateSetSharedExecutionerParams(), MooseMesh::checkDuplicateSubdomainNames(), checkExceptionAndStopSolve(), NEML2ModelExecutor::checkExecutionStage(), MaterialBase::checkExecutionStage(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), checkICRestartError(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), Eigenvalue::checkIntegrity(), DefaultMultiAppFixedPointConvergence::checkIterationType(), DefaultNonlinearConvergence::checkIterationType(), DefaultSteadyStateConvergence::checkIterationType(), ExplicitTimeIntegrator::checkLinearConvergence(), MooseApp::checkMetaDataIntegrity(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), PostprocessorInterface::checkParam(), checkProblemIntegrity(), Sampler::checkReinitStatus(), MooseApp::checkReservedCapability(), MultiAppGeneralFieldNearestLocationTransfer::checkRestrictionsForSource(), MultiAppPostprocessorToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppScalarToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppPostprocessorTransfer::checkSiblingsTransferSupported(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), MultiAppMFEMCopyTransfer::checkSiblingsTransferSupported(), MultiAppCopyTransfer::checkSiblingsTransferSupported(), MultiAppTransfer::checkSiblingsTransferSupported(), MFEMSolverBase::checkSpectralEquivalence(), MaterialBase::checkStatefulSanity(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), 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(), 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(), computeJacobianTags(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), EigenProblem::computeMatricesTags(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), ArrayKernel::computeOffDiagJacobian(), ArrayIntegratedBC::computeOffDiagJacobian(), FVElementalKernel::computeOffDiagJacobian(), Moose::Kokkos::ResidualObject::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(), ADArrayNodalKernel::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), ScalarKernel::computeQpResidual(), MassMatrix::computeQpResidual(), HDGKernel::computeQpResidual(), DiffusionLHDGDirichletBC::computeQpResidual(), DiffusionLHDGPrescribedGradientBC::computeQpResidual(), NodalEqualValueConstraint::computeQpResidual(), IPHDGBC::computeQpResidual(), KernelValue::computeQpResidual(), TorchScriptMaterial::computeQpValues(), InterfaceQpValueUserObject::computeRealValue(), ArrayKernel::computeResidual(), ArrayIntegratedBC::computeResidual(), FVFluxBC::computeResidual(), FVFluxKernel::computeResidual(), NodalConstraint::computeResidual(), FVFluxKernel::computeResidualAndJacobian(), ResidualObject::computeResidualAndJacobian(), computeResidualAndJacobian(), HDGKernel::computeResidualAndJacobianOnSide(), computeResidualInternal(), computeResidualTag(), computeResidualTags(), 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(), ConservativeAdvectionBCTempl< false >::ConservativeAdvectionBCTempl(), TimeStepper::constrainStep(), LibtorchNeuralNetControl::controlNeuralNet(), TransientBase::convergedToSteadyState(), ParsedConvergence::convertRealToBool(), MooseApp::copyInputs(), CopyMeshPartitioner::CopyMeshPartitioner(), CoupledForceNodalKernel::CoupledForceNodalKernel(), MultiApp::createApp(), MooseApp::createExecutors(), AddVariableAction::createInitialConditionAction(), MooseApp::createRMFromTemplateAndInit(), Function::curl(), MooseVariableFV< Real >::curlPhi(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), SidesetInfoVectorPostprocessor::dataHelper(), ReporterTransferInterface::declareClone(), Moose::Kokkos::MaterialBase::declareKokkosPropertyByName(), MeshGenerator::declareMeshProperty(), ReporterTransferInterface::declareVectorClone(), DefaultSteadyStateConvergence::DefaultSteadyStateConvergence(), FunctorRelationshipManager::delete_remote_elements(), MooseMesh::deleteRemoteElements(), BicubicSplineFunction::derivative(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), MooseMesh::detectPairedSidesets(), MooseApp::determineLibtorchDeviceType(), determineSolverSystem(), DGKernel::DGKernel(), MeshDiagnosticsGenerator::diagnosticsLog(), DistributedPositions::DistributedPositions(), Function::div(), FunctorBinnedValuesDivision::divisionIndex(), MooseVariableFV< Real >::divPhi(), FunctorRelationshipManager::dofmap_reinit(), EigenProblem::doFreeNonlinearPowerIterations(), duplicateVariableCheck(), MooseApp::dynamicAllRegistration(), MooseApp::dynamicAppRegistration(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementIntegerAux::ElementIntegerAux(), ElementMaterialSampler::ElementMaterialSampler(), ElementQualityAux::ElementQualityAux(), ElementUOAux::ElementUOAux(), ExtraIDIntegralVectorPostprocessor::elementValue(), DistributedRectilinearMeshGenerator::elemId(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), EigenKernel::enabled(), MooseApp::errorCheck(), 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(), PositionsFunctorValueSampler::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), NodalValueSampler::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppPostprocessorTransfer::execute(), ElementQualityChecker::execute(), GreaterThanLessThanPostprocessor::execute(), PointValue::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), FindValueOnLine::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppMFEMCopyTransfer::execute(), MultiAppCopyTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppGeometricInterpolationTransfer::execute(), InterfaceQpUserObjectBase::execute(), TransientBase::execute(), LeastSquaresFit::execute(), VectorPostprocessorComparison::execute(), LeastSquaresFitHistory::execute(), WebServerControl::execute(), Eigenvalue::execute(), TimeExtremeValue::execute(), DomainUserObject::execute(), execute(), executeControls(), MooseApp::executeExecutioner(), 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(), VerifyNodalUniqueID::finalize(), ParsedVectorReporter::finalize(), VerifyElementUniqueID::finalize(), ParsedVectorVectorRealReductionReporter::finalize(), DiscreteElementUserObject::finalize(), ElementQualityChecker::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), DiscreteVariableResidualNorm::finalize(), NearestPointAverage::finalize(), NearestPointIntegralVariablePostprocessor::finalize(), MooseApp::finalizeRestore(), 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(), ElementSubdomainModifierBase::gatherPatchElements(), Boundary2DDelaunayGenerator::General2DDelaunay(), ElementOrderConversionGenerator::generate(), MoveNodeGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), SideSetsFromNormalsGenerator::generate(), SmoothMeshGenerator::generate(), SubdomainPerElementGenerator::generate(), TiledMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), MeshRepairGenerator::generate(), SideSetsFromPointsGenerator::generate(), StitchMeshGenerator::generate(), GeneratedMeshGenerator::generate(), FlipSidesetGenerator::generate(), CoarsenBlockGenerator::generate(), Boundary2DDelaunayGenerator::generate(), BreakMeshByBlockGenerator::generate(), MeshDiagnosticsGenerator::generate(), ParsedGenerateNodeset::generate(), SideSetsFromBoundingBoxGenerator::generate(), StackGenerator::generate(), XYZDelaunayGenerator::generate(), AdvancedExtruderGenerator::generate(), AllSideSetsByNormalsGenerator::generate(), CombinerGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), SpiralAnnularMeshGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), CutMeshByLevelSetGeneratorBase::generate(), PatternedMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), MeshGenerator::generateCSG(), MeshGenerator::generateData(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), 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(), getActualFieldVariable(), DisplacedProblem::getArrayVariable(), getArrayVariable(), MooseMesh::getAxisymmetricRadialCoord(), NEML2BatchIndexGenerator::getBatchIndex(), MooseMesh::getBlockConnectedBlocks(), VariableOldValueBounds::getBound(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), ChainControl::getChainControlDataByName(), WebServerControl::getClientInfo(), MooseMesh::getCoarseningMap(), NodalPatchRecoveryBase::getCoefficients(), MultiApp::getCommandLineArgs(), MooseVariableBase::getContinuity(), Control::getControllableParameterByName(), getConvergence(), MooseMesh::getCoordSystem(), PhysicsBase::getCoupledPhysics(), PropertyReadFile::getData(), DataFileInterface::getDataFilePath(), TransfiniteMeshGenerator::getDiscreteEdge(), 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(), WebServerControl::Response::getError(), MultiApp::getExecutioner(), MooseApp::getExecutor(), MFEMVectorFESpace::getFECName(), MultiAppTransfer::getFromMultiApp(), MultiAppTransfer::getFromMultiAppInfo(), getFunction(), SubProblem::getFunctor(), getFVMatsAndDependencies(), MooseMesh::getGeneralAxisymmetricCoordAxis(), MaterialPropertyInterface::getGenericMaterialPropertyByName(), DistributedRectilinearMeshGenerator::getGhostNeighbors(), DistributedRectilinearMeshGenerator::getIndices(), getKokkosFunction(), FunctionInterface::getKokkosFunctionByName(), MaterialPropertyInterface::getKokkosMaterialPropertyByName(), getLinearConvergenceNames(), SolutionUserObjectBase::getLocalVarIndex(), Material::getMaterialByName(), getMaterialData(), getMaterialPropertyStorageConsumers(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), getMaxQps(), getMeshDivision(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), AnnularMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MultiAppTransfer::getMultiApp(), getMultiAppFixedPointConvergenceName(), DistributedRectilinearMeshGenerator::getNeighbors(), Times::getNextTime(), MooseMesh::getNodeBlockIds(), PropertyReadFile::getNodeData(), MooseMesh::getNodeList(), getNonlinearConvergenceNames(), EigenProblem::getNonlinearEigenSystem(), getNonlinearSystem(), NEML2ModelExecutor::getOutput(), NEML2ModelExecutor::getOutputDerivative(), NEML2ModelExecutor::getOutputParameterDerivative(), MooseMesh::getPairedBoundaryMapping(), MaterialOutputAction::getParams(), ImageMeshGenerator::GetPixelInfo(), ImageMesh::GetPixelInfo(), PlaneIDMeshGenerator::getPlaneID(), Positions::getPosition(), Positions::getPositions(), getPositionsObject(), Positions::getPositionsVector2D(), Positions::getPositionsVector3D(), Positions::getPositionsVector4D(), PostprocessorInterface::getPostprocessorValueByNameInternal(), Times::getPreviousTime(), ComponentMaterialPropertyInterface::getPropertyValue(), InterfaceQpUserObjectBase::getQpValue(), MooseMesh::getRefinementMap(), MooseBase::getRenamedParam(), ReporterInterface::getReporterContextBaseByName(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), MooseApp::getRestartableDataMap(), MooseApp::getRestartableDataMapName(), MooseApp::getRestartableMetaData(), MooseApp::getRMClone(), getSampler(), DisplacedProblem::getScalarVariable(), getScalarVariable(), MooseObject::getSharedPtr(), InterfaceQpUserObjectBase::getSideAverageValue(), PhysicsBase::getSolverSystem(), DisplacedProblem::getStandardVariable(), getStandardVariable(), getSteadyStateConvergenceName(), MooseMesh::getSubdomainBoundaryIds(), TimedSubdomainModifier::getSubdomainIDAndCheck(), DisplacedProblem::getSystem(), getSystem(), getSystemBase(), Times::getTimeAtIndex(), getTimeFromStateArg(), TransientBase::getTimeIntegratorNames(), Times::getTimes(), MultiAppTransfer::getToMultiApp(), MultiAppTransfer::getToMultiAppInfo(), MooseMesh::getUniqueCoordSystem(), getUserObject(), 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(), getVectorVariable(), GhostingFromUOAux::GhostingFromUOAux(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), Function::gradient(), 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(), EigenExecutionerBase::init(), ExplicitTimeIntegrator::init(), TransientBase::init(), FEProblem::init(), AddAuxVariableAction::init(), IterationAdaptiveDT::init(), Eigenvalue::init(), AddVariableAction::init(), MooseMesh::init(), Sampler::init(), init(), MultiApp::init(), initialAdaptMesh(), NestedDivision::initialize(), ReporterPositions::initialize(), DistributedPositions::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(), IntegralPreservingFunctionIC::initialSetup(), MultiAppConservativeTransfer::initialSetup(), FullSolveMultiApp::initialSetup(), PiecewiseLinear::initialSetup(), CoarsenedPiecewiseLinear::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), SolutionScalarAux::initialSetup(), LinearFVDiffusion::initialSetup(), LinearFVAnisotropicDiffusion::initialSetup(), LinearFVAdvection::initialSetup(), SolutionAux::initialSetup(), ExplicitTimeIntegrator::initialSetup(), ReferenceResidualConvergence::initialSetup(), NodalVariableValue::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), ElementSubdomainModifierBase::initialSetup(), Exodus::initialSetup(), CSV::initialSetup(), MooseParsedFunction::initialSetup(), SolutionUserObjectBase::initialSetup(), initialSetup(), SubProblem::initialSetup(), AdvancedOutput::initOutputList(), 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(), MooseApp::libNameToAppName(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< Real >::LineMaterialSamplerBase(), LineSearch::lineSearch(), LineValueSampler::LineValueSampler(), MooseApp::loadLibraryAndDependencies(), 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(), MFEMCrossProductAux::MFEMCrossProductAux(), MFEMDotProductAux::MFEMDotProductAux(), 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(), needsPreviousNewtonIteration(), NewmarkBeta::NewmarkBeta(), NodalConstraint::NodalConstraint(), MooseVariableFV< Real >::nodalDofIndex(), MooseVariableFV< Real >::nodalDofIndexNeighbor(), MooseLinearVariableFV< Real >::nodalError(), MooseVariableFV< Real >::nodalMatrixTagValue(), 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(), MooseApp::outputMachineReadableData(), 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(), PiecewiseTabularInterface::PiecewiseTabularInterface(), 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(), FunctorKernel::precomputeQpResidual(), Predictor::Predictor(), TransientBase::preExecute(), MooseMesh::prepare(), MooseMesh::prepared(), ElementSubdomainModifierBase::prepareVariableForReinitialization(), FixedPointSolve::printFixedPointConvergenceReason(), PseudoTimestep::PseudoTimestep(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObjectBase::readExodusII(), SolutionUserObjectBase::readXda(), CoarsenBlockGenerator::recursiveCoarsen(), MooseApp::recursivelyCreateExecutors(), FunctorRelationshipManager::redistribute(), ReferenceResidualConvergence::ReferenceResidualConvergence(), MooseApp::registerRestartableData(), MooseApp::registerRestartableNameWithFilter(), Sampler::reinit(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), MFEMTransient::relativeSolutionDifferenceNorm(), MooseApp::removeRelationshipManager(), PhysicsBase::reportPotentiallyMissedParameters(), MooseApp::restore(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), MooseApp::run(), MooseApp::runInputs(), 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(), setCoupling(), PiecewiseBase::setData(), FileOutput::setFileBaseInternal(), MooseMesh::setGeneralAxisymmetricCoordAxes(), FEProblemSolve::setInnerSolve(), MeshGenerator::setMeshProperty(), MooseApp::setMFEMDevice(), FVPointValueConstraint::setMyElem(), setNonlocalCouplingMatrix(), Sampler::setNumberOfCols(), Sampler::setNumberOfRandomSeeds(), Sampler::setNumberOfRows(), Exodus::setOutputDimensionInExodusWriter(), AddPeriodicBCAction::setPeriodicVars(), MFEMSolverBase::setPreconditioner(), MultiAppGeneralFieldTransfer::setSolutionVectorValues(), Split::setup(), TransientMultiApp::setupApp(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), 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(), MooseVariableBase::sizeMatrixTagData(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), SolutionUserObjectBase::SolutionUserObjectBase(), ExplicitTVDRK2::solve(), ExplicitRK2::solve(), TimeIntegrator::solve(), solverSysNum(), FullSolveMultiApp::solveStep(), SpatialAverageBase::SpatialAverageBase(), UserObject::spatialPoints(), NearestPointIntegralVariablePostprocessor::spatialValue(), NearestPointAverage::spatialValue(), MeshDivisionFunctorReductionVectorPostprocessor::spatialValue(), UserObject::spatialValue(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), MultiAppGeometricInterpolationTransfer::subdomainIDsNode(), Constraint::subdomainSetup(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), MaterialBase::subdomainSetup(), swapBackMaterialsNeighbor(), DisplacedProblem::systemBaseLinear(), Console::systemInfoFlags(), 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(), trustUserCouplingMatrix(), MooseVariableScalar::uDot(), MooseVariableScalar::uDotDot(), MooseVariableScalar::uDotDotOld(), uDotDotOldRequested(), MooseVariableScalar::uDotOld(), uDotOldRequested(), MooseBase::uniqueName(), Positions::unrollMultiDPositions(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), Checkpoint::updateCheckpointFiles(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObjectBase::updateExodusBracketingTimeIndices(), updateMaxQps(), MFEMHypreADS::updateSolver(), MFEMHypreAMS::updateSolver(), MFEMHypreFGMRES::updateSolver(), MFEMGMRESSolver::updateSolver(), MFEMCGSolver::updateSolver(), MFEMHyprePCG::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(), MooseApp::writeRestartableMetaData(), DOFMapOutput::writeStreamToFile(), and Console::writeStreamToFile().

272  {
273  callMooseError(argumentsToString(std::forward<Args>(args)...), /* with_prefix = */ true);
274  }
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
External method for calling moose error with added object context.
Definition: MooseBase.C:105

◆ mooseErrorNonPrefixed()

template<typename... Args>
void MooseBase::mooseErrorNonPrefixed ( Args &&...  args) const
inlineinherited

Emits an error without the prefixing included in mooseError().

Definition at line 290 of file MooseBase.h.

291  {
292  callMooseError(argumentsToString(std::forward<Args>(args)...), /* with_prefix = */ false);
293  }
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
External method for calling moose error with added object context.
Definition: MooseBase.C:105

◆ mooseInfo()

template<typename... Args>
void MooseBase::mooseInfo ( Args &&...  args) const
inlineinherited

Definition at line 321 of file MooseBase.h.

Referenced by SetupRecoverFileBaseAction::act(), AStableDirk4::AStableDirk4(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MultiAppGeneralFieldNearestLocationTransfer::evaluateInterpValuesNearestNode(), PIDTransientControl::execute(), Executioner::Executioner(), ExplicitRK2::ExplicitRK2(), ExplicitTVDRK2::ExplicitTVDRK2(), DataFileInterface::getDataFilePath(), 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(), MooseBase::paramInfo(), ProjectionAux::ProjectionAux(), ReferenceResidualConvergence::ReferenceResidualConvergence(), MFEMDataCollection::registerFields(), setRestartFile(), MooseApp::setupOptions(), SolutionUserObjectBase::SolutionUserObjectBase(), SymmetryTransformGenerator::SymmetryTransformGenerator(), TransientBase::takeStep(), and TransientBase::TransientBase().

322  {
323  moose::internal::mooseInfoStream(_console, messagePrefix(true), std::forward<Args>(args)...);
324  }
void mooseInfoStream(S &oss, Args &&... args)
Definition: MooseError.h:258
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:256

◆ mooseWarning() [1/2]

template<typename... Args>
void SolutionInvalidInterface::mooseWarning ( Args &&...  args) const
inlineinherited

Definition at line 73 of file SolutionInvalidInterface.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(), StitchMeshGenerator::generate(), ParsedGenerateSideset::generate(), MultiAppTransfer::getAppInfo(), FunctorBinnedValuesDivision::getBinIndex(), MFEMVectorFESpace::getFECName(), PointSamplerBase::getLocalElemContainingPoint(), getMaterial(), LineValueSampler::getValue(), Terminator::handleMessage(), IndicatorMarker::IndicatorMarker(), CylindricalGridDivision::initialize(), SphericalGridDivision::initialize(), ElementGroupCentroidPositions::initialize(), CartesianGridDivision::initialize(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), BoundsBase::initialSetup(), ReferenceResidualConvergence::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), LeastSquaresFit::LeastSquaresFit(), IterationAdaptiveDT::limitDTToPostprocessorValue(), mesh(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), NewmarkBeta::NewmarkBeta(), NodalPatchRecovery::NodalPatchRecovery(), NonlocalIntegratedBC::NonlocalIntegratedBC(), NonlocalKernel::NonlocalKernel(), Output::Output(), MaterialOutputAction::outputHelper(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PiecewiseConstantFromCSV::PiecewiseConstantFromCSV(), Executioner::problem(), PropertyReadFile::readData(), TestSourceStepper::rejectStep(), PhysicsBase::reportPotentiallyMissedParameters(), MaterialBase::resetQpProperties(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), MooseMesh::setCoordSystem(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), sizeZeroes(), TransientMultiApp::solveStep(), Tecplot::Tecplot(), TimeDerivativeAux::TimeDerivativeAux(), Checkpoint::updateCheckpointFiles(), SampledOutput::updateSample(), PiecewiseConstantFromCSV::value(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

74  {
75  _si_moose_base.MooseBase::mooseWarning(std::forward<Args>(args)...);
76  flagSolutionWarningMultipleRegistration(_si_moose_base.name() + ": warning");
77  }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

◆ mooseWarning() [2/2]

template<typename... Args>
void MooseBase::mooseWarning ( Args &&...  args) const
inlineinherited

Emits a warning prefixed with object name and type.

Definition at line 299 of file MooseBase.h.

Referenced by DataFileInterface::getDataFilePath(), MooseApp::loadLibraryAndDependencies(), and MooseBase::paramWarning().

300  {
301  moose::internal::mooseWarningStream(_console, messagePrefix(true), std::forward<Args>(args)...);
302  }
void mooseWarningStream(S &oss, Args &&... args)
Definition: MooseError.h:210
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:256

◆ mooseWarningNonPrefixed() [1/2]

template<typename... Args>
void SolutionInvalidInterface::mooseWarningNonPrefixed ( Args &&...  args) const
inlineinherited

Definition at line 80 of file SolutionInvalidInterface.h.

81  {
82  _si_moose_base.MooseBase::mooseWarningNonPrefixed(std::forward<Args>(args)...);
83  flagSolutionWarningMultipleRegistration(_si_moose_base.name() + ": warning");
84  }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

◆ mooseWarningNonPrefixed() [2/2]

template<typename... Args>
void MooseBase::mooseWarningNonPrefixed ( Args &&...  args) const
inlineinherited

Emits a warning without the prefixing included in mooseWarning().

Definition at line 308 of file MooseBase.h.

309  {
310  moose::internal::mooseWarningStream(_console, std::forward<Args>(args)...);
311  }
void mooseWarningStream(S &oss, Args &&... args)
Definition: MooseError.h:210
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ mortarData() [1/2]

const MortarInterfaceWarehouse& FEProblemBase::mortarData ( ) const
inline

Returns the mortar data object.

Definition at line 2445 of file FEProblemBase.h.

2445 { return *_mortar_data; }
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data

◆ mortarData() [2/2]

MortarInterfaceWarehouse& FEProblemBase::mortarData ( )
inline

Definition at line 2446 of file FEProblemBase.h.

2446 { return *_mortar_data; }
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data

◆ name()

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

Get the name of the class.

Returns
The name of the class

Definition at line 103 of file MooseBase.h.

Referenced by AddElementalFieldAction::act(), CopyNodalVarsAction::act(), AdaptivityAction::act(), AddTimeStepperAction::act(), CSGOnlyAction::act(), DeprecatedBlockAction::act(), SetupTimeIntegratorAction::act(), AddActionComponentAction::act(), SetupResidualDebugAction::act(), DisplayGhostingAction::act(), MaterialOutputAction::act(), AddPeriodicBCAction::act(), addAnyRedistributers(), Executioner::addAttributeReporter(), MFEMProblem::addAuxKernel(), addAuxKernel(), addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), MFEMProblem::addBoundaryCondition(), addBoundaryCondition(), PhysicsComponentInterface::addComponent(), addConstraint(), addConvergence(), addDamper(), Registry::addDataFilePath(), addDGKernel(), addDiracKernel(), addDistribution(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), MFEMProblem::addFESpace(), MFEMProblem::addFunction(), addFunction(), SubProblem::addFunctor(), MFEMProblem::addFunctorMaterial(), addFunctorMaterial(), FunctorMaterial::addFunctorProperty(), FunctorMaterial::addFunctorPropertyByBlocks(), addFVBC(), addFVInitialCondition(), addFVInterfaceKernel(), addFVKernel(), ADDGKernel::ADDGKernel(), addHDGKernel(), addIndicator(), MFEMProblem::addInitialCondition(), addInitialCondition(), addInterfaceKernel(), addInterfaceMaterial(), DiffusionLHDGKernel::additionalROVariables(), IPHDGAssemblyHelper::additionalROVariables(), MFEMProblem::addKernel(), addKernel(), addLinearFVBC(), addLinearFVKernel(), addMarker(), addMaterial(), addMaterialHelper(), ComponentMaterialPropertyInterface::addMaterials(), addMeshDivision(), MooseApp::addMeshGenerator(), ComponentMeshTransformHelper::addMeshGenerators(), CylinderComponent::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMPreconditioner(), MFEMProblem::addMFEMSolver(), addMultiApp(), addNodalKernel(), InitialConditionWarehouse::addObject(), addObject(), ComponentPhysicsInterface::addPhysics(), SubProblem::addPiecewiseByBlockLambdaFunctor(), MFEMProblem::addPostprocessor(), addPostprocessor(), InitialConditionBase::addPostprocessorDependencyHelper(), AuxKernelBase::addPostprocessorDependencyHelper(), UserObject::addPostprocessorDependencyHelper(), addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), addReporter(), addSampler(), addScalarKernel(), WebServerControl::addServerActionsInternal(), addTimeIntegrator(), MFEMProblem::addTransfer(), addTransfer(), addUserObject(), InitialConditionBase::addUserObjectDependencyHelper(), AuxKernelBase::addUserObjectDependencyHelper(), UserObject::addUserObjectDependencyHelper(), DisplacedProblem::addVariable(), addVectorPostprocessor(), AuxKernelBase::addVectorPostprocessorDependencyHelper(), UserObject::addVectorPostprocessorDependencyHelper(), MooseLinearVariableFV< Real >::adError(), Output::advancedExecuteOn(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), MooseVariableBase::allDofIndices(), MooseApp::appBinaryName(), MooseApp::appendMeshGenerator(), Registry::appNameFromAppPath(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayDGKernel::ArrayDGKernel(), ArrayParsedAux::ArrayParsedAux(), PhysicsBase::assignBlocks(), AStableDirk4::AStableDirk4(), AuxKernelBase::AuxKernelBase(), Function::average(), MultiApp::backup(), Boundary2DDelaunayGenerator::Boundary2DDelaunayGenerator(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), MFEMFESpace::buildFEC(), PiecewiseTabularInterface::buildFromFile(), PiecewiseTabularInterface::buildFromXY(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), MooseBase::callMooseError(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), PhysicsBase::checkBlockRestrictionIdentical(), PhysicsBase::checkComponentType(), ParsedConvergence::checkConvergence(), DefaultNonlinearConvergence::checkConvergence(), checkDependMaterialsHelper(), SamplerBase::checkForStandardFieldVariableType(), ReporterTransferInterface::checkHasReporterValue(), checkICRestartError(), Moose::Kokkos::Material::checkMaterialProperty(), Material::checkMaterialProperty(), MooseApp::checkMetaDataIntegrity(), Damper::checkMinDamping(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), Checkpoint::checkpointInfo(), DomainUserObject::checkVariable(), BlockRestrictable::checkVariable(), Coupleable::checkWritableVar(), MooseVariableFieldBase::componentName(), CompositeFunction::CompositeFunction(), MaterialBase::computeProperties(), computeUserObjectByName(), VectorPostprocessorVisualizationAux::computeValue(), MooseBase::connectControllableParams(), ConstantPostprocessor::ConstantPostprocessor(), Coupleable::coupledName(), CommonOutputAction::create(), MultiApp::createApp(), MooseApp::createExecutors(), MeshGeneratorSystem::createMeshGeneratorOrder(), MooseApp::createRecoverablePerfGraph(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), DebugResidualAux::DebugResidualAux(), 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(), SolutionUserObjectBase::evalMeshFunction(), SolutionUserObjectBase::evalMeshFunctionGradient(), SolutionUserObjectBase::evalMultiValuedMeshFunction(), SolutionUserObjectBase::evalMultiValuedMeshFunctionGradient(), SideValueSampler::execute(), RestartableDataReporter::execute(), GreaterThanLessThanPostprocessor::execute(), PointValue::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppUserObjectTransfer::execute(), WebServerControl::execute(), MultiAppGeneralFieldTransfer::execute(), ActionWarehouse::executeActionsWithAction(), Exodus::Exodus(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase(), MultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), PointSamplerBase::finalize(), ChainControl::fullControlDataName(), FunctionArrayAux::FunctionArrayAux(), FunctionDT::FunctionDT(), FunctionIC::functionName(), FVFunctionIC::functionName(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), GapValueAux::GapValueAux(), MooseServer::gatherDocumentSymbols(), BoundaryDeletionGenerator::generate(), UniqueExtraIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), BreakMeshByBlockGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), SideSetsFromNodeSetsGenerator::generate(), StitchBoundaryMeshGenerator::generate(), StitchMeshGenerator::generate(), ParsedExtraElementIDGenerator::generate(), XYDelaunayGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), InterfaceMaterial::getADMaterialProperty(), Material::getADMaterialProperty(), MultiAppTransfer::getAppInfo(), MultiApp::getBoundingBox(), MooseBase::getCheckedPointerParam(), MooseApp::getCheckpointDirectories(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), getConvergence(), MeshGenerator::getCSGBase(), MeshGenerator::getCSGBasesByName(), Registry::getDataFilePath(), UserObject::getDependObjects(), DistributionInterface::getDistribution(), getDistribution(), DistributionInterface::getDistributionByName(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), MultiApp::getExecutioner(), MooseApp::getExecutor(), getExecutor(), OutputWarehouse::getFileNumbers(), getFunction(), SubProblem::getFunctor(), NodalPatchRecovery::getGenericMaterialProperty(), InterfaceMaterial::getGenericMaterialProperty(), AuxKernelTempl< Real >::getGenericMaterialProperty(), Material::getGenericMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialPropertyByName(), Material::getGenericOptionalMaterialProperty(), MaterialBase::getGenericZeroMaterialProperty(), MFEMProblem::getGridFunction(), getKokkosFunction(), SolutionUserObjectBase::getLocalVarIndex(), Marker::getMarkerValue(), Material::getMaterial(), getMaterial(), Material::getMaterialByName(), NodalPatchRecovery::getMaterialProperty(), InterfaceMaterial::getMaterialProperty(), AuxKernelTempl< Real >::getMaterialProperty(), Material::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), NodalPatchRecovery::getMaterialPropertyOld(), AuxKernelTempl< Real >::getMaterialPropertyOld(), InterfaceMaterial::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOlder(), AuxKernelTempl< Real >::getMaterialPropertyOlder(), InterfaceMaterial::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), MFEMGeneralUserObject::getMatrixCoefficient(), MFEMGeneralUserObject::getMatrixCoefficientByName(), MeshGenerator::getMesh(), 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(), MooseBase::getParam(), getPositionsObject(), getPostprocessorValueByName(), ComponentMaterialPropertyInterface::getPropertyValue(), ReporterData::getReporterInfo(), MooseApp::getRestartableDataMap(), MooseApp::getRestartableDataMapName(), MooseApp::getRestartableMetaData(), getSampler(), MFEMGeneralUserObject::getScalarCoefficient(), MFEMGeneralUserObject::getScalarCoefficientByName(), TimedSubdomainModifier::getSubdomainIDAndCheck(), TransientBase::getTimeStepperName(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), getUserObject(), getUserObjectBase(), MFEMGeneralUserObject::getVectorCoefficient(), MFEMGeneralUserObject::getVectorCoefficientByName(), Terminator::handleMessage(), Control::hasControllableParameterByName(), hasConvergence(), hasFunction(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), MooseApp::hasMeshGenerator(), AdvancedOutput::hasOutputHelper(), hasPostprocessor(), hasPostprocessorValueByName(), MooseApp::hasRelationshipManager(), MooseApp::hasRestartableDataMap(), MooseApp::hasRestartableMetaData(), hasUserObject(), IterationAdaptiveDT::init(), AddVariableAction::init(), AdvancedOutput::init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), NestedDivision::initialize(), TransformedPositions::initialize(), BoundaryRestrictable::initializeBoundaryRestrictable(), 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(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), MeshGenerator::isChildMeshGenerator(), DerivativeMaterialInterface< JvarMapKernelInterface< GenericKernelGrad< is_ad > > >::isNotObjectVariable(), MeshGenerator::isNullMeshName(), MooseBase::isParamSetByUser(), MooseBase::isParamValid(), MeshGenerator::isParentMeshGenerator(), LinearCombinationFunction::LinearCombinationFunction(), logAdd(), MooseLinearVariableFV< Real >::lowerDError(), Marker::Marker(), MaterialBase::markMatPropRequested(), Material::Material(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshGenerator::meshPropertyPrefix(), MooseBase::messagePrefix(), OutputWarehouse::mooseConsole(), SolutionInvalidInterface::mooseDeprecated(), MooseVariableBase::MooseVariableBase(), MooseVariableInterface< Real >::MooseVariableInterface(), SolutionInvalidInterface::mooseWarning(), SolutionInvalidInterface::mooseWarningNonPrefixed(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MooseLinearVariableFV< Real >::nodalError(), 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(), SolutionInvalidInterface::paramWarning(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedODEKernel::ParsedODEKernel(), ComponentPhysicsInterface::physicsExists(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), MooseApp::possiblyLoadRestartableMetaData(), PhysicsBase::prefix(), MooseMesh::prepare(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), PerfGraphLivePrint::printStats(), projectInitialConditionOnCustomRange(), MooseBase::queryParam(), MultiApp::readCommandLineArguments(), Receiver::Receiver(), Executor::Result::record(), AppFactory::reg(), Registry::registerObjectsTo(), registerRandomInterface(), MooseApp::registerRestartableDataMapName(), MooseApp::registerRestartableNameWithFilter(), MaterialBase::resetQpProperties(), MultiApp::restore(), ScalarComponentIC::ScalarComponentIC(), MultiApp::setAppOutputFileBase(), setAuxKernelParamsAndLog(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), OutputWarehouse::setFileNumbers(), setPostprocessorValueByName(), setResidualObjectParamsAndLog(), MooseMesh::setSubdomainName(), NodeSetsGeneratorBase::setup(), Split::setup(), SideSetsGeneratorBase::setup(), TransientMultiApp::setupApp(), FullSolveMultiApp::showStatusMessage(), SideSetExtruderGenerator::SideSetExtruderGenerator(), TransientMultiApp::solveStep(), UserObject::spatialValue(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), MaterialBase::storeBoundaryZeroMatProp(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), MaterialBase::storeSubdomainZeroMatProp(), SubProblem::storeSubdomainZeroMatProp(), ConstraintWarehouse::subdomainsCovered(), MaterialBase::subdomainSetup(), TaggingInterface::TaggingInterface(), MooseLinearVariableFV< Real >::timeIntegratorError(), VectorPostprocessorVisualizationAux::timestepSetup(), ElementSubdomainModifierBase::timestepSetup(), to_json(), MultiAppDofCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), TransientMultiApp::TransientMultiApp(), MooseServer::traverseParseTreeAndFillSymbols(), MooseBase::typeAndName(), MooseBase::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().

104  {
105  mooseAssert(_name.size(), "Empty name");
106  return _name;
107  }
const std::string & _name
The name of this class.
Definition: MooseBase.h:363

◆ needBoundaryMaterialOnSide()

bool FEProblemBase::needBoundaryMaterialOnSide ( BoundaryID  bnd_id,
const THREAD_ID  tid 
)

These methods are used to determine whether stateful material properties need to be stored on internal sides.

There are five situations where this may be the case: 1) DGKernels 2) IntegratedBCs 3)InternalSideUserObjects 4)ElementalAuxBCs 5)InterfaceUserObjects

Method 1:

Parameters
bnd_idthe boundary id for which to see if stateful material properties need to be stored
tidthe THREAD_ID of the caller
Returns
Boolean indicating whether material properties need to be stored

Method 2:

Parameters
subdomain_idthe subdomain id for which to see if stateful material properties need to be stored
tidthe THREAD_ID of the caller
Returns
Boolean indicating whether material properties need to be stored

Definition at line 8967 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onBoundary(), ProjectMaterialProperties::onBoundary(), reinitMaterialsBoundary(), reinitMaterialsFaceOnBoundary(), and reinitMaterialsNeighborOnBoundary().

8968 {
8969  if (_bnd_mat_side_cache[tid].find(bnd_id) == _bnd_mat_side_cache[tid].end())
8970  {
8971  auto & bnd_mat_side_cache = _bnd_mat_side_cache[tid][bnd_id];
8972  bnd_mat_side_cache = false;
8973 
8974  // Check systems
8975  if (_aux->needMaterialOnSide(bnd_id))
8976  {
8977  bnd_mat_side_cache = true;
8978  return true;
8979  }
8980  for (auto & nl : _nl)
8981  if (nl->needBoundaryMaterialOnSide(bnd_id, tid))
8982  {
8983  bnd_mat_side_cache = true;
8984  return true;
8985  }
8986 
8987  // TODO: these objects should be checked for whether they actually consume materials
8988  // NOTE: InterfaceUO can use use boundary properties too
8989  if (theWarehouse()
8990  .query()
8991  .condition<AttribThread>(tid)
8992  .condition<AttribInterfaces>(Interfaces::SideUserObject | Interfaces::DomainUserObject |
8994  .condition<AttribBoundaries>(bnd_id)
8995  .count() > 0)
8996  {
8997  bnd_mat_side_cache = true;
8998  return true;
8999  }
9000  }
9001 
9002  return _bnd_mat_side_cache[tid][bnd_id];
9003 }
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:42
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 ( )
inlineoverridevirtual

marks this problem as including/needing finite volume functionality.

Implements SubProblem.

Definition at line 2710 of file FEProblemBase.h.

Referenced by DiffusionFV::initializePhysicsAdditional(), and DisplacedProblem::needFV().

2710 { _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 
)

Definition at line 9006 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInterface(), reinitMaterialsFaceOnBoundary(), reinitMaterialsInterface(), and reinitMaterialsNeighborOnBoundary().

9007 {
9008  if (_interface_mat_side_cache[tid].find(bnd_id) == _interface_mat_side_cache[tid].end())
9009  {
9010  auto & interface_mat_side_cache = _interface_mat_side_cache[tid][bnd_id];
9011  interface_mat_side_cache = false;
9012 
9013  // Aux-system has not needed interface materials so far
9014  for (auto & nl : _nl)
9015  if (nl->needInterfaceMaterialOnSide(bnd_id, tid))
9016  {
9017  interface_mat_side_cache = true;
9018  return true;
9019  }
9020 
9021  // TODO: these objects should be checked for whether they actually consume materials
9022  if (theWarehouse()
9023  .query()
9024  .condition<AttribThread>(tid)
9025  .condition<AttribInterfaces>(Interfaces::InterfaceUserObject |
9027  .condition<AttribBoundaries>(bnd_id)
9028  .count() > 0)
9029  {
9030  interface_mat_side_cache = true;
9031  return true;
9032  }
9033  else if (_interface_materials.hasActiveBoundaryObjects(bnd_id, tid))
9034  {
9035  interface_mat_side_cache = true;
9036  return true;
9037  }
9038  }
9039  return _interface_mat_side_cache[tid][bnd_id];
9040 }
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:42
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.

◆ needInternalNeighborSideMaterial()

bool FEProblemBase::needInternalNeighborSideMaterial ( SubdomainID  subdomain_id,
const THREAD_ID  tid 
)

Definition at line 9043 of file FEProblemBase.C.

Referenced by reinitMaterialsFaceOnBoundary(), reinitMaterialsNeighborOnBoundary(), ComputeMaterialsObjectThread::subdomainChanged(), and ProjectMaterialProperties::subdomainChanged().

9044 {
9045  if (_block_mat_side_cache[tid].find(subdomain_id) == _block_mat_side_cache[tid].end())
9046  {
9047  _block_mat_side_cache[tid][subdomain_id] = false;
9048 
9049  for (auto & nl : _nl)
9050  if (nl->needInternalNeighborSideMaterial(subdomain_id, tid))
9051  {
9052  _block_mat_side_cache[tid][subdomain_id] = true;
9053  return true;
9054  }
9055 
9056  // TODO: these objects should be checked for whether they actually consume materials
9057  if (theWarehouse()
9058  .query()
9059  .condition<AttribThread>(tid)
9060  .condition<AttribInterfaces>(Interfaces::InternalSideUserObject |
9062  .condition<AttribSubdomains>(subdomain_id)
9063  .count() > 0)
9064  {
9065  _block_mat_side_cache[tid][subdomain_id] = true;
9066  return true;
9067  }
9068  }
9069 
9070  return _block_mat_side_cache[tid][subdomain_id];
9071 }
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:42
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

◆ needSolutionState()

void FEProblemBase::needSolutionState ( unsigned int  oldest_needed,
Moose::SolutionIterationType  iteration_type 
)

Declare that we need up to old (1) or older (2) solution states for a given type of iteration.

Parameters
oldest_neededoldest solution state needed
iteration_typethe type of iteration for which old/older states are needed

Definition at line 741 of file FEProblemBase.C.

Referenced by createTagSolutions().

742 {
743  for (auto & sys : _solver_systems)
744  sys->needSolutionState(state, iteration_type);
745  _aux->needSolutionState(state, iteration_type);
746 }
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.

◆ needsPreviousNewtonIteration() [1/2]

void FEProblemBase::needsPreviousNewtonIteration ( bool  state)

Set a flag that indicated that user required values for the previous Newton iterate.

Definition at line 9080 of file FEProblemBase.C.

Referenced by Coupleable::coupledGradientPreviousNL(), Coupleable::coupledNodalValuePreviousNL(), Coupleable::coupledSecondPreviousNL(), Coupleable::coupledValuePreviousNL(), and NonlinearSystem::solve().

9081 {
9083  mooseError("Previous nonlinear solution is required but not added through "
9084  "Problem/previous_nl_solution_required=true");
9085 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:28

◆ needsPreviousNewtonIteration() [2/2]

bool FEProblemBase::needsPreviousNewtonIteration ( ) const

Check to see whether we need to compute the variable values of the previous Newton iterate.

Returns
true if the user required values of the previous Newton iterate

Definition at line 9074 of file FEProblemBase.C.

9075 {
9077 }
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

◆ needToAddDefaultMultiAppFixedPointConvergence()

bool FEProblemBase::needToAddDefaultMultiAppFixedPointConvergence ( ) const
inline

Returns true if the problem needs to add the default fixed point convergence.

Definition at line 707 of file FEProblemBase.h.

708  {
710  }
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
inline

Returns true if the problem needs to add the default nonlinear convergence.

Definition at line 702 of file FEProblemBase.h.

703  {
705  }
bool _need_to_add_default_nonlinear_convergence
Flag that the problem needs to add the default nonlinear convergence.

◆ needToAddDefaultSteadyStateConvergence()

bool FEProblemBase::needToAddDefaultSteadyStateConvergence ( ) const
inline

Returns true if the problem needs to add the default steady-state detection convergence.

Definition at line 712 of file FEProblemBase.h.

713  {
715  }
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 
)
virtual

Definition at line 2547 of file FEProblemBase.C.

Referenced by ThreadedFaceLoop< RangeType >::neighborSubdomainChanged().

2548 {
2549  _all_materials.neighborSubdomainSetup(subdomain, tid);
2550 }
virtual void neighborSubdomainSetup(THREAD_ID tid=0) const
MaterialWarehouse _all_materials

◆ newAssemblyArray()

void FEProblemBase::newAssemblyArray ( std::vector< std::shared_ptr< SolverSystem >> &  solver_systems)
virtual

Definition at line 749 of file FEProblemBase.C.

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

750 {
751  unsigned int n_threads = libMesh::n_threads();
752 
753  _assembly.resize(n_threads);
754  for (const auto i : make_range(n_threads))
755  {
756  _assembly[i].resize(solver_systems.size());
757  for (const auto j : index_range(solver_systems))
758  _assembly[i][j] = std::make_unique<Assembly>(*solver_systems[j], i);
759  }
760 }
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.

Definition at line 717 of file SubProblem.C.

718 {
719  mooseAssert(nl_sys_num < numNonlinearSystems(),
720  "The nonlinear system number is higher than the number of systems we have!");
721  return solverSystemConverged(nl_sys_num);
722 }
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
overridevirtual

Reimplemented from SubProblem.

Definition at line 6825 of file FEProblemBase.C.

Referenced by PiecewiseLinearFromVectorPostprocessor::valueInternal().

6826 {
6827  return _nl[nl_sys_num]->nLinearIterations();
6828 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ nlSysNum()

unsigned int FEProblemBase::nlSysNum ( const NonlinearSystemName &  nl_sys_name) const
overridevirtual
Returns
the nonlinear system number corresponding to the provided nl_sys_name

Implements SubProblem.

Definition at line 6555 of file FEProblemBase.C.

Referenced by DisplacedProblem::nlSysNum().

6556 {
6557  std::istringstream ss(nl_sys_name);
6558  unsigned int nl_sys_num;
6559  if (!(ss >> nl_sys_num) || !ss.eof())
6560  nl_sys_num = libmesh_map_find(_nl_sys_name_to_num, nl_sys_name);
6561 
6562  return nl_sys_num;
6563 }
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
overridevirtual

Reimplemented from SubProblem.

Definition at line 6819 of file FEProblemBase.C.

Referenced by PiecewiseLinearFromVectorPostprocessor::valueInternal().

6820 {
6821  return _nl[nl_sys_num]->nNonlinearIterations();
6822 }
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 
)

Definition at line 6407 of file FEProblemBase.C.

Referenced by ComputeFullJacobianThread::computeOnBoundary(), and ComputeFullJacobianThread::computeOnElement().

6408 {
6409  return _assembly[tid][nl_sys]->nonlocalCouplingEntries();
6410 }
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ nonlocalCouplingMatrix()

const libMesh::CouplingMatrix & FEProblemBase::nonlocalCouplingMatrix ( const unsigned  i) const
overridevirtual
Returns
the nonlocal coupling matrix for the i'th nonlinear system

Implements SubProblem.

Definition at line 9719 of file FEProblemBase.C.

Referenced by DisplacedProblem::nonlocalCouplingMatrix().

9720 {
9721  return _nonlocal_cm[i];
9722 }
std::vector< libMesh::CouplingMatrix > _nonlocal_cm
nonlocal coupling matrix

◆ notifyWhenMeshChanges()

void FEProblemBase::notifyWhenMeshChanges ( MeshChangedInterface mci)

Register an object that derives from MeshChangedInterface to be notified when the mesh changes.

Definition at line 8500 of file FEProblemBase.C.

Referenced by MeshChangedInterface::MeshChangedInterface().

8501 {
8502  _notify_when_mesh_changes.push_back(mci);
8503 }
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
Objects to be notified when the mesh changes.

◆ notifyWhenMeshDisplaces()

void FEProblemBase::notifyWhenMeshDisplaces ( MeshDisplacedInterface mdi)

Register an object that derives from MeshDisplacedInterface to be notified when the displaced mesh gets updated.

Definition at line 8506 of file FEProblemBase.C.

Referenced by MeshDisplacedInterface::MeshDisplacedInterface().

8507 {
8508  _notify_when_mesh_displaces.push_back(mdi);
8509 }
std::vector< MeshDisplacedInterface * > _notify_when_mesh_displaces
Objects to be notified when the mesh displaces.

◆ numGridSteps()

void FEProblemBase::numGridSteps ( unsigned int  num_grid_steps)
inline

Set the number of steps in a grid sequences.

Definition at line 2467 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2467 { _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
inlineoverridevirtual

◆ numMatrixTags()

virtual unsigned int SubProblem::numMatrixTags ( ) const
inlinevirtualinherited

◆ numNonlinearSystems()

virtual std::size_t FEProblemBase::numNonlinearSystems ( ) const
inlineoverridevirtual

◆ numSolverSystems()

virtual std::size_t FEProblemBase::numSolverSystems ( ) const
inlineoverridevirtual

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

Referenced by NonlinearSystemBase::computeNodalBCs(), NonlinearSystemBase::computeResidualInternal(), ComputeResidualThread::determineObjectWarehouses(), MooseVariableDataBase< OutputType >::MooseVariableDataBase(), MooseVariableScalar::MooseVariableScalar(), DisplacedProblem::numVectorTags(), ComputeNodalKernelBcsThread::pre(), and ComputeNodalKernelsThread::pre().

197 {
198  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
199 
200  return getVectorTags(type).size();
201 }
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:242
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:173

◆ objectExecuteHelper()

template<typename T >
void FEProblemBase::objectExecuteHelper ( const std::vector< T *> &  objects)
static

Definition at line 3442 of file FEProblemBase.h.

3443 {
3444  for (T * obj_ptr : objects)
3445  obj_ptr->execute();
3446 }

◆ objectSetupHelper()

template<typename T >
void FEProblemBase::objectSetupHelper ( const std::vector< T *> &  objects,
const ExecFlagType exec_flag 
)
static

Helpers for calling the necessary setup/execute functions for the supplied objects.

Definition at line 3408 of file FEProblemBase.h.

3409 {
3410  if (exec_flag == EXEC_INITIAL)
3411  {
3412  for (T * obj_ptr : objects)
3413  obj_ptr->initialSetup();
3414  }
3415 
3416  else if (exec_flag == EXEC_TIMESTEP_BEGIN)
3417  {
3418  for (const auto obj_ptr : objects)
3419  obj_ptr->timestepSetup();
3420  }
3421  else if (exec_flag == EXEC_SUBDOMAIN)
3422  {
3423  for (const auto obj_ptr : objects)
3424  obj_ptr->subdomainSetup();
3425  }
3426 
3427  else if (exec_flag == EXEC_NONLINEAR)
3428  {
3429  for (const auto obj_ptr : objects)
3430  obj_ptr->jacobianSetup();
3431  }
3432 
3433  else if (exec_flag == EXEC_LINEAR)
3434  {
3435  for (const auto obj_ptr : objects)
3436  obj_ptr->residualSetup();
3437  }
3438 }
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:37
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:31
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:33
const ExecFlagType EXEC_SUBDOMAIN
Definition: Moose.C:50
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:30

◆ onlyAllowDefaultNonlinearConvergence()

virtual bool FEProblemBase::onlyAllowDefaultNonlinearConvergence ( ) const
inlinevirtual

Returns true if an error will result if the user supplies 'nonlinear_convergence'.

Some problems are strongly tied to their convergence, and it does not make sense to use any convergence other than their default and additionally would be error-prone.

Reimplemented in ReferenceResidualProblem.

Definition at line 756 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

756 { return false; }

◆ onTimestepBegin()

void FEProblemBase::onTimestepBegin ( )
overridevirtual

Implements SubProblem.

Definition at line 6979 of file FEProblemBase.C.

Referenced by MFEMTransient::takeStep(), and TransientBase::takeStep().

6980 {
6981  TIME_SECTION("onTimestepBegin", 2);
6982 
6983  for (auto & nl : _nl)
6984  nl->onTimestepBegin();
6985 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ onTimestepEnd()

void FEProblemBase::onTimestepEnd ( )
overridevirtual

◆ outputStep()

void FEProblemBase::outputStep ( ExecFlagType  type)
virtual

Output the current step.

Will ensure that everything is in the proper state to be outputted. Then tell the OutputWarehouse to do its thing

Parameters
typeThe type execution flag (see Moose.h)

Reimplemented in DumpObjectsProblem.

Definition at line 6942 of file FEProblemBase.C.

Referenced by TransientBase::endStep(), MFEMSteady::execute(), TransientBase::execute(), SteadyBase::execute(), Eigenvalue::execute(), InversePowerMethod::init(), NonlinearEigen::init(), EigenExecutionerBase::postExecute(), TransientBase::preExecute(), MFEMProblemSolve::solve(), FixedPointSolve::solve(), TransientMultiApp::solveStep(), and FixedPointSolve::solveStep().

6943 {
6944  TIME_SECTION("outputStep", 1, "Outputting");
6945 
6947 
6948  for (auto & sys : _solver_systems)
6949  sys->update();
6950  _aux->update();
6951 
6952  if (_displaced_problem)
6953  _displaced_problem->syncSolutions();
6955 
6957 }
void outputStep(ExecFlagType type)
Calls the outputStep method for each output object.
const ExecFlagType EXEC_NONE
Definition: Moose.C:29
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:93
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
std::shared_ptr< DisplacedProblem > _displaced_problem
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2525

◆ paramError()

template<typename... Args>
void MooseBase::paramError ( const std::string &  param,
Args...  args 
) const
inherited

Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseError - only printing a message using the given args.

Definition at line 439 of file MooseBase.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), AutoCheckpointAction::act(), SetupDebugAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), NEML2ModelExecutor::addGatheredParameter(), NEML2ModelExecutor::addGatheredVariable(), ADDGKernel::ADDGKernel(), CylinderComponent::addMeshGenerators(), AddPeriodicBCAction::AddPeriodicBCAction(), ReporterPointSource::addPoints(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADKernelTempl< T >::ADKernelTempl(), 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(), ArrayReactionNodalKernelTempl< is_ad >::ArrayReactionNodalKernelTempl(), ArrayVacuumBC::ArrayVacuumBC(), ArrayVarReductionAux::ArrayVarReductionAux(), ParsedSubdomainIDsGenerator::assignElemSubdomainID(), AuxKernelBase::AuxKernelBase(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BlockDeletionGenerator::BlockDeletionGenerator(), BlockWeightedPartitioner::BlockWeightedPartitioner(), BoundsBase::BoundsBase(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BuildArrayVariableAux::BuildArrayVariableAux(), MFEMMesh::buildMesh(), CartesianGridDivision::CartesianGridDivision(), checkComponent(), MeshGenerator::checkGetMesh(), ComponentInitialConditionInterface::checkInitialConditionsAllRequested(), BatchMeshGeneratorAction::checkInputParameterType(), PhysicsBase::checkIntegrityEarly(), PostprocessorInterface::checkParam(), 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(), ConservativeAdvectionBCTempl< false >::ConservativeAdvectionBCTempl(), 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(), DebugResidualAux::DebugResidualAux(), ConstantReporter::declareConstantReporterValue(), ConstantReporter::declareConstantReporterValues(), AccumulateReporter::declareLateValues(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DGLowerDKernel::DGLowerDKernel(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), ElementAdaptivityLevelAux::ElementAdaptivityLevelAux(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementLengthAux::ElementLengthAux(), ElementLpNormAux::ElementLpNormAux(), ExtraIDIntegralVectorPostprocessor::elementValue(), ElementValueSampler::ElementValueSampler(), ElementVectorL2Error::ElementVectorL2Error(), EqualValueEmbeddedConstraintTempl< is_ad >::EqualValueEmbeddedConstraintTempl(), ReporterPointSource::errorCheck(), StitchMeshGeneratorBase::errorMissingBoundary(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), ExtraElementIDAux::ExtraElementIDAux(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase(), 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(), Boundary2DDelaunayGenerator::General2DDelaunay(), BoundaryDeletionGenerator::generate(), UniqueExtraIDMeshGenerator::generate(), ExtraNodesetGenerator::generate(), AddMetaDataGenerator::generate(), BlockToMeshConverterGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), ElementsToTetrahedronsConverter::generate(), FillBetweenCurvesGenerator::generate(), FillBetweenSidesetsGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), BlockDeletionGenerator::generate(), Boundary2DDelaunayGenerator::generate(), BoundaryElementConversionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), SideSetsFromNodeSetsGenerator::generate(), AdvancedExtruderGenerator::generate(), BreakMeshByElementGenerator::generate(), CircularBoundaryCorrectionGenerator::generate(), CombinerGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), ParsedCurveGenerator::generate(), ParsedExtraElementIDGenerator::generate(), StackGenerator::generate(), XYZDelaunayGenerator::generate(), CutMeshByLevelSetGeneratorBase::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), PatternedMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), GeneratedMeshGenerator::GeneratedMeshGenerator(), GenericConstantStdVectorMaterialTempl< is_ad >::GenericConstantStdVectorMaterialTempl(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), PropertyReadFile::getBlockData(), ComponentBoundaryConditionInterface::getBoundaryCondition(), MultiApp::getCommandLineArgs(), PropertyReadFile::getData(), PropertyReadFile::getFileNames(), Sampler::getGlobalSamples(), ComponentInitialConditionInterface::getInitialCondition(), NEML2Action::getInputParameterMapping(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), Sampler::getLocalSamples(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), 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(), MultiAppVariableValueSamplePostprocessorTransfer::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), HistogramVectorPostprocessor::initialSetup(), ReferenceResidualConvergence::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), LibtorchControlValuePostprocessor::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), ElementSubdomainModifierBase::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(), KokkosBoundNodalKernel< KokkosUpperBoundNodalKernel >::KokkosBoundNodalKernel(), 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(), MFEMDotProductAux::MFEMDotProductAux(), MFEMGenericFunctorMaterial::MFEMGenericFunctorMaterial(), MFEMGenericFunctorVectorMaterial::MFEMGenericFunctorVectorMaterial(), MFEMSumAux::MFEMSumAux(), MooseLinearVariableFV< Real >::MooseLinearVariableFV(), MooseMesh::MooseMesh(), 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(), ParsedReporterBase::ParsedReporterBase(), ParsedScalarReporter::ParsedScalarReporter(), ParsedVectorRealReductionReporter::ParsedVectorRealReductionReporter(), ParsedVectorReporter::ParsedVectorReporter(), ParsedVectorVectorRealReductionReporter::ParsedVectorVectorRealReductionReporter(), 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::readExodusII(), SolutionUserObjectBase::readXda(), ReferenceResidualConvergence::ReferenceResidualConvergence(), RefineBlockGenerator::RefineBlockGenerator(), RefineSidesetGenerator::RefineSidesetGenerator(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), restoreSolutions(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), setLinearConvergenceNames(), setNonlinearConvergenceNames(), MooseMesh::setPartitioner(), NodeSetsGeneratorBase::setup(), SideSetsGeneratorBase::setup(), NEML2Action::setupDerivativeMappings(), NEML2Action::setupParameterDerivativeMappings(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideValueSampler::SideValueSampler(), SingleRankPartitioner::SingleRankPartitioner(), SphericalGridDivision::SphericalGridDivision(), StitchBoundaryMeshGenerator::StitchBoundaryMeshGenerator(), StitchMeshGenerator::StitchMeshGenerator(), SymmetryTransformGenerator::SymmetryTransformGenerator(), TagVectorAux::TagVectorAux(), Terminator::Terminator(), TimeDerivativeAux::TimeDerivativeAux(), Transfer::Transfer(), TransformGenerator::TransformGenerator(), TransientMultiApp::TransientMultiApp(), ParsedCurveGenerator::tSectionSpaceDefiner(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), TimeSequenceStepperBase::updateSequence(), 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().

440 {
441  _pars.paramError(param, std::forward<Args>(args)...);
442 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
void paramError(const std::string &param, Args... args) const
Emits a parameter error prefixed with the parameter location and object information if available...

◆ parameters()

const InputParameters& MooseBase::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 131 of file MooseBase.h.

Referenced by MeshOnlyAction::act(), SplitMeshAction::act(), CSGOnlyAction::act(), SetupDebugAction::act(), AddActionComponentAction::act(), CommonOutputAction::act(), Action::Action(), addAnyRedistributers(), MFEMProblem::addAuxKernel(), addAuxKernel(), addAuxScalarKernel(), MFEMProblem::addAuxVariable(), DisplacedProblem::addAuxVariable(), MFEMProblem::addBoundaryCondition(), addBoundaryCondition(), addConstraint(), addConvergence(), addDamper(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), addDefaultMultiAppFixedPointConvergence(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), addDefaultSteadyStateConvergence(), addDGKernel(), addDiracKernel(), addDistribution(), MFEMProblem::addFESpace(), MFEMProblem::addFunction(), addFunction(), MFEMProblem::addFunctorMaterial(), addFunctorMaterial(), addFVBC(), addFVInitialCondition(), addFVInterfaceKernel(), addFVKernel(), MFEMProblem::addGridFunction(), addHDGKernel(), addIndicator(), MFEMProblem::addInitialCondition(), addInitialCondition(), DiffusionPhysicsBase::addInitialConditions(), addInterfaceKernel(), addInterfaceMaterial(), MFEMProblem::addKernel(), addKernel(), addLinearFVBC(), addLinearFVKernel(), FEProblem::addLineSearch(), addMarker(), addMaterial(), addMaterialHelper(), addMeshDivision(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), MFEMProblem::addMFEMPreconditioner(), MFEMProblem::addMFEMSolver(), addMultiApp(), addNodalKernel(), addObject(), addObjectParamsHelper(), addOutput(), MFEMProblem::addPostprocessor(), addPostprocessor(), addPredictor(), addReporter(), addSampler(), addScalarKernel(), MFEMProblem::addSubMesh(), addTimeIntegrator(), MFEMProblem::addTransfer(), addTransfer(), addUserObject(), MFEMProblem::addVariable(), DisplacedProblem::addVariable(), addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), Action::associateWithParameter(), AuxKernelBase::AuxKernelBase(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), MooseMesh::buildTypedMesh(), PostprocessorInterface::checkParam(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), SampledOutput::cloneMesh(), LibtorchNeuralNetControl::conditionalParameterError(), Console::Console(), MooseMeshUtils::copyIntoMesh(), 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(), ElementSubdomainModifierBase::extrapolatePolynomial(), FEProblem::FEProblem(), FixedPointSolve::FixedPointSolve(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GapValueAux::GapValueAux(), ParsedSubdomainGeneratorBase::generate(), ActionWarehouse::getCurrentActionName(), ExecutorInterface::getExecutor(), Material::getMaterial(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), UserObjectInterface::getUserObjectName(), AuxKernelBase::getVariableHelper(), VectorPostprocessorInterface::getVectorPostprocessorName(), GhostingUserObject::GhostingUserObject(), MeshGeneratorSystem::hasDataDrivenAllowed(), AttribSystem::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), FullSolveMultiApp::initialSetup(), initNullSpaceVectors(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MooseObject::isKokkosObject(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), 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(), ConsoleUtils::outputLegacyInformation(), OverlayMeshGenerator::OverlayMeshGenerator(), MooseServer::parseDocumentForDiagnostics(), ParsedReporterBase::ParsedReporterBase(), ParsedScalarReporter::ParsedScalarReporter(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), NEML2Action::printSummary(), ProjectedStatefulMaterialStorageAction::processProperty(), PropertyReadFile::PropertyReadFile(), PseudoTimestep::PseudoTimestep(), RandomIC::RandomIC(), ReferenceResidualConvergence::ReferenceResidualConvergence(), InputParameterWarehouse::removeInputParameters(), setAuxKernelParamsAndLog(), FEProblem::setInputParametersFEProblem(), setInputParametersFEProblem(), setResidualObjectParamsAndLog(), SideSetsGeneratorBase::setup(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), Moose::PetscSupport::storePetscOptions(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), Transfer::Transfer(), TransientBase::TransientBase(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), and MooseApp::~MooseApp().

131 { return _pars; }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366

◆ paramInfo()

template<typename... Args>
void MooseBase::paramInfo ( const std::string &  param,
Args...  args 
) const
inherited

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 453 of file MooseBase.h.

Referenced by GridPartitioner::_do_partition(), ComboMarker::ComboMarker(), Control::Control(), FunctorIC::FunctorIC(), and TransientMultiApp::TransientMultiApp().

454 {
455  mooseInfo(_pars.paramMessage(param, std::forward<Args>(args)...));
456 }
std::string paramMessage(const std::string &param, Args... args) const
void mooseInfo(Args &&... args) const
Definition: MooseBase.h:321
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366

◆ paramWarning() [1/2]

template<typename... Args>
void SolutionInvalidInterface::paramWarning ( const std::string &  param,
Args...  args 
) const
inlineinherited

◆ paramWarning() [2/2]

template<typename... Args>
void MooseBase::paramWarning ( const std::string &  param,
Args...  args 
) const
inherited

Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseWarning - only printing a message using the given args.

Definition at line 446 of file MooseBase.h.

447 {
448  mooseWarning(_pars.paramMessage(param, std::forward<Args>(args)...));
449 }
std::string paramMessage(const std::string &param, Args... args) const
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Definition: MooseBase.h:299

◆ parentOutputPositionChanged()

void FEProblemBase::parentOutputPositionChanged ( )

Calls parentOutputPositionChanged() on all sub apps.

Definition at line 4696 of file FEProblemBase.C.

Referenced by TransientBase::parentOutputPositionChanged().

4697 {
4698  for (const auto & it : _multi_apps)
4699  {
4700  const auto & objects = it.second.getActiveObjects();
4701  for (const auto & obj : objects)
4702  obj->parentOutputPositionChanged();
4703  }
4704 }
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:173

◆ petscOptionsDatabase()

PetscOptions& FEProblemBase::petscOptionsDatabase ( )
inline

Definition at line 2385 of file FEProblemBase.h.

Referenced by Eigenvalue::prepareSolverOptions().

2385 { return _petsc_option_data_base; }
PetscOptions _petsc_option_data_base

◆ petscOptionsInserted()

bool& FEProblemBase::petscOptionsInserted ( )
inline

If PETSc options are already inserted.

Definition at line 2382 of file FEProblemBase.h.

Referenced by Eigenvalue::prepareSolverOptions().

2382 { return _is_petsc_options_inserted; }
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.

◆ possiblyRebuildGeomSearchPatches()

void FEProblemBase::possiblyRebuildGeomSearchPatches ( )
virtual

Definition at line 8127 of file FEProblemBase.C.

Referenced by solve().

8128 {
8129  if (_displaced_problem) // Only need to do this if things are moving...
8130  {
8131  TIME_SECTION("possiblyRebuildGeomSearchPatches", 5, "Rebuilding Geometric Search Patches");
8132 
8133  switch (_mesh.getPatchUpdateStrategy())
8134  {
8135  case Moose::Never:
8136  break;
8137  case Moose::Iteration:
8138  // Update the list of ghosted elements at the start of the time step
8141 
8142  _displaced_problem->geomSearchData().updateGhostedElems();
8144 
8145  // The commands below ensure that the sparsity of the Jacobian matrix is
8146  // augmented at the start of the time step using neighbor nodes from the end
8147  // of the previous time step.
8148 
8150 
8151  // This is needed to reinitialize PETSc output
8153 
8154  break;
8155 
8156  case Moose::Auto:
8157  {
8158  Real max = _displaced_problem->geomSearchData().maxPatchPercentage();
8160 
8161  // If we haven't moved very far through the patch
8162  if (max < 0.4)
8163  break;
8164  }
8165  libmesh_fallthrough();
8166 
8167  // Let this fall through if things do need to be updated...
8168  case Moose::Always:
8169  // Flush output here to see the message before the reinitialization, which could take a
8170  // while
8171  _console << "\n\nUpdating geometric search patches\n" << std::endl;
8172 
8175 
8176  _displaced_problem->geomSearchData().clearNearestNodeLocators();
8178 
8180 
8181  // This is needed to reinitialize PETSc output
8183  }
8184  }
8185 }
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:1095
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:978
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:3493
void clearNearestNodeLocators()
Clear out the Penetration Locators so they will redo the search.
MooseMesh * _displaced_mesh

◆ postExecute()

void FEProblemBase::postExecute ( )
virtual

Method called at the end of the simulation.

Definition at line 5717 of file FEProblemBase.C.

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

5718 {
5719  const auto & multi_apps = _multi_apps.getActiveObjects();
5720 
5721  for (const auto & multi_app : multi_apps)
5722  multi_app->postExecute();
5723 }
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)
virtual

Perform cleanup tasks after application of predictor to solution vector.

Parameters
ghosted_solutionGhosted solution vector

Definition at line 8040 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::setInitialSolution().

8041 {
8042 }

◆ prepare() [1/2]

virtual void FEProblemBase::prepare ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtual

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

Implements SubProblem.

◆ prepareAssembly()

void FEProblemBase::prepareAssembly ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1872 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), NonlinearSystemBase::reinitNodeFace(), and NonlinearSystemBase::setConstraintSecondaryValues().

1873 {
1874  _assembly[tid][_current_nl_sys->number()]->prepare();
1876  _assembly[tid][_current_nl_sys->number()]->prepareNonlocal();
1877 
1879  {
1880  _displaced_problem->prepareAssembly(tid);
1882  _displaced_problem->prepareNonlocal(tid);
1883  }
1884 }
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:1157
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 
)
overridevirtual

Implements SubProblem.

Definition at line 1786 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onInterface(), and ComputeUserObjectsThread::onInternalSide().

1787 {
1788  for (auto & nl : _nl)
1789  nl->prepareFace(tid, true);
1790  _aux->prepareFace(tid, false);
1791 
1793  _displaced_problem->prepareFace(_displaced_mesh->elemPtr(elem->id()), tid);
1794 }
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:3193
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 
)
overridevirtual

Implements SubProblem.

Definition at line 2131 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onBoundary().

2132 {
2133  _assembly[tid][_current_nl_sys->number()]->copyFaceShapes(var);
2134 }
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:1157
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ prepareKokkosMaterials()

void FEProblemBase::prepareKokkosMaterials ( const std::unordered_set< unsigned int > &  consumer_needed_mat_props)

◆ prepareMaterials()

void FEProblemBase::prepareMaterials ( const std::unordered_set< unsigned int > &  consumer_needed_mat_props,
const SubdomainID  blk_id,
const THREAD_ID  tid 
)

Add the MooseVariables and the material properties that the current materials depend on to the dependency list.

Parameters
consumer_needed_mat_propsThe material properties needed by consumer objects (other than the materials themselves)
blk_idThe subdomain ID for which we are preparing our list of needed vars and props
tidThe thread ID we are preparing the requirements for

This MUST be done after the moose variable dependency list has been set for all the other objects using the setActiveElementalMooseVariables API!

Definition at line 4139 of file FEProblemBase.C.

Referenced by ComputeMarkerThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), NonlinearThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

4142 {
4143  std::set<MooseVariableFEBase *> needed_moose_vars;
4144  std::unordered_set<unsigned int> needed_mat_props;
4145 
4146  if (_all_materials.hasActiveBlockObjects(blk_id, tid))
4147  {
4148  _all_materials.updateVariableDependency(needed_moose_vars, tid);
4149  _all_materials.updateBlockMatPropDependency(blk_id, needed_mat_props, tid);
4150  }
4151 
4152  const auto & ids = _mesh.getSubdomainBoundaryIds(blk_id);
4153  for (const auto id : ids)
4154  {
4155  _materials.updateBoundaryVariableDependency(id, needed_moose_vars, tid);
4156  _materials.updateBoundaryMatPropDependency(id, needed_mat_props, tid);
4157  }
4158 
4159  const auto & current_active_elemental_moose_variables = getActiveElementalMooseVariables(tid);
4160  needed_moose_vars.insert(current_active_elemental_moose_variables.begin(),
4161  current_active_elemental_moose_variables.end());
4162 
4163  needed_mat_props.insert(consumer_needed_mat_props.begin(), consumer_needed_mat_props.end());
4164 
4165  setActiveElementalMooseVariables(needed_moose_vars, tid);
4166  setActiveMaterialProperties(needed_mat_props, tid);
4167 }
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:3577
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
Definition: SubProblem.C:455
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 
)
overridevirtual

Implements SubProblem.

Definition at line 2137 of file FEProblemBase.C.

2138 {
2139  _assembly[tid][_current_nl_sys->number()]->copyNeighborShapes(var);
2140 }
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:1157
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 1337 of file SubProblem.C.

Referenced by init().

1338 {
1339  std::unordered_set<FEFamily> disable_families;
1340  for (const auto & [family, flag] : _family_for_p_refinement)
1341  if (flag)
1342  disable_families.insert(family);
1343 
1344  for (const auto tid : make_range(libMesh::n_threads()))
1345  for (const auto s : make_range(numNonlinearSystems()))
1346  assembly(tid, s).havePRefinement(disable_families);
1347 
1348  auto & eq = es();
1349  for (const auto family : disable_families)
1350  for (const auto i : make_range(eq.n_systems()))
1351  {
1352  auto & system = eq.get_system(i);
1353  auto & dof_map = system.get_dof_map();
1354  for (const auto vg : make_range(system.n_variable_groups()))
1355  {
1356  const auto & var_group = system.variable_group(vg);
1357  if (var_group.type().family == family)
1358  dof_map.should_p_refine(vg, false);
1359  }
1360  }
1361 
1362  _have_p_refinement = true;
1363 }
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:1210
void havePRefinement(const std::unordered_set< FEFamily > &disable_p_refinement_for_families)
Indicate that we have p-refinement.
Definition: Assembly.C:4835
bool _have_p_refinement
Whether p-refinement has been requested at any point during the simulation.
Definition: SubProblem.h:1207
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 
)
overridevirtual

Implements SubProblem.

Definition at line 2125 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onElement().

2126 {
2127  _assembly[tid][_current_nl_sys->number()]->copyShapes(var);
2128 }
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:1157
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ preserveMatrixSparsityPattern()

bool FEProblemBase::preserveMatrixSparsityPattern ( ) const
inline

Will return True if the executioner in use requires preserving the sparsity pattern of the matrices being formed during the solve.

This is usually the Jacobian.

Definition at line 2203 of file FEProblemBase.h.

bool _preserve_matrix_sparsity_pattern
Whether to preserve the system matrix / Jacobian sparsity pattern, using 0-valued entries usually...

◆ projectFunctionOnCustomRange()

void FEProblemBase::projectFunctionOnCustomRange ( ConstElemRange elem_range,
Number(*)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &)  func,
Gradient(*)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &)  func_grad,
const libMesh::Parameters params,
const VariableName &  target_var 
)

Project a function onto a range of elements for a given variable.

Warning
The current implementation is not ideal. The projection takes place on all local active elements, ignoring the specified elem_range. After the projection, dof values on the specified elem_range are copied over to the current solution vector. This should be fixed once the project_vector or project_solution API is modified to take a custom element range.
Parameters
elem_rangeElement range to project on
funcFunction to project
func_gradGradient of the function
paramsParameters to pass to the function
target_varvariable name to project

Definition at line 3839 of file FEProblemBase.C.

Referenced by ElementSubdomainModifierBase::extrapolatePolynomial().

3850 {
3851  mooseAssert(!Threads::in_threads,
3852  "We're performing a projection based on data from just the thread 0 variable, so any "
3853  "modifications to the variable solution must have been thread joined already");
3854 
3855  const auto & var = getStandardVariable(0, target_var);
3856  const auto var_num = var.number();
3857  const auto sn = systemNumForVariable(target_var);
3858  auto & sys = getSystemBase(sn);
3859 
3860  // Let libmesh handle the projection
3861  System & libmesh_sys = getSystem(target_var);
3862  auto temp_vec = libmesh_sys.current_local_solution->zero_clone();
3863  libmesh_sys.project_vector(func, func_grad, params, *temp_vec);
3864  temp_vec->close();
3865 
3866  // Get the dof indices to copy
3867  DofMap & dof_map = sys.dofMap();
3868  std::set<dof_id_type> dof_indices;
3869  std::vector<dof_id_type> elem_dof_indices;
3870 
3871  for (const auto & elem : elem_range)
3872  {
3873  dof_map.dof_indices(elem, elem_dof_indices, var_num);
3874  dof_indices.insert(elem_dof_indices.begin(), elem_dof_indices.end());
3875  }
3876  std::vector<dof_id_type> dof_indices_v(dof_indices.begin(), dof_indices.end());
3877 
3878  // Copy the projected values into the solution vector
3879  std::vector<Real> dof_vals;
3880  temp_vec->get(dof_indices_v, dof_vals);
3881  mooseAssert(sys.solution().closed(),
3882  "The solution should be closed before mapping our projection");
3883  sys.solution().insert(dof_vals, dof_indices_v);
3884  sys.solution().close();
3885  sys.solution().localize(*libmesh_sys.current_local_solution, sys.dofMap().get_send_list());
3886 }
virtual libMesh::System & getSystem(const std::string &var_name) override
Returns the equation system containing the variable provided.
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
unsigned int systemNumForVariable(const VariableName &variable_name) const
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariable which may be in any system.
virtual const SystemBase & getSystemBase(const unsigned int sys_num) const
Get constant reference to a system in this problem.
std::unique_ptr< NumericVector< Number > > current_local_solution
void project_vector(NumericVector< Number > &new_vector, FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, int is_adjoint=-1) const

◆ projectInitialConditionOnCustomRange()

void FEProblemBase::projectInitialConditionOnCustomRange ( libMesh::ConstElemRange elem_range,
ConstBndNodeRange bnd_node_range,
const std::optional< std::set< VariableName >> &  target_vars = std::nullopt 
)

Project initial conditions for custom elem_range and bnd_node_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step.

Parameters
elem_rangeElement range to project on
bnd_node_rangeBoundary node range to project on
target_varsSet of variable names to project ICs

Definition at line 3764 of file FEProblemBase.C.

Referenced by ElementSubdomainModifierBase::applyIC(), and ActivateElementsUserObjectBase::initSolutions().

3768 {
3769  if (target_vars)
3770  {
3771  ComputeInitialConditionThread cic(*this, &(*target_vars));
3772  Threads::parallel_reduce(elem_range, cic);
3773  }
3774  else
3775  {
3776  ComputeInitialConditionThread cic(*this);
3777  Threads::parallel_reduce(elem_range, cic);
3778  }
3779 
3780  // Need to close the solution vector here so that boundary ICs take precendence
3781  for (auto & nl : _nl)
3782  nl->solution().close();
3783  _aux->solution().close();
3784 
3785  if (target_vars)
3786  {
3787  ComputeBoundaryInitialConditionThread cbic(*this, &(*target_vars));
3788  Threads::parallel_reduce(bnd_nodes, cbic);
3789  }
3790  else
3791  {
3793  Threads::parallel_reduce(bnd_nodes, cbic);
3794  }
3795 
3796  for (auto & nl : _nl)
3797  nl->solution().close();
3798  _aux->solution().close();
3799 
3800  // Also, load values into the SCALAR dofs
3801  // Note: We assume that all SCALAR dofs are on the
3802  // processor with highest ID
3803  if (processor_id() == (n_processors() - 1) && _scalar_ics.hasActiveObjects())
3804  {
3805  const auto & ics = _scalar_ics.getActiveObjects();
3806  for (const auto & ic : ics)
3807  {
3808  MooseVariableScalar & var = ic->variable();
3809 
3810  if (target_vars && !target_vars->count(var.name()))
3811  continue;
3812 
3813  var.reinit();
3814 
3815  DenseVector<Number> vals(var.order());
3816  ic->compute(vals);
3817 
3818  const unsigned int n_scalar_dofs = var.dofIndices().size();
3819  for (unsigned int i = 0; i < n_scalar_dofs; i++)
3820  {
3821  const auto global_index = var.dofIndices()[i];
3822  var.sys().solution().set(global_index, vals(i));
3823  var.setValue(i, vals(i));
3824  }
3825  }
3826  }
3827 
3828  for (auto & nl : _nl)
3829  {
3830  nl->solution().close();
3831  nl->solution().localize(*nl->system().current_local_solution, nl->dofMap().get_send_list());
3832  }
3833 
3834  _aux->solution().close();
3835  _aux->solution().localize(*_aux->sys().current_local_solution, _aux->dofMap().get_send_list());
3836 }
NumericVector< Number > & solution()
Definition: SystemBase.h:196
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::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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.

◆ projectSolution()

void FEProblemBase::projectSolution ( )

Definition at line 3696 of file FEProblemBase.C.

Referenced by initialAdaptMesh(), and initialSetup().

3697 {
3698  TIME_SECTION("projectSolution", 2, "Projecting Initial Solutions")
3699 
3700  FloatingPointExceptionGuard fpe_guard(_app);
3701 
3702  ConstElemRange & elem_range = *_mesh.getActiveLocalElementRange();
3703  ComputeInitialConditionThread cic(*this);
3704  Threads::parallel_reduce(elem_range, cic);
3705 
3706  if (haveFV())
3707  {
3709  ElemInfoRange elem_info_range(_mesh.ownedElemInfoBegin(), _mesh.ownedElemInfoEnd());
3710 
3711  ComputeFVInitialConditionThread cfvic(*this);
3712  Threads::parallel_reduce(elem_info_range, cfvic);
3713  }
3714 
3715  // Need to close the solution vector here so that boundary ICs take precendence
3716  for (auto & nl : _nl)
3717  nl->solution().close();
3718  _aux->solution().close();
3719 
3720  // now run boundary-restricted initial conditions
3721  ConstBndNodeRange & bnd_nodes = *_mesh.getBoundaryNodeRange();
3723  Threads::parallel_reduce(bnd_nodes, cbic);
3724 
3725  for (auto & nl : _nl)
3726  nl->solution().close();
3727  _aux->solution().close();
3728 
3729  // Also, load values into the SCALAR dofs
3730  // Note: We assume that all SCALAR dofs are on the
3731  // processor with highest ID
3732  if (processor_id() == (n_processors() - 1) && _scalar_ics.hasActiveObjects())
3733  {
3734  const auto & ics = _scalar_ics.getActiveObjects();
3735  for (const auto & ic : ics)
3736  {
3737  MooseVariableScalar & var = ic->variable();
3738  var.reinit();
3739 
3740  DenseVector<Number> vals(var.order());
3741  ic->compute(vals);
3742 
3743  const unsigned int n_scalar_dofs = var.dofIndices().size();
3744  for (unsigned int i = 0; i < n_scalar_dofs; i++)
3745  {
3746  const auto global_index = var.dofIndices()[i];
3747  var.sys().solution().set(global_index, vals(i));
3748  var.setValue(i, vals(i));
3749  }
3750  }
3751  }
3752 
3753  for (auto & sys : _solver_systems)
3754  {
3755  sys->solution().close();
3756  sys->solution().localize(*sys->system().current_local_solution, sys->dofMap().get_send_list());
3757  }
3758 
3759  _aux->solution().close();
3760  _aux->solution().localize(*_aux->sys().current_local_solution, _aux->dofMap().get_send_list());
3761 }
NumericVector< Number > & solution()
Definition: SystemBase.h:196
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:1578
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:357
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:1586
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:1339

◆ queryParam()

template<typename T >
const T * MooseBase::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 395 of file MooseBase.h.

396 {
397  return isParamValid(name) ? &getParam<T>(name) : nullptr;
398 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:199

◆ registerInvalidSolutionInternal()

InvalidSolutionID SolutionInvalidInterface::registerInvalidSolutionInternal ( const std::string &  message,
const bool  warning 
) const
protectedinherited

Definition at line 55 of file SolutionInvalidInterface.C.

57 {
59  _si_moose_base.type(), message, warning);
60 }
InvalidSolutionID registerInvalidity(const std::string &object_type, const std::string &message, const bool warning)
Call to register an invalid calculation.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
SolutionInvalidityRegistry & getSolutionInvalidityRegistry()
Get the global SolutionInvalidityRegistry singleton.
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

◆ registerRandomInterface()

void FEProblemBase::registerRandomInterface ( RandomInterface random_interface,
const std::string &  name 
)

Definition at line 8957 of file FEProblemBase.C.

Referenced by RandomInterface::setRandomResetFrequency().

8958 {
8959  auto insert_pair = moose_try_emplace(
8960  _random_data_objects, name, std::make_unique<RandomData>(*this, random_interface));
8961 
8962  auto random_data_ptr = insert_pair.first->second.get();
8963  random_interface.setRandomDataPointer(random_data_ptr);
8964 }
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:101
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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)
protected

Call when it is possible that the needs for ghosted elements has changed.

Parameters
mortar_changedWhether an update of mortar data has been requested since the last EquationSystems (re)initialization

Definition at line 5353 of file FEProblemBase.C.

Referenced by initialSetup(), meshChanged(), and possiblyRebuildGeomSearchPatches().

5354 {
5355  TIME_SECTION("reinitBecauseOfGhostingOrNewGeomObjects",
5356  3,
5357  "Reinitializing Because of Geometric Search Objects");
5358 
5359  // Need to see if _any_ processor has ghosted elems or geometry objects.
5360  bool needs_reinit = !_ghosted_elems.empty();
5361  needs_reinit = needs_reinit || !_geometric_search_data._nearest_node_locators.empty() ||
5362  (_mortar_data->hasObjects() && mortar_changed);
5363  needs_reinit =
5364  needs_reinit || (_displaced_problem &&
5365  (!_displaced_problem->geomSearchData()._nearest_node_locators.empty() ||
5366  (_mortar_data->hasDisplacedObjects() && mortar_changed)));
5367  _communicator.max(needs_reinit);
5368 
5369  if (needs_reinit)
5370  {
5371  // Call reinit to get the ghosted vectors correct now that some geometric search has been done
5372  es().reinit();
5373 
5374  if (_displaced_mesh)
5375  _displaced_problem->es().reinit();
5376  }
5377 }
const Parallel::Communicator & _communicator
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1095
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
virtual libMesh::EquationSystems & es() override
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
void max(const T &r, T &o, Request &req) const
std::shared_ptr< DisplacedProblem > _displaced_problem
GeometricSearchData _geometric_search_data
MooseMesh * _displaced_mesh

◆ reinitDirac()

bool FEProblemBase::reinitDirac ( const Elem elem,
const THREAD_ID  tid 
)
overridevirtual

Returns true if the Problem has Dirac kernels it needs to compute on elem.

The maximum number of qps can rise if several Dirac points are added to a single element. In that case we need to resize the zeros to compensate.

Implements SubProblem.

Definition at line 2176 of file FEProblemBase.C.

Referenced by ComputeDiracThread::onElement().

2177 {
2178  std::vector<Point> & points = _dirac_kernel_info.getPoints()[elem].first;
2179 
2180  unsigned int n_points = points.size();
2181 
2182  if (n_points)
2183  {
2184  if (n_points > _max_qps)
2185  {
2186  _max_qps = n_points;
2187 
2192  unsigned int max_qpts = getMaxQps();
2193  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
2194  {
2195  // the highest available order in libMesh is 43
2196  _scalar_zero[tid].resize(FORTYTHIRD, 0);
2197  _zero[tid].resize(max_qpts, 0);
2198  _grad_zero[tid].resize(max_qpts, RealGradient(0.));
2199  _second_zero[tid].resize(max_qpts, RealTensor(0.));
2200  _vector_zero[tid].resize(max_qpts, RealGradient(0.));
2201  _vector_curl_zero[tid].resize(max_qpts, RealGradient(0.));
2202  }
2203  }
2204 
2205  for (const auto i : index_range(_nl))
2206  {
2207  _assembly[tid][i]->reinitAtPhysical(elem, points);
2208  _nl[i]->prepare(tid);
2209  }
2210  _aux->prepare(tid);
2211 
2212  reinitElem(elem, tid);
2213  }
2214 
2215  _assembly[tid][_current_nl_sys->number()]->prepare();
2217  _assembly[tid][_current_nl_sys->number()]->prepareNonlocal();
2218 
2219  bool have_points = n_points > 0;
2221  {
2222  have_points |= _displaced_problem->reinitDirac(_displaced_mesh->elemPtr(elem->id()), tid);
2224  _displaced_problem->prepareNonlocal(tid);
2225  }
2226 
2227  return have_points;
2228 }
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:3193
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:1157
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:1051
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh
unsigned int getMaxQps() const

◆ reinitElem()

void FEProblemBase::reinitElem ( const Elem elem,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2231 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), ComputeMarkerThread::onElement(), ComputeElemDampingThread::onElement(), ComputeIndicatorThread::onElement(), ComputeMaterialsObjectThread::onElement(), ComputeUserObjectsThread::onElement(), ComputeInitialConditionThread::operator()(), reinitDirac(), and reinitElemPhys().

2232 {
2233  for (auto & sys : _solver_systems)
2234  sys->reinitElem(elem, tid);
2235  _aux->reinitElem(elem, tid);
2236 
2238  _displaced_problem->reinitElem(_displaced_mesh->elemPtr(elem->id()), tid);
2239 }
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:3193
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 
)

◆ reinitElemFace() [2/2]

virtual void FEProblemBase::reinitElemFace ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtual

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

reinitialize FE objects on a given element on a given side at a given set of reference points and then compute variable data.

Note that this method makes no assumptions about what's been called beforehand, e.g. you don't have to call some prepare method before this one. This is an all-in-one reinit

Reimplemented from SubProblem.

Definition at line 9304 of file FEProblemBase.C.

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

9310 {
9311  SubProblem::reinitElemFaceRef(elem, side, tolerance, pts, weights, tid);
9312 
9313  if (_displaced_problem)
9314  _displaced_problem->reinitElemFaceRef(
9315  _displaced_mesh->elemPtr(elem->id()), side, tolerance, pts, weights, tid);
9316 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3193
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:883
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ reinitElemNeighborAndLowerD()

void FEProblemBase::reinitElemNeighborAndLowerD ( const Elem elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2417 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInternalSide(), and NonlinearThread::onInternalSide().

2420 {
2421  reinitNeighbor(elem, side, tid);
2422 
2423  const Elem * lower_d_elem = _mesh.getLowerDElem(elem, side);
2424  if (lower_d_elem && _mesh.interiorLowerDBlocks().count(lower_d_elem->subdomain_id()) > 0)
2425  reinitLowerDElem(lower_d_elem, tid);
2426  else
2427  {
2428  // with mesh refinement, lower-dimensional element might be defined on neighbor side
2429  auto & neighbor = _assembly[tid][0]->neighbor();
2430  auto & neighbor_side = _assembly[tid][0]->neighborSide();
2431  const Elem * lower_d_elem_neighbor = _mesh.getLowerDElem(neighbor, neighbor_side);
2432  if (lower_d_elem_neighbor &&
2433  _mesh.interiorLowerDBlocks().count(lower_d_elem_neighbor->subdomain_id()) > 0)
2434  {
2435  auto qps = _assembly[tid][0]->qPointsFaceNeighbor().stdVector();
2436  std::vector<Point> reference_points;
2437  FEMap::inverse_map(
2438  lower_d_elem_neighbor->dim(), lower_d_elem_neighbor, qps, reference_points);
2439  reinitLowerDElem(lower_d_elem_neighbor, tid, &reference_points);
2440  }
2441  }
2442 
2444  _displaced_problem->reinitElemNeighborAndLowerD(
2445  _displaced_mesh->elemPtr(elem->id()), side, tid);
2446 }
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
const std::set< SubdomainID > & interiorLowerDBlocks() const
Definition: MooseMesh.h:1421
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3193
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:1751
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 
)
overridevirtual

Implements SubProblem.

Definition at line 2242 of file FEProblemBase.C.

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute().

2245 {
2246  mooseAssert(_mesh.queryElemPtr(elem->id()) == elem,
2247  "Are you calling this method with a displaced mesh element?");
2248 
2249  for (const auto i : index_range(_solver_systems))
2250  {
2251  _assembly[tid][i]->reinitAtPhysical(elem, phys_points_in_elem);
2252  _solver_systems[i]->prepare(tid);
2253  _assembly[tid][i]->prepare();
2255  _assembly[tid][i]->prepareNonlocal();
2256  }
2257  _aux->prepare(tid);
2258 
2259  reinitElem(elem, tid);
2260 }
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:3205
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 1289 of file SubProblem.C.

1290 {
1291  for (const auto nl : make_range(numNonlinearSystems()))
1292  assembly(tid, nl).reinitFVFace(fi);
1293 }
void reinitFVFace(const FaceInfo &fi)
Definition: Assembly.C:1857
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

◆ reinitKokkosMaterials()

void FEProblemBase::reinitKokkosMaterials ( )

◆ reinitLowerDElem()

void FEProblemBase::reinitLowerDElem ( const Elem lower_d_elem,
const THREAD_ID  tid,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)
overridevirtual

Reimplemented from SubProblem.

Definition at line 2290 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onBoundary(), NonlinearThread::prepareFace(), and reinitElemNeighborAndLowerD().

2294 {
2295  SubProblem::reinitLowerDElem(lower_d_elem, tid, pts, weights);
2296 
2298  _displaced_problem->reinitLowerDElem(
2299  _displaced_mesh->elemPtr(lower_d_elem->id()), tid, pts, weights);
2300 }
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:958
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3193
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 
)

Definition at line 4170 of file FEProblemBase.C.

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

4171 {
4172  if (hasActiveMaterialProperties(tid))
4173  {
4174  auto && elem = _assembly[tid][0]->elem();
4175  unsigned int n_points = _assembly[tid][0]->qRule()->n_points();
4176 
4177  auto & material_data = _material_props.getMaterialData(tid);
4178  material_data.resize(n_points);
4179 
4180  // Only swap if requested
4181  if (swap_stateful)
4182  material_data.swap(*elem);
4183 
4184  if (_discrete_materials.hasActiveBlockObjects(blk_id, tid))
4185  material_data.reset(_discrete_materials.getActiveBlockObjects(blk_id, tid));
4186 
4187  if (_materials.hasActiveBlockObjects(blk_id, tid))
4188  material_data.reinit(_materials.getActiveBlockObjects(blk_id, tid));
4189  }
4190 }
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 
)

reinit materials on a boundary

Parameters
boundary_idThe boundary on which to reinit corresponding materials
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
execute_statefulWhether to execute material objects that have stateful properties. This should be false when for example executing material objects for mortar contexts in which stateful properties don't make sense
reinit_matsspecific list of materials to reinit. Used notably in the context of mortar with stateful elements

Definition at line 4315 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), and NonlinearThread::prepareFace().

4319 {
4320  if (hasActiveMaterialProperties(tid) && needBoundaryMaterialOnSide(boundary_id, tid))
4321  {
4322  auto && elem = _assembly[tid][0]->elem();
4323  unsigned int side = _assembly[tid][0]->side();
4324  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4325 
4326  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4327  bnd_material_data.resize(n_points);
4328 
4329  if (swap_stateful && !bnd_material_data.isSwapped())
4330  bnd_material_data.swap(*elem, side);
4331 
4332  if (_discrete_materials.hasActiveBoundaryObjects(boundary_id, tid))
4333  bnd_material_data.reset(_discrete_materials.getActiveBoundaryObjects(boundary_id, tid));
4334 
4335  if (reinit_mats)
4336  bnd_material_data.reinit(*reinit_mats);
4337  else if (_materials.hasActiveBoundaryObjects(boundary_id, tid))
4338  bnd_material_data.reinit(_materials.getActiveBoundaryObjects(boundary_id, tid));
4339  }
4340 }
MaterialPropertyStorage & _bnd_material_props
bool needBoundaryMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
These methods are used to determine whether stateful material properties need to be stored on interna...
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 
)

reinit materials on element faces

Parameters
blk_idThe subdomain on which the element owning the face lives
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
reinit_matsspecific list of materials to reinit. Used notably in the context of mortar with stateful elements

Definition at line 4193 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and NonlinearThread::prepareFace().

4197 {
4198  // we reinit more often than needed here because we dont have a way to check whether
4199  // we need to compute the face materials on a particular (possibly external) face
4200  if (hasActiveMaterialProperties(tid))
4201  {
4202  auto && elem = _assembly[tid][0]->elem();
4203  unsigned int side = _assembly[tid][0]->side();
4204  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4205 
4206  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4207  bnd_material_data.resize(n_points);
4208 
4209  if (swap_stateful && !bnd_material_data.isSwapped())
4210  bnd_material_data.swap(*elem, side);
4211 
4212  if (_discrete_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4213  bnd_material_data.reset(
4214  _discrete_materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4215 
4216  if (reinit_mats)
4217  bnd_material_data.reinit(*reinit_mats);
4218  else if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4219  bnd_material_data.reinit(
4220  _materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4221  }
4222 }
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

◆ reinitMaterialsFaceOnBoundary()

void FEProblemBase::reinitMaterialsFaceOnBoundary ( const BoundaryID  boundary_id,
const SubdomainID  blk_id,
const THREAD_ID  tid,
const bool  swap_stateful = true,
const std::deque< MaterialBase *> *const  reinit_mats = nullptr 
)

reinit materials on element faces on a boundary (internal or external) This specific routine helps us not reinit when don't need to

Parameters
boundary_idThe boundary on which the face belongs
blk_idThe block id to which the element (who owns the face) belong
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
reinit_matsspecific list of materials to reinit. Used notably in the context of mortar with stateful elements

Definition at line 4225 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), and NonlinearThread::prepareFace().

4230 {
4231  if (hasActiveMaterialProperties(tid) && (needBoundaryMaterialOnSide(boundary_id, tid) ||
4232  needInterfaceMaterialOnSide(boundary_id, tid) ||
4233  needInternalNeighborSideMaterial(blk_id, tid)))
4234  {
4235  const auto * const elem = _assembly[tid][0]->elem();
4236  unsigned int side = _assembly[tid][0]->side();
4237  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4238 
4239  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4240  bnd_material_data.resize(n_points);
4241 
4242  if (swap_stateful && !bnd_material_data.isSwapped())
4243  bnd_material_data.swap(*elem, side);
4244 
4245  if (_discrete_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4246  bnd_material_data.reset(
4247  _discrete_materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4248 
4249  if (reinit_mats)
4250  bnd_material_data.reinit(*reinit_mats);
4251  else if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4252  bnd_material_data.reinit(
4253  _materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4254  }
4255 }
MaterialPropertyStorage & _bnd_material_props
bool needBoundaryMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
These methods are used to determine whether stateful material properties need to be stored on interna...
bool needInternalNeighborSideMaterial(SubdomainID subdomain_id, const THREAD_ID tid)
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
MaterialWarehouse _discrete_materials
bool needInterfaceMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
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 
)

Definition at line 4343 of file FEProblemBase.C.

Referenced by NonlinearThread::onInterface(), and ComputeUserObjectsThread::onInterface().

4346 {
4347  if (hasActiveMaterialProperties(tid) && needInterfaceMaterialOnSide(boundary_id, tid))
4348  {
4349  const Elem * const & elem = _assembly[tid][0]->elem();
4350  unsigned int side = _assembly[tid][0]->side();
4351  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
4352 
4353  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
4354  bnd_material_data.resize(n_points);
4355 
4356  if (swap_stateful && !bnd_material_data.isSwapped())
4357  bnd_material_data.swap(*elem, side);
4358 
4359  if (_interface_materials.hasActiveBoundaryObjects(boundary_id, tid))
4360  bnd_material_data.reinit(_interface_materials.getActiveBoundaryObjects(boundary_id, tid));
4361  }
4362 }
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
bool needInterfaceMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
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 
)

reinit materials on the neighboring element face

Parameters
blk_idThe subdomain on which the neighbor element lives
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
reinit_matsspecific list of materials to reinit. Used notably in the context of mortar with stateful elements

Definition at line 4275 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), reinitMaterialsNeighborOnBoundary(), and NonlinearSystemBase::reinitNodeFace().

4279 {
4280  if (hasActiveMaterialProperties(tid))
4281  {
4282  // NOTE: this will not work with h-adaptivity
4283  // lindsayad: why not?
4284 
4285  const Elem * neighbor = _assembly[tid][0]->neighbor();
4286  unsigned int neighbor_side = neighbor->which_neighbor_am_i(_assembly[tid][0]->elem());
4287 
4288  mooseAssert(neighbor, "neighbor should be non-null");
4289  mooseAssert(blk_id == neighbor->subdomain_id(),
4290  "The provided blk_id " << blk_id << " and neighbor subdomain ID "
4291  << neighbor->subdomain_id() << " do not match.");
4292 
4293  unsigned int n_points = _assembly[tid][0]->qRuleNeighbor()->n_points();
4294 
4295  auto & neighbor_material_data = _neighbor_material_props.getMaterialData(tid);
4296  neighbor_material_data.resize(n_points);
4297 
4298  // Only swap if requested
4299  if (swap_stateful)
4300  neighbor_material_data.swap(*neighbor, neighbor_side);
4301 
4302  if (_discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4303  neighbor_material_data.reset(
4304  _discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4305 
4306  if (reinit_mats)
4307  neighbor_material_data.reinit(*reinit_mats);
4308  else if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
4309  neighbor_material_data.reinit(
4310  _materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
4311  }
4312 }
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

◆ reinitMaterialsNeighborOnBoundary()

void FEProblemBase::reinitMaterialsNeighborOnBoundary ( const BoundaryID  boundary_id,
const SubdomainID  blk_id,
const THREAD_ID  tid,
const bool  swap_stateful = true,
const std::deque< MaterialBase *> *const  reinit_mats = nullptr 
)

reinit materials on neighbor element (usually faces) on a boundary (internal or external) This specific routine helps us not reinit when don't need to

Parameters
boundary_idThe boundary on which the face belongs
blk_idThe block id to which the element (who owns the face) belong
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
reinit_matsspecific list of materials to reinit. Used notably in the context of mortar with stateful elements

Definition at line 4258 of file FEProblemBase.C.

Referenced by NonlinearThread::onInterface().

4264 {
4265  // Since objects don't declare whether they need the face or neighbor (side) material properties,
4266  // we use the same criteria for skipping material property computations as for face material
4267  // properties This could be a future optimization.
4268  if (hasActiveMaterialProperties(tid) && (needBoundaryMaterialOnSide(boundary_id, tid) ||
4269  needInterfaceMaterialOnSide(boundary_id, tid) ||
4270  needInternalNeighborSideMaterial(blk_id, tid)))
4271  reinitMaterialsNeighbor(blk_id, tid, swap_stateful, reinit_mats);
4272 }
bool needBoundaryMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
These methods are used to determine whether stateful material properties need to be stored on interna...
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
bool needInternalNeighborSideMaterial(SubdomainID subdomain_id, const THREAD_ID tid)
bool needInterfaceMaterialOnSide(BoundaryID bnd_id, const THREAD_ID tid)
bool hasActiveMaterialProperties(const THREAD_ID tid) const
Method to check whether or not a list of active material roperties has been set.

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

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

996 {
997  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
998  assembly(tid, nl_sys_num).reinitMortarElem(elem);
999 }
void reinitMortarElem(const Elem *elem)
reinitialize a mortar segment mesh element in order to get a proper JxW
Definition: Assembly.C:2404
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 
)

Call reinit on mortar user objects with matching primary boundary ID, secondary boundary ID, and displacement characteristics.

Definition at line 9569 of file FEProblemBase.C.

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

9572 {
9573  const auto mortar_uos =
9574  getMortarUserObjects(primary_boundary_id, secondary_boundary_id, displaced);
9575  for (auto * const mortar_uo : mortar_uos)
9576  {
9577  mortar_uo->setNormals();
9578  mortar_uo->reinit();
9579  }
9580 }
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 
)
overridevirtual

Implements SubProblem.

Definition at line 2378 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInterface(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and reinitElemNeighborAndLowerD().

2379 {
2380  setNeighborSubdomainID(elem, side, tid);
2381 
2382  const Elem * neighbor = elem->neighbor_ptr(side);
2383  unsigned int neighbor_side = neighbor->which_neighbor_am_i(elem);
2384 
2385  for (const auto i : index_range(_nl))
2386  {
2387  _assembly[tid][i]->reinitElemAndNeighbor(elem, side, neighbor, neighbor_side);
2388  _nl[i]->prepareNeighbor(tid);
2389  // Called during stateful material property evaluation outside of solve
2390  _assembly[tid][i]->prepareNeighbor();
2391  }
2392  _aux->prepareNeighbor(tid);
2393 
2394  for (auto & nl : _nl)
2395  {
2396  nl->reinitElemFace(elem, side, tid);
2397  nl->reinitNeighborFace(neighbor, neighbor_side, tid);
2398  }
2399  _aux->reinitElemFace(elem, side, tid);
2400  _aux->reinitNeighborFace(neighbor, neighbor_side, tid);
2401 
2403  {
2404  // There are cases like for cohesive zone modeling without significant sliding where we cannot
2405  // use FEInterface::inverse_map in Assembly::reinitElemAndNeighbor in the displaced problem
2406  // because the physical points coming from the element don't actually lie on the neighbor.
2407  // Moreover, what's the point of doing another physical point inversion in other cases? We only
2408  // care about the reference points which we can just take from the undisplaced computation
2409  const auto & displaced_ref_pts = _assembly[tid][0]->qRuleNeighbor()->get_points();
2410 
2411  _displaced_problem->reinitNeighbor(
2412  _displaced_mesh->elemPtr(elem->id()), side, tid, &displaced_ref_pts);
2413  }
2414 }
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:3193
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 
)
overridevirtual

reinitialize FE objects on a given neighbor element on a given side at a given set of reference points and then compute variable data.

Note that this method makes no assumptions about what's been called beforehand, e.g. you don't have to call some prepare method before this one. This is an all-in-one reinit

Reimplemented from SubProblem.

Definition at line 9319 of file FEProblemBase.C.

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

9325 {
9326  SubProblem::reinitNeighborFaceRef(neighbor_elem, neighbor_side, tolerance, pts, weights, tid);
9327 
9328  if (_displaced_problem)
9329  _displaced_problem->reinitNeighborFaceRef(
9330  _displaced_mesh->elemPtr(neighbor_elem->id()), neighbor_side, tolerance, pts, weights, tid);
9331 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3193
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:922
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 988 of file SubProblem.C.

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

989 {
990  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
991  assembly(tid, nl_sys_num).reinitNeighborLowerDElem(elem);
992 }
void reinitNeighborLowerDElem(const Elem *elem)
reinitialize a neighboring lower dimensional element
Definition: Assembly.C:2383
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 
)
overridevirtual

◆ reinitNeighborPhys() [2/2]

virtual void FEProblemBase::reinitNeighborPhys ( const Elem *  neighbor,
const std::vector< Point > &  physical_points,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

◆ reinitNode()

void FEProblemBase::reinitNode ( const Node node,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2303 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), NonlinearSystemBase::computeResidualInternal(), ComputeNodalUserObjectsThread::onNode(), ComputeNodalDampingThread::onNode(), ComputeNodalKernelsThread::onNode(), and ComputeNodalKernelJacobiansThread::onNode().

2304 {
2306  _displaced_problem->reinitNode(&_displaced_mesh->nodeRef(node->id()), tid);
2307 
2308  for (const auto i : index_range(_nl))
2309  {
2310  _assembly[tid][i]->reinit(node);
2311  _nl[i]->reinitNode(node, tid);
2312  }
2313  _aux->reinitNode(node, tid);
2314 }
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:861
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 
)
overridevirtual

Implements SubProblem.

Definition at line 2317 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().

2318 {
2320  _displaced_problem->reinitNodeFace(&_displaced_mesh->nodeRef(node->id()), bnd_id, tid);
2321 
2322  for (const auto i : index_range(_nl))
2323  {
2324  _assembly[tid][i]->reinit(node);
2325  _nl[i]->reinitNodeFace(node, bnd_id, tid);
2326  }
2327  _aux->reinitNodeFace(node, bnd_id, tid);
2328 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:861
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 
)
overridevirtual

Implements SubProblem.

Definition at line 2331 of file FEProblemBase.C.

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

2332 {
2334  _displaced_problem->reinitNodes(nodes, tid);
2335 
2336  for (auto & nl : _nl)
2337  nl->reinitNodes(nodes, tid);
2338  _aux->reinitNodes(nodes, tid);
2339 }
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 
)
overridevirtual

Implements SubProblem.

Definition at line 2342 of file FEProblemBase.C.

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

2343 {
2345  _displaced_problem->reinitNodesNeighbor(nodes, tid);
2346 
2347  for (auto & nl : _nl)
2348  nl->reinitNodesNeighbor(nodes, tid);
2349  _aux->reinitNodesNeighbor(nodes, tid);
2350 }
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)
overridevirtual

Implements SubProblem.

Definition at line 2370 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians(), NonlinearSystemBase::constraintJacobians(), and NonlinearThread::onElement().

2371 {
2372  _assembly[tid][_current_nl_sys->number()]->prepareOffDiagScalar();
2373  if (_displaced_problem)
2374  _displaced_problem->reinitOffDiagScalars(tid);
2375 }
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:1157
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 
)
overridevirtual

fills the VariableValue arrays for scalar variables from the solution vector

Parameters
tidThe thread id
reinit_for_derivative_reorderingA flag indicating whether we are reinitializing for the purpose of re-ordering derivative information for ADNodalBCs

Implements SubProblem.

Definition at line 2353 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), computeJacobianTags(), computeResidualAndJacobian(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), computeResidualTags(), NonlinearSystemBase::computeScalarKernelsJacobians(), AuxiliarySystem::computeScalarVars(), and initialSetup().

2354 {
2355  TIME_SECTION("reinitScalars", 3, "Reinitializing Scalar Variables");
2356 
2358  _displaced_problem->reinitScalars(tid, reinit_for_derivative_reordering);
2359 
2360  for (auto & nl : _nl)
2361  nl->reinitScalars(tid, reinit_for_derivative_reordering);
2362  _aux->reinitScalars(tid, reinit_for_derivative_reordering);
2363 
2364  // This is called outside of residual/Jacobian call-backs
2365  for (auto & assembly : _assembly[tid])
2367 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void prepareScalar()
Definition: Assembly.C:2951
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 1068 of file SubProblem.C.

1069 {
1070  EquationSystems & eq = es();
1071  const auto n_sys = eq.n_systems();
1072  DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1073 
1074  const bool found_in_root_sys =
1076  nl_dof_map.algebraic_ghosting_functors_end(),
1077  &algebraic_gf) != nl_dof_map.algebraic_ghosting_functors_end();
1078 
1079 #ifndef NDEBUG
1080  const bool found_in_our_map =
1081  _root_alg_gf_to_sys_clones.find(&algebraic_gf) != _root_alg_gf_to_sys_clones.end();
1082  mooseAssert(found_in_root_sys == found_in_our_map,
1083  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1084  "it in our gf to clones map");
1085 #endif
1086 
1087  if (found_in_root_sys) // libMesh yells if we try to remove
1088  // something that's not there
1089  nl_dof_map.remove_algebraic_ghosting_functor(algebraic_gf);
1090 
1091  auto it = _root_alg_gf_to_sys_clones.find(&algebraic_gf);
1092  if (it == _root_alg_gf_to_sys_clones.end())
1093  return;
1094 
1095  auto & clones_vec = it->second;
1096  mooseAssert((n_sys - 1) == clones_vec.size(),
1097  "The size of the gf clones vector doesn't match the number of systems minus one");
1098  if (clones_vec.empty())
1099  {
1100  mooseAssert(n_sys == 1, "The clones vector should only be empty if there is only one system");
1101  return;
1102  }
1103 
1104  for (const auto i : make_range(n_sys))
1105  eq.get_system(i + 1).get_dof_map().remove_algebraic_ghosting_functor(*clones_vec[i]);
1106 
1107  _root_alg_gf_to_sys_clones.erase(it->first);
1108 }
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:42
unsigned int n_systems() const
GhostingFunctorIterator algebraic_ghosting_functors_begin() const
GhostingFunctorIterator algebraic_ghosting_functors_end() 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:1197
IntRange< T > make_range(T beg, T end)
void remove_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor)

◆ removeCouplingGhostingFunctor()

void SubProblem::removeCouplingGhostingFunctor ( libMesh::GhostingFunctor coupling_gf)
inherited

Remove a coupling ghosting functor from this problem's DofMaps.

Definition at line 1111 of file SubProblem.C.

1112 {
1113  EquationSystems & eq = es();
1114  const auto num_nl_sys = numNonlinearSystems();
1115  if (!num_nl_sys)
1116  return;
1117 
1118  DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1119  const bool found_in_root_sys = std::find(nl_dof_map.coupling_functors_begin(),
1120  nl_dof_map.coupling_functors_end(),
1121  &coupling_gf) != nl_dof_map.coupling_functors_end();
1122 
1123 #ifndef NDEBUG
1124  const bool found_in_our_map =
1126  mooseAssert(found_in_root_sys == found_in_our_map,
1127  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1128  "it in our gf to clones map");
1129 #endif
1130 
1131  if (found_in_root_sys) // libMesh yells if we try to remove
1132  // something that's not there
1133  nl_dof_map.remove_coupling_functor(coupling_gf);
1134 
1135  auto it = _root_coupling_gf_to_sys_clones.find(&coupling_gf);
1136  if (it == _root_coupling_gf_to_sys_clones.end())
1137  return;
1138 
1139  auto & clones_vec = it->second;
1140  mooseAssert((num_nl_sys - 1) == clones_vec.size(),
1141  "The size of the gf clones vector doesn't match the number of systems minus one");
1142  if (clones_vec.empty())
1143  {
1144  mooseAssert(num_nl_sys == 1,
1145  "The clones vector should only be empty if there is only one nonlinear system");
1146  return;
1147  }
1148 
1149  for (const auto i : make_range(num_nl_sys))
1150  eq.get_system(i + 1).get_dof_map().remove_coupling_functor(*clones_vec[i]);
1151 
1152  _root_coupling_gf_to_sys_clones.erase(it->first);
1153 }
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:42
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:1204
const T_sys & get_system(std::string_view name) const
virtual libMesh::EquationSystems & es()=0
GhostingFunctorIterator coupling_functors_end() const
void remove_coupling_functor(GhostingFunctor &coupling_functor)
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0
GhostingFunctorIterator coupling_functors_begin() const

◆ reportMooseObjectDependency()

void FEProblemBase::reportMooseObjectDependency ( MooseObject a,
MooseObject b 
)

Register a MOOSE object dependency so we can either order operations properly or report when we cannot.

a -> b (a depends on b)

Definition at line 5347 of file FEProblemBase.C.

5348 {
5349  //<< "Object " << a->name() << " -> " << b->name() << std::endl;
5350 }

◆ resetFailNextNonlinearConvergenceCheck()

void FEProblemBase::resetFailNextNonlinearConvergenceCheck ( )
inline

Tell the problem that the nonlinear convergence check(s) may proceed as normal.

Definition at line 2659 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 ( )
inline

Tell the problem that the system convergence check(s) may proceed as normal.

Definition at line 2661 of file FEProblemBase.h.

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

bool _fail_next_system_convergence_check

◆ resetState()

void FEProblemBase::resetState ( )
privatevirtual

Reset state of this object in preparation for the next evaluation.

Definition at line 6745 of file FEProblemBase.C.

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

6746 {
6747  // Our default state is to allow computing derivatives
6748  ADReal::do_derivatives = true;
6750 
6751  // Clear the VectorTags and MatrixTags
6754 
6757 
6761  if (_displaced_problem)
6762  {
6763  _displaced_problem->setCurrentlyComputingResidual(false);
6764  _displaced_problem->setCurrentlyComputingJacobian(false);
6765  _displaced_problem->setCurrentlyComputingResidualAndJacobian(false);
6766  }
6767 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.
void clearCurrentResidualVectorTags()
Clear the current residual vector tag data structure.
void setCurrentlyComputingResidual(bool currently_computing_residual) final
Set whether or not the problem is in the process of computing the residual.
const ExecFlagType EXEC_NONE
Definition: Moose.C:29
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:1498
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
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1113
void clearCurrentJacobianMatrixTags()
Clear the current Jacobian matrix tag data structure ...
std::shared_ptr< DisplacedProblem > _displaced_problem
bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
Definition: SubProblem.h:1110

◆ residualSetup()

void FEProblemBase::residualSetup ( )
overridevirtual

Reimplemented from SubProblem.

Definition at line 9469 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::residualSetup().

9470 {
9472  // We need to setup all the nonlinear systems other than our current one which actually called
9473  // this method (so we have to make sure we don't go in a circle)
9474  for (const auto i : make_range(numNonlinearSystems()))
9475  if (i != currentNlSysNum())
9476  _nl[i]->residualSetup();
9477  // We don't setup the aux sys because that's been done elsewhere
9478  if (_displaced_problem)
9479  _displaced_problem->residualSetup();
9480 }
virtual std::size_t numNonlinearSystems() const override
virtual void residualSetup()
Definition: SubProblem.C:1204
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 
)

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

9393 {
9394  getMaterialData(data_type, tid).resize(nqp);
9395 }
MPI_Datatype data_type
MaterialData & getMaterialData(Moose::MaterialDataType type, const THREAD_ID tid=0, const MooseObject *object=nullptr) 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 78 of file Restartable.C.

Referenced by Restartable::declareRecoverableData(), and Restartable::declareRestartableDataHelper().

79 {
80  return _restartable_system_name + "/" + _restartable_name + "/" + data_name;
81 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:250
const std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:237

◆ restoreMultiApps()

void FEProblemBase::restoreMultiApps ( ExecFlagType  type,
bool  force = false 
)

Restore the MultiApps associated with the ExecFlagType.

Parameters
forceForce restoration because something went wrong with the solve

Definition at line 5782 of file FEProblemBase.C.

Referenced by TransientBase::incrementStepOrReject(), and FixedPointSolve::solve().

5783 {
5784  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5785 
5786  if (multi_apps.size())
5787  {
5788  if (_verbose_multiapps)
5789  {
5790  if (force)
5791  _console << COLOR_CYAN << "\nRestoring Multiapps on " << type.name()
5792  << " because of solve failure!" << COLOR_DEFAULT << std::endl;
5793  else
5794  _console << COLOR_CYAN << "\nRestoring MultiApps on " << type.name() << COLOR_DEFAULT
5795  << std::endl;
5796  }
5797 
5798  for (const auto & multi_app : multi_apps)
5799  multi_app->restore(force);
5800 
5802 
5803  if (_verbose_multiapps)
5804  _console << COLOR_CYAN << "Finished Restoring MultiApps on " << type.name() << "\n"
5805  << COLOR_DEFAULT << std::endl;
5806  }
5807 }
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...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
void parallelBarrierNotify(const Parallel::Communicator &comm, bool messaging)
Definition: MooseUtils.C:327
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ restoreOldSolutions()

void FEProblemBase::restoreOldSolutions ( )
virtual

Restore old solutions from the backup vectors and deallocate them.

Definition at line 6932 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration().

6933 {
6934  TIME_SECTION("restoreOldSolutions", 5, "Restoring Old Solutions");
6935 
6936  for (auto & sys : _solver_systems)
6937  sys->restoreOldSolutions();
6938  _aux->restoreOldSolutions();
6939 }
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
inline
Returns
Whether the original matrix nonzero pattern is restored before each Jacobian assembly

Definition at line 2183 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 ( )
virtual

Definition at line 6894 of file FEProblemBase.C.

Referenced by ActivateElementsUserObjectBase::initSolutions(), TimeStepper::rejectStep(), and updateMeshXFEM().

6895 {
6896  TIME_SECTION("restoreSolutions", 5, "Restoring Solutions");
6897 
6898  if (!_not_zeroed_tagged_vectors.empty())
6899  paramError("not_zeroed_tag_vectors",
6900  "There is currently no way to restore not-zeroed vectors.");
6901 
6902  for (auto & sys : _solver_systems)
6903  {
6904  if (_verbose_restore)
6905  _console << "Restoring solutions on system " << sys->name() << "..." << std::endl;
6906  sys->restoreSolutions();
6907  }
6908 
6909  if (_verbose_restore)
6910  _console << "Restoring solutions on Auxiliary system..." << std::endl;
6911  _aux->restoreSolutions();
6912 
6913  if (_verbose_restore)
6914  _console << "Restoring postprocessor, vector-postprocessor, and reporter data..." << std::endl;
6916 
6917  if (_displaced_problem)
6918  _displaced_problem->updateMesh();
6919 }
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseBase.h:439
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:1119
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:1110

◆ 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:1113

◆ saveOldSolutions()

void FEProblemBase::saveOldSolutions ( )
virtual

Allocate vectors and save old solutions into them.

Definition at line 6922 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration().

6923 {
6924  TIME_SECTION("saveOldSolutions", 5, "Saving Old Solutions");
6925 
6926  for (auto & sys : _solver_systems)
6927  sys->saveOldSolutions();
6928  _aux->saveOldSolutions();
6929 }
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 301 of file SubProblem.C.

Referenced by computeLinearSystemSys().

304 {
305  selected_tags.clear();
306  for (const auto & matrix_tag_pair : input_matrix_tags)
307  if (system.hasMatrix(matrix_tag_pair.second))
308  selected_tags.insert(matrix_tag_pair.second);
309 }
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:360

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

Referenced by computeLinearSystemSys(), computeResidualAndJacobian(), and ComputeResidualAndJacobianThread::determineObjectWarehouses().

293 {
294  selected_tags.clear();
295  for (const auto & vector_tag : input_vector_tags)
296  if (system.hasVector(vector_tag._id))
297  selected_tags.insert(vector_tag._id);
298 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:924

◆ setActiveElementalMooseVariables()

void FEProblemBase::setActiveElementalMooseVariables ( const std::set< MooseVariableFEBase *> &  moose_vars,
const THREAD_ID  tid 
)
overridevirtual

Set the MOOSE variables to be reinited on each element.

Parameters
moose_varsA set of variables that need to be reinited each time reinit() is called.
tidThe thread id

Reimplemented from SubProblem.

Definition at line 6069 of file FEProblemBase.C.

Referenced by prepareMaterials(), ComputeMarkerThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeDiracThread::subdomainChanged(), NonlinearThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

6071 {
6073 
6074  if (_displaced_problem)
6075  _displaced_problem->setActiveElementalMooseVariables(moose_vars, tid);
6076 }
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:444
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::setActiveFEVariableCoupleableMatrixTags ( std::set< TagID > &  mtags,
const THREAD_ID  tid 
)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6031 of file FEProblemBase.C.

6032 {
6034 
6035  if (_displaced_problem)
6036  _displaced_problem->setActiveFEVariableCoupleableMatrixTags(mtags, tid);
6037 }
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:364
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setActiveFEVariableCoupleableVectorTags()

void FEProblemBase::setActiveFEVariableCoupleableVectorTags ( std::set< TagID > &  vtags,
const THREAD_ID  tid 
)
overridevirtual

◆ setActiveMaterialProperties()

void FEProblemBase::setActiveMaterialProperties ( const std::unordered_set< unsigned int > &  mat_prop_ids,
const THREAD_ID  tid 
)

Record and set the material properties required by the current computing thread.

Parameters
mat_prop_idsThe set of material properties required by the current computing thread.
tidThe thread id

Definition at line 6124 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), prepareMaterials(), NodalPatchRecovery::reinitPatch(), NonlinearSystemBase::setConstraintSecondaryValues(), and ComputeDiracThread::subdomainChanged().

6126 {
6127  // mark active properties in every material
6128  for (auto & mat : _all_materials.getObjects(tid))
6129  mat->setActiveProperties(mat_prop_ids);
6130  for (auto & mat : _all_materials[Moose::FACE_MATERIAL_DATA].getObjects(tid))
6131  mat->setActiveProperties(mat_prop_ids);
6132  for (auto & mat : _all_materials[Moose::NEIGHBOR_MATERIAL_DATA].getObjects(tid))
6133  mat->setActiveProperties(mat_prop_ids);
6134 
6135  _has_active_material_properties[tid] = !mat_prop_ids.empty();
6136 }
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 
)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6049 of file FEProblemBase.C.

Referenced by AuxiliarySystem::setScalarVariableCoupleableTags().

6051 {
6053 
6054  if (_displaced_problem)
6055  _displaced_problem->setActiveScalarVariableCoupleableMatrixTags(mtags, tid);
6056 }
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:403
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::setActiveScalarVariableCoupleableVectorTags ( std::set< TagID > &  vtags,
const THREAD_ID  tid 
)
overridevirtual

Reimplemented from SubProblem.

Definition at line 6059 of file FEProblemBase.C.

Referenced by AuxiliarySystem::setScalarVariableCoupleableTags().

6061 {
6063 
6064  if (_displaced_problem)
6065  _displaced_problem->setActiveScalarVariableCoupleableVectorTags(vtags, tid);
6066 }
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
Definition: SubProblem.C:410
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setAuxKernelParamsAndLog()

void FEProblemBase::setAuxKernelParamsAndLog ( const std::string &  ak_name,
const std::string &  name,
InputParameters parameters,
const std::string &  base_name 
)
private

Set the subproblem and system parameters for auxiliary kernels and log their addition.

Parameters
ak_nameThe type of the auxiliary kernel
nameThe name of the auxiliary kernel
parametersThe auxiliary kernel parameters
base_nameThe base type of the auxiliary kernel, i.e. AuxKernel or KokkosAuxKernel

Definition at line 3002 of file FEProblemBase.C.

Referenced by addAuxKernel().

3006 {
3007  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3008  {
3009  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3010  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3011  parameters.set<SystemBase *>("_nl_sys") = &_displaced_problem->solverSys(0);
3012  if (!parameters.get<std::vector<BoundaryName>>("boundary").empty())
3013  _reinit_displaced_face = true;
3014  else
3015  _reinit_displaced_elem = true;
3016  }
3017  else
3018  {
3019  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3020  {
3021  // We allow AuxKernels to request that they use_displaced_mesh,
3022  // but then be overridden when no displacements variables are
3023  // provided in the Mesh block. If that happened, update the value
3024  // of use_displaced_mesh appropriately for this AuxKernel.
3025  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3026  parameters.set<bool>("use_displaced_mesh") = false;
3027  }
3028 
3029  parameters.set<SubProblem *>("_subproblem") = this;
3030  parameters.set<SystemBase *>("_sys") = _aux.get();
3031  parameters.set<SystemBase *>("_nl_sys") = _solver_systems[0].get();
3032  }
3033 
3034  logAdd(base_name, name, ak_name, parameters);
3035 }
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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

◆ setAxisymmetricCoordAxis()

void FEProblemBase::setAxisymmetricCoordAxis ( const MooseEnum rz_coord_axis)

Definition at line 848 of file FEProblemBase.C.

849 {
850  _mesh.setAxisymmetricCoordAxis(rz_coord_axis);
851 }
MooseMesh & _mesh
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
For axisymmetric simulations, set the symmetry coordinate axis.
Definition: MooseMesh.C:4293

◆ setChainControlDataOutput()

void SubProblem::setChainControlDataOutput ( bool  set_output)
inlineinherited

Setter for debug chain control data output.

Definition at line 926 of file SubProblem.h.

926 { _show_chain_control_data = set_output; }
bool _show_chain_control_data
Whether to output a list of all the chain control data.
Definition: SubProblem.h:1169

◆ setConstJacobian()

void FEProblemBase::setConstJacobian ( bool  state)
inline

Set flag that Jacobian is constant (for optimization purposes)

Parameters
stateTrue if the Jacobian is constant, false otherwise

Definition at line 2031 of file FEProblemBase.h.

Referenced by ExplicitEuler::preSolve(), ExplicitTVDRK2::preSolve(), and ExplicitRK2::preSolve().

2031 { _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 
)

Definition at line 840 of file FEProblemBase.C.

842 {
843  TIME_SECTION("setCoordSystem", 5, "Setting Coordinate System");
844  _mesh.setCoordSystem(blocks, coord_sys);
845 }
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:4161

◆ setCoupling()

void FEProblemBase::setCoupling ( Moose::CouplingType  type)

Set the coupling between variables TODO: allow user-defined coupling.

Parameters
typeType of coupling

Definition at line 6300 of file FEProblemBase.C.

Referenced by init(), setCouplingMatrix(), and Moose::SlepcSupport::setEigenProblemSolverParams().

6301 {
6303  {
6305  mooseError("Someone told us (the FEProblemBase) to trust the user coupling matrix, but we "
6306  "haven't been provided a coupling matrix!");
6307 
6308  // We've been told to trust the user coupling matrix, so we're going to leave things alone
6309  return;
6310  }
6311 
6312  _coupling = type;
6313 }
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:93
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ setCouplingMatrix() [1/2]

void FEProblemBase::setCouplingMatrix ( std::unique_ptr< libMesh::CouplingMatrix cm,
const unsigned int  nl_sys_num 
)

Set custom coupling matrix.

Parameters
cmcoupling matrix to be set
nl_sys_numwhich nonlinear system we are setting the coupling matrix for

Definition at line 6324 of file FEProblemBase.C.

Referenced by MoosePreconditioner::setCouplingMatrix().

6325 {
6327  _cm[i] = std::move(cm);
6328 }
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 
)

Definition at line 6316 of file FEProblemBase.C.

6317 {
6318  // TODO: Deprecate method
6320  _cm[i].reset(cm);
6321 }
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)

Definition at line 9686 of file FEProblemBase.C.

9687 {
9688  if (!range)
9689  {
9691  return;
9692  }
9693 
9694  _current_algebraic_bnd_node_range = std::make_unique<ConstBndNodeRange>(*range);
9695 }
std::unique_ptr< ConstBndNodeRange > _current_algebraic_bnd_node_range

◆ setCurrentAlgebraicElementRange()

void FEProblemBase::setCurrentAlgebraicElementRange ( libMesh::ConstElemRange range)

These functions allow setting custom ranges for the algebraic elements, nodes, and boundary nodes that contribute to the jacobian and residual for this local processor.

setCurrentAlgebraicElementRange() sets the element range that contributes to the system. A nullptr will reset the range to use the mesh's range.

setCurrentAlgebraicNodeRange() sets the node range that contributes to the system. A nullptr will reset the range to use the mesh's range.

setCurrentAlgebraicBndNodeRange() sets the boundary node range that contributes to the system. A nullptr will reset the range to use the mesh's range.

Parameters
rangeA pointer to the const range object representing the algebraic elements, nodes, or boundary nodes.

Definition at line 9664 of file FEProblemBase.C.

9665 {
9666  if (!range)
9667  {
9669  return;
9670  }
9671 
9672  _current_algebraic_elem_range = std::make_unique<ConstElemRange>(*range);
9673 }
std::unique_ptr< libMesh::ConstElemRange > _current_algebraic_elem_range

◆ setCurrentAlgebraicNodeRange()

void FEProblemBase::setCurrentAlgebraicNodeRange ( libMesh::ConstNodeRange range)

Definition at line 9675 of file FEProblemBase.C.

9676 {
9677  if (!range)
9678  {
9680  return;
9681  }
9682 
9683  _current_algebraic_node_range = std::make_unique<ConstNodeRange>(*range);
9684 }
std::unique_ptr< libMesh::ConstNodeRange > _current_algebraic_node_range

◆ setCurrentBoundaryID()

void FEProblemBase::setCurrentBoundaryID ( BoundaryID  bid,
const THREAD_ID  tid 
)
overridevirtual

sets the current boundary ID in assembly

Reimplemented from SubProblem.

Definition at line 9600 of file FEProblemBase.C.

9601 {
9603  if (_displaced_problem)
9604  _displaced_problem->setCurrentBoundaryID(bid, tid);
9605 }
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid)
sets the current boundary ID in assembly
Definition: SubProblem.C:790
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setCurrentExecuteOnFlag()

void FEProblemBase::setCurrentExecuteOnFlag ( const ExecFlagType flag)

Definition at line 4795 of file FEProblemBase.C.

Referenced by execute(), initialSetup(), and outputStep().

4796 {
4797  _current_execute_on_flag = flag;
4798 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.

◆ setCurrentLinearSystem()

void FEProblemBase::setCurrentLinearSystem ( unsigned int  sys_num)

Set the current linear system pointer.

Parameters
sys_numThe number of linear system

Definition at line 9617 of file FEProblemBase.C.

Referenced by computeLinearSystemSys(), LinearSystem::computeLinearSystemTags(), and solveLinearSystem().

9618 {
9619  mooseAssert(sys_num < _linear_systems.size(),
9620  "System number greater than the number of linear systems");
9621  _current_linear_sys = _linear_systems[sys_num].get();
9623 }
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 
)
overridevirtual

Set the current lower dimensional element.

This can be null

Reimplemented from SubProblem.

Definition at line 9591 of file FEProblemBase.C.

9592 {
9593  SubProblem::setCurrentLowerDElem(lower_d_elem, tid);
9594  if (_displaced_problem)
9595  _displaced_problem->setCurrentLowerDElem(
9596  lower_d_elem ? _displaced_mesh->elemPtr(lower_d_elem->id()) : nullptr, tid);
9597 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3193
virtual void setCurrentLowerDElem(const Elem *const lower_d_elem, const THREAD_ID tid)
Set the current lower dimensional element.
Definition: SubProblem.C:1385
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 computeResidualAndJacobian(), and 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:1098

◆ setCurrentlyComputingResidual()

void FEProblemBase::setCurrentlyComputingResidual ( bool  currently_computing_residual)
finalvirtual

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

Reimplemented from SubProblem.

Definition at line 9271 of file FEProblemBase.C.

Referenced by computeResidualAndJacobian(), NonlinearSystemBase::computeResidualTags(), and resetState().

9272 {
9273  if (_displaced_problem)
9274  _displaced_problem->setCurrentlyComputingResidual(currently_computing_residual);
9275  _currently_computing_residual = currently_computing_residual;
9276 }
std::shared_ptr< DisplacedProblem > _displaced_problem
bool _currently_computing_residual
Whether the residual is being evaluated.
Definition: SubProblem.h:1107

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

Referenced by computeResidualAndJacobian(), and resetState().

1500 {
1501  _currently_computing_residual_and_jacobian = currently_computing_residual_and_jacobian;
1502 }
bool _currently_computing_residual_and_jacobian
Flag to determine whether the problem is currently computing the residual and Jacobian.
Definition: SubProblem.h:1101

◆ setCurrentNonlinearSystem()

void FEProblemBase::setCurrentNonlinearSystem ( const unsigned int  nl_sys_num)

Definition at line 9608 of file FEProblemBase.C.

Referenced by computeJacobian(), EigenProblem::computeJacobianAB(), EigenProblem::computeJacobianBlocks(), computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), EigenProblem::computeJacobianTag(), EigenProblem::computeMatricesTags(), EigenProblem::computeResidualTag(), NonlinearSystemBase::computeResidualTags(), FEProblem::FEProblem(), EigenProblem::solve(), and solve().

9609 {
9610  mooseAssert(nl_sys_num < _nl.size(),
9611  "System number greater than the number of nonlinear systems");
9612  _current_nl_sys = _nl[nl_sys_num].get();
9614 }
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)
inline

Set the current residual vector tag data structure based on the passed in tag IDs.

Definition at line 3589 of file FEProblemBase.h.

Referenced by computeResidualAndJacobian(), computeResidualTags(), and CrankNicolson::init().

3590 {
3592 }
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:173

◆ setCurrentSubdomainID()

void FEProblemBase::setCurrentSubdomainID ( const Elem elem,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1833 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), ElementalVariableValue::execute(), and ComputeInitialConditionThread::operator()().

1834 {
1835  SubdomainID did = elem->subdomain_id();
1836  for (const auto i : index_range(_solver_systems))
1837  {
1838  _assembly[tid][i]->setCurrentSubdomainID(did);
1839  if (_displaced_problem &&
1841  _displaced_problem->assembly(tid, i).setCurrentSubdomainID(did);
1842  }
1843 }
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)
inline

Definition at line 2194 of file FEProblemBase.h.

2195  {
2197  }
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)
virtual

Set an exception, which is stored at this point by toggling a member variable in this class, and which must be followed up with by a call to checkExceptionAndStopSolve().

Parameters
messageThe error message describing the exception, which will get printed when checkExceptionAndStopSolve() is called

Definition at line 6674 of file FEProblemBase.C.

Referenced by ComputeThreadedGeneralUserObjectsThread::caughtMooseException(), ThreadedNodeLoop< ConstBndNodeRange, ConstBndNodeRange::const_iterator >::caughtMooseException(), ThreadedFaceLoop< RangeType >::caughtMooseException(), NonlinearSystemBase::computeDamping(), AuxiliarySystem::computeElementalVarsHelper(), AuxiliarySystem::computeMortarNodalVars(), handleException(), ComputeMortarFunctor::operator()(), and DisplacedProblem::updateMesh().

6675 {
6676  _has_exception = true;
6677  _exception_message = message;
6678 }
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)
inline

Definition at line 2667 of file FEProblemBase.h.

2667 { _print_execution_on = print_exec; }
ExecFlagEnum _print_execution_on
When to print the execution of loops.

◆ setFailNextNonlinearConvergenceCheck()

void FEProblemBase::setFailNextNonlinearConvergenceCheck ( )
inline

Skip further residual evaluations and fail the next nonlinear convergence check(s)

Definition at line 2654 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 ( )
inline

Tell the problem that the system(s) cannot be considered converged next time convergence is checked.

Definition at line 2656 of file FEProblemBase.h.

Referenced by 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 { _show_functors = set_output; }
bool _show_functors
Whether to output a list of the functors used and requested (currently only at initialSetup) ...
Definition: SubProblem.h:1166

◆ setIgnoreZerosInJacobian()

void FEProblemBase::setIgnoreZerosInJacobian ( bool  state)
inline

Set whether the zeros in the Jacobian should be dropped from the sparsity pattern.

Definition at line 2217 of file FEProblemBase.h.

2217 { _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()

virtual void FEProblemBase::setInputParametersFEProblem ( InputParameters parameters)
inlinevirtual

Reimplemented in FEProblem.

Definition at line 953 of file FEProblemBase.h.

Referenced by FEProblem::setInputParametersFEProblem().

954  {
955  parameters.set<FEProblemBase *>("_fe_problem_base") = this;
956  }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.

◆ setKernelCoverageCheck() [1/2]

void FEProblemBase::setKernelCoverageCheck ( CoverageCheckMode  mode)
inline

Set flag to indicate whether kernel coverage checks should be performed.

This check makes sure that at least one kernel is active on all subdomains in the domain (default: true).

Definition at line 2037 of file FEProblemBase.h.

2037 { _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)
inline

Set flag to indicate whether kernel coverage checks should be performed.

This check makes sure that at least one kernel is active on all subdomains in the domain (default: true).

Definition at line 2043 of file FEProblemBase.h.

2044  {
2046  }
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)

Sets the linear convergence object name(s) if there is one.

Definition at line 9435 of file FEProblemBase.C.

Referenced by FEProblemSolve::FEProblemSolve().

9436 {
9437  if (convergence_names.size() != numLinearSystems())
9438  paramError("linear_convergence", "There must be one convergence object per linear system");
9439  _linear_convergence_names = convergence_names;
9440 }
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseBase.h:439
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)
inline

Set flag to indicate whether material coverage checks should be performed.

This check makes sure that at least one material is active on all subdomains in the domain if any material is supplied. If no materials are supplied anywhere, a simulation is still considered OK as long as no properties are being requested anywhere.

Definition at line 2054 of file FEProblemBase.h.

2054 { _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)
inline

Set flag to indicate whether material coverage checks should be performed.

This check makes sure that at least one material is active on all subdomains in the domain if any material is supplied. If no materials are supplied anywhere, a simulation is still considered OK as long as no properties are being requested anywhere.

Definition at line 2062 of file FEProblemBase.h.

2063  {
2065  }
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)

Sets the MultiApp fixed point convergence object name if there is one.

Definition at line 9407 of file FEProblemBase.C.

Referenced by FixedPointSolve::FixedPointSolve().

9408 {
9409  _multiapp_fixed_point_convergence_name = convergence_name;
9410 }
std::optional< ConvergenceName > _multiapp_fixed_point_convergence_name
MultiApp fixed point convergence name.

◆ setNeedToAddDefaultMultiAppFixedPointConvergence()

void FEProblemBase::setNeedToAddDefaultMultiAppFixedPointConvergence ( )
inline

Sets _need_to_add_default_multiapp_fixed_point_convergence to true.

Definition at line 722 of file FEProblemBase.h.

Referenced by FixedPointSolve::FixedPointSolve().

723  {
725  }
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 ( )
inline

Sets _need_to_add_default_nonlinear_convergence to true.

Definition at line 717 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

718  {
720  }
bool _need_to_add_default_nonlinear_convergence
Flag that the problem needs to add the default nonlinear convergence.

◆ setNeedToAddDefaultSteadyStateConvergence()

void FEProblemBase::setNeedToAddDefaultSteadyStateConvergence ( )
inline

Sets _need_to_add_default_steady_state_convergence to true.

Definition at line 727 of file FEProblemBase.h.

Referenced by TransientBase::TransientBase().

728  {
730  }
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 
)
overridevirtual

◆ setNeighborSubdomainID() [2/2]

virtual void FEProblemBase::setNeighborSubdomainID ( const Elem *  elem,
const THREAD_ID  tid 
)
virtual

◆ setNonlinearConvergenceNames()

void FEProblemBase::setNonlinearConvergenceNames ( const std::vector< ConvergenceName > &  convergence_names)

Sets the nonlinear convergence object name(s) if there is one.

Definition at line 9398 of file FEProblemBase.C.

Referenced by FEProblemSolve::FEProblemSolve().

9399 {
9400  if (convergence_names.size() != numNonlinearSystems())
9401  paramError("nonlinear_convergence",
9402  "There must be one convergence object per nonlinear system");
9403  _nonlinear_convergence_names = convergence_names;
9404 }
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseBase.h:439
virtual std::size_t numNonlinearSystems() const override
std::optional< std::vector< ConvergenceName > > _nonlinear_convergence_names
Nonlinear system(s) convergence name(s)

◆ setNonlocalCouplingMatrix()

void FEProblemBase::setNonlocalCouplingMatrix ( )

Set custom coupling matrix for variables requiring nonlocal contribution.

Definition at line 6341 of file FEProblemBase.C.

Referenced by initialSetup().

6342 {
6343  TIME_SECTION("setNonlocalCouplingMatrix", 5, "Setting Nonlocal Coupling Matrix");
6344 
6345  if (_nl.size() > 1)
6346  mooseError("Nonlocal kernels are weirdly stored on the FEProblem so we don't currently support "
6347  "multiple nonlinear systems with nonlocal kernels.");
6348 
6349  for (const auto nl_sys_num : index_range(_nl))
6350  {
6351  auto & nl = _nl[nl_sys_num];
6352  auto & nonlocal_cm = _nonlocal_cm[nl_sys_num];
6353  unsigned int n_vars = nl->nVariables();
6354  nonlocal_cm.resize(n_vars);
6355  const auto & vars = nl->getVariables(0);
6356  const auto & nonlocal_kernel = _nonlocal_kernels.getObjects();
6357  const auto & nonlocal_integrated_bc = _nonlocal_integrated_bcs.getObjects();
6358  for (const auto & ivar : vars)
6359  {
6360  for (const auto & kernel : nonlocal_kernel)
6361  {
6362  for (unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
6363  if (i == kernel->variable().number())
6364  for (const auto & jvar : vars)
6365  {
6366  const auto it = _var_dof_map.find(jvar->name());
6367  if (it != _var_dof_map.end())
6368  {
6369  unsigned int j = jvar->number();
6370  nonlocal_cm(i, j) = 1;
6371  }
6372  }
6373  }
6374  for (const auto & integrated_bc : nonlocal_integrated_bc)
6375  {
6376  for (unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
6377  if (i == integrated_bc->variable().number())
6378  for (const auto & jvar : vars)
6379  {
6380  const auto it = _var_dof_map.find(jvar->name());
6381  if (it != _var_dof_map.end())
6382  {
6383  unsigned int j = jvar->number();
6384  nonlocal_cm(i, j) = 1;
6385  }
6386  }
6387  }
6388  }
6389  }
6390 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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)
inline

Toggle parallel barrier messaging (defaults to on).

Definition at line 2070 of file FEProblemBase.h.

2070 { _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 
)

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

Referenced by MultiAppPostprocessorTransfer::execute(), PIDTransientControl::execute(), joinAndFinalize(), SecantSolve::transformPostprocessors(), SteffensenSolve::transformPostprocessors(), and PicardSolve::transformPostprocessors().

4656 {
4658  PostprocessorReporterName(name), value, t_index);
4659 }
ReporterData _reporter_data
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:230
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:143

◆ setPreserveMatrixSparsityPattern()

void FEProblemBase::setPreserveMatrixSparsityPattern ( bool  preserve)

Set whether the sparsity pattern of the matrices being formed during the solve (usually the Jacobian) should be preserved.

This global setting can be retrieved by kernels, notably those using AD, to decide whether to take additional care to preserve the sparsity pattern

Definition at line 3963 of file FEProblemBase.C.

3964 {
3965  if (_ignore_zeros_in_jacobian && preserve)
3966  paramWarning(
3967  "ignore_zeros_in_jacobian",
3968  "We likely cannot preserve the sparsity pattern if ignoring zeros in the Jacobian, which "
3969  "leads to removing those entries from the Jacobian sparsity pattern");
3971 }
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

◆ setResidual() [1/2]

virtual void SubProblem::setResidual ( libMesh::NumericVector< libMesh::Number > &  residual,
const THREAD_ID  tid 
)
pure virtualinherited

◆ setResidual() [2/2]

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

Definition at line 1967 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals().

1968 {
1969  _assembly[tid][_current_nl_sys->number()]->setResidual(
1970  residual,
1972  getVectorTag(_nl[_current_nl_sys->number()]->residualVectorTag()));
1973  if (_displaced_problem)
1974  _displaced_problem->setResidual(residual, tid);
1975 }
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:1157
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:162
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:844

◆ setResidualNeighbor() [1/2]

virtual void SubProblem::setResidualNeighbor ( libMesh::NumericVector< libMesh::Number > &  residual,
const THREAD_ID  tid 
)
pure virtualinherited

◆ setResidualNeighbor() [2/2]

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

Definition at line 1978 of file FEProblemBase.C.

1979 {
1980  _assembly[tid][_current_nl_sys->number()]->setResidualNeighbor(
1982  if (_displaced_problem)
1983  _displaced_problem->setResidualNeighbor(residual, tid);
1984 }
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:1157
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:162
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:844

◆ setResidualObjectParamsAndLog()

void FEProblemBase::setResidualObjectParamsAndLog ( const std::string &  ro_name,
const std::string &  name,
InputParameters parameters,
const unsigned int  nl_sys_num,
const std::string &  base_name,
bool &  reinit_displaced 
)
private

Set the subproblem and system parameters for residual objects and log their addition.

Parameters
ro_nameThe type of the residual object
nameThe name of the residual object
parametersThe residual object parameters
nl_sys_numThe nonlinear system that the residual object belongs to
base_nameThe base type of the residual object, e.g. Kernel, BoundaryCondition, etc.
reinit_displacedA data member indicating whether a geometric concept should be reinit'd for the displaced problem. Examples of valid data members to pass in are _reinit_displaced_elem and _reinit_displaced_face

Definition at line 2969 of file FEProblemBase.C.

Referenced by addBoundaryCondition(), addHDGKernel(), and addKernel().

2975 {
2976  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2977  {
2978  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2979  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
2980  reinit_displaced = true;
2981  }
2982  else
2983  {
2984  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2985  {
2986  // We allow Kernels to request that they use_displaced_mesh,
2987  // but then be overridden when no displacements variables are
2988  // provided in the Mesh block. If that happened, update the value
2989  // of use_displaced_mesh appropriately for this Kernel.
2990  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2991  parameters.set<bool>("use_displaced_mesh") = false;
2992  }
2993 
2994  parameters.set<SubProblem *>("_subproblem") = this;
2995  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2996  }
2997 
2998  logAdd(base_name, name, ro_name, parameters);
2999 }
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.
Definition: MooseBase.h:131
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
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
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

◆ setRestartFile()

void FEProblemBase::setRestartFile ( const std::string &  file_name)

Communicate to the Resurector the name of the restart filer.

Parameters
file_nameThe file name for restarting from

Definition at line 8910 of file FEProblemBase.C.

Referenced by Executioner::Executioner(), and FEProblemBase().

8911 {
8912  if (_app.isRecovering())
8913  {
8914  mooseInfo("Restart file ", file_name, " is NOT being used since we are performing recovery.");
8915  }
8916  else
8917  {
8918  _app.setRestart(true);
8919  _app.setRestartRecoverFileBase(file_name);
8920  mooseInfo("Using ", file_name, " for restart.");
8921  }
8922 }
void mooseInfo(Args &&... args) const
Definition: MooseBase.h:321
void setRestartRecoverFileBase(const std::string &file_base)
mutator for recover_base (set by RecoverBaseAction)
Definition: MooseApp.h:506
void setRestart(bool value)
Sets the restart/recover flags.
Definition: MooseApp.C:2995
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:1884

◆ setSNESMFReuseBase()

void FEProblemBase::setSNESMFReuseBase ( bool  reuse,
bool  set_by_user 
)
inline

If or not to reuse the base vector for matrix-free calculation.

Definition at line 2356 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2357  {
2358  _snesmf_reuse_base = reuse, _snesmf_reuse_base_set_by_user = set_by_user;
2359  }
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)

Sets the steady-state detection convergence object name if there is one.

Definition at line 9413 of file FEProblemBase.C.

Referenced by TransientBase::TransientBase().

9414 {
9415  _steady_state_convergence_name = convergence_name;
9416 }
std::optional< ConvergenceName > _steady_state_convergence_name
Steady-state detection convergence name.

◆ setUDotDotOldRequested()

virtual void FEProblemBase::setUDotDotOldRequested ( const bool  u_dotdot_old_requested)
inlinevirtual

Set boolean flag to true to store old solution second time derivative.

Definition at line 2404 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

2405  {
2406  _u_dotdot_old_requested = u_dotdot_old_requested;
2407  }
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)
inlinevirtual

Set boolean flag to true to store solution second time derivative.

Definition at line 2392 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

2393  {
2394  _u_dotdot_requested = u_dotdot_requested;
2395  }
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.

◆ setUDotOldRequested()

virtual void FEProblemBase::setUDotOldRequested ( const bool  u_dot_old_requested)
inlinevirtual

Set boolean flag to true to store old solution time derivative.

Definition at line 2398 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

2399  {
2400  _u_dot_old_requested = u_dot_old_requested;
2401  }
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.

◆ setUDotRequested()

virtual void FEProblemBase::setUDotRequested ( const bool  u_dot_requested)
inlinevirtual

Set boolean flag to true to store solution time derivative.

Definition at line 2389 of file FEProblemBase.h.

Referenced by TimeIntegrator::TimeIntegrator().

2389 { _u_dot_requested = u_dot_requested; }
bool _u_dot_requested
Whether solution time derivative needs to be stored.

◆ setupDampers()

void FEProblemBase::setupDampers ( )

Definition at line 5404 of file FEProblemBase.C.

5405 {
5406  for (auto & nl : _nl)
5407  nl->setupDampers();
5408 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ setVariableAllDoFMap()

void FEProblemBase::setVariableAllDoFMap ( const std::vector< const MooseVariableFEBase *> &  moose_vars)

Definition at line 1741 of file FEProblemBase.C.

Referenced by initialSetup(), and meshChanged().

1742 {
1743  for (unsigned int i = 0; i < moose_vars.size(); ++i)
1744  {
1745  VariableName var_name = moose_vars[i]->name();
1746  auto & sys = _solver_systems[moose_vars[i]->sys().number()];
1747  sys->setVariableGlobalDoFs(var_name);
1748  _var_dof_map[var_name] = sys->getVariableGlobalDoFs();
1749  }
1750 }
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 
)

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

4683 {
4685  VectorPostprocessorReporterName(object_name, vector_name), value, t_index);
4686 }
A ReporterName that represents a VectorPostprocessor.
Definition: ReporterName.h:152
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:231

◆ setVerboseProblem()

void FEProblemBase::setVerboseProblem ( bool  verbose)

Make the problem be verbose.

Definition at line 9583 of file FEProblemBase.C.

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

9584 {
9585  _verbose_setup = verbose ? "true" : "false";
9586  _verbose_multiapps = verbose;
9587  _verbose_restore = verbose;
9588 }
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

Check whether the problem should output execution orders at this time.

Definition at line 9525 of file FEProblemBase.C.

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

9526 {
9527  // For now, only support printing from thread 0
9528  if (tid != 0)
9529  return false;
9530 
9533  return true;
9534  else
9535  return false;
9536 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.
const ExecFlagType EXEC_ALWAYS
Definition: Moose.C:51
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
inline

Definition at line 2440 of file FEProblemBase.h.

Referenced by ExternalProblem::solve(), FEProblemSolve::solve(), MFEMProblemSolve::solve(), and TransientBase::TransientBase().

2440 { return _solve; }
const bool & _solve
Whether or not to actually solve the nonlinear system.

◆ shouldUpdateSolution()

bool FEProblemBase::shouldUpdateSolution ( )
virtual

Check to see whether the problem should update the solution.

Returns
true if the problem should update the solution, false otherwise

Definition at line 8027 of file FEProblemBase.C.

Referenced by computePostCheck(), and NonlinearSystem::solve().

8028 {
8029  return false;
8030 }

◆ showInvalidSolutionConsole()

bool FEProblemBase::showInvalidSolutionConsole ( ) const
inline

Whether or not to print out the invalid solutions summary table in console.

Definition at line 2234 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 
)
virtual

Definition at line 2169 of file FEProblemBase.C.

2170 {
2171  mooseDoOnce(mooseWarning(
2172  "This function is deprecated and no longer performs any function. Please do not call it."));
2173 }
void mooseWarning(Args &&... args) const

◆ skipExceptionCheck()

void FEProblemBase::skipExceptionCheck ( bool  skip_exception_check)
inline

Set a flag that indicates if we want to skip exception and stop solve.

Definition at line 2369 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2370  {
2371  _skip_exception_check = skip_exception_check;
2372  }
bool _skip_exception_check
If or not skip &#39;exception and stop solve&#39;.

◆ solve()

void FEProblemBase::solve ( const unsigned int  nl_sys_num)
virtual

Reimplemented in DumpObjectsProblem, EigenProblem, and ExternalProblem.

Definition at line 6612 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration(), EigenExecutionerBase::nonlinearSolve(), FEProblemSolve::solve(), and AB2PredictorCorrector::step().

6613 {
6614  TIME_SECTION("solve", 1, "Solving", false);
6615 
6616  setCurrentNonlinearSystem(nl_sys_num);
6617 
6618  // This prevents stale dof indices from lingering around and possibly leading to invalid reads
6619  // and writes. Dof indices may be made stale through operations like mesh adaptivity
6621  if (_displaced_problem)
6622  _displaced_problem->clearAllDofIndices();
6623 
6624  // Setup the output system for printing linear/nonlinear iteration information and some solver
6625  // settings, including setting matrix prefixes. This must occur before petscSetOptions
6627 
6628 #if PETSC_RELEASE_LESS_THAN(3, 12, 0)
6630  _petsc_options, _solver_params); // Make sure the PETSc options are setup for this app
6631 #else
6632  // Now this database will be the default
6633  // Each app should have only one database
6634  if (!_app.isUltimateMaster())
6635  LibmeshPetscCall(PetscOptionsPush(_petsc_option_data_base));
6636  // We did not add PETSc options to database yet
6638  {
6639  // Insert options for all systems all at once
6642  }
6643 #endif
6644 
6645  // set up DM which is required if use a field split preconditioner
6646  // We need to setup DM every "solve()" because libMesh destroy SNES after solve()
6647  // Do not worry, DM setup is very cheap
6649 
6651 
6652  // reset flag so that residual evaluation does not get skipped
6653  // and the next non-linear iteration does not automatically fail with
6654  // "DIVERGED_NANORINF", when we throw an exception and stop solve
6656 
6657  if (_solve)
6658  {
6661  }
6662 
6663  // sync solutions in displaced problem
6664  if (_displaced_problem)
6665  _displaced_problem->syncSolutions();
6666 
6667 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
6668  if (!_app.isUltimateMaster())
6669  LibmeshPetscCall(PetscOptionsPop());
6670 #endif
6671 }
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:820
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:1178
void update()
Update the system (doing libMesh magic)
Definition: SystemBase.C:1243
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:357
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:230
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 
)
virtual

Build and solve a linear system.

Parameters
linear_sys_numThe number of the linear system (1,..,num. of lin. systems)
poThe petsc options for the solve, if not supplied, the defaults are used

Reimplemented in DumpObjectsProblem.

Definition at line 6770 of file FEProblemBase.C.

Referenced by FEProblemSolve::solve().

6772 {
6773  TIME_SECTION("solve", 1, "Solving", false);
6774 
6775  setCurrentLinearSystem(linear_sys_num);
6776 
6777  const Moose::PetscSupport::PetscOptions & options = po ? *po : _petsc_options;
6778  auto & solver_params = _solver_params[numNonlinearSystems() + linear_sys_num];
6779 
6780  // Set custom convergence criteria
6782 
6783 #if PETSC_RELEASE_LESS_THAN(3, 12, 0)
6784  LibmeshPetscCall(Moose::PetscSupport::petscSetOptions(
6785  options, solver_params)); // Make sure the PETSc options are setup for this app
6786 #else
6787  // Now this database will be the default
6788  // Each app should have only one database
6789  if (!_app.isUltimateMaster())
6790  LibmeshPetscCall(PetscOptionsPush(_petsc_option_data_base));
6791 
6792  // We did not add PETSc options to database yet
6794  {
6795  Moose::PetscSupport::petscSetOptions(options, solver_params, this);
6797  }
6798 #endif
6799 
6800  if (_solve)
6802 
6803 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
6804  if (!_app.isUltimateMaster())
6805  LibmeshPetscCall(PetscOptionsPop());
6806 #endif
6807 }
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:820
virtual std::size_t numNonlinearSystems() const override
void petscSetDefaults(FEProblemBase &problem)
Sets the default options for PETSc.
Definition: PetscSupport.C:450
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:44
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:357
virtual void solve() override
Solve the system (using libMesh magic)
Definition: LinearSystem.C:312
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:230
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)

Get the solver parameters.

Definition at line 8942 of file FEProblemBase.C.

Referenced by NonlinearEigenSystem::attachPreconditioner(), SolverSystem::compute(), SlepcEigenSolverConfiguration::configure_solver(), Eigenvalue::Eigenvalue(), ExplicitTimeIntegrator::ExplicitTimeIntegrator(), FEProblemSolve::FEProblemSolve(), EigenProblem::init(), ExplicitTimeIntegrator::init(), 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(), solverParams(), EigenProblem::solverTypeString(), solverTypeString(), and Moose::SlepcSupport::storeSolveType().

8943 {
8944  mooseAssert(solver_sys_num < numSolverSystems(),
8945  "Solver system number '" << solver_sys_num << "' is out of bounds. We have '"
8946  << numSolverSystems() << "' solver systems");
8947  return _solver_params[solver_sys_num];
8948 }
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

const version

Definition at line 8951 of file FEProblemBase.C.

8952 {
8953  return const_cast<FEProblemBase *>(this)->solverParams(solver_sys_num);
8954 }
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
overridevirtual
Returns
the solver system number corresponding to the provided solver_sys_name

Implements SubProblem.

Definition at line 6577 of file FEProblemBase.C.

Referenced by addVariable(), getSystemBase(), MultiSystemSolveObject::MultiSystemSolveObject(), and DisplacedProblem::solverSysNum().

6578 {
6579  std::istringstream ss(solver_sys_name);
6580  unsigned int solver_sys_num;
6581  if (!(ss >> solver_sys_num) || !ss.eof())
6582  {
6583  const auto & search = _solver_sys_name_to_num.find(solver_sys_name);
6584  if (search == _solver_sys_name_to_num.end())
6585  mooseError("The solver system number was requested for system '" + solver_sys_name,
6586  "' but this system does not exist in the Problem. Systems can be added to the "
6587  "problem using the 'nl_sys_names'/'linear_sys_names' parameter.\nSystems in the "
6588  "Problem: " +
6590  solver_sys_num = search->second;
6591  }
6592 
6593  return solver_sys_num;
6594 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ solverSystemConverged()

bool FEProblemBase::solverSystemConverged ( const unsigned int  sys_num)
overridevirtual
Returns
whether the given solver system sys_num is converged

Reimplemented from SubProblem.

Reimplemented in EigenProblem.

Definition at line 6810 of file FEProblemBase.C.

6811 {
6812  if (_solve)
6813  return _solver_systems[sys_num]->converged();
6814  else
6815  return true;
6816 }
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)
virtual

Return solver type as a human readable string.

Reimplemented in MFEMProblem, and EigenProblem.

Definition at line 9704 of file FEProblemBase.C.

Referenced by ConsoleUtils::outputExecutionInformation().

9705 {
9706  return Moose::stringify(solverParams(solver_sys_num)._type);
9707 }
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.
const std::string & _type
The type of this class.
Definition: MooseBase.h:360

◆ startedInitialSetup()

virtual bool FEProblemBase::startedInitialSetup ( )
inlinevirtual

Returns true if we are in or beyond the initialSetup stage.

Definition at line 542 of file FEProblemBase.h.

Referenced by NEML2ModelExecutor::checkExecutionStage(), MaterialBase::checkExecutionStage(), and MaterialPropertyInterface::checkExecutionStage().

542 { 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 616 of file SubProblem.C.

Referenced by MaterialPropertyInterface::checkMaterialProperty().

619 {
620  _map_boundary_material_props_check[boundary_id].insert(std::make_pair(requestor, name));
621 }
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
Definition: SubProblem.h:1073
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103

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

Referenced by MaterialBase::registerPropName().

591 {
592  _map_boundary_material_props[boundary_id].insert(name);
593 }
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1057
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103

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

Referenced by MaterialBase::storeBoundaryZeroMatProp().

603 {
604  _zero_boundary_material_props[boundary_id].insert(name);
605 }
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:1061
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103

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

Referenced by MaterialPropertyInterface::checkMaterialProperty().

611 {
612  _map_block_material_props_check[block_id].insert(std::make_pair(requestor, name));
613 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
Definition: SubProblem.h:1072

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

Referenced by MaterialBase::registerPropName().

585 {
586  _map_block_material_props[block_id].insert(name);
587 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1054

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

Referenced by MaterialBase::storeSubdomainZeroMatProp().

597 {
598  _zero_block_material_props[block_id].insert(name);
599 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:1060

◆ subdomainSetup()

void FEProblemBase::subdomainSetup ( SubdomainID  subdomain,
const THREAD_ID  tid 
)
virtual

Definition at line 2532 of file FEProblemBase.C.

Referenced by ComputeMarkerThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeDiracThread::subdomainChanged(), NonlinearThread::subdomainChanged(), ComputeUserObjectsThread::subdomainChanged(), and ThreadedFaceLoop< RangeType >::subdomainChanged().

2533 {
2534  _all_materials.subdomainSetup(subdomain, tid);
2535  // Call the subdomain methods of the output system, these are not threaded so only call it once
2536  if (tid == 0)
2538 
2539  for (auto & nl : _nl)
2540  nl->subdomainSetup(subdomain, tid);
2541 
2542  // FIXME: call displaced_problem->subdomainSetup() ?
2543  // When adding possibility with materials being evaluated on displaced mesh
2544 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
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:2525

◆ subspaceDim()

unsigned int FEProblemBase::subspaceDim ( const std::string &  prefix) const
inline

Dimension of the subspace spanned by vectors with a given prefix.

Parameters
prefixPrefix of the vectors spanning the subspace.

Definition at line 2112 of file FEProblemBase.h.

Referenced by computeNearNullSpace(), computeNullSpace(), and computeTransposeNullSpace().

2113  {
2114  if (_subspace_dim.count(prefix))
2115  return _subspace_dim.find(prefix)->second;
2116  else
2117  return 0;
2118  }
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)
virtual

Definition at line 4365 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), LineMaterialSamplerBase< Real >::execute(), ComputeMarkerThread::onElement(), ComputeElemAuxVarsThread< AuxKernelType >::onElement(), ComputeIndicatorThread::onElement(), NonlinearThread::onElement(), and ComputeUserObjectsThread::onElement().

4366 {
4367  auto && elem = _assembly[tid][0]->elem();
4369 }
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)
virtual

Definition at line 4372 of file FEProblemBase.C.

Referenced by NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and ComputeElemAuxBcsThread< AuxKernelType >::operator()().

4373 {
4374  auto && elem = _assembly[tid][0]->elem();
4375  unsigned int side = _assembly[tid][0]->side();
4376  _bnd_material_props.getMaterialData(tid).swapBack(*elem, side);
4377 }
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)
virtual

Definition at line 4380 of file FEProblemBase.C.

Referenced by NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and ComputeElemAuxBcsThread< AuxKernelType >::operator()().

4381 {
4382  // NOTE: this will not work with h-adaptivity
4383  const Elem * neighbor = _assembly[tid][0]->neighbor();
4384  unsigned int neighbor_side =
4385  neighbor ? neighbor->which_neighbor_am_i(_assembly[tid][0]->elem()) : libMesh::invalid_uint;
4386 
4387  if (!neighbor)
4388  {
4389  if (haveFV())
4390  {
4391  // If neighbor is null, then we're on the neighbor side of a mesh boundary, e.g. we're off
4392  // the mesh in ghost-land. If we're using the finite volume method, then variable values and
4393  // consequently material properties have well-defined values in this ghost region outside of
4394  // the mesh and we really do want to reinit our neighbor materials in this case. Since we're
4395  // off in ghost land it's safe to do swaps with `MaterialPropertyStorage` using the elem and
4396  // elem_side keys
4397  neighbor = _assembly[tid][0]->elem();
4398  neighbor_side = _assembly[tid][0]->side();
4399  mooseAssert(neighbor, "We should have an appropriate value for elem coming from Assembly");
4400  }
4401  else
4402  mooseError("neighbor is null in Assembly!");
4403  }
4404 
4405  _neighbor_material_props.getMaterialData(tid).swapBack(*neighbor, neighbor_side);
4406 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
MaterialPropertyStorage & _neighbor_material_props
const MaterialData & getMaterialData(const THREAD_ID tid) const

◆ systemBaseAuxiliary() [1/2]

const SystemBase & FEProblemBase::systemBaseAuxiliary ( ) const
overridevirtual

Return the auxiliary system object as a base class reference.

Implements SubProblem.

Definition at line 9249 of file FEProblemBase.C.

Referenced by PhysicsBase::copyVariablesFromMesh(), and MFEMProblem::getAuxVariableNames().

9250 {
9251  return *_aux;
9252 }
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ systemBaseAuxiliary() [2/2]

SystemBase & FEProblemBase::systemBaseAuxiliary ( )
overridevirtual

Implements SubProblem.

Definition at line 9255 of file FEProblemBase.C.

9256 {
9257  return *_aux;
9258 }
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ systemBaseLinear() [1/2]

const SystemBase & FEProblemBase::systemBaseLinear ( unsigned int  sys_num) const
overridevirtual

Get a constant base class reference to a linear system.

Parameters
sys_numThe number of the linear system

Implements SubProblem.

Definition at line 9217 of file FEProblemBase.C.

9218 {
9219  mooseAssert(sys_num < _linear_systems.size(),
9220  "System number greater than the number of linear systems");
9221  return *_linear_systems[sys_num];
9222 }
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ systemBaseLinear() [2/2]

SystemBase & FEProblemBase::systemBaseLinear ( unsigned int  sys_num)
overridevirtual

Get a non-constant base class reference to a linear system.

Parameters
sys_numThe number of the linear system

Implements SubProblem.

Definition at line 9225 of file FEProblemBase.C.

9226 {
9227  mooseAssert(sys_num < _linear_systems.size(),
9228  "System number greater than the number of linear systems");
9229  return *_linear_systems[sys_num];
9230 }
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
overridevirtual

Return the nonlinear system object as a base class reference given the system number.

Implements SubProblem.

Definition at line 9203 of file FEProblemBase.C.

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

◆ systemBaseNonlinear() [2/2]

SystemBase & FEProblemBase::systemBaseNonlinear ( const unsigned int  sys_num)
overridevirtual

Implements SubProblem.

Definition at line 9210 of file FEProblemBase.C.

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

◆ systemBaseSolver() [1/2]

const SystemBase & FEProblemBase::systemBaseSolver ( const unsigned int  sys_num) const
overridevirtual

Return the solver system object as a base class reference given the system number.

Implements SubProblem.

Definition at line 9233 of file FEProblemBase.C.

9234 {
9235  mooseAssert(sys_num < _solver_systems.size(),
9236  "System number greater than the number of solver systems");
9237  return *_solver_systems[sys_num];
9238 }
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)
overridevirtual

Implements SubProblem.

Definition at line 9241 of file FEProblemBase.C.

9242 {
9243  mooseAssert(sys_num < _solver_systems.size(),
9244  "System number greater than the number of solver systems");
9245  return *_solver_systems[sys_num];
9246 }
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
Returns
the system number for the provided variable_name Can be nonlinear or auxiliary

Definition at line 6597 of file FEProblemBase.C.

Referenced by projectFunctionOnCustomRange(), and ElementSubdomainModifierBase::restoreOverriddenDofValues().

6598 {
6599  for (const auto & solver_sys : _solver_systems)
6600  if (solver_sys->hasVariable(variable_name))
6601  return solver_sys->number();
6602  mooseAssert(_aux, "Should have an auxiliary system");
6603  if (_aux->hasVariable(variable_name))
6604  return _aux->number();
6605 
6606  mooseError("Variable '",
6607  variable_name,
6608  "' was not found in any solver (nonlinear/linear) or auxiliary system");
6609 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ 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 WebServerControl::execute(), 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
inline

Definition at line 2351 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addDGKernel(), NonlinearSystemBase::addDiracKernel(), NonlinearSystemBase::addHDGKernel(), NonlinearSystemBase::addInterfaceKernel(), NonlinearSystemBase::addKernel(), NonlinearSystemBase::addNodalKernel(), addObject(), NonlinearSystemBase::addScalarKernel(), NonlinearSystemBase::addSplit(), addUserObject(), NonlinearSystemBase::checkKernelCoverage(), checkUserObjectJacobianRequirement(), checkUserObjects(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), computeUserObjectByName(), computeUserObjects(), LinearSystem::containsTimeKernel(), NonlinearSystemBase::customSetup(), customSetup(), ComputeResidualThread::determineObjectWarehouses(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), executeSamplers(), ComputeLinearFVElementalThread::fetchBlockSystemContributionObjects(), ComputeLinearFVFaceThread::fetchBlockSystemContributionObjects(), getDistribution(), getMortarUserObjects(), getPositionsObject(), getSampler(), CompositionDT::getTimeSteppers(), getUserObject(), getUserObjectBase(), hasUserObject(), SideFVFluxBCIntegral::initialSetup(), ExplicitTimeIntegrator::initialSetup(), LinearSystem::initialSetup(), NonlinearSystemBase::initialSetup(), initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), needBoundaryMaterialOnSide(), needInterfaceMaterialOnSide(), needInternalNeighborSideMaterial(), JSONOutput::outputReporters(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), ComputeLinearFVElementalThread::setupSystemContributionObjects(), ComputeLinearFVFaceThread::setupSystemContributionObjects(), NonlinearThread::subdomainChanged(), NonlinearSystemBase::timestepSetup(), and timestepSetup().

2351 { return _app.theWarehouse(); }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
TheWarehouse & theWarehouse()
Definition: MooseApp.h:137

◆ time()

virtual Real& FEProblemBase::time ( ) const
inlinevirtual

◆ timedSectionName()

std::string PerfGraphInterface::timedSectionName ( const std::string &  section_name) const
protectedinherited
Returns
The name of the timed section with the name section_name.

Optionally adds a prefix if one is defined.

Definition at line 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
inlinevirtual

◆ timeStep()

virtual int& FEProblemBase::timeStep ( ) const
inlinevirtual

◆ timestepSetup()

void FEProblemBase::timestepSetup ( )
overridevirtual

Reimplemented from SubProblem.

Definition at line 1544 of file FEProblemBase.C.

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

1545 {
1547 
1548  if (_t_step > 1 && _num_grid_steps)
1549  {
1550  libMesh::MeshRefinement mesh_refinement(_mesh);
1551  std::unique_ptr<libMesh::MeshRefinement> displaced_mesh_refinement(nullptr);
1552  if (_displaced_mesh)
1553  displaced_mesh_refinement = std::make_unique<libMesh::MeshRefinement>(*_displaced_mesh);
1554 
1555  for (MooseIndex(_num_grid_steps) i = 0; i < _num_grid_steps; ++i)
1556  {
1557  if (_displaced_problem)
1558  // If the DisplacedProblem is active, undisplace the DisplacedMesh in preparation for
1559  // refinement. We can't safely refine the DisplacedMesh directly, since the Hilbert keys
1560  // computed on the inconsistenly-displaced Mesh are different on different processors,
1561  // leading to inconsistent Hilbert keys. We must do this before the undisplaced Mesh is
1562  // coarsensed, so that the element and node numbering is still consistent. We also have to
1563  // make sure this is done during every step of coarsening otherwise different partitions
1564  // will be generated for the reference and displaced meshes (even for replicated)
1565  _displaced_problem->undisplaceMesh();
1566 
1567  mesh_refinement.uniformly_coarsen();
1568  if (_displaced_mesh)
1569  displaced_mesh_refinement->uniformly_coarsen();
1570 
1571  // Mark this as an intermediate change because we do not yet want to reinit_systems. E.g. we
1572  // need things to happen in the following order for the undisplaced problem:
1573  // u1) EquationSystems::reinit_solutions. This will restrict the solution vectors and then
1574  // contract the mesh
1575  // u2) MooseMesh::meshChanged. This will update the node/side lists and other
1576  // things which needs to happen after the contraction
1577  // u3) GeometricSearchData::reinit. Once the node/side lists are updated we can perform our
1578  // geometric searches which will aid in determining sparsity patterns
1579  //
1580  // We do these things for the displaced problem (if it exists)
1581  // d1) EquationSystems::reinit. Restrict the displaced problem vector copies and then contract
1582  // the mesh. It's safe to do a full reinit with the displaced because there are no
1583  // matrices that sparsity pattern calculations will be conducted for
1584  // d2) MooseMesh::meshChanged. This will update the node/side lists and other
1585  // things which needs to happen after the contraction
1586  // d3) UpdateDisplacedMeshThread::operator(). Re-displace the mesh using the *displaced*
1587  // solution vector copy because we don't know the state of the reference solution vector.
1588  // It's safe to use the displaced copy because we are outside of a non-linear solve,
1589  // and there is no concern about differences between solution and current_local_solution
1590  // d4) GeometricSearchData::reinit. With the node/side lists updated and the mesh
1591  // re-displaced, we can perform our geometric searches, which will aid in determining the
1592  // sparsity pattern of the matrix held by the libMesh::ImplicitSystem held by the
1593  // NonlinearSystem held by this
1594  meshChanged(
1595  /*intermediate_change=*/true, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
1596  }
1597 
1598  // u4) Now that all the geometric searches have been done (both undisplaced and displaced),
1599  // we're ready to update the sparsity pattern
1600  es().reinit_systems();
1601  }
1602 
1603  if (_line_search)
1604  _line_search->timestepSetup();
1605 
1606  // Random interface objects
1607  for (const auto & it : _random_data_objects)
1608  it.second->updateSeeds(EXEC_TIMESTEP_BEGIN);
1609 
1610  unsigned int n_threads = libMesh::n_threads();
1611  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1612  {
1615  }
1616 
1617 #ifdef MOOSE_KOKKOS_ENABLED
1619 #endif
1620 
1621  _aux->timestepSetup();
1622  for (auto & sys : _solver_systems)
1623  sys->timestepSetup();
1624 
1625  if (_displaced_problem)
1626  // timestepSetup for displaced systems
1627  _displaced_problem->timestepSetup();
1628 
1629  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1630  {
1633  _markers.timestepSetup(tid);
1634  }
1635 
1636  std::vector<UserObject *> userobjs;
1637  theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(userobjs);
1638  for (auto obj : userobjs)
1639  obj->timestepSetup();
1640 
1641  // Timestep setup of output objects
1643 
1646  _has_nonlocal_coupling = true;
1647 }
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.
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
virtual void reinit_systems()
TheWarehouse & theWarehouse() const
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:37
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:357
MooseObjectWarehouse< Indicator > _indicators
virtual void timestepSetup()
Definition: SubProblem.C:1186
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:2525
MooseMesh * _displaced_mesh
unsigned int THREAD_ID
Definition: MooseTypes.h:237
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)
inlinevirtual

Definition at line 557 of file FEProblemBase.h.

Referenced by EigenExecutionerBase::EigenExecutionerBase(), and TransientBase::TransientBase().

557 { _transient = trans; }

◆ trustUserCouplingMatrix()

void FEProblemBase::trustUserCouplingMatrix ( )

Whether to trust the user coupling matrix even if we want to do things like be paranoid and create a full coupling matrix.

See https://github.com/idaholab/moose/issues/16395 for detailed background

Definition at line 6331 of file FEProblemBase.C.

Referenced by SingleMatrixPreconditioner::SingleMatrixPreconditioner().

6332 {
6334  mooseError("Someone told us (the FEProblemBase) to trust the user coupling matrix, but we "
6335  "haven't been provided a coupling matrix!");
6336 
6338 }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ type()

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

Get the type of this class.

Returns
the name of the type of this class

Definition at line 93 of file MooseBase.h.

Referenced by CreateProblemDefaultAction::act(), SetupDebugAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), addAuxArrayVariable(), addAuxScalarVariable(), addAuxVariable(), addConvergence(), addDistribution(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), MFEMProblem::addFunction(), addFunction(), addMeshDivision(), MooseApp::addMeshGenerator(), MeshGenerator::addMeshSubgenerator(), addObject(), MFEMProblem::addPostprocessor(), addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), addReporter(), addSampler(), WebServerControl::addServerActionsInternal(), addTimeIntegrator(), MooseServer::addValuesToList(), DisplacedProblem::addVectorTag(), SubProblem::addVectorTag(), advanceMultiApps(), MooseApp::appendMeshGenerator(), AuxKernelBase::AuxKernelBase(), 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(), computeMultiAppsDT(), ADDGKernel::computeOffDiagElemNeighJacobian(), DGKernel::computeOffDiagElemNeighJacobian(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), DGConvection::computeQpJacobian(), ScalarKernel::computeQpJacobian(), InterfaceDiffusion::computeQpJacobian(), InterfaceReaction::computeQpJacobian(), ArrayDGDiffusion::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGDiffusion::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), HFEMTestJump::computeQpOffDiagJacobian(), HFEMTrialJump::computeQpOffDiagJacobian(), ArrayDGKernel::computeQpOffDiagJacobian(), ArrayHFEMDiffusion::computeQpResidual(), DGConvection::computeQpResidual(), HFEMDiffusion::computeQpResidual(), ScalarKernel::computeQpResidual(), InterfaceDiffusion::computeQpResidual(), ADMatInterfaceReaction::computeQpResidual(), InterfaceReaction::computeQpResidual(), ADDGAdvection::computeQpResidual(), ArrayDGDiffusion::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), DGDiffusion::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), ADDGDiffusion::computeQpResidual(), HFEMTrialJump::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), HFEMTestJump::computeQpResidual(), computeSystems(), computeUserObjectByName(), computeUserObjects(), computeUserObjectsInternal(), DisplacedProblem::createQRules(), createQRules(), MooseApp::createRecoverablePerfGraph(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), duplicateVariableCheck(), execMultiApps(), execMultiAppTransfers(), execTransfers(), SteadyBase::execute(), WebServerControl::execute(), ActionWarehouse::executeActionsWithAction(), finishMultiAppStep(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), MooseServer::gatherDocumentReferencesLocations(), Boundary2DDelaunayGenerator::General2DDelaunay(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), Boundary2DDelaunayGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), MultiAppTransfer::getAppInfo(), TransfiniteMeshGenerator::getEdge(), ElementGenerator::getElemType(), MooseServer::getInputLookupDefinitionNodes(), getMaterial(), getMaterialData(), getMaterialPropertyStorageConsumers(), MaterialOutputAction::getParams(), ReporterData::getReporterInfo(), getTransfers(), DisplacedProblem::getVectorTags(), SubProblem::getVectorTags(), CommonOutputAction::hasConsole(), hasMultiApps(), AdvancedOutput::hasOutput(), incrementMultiAppTStep(), AdvancedOutput::initAvailableLists(), FunctorPositions::initialize(), FunctorTimes::initialize(), MultiAppConservativeTransfer::initialSetup(), LinearFVAnisotropicDiffusion::initialSetup(), LinearFVAdvection::initialSetup(), LinearFVDiffusion::initialSetup(), ArrayDGDiffusion::initQpResidual(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), logAdd(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MFEMProblem::mesh(), MooseObject::MooseObject(), MultiAppMFEMCopyTransfer::MultiAppMFEMCopyTransfer(), DisplacedProblem::numVectorTags(), SubProblem::numVectorTags(), Console::output(), AdvancedOutput::output(), ConsoleUtils::outputExecutionInformation(), SampledOutput::outputStep(), Output::outputStep(), outputStep(), MooseServer::parseDocumentForDiagnostics(), MooseMesh::prepare(), ProjectedStatefulMaterialStorageAction::processProperty(), MooseApp::recursivelyCreateExecutors(), SolutionInvalidInterface::registerInvalidSolutionInternal(), restoreMultiApps(), MeshRepairGenerator::separateSubdomainsByElementType(), setCoupling(), MooseApp::setupOptions(), ExplicitTVDRK2::solve(), ExplicitRK2::solve(), Reporter::store(), MooseBase::typeAndName(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), DisplacedProblem::updateGeomSearch(), updateGeomSearch(), UserObjectInterface::userObjectType(), and AdvancedOutput::wantOutput().

94  {
95  mooseAssert(_type.size(), "Empty type");
96  return _type;
97  }
const std::string & _type
The type of this class.
Definition: MooseBase.h:360

◆ typeAndName()

std::string MooseBase::typeAndName ( ) const
inherited

Get the class's combined type and name; useful in error handling.

Returns
The type and name of this class in the form '<type()> "<name()>"'.

Definition at line 57 of file MooseBase.C.

Referenced by addPostprocessor(), MaterialPropertyStorage::addProperty(), addReporter(), addVectorPostprocessor(), MeshGeneratorSystem::dataDrivenError(), ReporterContext< std::vector< T > >::finalize(), ReporterData::getReporterInfo(), and WebServerControl::outputMessage().

58 {
59  return type() + std::string(" \"") + name() + std::string("\"");
60 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93

◆ uDotDotOldRequested()

virtual bool FEProblemBase::uDotDotOldRequested ( )
inlinevirtual

Get boolean flag to check whether old solution second time derivative needs to be stored.

Definition at line 2427 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors().

2428  {
2430  mooseError("FEProblemBase: When requesting old second time derivative of solution, current "
2431  "second time derivation of solution should also be stored. Please set "
2432  "`u_dotdot_requested` to true using setUDotDotRequested.");
2433  return _u_dotdot_old_requested;
2434  }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.

◆ uDotDotRequested()

virtual bool FEProblemBase::uDotDotRequested ( )
inlinevirtual

Get boolean flag to check whether solution second time derivative needs to be stored.

Definition at line 2413 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors(), and addTimeIntegrator().

2413 { return _u_dotdot_requested; }
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.

◆ uDotOldRequested()

virtual bool FEProblemBase::uDotOldRequested ( )
inlinevirtual

Get boolean flag to check whether old solution time derivative needs to be stored.

Definition at line 2416 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors().

2417  {
2419  mooseError("FEProblemBase: When requesting old time derivative of solution, current time "
2420  "derivative of solution should also be stored. Please set `u_dot_requested` to "
2421  "true using setUDotRequested.");
2422 
2423  return _u_dot_old_requested;
2424  }
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.

◆ uDotRequested()

virtual bool FEProblemBase::uDotRequested ( )
inlinevirtual

Get boolean flag to check whether solution time derivative needs to be stored.

Definition at line 2410 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors().

2410 { return _u_dot_requested; }
bool _u_dot_requested
Whether solution time derivative needs to be stored.

◆ uniformRefine()

void FEProblemBase::uniformRefine ( )

uniformly refine the problem mesh(es).

This will also prolong the the solution, and in order for that to be safe, we can only perform one refinement at a time

Definition at line 9279 of file FEProblemBase.C.

Referenced by FEProblemSolve::solve().

9280 {
9281  // ResetDisplacedMeshThread::onNode looks up the reference mesh by ID, so we need to make sure
9282  // we undisplace before adapting the reference mesh
9283  if (_displaced_problem)
9284  _displaced_problem->undisplaceMesh();
9285 
9287  if (_displaced_problem)
9289 
9290  meshChanged(
9291  /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
9292 }
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 MooseBase::uniqueName ( ) const
inherited
Returns
The unique name for accessing input parameters of this object in the InputParameterWarehouse

Definition at line 69 of file MooseBase.C.

Referenced by MooseBase::connectControllableParams(), and Action::uniqueActionName().

70 {
71  if (!_pars.have_parameter<std::string>(unique_name_param))
72  mooseError("uniqueName(): Object does not have a unique name");
73  return MooseObjectName(_pars.get<std::string>(unique_name_param));
74 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:366
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.
static const std::string unique_name_param
The name of the parameter that contains the unique object name.
Definition: MooseBase.h:57
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
A class for storing the names of MooseObject by tag and object name.

◆ uniqueParameterName()

MooseObjectParameterName MooseBase::uniqueParameterName ( const std::string &  parameter_name) const
inherited
Returns
The unique parameter name of a valid parameter of this object for accessing parameter controls

Definition at line 63 of file MooseBase.C.

64 {
65  return MooseObjectParameterName(getBase(), name(), parameter_name);
66 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
A class for storing an input parameter name.
const std::string & getBase() const
Definition: MooseBase.h:147

◆ updateActiveObjects()

void FEProblemBase::updateActiveObjects ( )
virtual

Update the active objects in the warehouses.

Reimplemented in DumpObjectsProblem.

Definition at line 5316 of file FEProblemBase.C.

Referenced by MooseEigenSystem::eigenKernelOnCurrent(), MooseEigenSystem::eigenKernelOnOld(), MFEMProblemSolve::solve(), and FixedPointSolve::solveStep().

5317 {
5318  TIME_SECTION("updateActiveObjects", 5, "Updating Active Objects");
5319 
5320  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
5321  {
5322  for (auto & nl : _nl)
5323  nl->updateActive(tid);
5324  _aux->updateActive(tid);
5327  _markers.updateActive(tid);
5329  _materials.updateActive(tid);
5331  }
5332 
5340 
5341 #ifdef MOOSE_KOKKOS_ENABLED
5343 #endif
5344 }
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.
MaterialWarehouse _kokkos_materials
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:237
MaterialWarehouse _materials

◆ updateGeomSearch()

void FEProblemBase::updateGeomSearch ( GeometricSearchData::GeometricSearchType  type = GeometricSearchData::ALL)
overridevirtual

Implements SubProblem.

Definition at line 8054 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::augmentSparsity(), and initialSetup().

8055 {
8056  TIME_SECTION("updateGeometricSearch", 3, "Updating Geometric Search");
8057 
8059 
8060  if (_displaced_problem)
8061  _displaced_problem->updateGeomSearch(type);
8062 }
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
void update(GeometricSearchType type=ALL)
Update all of the search objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
GeometricSearchData _geometric_search_data

◆ updateMaxQps()

void FEProblemBase::updateMaxQps ( )
private

Definition at line 6199 of file FEProblemBase.C.

Referenced by bumpAllQRuleOrder(), bumpVolumeQRuleOrder(), and createQRules().

6200 {
6201  // Find the maximum number of quadrature points
6202  {
6203  MaxQpsThread mqt(*this);
6205  _max_qps = mqt.max();
6206 
6207  // If we have more shape functions or more quadrature points on
6208  // another processor, then we may need to handle those elements
6209  // ourselves later after repartitioning.
6211  }
6212 
6213  unsigned int max_qpts = getMaxQps();
6214  if (max_qpts > Moose::constMaxQpsPerElem)
6215  mooseError("Max quadrature points per element assumptions made in some code (e.g. Coupleable ",
6216  "and MaterialPropertyInterface classes) have been violated.\n",
6217  "Complain to Moose developers to have constMaxQpsPerElem increased from ",
6219  " to ",
6220  max_qpts);
6221  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
6222  {
6223  // the highest available order in libMesh is 43
6224  _scalar_zero[tid].resize(FORTYTHIRD, 0);
6225  _zero[tid].resize(max_qpts, 0);
6226  _ad_zero[tid].resize(max_qpts, 0);
6227  _grad_zero[tid].resize(max_qpts, RealGradient(0.));
6228  _ad_grad_zero[tid].resize(max_qpts, ADRealGradient(0));
6229  _second_zero[tid].resize(max_qpts, RealTensor(0.));
6230  _ad_second_zero[tid].resize(max_qpts, ADRealTensorValue(0));
6231  _vector_zero[tid].resize(max_qpts, RealGradient(0.));
6232  _vector_curl_zero[tid].resize(max_qpts, RealGradient(0.));
6233  }
6234 }
This class determines the maximum number of Quadrature Points and Shape Functions used for a given si...
Definition: MaxQpsThread.h:27
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1288
std::vector< MooseArray< ADRealTensorValue > > _ad_second_zero
unsigned int n_threads()
std::vector< MooseArray< ADRealVectorValue > > _ad_grad_zero
constexpr std::size_t constMaxQpsPerElem
This is used for places where we initialize some qp-sized data structures that would end up being siz...
Definition: MooseTypes.h:258
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
std::vector< VariableSecond > _second_zero
std::vector< MooseArray< ADReal > > _ad_zero
std::vector< VectorVariableCurl > _vector_curl_zero
const Parallel::Communicator & _communicator
libMesh::TensorValue< ADReal > ADRealTensorValue
Definition: MooseTypes.h:409
MooseMesh & _mesh
std::vector< VariableGradient > _grad_zero
void max(const T &r, T &o, Request &req) const
std::vector< VariableValue > _scalar_zero
std::vector< VariableValue > _zero
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
ADRealVectorValue ADRealGradient
Definition: MooseTypes.h:407
std::vector< VectorVariableValue > _vector_zero
unsigned int _max_qps
Maximum number of quadrature points used in the problem.
unsigned int getMaxQps() const

◆ updateMeshXFEM()

bool FEProblemBase::updateMeshXFEM ( )
virtual

Update the mesh due to changing XFEM cuts.

Definition at line 8315 of file FEProblemBase.C.

Referenced by initialSetup(), and FixedPointSolve::solveStep().

8316 {
8317  TIME_SECTION("updateMeshXFEM", 5, "Updating XFEM");
8318 
8319  bool updated = false;
8320  if (haveXFEM())
8321  {
8322  if (_xfem->updateHeal())
8323  // XFEM exodiff tests rely on a given numbering because they cannot use map = true due to
8324  // having coincident elements. While conceptually speaking we do not need to contract the
8325  // mesh, we need its call to renumber_nodes_and_elements in order to preserve these tests
8326  meshChanged(
8327  /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/false);
8328 
8329  updated = _xfem->update(_time, _nl, *_aux);
8330  if (updated)
8331  {
8332  meshChanged(
8333  /*intermediate_change=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/false);
8334  _xfem->initSolution(_nl, *_aux);
8335  restoreSolutions();
8336  _console << "\nXFEM update complete: Mesh modified" << std::endl;
8337  }
8338  else
8339  _console << "\nXFEM update complete: Mesh not modified" << std::endl;
8340  }
8341  return updated;
8342 }
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()
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.

◆ updateMortarMesh()

void FEProblemBase::updateMortarMesh ( )
virtual

Definition at line 8065 of file FEProblemBase.C.

Referenced by computeResidualAndJacobian(), computeResidualTags(), init(), initialSetup(), and meshChanged().

8066 {
8067  TIME_SECTION("updateMortarMesh", 5, "Updating Mortar Mesh");
8068 
8069  FloatingPointExceptionGuard fpe_guard(_app);
8070 
8071  _mortar_data->update();
8072 }
Scope guard for starting and stopping Floating Point Exception Trapping.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:357
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data

◆ updateSolution()

bool FEProblemBase::updateSolution ( NumericVector< libMesh::Number > &  vec_solution,
NumericVector< libMesh::Number > &  ghosted_solution 
)
virtual

Update the solution.

Parameters
vec_solutionLocal solution vector that gets modified by this method
ghosted_solutionGhosted solution vector
Returns
true if the solution was modified, false otherwise

Definition at line 8033 of file FEProblemBase.C.

Referenced by computePostCheck().

8035 {
8036  return false;
8037 }

◆ useSNESMFReuseBase()

bool FEProblemBase::useSNESMFReuseBase ( )
inline

Return a flag that indicates if we are reusing the vector base.

Definition at line 2364 of file FEProblemBase.h.

Referenced by NonlinearSystem::potentiallySetupFiniteDifferencing().

2364 { return _snesmf_reuse_base; }
bool _snesmf_reuse_base
If or not to resuse the base vector for matrix-free calculation.

◆ validParams()

InputParameters FEProblemBase::validParams ( )
static

Definition at line 159 of file FEProblemBase.C.

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

160 {
162  params.addParam<unsigned int>("null_space_dimension", 0, "The dimension of the nullspace");
163  params.addParam<unsigned int>(
164  "transpose_null_space_dimension", 0, "The dimension of the transpose nullspace");
165  params.addParam<unsigned int>(
166  "near_null_space_dimension", 0, "The dimension of the near nullspace");
167  params.addParam<bool>("solve",
168  true,
169  "Whether or not to actually solve the Nonlinear system. "
170  "This is handy in the case that all you want to do is "
171  "execute AuxKernels, Transfers, etc. without actually "
172  "solving anything");
173  params.addParam<bool>("use_nonlinear",
174  true,
175  "Determines whether to use a Nonlinear vs a "
176  "Eigenvalue system (Automatically determined based "
177  "on executioner)");
178  params.addParam<bool>("error_on_jacobian_nonzero_reallocation",
179  "This causes PETSc to error if it had to reallocate memory in the Jacobian "
180  "matrix due to not having enough nonzeros");
181  params.addParam<bool>("ignore_zeros_in_jacobian",
182  false,
183  "Do not explicitly store zero values in "
184  "the Jacobian matrix if true");
185  params.addParam<bool>("force_restart",
186  false,
187  "EXPERIMENTAL: If true, a sub_app may use a "
188  "restart file instead of using of using the master "
189  "backup file");
190  params.addDeprecatedParam<bool>("skip_additional_restart_data",
191  false,
192  "True to skip additional data in equation system for restart.",
193  "This parameter is no longer used, as we do not load additional "
194  "vectors by default with restart");
195  params.addParam<bool>("skip_nl_system_check",
196  false,
197  "True to skip the NonlinearSystem check for work to do (e.g. Make sure "
198  "that there are variables to solve for).");
199  params.addParam<bool>("allow_initial_conditions_with_restart",
200  false,
201  "True to allow the user to specify initial conditions when restarting. "
202  "Initial conditions can override any restarted field");
203 
204  auto coverage_check_description = [](std::string scope, std::string list_param_name)
205  {
206  return "Controls, if and how a " + scope +
207  " subdomain coverage check is performed. "
208  "With 'TRUE' or 'ON' all subdomains are checked (the default). Setting 'FALSE' or 'OFF' "
209  "will disable the check for all subdomains. "
210  "To exclude a predefined set of subdomains 'SKIP_LIST' is to "
211  "be used, while the subdomains to skip are to be defined in the parameter '" +
212  list_param_name +
213  "'. To limit the check to a list of subdomains, 'ONLY_LIST' is to "
214  "be used (again, using the parameter '" +
215  list_param_name + "').";
216  };
217 
218  params.addParam<std::vector<SubdomainName>>(
219  "block",
220  {"ANY_BLOCK_ID"},
221  "List of subdomains for kernel coverage and material coverage checks. Setting this parameter "
222  "is equivalent to setting 'kernel_coverage_block_list' and 'material_coverage_block_list' as "
223  "well as using 'ONLY_LIST' as the coverage check mode.");
224 
225  MooseEnum kernel_coverage_check_modes("FALSE TRUE OFF ON SKIP_LIST ONLY_LIST", "TRUE");
226  params.addParam<MooseEnum>("kernel_coverage_check",
227  kernel_coverage_check_modes,
228  coverage_check_description("kernel", "kernel_coverage_block_list"));
229  params.addParam<std::vector<SubdomainName>>(
230  "kernel_coverage_block_list",
231  {},
232  "List of subdomains for kernel coverage check. The meaning of this list is controlled by the "
233  "parameter 'kernel_coverage_check' (whether this is the list of subdomains to be checked, "
234  "not to be checked or not taken into account).");
235  params.addParam<bool>(
236  "boundary_restricted_node_integrity_check",
237  true,
238  "Set to false to disable checking of boundary restricted nodal object variable dependencies, "
239  "e.g. are the variable dependencies defined on the selected boundaries?");
240  params.addParam<bool>("boundary_restricted_elem_integrity_check",
241  true,
242  "Set to false to disable checking of boundary restricted elemental object "
243  "variable dependencies, e.g. are the variable dependencies defined on the "
244  "selected boundaries?");
245  MooseEnum material_coverage_check_modes("FALSE TRUE OFF ON SKIP_LIST ONLY_LIST", "TRUE");
246  params.addParam<MooseEnum>(
247  "material_coverage_check",
248  material_coverage_check_modes,
249  coverage_check_description("material", "material_coverage_block_list"));
250  params.addParam<std::vector<SubdomainName>>(
251  "material_coverage_block_list",
252  {},
253  "List of subdomains for material coverage check. The meaning of this list is controlled by "
254  "the parameter 'material_coverage_check' (whether this is the list of subdomains to be "
255  "checked, not to be checked or not taken into account).");
256 
257  params.addParam<bool>("fv_bcs_integrity_check",
258  true,
259  "Set to false to disable checking of overlapping Dirichlet and Flux BCs "
260  "and/or multiple DirichletBCs per sideset");
261 
262  params.addParam<bool>(
263  "material_dependency_check", true, "Set to false to disable material dependency check");
264  params.addParam<bool>("parallel_barrier_messaging",
265  false,
266  "Displays messaging from parallel "
267  "barrier notifications when executing "
268  "or transferring to/from Multiapps "
269  "(default: false)");
270 
271  MooseEnum verbosity("false true extra", "false");
272  params.addParam<MooseEnum>("verbose_setup",
273  verbosity,
274  "Set to 'true' to have the problem report on any object created. Set "
275  "to 'extra' to also display all parameters.");
276  params.addParam<bool>("verbose_multiapps",
277  false,
278  "Set to True to enable verbose screen printing related to MultiApps");
279  params.addParam<bool>(
280  "verbose_restore",
281  false,
282  "Set to True to enable verbose screen printing related to solution restoration");
283 
284  params.addParam<FileNameNoExtension>("restart_file_base",
285  "File base name used for restart (e.g. "
286  "<path>/<filebase> or <path>/LATEST to "
287  "grab the latest file available)");
288 
289  params.addParam<std::vector<std::vector<TagName>>>(
290  "extra_tag_vectors",
291  {},
292  "Extra vectors to add to the system that can be filled by objects which compute residuals "
293  "and Jacobians (Kernels, BCs, etc.) by setting tags on them. The outer index is for which "
294  "nonlinear system the extra tag vectors should be added for");
295 
296  params.addParam<std::vector<std::vector<TagName>>>(
297  "not_zeroed_tag_vectors",
298  {},
299  "Extra vector tags which the sytem will not zero when other vector tags are zeroed. "
300  "The outer index is for which nonlinear system the extra tag vectors should be added for");
301 
302  params.addParam<std::vector<std::vector<TagName>>>(
303  "extra_tag_matrices",
304  {},
305  "Extra matrices to add to the system that can be filled "
306  "by objects which compute residuals and Jacobians "
307  "(Kernels, BCs, etc.) by setting tags on them. The outer index is for which "
308  "nonlinear system the extra tag vectors should be added for");
309 
310  params.addParam<std::vector<TagName>>(
311  "extra_tag_solutions",
312  {},
313  "Extra solution vectors to add to the system that can be used by "
314  "objects for coupling variable values stored in them.");
315 
316  params.addParam<bool>("previous_nl_solution_required",
317  false,
318  "True to indicate that this calculation requires a solution vector for "
319  "storing the previous nonlinear iteration.");
320 
321  params.addParam<std::vector<NonlinearSystemName>>(
322  "nl_sys_names", std::vector<NonlinearSystemName>{"nl0"}, "The nonlinear system names");
323 
324  params.addParam<std::vector<LinearSystemName>>("linear_sys_names", {}, "The linear system names");
325 
326  params.addParam<bool>("check_uo_aux_state",
327  false,
328  "True to turn on a check that no state presents during the evaluation of "
329  "user objects and aux kernels");
330 
331  params.addPrivateParam<MooseMesh *>("mesh");
332 
333  params.declareControllable("solve");
334 
335  params.addParam<bool>(
336  "allow_invalid_solution",
337  false,
338  "Set to true to allow convergence even though the solution has been marked as 'invalid'");
339  params.addParam<bool>("show_invalid_solution_console",
340  true,
341  "Set to true to show the invalid solution occurance summary in console");
342  params.addParam<bool>("immediately_print_invalid_solution",
343  false,
344  "Whether or not to report invalid solution warnings at the time the "
345  "warning is produced instead of after the calculation");
346 
347  params.addParam<bool>(
348  "identify_variable_groups_in_nl",
349  true,
350  "Whether to identify variable groups in nonlinear systems. This affects dof ordering");
351 
352  params.addParam<bool>(
353  "regard_general_exceptions_as_errors",
354  false,
355  "If we catch an exception during residual/Jacobian evaluaton for which we don't have "
356  "specific handling, immediately error instead of allowing the time step to be cut");
357 
358  params.addParam<bool>("use_hash_table_matrix_assembly",
359  false,
360  "Whether to assemble matrices using hash tables instead of preallocating "
361  "matrix memory. This can be a good option if the sparsity pattern changes "
362  "throughout the course of the simulation.");
363  params.addParam<bool>(
364  "restore_original_nonzero_pattern",
365  "Whether we should reset matrix memory for every Jacobian evaluation. This option is useful "
366  "if the sparsity pattern is constantly changing and you are using hash table assembly or if "
367  "you wish to continually restore the matrix to the originally preallocated sparsity pattern "
368  "computed by relationship managers.");
369 
370  params.addParamNamesToGroup(
371  "skip_nl_system_check kernel_coverage_check kernel_coverage_block_list "
372  "boundary_restricted_node_integrity_check "
373  "boundary_restricted_elem_integrity_check material_coverage_check "
374  "material_coverage_block_list fv_bcs_integrity_check "
375  "material_dependency_check check_uo_aux_state error_on_jacobian_nonzero_reallocation",
376  "Simulation checks");
377  params.addParamNamesToGroup("use_nonlinear previous_nl_solution_required nl_sys_names "
378  "ignore_zeros_in_jacobian identify_variable_groups_in_nl "
379  "use_hash_table_matrix_assembly restore_original_nonzero_pattern",
380  "Nonlinear system(s)");
381  params.addParamNamesToGroup(
382  "restart_file_base force_restart allow_initial_conditions_with_restart", "Restart");
383  params.addParamNamesToGroup(
384  "verbose_setup verbose_multiapps verbose_restore parallel_barrier_messaging", "Verbosity");
385  params.addParamNamesToGroup(
386  "null_space_dimension transpose_null_space_dimension near_null_space_dimension",
387  "Null space removal");
388  params.addParamNamesToGroup(
389  "extra_tag_vectors extra_tag_matrices extra_tag_solutions not_zeroed_tag_vectors",
390  "Contribution to tagged field data");
391  params.addParamNamesToGroup(
392  "allow_invalid_solution show_invalid_solution_console immediately_print_invalid_solution",
393  "Solution validity control");
394 
395  return params;
396 }
void addDeprecatedParam(const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
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...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:92
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 addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
static InputParameters validParams()
Definition: SubProblem.C:36
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...

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

138 {
139  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
140 
141  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
142  for (const auto & vector_tag : _vector_tags)
143  if (vector_tag._name == tag_name_upper)
144  return true;
145 
146  return false;
147 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1172
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:242
std::string toUpper(std::string name)
Convert supplied string to upper case.

◆ vectorTagName()

TagName SubProblem::vectorTagName ( const TagID  tag) const
virtualinherited

Retrieve the name associated with a TagID.

Reimplemented in DisplacedProblem.

Definition at line 222 of file SubProblem.C.

Referenced by SystemBase::closeTaggedVector(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), SystemBase::removeVector(), NonlinearSystemBase::residualGhosted(), DisplacedProblem::vectorTagName(), and SystemBase::zeroTaggedVector().

223 {
224  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
225  if (!vectorTagExists(tag_id))
226  mooseError("Vector tag with ID ", tag_id, " does not exist");
227 
228  return _vector_tags[tag_id]._name;
229 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1172
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:242
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

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

Referenced by SystemBase::zeroTaggedVector().

157 {
158  return _not_zeroed_tagged_vectors.count(tag);
159 }
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:1119

◆ vectorTagType()

Moose::VectorTagType SubProblem::vectorTagType ( const TagID  tag_id) const
virtualinherited

Reimplemented in DisplacedProblem.

Definition at line 232 of file SubProblem.C.

Referenced by MooseVariableScalar::reinit(), TaggingInterface::TaggingInterface(), TagVectorAux::TagVectorAux(), and DisplacedProblem::vectorTagType().

233 {
234  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
235  if (!vectorTagExists(tag_id))
236  mooseError("Vector tag with ID ", tag_id, " does not exist");
237 
238  return _vector_tags[tag_id]._type;
239 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1172
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:242
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 and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

◆ verboseMultiApps()

bool FEProblemBase::verboseMultiApps ( ) const
inline

Whether or not to use verbose printing for MultiApps.

Definition at line 2078 of file FEProblemBase.h.

Referenced by MultiApp::backup(), MultiApp::createApp(), MultiApp::restore(), FullSolveMultiApp::showStatusMessage(), and TransientMultiApp::solveStep().

2078 { 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 242 of file SubProblem.C.

Referenced by SubProblem::addVectorTag(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), SubProblem::getVectorTags(), SubProblem::numVectorTags(), SubProblem::vectorTagExists(), SubProblem::vectorTagName(), and SubProblem::vectorTagType().

243 {
244  for (TagID tag_id = 0; tag_id < _vector_tags.size(); ++tag_id)
245  {
246  const auto & vector_tag = _vector_tags[tag_id];
247 
248  if (vector_tag._id != tag_id)
249  mooseError("Vector tag ", vector_tag._id, " id mismatch in _vector_tags");
250  if (vector_tag._type == Moose::VECTOR_TAG_ANY)
251  mooseError("Vector tag '", vector_tag._name, "' has type VECTOR_TAG_ANY");
252 
253  const auto search = _vector_tags_name_map.find(vector_tag._name);
254  if (search == _vector_tags_name_map.end())
255  mooseError("Vector tag ", vector_tag._id, " is not in _vector_tags_name_map");
256  else if (search->second != tag_id)
257  mooseError("Vector tag ", vector_tag._id, " has incorrect id in _vector_tags_name_map");
258 
259  unsigned int found_in_type = 0;
260  for (TagTypeID tag_type_id = 0; tag_type_id < _typed_vector_tags[vector_tag._type].size();
261  ++tag_type_id)
262  {
263  const auto & vector_tag_type = _typed_vector_tags[vector_tag._type][tag_type_id];
264  if (vector_tag_type == vector_tag)
265  {
266  ++found_in_type;
267  if (vector_tag_type._type_id != tag_type_id)
268  mooseError("Type ID for Vector tag ", tag_id, " is incorrect");
269  }
270  }
271 
272  if (found_in_type == 0)
273  mooseError("Vector tag ", tag_id, " not found in _typed_vector_tags");
274  if (found_in_type > 1)
275  mooseError("Vector tag ", tag_id, " found multiple times in _typed_vector_tags");
276  }
277 
278  unsigned int num_typed_vector_tags = 0;
279  for (const auto & typed_vector_tags : _typed_vector_tags)
280  num_typed_vector_tags += typed_vector_tags.size();
281  if (num_typed_vector_tags != _vector_tags.size())
282  mooseError("Size mismatch between _vector_tags and _typed_vector_tags");
283  if (_vector_tags_name_map.size() != _vector_tags.size())
284  mooseError("Size mismatch between _vector_tags and _vector_tags_name_map");
285 
286  return true;
287 }
unsigned int TagTypeID
Definition: MooseTypes.h:239
unsigned int TagID
Definition: MooseTypes.h:238
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1172
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1182
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:1179
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271

Friends And Related Function Documentation

◆ AuxiliarySystem

friend class AuxiliarySystem
friend

Definition at line 3334 of file FEProblemBase.h.

◆ DisplacedProblem

friend class DisplacedProblem
friend

Definition at line 3339 of file FEProblemBase.h.

◆ Moose::PetscSupport::setSinglePetscOption

void Moose::PetscSupport::setSinglePetscOption ( const std::string &  name,
const std::string &  value,
FEProblemBase *const  problem 
)
friend

◆ MooseEigenSystem

friend class MooseEigenSystem
friend

Definition at line 3336 of file FEProblemBase.h.

◆ NonlinearSystemBase

friend class NonlinearSystemBase
friend

Definition at line 3335 of file FEProblemBase.h.

◆ Restartable

friend class Restartable
friend

Definition at line 3338 of file FEProblemBase.h.

◆ Resurrector

friend class Resurrector
friend

Definition at line 3337 of file FEProblemBase.h.

Member Data Documentation

◆ _action_factory

ActionFactory& ParallelParamObject::_action_factory
protectedinherited

◆ _active_elemental_moose_variables

std::vector<std::set<MooseVariableFieldBase *> > SubProblem::_active_elemental_moose_variables
protectedinherited

This is the set of MooseVariableFieldBase that will actually get reinited by a call to reinit(elem)

Definition at line 1077 of file SubProblem.h.

Referenced by SubProblem::clearActiveElementalMooseVariables(), SubProblem::getActiveElementalMooseVariables(), SubProblem::setActiveElementalMooseVariables(), and SubProblem::SubProblem().

◆ _active_fe_var_coupleable_matrix_tags

std::vector<std::set<TagID> > SubProblem::_active_fe_var_coupleable_matrix_tags
protectedinherited

◆ _active_fe_var_coupleable_vector_tags

std::vector<std::set<TagID> > SubProblem::_active_fe_var_coupleable_vector_tags
protectedinherited

◆ _active_sc_var_coupleable_matrix_tags

std::vector<std::set<TagID> > SubProblem::_active_sc_var_coupleable_matrix_tags
protectedinherited

◆ _active_sc_var_coupleable_vector_tags

std::vector<std::set<TagID> > SubProblem::_active_sc_var_coupleable_vector_tags
protectedinherited

◆ _ad_grad_zero

std::vector<MooseArray<ADRealVectorValue> > FEProblemBase::_ad_grad_zero

Definition at line 2296 of file FEProblemBase.h.

Referenced by FEProblemBase(), updateMaxQps(), and ~FEProblemBase().

◆ _ad_second_zero

std::vector<MooseArray<ADRealTensorValue> > FEProblemBase::_ad_second_zero

Definition at line 2299 of file FEProblemBase.h.

Referenced by FEProblemBase(), updateMaxQps(), and ~FEProblemBase().

◆ _ad_zero

std::vector<MooseArray<ADReal> > FEProblemBase::_ad_zero

Definition at line 2294 of file FEProblemBase.h.

Referenced by FEProblemBase(), updateMaxQps(), and ~FEProblemBase().

◆ _adaptivity

Adaptivity FEProblemBase::_adaptivity
protected

◆ _all_materials

MaterialWarehouse FEProblemBase::_all_materials
protected

◆ _all_user_objects

ExecuteMooseObjectWarehouse<UserObject> FEProblemBase::_all_user_objects
protected

Definition at line 2998 of file FEProblemBase.h.

Referenced by addUserObject(), and getUserObjects().

◆ _allow_ics_during_restart

const bool FEProblemBase::_allow_ics_during_restart
private

Definition at line 3309 of file FEProblemBase.h.

Referenced by checkICRestartError().

◆ _allow_invalid_solution

const bool FEProblemBase::_allow_invalid_solution
private

Definition at line 3312 of file FEProblemBase.h.

Referenced by allowInvalidSolution().

◆ _app

MooseApp& MooseBase::_app
protectedinherited

The MOOSE application this is associated with.

Definition at line 357 of file MooseBase.h.

◆ _assembly

std::vector<std::vector<std::unique_ptr<Assembly> > > FEProblemBase::_assembly
protected

◆ _aux

std::shared_ptr<AuxiliarySystem> FEProblemBase::_aux
protected

The auxiliary system.

Definition at line 2914 of file FEProblemBase.h.

Referenced by addAuxArrayVariable(), addAuxKernel(), addAuxScalarKernel(), addAuxScalarVariable(), addAuxVariable(), addIndicator(), addMarker(), addMultiApp(), addObjectParamsHelper(), addTimeIntegrator(), addTransfer(), advanceState(), checkExceptionAndStopSolve(), computeBounds(), computeIndicators(), computeJacobianTags(), computeLinearSystemTags(), computeMarkers(), computePostCheck(), computeResidualAndJacobian(), computeResidualTags(), computeSystems(), computeUserObjectsInternal(), copySolutionsBackwards(), createQRules(), createTagMatrices(), createTagSolutions(), customSetup(), determineSolverSystem(), DumpObjectsProblem::DumpObjectsProblem(), duplicateVariableCheck(), EigenProblem::EigenProblem(), execute(), ExternalProblem::ExternalProblem(), FEProblem::FEProblem(), getActualFieldVariable(), getArrayVariable(), getAuxiliarySystem(), getScalarVariable(), getStandardVariable(), getSystem(), getSystemBase(), getVariable(), getVariableNames(), getVectorVariable(), hasScalarVariable(), hasVariable(), init(), initialSetup(), meshChanged(), needBoundaryMaterialOnSide(), needSolutionState(), outputStep(), prepareFace(), projectInitialConditionOnCustomRange(), projectSolution(), reinitDirac(), reinitElem(), reinitElemPhys(), reinitNeighbor(), reinitNode(), reinitNodeFace(), reinitNodes(), reinitNodesNeighbor(), reinitScalars(), restoreOldSolutions(), restoreSolutions(), saveOldSolutions(), setAuxKernelParamsAndLog(), systemBaseAuxiliary(), systemNumForVariable(), timestepSetup(), updateActiveObjects(), and updateMeshXFEM().

◆ _aux_evaluable_local_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_aux_evaluable_local_elem_range
protected

Definition at line 3215 of file FEProblemBase.h.

◆ _between_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_between_multi_app_transfers
protected

Transfers executed just before MultiApps to transfer data between them.

Definition at line 3016 of file FEProblemBase.h.

Referenced by addTransfer(), execMultiAppTransfers(), getMultiAppTransferWarehouse(), getTransfers(), initialSetup(), and updateActiveObjects().

◆ _block_mat_side_cache

std::vector<std::unordered_map<SubdomainID, bool> > FEProblemBase::_block_mat_side_cache
protected

Cache for calculating materials on side.

Definition at line 3022 of file FEProblemBase.h.

Referenced by FEProblemBase(), and needInternalNeighborSideMaterial().

◆ _bnd_mat_side_cache

std::vector<std::unordered_map<BoundaryID, bool> > FEProblemBase::_bnd_mat_side_cache
protected

Cache for calculating materials on side.

Definition at line 3025 of file FEProblemBase.h.

Referenced by FEProblemBase(), and needBoundaryMaterialOnSide().

◆ _bnd_material_props

MaterialPropertyStorage& FEProblemBase::_bnd_material_props
protected

◆ _boundary_restricted_elem_integrity_check

const bool FEProblemBase::_boundary_restricted_elem_integrity_check
protected

whether to perform checking of boundary restricted elemental object variable dependencies, e.g.

whether the variable dependencies are defined on the selected boundaries

Definition at line 3154 of file FEProblemBase.h.

Referenced by initialSetup().

◆ _boundary_restricted_node_integrity_check

const bool FEProblemBase::_boundary_restricted_node_integrity_check
protected

whether to perform checking of boundary restricted nodal object variable dependencies, e.g.

whether the variable dependencies are defined on the selected boundaries

Definition at line 3150 of file FEProblemBase.h.

Referenced by initialSetup().

◆ _calculate_jacobian_in_uo

bool FEProblemBase::_calculate_jacobian_in_uo
protected

◆ _checking_uo_aux_state

bool FEProblemBase::_checking_uo_aux_state = false
private

Flag used to indicate whether we are doing the uo/aux state check in execute.

Definition at line 3358 of file FEProblemBase.h.

Referenced by checkingUOAuxState(), and execute().

◆ _cli_option_found

bool Problem::_cli_option_found
protectedinherited

True if the CLI option is found.

Definition at line 52 of file Problem.h.

Referenced by Problem::_setCLIOption().

◆ _cm

std::vector<std::unique_ptr<libMesh::CouplingMatrix> > FEProblemBase::_cm
protected

Coupling matrix for variables.

Definition at line 2917 of file FEProblemBase.h.

Referenced by areCoupled(), couplingMatrix(), FEProblemBase(), init(), and setCouplingMatrix().

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

Referenced by SubProblem::computingNonlinearResid(), and computingNonlinearResid().

◆ _computing_scaling_jacobian

bool FEProblemBase::_computing_scaling_jacobian = false
private

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

Definition at line 3352 of file FEProblemBase.h.

Referenced by computingScalingJacobian().

◆ _computing_scaling_residual

bool FEProblemBase::_computing_scaling_residual = false
private

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

Definition at line 3355 of file FEProblemBase.h.

Referenced by computingScalingResidual().

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 31 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), MeshOnlyAction::act(), SetupDebugAction::act(), MaterialOutputAction::act(), Adaptivity::adaptMesh(), adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), DefaultSteadyStateConvergence::checkConvergence(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), 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(), computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), execMultiApps(), execMultiAppTransfers(), MFEMSteady::execute(), MessageFromInput::execute(), SteadyBase::execute(), Eigenvalue::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), ElementQualityChecker::finalize(), SidesetAroundSubdomainUpdater::finalize(), finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), CoarsenBlockGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), NonlinearEigen::init(), InversePowerMethod::init(), initialAdaptMesh(), DefaultMultiAppFixedPointConvergence::initialize(), SubProblem::initialSetup(), EigenExecutionerBase::inversePowerIteration(), joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseBase::mooseDeprecated(), MooseBase::mooseInfo(), MooseBase::mooseWarning(), MooseBase::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(), WebServerControl::outputMessage(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), 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(), restoreMultiApps(), restoreSolutions(), NonlinearSystemBase::setInitialSolution(), MooseApp::setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), EigenProblem::solve(), FEProblemSolve::solve(), NonlinearSystem::solve(), FixedPointSolve::solve(), LinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), FixedPointSolve::solveStep(), PerfGraphLivePrint::start(), WebServerControl::startServer(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), MFEMTransient::takeStep(), TransientBase::takeStep(), TerminateChainControl::terminate(), SubProblem::timestepSetup(), updateMeshXFEM(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and ~FEProblemBase().

◆ _const_jacobian

bool FEProblemBase::_const_jacobian
protected

true if the Jacobian is constant

Definition at line 3122 of file FEProblemBase.h.

Referenced by computeJacobianTags(), constJacobian(), and setConstJacobian().

◆ _control_warehouse

ExecuteMooseObjectWarehouse<Control> FEProblemBase::_control_warehouse
protected

The control logic warehouse.

Definition at line 3200 of file FEProblemBase.h.

Referenced by executeControls(), getControlWarehouse(), and updateActiveObjects().

◆ _convergences

MooseObjectWarehouse<Convergence> FEProblemBase::_convergences
protected

convergence warehouse

Definition at line 2947 of file FEProblemBase.h.

Referenced by addConvergence(), getConvergence(), getConvergenceObjects(), hasConvergence(), and initialSetup().

◆ _coupling

Moose::CouplingType FEProblemBase::_coupling
protected

Type of variable coupling.

Definition at line 2916 of file FEProblemBase.h.

Referenced by coupling(), init(), setCoupling(), and trustUserCouplingMatrix().

◆ _current_algebraic_bnd_node_range

std::unique_ptr<ConstBndNodeRange> FEProblemBase::_current_algebraic_bnd_node_range
protected

◆ _current_algebraic_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_current_algebraic_elem_range
protected

◆ _current_algebraic_node_range

std::unique_ptr<libMesh::ConstNodeRange> FEProblemBase::_current_algebraic_node_range
protected

Definition at line 3218 of file FEProblemBase.h.

Referenced by getCurrentAlgebraicNodeRange(), and setCurrentAlgebraicNodeRange().

◆ _current_execute_on_flag

ExecFlagType FEProblemBase::_current_execute_on_flag
protected

◆ _current_ic_state

unsigned short FEProblemBase::_current_ic_state
protected

Definition at line 3226 of file FEProblemBase.h.

Referenced by getCurrentICState(), and initialSetup().

◆ _current_linear_sys

LinearSystem* FEProblemBase::_current_linear_sys
protected

◆ _current_nl_sys

NonlinearSystemBase* FEProblemBase::_current_nl_sys
protected

◆ _current_residual_vector_tags

std::vector<VectorTag> FEProblemBase::_current_residual_vector_tags
private

A data member to store the residual vector tag(s) passed into computeResidualTag(s).

This data member will be used when APIs like cacheResidual, addCachedResiduals, etc. are called

Definition at line 3369 of file FEProblemBase.h.

Referenced by clearCurrentResidualVectorTags(), currentResidualVectorTags(), and setCurrentResidualVectorTags().

◆ _current_solver_sys

SolverSystem* FEProblemBase::_current_solver_sys
protected

The current solver system.

Definition at line 2899 of file FEProblemBase.h.

Referenced by setCurrentLinearSystem(), and setCurrentNonlinearSystem().

◆ _currently_computing_jacobian

bool SubProblem::_currently_computing_jacobian
protectedinherited

Flag to determine whether the problem is currently computing Jacobian.

Definition at line 1098 of file SubProblem.h.

Referenced by EigenProblem::computeJacobianBlocks(), computeJacobianBlocks(), computeJacobianTags(), SubProblem::currentlyComputingJacobian(), and SubProblem::setCurrentlyComputingJacobian().

◆ _currently_computing_residual

bool SubProblem::_currently_computing_residual
protectedinherited

Whether the residual is being evaluated.

Definition at line 1107 of file SubProblem.h.

Referenced by SubProblem::currentlyComputingResidual(), SubProblem::setCurrentlyComputingResidual(), and setCurrentlyComputingResidual().

◆ _currently_computing_residual_and_jacobian

bool SubProblem::_currently_computing_residual_and_jacobian
protectedinherited

Flag to determine whether the problem is currently computing the residual and Jacobian.

Definition at line 1101 of file SubProblem.h.

Referenced by SubProblem::currentlyComputingResidualAndJacobian(), and SubProblem::setCurrentlyComputingResidualAndJacobian().

◆ _cycles_completed

unsigned int FEProblemBase::_cycles_completed
protected

Definition at line 3081 of file FEProblemBase.h.

Referenced by adaptMesh(), getNumCyclesCompleted(), and initialAdaptMesh().

◆ _default_ghosting

bool SubProblem::_default_ghosting
protectedinherited

Whether or not to use default libMesh coupling.

Definition at line 1092 of file SubProblem.h.

Referenced by SubProblem::defaultGhosting().

◆ _dirac_kernel_info

DiracKernelInfo SubProblem::_dirac_kernel_info
protectedinherited

◆ _discrete_materials

MaterialWarehouse FEProblemBase::_discrete_materials
protected

◆ _displaced_mesh

MooseMesh* FEProblemBase::_displaced_mesh
protected

◆ _displaced_problem

std::shared_ptr<DisplacedProblem> FEProblemBase::_displaced_problem
protected

Definition at line 3089 of file FEProblemBase.h.

Referenced by adaptMesh(), addAnyRedistributers(), addAuxArrayVariable(), addAuxScalarKernel(), addAuxScalarVariable(), addAuxVariable(), addCachedJacobian(), addCachedResidual(), addCachedResidualDirectly(), addConstraint(), addDGKernel(), addDiracKernel(), addDisplacedProblem(), addFunction(), addFunctorMaterial(), addFVKernel(), addGhostedBoundary(), addIndicator(), addInterfaceKernel(), addJacobian(), addJacobianBlockTags(), addJacobianLowerD(), addJacobianNeighbor(), addJacobianNeighborLowerD(), addMarker(), addMaterialHelper(), addMultiApp(), addNodalKernel(), addObjectParamsHelper(), addResidual(), addResidualLower(), addResidualNeighbor(), addScalarKernel(), addTimeIntegrator(), addTransfer(), addUserObject(), addVariable(), advanceState(), automaticScaling(), bumpAllQRuleOrder(), bumpVolumeQRuleOrder(), cacheJacobian(), cacheJacobianNeighbor(), cacheResidual(), cacheResidualNeighbor(), checkDisplacementOrders(), clearActiveElementalMooseVariables(), clearActiveFEVariableCoupleableMatrixTags(), clearActiveFEVariableCoupleableVectorTags(), clearActiveScalarVariableCoupleableMatrixTags(), clearActiveScalarVariableCoupleableVectorTags(), clearDiracInfo(), EigenProblem::computeJacobianBlocks(), computeJacobianBlocks(), computeJacobianTags(), computeResidualAndJacobian(), computeResidualTags(), computeUserObjectsInternal(), computingNonlinearResid(), createMortarInterface(), createQRules(), customSetup(), execute(), getDiracElements(), getDisplacedProblem(), getMortarUserObjects(), ghostGhostedBoundaries(), haveADObjects(), haveDisplaced(), init(), initialSetup(), initXFEM(), jacobianSetup(), mesh(), meshChanged(), outputStep(), possiblyRebuildGeomSearchPatches(), prepareAssembly(), prepareFace(), reinitBecauseOfGhostingOrNewGeomObjects(), reinitDirac(), reinitElem(), reinitElemFaceRef(), reinitElemNeighborAndLowerD(), reinitLowerDElem(), reinitNeighbor(), reinitNeighborFaceRef(), reinitNode(), reinitNodeFace(), reinitNodes(), reinitNodesNeighbor(), reinitOffDiagScalars(), reinitScalars(), resetState(), residualSetup(), restoreSolutions(), setActiveElementalMooseVariables(), setActiveFEVariableCoupleableMatrixTags(), setActiveFEVariableCoupleableVectorTags(), setActiveScalarVariableCoupleableMatrixTags(), setActiveScalarVariableCoupleableVectorTags(), setAuxKernelParamsAndLog(), setCurrentBoundaryID(), setCurrentLowerDElem(), setCurrentlyComputingResidual(), setCurrentSubdomainID(), setResidual(), setResidualNeighbor(), setResidualObjectParamsAndLog(), EigenProblem::solve(), solve(), timestepSetup(), uniformRefine(), and updateGeomSearch().

◆ _dt

Real& FEProblemBase::_dt
protected

Definition at line 2855 of file FEProblemBase.h.

Referenced by dt(), execMultiApps(), and FEProblemBase().

◆ _dt_old

Real& FEProblemBase::_dt_old
protected

Definition at line 2856 of file FEProblemBase.h.

Referenced by dtOld(), and FEProblemBase().

◆ _enabled

const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects.

Definition at line 73 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _error_on_jacobian_nonzero_reallocation

bool FEProblemBase::_error_on_jacobian_nonzero_reallocation
private

Whether to error when the Jacobian is re-allocated, usually because the sparsity pattern changed.

Definition at line 3297 of file FEProblemBase.h.

Referenced by errorOnJacobianNonzeroReallocation(), and setErrorOnJacobianNonzeroReallocation().

◆ _evaluable_local_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_evaluable_local_elem_range
protected

Definition at line 3213 of file FEProblemBase.h.

Referenced by getEvaluableElementRange(), and meshChanged().

◆ _exception_message

std::string FEProblemBase::_exception_message
protected

The error message to go with an exception.

Definition at line 3194 of file FEProblemBase.h.

Referenced by checkExceptionAndStopSolve(), and setException().

◆ _factory

Factory& SubProblem::_factory
protectedinherited

◆ _fail_next_system_convergence_check

bool FEProblemBase::_fail_next_system_convergence_check
private

◆ _fe_matrix_tags

std::set<TagID> FEProblemBase::_fe_matrix_tags
protected

◆ _fe_vector_tags

std::set<TagID> FEProblemBase::_fe_vector_tags
protected

◆ _force_restart

const bool FEProblemBase::_force_restart
private

Definition at line 3308 of file FEProblemBase.h.

Referenced by initialSetup().

◆ _from_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_from_multi_app_transfers
protected

Transfers executed just after MultiApps to transfer data from them.

Definition at line 3013 of file FEProblemBase.h.

Referenced by addTransfer(), execMultiAppTransfers(), getMultiAppTransferWarehouse(), getTransfers(), initialSetup(), and updateActiveObjects().

◆ _functions

MooseObjectWarehouse<Function> FEProblemBase::_functions
protected

◆ _fv_bcs_integrity_check

bool FEProblemBase::_fv_bcs_integrity_check
protected

Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset.

Definition at line 3161 of file FEProblemBase.h.

Referenced by fvBCsIntegrityCheck().

◆ _fv_ics

FVInitialConditionWarehouse FEProblemBase::_fv_ics
protected

◆ _geometric_search_data

GeometricSearchData FEProblemBase::_geometric_search_data
protected

◆ _ghosted_elems

std::set<dof_id_type> SubProblem::_ghosted_elems
protectedinherited

Elements that should have Dofs ghosted to the local processor.

Definition at line 1095 of file SubProblem.h.

Referenced by addGhostedElem(), SubProblem::ghostedElems(), initialSetup(), meshChanged(), possiblyRebuildGeomSearchPatches(), and reinitBecauseOfGhostingOrNewGeomObjects().

◆ _grad_phi_zero

std::vector<VariablePhiGradient> FEProblemBase::_grad_phi_zero

Definition at line 2297 of file FEProblemBase.h.

Referenced by FEProblemBase(), initialSetup(), and ~FEProblemBase().

◆ _grad_zero

std::vector<VariableGradient> FEProblemBase::_grad_zero

Definition at line 2295 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _has_active_elemental_moose_variables

std::vector<unsigned int> SubProblem::_has_active_elemental_moose_variables
protectedinherited

Whether or not there is currently a list of active elemental moose variables.

Definition at line 1081 of file SubProblem.h.

Referenced by SubProblem::clearActiveElementalMooseVariables(), SubProblem::hasActiveElementalMooseVariables(), SubProblem::setActiveElementalMooseVariables(), and SubProblem::SubProblem().

◆ _has_active_material_properties

std::vector<unsigned char> FEProblemBase::_has_active_material_properties
protected

Whether there are active material properties on each thread.

Definition at line 3140 of file FEProblemBase.h.

Referenced by clearActiveMaterialProperties(), FEProblemBase(), hasActiveMaterialProperties(), and setActiveMaterialProperties().

◆ _has_constraints

bool FEProblemBase::_has_constraints
protected

Whether or not this system has any Constraints.

Definition at line 3107 of file FEProblemBase.h.

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

◆ _has_dampers

bool FEProblemBase::_has_dampers
protected

Whether or not this system has any Dampers associated with it.

Definition at line 3104 of file FEProblemBase.h.

Referenced by addDamper(), computeDamping(), computePostCheck(), and hasDampers().

◆ _has_exception

bool FEProblemBase::_has_exception
protected

Whether or not an exception has occurred.

Definition at line 3179 of file FEProblemBase.h.

Referenced by checkExceptionAndStopSolve(), hasException(), and setException().

◆ _has_initialized_stateful

bool FEProblemBase::_has_initialized_stateful
protected

Whether nor not stateful materials have been initialized.

Definition at line 3119 of file FEProblemBase.h.

Referenced by initialSetup(), and meshChanged().

◆ _has_internal_edge_residual_objects

bool FEProblemBase::_has_internal_edge_residual_objects
private

Whether the problem has dgkernels or interface kernels.

Definition at line 3320 of file FEProblemBase.h.

Referenced by addDGKernel(), addInterfaceKernel(), hasNeighborCoupling(), and initialSetup().

◆ _has_jacobian

bool FEProblemBase::_has_jacobian
protected

Indicates if the Jacobian was computed.

Definition at line 3125 of file FEProblemBase.h.

Referenced by computeJacobianTags(), hasJacobian(), and meshChanged().

◆ _has_kokkos_objects

bool FEProblemBase::_has_kokkos_objects = false
private

Whether we have any Kokkos objects.

Definition at line 3386 of file FEProblemBase.h.

Referenced by hasKokkosObjects(), init(), and initElementStatefulProps().

◆ _has_kokkos_residual_objects

bool FEProblemBase::_has_kokkos_residual_objects = false
private

Whether we have any Kokkos residual objects.

Definition at line 3389 of file FEProblemBase.h.

Referenced by hasKokkosResidualObjects().

◆ _has_mortar

bool FEProblemBase::_has_mortar
private

Whether the simulation requires mortar coupling.

Definition at line 3342 of file FEProblemBase.h.

Referenced by createMortarInterface(), and hasMortarCoupling().

◆ _has_nonlocal_coupling

bool FEProblemBase::_has_nonlocal_coupling
protected

Indicates if nonlocal coupling is required/exists.

Definition at line 3134 of file FEProblemBase.h.

Referenced by addJacobian(), addJacobianBlockTags(), hasNonlocalCoupling(), prepareAssembly(), reinitDirac(), reinitElemPhys(), and timestepSetup().

◆ _has_time_integrator

bool FEProblemBase::_has_time_integrator
protected

Indicates whether or not this executioner has a time integrator (during setup)

Definition at line 3176 of file FEProblemBase.h.

Referenced by addTimeIntegrator(), and hasTimeIntegrator().

◆ _have_ad_objects

bool SubProblem::_have_ad_objects
protectedinherited

AD flag indicating whether any AD objects have been added.

Definition at line 1116 of file SubProblem.h.

Referenced by DisplacedProblem::haveADObjects(), SubProblem::haveADObjects(), and haveADObjects().

◆ _have_fv

bool FEProblemBase::_have_fv = false
private

Whether we are performing some calculations with finite volume discretizations.

Definition at line 3372 of file FEProblemBase.h.

Referenced by haveFV(), and needFV().

◆ _ics

InitialConditionWarehouse FEProblemBase::_ics
protected

Initial condition storage

Definition at line 2957 of file FEProblemBase.h.

Referenced by addInitialCondition(), getInitialConditionWarehouse(), and initialSetup().

◆ _identify_variable_groups_in_nl

const bool FEProblemBase::_identify_variable_groups_in_nl
private

Whether to identify variable groups in nonlinear systems. This affects dof ordering.

Definition at line 3364 of file FEProblemBase.h.

Referenced by identifyVariableGroupsInNL().

◆ _ignore_zeros_in_jacobian

bool FEProblemBase::_ignore_zeros_in_jacobian
private

Whether to ignore zeros in the Jacobian, thereby leading to a reduced sparsity pattern.

Definition at line 3304 of file FEProblemBase.h.

Referenced by ignoreZerosInJacobian(), setIgnoreZerosInJacobian(), and setPreserveMatrixSparsityPattern().

◆ _immediately_print_invalid_solution

const bool& FEProblemBase::_immediately_print_invalid_solution
private

Definition at line 3314 of file FEProblemBase.h.

Referenced by immediatelyPrintInvalidSolution().

◆ _indicators

MooseObjectWarehouse<Indicator> FEProblemBase::_indicators
protected

◆ _initialized

bool FEProblemBase::_initialized
protected

Definition at line 2827 of file FEProblemBase.h.

Referenced by init().

◆ _input_file_saved

bool FEProblemBase::_input_file_saved
protected

whether input file has been written

Definition at line 3101 of file FEProblemBase.h.

◆ _interface_mat_side_cache

std::vector<std::unordered_map<BoundaryID, bool> > FEProblemBase::_interface_mat_side_cache
protected

Cache for calculating materials on interface.

Definition at line 3028 of file FEProblemBase.h.

Referenced by FEProblemBase(), and needInterfaceMaterialOnSide().

◆ _interface_materials

MaterialWarehouse FEProblemBase::_interface_materials
protected

◆ _internal_side_indicators

MooseObjectWarehouse<InternalSideIndicatorBase> FEProblemBase::_internal_side_indicators
protected

◆ _is_petsc_options_inserted

bool FEProblemBase::_is_petsc_options_inserted
protected

If or not PETSc options have been added to database.

Definition at line 3209 of file FEProblemBase.h.

Referenced by FEProblemBase(), petscOptionsInserted(), solve(), and solveLinearSystem().

◆ _kernel_coverage_blocks

std::vector<SubdomainName> FEProblemBase::_kernel_coverage_blocks
protected

Definition at line 3146 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), and FEProblemBase().

◆ _kernel_coverage_check

CoverageCheckMode FEProblemBase::_kernel_coverage_check
protected

Determines whether and which subdomains are to be checked to ensure that they have an active kernel.

Definition at line 3145 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), FEProblemBase(), and setKernelCoverageCheck().

◆ _kokkos_assembly

Moose::Kokkos::Assembly FEProblemBase::_kokkos_assembly
protected

Definition at line 2931 of file FEProblemBase.h.

Referenced by kokkosAssembly().

◆ _kokkos_bnd_material_props

Moose::Kokkos::MaterialPropertyStorage& FEProblemBase::_kokkos_bnd_material_props
protected

◆ _kokkos_functions

MooseObjectWarehouse<Moose::FunctionBase> FEProblemBase::_kokkos_functions
protected

◆ _kokkos_material_props

Moose::Kokkos::MaterialPropertyStorage& FEProblemBase::_kokkos_material_props
protected

Definition at line 2969 of file FEProblemBase.h.

Referenced by advanceState(), getKokkosMaterialPropertyStorage(), and initialSetup().

◆ _kokkos_materials

MaterialWarehouse FEProblemBase::_kokkos_materials
protected

◆ _kokkos_neighbor_material_props

Moose::Kokkos::MaterialPropertyStorage& FEProblemBase::_kokkos_neighbor_material_props
protected

◆ _kokkos_systems

Moose::Kokkos::Array<Moose::Kokkos::System> FEProblemBase::_kokkos_systems
protected

Definition at line 2920 of file FEProblemBase.h.

Referenced by getKokkosSystems().

◆ _line_search

std::shared_ptr<LineSearch> FEProblemBase::_line_search
protected

◆ _linear_convergence_names

std::optional<std::vector<ConvergenceName> > FEProblemBase::_linear_convergence_names
protected

Linear system(s) convergence name(s) (if any)

Definition at line 2832 of file FEProblemBase.h.

Referenced by getLinearConvergenceNames(), hasLinearConvergenceObjects(), and setLinearConvergenceNames().

◆ _linear_matrix_tags

std::set<TagID> FEProblemBase::_linear_matrix_tags
protected

Temporary storage for filtered matrix tags for linear systems.

Definition at line 2846 of file FEProblemBase.h.

Referenced by computeLinearSystemSys().

◆ _linear_sys_name_to_num

std::map<LinearSystemName, unsigned int> FEProblemBase::_linear_sys_name_to_num
protected

Map from linear system name to number.

Definition at line 2875 of file FEProblemBase.h.

Referenced by FEProblemBase(), and linearSysNum().

◆ _linear_sys_names

const std::vector<LinearSystemName> FEProblemBase::_linear_sys_names
protected

◆ _linear_systems

std::vector<std::shared_ptr<LinearSystem> > FEProblemBase::_linear_systems
protected

◆ _linear_vector_tags

std::set<TagID> FEProblemBase::_linear_vector_tags
protected

Temporary storage for filtered vector tags for linear systems.

Definition at line 2843 of file FEProblemBase.h.

Referenced by computeLinearSystemSys().

◆ _map_block_material_props

std::map<SubdomainID, std::set<std::string> > SubProblem::_map_block_material_props
protectedinherited

Map of material properties (block_id -> list of properties)

Definition at line 1054 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 1072 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 1057 of file SubProblem.h.

Referenced by SubProblem::checkBoundaryMatProps(), SubProblem::getMaterialPropertyBoundaryIDs(), SubProblem::hasBoundaryMaterialProperty(), and SubProblem::storeBoundaryMatPropName().

◆ _map_boundary_material_props_check

std::map<BoundaryID, std::multimap<std::string, std::string> > SubProblem::_map_boundary_material_props_check
protectedinherited

◆ _markers

MooseObjectWarehouse<Marker> FEProblemBase::_markers
protected

◆ _material_coverage_blocks

std::vector<SubdomainName> FEProblemBase::_material_coverage_blocks
protected

Definition at line 3158 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), and FEProblemBase().

◆ _material_coverage_check

CoverageCheckMode FEProblemBase::_material_coverage_check
protected

Determines whether and which subdomains are to be checked to ensure that they have an active material.

Definition at line 3157 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), FEProblemBase(), and setMaterialCoverageCheck().

◆ _material_dependency_check

const bool FEProblemBase::_material_dependency_check
protected

Determines whether a check to verify material dependencies on every subdomain.

Definition at line 3164 of file FEProblemBase.h.

Referenced by checkProblemIntegrity().

◆ _material_prop_registry

MaterialPropertyRegistry FEProblemBase::_material_prop_registry
protected

Definition at line 2963 of file FEProblemBase.h.

Referenced by checkDependMaterialsHelper(), and getMaterialPropertyRegistry().

◆ _material_property_requested

std::set<std::string> SubProblem::_material_property_requested
protectedinherited

set containing all material property names that have been requested by getMaterialProperty*

Definition at line 1064 of file SubProblem.h.

Referenced by SubProblem::isMatPropRequested(), and SubProblem::markMatPropRequested().

◆ _material_props

MaterialPropertyStorage& FEProblemBase::_material_props
protected

◆ _materials

MaterialWarehouse FEProblemBase::_materials
protected

◆ _matrix_tag_id_to_tag_name

std::map<TagID, TagName> SubProblem::_matrix_tag_id_to_tag_name
protectedinherited

Reverse map.

Definition at line 1046 of file SubProblem.h.

Referenced by SubProblem::addMatrixTag(), SubProblem::matrixTagExists(), and SubProblem::matrixTagName().

◆ _matrix_tag_name_to_tag_id

std::map<TagName, TagID> SubProblem::_matrix_tag_name_to_tag_id
protectedinherited

◆ _max_qps

unsigned int FEProblemBase::_max_qps
protected

Maximum number of quadrature points used in the problem.

Definition at line 3170 of file FEProblemBase.h.

Referenced by getMaxQps(), reinitDirac(), and updateMaxQps().

◆ _max_scalar_order

libMesh::Order FEProblemBase::_max_scalar_order
protected

Maximum scalar variable order.

Definition at line 3173 of file FEProblemBase.h.

Referenced by addAuxScalarVariable(), and getMaxScalarOrder().

◆ _mesh

MooseMesh& FEProblemBase::_mesh
protected

◆ _mesh_divisions

MooseObjectWarehouse<MeshDivision> FEProblemBase::_mesh_divisions
protected

Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the Problem Time (and people's uses) will tell where this fits best.

Definition at line 2937 of file FEProblemBase.h.

Referenced by addMeshDivision(), and getMeshDivision().

◆ _mortar_data

std::unique_ptr<MortarInterfaceWarehouse> FEProblemBase::_mortar_data
protected

◆ _multi_apps

ExecuteMooseObjectWarehouse<MultiApp> FEProblemBase::_multi_apps
protected

◆ _multiapp_fixed_point_convergence_name

std::optional<ConvergenceName> FEProblemBase::_multiapp_fixed_point_convergence_name
protected

◆ _name

const std::string& MooseBase::_name
protectedinherited

The name of this class.

Definition at line 363 of file MooseBase.h.

Referenced by AddBCAction::act(), AddConstraintAction::act(), AddDamperAction::act(), AddFVInitialConditionAction::act(), AddNodalKernelAction::act(), AddFVInterfaceKernelAction::act(), AddDGKernelAction::act(), AddPostprocessorAction::act(), AddScalarKernelAction::act(), AddDiracKernelAction::act(), AddIndicatorAction::act(), AddInitialConditionAction::act(), AddTransferAction::act(), AddUserObjectAction::act(), AddInterfaceKernelAction::act(), AddVectorPostprocessorAction::act(), AddKernelAction::act(), PartitionerAction::act(), ReadExecutorParamsAction::act(), AddFunctorMaterialAction::act(), AddMarkerAction::act(), AddMaterialAction::act(), AddMeshGeneratorAction::act(), AddMultiAppAction::act(), AddPositionsAction::act(), AddReporterAction::act(), AddTimesAction::act(), AddFieldSplitAction::act(), AddFVKernelAction::act(), AddFVBCAction::act(), AddHDGKernelAction::act(), AddTimeStepperAction::act(), AddDistributionAction::act(), SetupPreconditionerAction::act(), SetupTimeIntegratorAction::act(), AddFunctionAction::act(), AddConvergenceAction::act(), AddMeshDivisionAction::act(), AddOutputAction::act(), AddLinearFVBCAction::act(), AddLinearFVKernelAction::act(), AddCorrectorAction::act(), AddMeshModifiersAction::act(), AddSamplerAction::act(), AddControlAction::act(), AddMFEMFESpaceAction::act(), AddMFEMSolverAction::act(), AddMFEMSubMeshAction::act(), AddMFEMPreconditionerAction::act(), AddPeriodicBCAction::act(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), PiecewiseLinearBase::buildInterpolation(), CombinerGenerator::CombinerGenerator(), Executor::Executor(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), FunctionDT::FunctionDT(), FillBetweenPointVectorsGenerator::generate(), FillBetweenSidesetsGenerator::generate(), FillBetweenCurvesGenerator::generate(), MooseBase::MooseBase(), 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
protected

Flag that the problem needs to add the default fixed point convergence.

Definition at line 2861 of file FEProblemBase.h.

Referenced by needToAddDefaultMultiAppFixedPointConvergence(), and setNeedToAddDefaultMultiAppFixedPointConvergence().

◆ _need_to_add_default_nonlinear_convergence

bool FEProblemBase::_need_to_add_default_nonlinear_convergence
protected

Flag that the problem needs to add the default nonlinear convergence.

Definition at line 2859 of file FEProblemBase.h.

Referenced by needToAddDefaultNonlinearConvergence(), and setNeedToAddDefaultNonlinearConvergence().

◆ _need_to_add_default_steady_state_convergence

bool FEProblemBase::_need_to_add_default_steady_state_convergence
protected

Flag that the problem needs to add the default steady convergence.

Definition at line 2863 of file FEProblemBase.h.

Referenced by needToAddDefaultSteadyStateConvergence(), and setNeedToAddDefaultSteadyStateConvergence().

◆ _needs_old_newton_iter

bool FEProblemBase::_needs_old_newton_iter
protected

Indicates that we need to compute variable values for previous Newton iteration.

Definition at line 3128 of file FEProblemBase.h.

◆ _neighbor_material_props

MaterialPropertyStorage& FEProblemBase::_neighbor_material_props
protected

◆ _nl

std::vector<std::shared_ptr<NonlinearSystemBase> > FEProblemBase::_nl
protected

◆ _nl_evaluable_local_elem_range

std::unique_ptr<libMesh::ConstElemRange> FEProblemBase::_nl_evaluable_local_elem_range
protected

Definition at line 3214 of file FEProblemBase.h.

Referenced by getNonlinearEvaluableElementRange(), and meshChanged().

◆ _nl_sys_name_to_num

std::map<NonlinearSystemName, unsigned int> FEProblemBase::_nl_sys_name_to_num
protected

Map from nonlinear system name to number.

Definition at line 2893 of file FEProblemBase.h.

Referenced by FEProblemBase(), and nlSysNum().

◆ _nl_sys_names

const std::vector<NonlinearSystemName> FEProblemBase::_nl_sys_names
protected

◆ _nonlinear_convergence_names

std::optional<std::vector<ConvergenceName> > FEProblemBase::_nonlinear_convergence_names
protected

Nonlinear system(s) convergence name(s)

Definition at line 2830 of file FEProblemBase.h.

Referenced by getNonlinearConvergenceNames(), and setNonlinearConvergenceNames().

◆ _nonlocal_cm

std::vector<libMesh::CouplingMatrix> FEProblemBase::_nonlocal_cm
private

nonlocal coupling matrix

Definition at line 3379 of file FEProblemBase.h.

Referenced by addJacobianBlockTags(), FEProblemBase(), nonlocalCouplingMatrix(), and setNonlocalCouplingMatrix().

◆ _nonlocal_integrated_bcs

MooseObjectWarehouse<IntegratedBCBase> FEProblemBase::_nonlocal_integrated_bcs
protected

nonlocal integrated_bcs

Definition at line 2953 of file FEProblemBase.h.

Referenced by checkNonlocalCoupling(), setNonlocalCouplingMatrix(), and timestepSetup().

◆ _nonlocal_kernels

MooseObjectWarehouse<KernelBase> FEProblemBase::_nonlocal_kernels
protected

nonlocal kernels

Definition at line 2950 of file FEProblemBase.h.

Referenced by checkNonlocalCoupling(), setNonlocalCouplingMatrix(), and timestepSetup().

◆ _not_zeroed_tagged_vectors

std::unordered_set<TagID> SubProblem::_not_zeroed_tagged_vectors
protectedinherited

the list of vector tags that will not be zeroed when all other tags are

Definition at line 1119 of file SubProblem.h.

Referenced by SubProblem::addNotZeroedVectorTag(), restoreSolutions(), and SubProblem::vectorTagNotZeroed().

◆ _notify_when_mesh_changes

std::vector<MeshChangedInterface *> FEProblemBase::_notify_when_mesh_changes
protected

Objects to be notified when the mesh changes.

Definition at line 3031 of file FEProblemBase.h.

Referenced by meshChanged(), and notifyWhenMeshChanges().

◆ _notify_when_mesh_displaces

std::vector<MeshDisplacedInterface *> FEProblemBase::_notify_when_mesh_displaces
protected

Objects to be notified when the mesh displaces.

Definition at line 3034 of file FEProblemBase.h.

Referenced by meshDisplaced(), and notifyWhenMeshDisplaces().

◆ _num_grid_steps

unsigned int FEProblemBase::_num_grid_steps
private

Number of steps in a grid sequence.

Definition at line 3345 of file FEProblemBase.h.

Referenced by addAnyRedistributers(), checkProblemIntegrity(), initialSetup(), numGridSteps(), and timestepSetup().

◆ _num_linear_sys

const std::size_t FEProblemBase::_num_linear_sys
protected

The number of linear systems.

Definition at line 2869 of file FEProblemBase.h.

Referenced by FEProblem::FEProblem(), FEProblemBase(), numLinearSystems(), and numSolverSystems().

◆ _num_nl_sys

const std::size_t FEProblemBase::_num_nl_sys
protected

◆ _parallel_barrier_messaging

bool FEProblemBase::_parallel_barrier_messaging
protected

Whether or not information about how many transfers have completed is printed.

Definition at line 3182 of file FEProblemBase.h.

Referenced by backupMultiApps(), execMultiApps(), execMultiAppTransfers(), finishMultiAppStep(), restoreMultiApps(), and setParallelBarrierMessaging().

◆ _pars

const InputParameters& MooseBase::_pars
protectedinherited

The object's parameters.

Definition at line 366 of file MooseBase.h.

Referenced by AddFVICAction::act(), AddICAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupMeshAction::act(), ComposeTimeStepperAction::act(), SetupDebugAction::act(), AddAuxKernelAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), FunctorMaterial::addFunctorPropertyByBlocks(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), PNGOutput::calculateRescalingValues(), MooseBase::callMooseError(), MooseBase::connectControllableParams(), Console::Console(), MooseApp::copyInputs(), MaterialBase::declareADProperty(), MaterialBase::declareProperty(), FEProblemSolve::FEProblemSolve(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), FileMeshGenerator::generate(), MooseBase::getBase(), MooseBase::getCheckedPointerParam(), MaterialBase::getGenericZeroMaterialProperty(), MooseBase::getHitNode(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBase::getParam(), MooseBase::hasBase(), MeshGenerator::hasGenerateCSG(), MeshGenerator::hasGenerateData(), AddVariableAction::init(), AdvancedOutput::initExecutionTypes(), Console::initialSetup(), MooseBase::isParamSetByUser(), MooseBase::isParamValid(), MultiApp::keepSolutionDuringRestore(), MooseBase::messagePrefix(), MooseBase::MooseBase(), MooseApp::outputMachineReadableData(), MooseBase::paramError(), MooseBase::parameters(), MooseBase::paramInfo(), MooseBase::paramWarning(), MooseMesh::prepare(), Eigenvalue::prepareSolverOptions(), MooseMesh::setCoordSystem(), MooseMesh::setPartitionerHelper(), SetupMeshAction::setupMesh(), TransientBase::setupTimeIntegrator(), MooseApp::showInputs(), and MooseBase::uniqueName().

◆ _petsc_option_data_base

PetscOptions FEProblemBase::_petsc_option_data_base
protected

◆ _petsc_options

Moose::PetscSupport::PetscOptions FEProblemBase::_petsc_options
protected

PETSc option storage.

Definition at line 3203 of file FEProblemBase.h.

Referenced by getPetscOptions(), solve(), and solveLinearSystem().

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 124 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::perfGraph().

◆ _phi_zero

std::vector<VariablePhiValue> FEProblemBase::_phi_zero

Definition at line 2293 of file FEProblemBase.h.

Referenced by FEProblemBase(), initialSetup(), and ~FEProblemBase().

◆ _point_zero

std::vector<Point> FEProblemBase::_point_zero

Definition at line 2301 of file FEProblemBase.h.

Referenced by 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().

◆ _preserve_matrix_sparsity_pattern

bool FEProblemBase::_preserve_matrix_sparsity_pattern
private

Whether to preserve the system matrix / Jacobian sparsity pattern, using 0-valued entries usually.

Definition at line 3306 of file FEProblemBase.h.

Referenced by preserveMatrixSparsityPattern(), and setPreserveMatrixSparsityPattern().

◆ _previous_nl_solution_required

bool FEProblemBase::_previous_nl_solution_required
protected

Indicates we need to save the previous NL iteration variable values.

Definition at line 3131 of file FEProblemBase.h.

Referenced by createTagSolutions().

◆ _print_execution_on

ExecFlagEnum FEProblemBase::_print_execution_on
private

When to print the execution of loops.

Definition at line 3361 of file FEProblemBase.h.

Referenced by setExecutionPrinting(), and shouldPrintExecution().

◆ _random_data_objects

std::map<std::string, std::unique_ptr<RandomData> > FEProblemBase::_random_data_objects
protected

◆ _real_zero

std::vector<Real> FEProblemBase::_real_zero

Convenience zeros.

Definition at line 2290 of file FEProblemBase.h.

Referenced by FEProblemBase().

◆ _regard_general_exceptions_as_errors

const bool FEProblemBase::_regard_general_exceptions_as_errors
private

If we catch an exception during residual/Jacobian evaluaton for which we don't have specific handling, immediately error instead of allowing the time step to be cut.

Definition at line 3376 of file FEProblemBase.h.

Referenced by handleException().

◆ _reinit_displaced_elem

bool FEProblemBase::_reinit_displaced_elem
protected

◆ _reinit_displaced_face

bool FEProblemBase::_reinit_displaced_face
protected

◆ _reinit_displaced_neighbor

bool FEProblemBase::_reinit_displaced_neighbor
protected

◆ _reporter_data

ReporterData FEProblemBase::_reporter_data
protected

◆ _req

The EquationSystems object, wrapped for restart.

Definition at line 2789 of file FEProblemBase.h.

Referenced by es(), getRestartableEquationSystems(), and initialSetup().

◆ _requires_nonlocal_coupling

bool FEProblemBase::_requires_nonlocal_coupling
private

nonlocal coupling requirement flag

Definition at line 3382 of file FEProblemBase.h.

Referenced by checkNonlocalCoupling(), checkNonlocalCouplingRequirement(), initialSetup(), and timestepSetup().

◆ _restartable_app

MooseApp& Restartable::_restartable_app
protectedinherited

Reference to the application.

Definition at line 234 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp(), and Restartable::registerRestartableNameWithFilterOnApp().

◆ _restartable_read_only

const bool Restartable::_restartable_read_only
protectedinherited

Flag for toggling read only status (see ReporterData)

Definition at line 243 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp().

◆ _restartable_system_name

const std::string Restartable::_restartable_system_name
protectedinherited

The system name this object is in.

Definition at line 237 of file Restartable.h.

Referenced by Restartable::restartableName().

◆ _restartable_tid

const THREAD_ID Restartable::_restartable_tid
protectedinherited

The thread ID for this object.

Definition at line 240 of file Restartable.h.

Referenced by Restartable::declareRestartableDataHelper().

◆ _restore_original_nonzero_pattern

const bool FEProblemBase::_restore_original_nonzero_pattern
private

Whether we should restore the original nonzero pattern for every Jacobian evaluation.

This option is useful if the sparsity pattern is constantly changing and you are using hash table assembly or if you wish to continually restore the matrix to the originally preallocated sparsity pattern computed by relationship managers.

Definition at line 3302 of file FEProblemBase.h.

Referenced by computeJacobianTags(), and restoreOriginalNonzeroPattern().

◆ _safe_access_tagged_matrices

bool SubProblem::_safe_access_tagged_matrices
protectedinherited

Is it safe to retrieve data from tagged matrices.

Definition at line 1110 of file SubProblem.h.

Referenced by computeJacobianTags(), computeLinearSystemTags(), computeResidualAndJacobian(), resetState(), and SubProblem::safeAccessTaggedMatrices().

◆ _safe_access_tagged_vectors

bool SubProblem::_safe_access_tagged_vectors
protectedinherited

Is it safe to retrieve data from tagged vectors.

Definition at line 1113 of file SubProblem.h.

Referenced by computeLinearSystemTags(), computeResidualAndJacobian(), computeResidualTags(), resetState(), and SubProblem::safeAccessTaggedVectors().

◆ _scalar_ics

ScalarInitialConditionWarehouse FEProblemBase::_scalar_ics
protected

◆ _scalar_zero

std::vector<VariableValue> FEProblemBase::_scalar_zero

Definition at line 2291 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _second_phi_zero

std::vector<VariablePhiSecond> FEProblemBase::_second_phi_zero

Definition at line 2300 of file FEProblemBase.h.

Referenced by FEProblemBase(), initialSetup(), and ~FEProblemBase().

◆ _second_zero

std::vector<VariableSecond> FEProblemBase::_second_zero

Definition at line 2298 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _show_invalid_solution_console

const bool FEProblemBase::_show_invalid_solution_console
private

Definition at line 3313 of file FEProblemBase.h.

Referenced by showInvalidSolutionConsole().

◆ _skip_exception_check

bool FEProblemBase::_skip_exception_check
protected

If or not skip 'exception and stop solve'.

Definition at line 3113 of file FEProblemBase.h.

Referenced by checkExceptionAndStopSolve(), initialSetup(), and skipExceptionCheck().

◆ _skip_nl_system_check

const bool FEProblemBase::_skip_nl_system_check
private

Definition at line 3310 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), and init().

◆ _snesmf_reuse_base

bool FEProblemBase::_snesmf_reuse_base
protected

If or not to resuse the base vector for matrix-free calculation.

Definition at line 3110 of file FEProblemBase.h.

Referenced by setSNESMFReuseBase(), and useSNESMFReuseBase().

◆ _snesmf_reuse_base_set_by_user

bool FEProblemBase::_snesmf_reuse_base_set_by_user
protected

If or not _snesmf_reuse_base is set by user.

Definition at line 3116 of file FEProblemBase.h.

Referenced by isSNESMFReuseBaseSetbyUser(), and setSNESMFReuseBase().

◆ _solve

const bool& FEProblemBase::_solve
protected

Whether or not to actually solve the nonlinear system.

Definition at line 2849 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), FEProblemBase(), init(), shouldSolve(), EigenProblem::solve(), solve(), solveLinearSystem(), EigenProblem::solverSystemConverged(), and solverSystemConverged().

◆ _solver_params

std::vector<SolverParams> FEProblemBase::_solver_params
protected

Definition at line 3142 of file FEProblemBase.h.

Referenced by FEProblemBase(), solve(), solveLinearSystem(), and solverParams().

◆ _solver_sys_name_to_num

std::map<SolverSystemName, unsigned int> FEProblemBase::_solver_sys_name_to_num
protected

Map connecting solver system names with their respective systems.

Definition at line 2908 of file FEProblemBase.h.

Referenced by FEProblemBase(), and solverSysNum().

◆ _solver_sys_names

std::vector<SolverSystemName> FEProblemBase::_solver_sys_names
protected

The union of nonlinear and linear system names.

Definition at line 2911 of file FEProblemBase.h.

Referenced by FEProblemBase(), getSolverSystemNames(), getSystemBase(), Moose::PetscSupport::setSinglePetscOption(), and solverSysNum().

◆ _solver_systems

std::vector<std::shared_ptr<SolverSystem> > FEProblemBase::_solver_systems
protected

◆ _solver_var_to_sys_num

std::map<SolverVariableName, unsigned int> FEProblemBase::_solver_var_to_sys_num
protected

Map connecting variable names with their respective solver systems.

Definition at line 2905 of file FEProblemBase.h.

Referenced by addVariable(), and determineSolverSystem().

◆ _started_initial_setup

bool FEProblemBase::_started_initial_setup
private

At or beyond initialSteup stage.

Definition at line 3317 of file FEProblemBase.h.

Referenced by initialSetup(), and startedInitialSetup().

◆ _steady_state_convergence_name

std::optional<ConvergenceName> FEProblemBase::_steady_state_convergence_name
protected

Steady-state detection convergence name.

Definition at line 2836 of file FEProblemBase.h.

Referenced by getSteadyStateConvergenceName(), hasSetSteadyStateConvergenceName(), and setSteadyStateConvergenceName().

◆ _subspace_dim

std::map<std::string, unsigned int> FEProblemBase::_subspace_dim
protected

Dimension of the subspace spanned by the vectors with a given prefix.

Definition at line 2924 of file FEProblemBase.h.

Referenced by initNullSpaceVectors(), and subspaceDim().

◆ _t_step

int& FEProblemBase::_t_step
protected

Definition at line 2854 of file FEProblemBase.h.

Referenced by FEProblemBase(), timeStep(), and timestepSetup().

◆ _termination_requested

bool Problem::_termination_requested
protectedinherited

True if termination of the solve has been requested.

Definition at line 58 of file Problem.h.

Referenced by Problem::isSolveTerminationRequested(), and Problem::terminateSolve().

◆ _time

Real& FEProblemBase::_time
protected

◆ _time_old

Real& FEProblemBase::_time_old
protected

Definition at line 2853 of file FEProblemBase.h.

Referenced by FEProblemBase(), initialSetup(), and timeOld().

◆ _to_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_to_multi_app_transfers
protected

Transfers executed just before MultiApps to transfer data to them.

Definition at line 3010 of file FEProblemBase.h.

Referenced by addTransfer(), execMultiAppTransfers(), getMultiAppTransferWarehouse(), getTransfers(), initialSetup(), and updateActiveObjects().

◆ _transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_transfers
protected

Normal Transfers.

Definition at line 3007 of file FEProblemBase.h.

Referenced by addTransfer(), execTransfers(), initialSetup(), and updateActiveObjects().

◆ _transient

bool FEProblemBase::_transient
protected

Definition at line 2851 of file FEProblemBase.h.

Referenced by isTransient(), and transient().

◆ _transient_multi_apps

ExecuteMooseObjectWarehouse<TransientMultiApp> FEProblemBase::_transient_multi_apps
protected

Storage for TransientMultiApps (only needed for calling 'computeDT')

Definition at line 3004 of file FEProblemBase.h.

Referenced by addMultiApp(), computeMultiAppsDT(), and updateActiveObjects().

◆ _trust_user_coupling_matrix

bool FEProblemBase::_trust_user_coupling_matrix = false
private

Whether to trust the user coupling matrix no matter what.

See https://github.com/idaholab/moose/issues/16395 for detailed background

Definition at line 3349 of file FEProblemBase.h.

Referenced by setCoupling(), and trustUserCouplingMatrix().

◆ _type

const std::string& MooseBase::_type
protectedinherited

◆ _u_dot_old_requested

bool FEProblemBase::_u_dot_old_requested
private

Whether old solution time derivative needs to be stored.

Definition at line 3329 of file FEProblemBase.h.

Referenced by setUDotOldRequested(), and uDotOldRequested().

◆ _u_dot_requested

bool FEProblemBase::_u_dot_requested
private

Whether solution time derivative needs to be stored.

Definition at line 3323 of file FEProblemBase.h.

Referenced by setUDotRequested(), uDotOldRequested(), and uDotRequested().

◆ _u_dotdot_old_requested

bool FEProblemBase::_u_dotdot_old_requested
private

Whether old solution second time derivative needs to be stored.

Definition at line 3332 of file FEProblemBase.h.

Referenced by setUDotDotOldRequested(), and uDotDotOldRequested().

◆ _u_dotdot_requested

bool FEProblemBase::_u_dotdot_requested
private

Whether solution second time derivative needs to be stored.

Definition at line 3326 of file FEProblemBase.h.

Referenced by setUDotDotRequested(), uDotDotOldRequested(), and uDotDotRequested().

◆ _uo_aux_state_check

const bool FEProblemBase::_uo_aux_state_check
protected

Whether or not checking the state of uo/aux evaluation.

Definition at line 3167 of file FEProblemBase.h.

Referenced by execute(), and hasUOAuxStateCheck().

◆ _uo_jacobian_moose_vars

std::vector<std::vector<const MooseVariableFEBase *> > FEProblemBase::_uo_jacobian_moose_vars
protected

◆ _use_hash_table_matrix_assembly

const bool FEProblemBase::_use_hash_table_matrix_assembly
protected

Whether to assemble matrices using hash tables instead of preallocating matrix memory.

This can be a good option if the sparsity pattern changes throughout the course of the simulation

Definition at line 3230 of file FEProblemBase.h.

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

◆ _using_ad_mat_props

bool FEProblemBase::_using_ad_mat_props
protected

Automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material property or whether any suppier has declared an AD material property.

Definition at line 3223 of file FEProblemBase.h.

◆ _using_default_nl

const bool FEProblemBase::_using_default_nl
protected

Boolean to check if we have the default nonlinear system.

Definition at line 2881 of file FEProblemBase.h.

◆ _var_dof_map

std::map<std::string, std::vector<dof_id_type> > SubProblem::_var_dof_map
inherited

◆ _vector_curl_zero

std::vector<VectorVariableCurl> FEProblemBase::_vector_curl_zero

Definition at line 2303 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _vector_zero

std::vector<VectorVariableValue> FEProblemBase::_vector_zero

Definition at line 2302 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _verbose_multiapps

bool FEProblemBase::_verbose_multiapps
protected

Whether or not to be verbose with multiapps.

Definition at line 3188 of file FEProblemBase.h.

Referenced by backupMultiApps(), execMultiApps(), execMultiAppTransfers(), finishMultiAppStep(), restoreMultiApps(), setVerboseProblem(), and verboseMultiApps().

◆ _verbose_restore

bool FEProblemBase::_verbose_restore
protected

Whether or not to be verbose on solution restoration post a failed time step.

Definition at line 3191 of file FEProblemBase.h.

Referenced by restoreSolutions(), and setVerboseProblem().

◆ _verbose_setup

MooseEnum FEProblemBase::_verbose_setup
protected

Whether or not to be verbose during setup.

Definition at line 3185 of file FEProblemBase.h.

Referenced by logAdd(), and setVerboseProblem().

◆ _xfem

std::shared_ptr<XFEMInterface> FEProblemBase::_xfem
protected

Pointer to XFEM controller.

Definition at line 3085 of file FEProblemBase.h.

Referenced by getXFEM(), haveXFEM(), initXFEM(), and updateMeshXFEM().

◆ _zero

std::vector<VariableValue> FEProblemBase::_zero

Definition at line 2292 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _zero_block_material_props

std::map<SubdomainID, std::set<MaterialPropertyName> > SubProblem::_zero_block_material_props
protectedinherited

Set of properties returned as zero properties.

Definition at line 1060 of file SubProblem.h.

Referenced by SubProblem::checkBlockMatProps(), checkDependMaterialsHelper(), and SubProblem::storeSubdomainZeroMatProp().

◆ _zero_boundary_material_props

std::map<BoundaryID, std::set<MaterialPropertyName> > SubProblem::_zero_boundary_material_props
protectedinherited

◆ app_param

const std::string MooseBase::app_param = "_moose_app"
staticinherited

◆ kokkos_object_param

const std::string MooseBase::kokkos_object_param = "_kokkos_object"
staticinherited

The name of the parameter that indicates an object is a Kokkos functor.

Definition at line 64 of file MooseBase.h.

Referenced by AddBCAction::act(), AddKernelAction::act(), AddMaterialAction::act(), AddNodalKernelAction::act(), AddFunctionAction::act(), MooseObject::isKokkosObject(), and MooseApp::setupOptions().

◆ moose_base_param

const std::string MooseBase::moose_base_param = "_moose_base"
staticinherited

The name of the parameter that contains the moose system base.

Definition at line 61 of file MooseBase.h.

Referenced by InputParameters::getBase(), InputParameters::hasBase(), and InputParameters::registerBase().

◆ name_param

const std::string MooseBase::name_param = "_object_name"
staticinherited

◆ type_param

const std::string MooseBase::type_param = "_type"
staticinherited

◆ unique_name_param

const std::string MooseBase::unique_name_param = "_unique_name"
staticinherited

The name of the parameter that contains the unique object name.

Definition at line 57 of file MooseBase.h.

Referenced by InputParameterWarehouse::addInputParameters(), AppFactory::create(), InputParameterWarehouse::removeInputParameters(), MooseBase::uniqueName(), and MooseBase::validParams().

◆ usingCombinedWarningSolutionWarnings

MooseObject::usingCombinedWarningSolutionWarnings
inherited

Definition at line 69 of file MooseObject.h.


The documentation for this class was generated from the following files: