www.mooseframework.org
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
FEProblemBase Class Reference

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

#include <FEProblemBase.h>

Inheritance diagram for FEProblemBase:
[legend]

Classes

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

Public Member Functions

 FEProblemBase (const InputParameters &parameters)
 
virtual ~FEProblemBase ()
 
virtual EquationSystems & es () 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 ()
 
void setCouplingMatrix (std::unique_ptr< CouplingMatrix > cm, const unsigned int nl_sys_num)
 Set custom coupling matrix. More...
 
void setCouplingMatrix (CouplingMatrix *cm, const unsigned int nl_sys_num)
 
const CouplingMatrix * couplingMatrix (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 MooseNonlinearConvergenceReason checkNonlinearConvergence (std::string &msg, const PetscInt it, const Real xnorm, const Real snorm, const Real fnorm, const Real rtol, const Real divtol, const Real stol, const Real abstol, const PetscInt nfuncs, const PetscInt max_funcs, const Real initial_residual_before_preset_bcs, const Real div_threshold)
 Check for convergence of the nonlinear solution. More...
 
virtual void nonlinearConvergenceSetup ()
 Perform steps required before checking nonlinear convergence. More...
 
virtual bool checkRelativeConvergence (const PetscInt it, const Real fnorm, const Real the_residual, const Real rtol, const Real abstol, std::ostringstream &oss)
 Check the relative convergence of the nonlinear solution. More...
 
virtual bool hasVariable (const std::string &var_name) const override
 Whether or not this problem has the variable. More...
 
virtual const MooseVariableFieldBasegetVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const 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 System & getSystem (const std::string &var_name) override
 Returns the equation system containing the variable provided. More...
 
virtual void setActiveElementalMooseVariables (const std::set< MooseVariableFEBase *> &moose_vars, const THREAD_ID tid) override
 Set the MOOSE variables to be reinited on each element. More...
 
virtual void clearActiveElementalMooseVariables (const THREAD_ID tid) override
 Clear the active elemental MooseVariableFEBase. More...
 
virtual void clearActiveFEVariableCoupleableMatrixTags (const THREAD_ID tid) override
 
virtual void clearActiveFEVariableCoupleableVectorTags (const THREAD_ID tid) override
 
virtual void setActiveFEVariableCoupleableVectorTags (std::set< TagID > &vtags, const THREAD_ID tid) override
 
virtual void setActiveFEVariableCoupleableMatrixTags (std::set< TagID > &mtags, const THREAD_ID tid) override
 
virtual void clearActiveScalarVariableCoupleableMatrixTags (const THREAD_ID tid) override
 
virtual void clearActiveScalarVariableCoupleableVectorTags (const THREAD_ID tid) override
 
virtual void setActiveScalarVariableCoupleableVectorTags (std::set< TagID > &vtags, const THREAD_ID tid) override
 
virtual void setActiveScalarVariableCoupleableMatrixTags (std::set< TagID > &mtags, const THREAD_ID tid) override
 
virtual void createQRules (QuadratureType type, Order order, Order volume_order=INVALID_ORDER, Order face_order=INVALID_ORDER, SubdomainID block=Moose::ANY_BLOCK_ID, bool allow_negative_qweights=true)
 
void bumpVolumeQRuleOrder (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 (Order order, SubdomainID block)
 
unsigned int getMaxQps () const
 
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
 
Assemblyassembly (const THREAD_ID tid, const unsigned int nl_sys_num) override
 
const Assemblyassembly (const THREAD_ID tid, const unsigned int nl_sys_num) const override
 
virtual std::vector< VariableName > getVariableNames ()
 Returns a list of all the variables in the problem (both from the NL and Aux systems. More...
 
void initialSetup () override
 
void checkDuplicatePostprocessorVariableNames ()
 
void timestepSetup () override
 
void customSetup (const ExecFlagType &exec_type) override
 
void residualSetup () override
 
void jacobianSetup () override
 
virtual void prepare (const Elem *elem, const THREAD_ID tid) override
 
virtual void 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
 
virtual void reinitElemFace (const Elem *elem, unsigned int side, BoundaryID bnd_id, 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< NonlinearSystemBase >> &nl)
 
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)
 
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 nlConverged (const unsigned int nl_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 computingInitialResidual (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 ()
 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...
 
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
 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)
 
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 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 SystemBasesystemBaseAuxiliary () const override
 Return the auxiliary system object as a base class reference. More...
 
virtual SystemBasesystemBaseAuxiliary () override
 
virtual NonlinearSystemgetNonlinearSystem (const unsigned int sys_num)
 
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 addNodalKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addScalarKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addBoundaryCondition (const std::string &bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addConstraint (const std::string &c_name, const std::string &name, InputParameters &parameters)
 
virtual void 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 FEType &type, const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addAuxArrayVariable (const std::string &var_name, const FEType &type, unsigned int components, const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addAuxScalarVariable (const std::string &var_name, Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addAuxKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addAuxScalarKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
AuxiliarySystemgetAuxiliarySystem ()
 
virtual void addDiracKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addDGKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVBC (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 ()
 
void projectInitialConditionOnCustomRange (ConstElemRange &elem_range, ConstBndNodeRange &bnd_node_range)
 Project initial conditions for custom elem_range and bnd_node_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step. More...
 
virtual void addMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addMaterialHelper (std::vector< MaterialWarehouse *> warehouse, const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addInterfaceMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
void addFunctorMaterial (const std::string &functor_material_name, const std::string &name, InputParameters &parameters)
 
void prepareMaterials (const std::unordered_set< unsigned int > &consumer_needed_mat_props, const SubdomainID blk_id, const THREAD_ID tid)
 Add the MooseVariables and the material properties that the current materials depend on to the dependency list. More...
 
void reinitMaterials (SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true)
 
void reinitMaterialsFace (SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
 reinit materials on element faces More...
 
void reinitMaterialsNeighbor (SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
 reinit materials on the neighboring element face More...
 
void reinitMaterialsBoundary (BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
 reinit materials on a boundary More...
 
void reinitMaterialsInterface (BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true)
 
virtual void swapBackMaterials (const THREAD_ID tid)
 
virtual void swapBackMaterialsFace (const THREAD_ID tid)
 
virtual void swapBackMaterialsNeighbor (const THREAD_ID tid)
 
void setActiveMaterialProperties (const std::unordered_set< unsigned int > &mat_prop_ids, const THREAD_ID tid)
 Record and set the material properties required by the current computing thread. More...
 
bool hasActiveMaterialProperties (const THREAD_ID tid) const
 Method to check whether or not a list of active material roperties has been set. More...
 
void clearActiveMaterialProperties (const THREAD_ID tid)
 Clear the active material properties. More...
 
template<typename T >
std::vector< std::shared_ptr< T > > addObject (const std::string &type, const std::string &name, InputParameters &parameters, const bool threaded=true, const std::string &var_param_name="variable")
 Method for creating and adding an object to the warehouse. More...
 
virtual void addPostprocessor (const std::string &pp_name, const std::string &name, InputParameters &parameters)
 
virtual void addVectorPostprocessor (const std::string &pp_name, const std::string &name, InputParameters &parameters)
 
virtual void addReporter (const std::string &type, const std::string &name, InputParameters &parameters)
 Add a Reporter object to the simulation. More...
 
const ReporterDatagetReporterData () const
 Provides const access the ReporterData object. More...
 
ReporterDatagetReporterData (ReporterData::WriteKey)
 Provides non-const access the ReporterData object that is used to store reporter values. More...
 
virtual void 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...
 
virtual Real computeResidualL2Norm ()
 Computes the residual using whatever is sitting in the current solution vector then returns the L2 norm. More...
 
virtual void computeResidualSys (NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
 This function is called by Libmesh to form a residual. More...
 
void computeResidual (NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
 This function is called by Libmesh to form a residual. More...
 
virtual void computeResidual (const NumericVector< Number > &soln, NumericVector< Number > &residual, const unsigned int nl_sys_num)
 Form a residual with default tags (nontime, time, residual). More...
 
void computeResidualAndJacobian (const NumericVector< Number > &soln, NumericVector< Number > &residual, SparseMatrix< Number > &jacobian)
 Form a residual and Jacobian with default tags. More...
 
virtual void computeResidualTag (const NumericVector< Number > &soln, NumericVector< Number > &residual, TagID tag)
 Form a residual vector for a given tag. More...
 
virtual void computeResidualType (const NumericVector< Number > &soln, NumericVector< Number > &residual, TagID tag)
 Form a residual vector for a given tag and "residual" tag. More...
 
virtual void computeResidualInternal (const NumericVector< Number > &soln, NumericVector< 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 (NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian)
 Form a Jacobian matrix. More...
 
virtual void computeJacobian (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, const unsigned int nl_sys_num)
 Form a Jacobian matrix with the default tag (system). More...
 
virtual void computeJacobianTag (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, TagID tag)
 Form a Jacobian matrix for a given tag. More...
 
virtual void computeJacobianInternal (const NumericVector< Number > &soln, SparseMatrix< 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 (SparseMatrix< Number > &jacobian, libMesh::System &precond_system, unsigned int ivar, unsigned int jvar)
 Really not a good idea to use this. More...
 
virtual Real computeDamping (const NumericVector< Number > &soln, const NumericVector< Number > &update)
 
virtual bool shouldUpdateSolution ()
 Check to see whether the problem should update the solution. More...
 
virtual bool updateSolution (NumericVector< Number > &vec_solution, NumericVector< Number > &ghosted_solution)
 Update the solution. More...
 
virtual void predictorCleanup (NumericVector< Number > &ghosted_solution)
 Perform cleanup tasks after application of predictor to solution vector. More...
 
virtual void computeBounds (NonlinearImplicitSystem &sys, NumericVector< Number > &lower, NumericVector< Number > &upper)
 
virtual void computeNearNullSpace (NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
 
virtual void computeNullSpace (NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
 
virtual void computeTransposeNullSpace (NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
 
virtual void computePostCheck (NonlinearImplicitSystem &sys, const NumericVector< Number > &old_soln, NumericVector< Number > &search_direction, NumericVector< 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< 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< Number > &residual, const THREAD_ID tid) override
 
virtual void setResidualNeighbor (NumericVector< 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 (SparseMatrix< 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 (SparseMatrix< 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 >, 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 ()
 Get the solver parameters. More...
 
const SolverParamssolverParams () 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 () override
 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 initElementStatefulProps (const ConstElemRange &elem_range, const bool threaded)
 Initialize stateful properties for elements in a specific elem_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step. More...
 
virtual void checkProblemIntegrity ()
 Method called to perform a series of sanity checks before a simulation is run. More...
 
void registerRandomInterface (RandomInterface &random_interface, const std::string &name)
 
void setConstJacobian (bool state)
 Set flag that Jacobian is constant (for optimization purposes) More...
 
void setKernelCoverageCheck (bool flag)
 Set flag to indicate whether kernel coverage checks should be performed. More...
 
void setMaterialCoverageCheck (bool flag)
 Set flag to indicate whether material coverage checks should be performed. More...
 
void setParallelBarrierMessaging (bool flag)
 Toggle parallel barrier messaging (defaults to on). More...
 
void setVerboseProblem (bool verbose)
 Make the problem be verbose. More...
 
bool verboseMultiApps () const
 Whether or not to use verbose printing for MultiApps. More...
 
void parentOutputPositionChanged ()
 Calls parentOutputPositionChanged() on all sub apps. More...
 
unsigned int subspaceDim (const std::string &prefix) const
 Dimension of the subspace spanned by vectors with a given prefix. More...
 
const MaterialWarehousegetMaterialWarehouse () const
 
const MaterialWarehousegetRegularMaterialsWarehouse () const
 
const MaterialWarehousegetDiscreteMaterialWarehouse () const
 
const MaterialWarehousegetInterfaceMaterialsWarehouse () const
 
std::shared_ptr< MaterialBasegetMaterial (std::string name, Moose::MaterialDataType type, const THREAD_ID tid=0, bool no_warn=false)
 Return a pointer to a MaterialBase object. More...
 
MaterialDatagetMaterialData (Moose::MaterialDataType type, const THREAD_ID tid=0)
 
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 allowInvalidSolution () const
 Whether or not the invalid solutions are allowed. More...
 
bool immediatelyPrintInvalidSolution () const
 Whether or not the solution invalid warnings are printed out immediately. More...
 
bool ignoreZerosInJacobian () const
 
void setIgnoreZerosInJacobian (bool state)
 
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...
 
virtual void computeAuxiliaryKernels (const ExecFlagType &type)
 Call compute methods on AuxKernels. 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 MortarDatamortarData () const
 Returns the mortar data object. More...
 
MortarDatamortarData ()
 
virtual bool hasNeighborCoupling () const
 Whether the simulation has neighbor coupling. More...
 
virtual bool hasMortarCoupling () const
 Whether the simulation has mortar coupling. More...
 
void computingNonlinearResid (bool computing_nonlinear_residual) final
 Set whether or not the problem is in the process of computing the nonlinear residual. More...
 
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, BoundaryID bnd_id, 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, BoundaryID bnd_id, 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...
 
void setMaxNLPingPong (const unsigned int n_max_nl_pingpong)
 method setting the maximum number of allowable non linear residual pingpong More...
 
void setNonlinearForcedIterations (const unsigned int nl_forced_its)
 method setting the minimum number of nonlinear iterations before performing divergence checks More...
 
unsigned int getNonlinearForcedIterations () const
 method returning the number of forced nonlinear iterations More...
 
void setNonlinearAbsoluteDivergenceTolerance (const Real nl_abs_div_tol)
 method setting the absolute divergence tolerance 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 unsigned int currentNlSysNum () const override
 
virtual unsigned int nlSysNum (const NonlinearSystemName &nl_sys_name) const override
 
bool getFailNextNonlinearConvergenceCheck () const
 Whether it will skip further residual evaluations and fail the next nonlinear convergence check. More...
 
void setFailNextNonlinearConvergenceCheck ()
 Skip further residual evaluations and fail the next nonlinear convergence check. 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 clearCurrentJacobianVectorTags ()
 Clear the current Jacobian vector tag data structure ... More...
 
virtual void doingPRefinement (bool doing_p_refinement, const MultiMooseEnum &disable_p_refinement_for_families) override
 Indicate whether the kind of adaptivity we're doing is p-refinement. 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 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...
 
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 void doingPRefinement (bool doing_p_refinement, const MultiMooseEnum &disable_p_refinement_for_families)
 Indicate whether the kind of adaptivity we're doing is p-refinement. More...
 
bool doingPRefinement () const
 
virtual bool checkNonlocalCouplingRequirement ()
 
virtual bool converged (const unsigned int nl_sys_num)
 Eventually we want to convert this virtual over to taking a nonlinear 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...
 
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 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 ()
 
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 CouplingMatrix & nonlocalCouplingMatrix (const unsigned i) const
 
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 (GhostingFunctor &algebraic_gf, bool to_mesh=true)
 Add an algebraic ghosting functor to this problem's DofMaps. More...
 
void addCouplingGhostingFunctor (GhostingFunctor &coupling_gf, bool to_mesh=true)
 Add a coupling functor to this problem's DofMaps. More...
 
void removeAlgebraicGhostingFunctor (GhostingFunctor &algebraic_gf)
 Remove an algebraic ghosting functor from this problem's DofMaps. More...
 
void removeCouplingGhostingFunctor (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...
 
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...
 
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 > &nls, 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...
 
MooseAppgetMooseApp () const
 Get the MooseApp this class is associated with. More...
 
const std::string & type () const
 Get the type of this class. More...
 
virtual const std::string & name () const
 Get the name of the class. More...
 
std::string typeAndName () const
 Get the class's combined type and name; useful in error handling. More...
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 The unique parameter name of a valid parameter of this object for accessing parameter controls. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
MooseObjectName uniqueName () const
 The unique name for accessing input parameters of this object in the InputParameterWarehouse. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 Retrieve two parameters and provide pair of parameters for the object. More...
 
template<typename T >
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 Retrieve a renamed parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
bool isParamSetByUser (const std::string &nm) const
 Test if the supplied parameter is set by a user, as opposed to not set or set to default. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args) const
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args) const
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args) const
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
std::string objectErrorPrefix (const std::string &error_type) const
 A descriptive prefix for errors for an object. More...
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 Connect controllable parameter of this action with the controllable parameters of the objects added by this action. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 Emits an error prefixed with object name and type. More...
 
template<typename... Args>
void mooseErrorNonPrefixed (Args &&... args) const
 Emits an error without the prefixing included in mooseError(). More...
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 Emits a warning prefixed with object name and type. More...
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 Emits a warning without the prefixing included in mooseWarning(). More...
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
std::string errorPrefix (const std::string &error_type) const
 A descriptive prefix for errors for this object: More...
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
std::string getDataFileName (const std::string &param) const
 Returns the path of a data file for a given FileName type parameter, searching (in the following order) More...
 
std::string getDataFileNameByName (const std::string &name, const std::string *param=nullptr) const
 Returns the path of a data file for a given relative file path. More...
 
PerfGraphperfGraph ()
 Get the PerfGraph. More...
 
const ConstElemRangegetEvaluableElementRange ()
 In general, {evaluable elements} >= {local elements} U {algebraic ghosting elements}. More...
 
const ConstElemRangegetNonlinearEvaluableElementRange ()
 
void allowOutput (bool state)
 Ability to enable/disable all output calls. More...
 
template<typename T >
void allowOutput (bool state)
 
bool hasMultiApps () const
 Returns whether or not the current simulation has any multiapps. More...
 
bool hasMultiApps (ExecFlagType type) const
 
bool hasMultiApp (const std::string &name) const
 
const AutomaticMortarGenerationgetMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced) const
 Return the undisplaced or displaced mortar generation object associated with the provided boundaries and subdomains. More...
 
AutomaticMortarGenerationgetMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced)
 
const MaterialPropertyStoragegetMaterialPropertyStorage ()
 Return a reference to the material property storage. More...
 
const MaterialPropertyStoragegetBndMaterialPropertyStorage ()
 
const MaterialPropertyStoragegetNeighborMaterialPropertyStorage ()
 
const MooseObjectWarehouse< Indicator > & getIndicatorWarehouse ()
 Return indicator/marker storage. More...
 
const MooseObjectWarehouse< InternalSideIndicator > & getInternalSideIndicatorWarehouse ()
 
const MooseObjectWarehouse< Marker > & getMarkerWarehouse ()
 
bool needBoundaryMaterialOnSide (BoundaryID bnd_id, const THREAD_ID tid)
 These methods are used to determine whether stateful material properties need to be stored on internal sides. More...
 
bool needInterfaceMaterialOnSide (BoundaryID bnd_id, const THREAD_ID tid)
 
bool needSubdomainMaterialOnSide (SubdomainID subdomain_id, const THREAD_ID tid)
 
const ExecFlagTypegetCurrentExecuteOnFlag () const
 Return/set the current execution flag. More...
 
void setCurrentExecuteOnFlag (const ExecFlagType &)
 

Static Public Member Functions

static InputParameters validParams ()
 
static std::string arrayVariableComponent (const std::string &var_name, unsigned int i)
 Returns the variable name of a component of an array variable. More...
 
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...
 
template<typename T >
static void objectSetupHelper (const std::vector< T *> &objects, const ExecFlagType &exec_flag)
 Helpers for calling the necessary setup/execute functions for the supplied objects. More...
 
template<typename T >
static void objectExecuteHelper (const std::vector< T *> &objects)
 

Public Attributes

std::map< std::string, std::vector< dof_id_type > > _var_dof_map
 
const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 
std::vector< Real_real_zero
 Convenience zeros. More...
 
std::vector< VariableValue_scalar_zero
 
std::vector< VariableValue_zero
 
std::vector< VariablePhiValue_phi_zero
 
std::vector< MooseArray< ADReal > > _ad_zero
 
std::vector< VariableGradient_grad_zero
 
std::vector< MooseArray< ADRealVectorValue > > _ad_grad_zero
 
std::vector< VariablePhiGradient_grad_phi_zero
 
std::vector< VariableSecond_second_zero
 
std::vector< MooseArray< ADRealTensorValue > > _ad_second_zero
 
std::vector< VariablePhiSecond_second_phi_zero
 
std::vector< Point > _point_zero
 
std::vector< VectorVariableValue_vector_zero
 
std::vector< VectorVariableCurl_vector_curl_zero
 

Protected Member Functions

void createTagVectors ()
 Create extra tagged vectors and matrices. More...
 
void createTagSolutions ()
 Create extra tagged solution vectors. More...
 
void meshChangedHelper (bool intermediate_change=false)
 Helper method to update some or all data after a mesh change. More...
 
bool duplicateVariableCheck (const std::string &var_name, const FEType &type, bool is_aux)
 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...
 
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::set< TagID_fe_vector_tags
 
std::set< TagID_fe_matrix_tags
 
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
 
unsigned int _n_nl_pingpong = 0
 maximum numbver More...
 
unsigned int _n_max_nl_pingpong = std::numeric_limits<unsigned int>::max()
 
int _nl_forced_its = 0
 the number of forced nonlinear iterations More...
 
Real _nl_abs_div_tol = -1
 the absolute non linear divergence tolerance 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...
 
std::map< NonlinearVariableName, unsigned int_nl_var_to_sys_num
 Map from nonlinear variable name to nonlinear system number. More...
 
NonlinearSystemBase_current_nl_sys
 The current nonlinear system that we are solving. More...
 
std::shared_ptr< AuxiliarySystem_aux
 The auxiliary system. More...
 
Moose::CouplingType _coupling
 Type of variable coupling. More...
 
std::vector< std::unique_ptr< CouplingMatrix > > _cm
 Coupling matrix for variables. More...
 
std::map< std::string, unsigned int_subspace_dim
 Dimension of the subspace spanned by the vectors with a given prefix. More...
 
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
 The Assembly objects. More...
 
MooseObjectWarehouse< MeshDivision_mesh_divisions
 Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the Problem Time (and people's uses) will tell where this fits best. More...
 
MooseObjectWarehouse< Function_functions
 functions More...
 
MooseObjectWarehouse< KernelBase_nonlocal_kernels
 nonlocal kernels More...
 
MooseObjectWarehouse< IntegratedBCBase_nonlocal_integrated_bcs
 nonlocal integrated_bcs More...
 
MaterialPropertyRegistry _material_prop_registry
 
MaterialPropertyStorage_material_props
 
MaterialPropertyStorage_bnd_material_props
 
MaterialPropertyStorage_neighbor_material_props
 
MooseObjectWarehouse< Marker_markers
 
ReporterData _reporter_data
 
ExecuteMooseObjectWarehouse< UserObject_all_user_objects
 
ExecuteMooseObjectWarehouse< MultiApp_multi_apps
 MultiApp Warehouse. More...
 
ExecuteMooseObjectWarehouse< TransientMultiApp_transient_multi_apps
 Storage for TransientMultiApps (only needed for calling 'computeDT') More...
 
ExecuteMooseObjectWarehouse< Transfer_transfers
 Normal Transfers. More...
 
ExecuteMooseObjectWarehouse< Transfer_to_multi_app_transfers
 Transfers executed just before MultiApps to transfer data to them. More...
 
ExecuteMooseObjectWarehouse< Transfer_from_multi_app_transfers
 Transfers executed just after MultiApps to transfer data from them. More...
 
ExecuteMooseObjectWarehouse< Transfer_between_multi_app_transfers
 Transfers executed just before MultiApps to transfer data between them. More...
 
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
 A map of objects that consume random numbers. More...
 
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
 Cache for calculating materials on side. More...
 
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
 Cache for calculating materials on side. More...
 
std::vector< std::unordered_map< BoundaryID, bool > > _interface_mat_side_cache
 Cache for calculating materials on interface. More...
 
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
 Objects to be notified when the mesh changes. More...
 
Adaptivity _adaptivity
 
unsigned int _cycles_completed
 
std::shared_ptr< XFEMInterface_xfem
 Pointer to XFEM controller. More...
 
MooseMesh_displaced_mesh
 
std::shared_ptr< DisplacedProblem_displaced_problem
 
GeometricSearchData _geometric_search_data
 
MortarData _mortar_data
 
bool _reinit_displaced_elem
 Whether to call DisplacedProblem::reinitElem when this->reinitElem is called. More...
 
bool _reinit_displaced_face
 Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called. More...
 
bool _reinit_displaced_neighbor
 Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called. More...
 
bool _input_file_saved
 whether input file has been written More...
 
bool _has_dampers
 Whether or not this system has any Dampers associated with it. More...
 
bool _has_constraints
 Whether or not this system has any Constraints. More...
 
bool _snesmf_reuse_base
 If or not to resuse the base vector for matrix-free calculation. More...
 
bool _skip_exception_check
 If or not skip 'exception and stop solve'. More...
 
bool _snesmf_reuse_base_set_by_user
 If or not _snesmf_reuse_base is set by user. More...
 
bool _has_initialized_stateful
 Whether nor not stateful materials have been initialized. More...
 
bool _const_jacobian
 true if the Jacobian is constant More...
 
bool _has_jacobian
 Indicates if the Jacobian was computed. More...
 
bool _needs_old_newton_iter
 Indicates that we need to compute variable values for previous Newton iteration. More...
 
bool _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...
 
SolverParams _solver_params
 
bool _kernel_coverage_check
 Determines whether a check to verify an active kernel on every subdomain. More...
 
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...
 
bool _material_coverage_check
 Determines whether a check to verify an active material on every subdomain. More...
 
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...
 
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...
 
bool _verbose_setup
 Whether or not to be verbose during setup. More...
 
bool _verbose_multiapps
 Whether or not to be verbose with multiapps. 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< ConstElemRange_evaluable_local_elem_range
 
std::unique_ptr< ConstElemRange_nl_evaluable_local_elem_range
 
std::unique_ptr< ConstElemRange_aux_evaluable_local_elem_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...
 
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...
 
std::vector< CouplingMatrix > _nonlocal_cm
 
DiracKernelInfo _dirac_kernel_info
 nonlocal coupling matrix; More...
 
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 _requires_nonlocal_coupling
 nonlocal coupling requirement flag More...
 
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...
 
bool _cli_option_found
 True if the CLI option is found. More...
 
bool _color_output
 True if we're going to attempt to write color output. More...
 
bool _termination_requested
 True if termination of the solve has been requested. More...
 
const bool & _enabled
 Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects. More...
 
MooseApp_app
 The MOOSE application this is associated with. More...
 
const std::string & _type
 The type of this class. More...
 
const std::string & _name
 The name of this class, reference to value stored in InputParameters. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
ActionFactory_action_factory
 Builds Actions. More...
 
const Parallel::Communicator & _communicator
 
MooseApp_pg_moose_app
 The MooseApp that owns the PerfGraph. More...
 
const std::string _prefix
 A prefix to use for all sections. More...
 
MooseApp_restartable_app
 Reference to the application. More...
 
const std::string _restartable_system_name
 The system name this object is in. More...
 
const THREAD_ID _restartable_tid
 The thread ID for this object. More...
 
const bool _restartable_read_only
 Flag for toggling read only status (see ReporterData) More...
 
InitialConditionWarehouse _ics
 
FVInitialConditionWarehouse _fv_ics
 
ScalarInitialConditionWarehouse _scalar_ics
 
MaterialWarehouse _materials
 
MaterialWarehouse _interface_materials
 
MaterialWarehouse _discrete_materials
 
MaterialWarehouse _all_materials
 
MooseObjectWarehouse< Indicator_indicators
 
MooseObjectWarehouse< InternalSideIndicator_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 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...
 
std::pair< bool, unsigned intdetermineNonlinearSystem (const std::string &var_name, bool error_if_not_found=false) const override
 Determine what nonlinear 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...
 

Private Attributes

Restartable::ManagedValue< RestartableEquationSystems_req
 The EquationSystems object, wrapped for restart. More...
 
bool _error_on_jacobian_nonzero_reallocation
 
bool _ignore_zeros_in_jacobian
 
const bool _force_restart
 
const bool _allow_ics_during_restart
 
const bool _skip_nl_system_check
 
bool _fail_next_nonlinear_convergence_check
 
const bool & _allow_invalid_solution
 
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...
 

Friends

class AuxiliarySystem
 
class NonlinearSystemBase
 
class MooseEigenSystem
 
class Resurrector
 
class Restartable
 
class DisplacedProblem
 

Detailed Description

Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.

Definition at line 145 of file FEProblemBase.h.

Constructor & Destructor Documentation

◆ FEProblemBase()

FEProblemBase::FEProblemBase ( const InputParameters parameters)

Definition at line 324 of file FEProblemBase.C.

326  Restartable(this, "FEProblemBase"),
327  _mesh(*getCheckedPointerParam<MooseMesh *>("mesh")),
328  _req(declareManagedRestartableDataWithContext<RestartableEquationSystems>(
329  "equation_systems", nullptr, _mesh)),
330  _initialized(false),
331  _solve(getParam<bool>("solve")),
332  _transient(false),
333  _time(declareRestartableData<Real>("time")),
334  _time_old(declareRestartableData<Real>("time_old")),
335  _t_step(declareRecoverableData<int>("t_step")),
336  _dt(declareRestartableData<Real>("dt")),
337  _dt_old(declareRestartableData<Real>("dt_old")),
338  _nl_sys_names(getParam<std::vector<NonlinearSystemName>>("nl_sys_names")),
339  _num_nl_sys(_nl_sys_names.size()),
340  _nl(_num_nl_sys, nullptr),
341  _current_nl_sys(nullptr),
342  _aux(nullptr),
344  _mesh_divisions(/*threaded=*/true),
345  _material_props(declareRestartableDataWithContext<MaterialPropertyStorage>(
346  "material_props", &_mesh, _material_prop_registry)),
347  _bnd_material_props(declareRestartableDataWithContext<MaterialPropertyStorage>(
348  "bnd_material_props", &_mesh, _material_prop_registry)),
349  _neighbor_material_props(declareRestartableDataWithContext<MaterialPropertyStorage>(
350  "neighbor_material_props", &_mesh, _material_prop_registry)),
352  // TODO: delete the following line after apps have been updated to not call getUserObjects
356  _transfers(_app.getExecuteOnEnum(), /*threaded=*/false),
357  _to_multi_app_transfers(_app.getExecuteOnEnum(), /*threaded=*/false),
358  _from_multi_app_transfers(_app.getExecuteOnEnum(), /*threaded=*/false),
359  _between_multi_app_transfers(_app.getExecuteOnEnum(), /*threaded=*/false),
360 #ifdef LIBMESH_ENABLE_AMR
361  _adaptivity(*this),
363 #endif
364  _displaced_mesh(nullptr),
366  _mortar_data(*this),
367  _reinit_displaced_elem(false),
368  _reinit_displaced_face(false),
370  _input_file_saved(false),
371  _has_dampers(false),
372  _has_constraints(false),
373  _snesmf_reuse_base(true),
374  _skip_exception_check(false),
377  _const_jacobian(false),
378  _has_jacobian(false),
379  _needs_old_newton_iter(false),
380  _has_nonlocal_coupling(false),
382  _kernel_coverage_check(getParam<bool>("kernel_coverage_check")),
384  getParam<bool>("boundary_restricted_node_integrity_check")),
386  getParam<bool>("boundary_restricted_elem_integrity_check")),
387  _material_coverage_check(getParam<bool>("material_coverage_check")),
388  _fv_bcs_integrity_check(getParam<bool>("fv_bcs_integrity_check")),
389  _material_dependency_check(getParam<bool>("material_dependency_check")),
390  _uo_aux_state_check(getParam<bool>("check_uo_aux_state")),
392  _max_scalar_order(INVALID_ORDER),
393  _has_time_integrator(false),
394  _has_exception(false),
395  _parallel_barrier_messaging(getParam<bool>("parallel_barrier_messaging")),
396  _verbose_setup(getParam<bool>("verbose_setup")),
397  _verbose_multiapps(getParam<bool>("verbose_multiapps")),
399  _control_warehouse(_app.getExecuteOnEnum(), /*threaded=*/false),
401  _line_search(nullptr),
402  _using_ad_mat_props(false),
404  isParamValid("error_on_jacobian_nonzero_reallocation")
405  ? getParam<bool>("error_on_jacobian_nonzero_reallocation")
407  _ignore_zeros_in_jacobian(getParam<bool>("ignore_zeros_in_jacobian")),
408  _force_restart(getParam<bool>("force_restart")),
409  _allow_ics_during_restart(getParam<bool>("allow_initial_conditions_with_restart")),
410  _skip_nl_system_check(getParam<bool>("skip_nl_system_check")),
412  _allow_invalid_solution(getParam<bool>("allow_invalid_solution")),
413  _immediately_print_invalid_solution(getParam<bool>("immediately_print_invalid_solution")),
414  _started_initial_setup(false),
416  _u_dot_requested(false),
417  _u_dotdot_requested(false),
418  _u_dot_old_requested(false),
420  _has_mortar(false),
421  _num_grid_steps(0),
423  _identify_variable_groups_in_nl(getParam<bool>("identify_variable_groups_in_nl")),
424  _regard_general_exceptions_as_errors(getParam<bool>("regard_general_exceptions_as_errors"))
425 {
426  // Initialize static do_derivatives member. We initialize this to true so that all the default AD
427  // things that we setup early in the simulation actually get their derivative vectors initalized.
428  // We will toggle this to false when doing residual evaluations
429  ADReal::do_derivatives = true;
430 
431  for (const auto i : index_range(_nl_sys_names))
433  _nonlocal_cm.resize(_nl_sys_names.size());
434  _cm.resize(_nl_sys_names.size());
435 
436  _time = 0.0;
437  _time_old = 0.0;
438  _t_step = 0;
439  _dt = 0;
440  _dt_old = _dt;
441 
442  unsigned int n_threads = libMesh::n_threads();
443 
444  _real_zero.resize(n_threads, 0.);
445  _scalar_zero.resize(n_threads);
446  _zero.resize(n_threads);
447  _phi_zero.resize(n_threads);
448  _ad_zero.resize(n_threads);
449  _grad_zero.resize(n_threads);
450  _ad_grad_zero.resize(n_threads);
451  _grad_phi_zero.resize(n_threads);
452  _second_zero.resize(n_threads);
453  _ad_second_zero.resize(n_threads);
454  _second_phi_zero.resize(n_threads);
455  _point_zero.resize(n_threads);
456  _vector_zero.resize(n_threads);
457  _vector_curl_zero.resize(n_threads);
458  _uo_jacobian_moose_vars.resize(n_threads);
459 
460  _has_active_material_properties.resize(n_threads, 0);
461 
462  _block_mat_side_cache.resize(n_threads);
463  _bnd_mat_side_cache.resize(n_threads);
464  _interface_mat_side_cache.resize(n_threads);
465 
466  es().parameters.set<FEProblemBase *>("_fe_problem_base") = this;
467 
468  if (parameters.isParamSetByUser("coord_type"))
469  setCoordSystem(getParam<std::vector<SubdomainName>>("block"),
470  getParam<MultiMooseEnum>("coord_type"));
471  if (parameters.isParamSetByUser("rz_coord_axis"))
472  setAxisymmetricCoordAxis(getParam<MooseEnum>("rz_coord_axis"));
473 
474  if (isParamValid("restart_file_base"))
475  {
476  std::string restart_file_base = getParam<FileNameNoExtension>("restart_file_base");
477 
478  // This check reverts to old behavior of providing "restart_file_base=" to mean
479  // don't restart... BISON currently relies on this. It could probably be removed.
480  // The new MooseUtils::convertLatestCheckpoint will error out if a checkpoint file
481  // is not found, which I think makes sense. Which means, without this, if you
482  // set "restart_file_base=", you'll get a "No checkpoint file found" error
483  if (restart_file_base.size())
484  {
485  restart_file_base = MooseUtils::convertLatestCheckpoint(restart_file_base);
486  setRestartFile(restart_file_base);
487  }
488  }
489 
490  // // Generally speaking, the mesh is prepared for use, and consequently remote elements are deleted
491  // // well before our Problem(s) are constructed. Historically, in MooseMesh we have a bunch of
492  // // needs_prepare type flags that make it so we never call prepare_for_use (and consequently
493  // // delete_remote_elements) again. So the below line, historically, has had no impact. HOWEVER:
494  // // I've added some code in SetupMeshCompleteAction for deleting remote elements post
495  // // EquationSystems::init. If I execute that code without default ghosting, then I get > 40 MOOSE
496  // // test failures, so we clearly have some simulations that are not yet covered properly by
497  // // relationship managers. Until that is resolved, I am going to retain default geometric ghosting
498  // if (!_default_ghosting)
499  // _mesh.getMesh().remove_ghosting_functor(_mesh.getMesh().default_ghosting());
500 
501 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
502  // Main app should hold the default database to handle system petsc options
503  if (!_app.isUltimateMaster())
504  PetscOptionsCreate(&_petsc_option_data_base);
505 #endif
506 }
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::vector< MooseArray< ADRealTensorValue > > _ad_second_zero
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:823
MaterialPropertyStorage & _bnd_material_props
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
bool _error_on_jacobian_nonzero_reallocation
bool _has_jacobian
Indicates if the Jacobian was computed.
bool _has_dampers
Whether or not this system has any Dampers associated with it.
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
std::vector< MooseArray< ADRealVectorValue > > _ad_grad_zero
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.
unsigned int _cycles_completed
const ExecFlagEnum & getExecuteOnEnum() const
Return the app level ExecFlagEnum, this contains all the available flags for the app.
Definition: MooseApp.h:992
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.
std::vector< std::unique_ptr< CouplingMatrix > > _cm
Coupling matrix for variables.
const bool _uo_aux_state_check
Whether or not checking the state of uo/aux evaluation.
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
PetscOptions _petsc_option_data_base
std::vector< VariableSecond > _second_zero
std::vector< MooseArray< ADReal > > _ad_zero
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;)
bool _ignore_zeros_in_jacobian
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
std::string convertLatestCheckpoint(std::string orig)
Replaces "LATEST" placeholders with the latest checkpoint file name.
Definition: MooseUtils.C:146
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.
std::vector< CouplingMatrix > _nonlocal_cm
Definition: SubProblem.h:974
auto max(const L &left, const R &right)
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
virtual EquationSystems & es() override
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
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
ReporterData _reporter_data
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
bool _fail_next_nonlinear_convergence_check
Moose::CouplingType _coupling
Type of variable coupling.
const bool _allow_ics_during_restart
SubProblem(const InputParameters &parameters)
Definition: SubProblem.C:48
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
Cache for calculating materials on side.
MortarData _mortar_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
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.
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Adaptivity _adaptivity
const bool _force_restart
std::vector< VariablePhiSecond > _second_phi_zero
bool _started_initial_setup
At or beyond initialSteup stage.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
bool _verbose_setup
Whether or not to be verbose during setup.
bool _kernel_coverage_check
Determines whether a check to verify an active kernel on every subdomain.
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.
void setCoordSystem(const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
bool _snesmf_reuse_base
If or not to resuse the base vector for matrix-free calculation.
friend class Restartable
const std::vector< NonlinearSystemName > _nl_sys_names
The nonlinear system names.
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
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.
std::vector< VariableGradient > _grad_zero
const bool _identify_variable_groups_in_nl
Whether to identify variable groups in nonlinear systems. This affects dof ordering.
void setRestartFile(const std::string &file_name)
Communicate to the Resurector the name of the restart filer.
const bool & _allow_invalid_solution
std::vector< VariableValue > _scalar_zero
bool _using_ad_mat_props
Automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material ...
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
const InputParameters & parameters() const
Get the parameters of the object.
std::vector< VectorVariableValue > _vector_zero
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.
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.
MaterialPropertyStorage & _neighbor_material_props
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.
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
MaterialPropertyStorage & _material_props
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
Restartable::ManagedValue< RestartableEquationSystems > _req
The EquationSystems object, wrapped for restart.
virtual bool errorOnJacobianNonzeroReallocation() const
Whether this application should by default error on Jacobian nonzero reallocations.
Definition: MooseApp.h:1041
std::vector< std::unordered_map< BoundaryID, bool > > _interface_mat_side_cache
Cache for calculating materials on interface.
bool _material_coverage_check
Determines whether a check to verify an active material on every subdomain.
Order _max_scalar_order
Maximum scalar variable order.
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.
auto index_range(const T &sizable)
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 626 of file FEProblemBase.C.

627 {
628  // Flush the Console stream, the underlying call to Console::mooseConsole
629  // relies on a call to Output::checkInterval that has references to
630  // _time, etc. If it is not flushed here memory problems arise if you have
631  // an unflushed stream and start destructing things.
632  _console << std::flush;
633 
634  unsigned int n_threads = libMesh::n_threads();
635  for (unsigned int i = 0; i < n_threads; i++)
636  {
637  _zero[i].release();
638  _phi_zero[i].release();
639  _scalar_zero[i].release();
640  _grad_zero[i].release();
641  _grad_phi_zero[i].release();
642  _second_zero[i].release();
643  _second_phi_zero[i].release();
644  _vector_zero[i].release();
645  _vector_curl_zero[i].release();
646  _ad_zero[i].release();
647  _ad_grad_zero[i].release();
648  _ad_second_zero[i].release();
649  }
650 
651 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
652  if (!_app.isUltimateMaster())
653  PetscOptionsDestroy(&_petsc_option_data_base);
654 #endif
655 }
std::vector< MooseArray< ADRealTensorValue > > _ad_second_zero
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:823
unsigned int n_threads()
std::vector< MooseArray< ADRealVectorValue > > _ad_grad_zero
PetscOptions _petsc_option_data_base
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:69
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

◆ adaptivity()

Adaptivity& FEProblemBase::adaptivity ( )
inline

Definition at line 1527 of file FEProblemBase.h.

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

1527 { return _adaptivity; }
Adaptivity _adaptivity

◆ adaptMesh()

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

Reimplemented in DumpObjectsProblem.

Definition at line 7186 of file FEProblemBase.C.

Referenced by Steady::execute(), Eigenvalue::execute(), and Transient::incrementStepOrReject().

7187 {
7188  // reset cycle counter
7189  _cycles_completed = 0;
7190 
7192  return false;
7193 
7194  TIME_SECTION("adaptMesh", 3, "Adapting Mesh");
7195 
7196  unsigned int cycles_per_step = _adaptivity.getCyclesPerStep();
7197 
7198  bool mesh_changed = false;
7199 
7200  for (unsigned int i = 0; i < cycles_per_step; ++i)
7201  {
7204  mooseError("HFEM does not support mesh adaptivity currently.");
7205 
7206  // Markers were already computed once by Executioner
7207  if (_adaptivity.getRecomputeMarkersFlag() && i > 0)
7208  computeMarkers();
7209 
7210  bool mesh_changed_this_step;
7211  mesh_changed_this_step = _adaptivity.adaptMesh();
7212 
7213  if (mesh_changed_this_step)
7214  {
7215  mesh_changed = true;
7216 
7217  meshChangedHelper(true); // This may be an intermediate change
7219  }
7220  else
7221  {
7222  _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
7223  break;
7224  }
7225 
7226  // Show adaptivity progress
7227  _console << std::flush;
7228  }
7229 
7230  // We're done with all intermediate changes; now get systems ready
7231  // for real if necessary.
7232  if (mesh_changed)
7233  es().reinit_systems();
7234 
7235  return mesh_changed;
7236 }
bool adaptMesh(std::string marker_name=std::string())
Adapts the mesh based on the error estimator used.
Definition: Adaptivity.C:123
void meshChangedHelper(bool intermediate_change=false)
Helper method to update some or all data after a mesh change.
unsigned int _cycles_completed
unsigned int getCyclesPerStep() const
Pull out the number of cycles_per_step previously set through the AdaptivityAction.
Definition: Adaptivity.h:111
virtual void computeMarkers()
const SubdomainID BOUNDARY_SIDE_LOWERD_ID
Definition: MooseTypes.C:21
virtual EquationSystems & es() override
bool getRecomputeMarkersFlag() const
Pull out the _recompute_markers_during_cycles flag previously set through the AdaptivityAction.
Definition: Adaptivity.h:124
MooseMesh & _mesh
Adaptivity _adaptivity
const SubdomainID INTERNAL_SIDE_LOWERD_ID
Definition: MooseTypes.C:20
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool isAdaptivityDue()
Query if an adaptivity step should be performed at the current time / time step.
Definition: Adaptivity.C:384
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2921

◆ addAlgebraicGhostingFunctor()

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

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

Definition at line 974 of file SubProblem.C.

975 {
976  EquationSystems & eq = es();
977  const auto n_sys = eq.n_systems();
978  if (!n_sys)
979  return;
980 
981  eq.get_system(0).get_dof_map().add_algebraic_ghosting_functor(algebraic_gf, to_mesh);
982  cloneAlgebraicGhostingFunctor(algebraic_gf, to_mesh);
983 }
virtual EquationSystems & es()=0
void cloneAlgebraicGhostingFunctor(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:952

◆ addAnyRedistributers()

void FEProblemBase::addAnyRedistributers ( )
private

Definition at line 5407 of file FEProblemBase.C.

Referenced by initialSetup().

5408 {
5409 #ifdef LIBMESH_ENABLE_AMR
5410  if ((_adaptivity.isOn() || _num_grid_steps) &&
5413  {
5414  // Even on a serialized Mesh, we don't keep our material
5415  // properties serialized, so we'll rely on the callback to
5416  // redistribute() to redistribute properties at the same time
5417  // libMesh is redistributing elements.
5418  auto add_redistributer = [this](MooseMesh & mesh,
5419  const std::string & redistributer_name,
5420  const bool use_displaced_mesh)
5421  {
5422  InputParameters redistribute_params = RedistributeProperties::validParams();
5423  redistribute_params.set<MooseApp *>("_moose_app") = &_app;
5424  redistribute_params.set<std::string>("for_whom") = this->name();
5425  redistribute_params.set<MooseMesh *>("mesh") = &mesh;
5426  redistribute_params.set<Moose::RelationshipManagerType>("rm_type") =
5428  redistribute_params.set<bool>("use_displaced_mesh") = use_displaced_mesh;
5429 
5430  std::shared_ptr<RedistributeProperties> redistributer =
5432  "RedistributeProperties", redistributer_name, redistribute_params);
5433 
5436 
5438  redistributer->addMaterialPropertyStorage(_bnd_material_props);
5439 
5441  redistributer->addMaterialPropertyStorage(_neighbor_material_props);
5442 
5443  mesh.getMesh().add_ghosting_functor(redistributer);
5444  };
5445 
5446  add_redistributer(_mesh, "mesh_property_redistributer", false);
5447  if (_displaced_problem)
5448  add_redistributer(_displaced_problem->mesh(), "displaced_mesh_property_redistributer", true);
5449  }
5450 #endif // LIBMESH_ENABLE_AMR
5451 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
MaterialPropertyStorage & _bnd_material_props
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:876
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
Base class for MOOSE-based applications.
Definition: MooseApp.h:69
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
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
MooseMesh & _mesh
Adaptivity _adaptivity
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
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
MaterialPropertyStorage & _neighbor_material_props
MaterialPropertyStorage & _material_props
static InputParameters validParams()
RedistributeProperties is used for its redistribute() callback, which ensures that any stateful prope...

◆ addAuxArrayVariable()

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

Definition at line 2771 of file FEProblemBase.C.

2775 {
2776  parallel_object_only();
2777 
2778  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
2779 
2780  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true))
2781  return;
2782 
2783  InputParameters params = _factory.getValidParams("ArrayMooseVariable");
2784  params.set<FEProblemBase *>("_fe_problem_base") = this;
2786  params.set<MooseEnum>("order") = type.order.get_order();
2787  params.set<MooseEnum>("family") = Moose::stringify(type.family);
2788  params.set<unsigned int>("components") = components;
2789 
2790  if (active_subdomains)
2791  for (const SubdomainID & id : *active_subdomains)
2792  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
2793 
2794  logAdd("Variable", var_name, "ArrayMooseVariable");
2795  _aux->addVariable("ArrayMooseVariable", var_name, params);
2796  if (_displaced_problem)
2797  _displaced_problem->addAuxVariable("ArrayMooseVariable", var_name, params);
2798 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
void mooseDeprecated(Args &&... args) const
bool duplicateVariableCheck(const std::string &var_name, const FEType &type, bool is_aux)
Helper to check for duplicate variable names across systems or within a single system.
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:67
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:627
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
subdomain_id_type SubdomainID
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addAuxKernel()

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

Definition at line 2835 of file FEProblemBase.C.

2838 {
2839  parallel_object_only();
2840 
2841  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2842  {
2843  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2844  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
2845  parameters.set<SystemBase *>("_nl_sys") = &_displaced_problem->nlSys(0);
2846  if (!parameters.get<std::vector<BoundaryName>>("boundary").empty())
2847  _reinit_displaced_face = true;
2848  else
2849  _reinit_displaced_elem = true;
2850  }
2851  else
2852  {
2853  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2854  {
2855  // We allow AuxKernels to request that they use_displaced_mesh,
2856  // but then be overridden when no displacements variables are
2857  // provided in the Mesh block. If that happened, update the value
2858  // of use_displaced_mesh appropriately for this AuxKernel.
2859  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2860  parameters.set<bool>("use_displaced_mesh") = false;
2861  }
2862 
2863  parameters.set<SubProblem *>("_subproblem") = this;
2864  parameters.set<SystemBase *>("_sys") = _aux.get();
2865  parameters.set<SystemBase *>("_nl_sys") = _nl[0].get();
2866  }
2867 
2868  logAdd("AuxKernel", name, kernel_name);
2869  _aux->addKernel(kernel_name, name, parameters);
2870 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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:75
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addAuxScalarKernel()

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

Definition at line 2873 of file FEProblemBase.C.

2876 {
2877  parallel_object_only();
2878 
2879  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2880  {
2881  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2882  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
2883  }
2884  else
2885  {
2886  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2887  {
2888  // We allow AuxScalarKernels to request that they use_displaced_mesh,
2889  // but then be overridden when no displacements variables are
2890  // provided in the Mesh block. If that happened, update the value
2891  // of use_displaced_mesh appropriately for this AuxScalarKernel.
2892  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2893  parameters.set<bool>("use_displaced_mesh") = false;
2894  }
2895 
2896  parameters.set<SubProblem *>("_subproblem") = this;
2897  parameters.set<SystemBase *>("_sys") = _aux.get();
2898  }
2899 
2900  logAdd("AuxScalarKernel", name, kernel_name);
2901  _aux->addScalarKernel(kernel_name, name, parameters);
2902 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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:75
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addAuxScalarVariable()

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

Definition at line 2801 of file FEProblemBase.C.

2805 {
2806  parallel_object_only();
2807 
2808  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
2809 
2810  if (order > _max_scalar_order)
2811  _max_scalar_order = order;
2812 
2813  FEType type(order, SCALAR);
2814  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true))
2815  return;
2816 
2817  InputParameters params = _factory.getValidParams("MooseVariableScalar");
2818  params.set<FEProblemBase *>("_fe_problem_base") = this;
2820 
2821  params.set<MooseEnum>("order") = type.order.get_order();
2822  params.set<MooseEnum>("family") = "SCALAR";
2823  params.set<std::vector<Real>>("scaling") = {1};
2824  if (active_subdomains)
2825  for (const SubdomainID & id : *active_subdomains)
2826  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
2827 
2828  logAdd("ScalarVariable", var_name, "MooseVariableScalar");
2829  _aux->addVariable("MooseVariableScalar", var_name, params);
2830  if (_displaced_problem)
2831  _displaced_problem->addAuxVariable("MooseVariableScalar", var_name, params);
2832 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
void mooseDeprecated(Args &&... args) const
bool duplicateVariableCheck(const std::string &var_name, const FEType &type, bool is_aux)
Helper to check for duplicate variable names across systems or within a single system.
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:67
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:627
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
subdomain_id_type SubdomainID
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
std::shared_ptr< DisplacedProblem > _displaced_problem
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

Definition at line 2709 of file FEProblemBase.C.

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

2712 {
2713  parallel_object_only();
2714 
2715  auto fe_type = FEType(Utility::string_to_enum<Order>(params.get<MooseEnum>("order")),
2716  Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family")));
2717 
2718  if (duplicateVariableCheck(var_name, fe_type, /* is_aux = */ true))
2719  return;
2720 
2721  params.set<FEProblemBase *>("_fe_problem_base") = this;
2723 
2724  logAdd("AuxVariable", var_name, var_type);
2725  _aux->addVariable(var_type, var_name, params);
2726  if (_displaced_problem)
2727  // MooseObjects need to be unique so change the name here
2728  _displaced_problem->addAuxVariable(var_type, var_name, params);
2729 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
bool duplicateVariableCheck(const std::string &var_name, const FEType &type, bool is_aux)
Helper to check for duplicate variable names across systems or within a single system.
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.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:627
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addAuxVariable() [2/2]

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

Definition at line 2732 of file FEProblemBase.C.

2735 {
2736  parallel_object_only();
2737 
2738  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
2739 
2740  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true))
2741  return;
2742 
2743  std::string var_type;
2744  if (type == FEType(0, MONOMIAL))
2745  var_type = "MooseVariableConstMonomial";
2746  else if (type.family == SCALAR)
2747  var_type = "MooseVariableScalar";
2748  else if (type.family == LAGRANGE_VEC || type.family == NEDELEC_ONE ||
2749  type.family == MONOMIAL_VEC || type.family == RAVIART_THOMAS)
2750  var_type = "VectorMooseVariable";
2751  else
2752  var_type = "MooseVariable";
2753 
2754  InputParameters params = _factory.getValidParams(var_type);
2755  params.set<FEProblemBase *>("_fe_problem_base") = this;
2757  params.set<MooseEnum>("order") = type.order.get_order();
2758  params.set<MooseEnum>("family") = Moose::stringify(type.family);
2759 
2760  if (active_subdomains)
2761  for (const SubdomainID & id : *active_subdomains)
2762  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
2763 
2764  logAdd("AuxVariable", var_name, var_type);
2765  _aux->addVariable(var_type, var_name, params);
2766  if (_displaced_problem)
2767  _displaced_problem->addAuxVariable("MooseVariable", var_name, params);
2768 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
void mooseDeprecated(Args &&... args) const
bool duplicateVariableCheck(const std::string &var_name, const FEType &type, bool is_aux)
Helper to check for duplicate variable names across systems or within a single system.
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:67
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:627
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
subdomain_id_type SubdomainID
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addBoundaryCondition()

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

Definition at line 2624 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEBCs().

2627 {
2628  parallel_object_only();
2629 
2630  const auto nl_sys_num =
2631  determineNonlinearSystem(parameters.varName("variable", name), true).second;
2632  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2633  {
2634  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2635  parameters.set<SystemBase *>("_sys") = &_displaced_problem->nlSys(nl_sys_num);
2636  _reinit_displaced_face = true;
2637  }
2638  else
2639  {
2640  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2641  {
2642  // We allow Materials to request that they use_displaced_mesh,
2643  // but then be overridden when no displacements variables are
2644  // provided in the Mesh block. If that happened, update the value
2645  // of use_displaced_mesh appropriately for this Material.
2646  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2647  parameters.set<bool>("use_displaced_mesh") = false;
2648  }
2649 
2650  parameters.set<SubProblem *>("_subproblem") = this;
2651  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2652  }
2653 
2654  logAdd("BoundaryCondition", name, bc_name);
2655  _nl[nl_sys_num]->addBoundaryCondition(bc_name, name, parameters);
2656 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addCachedJacobian()

void FEProblemBase::addCachedJacobian ( const THREAD_ID  tid)
overridevirtual

◆ addCachedResidual()

void FEProblemBase::addCachedResidual ( const THREAD_ID  tid)
overridevirtual

◆ addCachedResidualDirectly()

void FEProblemBase::addCachedResidualDirectly ( NumericVector< 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 1654 of file FEProblemBase.C.

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

1655 {
1657  _assembly[tid][_current_nl_sys->number()]->addCachedResidualDirectly(
1659 
1661  _assembly[tid][_current_nl_sys->number()]->addCachedResidualDirectly(
1663 
1664  // We do this because by adding the cached residual directly, we cannot ensure that all of the
1665  // cached residuals are emptied after only the two add calls above
1666  _assembly[tid][_current_nl_sys->number()]->clearCachedResiduals(Assembly::GlobalDataKey{});
1667 
1668  if (_displaced_problem)
1669  _displaced_problem->addCachedResidualDirectly(residual, tid);
1670 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:873
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:1125
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:138
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:794

◆ addConstraint()

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

Definition at line 2659 of file FEProblemBase.C.

2662 {
2663  parallel_object_only();
2664 
2665  _has_constraints = true;
2666 
2667  auto determine_var_param_name = [&parameters, this]()
2668  {
2669  if (parameters.isParamValid("variable"))
2670  return "variable";
2671  else
2672  {
2673  // must be a mortar constraint
2674  const bool has_secondary_var = parameters.isParamValid("secondary_variable");
2675  const bool has_primary_var = parameters.isParamValid("primary_variable");
2676  if (!has_secondary_var && !has_primary_var)
2677  mooseError(
2678  "Either a 'secondary_variable' or 'primary_variable' parameter must be supplied for '",
2679  parameters.get<std::string>("_object_name"),
2680  "'");
2681  return has_secondary_var ? "secondary_variable" : "primary_variable";
2682  }
2683  };
2684 
2685  const auto nl_sys_num =
2686  determineNonlinearSystem(parameters.varName(determine_var_param_name(), name), true).second;
2687 
2688  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2689  {
2690  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2691  parameters.set<SystemBase *>("_sys") = &_displaced_problem->nlSys(nl_sys_num);
2692  _reinit_displaced_face = true;
2693  }
2694  else
2695  {
2696  // It might _want_ to use a displaced mesh... but we're not so set it to false
2697  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2698  parameters.set<bool>("use_displaced_mesh") = false;
2699 
2700  parameters.set<SubProblem *>("_subproblem") = this;
2701  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2702  }
2703 
2704  logAdd("Constraint", name, c_name);
2705  _nl[nl_sys_num]->addConstraint(c_name, name, parameters);
2706 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
bool _has_constraints
Whether or not this system has any Constraints.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ addConsumedPropertyName()

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

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

Definition at line 694 of file SubProblem.C.

Referenced by MaterialPropertyInterface::addConsumedPropertyName().

695 {
696  _consumed_material_properties[obj_name].insert(prop_name);
697 }
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
Definition: SubProblem.h:1112

◆ addCouplingGhostingFunctor()

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

Add a coupling functor to this problem's DofMaps.

Definition at line 1007 of file SubProblem.C.

1008 {
1009  const auto num_nl_sys = numNonlinearSystems();
1010  if (!num_nl_sys)
1011  return;
1012 
1013  systemBaseNonlinear(0).system().get_dof_map().add_coupling_functor(coupling_gf, to_mesh);
1014  cloneCouplingGhostingFunctor(coupling_gf, to_mesh);
1015 }
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 System & system()=0
Get the reference to the libMesh system.
void cloneCouplingGhostingFunctor(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:986
virtual std::size_t numNonlinearSystems() const =0

◆ addDamper()

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

Definition at line 4658 of file FEProblemBase.C.

4661 {
4662  parallel_object_only();
4663 
4664  const auto nl_sys_num =
4665  parameters.isParamValid("variable")
4666  ? determineNonlinearSystem(parameters.varName("variable", name), true).second
4667  : (unsigned int)0;
4668 
4669  parameters.set<SubProblem *>("_subproblem") = this;
4670  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
4671 
4672  _has_dampers = true;
4673  logAdd("Damper", name, damper_name);
4674  _nl[nl_sys_num]->addDamper(damper_name, name, parameters);
4675 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
bool _has_dampers
Whether or not this system has any Dampers associated with it.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
const InputParameters & parameters() const
Get the parameters of the object.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ addDGKernel()

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

Definition at line 2942 of file FEProblemBase.C.

2945 {
2946  parallel_object_only();
2947 
2948  const auto nl_sys_num =
2949  determineNonlinearSystem(parameters.varName("variable", name), true).second;
2950 
2951  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2952  {
2953  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2954  parameters.set<SystemBase *>("_sys") = &_displaced_problem->nlSys(nl_sys_num);
2956  }
2957  else
2958  {
2959  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2960  {
2961  // We allow DGKernels to request that they use_displaced_mesh,
2962  // but then be overridden when no displacements variables are
2963  // provided in the Mesh block. If that happened, update the value
2964  // of use_displaced_mesh appropriately for this DGKernel.
2965  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2966  parameters.set<bool>("use_displaced_mesh") = false;
2967  }
2968 
2969  parameters.set<SubProblem *>("_subproblem") = this;
2970  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2971  }
2972 
2973  logAdd("DGKernel", name, dg_kernel_name);
2974  _nl[nl_sys_num]->addDGKernel(dg_kernel_name, name, parameters);
2975 
2977 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.

◆ addDiracKernel()

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

Definition at line 2905 of file FEProblemBase.C.

2908 {
2909  parallel_object_only();
2910 
2911  const auto nl_sys_num =
2912  determineNonlinearSystem(parameters.varName("variable", name), true).second;
2913  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2914  {
2915  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2916  parameters.set<SystemBase *>("_sys") = &_displaced_problem->nlSys(nl_sys_num);
2917  _reinit_displaced_elem = true;
2918  }
2919  else
2920  {
2921  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2922  {
2923  // We allow DiracKernels to request that they use_displaced_mesh,
2924  // but then be overridden when no displacements variables are
2925  // provided in the Mesh block. If that happened, update the value
2926  // of use_displaced_mesh appropriately for this DiracKernel.
2927  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2928  parameters.set<bool>("use_displaced_mesh") = false;
2929  }
2930 
2931  parameters.set<SubProblem *>("_subproblem") = this;
2932  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2933  }
2934 
2935  logAdd("DiracKernel", name, kernel_name);
2936  _nl[nl_sys_num]->addDiracKernel(kernel_name, name, parameters);
2937 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addDisplacedProblem()

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

Definition at line 7000 of file FEProblemBase.C.

7001 {
7002  parallel_object_only();
7003 
7004  _displaced_mesh = &displaced_problem->mesh();
7005  _displaced_problem = displaced_problem;
7006 }
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 2374 of file FEProblemBase.C.

2377 {
2378  parameters.set<std::string>("type") = type;
2379  addObject<Distribution>(type, name, parameters, /* threaded = */ false);
2380 }
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
const InputParameters & parameters() const
Get the parameters of the object.

◆ addFunction()

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

Definition at line 2252 of file FEProblemBase.C.

Referenced by getFunction().

2255 {
2256  parallel_object_only();
2257 
2258  parameters.set<SubProblem *>("_subproblem") = this;
2259 
2260  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2261  {
2262  std::shared_ptr<Function> func = _factory.create<Function>(type, name, parameters, tid);
2263  logAdd("Function", name, type);
2264  _functions.addObject(func, tid);
2265 
2266  if (auto * const functor = dynamic_cast<Moose::FunctorBase<Real> *>(func.get()))
2267  {
2268  this->addFunctor(name, *functor, tid);
2269  if (_displaced_problem)
2270  _displaced_problem->addFunctor(name, *functor, tid);
2271  }
2272  else
2273  mooseError("Unrecognized function functor type");
2274  }
2275 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Base class for function objects.
Definition: Function.h:37
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
unsigned int n_threads()
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
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:1289
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
MooseObjectWarehouse< Function > _functions
functions
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:198

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

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

1292 {
1293  constexpr bool added_functor_is_ad =
1294  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1295 
1296  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1297 
1298  auto & functor_to_request_info = _functor_to_request_info[tid];
1299  auto & functors = _functors[tid];
1300  auto it = functors.find("wraps_" + name);
1301  if (it != functors.end())
1302  {
1303  // We have this functor already. If it's a null functor, we want to replace it with the valid
1304  // functor we have now. If it's not then we'll add a new entry into the multimap and then we'll
1305  // error later if a user requests a functor because their request is ambiguous. This is the
1306  // reason that the functors container is a multimap: for nice error messages
1307  auto * const existing_wrapper_base =
1308  added_functor_is_ad ? std::get<2>(it->second).get() : std::get<1>(it->second).get();
1309  auto * const existing_wrapper = dynamic_cast<Moose::Functor<T> *>(existing_wrapper_base);
1310  if (existing_wrapper && existing_wrapper->template wrapsType<Moose::NullFunctor<T>>())
1311  {
1312  // Sanity check
1313  auto [request_info_it, request_info_end_it] = functor_to_request_info.equal_range(name);
1314  if (request_info_it == request_info_end_it)
1315  mooseError("We are wrapping a NullFunctor but we don't have any unfilled functor request "
1316  "info. This doesn't make sense.");
1317 
1318  // Check for valid requests
1319  while (request_info_it != request_info_end_it)
1320  {
1321  auto & [requested_functor_is_ad, requestor_is_ad] = request_info_it->second;
1322  if (!requested_functor_is_ad && requestor_is_ad && added_functor_is_ad)
1323  mooseError("We are requesting a non-AD functor from an AD object, but the true functor "
1324  "is AD. This means we could be dropping important derivatives. We will not "
1325  "allow this");
1326  // We're going to eventually check whether we've fulfilled all functor requests and our
1327  // check will be that the multimap is empty. This request is fulfilled, so erase it from the
1328  // map now
1329  request_info_it = functor_to_request_info.erase(request_info_it);
1330  }
1331 
1332  // Ok we didn't have the functor before, so we will add it now
1333  std::get<0>(it->second) =
1335  existing_wrapper->assign(functor);
1336  // Finally we create the non-AD or AD complement of the just added functor
1337  if constexpr (added_functor_is_ad)
1338  {
1339  typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1340  auto * const existing_non_ad_wrapper_base = std::get<1>(it->second).get();
1341  auto * const existing_non_ad_wrapper =
1342  dynamic_cast<Moose::Functor<NonADType> *>(existing_non_ad_wrapper_base);
1343  mooseAssert(existing_non_ad_wrapper->template wrapsType<Moose::NullFunctor<NonADType>>(),
1344  "Both members of pair should have been wrapping a NullFunctor");
1345  existing_non_ad_wrapper->assign(
1346  std::make_unique<Moose::RawValueFunctor<NonADType>>(functor));
1347  }
1348  else
1349  {
1350  typedef typename Moose::ADType<T>::type ADType;
1351  auto * const existing_ad_wrapper_base = std::get<2>(it->second).get();
1352  auto * const existing_ad_wrapper =
1353  dynamic_cast<Moose::Functor<ADType> *>(existing_ad_wrapper_base);
1354  mooseAssert(existing_ad_wrapper->template wrapsType<Moose::NullFunctor<ADType>>(),
1355  "Both members of pair should have been wrapping a NullFunctor");
1356  existing_ad_wrapper->assign(std::make_unique<Moose::ADWrapperFunctor<ADType>>(functor));
1357  }
1358  return;
1359  }
1360  }
1361 
1362  // We are a new functor, create the opposite ADType one and store it with other functors
1363  if constexpr (added_functor_is_ad)
1364  {
1365  typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1366  auto new_non_ad_wrapper = std::make_unique<Moose::Functor<NonADType>>(
1367  std::make_unique<Moose::RawValueFunctor<NonADType>>(functor));
1368  auto new_ad_wrapper = std::make_unique<Moose::Functor<T>>(functor);
1369  _functors[tid].emplace("wraps_" + name,
1370  std::make_tuple(SubProblem::TrueFunctorIs::AD,
1371  std::move(new_non_ad_wrapper),
1372  std::move(new_ad_wrapper)));
1373  }
1374  else
1375  {
1376  typedef typename Moose::ADType<T>::type ADType;
1377  auto new_non_ad_wrapper = std::make_unique<Moose::Functor<T>>((functor));
1378  auto new_ad_wrapper = std::make_unique<Moose::Functor<ADType>>(
1379  std::make_unique<Moose::ADWrapperFunctor<ADType>>(functor));
1380  _functors[tid].emplace("wraps_" + name,
1381  std::make_tuple(SubProblem::TrueFunctorIs::NONAD,
1382  std::move(new_non_ad_wrapper),
1383  std::move(new_ad_wrapper)));
1384  }
1385 }
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1147
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
Wraps non-AD functors such that they can be used in objects that have requested the functor as AD...
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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:1088
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::vector< std::multimap< std::string, std::tuple< TrueFunctorIs, std::unique_ptr< Moose::FunctorEnvelopeBase >, std::unique_ptr< Moose::FunctorEnvelopeBase > > > > _functors
A container holding pointers to all the functors in our problem.
Definition: SubProblem.h:1071
A functor that serves as a placeholder during the simulation setup phase if a functor consumer reques...

◆ addFunctorMaterial()

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

Definition at line 3352 of file FEProblemBase.C.

3355 {
3356  parallel_object_only();
3357 
3358  auto add_functor_materials = [&](const auto & parameters, const auto & name)
3359  {
3360  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3361  {
3362  // Create the general Block/Boundary MaterialBase object
3363  std::shared_ptr<MaterialBase> material =
3364  _factory.create<MaterialBase>(functor_material_name, name, parameters, tid);
3365  logAdd("FunctorMaterial", name, functor_material_name);
3366  _all_materials.addObject(material, tid);
3367  _materials.addObject(material, tid);
3368  }
3369  };
3370 
3371  parameters.set<SubProblem *>("_subproblem") = this;
3372  add_functor_materials(parameters, name);
3373  if (_displaced_problem)
3374  {
3375  auto disp_params = parameters;
3376  disp_params.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3377  add_functor_materials(disp_params, name + "_displaced");
3378  }
3379 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
unsigned int n_threads()
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
MaterialBases compute MaterialProperties.
Definition: MaterialBase.h:60
MaterialWarehouse _all_materials
unsigned int THREAD_ID
Definition: MooseTypes.h:198
MaterialWarehouse _materials

◆ addFVBC()

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

Definition at line 2994 of file FEProblemBase.C.

Referenced by DiffusionFV::addFVBCs().

2997 {
2998  addObject<FVBoundaryCondition>(fv_bc_name, name, parameters);
2999 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const InputParameters & parameters() const
Get the parameters of the object.

◆ addFVInitialCondition()

void FEProblemBase::addFVInitialCondition ( const std::string &  ic_name,
const std::string &  name,
InputParameters parameters 
)
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 3143 of file FEProblemBase.C.

3146 {
3147  parallel_object_only();
3148 
3149  // before we start to mess with the initial condition, we need to check parameters for errors.
3151  const std::string & var_name = parameters.get<VariableName>("variable");
3152 
3153  // Forbid initial conditions on a restarted problem, as they would override the restart
3154  checkICRestartError(ic_name, name, var_name);
3155 
3156  parameters.set<SubProblem *>("_subproblem") = this;
3157 
3158  // field IC
3159  if (hasVariable(var_name))
3160  {
3161  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
3162  {
3163  auto & var = getVariable(
3165  parameters.set<SystemBase *>("_sys") = &var.sys();
3166  std::shared_ptr<FVInitialConditionBase> ic;
3167  if (dynamic_cast<MooseVariableFVReal *>(&var))
3168  ic = _factory.create<FVInitialCondition>(ic_name, name, parameters, tid);
3169  else
3170  mooseError(
3171  "Your variable for an FVInitialCondition needs to be an a finite volume variable!");
3172  _fv_ics.addObject(ic, tid);
3173  }
3174  }
3175  else
3176  mooseError("Variable '",
3177  var_name,
3178  "' requested in finite volume initial condition '",
3179  name,
3180  "' does not exist.");
3181 }
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:972
unsigned int n_threads()
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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...
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:75
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
void checkICRestartError(const std::string &ic_name, const std::string &name, const VariableName &var_name)
Checks if the variable of the initial condition is getting restarted and errors for specific cases...
void addObject(std::shared_ptr< FVInitialConditionBase > object, THREAD_ID tid, bool recurse=true)
Add object to the warehouse.
FVInitialConditionWarehouse _fv_ics
This is a template class that implements the workhorse compute and computeNodal methods.
unsigned int THREAD_ID
Definition: MooseTypes.h:198

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

3005 {
3008  addObject<FVInterfaceKernel>(
3009  fv_ik_name, name, parameters, /*threaded=*/true, /*variable_param_name=*/"variable1");
3010 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const InputParameters & parameters() const
Get the parameters of the object.

◆ addFVKernel()

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

Definition at line 2980 of file FEProblemBase.C.

Referenced by DiffusionFV::addFVKernels().

2983 {
2984  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2985  // FVElementalKernels are computed in the historically finite element threaded loops. They rely
2986  // on Assembly data like _current_elem. When we call reinit on the FEProblemBase we will only
2987  // reinit the DisplacedProblem and its associated Assembly objects if we mark this boolean as
2988  // true
2989  _reinit_displaced_elem = true;
2990  addObject<FVKernel>(fv_kernel_name, name, parameters);
2991 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

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

Referenced by DisplacedProblem::addGhostedBoundary().

1857 {
1858  _mesh.addGhostedBoundary(boundary_id);
1859  if (_displaced_problem)
1860  _displaced_mesh->addGhostedBoundary(boundary_id);
1861 }
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:2979
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 1849 of file FEProblemBase.C.

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

1850 {
1851  if (_mesh.elemPtr(elem_id)->processor_id() != processor_id())
1852  _ghosted_elems.insert(elem_id);
1853 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1023
MooseMesh & _mesh
processor_id_type processor_id() const

◆ addIndicator()

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

Definition at line 4685 of file FEProblemBase.C.

4688 {
4689  parallel_object_only();
4690 
4691  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4692  {
4693  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4694  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
4695  _reinit_displaced_elem = true;
4696  }
4697  else
4698  {
4699  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
4700  {
4701  // We allow Indicators to request that they use_displaced_mesh,
4702  // but then be overridden when no displacements variables are
4703  // provided in the Mesh block. If that happened, update the value
4704  // of use_displaced_mesh appropriately for this Indicator.
4705  if (parameters.have_parameter<bool>("use_displaced_mesh"))
4706  parameters.set<bool>("use_displaced_mesh") = false;
4707  }
4708 
4709  parameters.set<SubProblem *>("_subproblem") = this;
4710  parameters.set<SystemBase *>("_sys") = _aux.get();
4711  }
4712 
4713  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
4714  {
4715  std::shared_ptr<Indicator> indicator =
4716  _factory.create<Indicator>(indicator_name, name, parameters, tid);
4717  logAdd("Indicator", name, indicator_name);
4718  std::shared_ptr<InternalSideIndicator> isi =
4720  if (isi)
4722  else
4723  _indicators.addObject(indicator, tid);
4724  }
4725 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
unsigned int n_threads()
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators
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.
The InternalSideIndicator class is responsible for calculating the residuals for various physics on i...
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:198

◆ addInitialCondition()

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

Definition at line 3085 of file FEProblemBase.C.

3088 {
3089  parallel_object_only();
3090 
3091  // before we start to mess with the initial condition, we need to check parameters for errors.
3093  const std::string & var_name = parameters.get<VariableName>("variable");
3094 
3095  // Forbid initial conditions on a restarted problem, as they would override the restart
3096  checkICRestartError(ic_name, name, var_name);
3097 
3098  parameters.set<SubProblem *>("_subproblem") = this;
3099 
3100  // field IC
3101  if (hasVariable(var_name))
3102  {
3103  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
3104  {
3107  parameters.set<SystemBase *>("_sys") = &var.sys();
3108  std::shared_ptr<InitialConditionBase> ic;
3109  if (dynamic_cast<MooseVariable *>(&var))
3110  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3111  else if (dynamic_cast<VectorMooseVariable *>(&var))
3112  ic = _factory.create<VectorInitialCondition>(ic_name, name, parameters, tid);
3113  else if (dynamic_cast<ArrayMooseVariable *>(&var))
3114  ic = _factory.create<ArrayInitialCondition>(ic_name, name, parameters, tid);
3115  else if (dynamic_cast<MooseVariableFVReal *>(&var))
3116  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3117  else
3118  mooseError("Your FE variable in initial condition ",
3119  name,
3120  " must be either of scalar or vector type");
3121  logAdd("IC", name, ic_name);
3122  _ics.addObject(ic, tid);
3123  }
3124  }
3125 
3126  // scalar IC
3127  else if (hasScalarVariable(var_name))
3128  {
3129  MooseVariableScalar & var = getScalarVariable(0, var_name);
3130  parameters.set<SystemBase *>("_sys") = &var.sys();
3131  std::shared_ptr<ScalarInitialCondition> ic =
3133  logAdd("ScalarIC", name, ic_name);
3134  _scalar_ics.addObject(ic);
3135  }
3136 
3137  else
3138  mooseError(
3139  "Variable '", var_name, "' requested in initial condition '", name, "' does not exist.");
3140 }
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
unsigned int n_threads()
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
This is a template class that implements the workhorse compute and computeNodal methods.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided...
This class provides an interface for common operations on field variables of both FE and FV types wit...
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
ScalarInitialConditionWarehouse _scalar_ics
virtual 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:75
Class for scalar variables (they are different).
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
void checkICRestartError(const std::string &ic_name, const std::string &name, const VariableName &var_name)
Checks if the variable of the initial condition is getting restarted and errors for specific cases...
SystemBase & sys()
Get the system this variable is part of.
unsigned int THREAD_ID
Definition: MooseTypes.h:198

◆ addInterfaceKernel()

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

Definition at line 3015 of file FEProblemBase.C.

3018 {
3019  parallel_object_only();
3020 
3021  const auto nl_sys_num =
3022  determineNonlinearSystem(parameters.varName("variable", name), true).second;
3023 
3024  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3025  {
3026  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3027  parameters.set<SystemBase *>("_sys") = &_displaced_problem->nlSys(nl_sys_num);
3029  }
3030  else
3031  {
3032  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3033  {
3034  // We allow InterfaceKernels to request that they use_displaced_mesh,
3035  // but then be overridden when no displacements variables are
3036  // provided in the Mesh block. If that happened, update the value
3037  // of use_displaced_mesh appropriately for this InterfaceKernel.
3038  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3039  parameters.set<bool>("use_displaced_mesh") = false;
3040  }
3041 
3042  parameters.set<SubProblem *>("_subproblem") = this;
3043  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3044  }
3045 
3046  logAdd("InterfaceKernel", name, interface_kernel_name);
3047  _nl[nl_sys_num]->addInterfaceKernel(interface_kernel_name, name, parameters);
3048 
3050 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.

◆ addInterfaceMaterial()

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

Definition at line 3390 of file FEProblemBase.C.

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

◆ addJacobian()

void FEProblemBase::addJacobian ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1693 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1694 {
1695  _assembly[tid][_current_nl_sys->number()]->addJacobian(Assembly::GlobalDataKey{});
1697  _assembly[tid][_current_nl_sys->number()]->addJacobianNonlocal(Assembly::GlobalDataKey{});
1698  if (_displaced_problem)
1699  {
1700  _displaced_problem->addJacobian(tid);
1702  _displaced_problem->addJacobianNonlocal(tid);
1703  }
1704 }
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:1125
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:794

◆ addJacobianBlockTags()

void FEProblemBase::addJacobianBlockTags ( SparseMatrix< 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 1768 of file FEProblemBase.C.

Referenced by ComputeJacobianBlocksThread::postElement().

1775 {
1776  _assembly[tid][_current_nl_sys->number()]->addJacobianBlockTags(
1777  jacobian, ivar, jvar, dof_map, dof_indices, Assembly::GlobalDataKey{}, tags);
1778 
1780  if (_nonlocal_cm[_current_nl_sys->number()](ivar, jvar) != 0)
1781  {
1782  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
1783  _assembly[tid][_current_nl_sys->number()]->addJacobianBlockNonlocalTags(
1784  jacobian,
1785  ivar,
1786  jvar,
1787  dof_map,
1788  dof_indices,
1789  jv.allDofIndices(),
1791  tags);
1792  }
1793 
1794  if (_displaced_problem)
1795  {
1796  _displaced_problem->addJacobianBlockTags(jacobian, ivar, jvar, dof_map, dof_indices, tags, tid);
1798  if (_nonlocal_cm[_current_nl_sys->number()](ivar, jvar) != 0)
1799  {
1800  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
1801  _displaced_problem->addJacobianBlockNonlocal(
1802  jacobian, ivar, jvar, dof_map, dof_indices, jv.allDofIndices(), tags, tid);
1803  }
1804  }
1805 }
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...
std::vector< CouplingMatrix > _nonlocal_cm
Definition: SubProblem.h:974
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:1125
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:79
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:794

◆ addJacobianLowerD()

void FEProblemBase::addJacobianLowerD ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1723 of file FEProblemBase.C.

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

1724 {
1725  _assembly[tid][_current_nl_sys->number()]->addJacobianLowerD(Assembly::GlobalDataKey{});
1726  if (_displaced_problem)
1727  _displaced_problem->addJacobianLowerD(tid);
1728 }
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:1125
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:794

◆ addJacobianNeighbor() [1/2]

void FEProblemBase::addJacobianNeighbor ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1707 of file FEProblemBase.C.

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

1708 {
1709  _assembly[tid][_current_nl_sys->number()]->addJacobianNeighbor(Assembly::GlobalDataKey{});
1710  if (_displaced_problem)
1711  _displaced_problem->addJacobianNeighbor(tid);
1712 }
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:1125
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:794

◆ addJacobianNeighbor() [2/2]

void FEProblemBase::addJacobianNeighbor ( SparseMatrix< 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

Implements SubProblem.

Definition at line 1808 of file FEProblemBase.C.

1816 {
1817  _assembly[tid][_current_nl_sys->number()]->addJacobianNeighborTags(jacobian,
1818  ivar,
1819  jvar,
1820  dof_map,
1821  dof_indices,
1822  neighbor_dof_indices,
1824  tags);
1825  if (_displaced_problem)
1826  _displaced_problem->addJacobianNeighbor(
1827  jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices, tags, tid);
1828 }
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:1125
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:794

◆ addJacobianNeighborLowerD()

void FEProblemBase::addJacobianNeighborLowerD ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1715 of file FEProblemBase.C.

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

1716 {
1717  _assembly[tid][_current_nl_sys->number()]->addJacobianNeighborLowerD(Assembly::GlobalDataKey{});
1718  if (_displaced_problem)
1719  _displaced_problem->addJacobianNeighborLowerD(tid);
1720 }
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:1125
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:794

◆ addJacobianOffDiagScalar()

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

Definition at line 1737 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

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

◆ addJacobianScalar()

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

Definition at line 1731 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

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

◆ addKernel()

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

Definition at line 2521 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEKernels().

2524 {
2525  parallel_object_only();
2526 
2527  const auto nl_sys_num =
2528  determineNonlinearSystem(parameters.varName("variable", name), true).second;
2529  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2530  {
2531  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2532  parameters.set<SystemBase *>("_sys") = &_displaced_problem->nlSys(nl_sys_num);
2533  _reinit_displaced_elem = true;
2534  }
2535  else
2536  {
2537  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2538  {
2539  // We allow Kernels to request that they use_displaced_mesh,
2540  // but then be overridden when no displacements variables are
2541  // provided in the Mesh block. If that happened, update the value
2542  // of use_displaced_mesh appropriately for this Kernel.
2543  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2544  parameters.set<bool>("use_displaced_mesh") = false;
2545  }
2546 
2547  parameters.set<SubProblem *>("_subproblem") = this;
2548  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2549  }
2550 
2551  logAdd("Kernel", name, kernel_name);
2552  _nl[nl_sys_num]->addKernel(kernel_name, name, parameters);
2553 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addLineSearch()

virtual void FEProblemBase::addLineSearch ( const InputParameters )
inlinevirtual

add a MOOSE line search

Reimplemented in DumpObjectsProblem, and FEProblem.

Definition at line 623 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

624  {
625  mooseError("Line search not implemented for this problem type yet.");
626  }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ addMarker()

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

Definition at line 4728 of file FEProblemBase.C.

4731 {
4732  parallel_object_only();
4733 
4734  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4735  {
4736  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4737  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
4738  _reinit_displaced_elem = true;
4739  }
4740  else
4741  {
4742  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
4743  {
4744  // We allow Markers to request that they use_displaced_mesh,
4745  // but then be overridden when no displacements variables are
4746  // provided in the Mesh block. If that happened, update the value
4747  // of use_displaced_mesh appropriately for this Marker.
4748  if (parameters.have_parameter<bool>("use_displaced_mesh"))
4749  parameters.set<bool>("use_displaced_mesh") = false;
4750  }
4751 
4752  parameters.set<SubProblem *>("_subproblem") = this;
4753  parameters.set<SystemBase *>("_sys") = _aux.get();
4754  }
4755 
4756  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
4757  {
4758  std::shared_ptr<Marker> marker = _factory.create<Marker>(marker_name, name, parameters, tid);
4759  logAdd("Marker", name, marker_name);
4760  _markers.addObject(marker, tid);
4761  }
4762 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
unsigned int n_threads()
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
Definition: Marker.h:35
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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:75
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
MooseObjectWarehouse< Marker > _markers
unsigned int THREAD_ID
Definition: MooseTypes.h:198

◆ addMaterial()

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

Definition at line 3382 of file FEProblemBase.C.

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

◆ addMaterialHelper()

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

Definition at line 3398 of file FEProblemBase.C.

Referenced by addInterfaceMaterial(), and addMaterial().

3402 {
3403  parallel_object_only();
3404 
3405  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3406  {
3407  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3409  }
3410  else
3411  {
3412  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3413  {
3414  // We allow Materials to request that they use_displaced_mesh,
3415  // but then be overridden when no displacements variables are
3416  // provided in the Mesh block. If that happened, update the value
3417  // of use_displaced_mesh appropriately for this Material.
3418  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3419  parameters.set<bool>("use_displaced_mesh") = false;
3420  }
3421 
3422  parameters.set<SubProblem *>("_subproblem") = this;
3423  }
3424 
3425  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3426  {
3427  // Create the general Block/Boundary MaterialBase object
3428  std::shared_ptr<MaterialBase> material =
3429  _factory.create<MaterialBase>(mat_name, name, parameters, tid);
3430  logAdd("Material", name, mat_name);
3431  bool discrete = !material->getParam<bool>("compute");
3432 
3433  // If the object is boundary restricted or if it is a functor material we do not create the
3434  // neighbor and face objects
3435  if (material->boundaryRestricted() || dynamic_cast<FunctorMaterial *>(material.get()))
3436  {
3437  _all_materials.addObject(material, tid);
3438  if (discrete)
3439  _discrete_materials.addObject(material, tid);
3440  else
3441  for (auto && warehouse : warehouses)
3442  warehouse->addObject(material, tid);
3443  }
3444 
3445  // Non-boundary restricted require face and neighbor objects
3446  else
3447  {
3448  // TODO: we only need to do this if we have needs for face materials (e.g.
3449  // FV, DG, etc.) - but currently we always do it. Figure out how to fix
3450  // this.
3451 
3452  // The name of the object being created, this is changed multiple times as objects are
3453  // created below
3454  std::string object_name;
3455 
3456  // Create a copy of the supplied parameters to the setting for "_material_data_type" isn't
3457  // used from a previous tid loop
3458  InputParameters current_parameters = parameters;
3459 
3460  // face material
3461  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
3463  object_name = name + "_face";
3464  std::shared_ptr<MaterialBase> face_material =
3465  _factory.create<MaterialBase>(mat_name, object_name, current_parameters, tid);
3466 
3467  // neighbor material
3468  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
3470  current_parameters.set<bool>("_neighbor") = true;
3471  object_name = name + "_neighbor";
3472  std::shared_ptr<MaterialBase> neighbor_material =
3473  _factory.create<MaterialBase>(mat_name, object_name, current_parameters, tid);
3474 
3475  // Store the material objects
3476  _all_materials.addObjects(material, neighbor_material, face_material, tid);
3477 
3478  if (discrete)
3479  _discrete_materials.addObjects(material, neighbor_material, face_material, tid);
3480  else
3481  for (auto && warehouse : warehouses)
3482  warehouse->addObjects(material, neighbor_material, face_material, tid);
3483 
3484  // Names of all controllable parameters for this Material object
3485  const std::string & base = parameters.get<std::string>("_moose_base");
3486  MooseObjectParameterName name(MooseObjectName(base, material->name()), "*");
3487  const auto param_names =
3489 
3490  // Connect parameters of the primary Material object to those on the face and neighbor
3491  // objects
3492  for (const auto & p_name : param_names)
3493  {
3494  MooseObjectParameterName primary_name(MooseObjectName(base, material->name()),
3495  p_name.parameter());
3496  MooseObjectParameterName face_name(MooseObjectName(base, face_material->name()),
3497  p_name.parameter());
3498  MooseObjectParameterName neighbor_name(MooseObjectName(base, neighbor_material->name()),
3499  p_name.parameter());
3501  primary_name, face_name, false);
3503  primary_name, neighbor_name, false);
3504  }
3505  }
3506  }
3507 }
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.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
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:2224
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:604
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< MooseObjectParameterName > getControllableParameterNames(const MooseObjectParameterName &input) const
Return a vector of parameters names matching the supplied name.
FunctorMaterials compute functor material properties.
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:69
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:75
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
A class for storing an input parameter name.
A class for storing the names of MooseObject by tag and object name.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
MaterialBases compute MaterialProperties.
Definition: MaterialBase.h:60
MaterialWarehouse _all_materials
unsigned int THREAD_ID
Definition: MooseTypes.h:198

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

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

278 {
279  auto tag_name_upper = MooseUtils::toUpper(tag_name);
280  auto existing_tag = _matrix_tag_name_to_tag_id.find(tag_name_upper);
281  if (existing_tag == _matrix_tag_name_to_tag_id.end())
282  {
283  auto tag_id = _matrix_tag_name_to_tag_id.size();
284 
285  _matrix_tag_name_to_tag_id[tag_name_upper] = tag_id;
286 
287  _matrix_tag_id_to_tag_name[tag_id] = tag_name_upper;
288  }
289 
290  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
291 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:966
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1037
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:969

◆ addMeshDivision()

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

Add a MeshDivision.

Definition at line 2329 of file FEProblemBase.C.

2332 {
2333  parallel_object_only();
2334  parameters.set<FEProblemBase *>("_fe_problem_base") = this;
2335  parameters.set<SubProblem *>("_subproblem") = this;
2336  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2337  {
2338  std::shared_ptr<MeshDivision> func = _factory.create<MeshDivision>(type, name, parameters, tid);
2339  _mesh_divisions.addObject(func, tid);
2340  }
2341 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
unsigned int n_threads()
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
Base class for MeshDivision objects.
Definition: MeshDivision.h:35
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
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:75
const InputParameters & parameters() const
Get the parameters of the object.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:198

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

4768 {
4769  parallel_object_only();
4770 
4771  parameters.set<MPI_Comm>("_mpi_comm") = _communicator.get();
4772  parameters.set<std::shared_ptr<CommandLine>>("_command_line") = _app.commandLine();
4773 
4774  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4775  {
4776  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4777  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
4778  _reinit_displaced_elem = true;
4779  }
4780  else
4781  {
4782  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
4783  {
4784  // We allow MultiApps to request that they use_displaced_mesh,
4785  // but then be overridden when no displacements variables are
4786  // provided in the Mesh block. If that happened, update the value
4787  // of use_displaced_mesh appropriately for this MultiApp.
4788  if (parameters.have_parameter<bool>("use_displaced_mesh"))
4789  parameters.set<bool>("use_displaced_mesh") = false;
4790  }
4791 
4792  parameters.set<SubProblem *>("_subproblem") = this;
4793  parameters.set<SystemBase *>("_sys") = _aux.get();
4794  }
4795 
4796  std::shared_ptr<MultiApp> multi_app = _factory.create<MultiApp>(multi_app_name, name, parameters);
4797  logAdd("MultiApp", name, multi_app_name);
4798  multi_app->setupPositions();
4799 
4800  _multi_apps.addObject(multi_app);
4801 
4802  // Store TransientMultiApp objects in another container, this is needed for calling computeDT
4803  std::shared_ptr<TransientMultiApp> trans_multi_app =
4805  if (trans_multi_app)
4806  _transient_multi_apps.addObject(trans_multi_app);
4807 }
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.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
std::shared_ptr< CommandLine > commandLine() const
Get the command line.
Definition: MooseApp.h:425
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
MultiApp Implementation for Transient Apps.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
const Parallel::Communicator & _communicator
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling &#39;computeDT&#39;)
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
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:75
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
A MultiApp represents one or more MOOSE applications that are running simultaneously.
Definition: MultiApp.h:112

◆ addNodalKernel()

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

Definition at line 2556 of file FEProblemBase.C.

2559 {
2560  parallel_object_only();
2561 
2562  const auto nl_sys_num =
2563  determineNonlinearSystem(parameters.varName("variable", name), true).second;
2564  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2565  {
2566  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2567  parameters.set<SystemBase *>("_sys") = &_displaced_problem->nlSys(nl_sys_num);
2568  _reinit_displaced_elem = true;
2569  }
2570  else
2571  {
2572  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2573  {
2574  // We allow NodalKernels to request that they use_displaced_mesh,
2575  // but then be overridden when no displacements variables are
2576  // provided in the Mesh block. If that happened, update the value
2577  // of use_displaced_mesh appropriately for this NodalKernel.
2578  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2579  parameters.set<bool>("use_displaced_mesh") = false;
2580  }
2581 
2582  parameters.set<SubProblem *>("_subproblem") = this;
2583  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2584  }
2585  logAdd("NodalKernel", name, kernel_name);
2586  _nl[nl_sys_num]->addNodalKernel(kernel_name, name, parameters);
2587 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

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

2696 {
2697  parallel_object_only();
2698 
2699  logAdd(MooseUtils::prettyCppType<T>(), name, type);
2700  // Add the _subproblem and _sys parameters depending on use_displaced_mesh
2701  addObjectParamsHelper(parameters, name, var_param_name);
2702 
2703  const auto n_threads = threaded ? libMesh::n_threads() : 1;
2704  std::vector<std::shared_ptr<T>> objects(n_threads);
2705  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
2706  {
2707  std::shared_ptr<T> obj = _factory.create<T>(type, name, parameters, tid);
2708  theWarehouse().add(obj);
2709  objects[tid] = std::move(obj);
2710  }
2711 
2712  return objects;
2713 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
unsigned int n_threads()
void add(std::shared_ptr< MooseObject > obj)
add adds a new object to the warehouse and stores attributes/metadata about it for running queries/fi...
Definition: TheWarehouse.C:116
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
TheWarehouse & theWarehouse() const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
void addObjectParamsHelper(InputParameters &params, const std::string &object_name, const std::string &var_param_name="variable")
Helper for setting the "_subproblem" and "_sys" parameters in addObject() and in addUserObject().
const InputParameters & parameters() const
Get the parameters of the object.
unsigned int THREAD_ID
Definition: MooseTypes.h:198

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

Referenced by addObject(), and addUserObject().

3740 {
3741  const auto nl_sys_num =
3742  parameters.isParamValid(var_param_name) &&
3743  determineNonlinearSystem(parameters.varName(var_param_name, object_name)).first
3744  ? determineNonlinearSystem(parameters.varName(var_param_name, object_name)).second
3745  : (unsigned int)0;
3746 
3747  if (_displaced_problem && parameters.have_parameter<bool>("use_displaced_mesh") &&
3748  parameters.get<bool>("use_displaced_mesh"))
3749  {
3750  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3751  parameters.set<SystemBase *>("_sys") = &_displaced_problem->nlSys(nl_sys_num);
3752  }
3753  else
3754  {
3755  // The object requested use_displaced_mesh, but it was overridden
3756  // due to there being no displacements variables in the [Mesh] block.
3757  // If that happened, update the value of use_displaced_mesh appropriately.
3758  if (!_displaced_problem && parameters.have_parameter<bool>("use_displaced_mesh") &&
3759  parameters.get<bool>("use_displaced_mesh"))
3760  parameters.set<bool>("use_displaced_mesh") = false;
3761 
3762  parameters.set<SubProblem *>("_subproblem") = this;
3763  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3764  }
3765 }
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ addOutput()

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

Adds an Output object.

Definition at line 8061 of file FEProblemBase.C.

8064 {
8065  parallel_object_only();
8066 
8067  // Get a reference to the OutputWarehouse
8068  OutputWarehouse & output_warehouse = _app.getOutputWarehouse();
8069 
8070  // Reject the reserved names for objects not built by MOOSE
8071  if (!parameters.get<bool>("_built_by_moose") && output_warehouse.isReservedName(object_name))
8072  mooseError("The name '", object_name, "' is a reserved name for output objects");
8073 
8074  // Check that an object by the same name does not already exist; this must be done before the
8075  // object is created to avoid getting misleading errors from the Parser
8076  if (output_warehouse.hasOutput(object_name))
8077  mooseError("An output object named '", object_name, "' already exists");
8078 
8079  // Add a pointer to the FEProblemBase class
8080  parameters.addPrivateParam<FEProblemBase *>("_fe_problem_base", this);
8081 
8082  // Create common parameter exclude list
8083  std::vector<std::string> exclude;
8084  if (object_type == "Console")
8085  {
8086  exclude.push_back("execute_on");
8087 
8088  // --show-input should enable the display of the input file on the screen
8089  if (_app.getParam<bool>("show_input") && parameters.get<bool>("output_screen"))
8090  parameters.set<ExecFlagEnum>("execute_input_on") = EXEC_INITIAL;
8091  }
8092  // Need this because Checkpoint::validParams changes the default value of
8093  // execute_on
8094  else if (object_type == "Checkpoint")
8095  exclude.push_back("execute_on");
8096 
8097  // Apply the common parameters loaded with Outputs input syntax
8098  const InputParameters * common = output_warehouse.getCommonParameters();
8099  if (common)
8100  parameters.applyParameters(*common, exclude);
8101 
8102  // Set the correct value for the binary flag for XDA/XDR output
8103  if (object_type == "XDR")
8104  parameters.set<bool>("_binary") = true;
8105  else if (object_type == "XDA")
8106  parameters.set<bool>("_binary") = false;
8107 
8108  // Adjust the checkpoint suffix if auto recovery was enabled
8109  if (object_name == "auto_recovery_checkpoint")
8110  parameters.set<std::string>("suffix") = "auto_recovery";
8111 
8112  // Create the object and add it to the warehouse
8113  std::shared_ptr<Output> output = _factory.create<Output>(object_type, object_name, parameters);
8114  logAdd("Output", object_name, object_type);
8115  output_warehouse.addOutput(output);
8116 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
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.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Based class for output objects.
Definition: Output.h:43
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
Class for storing and utilizing output objects.
void applyParameters(const InputParameters &common, std::vector< std::string > exclude=std::vector< std::string >())
Method for applying common parameters.
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
Definition: MooseApp.h:1474
const InputParameters * getCommonParameters() const
Get a reference to the common output parameters.
void addOutput(std::shared_ptr< Output > output)
Adds an existing output object to the warehouse.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1772
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28

◆ addPiecewiseByBlockLambdaFunctor()

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

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

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

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

Definition at line 1252 of file SubProblem.h.

Referenced by FunctorMaterial::addFunctorPropertyByBlocks().

1258 {
1259  auto & pbblf_functors = _pbblf_functors[tid];
1260 
1261  auto [it, first_time_added] =
1262  pbblf_functors.emplace(name,
1263  std::make_unique<PiecewiseByBlockLambdaFunctor<T>>(
1264  name, my_lammy, clearance_schedule, mesh, block_ids));
1265 
1266  auto * functor = dynamic_cast<PiecewiseByBlockLambdaFunctor<T> *>(it->second.get());
1267  if (!functor)
1268  {
1269  if (first_time_added)
1270  mooseError("This should be impossible. If this was the first time we added the functor, then "
1271  "the dynamic cast absolutely should have succeeded");
1272  else
1273  mooseError("Attempted to add a lambda functor with the name '",
1274  name,
1275  "' but another lambda functor of that name returns a different type");
1276  }
1277 
1278  if (first_time_added)
1279  addFunctor(name, *functor, tid);
1280  else
1281  // The functor already exists
1282  functor->setFunctor(mesh, block_ids, my_lammy);
1283 
1284  return *functor;
1285 }
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:1289
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::map< std::string, std::unique_ptr< Moose::FunctorAbstract > > > _pbblf_functors
Container to hold PiecewiseByBlockLambdaFunctors.
Definition: SubProblem.h:1074
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ addPostprocessor()

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

Definition at line 3768 of file FEProblemBase.C.

3771 {
3772  // Check for name collision
3773  if (hasUserObject(name))
3774  mooseError("A UserObject with the name \"",
3775  name,
3776  "\" already exists. You may not add a Postprocessor by the same name.");
3777 
3778  addUserObject(pp_name, name, parameters);
3779 }
virtual void addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addPredictor()

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

Definition at line 6156 of file FEProblemBase.C.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector().

6159 {
6160  parallel_object_only();
6161 
6162  parameters.set<SubProblem *>("_subproblem") = this;
6163  std::shared_ptr<Predictor> predictor = _factory.create<Predictor>(type, name, parameters);
6164  logAdd("Predictor", name, type);
6165 
6166  for (auto & nl : _nl)
6167  nl->setPredictor(predictor);
6168 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
Base class for predictors.
Definition: Predictor.h:28
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
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)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
const InputParameters & parameters() const
Get the parameters of the object.

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

Referenced by MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer().

3799 {
3800  // Check for name collision
3801  if (hasUserObject(name))
3802  mooseError(std::string("A UserObject with the name \"") + name +
3803  "\" already exists. You may not add a Reporter by the same name.");
3804 
3806 }
virtual void addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addResidual()

void FEProblemBase::addResidual ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1593 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1594 {
1595  _assembly[tid][_current_nl_sys->number()]->addResidual(Assembly::GlobalDataKey{},
1597 
1598  if (_displaced_problem)
1599  _displaced_problem->addResidual(tid);
1600 }
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:1125
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:794

◆ addResidualLower()

void FEProblemBase::addResidualLower ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1613 of file FEProblemBase.C.

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

1614 {
1615  _assembly[tid][_current_nl_sys->number()]->addResidualLower(Assembly::GlobalDataKey{},
1617 
1618  if (_displaced_problem)
1619  _displaced_problem->addResidualLower(tid);
1620 }
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:1125
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:794

◆ addResidualNeighbor()

void FEProblemBase::addResidualNeighbor ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1603 of file FEProblemBase.C.

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

1604 {
1605  _assembly[tid][_current_nl_sys->number()]->addResidualNeighbor(Assembly::GlobalDataKey{},
1607 
1608  if (_displaced_problem)
1609  _displaced_problem->addResidualNeighbor(tid);
1610 }
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:1125
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:794

◆ addResidualScalar()

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

Definition at line 1623 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeResidualInternal().

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

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

2400 {
2401  const auto samplers = addObject<Sampler>(type, name, parameters);
2402  for (auto & sampler : samplers)
2403  sampler->init();
2404 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
const InputParameters & parameters() const
Get the parameters of the object.

◆ addScalarKernel()

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

Definition at line 2590 of file FEProblemBase.C.

2593 {
2594  parallel_object_only();
2595 
2596  const auto nl_sys_num =
2597  determineNonlinearSystem(parameters.varName("variable", name), true).second;
2598  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2599  {
2600  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2601  parameters.set<SystemBase *>("_sys") = &_displaced_problem->nlSys(nl_sys_num);
2602  }
2603  else
2604  {
2605  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2606  {
2607  // We allow ScalarKernels to request that they use_displaced_mesh,
2608  // but then be overridden when no displacements variables are
2609  // provided in the Mesh block. If that happened, update the value
2610  // of use_displaced_mesh appropriately for this ScalarKernel.
2611  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2612  parameters.set<bool>("use_displaced_mesh") = false;
2613  }
2614 
2615  parameters.set<SubProblem *>("_subproblem") = this;
2616  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2617  }
2618 
2619  logAdd("ScalarKernel", name, kernel_name);
2620  _nl[nl_sys_num]->addScalarKernel(kernel_name, name, parameters);
2621 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.

◆ addTimeIntegrator()

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

Definition at line 6125 of file FEProblemBase.C.

Referenced by Transient::setupTimeIntegrator().

6128 {
6129  parallel_object_only();
6130 
6131  parameters.set<SubProblem *>("_subproblem") = this;
6132  logAdd("TimeIntegrator", name, type);
6133  _aux->addTimeIntegrator(type, name + ":aux", parameters);
6134  for (auto & nl : _nl)
6135  nl->addTimeIntegrator(type, name + ":" + nl->name(), parameters);
6136  _has_time_integrator = true;
6137 
6138  // add vectors to store u_dot, u_dotdot, udot_old, u_dotdot_old and
6139  // solution vectors older than 2 time steps, if requested by the time
6140  // integrator
6141  _aux->addDotVectors();
6142  for (auto & nl : _nl)
6143  {
6144  nl->addDotVectors();
6145 
6146  auto tag_udot = nl->getTimeIntegrator()->uDotFactorTag();
6147  if (!nl->hasVector(tag_udot))
6148  nl->associateVectorToTag(*nl->solutionUDot(), tag_udot);
6149  auto tag_udotdot = nl->getTimeIntegrator()->uDotDotFactorTag();
6150  if (!nl->hasVector(tag_udotdot) && uDotDotRequested())
6151  nl->associateVectorToTag(*nl->solutionUDotDot(), tag_udotdot);
6152  }
6153 }
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
virtual bool uDotDotRequested()
Get boolean flag to check whether solution second time derivative needs to be stored.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
const InputParameters & parameters() const
Get the parameters of the object.

◆ addTransfer()

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

Add a Transfer to the problem.

Definition at line 5112 of file FEProblemBase.C.

5115 {
5116  parallel_object_only();
5117 
5118  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5119  {
5120  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5121  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5122  _reinit_displaced_elem = true;
5123  }
5124  else
5125  {
5126  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5127  {
5128  // We allow Transfers to request that they use_displaced_mesh,
5129  // but then be overridden when no displacements variables are
5130  // provided in the Mesh block. If that happened, update the value
5131  // of use_displaced_mesh appropriately for this Transfer.
5132  if (parameters.have_parameter<bool>("use_displaced_mesh"))
5133  parameters.set<bool>("use_displaced_mesh") = false;
5134  }
5135 
5136  parameters.set<SubProblem *>("_subproblem") = this;
5137  parameters.set<SystemBase *>("_sys") = _aux.get();
5138  }
5139 
5140  // Handle the "SAME_AS_MULTIAPP" execute option. The get method is used to test for the
5141  // flag so the set by user flag is not reset, calling set with the true flag causes the set
5142  // by user status to be reset, which should only be done if the EXEC_SAME_AS_MULTIAPP is
5143  // being applied to the object.
5145  {
5146  ExecFlagEnum & exec_enum = parameters.set<ExecFlagEnum>("execute_on", true);
5147  std::shared_ptr<MultiApp> multiapp;
5148  if (parameters.isParamValid("multi_app"))
5149  multiapp = getMultiApp(parameters.get<MultiAppName>("multi_app"));
5150  else if (parameters.isParamValid("from_multi_app"))
5151  multiapp = getMultiApp(parameters.get<MultiAppName>("from_multi_app"));
5152  else if (parameters.isParamValid("to_multi_app"))
5153  multiapp = getMultiApp(parameters.get<MultiAppName>("to_multi_app"));
5154  // else do nothing because the user has provided invalid input. They should get a nice error
5155  // about this during transfer construction. This necessitates checking for null in this next
5156  // line, however
5157  if (multiapp)
5158  exec_enum = multiapp->getParam<ExecFlagEnum>("execute_on");
5159  }
5160 
5161  // Create the Transfer objects
5162  std::shared_ptr<Transfer> transfer = _factory.create<Transfer>(transfer_name, name, parameters);
5163  logAdd("Transfer", name, transfer_name);
5164 
5165  // Add MultiAppTransfer object
5166  std::shared_ptr<MultiAppTransfer> multi_app_transfer =
5168  if (multi_app_transfer)
5169  {
5170  if (multi_app_transfer->directions().contains(MultiAppTransfer::TO_MULTIAPP))
5171  _to_multi_app_transfers.addObject(multi_app_transfer);
5172  if (multi_app_transfer->directions().contains(MultiAppTransfer::FROM_MULTIAPP))
5173  _from_multi_app_transfers.addObject(multi_app_transfer);
5174  if (multi_app_transfer->directions().contains(MultiAppTransfer::BETWEEN_MULTIAPP))
5175  _between_multi_app_transfers.addObject(multi_app_transfer);
5176  }
5177  else
5178  _transfers.addObject(transfer);
5179 }
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.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::shared_ptr< MultiApp > getMultiApp(const std::string &multi_app_name) const
Get a MultiApp object by name.
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
bool contains(const std::string &value) const
Contains methods for seeing if a value is in the MultiMooseEnum.
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
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:75
Base class for all MultiAppTransfer objects.
const ExecFlagType EXEC_SAME_AS_MULTIAPP
Definition: Moose.C:45
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
Base class for all Transfer objects.
Definition: Transfer.h:36
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ addUserObject()

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

Definition at line 3809 of file FEProblemBase.C.

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

3812 {
3813  parallel_object_only();
3814 
3815  std::vector<std::shared_ptr<UserObject>> uos;
3816 
3817  // Add the _subproblem and _sys parameters depending on use_displaced_mesh
3819 
3820  for (const auto tid : make_range(libMesh::n_threads()))
3821  {
3822  // Create the UserObject
3823  std::shared_ptr<UserObject> user_object =
3824  _factory.create<UserObject>(user_object_name, name, parameters, tid);
3825  logAdd("UserObject", name, user_object_name);
3826  uos.push_back(user_object);
3827 
3828  if (tid != 0)
3829  user_object->setPrimaryThreadCopy(uos[0].get());
3830 
3831  // TODO: delete this line after apps have been updated to not call getUserObjects
3832  _all_user_objects.addObject(user_object, tid);
3833 
3834  theWarehouse().add(user_object);
3835 
3836  // Attempt to create all the possible UserObject types
3837  auto euo = std::dynamic_pointer_cast<ElementUserObject>(user_object);
3838  auto suo = std::dynamic_pointer_cast<SideUserObject>(user_object);
3839  auto isuo = std::dynamic_pointer_cast<InternalSideUserObject>(user_object);
3840  auto iuob = std::dynamic_pointer_cast<InterfaceUserObjectBase>(user_object);
3841  auto nuo = std::dynamic_pointer_cast<NodalUserObject>(user_object);
3842  auto duo = std::dynamic_pointer_cast<DomainUserObject>(user_object);
3843  auto guo = std::dynamic_pointer_cast<GeneralUserObject>(user_object);
3844  auto tguo = std::dynamic_pointer_cast<ThreadedGeneralUserObject>(user_object);
3845  auto muo = std::dynamic_pointer_cast<MortarUserObject>(user_object);
3846 
3847  // Account for displaced mesh use
3848  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3849  {
3850  if (euo || nuo || duo)
3851  _reinit_displaced_elem = true;
3852  else if (suo)
3853  // shouldn't we add isuo
3854  _reinit_displaced_face = true;
3855  else if (iuob)
3857  }
3858 
3859  // These objects only require one thread
3860  if ((guo && !tguo) || muo)
3861  break;
3862  }
3863 
3864  // Add as a Functor if it is one
3865  // At the timing of adding this, this is only Postprocessors... but technically it
3866  // should enable any UO that is a Real Functor to be used as one
3867  // The ternary operator used in getting the functor is there because some UOs
3868  // are threaded and some are not. When a UO is not threaded, we need to add
3869  // the functor from thread 0 as the registered functor for all threads
3870  for (const auto tid : make_range(libMesh::n_threads()))
3871  if (const auto functor =
3872  dynamic_cast<Moose::FunctorBase<Real> *>(uos[uos.size() == 1 ? 0 : tid].get()))
3873  {
3874  this->addFunctor(name, *functor, tid);
3875  if (_displaced_problem)
3876  _displaced_problem->addFunctor(name, *functor, tid);
3877  }
3878 }
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.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
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
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)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:86
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:1289
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
Base class for user objects executed one or more sidesets, which may be on the outer boundary of the ...
This user object allows related evaluations on elements, boundaries, internal sides, interfaces in one single place.
Base class for creating new nodally-based mortar user objects.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
A user object that runs over all the nodes and does an aggregation step to compute a single value...
TheWarehouse & theWarehouse() const
Base class for user objects executed on all element sides internal to one or more blocks...
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
IntRange< T > make_range(T beg, T end)
void addObjectParamsHelper(InputParameters &params, const std::string &object_name, const std::string &var_param_name="variable")
Helper for setting the "_subproblem" and "_sys" parameters in addObject() and in addUserObject().
std::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
Base class for user-specific data.
Definition: UserObject.h:39
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

Definition at line 2463 of file FEProblemBase.C.

Referenced by DiffusionCG::addNonlinearVariables(), DiffusionFV::addNonlinearVariables(), and AddVariableAction::init().

2466 {
2467  parallel_object_only();
2468 
2469  auto fe_type = FEType(Utility::string_to_enum<Order>(params.get<MooseEnum>("order")),
2470  Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family")));
2471 
2472  if (duplicateVariableCheck(var_name, fe_type, /* is_aux = */ false))
2473  return;
2474 
2475  params.set<FEProblemBase *>("_fe_problem_base") = this;
2477 
2478  const auto & nl_sys_name = params.get<NonlinearSystemName>("nl_sys");
2479  std::istringstream ss(nl_sys_name);
2480  unsigned int nl_sys_num;
2481  if (!(ss >> nl_sys_num) || !ss.eof())
2482  nl_sys_num = libmesh_map_find(_nl_sys_name_to_num, nl_sys_name);
2483 
2484  logAdd("Variable", var_name, var_type);
2485  _nl[nl_sys_num]->addVariable(var_type, var_name, params);
2486  if (_displaced_problem)
2487  // MooseObjects need to be unique so change the name here
2488  _displaced_problem->addVariable(var_type, var_name, params, nl_sys_num);
2489 
2490  _nl_var_to_sys_num[var_name] = nl_sys_num;
2491 }
std::map< NonlinearSystemName, unsigned int > _nl_sys_name_to_num
Map from nonlinear system name to number.
void logAdd(const std::string &system, const std::string &name, const std::string &type) const
Output information about the object just added to the problem.
bool duplicateVariableCheck(const std::string &var_name, const FEType &type, bool is_aux)
Helper to check for duplicate variable names across systems or within a single system.
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.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:627
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
std::shared_ptr< DisplacedProblem > _displaced_problem
std::map< NonlinearVariableName, unsigned int > _nl_var_to_sys_num
Map from nonlinear variable name to nonlinear system number.

◆ addVectorPostprocessor()

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

Definition at line 3782 of file FEProblemBase.C.

Referenced by ExtraIDIntegralReporter::ExtraIDIntegralReporter().

3785 {
3786  // Check for name collision
3787  if (hasUserObject(name))
3788  mooseError("A UserObject with the name \"",
3789  name,
3790  "\" already exists. You may not add a VectorPostprocessor by the same name.");
3791 
3792  addUserObject(pp_name, name, parameters);
3793 }
virtual void addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addVectorTag()

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

Create a Tag.

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

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

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

Reimplemented in DisplacedProblem.

Definition at line 81 of file SubProblem.C.

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

83 {
85  mooseError("Vector tag type cannot be VECTOR_TAG_ANY");
86 
87  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
88 
89  // First, see if the tag exists already
90  for (const auto & vector_tag : _vector_tags)
91  {
92  mooseAssert(_vector_tags[vector_tag._id] == vector_tag, "Vector tags index mismatch");
93  if (vector_tag._name == tag_name_upper)
94  {
95  if (vector_tag._type != type)
96  mooseError("While attempting to add vector tag with name '",
97  tag_name_upper,
98  "' and type ",
99  type,
100  ",\na tag with the same name but type ",
101  vector_tag._type,
102  " was found.\n\nA tag can only exist with one type.");
103 
104  return vector_tag._id;
105  }
106  }
107 
108  // Doesn't exist - create it
109  const TagID new_tag_id = _vector_tags.size();
110  const TagTypeID new_tag_type_id = _typed_vector_tags[type].size();
111  // Primary storage for all tags where the index in the vector == the tag ID
112  _vector_tags.emplace_back(new_tag_id, new_tag_type_id, tag_name_upper, type);
113  // Secondary storage for each type so that we can have quick access to all tags of a type
114  _typed_vector_tags[type].emplace_back(new_tag_id, new_tag_type_id, tag_name_upper, type);
115  // Name map storage for quick name access
116  _vector_tags_name_map.emplace(tag_name_upper, new_tag_id);
117 
118  // Make sure that _vector_tags, _typed_vector_tags, and _vector_tags_name_map are sane
120 
121  return new_tag_id;
122 }
unsigned int TagTypeID
Definition: MooseTypes.h:200
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1037
unsigned int TagID
Definition: MooseTypes.h:199
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1094
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:218
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1104
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:1101
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ advanceMultiApps()

void FEProblemBase::advanceMultiApps ( ExecFlagType  type)
inline

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

Definition at line 1161 of file FEProblemBase.h.

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

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

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

5994 {
5995  TIME_SECTION("advanceState", 5, "Advancing State");
5996 
5997  for (auto & nl : _nl)
5998  nl->copyOldSolutions();
5999  _aux->copyOldSolutions();
6000 
6001  if (_displaced_problem)
6002  {
6003  for (const auto i : index_range(_nl))
6004  _displaced_problem->nlSys(i).copyOldSolutions();
6005  _displaced_problem->auxSys().copyOldSolutions();
6006  }
6007 
6009 
6012 
6015 
6018 }
void shift()
Shift the material properties in time.
MaterialPropertyStorage & _bnd_material_props
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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:16
std::shared_ptr< DisplacedProblem > _displaced_problem
MaterialPropertyStorage & _neighbor_material_props
MaterialPropertyStorage & _material_props
auto index_range(const T &sizable)

◆ allowInvalidSolution()

bool FEProblemBase::allowInvalidSolution ( ) const
inline

Whether or not the invalid solutions are allowed.

Definition at line 1708 of file FEProblemBase.h.

Referenced by NonlinearSystem::converged(), and NonlinearSystem::solve().

1708 { 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 6071 of file FEProblemBase.C.

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

6072 {
6074 }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
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:1772

◆ allowOutput() [2/2]

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

Definition at line 2642 of file FEProblemBase.h.

2643 {
2644  _app.getOutputWarehouse().allowOutput<T>(state);
2645 }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
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:1772

◆ areCoupled()

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

Definition at line 5648 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

5651 {
5652  return (*_cm[nl_sys])(ivar, jvar);
5653 }
std::vector< std::unique_ptr< CouplingMatrix > > _cm
Coupling matrix for variables.

◆ arrayVariableComponent()

static std::string SubProblem::arrayVariableComponent ( const std::string &  var_name,
unsigned int  i 
)
inlinestaticinherited

Returns the variable name of a component of an array variable.

Definition at line 261 of file SubProblem.h.

Referenced by SystemBase::addVariable(), MooseVariableFieldBase::componentName(), SystemBase::copyVars(), DMMooseSetVariables(), AdvancedOutput::initAvailableLists(), and AdvancedOutput::initShowHideLists().

262  {
263  return var_name + "_" + std::to_string(i);
264  }

◆ assembly() [1/2]

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

Implements SubProblem.

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

2745 {
2746  mooseAssert(tid < _assembly.size(), "Assembly objects not initialized");
2747  mooseAssert(nl_sys_num < _assembly[tid].size(),
2748  "Nonlinear system number larger than the assembly container size");
2749  return *_assembly[tid][nl_sys_num];
2750 }
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  nl_sys_num 
) const
inlineoverridevirtual

Implements SubProblem.

Definition at line 2753 of file FEProblemBase.h.

2754 {
2755  mooseAssert(tid < _assembly.size(), "Assembly objects not initialized");
2756  mooseAssert(nl_sys_num < _assembly[tid].size(),
2757  "Nonlinear system number larger than the assembly container size");
2758  return *_assembly[tid][nl_sys_num];
2759 }
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 1107 of file SubProblem.C.

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

1108 {
1109  // Currently going to assume that we are applying or not applying automatic scaling consistently
1110  // across nonlinear systems
1112 }
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:117

◆ automaticScaling() [2/4]

void SubProblem::automaticScaling

Automatic scaling setter.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Definition at line 1100 of file SubProblem.C.

1101 {
1102  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1103  systemBaseNonlinear(nl_sys_num).automaticScaling(automatic_scaling);
1104 }
virtual std::size_t numNonlinearSystems() const override
bool automaticScaling() const
Getter for whether we are performing automatic scaling.
Definition: SystemBase.h:117
virtual const SystemBase & systemBaseNonlinear(const unsigned int sys_num) const override
Return the nonlinear system object as a base class reference given the system number.
IntRange< T > make_range(T beg, T end)

◆ automaticScaling() [3/4]

bool SubProblem::automaticScaling

Automatic scaling getter.

Returns
A boolean representing whether we are performing automatic scaling

Definition at line 1107 of file SubProblem.C.

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

◆ automaticScaling() [4/4]

void FEProblemBase::automaticScaling ( bool  automatic_scaling)
overridevirtual

Automatic scaling setter.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Reimplemented from SubProblem.

Definition at line 8185 of file FEProblemBase.C.

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

8186 {
8187  if (_displaced_problem)
8188  _displaced_problem->automaticScaling(automatic_scaling);
8189 
8190  SubProblem::automaticScaling(automatic_scaling);
8191 }
bool automaticScaling() const
Automatic scaling getter.
Definition: SubProblem.C:1107
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ backupMultiApps()

void FEProblemBase::backupMultiApps ( ExecFlagType  type)

Backup the MultiApps associated with the ExecFlagType.

Definition at line 5033 of file FEProblemBase.C.

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

5034 {
5035  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5036 
5037  if (multi_apps.size())
5038  {
5039  TIME_SECTION("backupMultiApps", 5, "Backing Up MultiApp");
5040 
5041  if (_verbose_multiapps)
5042  _console << COLOR_CYAN << "\nBacking Up MultiApps on " << type.name() << COLOR_DEFAULT
5043  << std::endl;
5044 
5045  for (const auto & multi_app : multi_apps)
5046  multi_app->backup();
5047 
5049 
5050  if (_verbose_multiapps)
5051  _console << COLOR_CYAN << "Finished Backing Up MultiApps on " << type.name() << "\n"
5052  << COLOR_DEFAULT << std::endl;
5053  }
5054 }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
const Parallel::Communicator & _communicator
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
void parallelBarrierNotify(const libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ bumpAllQRuleOrder()

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

Definition at line 5505 of file FEProblemBase.C.

5506 {
5507  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
5508  for (const auto i : index_range(_nl))
5509  _assembly[tid][i]->bumpAllQRuleOrder(order, block);
5510 
5511  if (_displaced_problem)
5512  _displaced_problem->bumpAllQRuleOrder(order, block);
5513 
5514  updateMaxQps();
5515 }
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.
std::shared_ptr< DisplacedProblem > _displaced_problem
void bumpAllQRuleOrder(Order order, SubdomainID block)
auto index_range(const T &sizable)

◆ bumpVolumeQRuleOrder()

void FEProblemBase::bumpVolumeQRuleOrder ( 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 5492 of file FEProblemBase.C.

5493 {
5494  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
5495  for (const auto i : index_range(_nl))
5496  _assembly[tid][i]->bumpVolumeQRuleOrder(order, block);
5497 
5498  if (_displaced_problem)
5499  _displaced_problem->bumpVolumeQRuleOrder(order, block);
5500 
5501  updateMaxQps();
5502 }
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.
std::shared_ptr< DisplacedProblem > _displaced_problem
void bumpVolumeQRuleOrder(Order order, SubdomainID block)
Increases the element/volume quadrature order for the specified mesh block if and only if the current...
auto index_range(const T &sizable)

◆ cacheJacobian()

void FEProblemBase::cacheJacobian ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 1744 of file FEProblemBase.C.

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

1745 {
1747  if (_displaced_problem)
1748  _displaced_problem->cacheJacobian(tid);
1749 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void cacheJacobian(const THREAD_ID tid)
Definition: SubProblem.C:1257

◆ cacheJacobianNeighbor()

void FEProblemBase::cacheJacobianNeighbor ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 1752 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

1753 {
1755  if (_displaced_problem)
1756  _displaced_problem->cacheJacobianNeighbor(tid);
1757 }
virtual void cacheJacobianNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1265
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ cacheResidual()

void FEProblemBase::cacheResidual ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 1630 of file FEProblemBase.C.

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

1631 {
1633  if (_displaced_problem)
1634  _displaced_problem->cacheResidual(tid);
1635 }
virtual void cacheResidual(const THREAD_ID tid)
Definition: SubProblem.C:1236
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ cacheResidualNeighbor()

void FEProblemBase::cacheResidualNeighbor ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 1638 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals().

1639 {
1641  if (_displaced_problem)
1642  _displaced_problem->cacheResidualNeighbor(tid);
1643 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void cacheResidualNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1243

◆ checkBlockMatProps()

void SubProblem::checkBlockMatProps ( )
virtualinherited

Checks block material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 589 of file SubProblem.C.

Referenced by checkProblemIntegrity().

590 {
591  // Variable for storing all available blocks/boundaries from the mesh
592  std::set<SubdomainID> all_ids(mesh().meshSubdomains());
593 
594  std::stringstream errors;
595 
596  // Loop through the properties to check
597  for (const auto & check_it : _map_block_material_props_check)
598  {
599  // The current id for the property being checked (BoundaryID || BlockID)
600  SubdomainID check_id = check_it.first;
601 
602  std::set<SubdomainID> check_ids = {check_id};
603 
604  // Loop through all the block/boundary ids
605  for (const auto & id : check_ids)
606  {
607  // Loop through all the stored properties
608  for (const auto & prop_it : check_it.second)
609  {
610  // Produce an error if the material property is not defined on the current block/boundary
611  // and any block/boundary
612  // and not is not a zero material property.
613  if (_map_block_material_props[id].count(prop_it.second) == 0 &&
614  _zero_block_material_props[id].count(prop_it.second) == 0)
615  {
616  std::string check_name = restrictionSubdomainCheckName(id);
617  if (check_name.empty())
618  check_name = std::to_string(id);
619  errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
620  << "' is not defined on block " << check_name << "\n";
621  }
622  }
623  }
624  }
625 
626  if (!errors.str().empty())
627  mooseError(errors.str());
628 }
virtual MooseMesh & mesh()=0
std::string restrictionSubdomainCheckName(SubdomainID check_id)
Helper functions for checking MaterialProperties.
Definition: SubProblem.C:736
subdomain_id_type SubdomainID
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:985
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
Definition: SubProblem.h:997
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:979

◆ checkBoundaryMatProps()

void SubProblem::checkBoundaryMatProps ( )
virtualinherited

Checks boundary material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 631 of file SubProblem.C.

Referenced by checkProblemIntegrity().

632 {
633  // Variable for storing the value for ANY_BOUNDARY_ID
635 
636  // Variable for storing all available blocks/boundaries from the mesh
637  std::set<BoundaryID> all_ids(mesh().getBoundaryIDs());
638 
639  std::stringstream errors;
640 
641  // Loop through the properties to check
642  for (const auto & check_it : _map_boundary_material_props_check)
643  {
644  // The current id for the property being checked (BoundaryID || BlockID)
645  BoundaryID check_id = check_it.first;
646 
647  // In the case when the material being checked has an ID is set to ANY, then loop through all
648  // the possible ids and verify that the material property is defined.
649  std::set<BoundaryID> check_ids{check_id};
650  if (check_id == any_id)
651  check_ids = all_ids;
652 
653  // Loop through all the block/boundary ids
654  for (const auto & id : check_ids)
655  {
656  // Loop through all the stored properties
657  for (const auto & prop_it : check_it.second)
658  {
659  // Produce an error if the material property is not defined on the current block/boundary
660  // and any block/boundary
661  // and not is not a zero material property.
662  if (_map_boundary_material_props[id].count(prop_it.second) == 0 &&
663  _map_boundary_material_props[any_id].count(prop_it.second) == 0 &&
664  _zero_boundary_material_props[id].count(prop_it.second) == 0 &&
665  _zero_boundary_material_props[any_id].count(prop_it.second) == 0)
666  {
667  std::string check_name = restrictionBoundaryCheckName(id);
668  if (check_name.empty())
669  check_name = std::to_string(id);
670  errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
671  << "' is not defined on boundary " << check_name << "\n";
672  }
673  }
674  }
675  }
676 
677  if (!errors.str().empty())
678  mooseError(errors.str());
679 }
virtual MooseMesh & mesh()=0
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
Definition: SubProblem.h:998
std::string restrictionBoundaryCheckName(BoundaryID check_id)
Definition: SubProblem.C:747
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:986
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:982
boundary_id_type BoundaryID
std::vector< BoundaryID > getBoundaryIDs(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown, const std::set< BoundaryID > &mesh_boundary_ids)
Gets the boundary IDs with their names.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:23

◆ checkCoordinateSystems()

void FEProblemBase::checkCoordinateSystems ( )
protected

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

Definition at line 7740 of file FEProblemBase.C.

Referenced by checkProblemIntegrity().

7741 {
7743 }
MooseMesh & _mesh
void checkCoordinateSystems()
Performs a sanity check for every element in the mesh.
Definition: MooseMesh.C:4023

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

Referenced by checkProblemIntegrity().

7617 {
7618  for (const auto & it : materials_map)
7619  {
7621  std::set<std::string> block_depend_props, block_supplied_props;
7622 
7623  for (const auto & mat1 : it.second)
7624  {
7625  const std::set<std::string> & depend_props = mat1->getRequestedItems();
7626  block_depend_props.insert(depend_props.begin(), depend_props.end());
7627 
7628  auto & alldeps = mat1->getMatPropDependencies(); // includes requested stateful props
7629  for (auto & dep : alldeps)
7630  if (const auto name = _material_props.queryStatefulPropName(dep))
7631  block_depend_props.insert(*name);
7632 
7633  // See if any of the active materials supply this property
7634  for (const auto & mat2 : it.second)
7635  {
7636  const std::set<std::string> & supplied_props = mat2->MaterialBase::getSuppliedItems();
7637  block_supplied_props.insert(supplied_props.begin(), supplied_props.end());
7638  }
7639  }
7640 
7641  // Add zero material properties specific to this block and unrestricted
7642  block_supplied_props.insert(_zero_block_material_props[it.first].begin(),
7643  _zero_block_material_props[it.first].end());
7644 
7645  // Error check to make sure all properties consumed by materials are supplied on this block
7646  std::set<std::string> difference;
7647  std::set_difference(block_depend_props.begin(),
7648  block_depend_props.end(),
7649  block_supplied_props.begin(),
7650  block_supplied_props.end(),
7651  std::inserter(difference, difference.end()));
7652 
7653  if (!difference.empty())
7654  {
7655  std::ostringstream oss;
7656  oss << "One or more Material Properties were not supplied on block ";
7657  const std::string & subdomain_name = _mesh.getSubdomainName(it.first);
7658  if (subdomain_name.length() > 0)
7659  oss << subdomain_name << " (" << it.first << ")";
7660  else
7661  oss << it.first;
7662  oss << ":\n";
7663  for (const auto & name : difference)
7664  oss << name << "\n";
7665  mooseError(oss.str());
7666  }
7667  }
7668 
7669  // This loop checks that materials are not supplied by multiple Material objects
7670  for (const auto & it : materials_map)
7671  {
7672  const auto & materials = it.second;
7673  std::set<std::string> inner_supplied, outer_supplied;
7674 
7675  for (const auto & outer_mat : materials)
7676  {
7677  // Storage for properties for this material (outer) and all other materials (inner)
7678  outer_supplied = outer_mat->getSuppliedItems();
7679  inner_supplied.clear();
7680 
7681  // Property to material map for error reporting
7682  std::map<std::string, std::set<std::string>> prop_to_mat;
7683  for (const auto & name : outer_supplied)
7684  prop_to_mat[name].insert(outer_mat->name());
7685 
7686  for (const auto & inner_mat : materials)
7687  {
7688  if (outer_mat == inner_mat)
7689  continue;
7690 
7691  // Check whether these materials are an AD pair
7692  auto outer_mat_type = outer_mat->type();
7693  auto inner_mat_type = inner_mat->type();
7694  removeSubstring(outer_mat_type, "<RESIDUAL>");
7695  removeSubstring(outer_mat_type, "<JACOBIAN>");
7696  removeSubstring(inner_mat_type, "<RESIDUAL>");
7697  removeSubstring(inner_mat_type, "<JACOBIAN>");
7698  if (outer_mat_type == inner_mat_type && outer_mat_type != outer_mat->type() &&
7699  inner_mat_type != inner_mat->type())
7700  continue;
7701 
7702  inner_supplied.insert(inner_mat->getSuppliedItems().begin(),
7703  inner_mat->getSuppliedItems().end());
7704 
7705  for (const auto & inner_supplied_name : inner_supplied)
7706  prop_to_mat[inner_supplied_name].insert(inner_mat->name());
7707  }
7708 
7709  // Test that a property isn't supplied on multiple blocks
7710  std::set<std::string> intersection;
7711  std::set_intersection(outer_supplied.begin(),
7712  outer_supplied.end(),
7713  inner_supplied.begin(),
7714  inner_supplied.end(),
7715  std::inserter(intersection, intersection.end()));
7716 
7717  if (!intersection.empty())
7718  {
7719  std::ostringstream oss;
7720  oss << "The following material properties are declared on block " << it.first
7721  << " by multiple materials:\n";
7722  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << "Material Property"
7723  << "Material Objects\n";
7724  for (const auto & outer_name : intersection)
7725  {
7726  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << outer_name;
7727  for (const auto & inner_name : prop_to_mat[outer_name])
7728  oss << inner_name << " ";
7729  oss << '\n';
7730  }
7731 
7732  mooseError(oss.str());
7733  break;
7734  }
7735  }
7736  }
7737 }
std::string indent(unsigned int spaces)
Create empty string for indenting.
Definition: ConsoleUtils.C:31
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1537
std::optional< std::string > queryStatefulPropName(const unsigned int id) const
MooseMesh & _mesh
void removeSubstring(std::string &main, const std::string &sub)
find, erase, length algorithm for removing a substring from a string
Definition: MooseUtils.C:1253
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:985
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MaterialPropertyStorage & _material_props

◆ checkDisplacementOrders()

void FEProblemBase::checkDisplacementOrders ( )
protected

Verify that SECOND order mesh uses SECOND order displacements.

Definition at line 7539 of file FEProblemBase.C.

Referenced by checkProblemIntegrity().

7540 {
7541  if (_displaced_problem)
7542  {
7543  bool mesh_has_second_order_elements = false;
7544  for (const auto & elem : as_range(_displaced_mesh->activeLocalElementsBegin(),
7546  {
7547  if (elem->default_order() == SECOND)
7548  {
7549  mesh_has_second_order_elements = true;
7550  break;
7551  }
7552  }
7553 
7554  // We checked our local elements, so take the max over all processors.
7555  _displaced_mesh->comm().max(mesh_has_second_order_elements);
7556 
7557  // If the Mesh has second order elements, make sure the
7558  // displacement variables are second-order.
7559  if (mesh_has_second_order_elements)
7560  {
7561  const std::vector<std::string> & displacement_variables =
7562  _displaced_problem->getDisplacementVarNames();
7563 
7564  for (const auto & var_name : displacement_variables)
7565  {
7566  MooseVariableFEBase & mv =
7567  _displaced_problem->getVariable(/*tid=*/0,
7568  var_name,
7571  if (mv.order() != SECOND)
7572  mooseError("Error: mesh has SECOND order elements, so all displacement variables must be "
7573  "SECOND order.");
7574  }
7575  }
7576  }
7577 }
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:2801
Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
void max(const T &r, T &o, Request &req) const
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
const MeshBase::element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:2807
MooseMesh * _displaced_mesh

◆ checkDuplicatePostprocessorVariableNames()

void FEProblemBase::checkDuplicatePostprocessorVariableNames ( )

Definition at line 1249 of file FEProblemBase.C.

Referenced by checkProblemIntegrity().

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

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

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

5867 {
5869  return;
5870 
5871  TIME_SECTION("checkExceptionAndStopSolve", 5);
5872 
5873  // See if any processor had an exception. If it did, get back the
5874  // processor that the exception occurred on.
5875  unsigned int processor_id;
5876 
5878 
5879  if (_has_exception)
5880  {
5882 
5885  {
5886  // Print the message
5887  if (_communicator.rank() == 0 && print_message)
5888  {
5889  _console << "\n" << _exception_message << "\n";
5890  if (isTransient())
5891  _console
5892  << "To recover, the solution will fail and then be re-attempted with a reduced time "
5893  "step.\n"
5894  << std::endl;
5895  }
5896 
5897  // Stop the solve -- this entails setting
5898  // SNESSetFunctionDomainError() or directly inserting NaNs in the
5899  // residual vector to let PETSc >= 3.6 return DIVERGED_NANORINF.
5901 
5902  // and close Aux system (we MUST do this here; see #11525)
5903  _aux->solution().close();
5904 
5905  // We've handled this exception, so we no longer have one.
5906  _has_exception = false;
5907 
5908  // Force the next non-linear convergence check to fail (and all further residual evaluation
5909  // to be skipped).
5911 
5912  // Repropagate the exception, so it can be caught at a higher level, typically
5913  // this is NonlinearSystem::computeResidual().
5915  }
5916  else
5917  mooseError("The following parallel-communicated exception was detected during " +
5918  Moose::stringify(_current_execute_on_flag) + " evaluation:\n" +
5920  "\nBecause this did not occur during residual evaluation, there"
5921  " is no way to handle this, so the solution is aborting.\n");
5922  }
5923 }
bool _skip_exception_check
If or not skip &#39;exception and stop solve&#39;.
ExecFlagType _current_execute_on_flag
Current execute_on flag.
virtual void stopSolve(const ExecFlagType &exec_flag)=0
Quit the current solve as soon as possible.
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.
bool _fail_next_nonlinear_convergence_check
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void maxloc(T &r, unsigned int &max_id) const
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
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:31
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:30
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.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
virtual bool isTransient() const override
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 3053 of file FEProblemBase.C.

Referenced by addFVInitialCondition(), and addInitialCondition().

3056 {
3058  {
3059  std::string restart_method = "";
3060  if (_app.isRestarting())
3061  restart_method =
3062  "a checkpoint restart, by IC object '" + ic_name + "' for variable '" + name + "'";
3063  else if (_app.getExReaderForRestart())
3064  {
3065  std::vector<std::string> restarted_vars = _app.getExReaderForRestart()->get_elem_var_names();
3066  const auto nodal_vars = _app.getExReaderForRestart()->get_nodal_var_names();
3067  const auto global_vars = _app.getExReaderForRestart()->get_global_var_names();
3068  restarted_vars.insert(restarted_vars.end(), nodal_vars.begin(), nodal_vars.end());
3069  restarted_vars.insert(restarted_vars.end(), global_vars.begin(), global_vars.end());
3070 
3071  if (std::find(restarted_vars.begin(), restarted_vars.end(), var_name) != restarted_vars.end())
3072  restart_method = "an Exodus restart, by IC object '" + ic_name + "' for variable '" + name +
3073  "' that is also being restarted";
3074  }
3075  if (!restart_method.empty())
3076  mooseError(
3077  "Initial conditions have been specified during ",
3078  restart_method,
3079  ".\nThis is only allowed if you specify 'allow_initial_conditions_with_restart' to "
3080  "the [Problem], as initial conditions can override restarted fields");
3081  }
3082 }
ExodusII_IO * getExReaderForRestart() const
Get the Exodus reader to restart variables from an Exodus mesh file.
Definition: MooseApp.h:447
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:1173
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const bool _allow_ics_during_restart
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

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

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

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

◆ checkNonlinearConvergence()

MooseNonlinearConvergenceReason FEProblemBase::checkNonlinearConvergence ( std::string &  msg,
const PetscInt  it,
const Real  xnorm,
const Real  snorm,
const Real  fnorm,
const Real  rtol,
const Real  divtol,
const Real  stol,
const Real  abstol,
const PetscInt  nfuncs,
const PetscInt  max_funcs,
const Real  initial_residual_before_preset_bcs,
const Real  div_threshold 
)
virtual

Check for convergence of the nonlinear solution.

Parameters
msgError message that gets sent back to the solver
itIteration counter
xnormNorm of the solution vector
snormNorm of the change in the solution vector
fnormNorm of the residual vector
rtolRelative residual convergence tolerance
divtolRelative residual divergence tolerance
stolSolution change convergence tolerance
abstolAbsolute residual convergence tolerance
nfuncsNumber of function evaluations
max_funcsMaximum Number of function evaluations
initial_residual_before_preset_bcsResidual norm prior to imposition of preset BCs values on solution vector
div_thresholdMaximum value of residual before triggering divergence check

Definition at line 7778 of file FEProblemBase.C.

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

7791 {
7792  TIME_SECTION("checkNonlinearConvergence", 5, "Checking Nonlinear Convergence");
7793  mooseAssert(_current_nl_sys, "This should be non-null");
7794 
7796 
7798  {
7801  }
7802 
7805 
7806  Real fnorm_old;
7807  // This is the first residual before any iterations have been done,
7808  // but after preset BCs (if any) have been imposed on the solution
7809  // vector. We save it, and use it to detect convergence if
7810  // compute_initial_residual_before_preset_bcs=false.
7811  if (it == 0)
7812  {
7813  system._initial_residual_after_preset_bcs = fnorm;
7814  fnorm_old = fnorm;
7815  _n_nl_pingpong = 0;
7816  }
7817  else
7818  fnorm_old = system._last_nl_rnorm;
7819 
7820  // Check for nonlinear residual pingpong.
7821  // Pingpong will always start from a residual increase
7822  if ((_n_nl_pingpong % 2 == 1 && !(fnorm > fnorm_old)) ||
7823  (_n_nl_pingpong % 2 == 0 && fnorm > fnorm_old))
7824  _n_nl_pingpong += 1;
7825  else
7826  _n_nl_pingpong = 0;
7827 
7828  std::ostringstream oss;
7829  if (fnorm != fnorm)
7830  {
7831  oss << "Failed to converge, function norm is NaN\n";
7833  }
7834  else if ((it >= _nl_forced_its) && fnorm < abstol)
7835  {
7836  oss << "Converged due to function norm " << fnorm << " < " << abstol << '\n';
7838  }
7839  else if (nfuncs >= max_funcs)
7840  {
7841  oss << "Exceeded maximum number of function evaluations: " << nfuncs << " > " << max_funcs
7842  << '\n';
7844  }
7845  else if ((it >= _nl_forced_its) && it && fnorm > system._last_nl_rnorm && fnorm >= div_threshold)
7846  {
7847  oss << "Nonlinear solve was blowing up!\n";
7849  }
7850 
7851  if ((it >= _nl_forced_its) && it && reason == MooseNonlinearConvergenceReason::ITERATING)
7852  {
7853  // If compute_initial_residual_before_preset_bcs==false, then use the
7854  // first residual computed by PETSc to determine convergence.
7856  ? initial_residual_before_preset_bcs
7858  if (checkRelativeConvergence(it, fnorm, the_residual, rtol, abstol, oss))
7860  else if (snorm < stol * xnorm)
7861  {
7862  oss << "Converged due to small update length: " << snorm << " < " << stol << " * " << xnorm
7863  << '\n';
7865  }
7866  else if (divtol > 0 && fnorm > the_residual * divtol)
7867  {
7868  oss << "Diverged due to initial residual " << the_residual << " > divergence tolerance "
7869  << divtol << " * initial residual " << the_residual << '\n';
7871  }
7872  else if (_nl_abs_div_tol > 0 && fnorm > _nl_abs_div_tol)
7873  {
7874  oss << "Diverged due to residual " << fnorm << " > absolute divergence tolerance "
7875  << _nl_abs_div_tol << '\n';
7877  }
7879  {
7880  oss << "Diverged due to maximum nonlinear residual pingpong achieved" << '\n';
7882  }
7883  }
7884 
7885  system._last_nl_rnorm = fnorm;
7886  system._current_nl_its = static_cast<unsigned int>(it);
7887 
7888  msg = oss.str();
7889  if (_app.multiAppLevel() > 0)
7891 
7892  return reason;
7893 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:106
int _nl_forced_its
the number of forced nonlinear iterations
virtual bool checkRelativeConvergence(const PetscInt it, const Real fnorm, const Real the_residual, const Real rtol, const Real abstol, std::ostringstream &oss)
Check the relative convergence of the nonlinear solution.
unsigned int multiAppLevel() const
The MultiApp Level.
Definition: MooseApp.h:812
Nonlinear system to be solved.
Real _nl_abs_div_tol
the absolute non linear divergence tolerance
unsigned int _n_max_nl_pingpong
virtual void nonlinearConvergenceSetup()
Perform steps required before checking nonlinear convergence.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
bool _fail_next_nonlinear_convergence_check
void indentMessage(const std::string &prefix, std::string &message, const char *color=COLOR_CYAN, bool dont_indent_first_line=true, const std::string &post_prefix=": ")
Indents the supplied message given the prefix and color.
Definition: MooseUtils.C:721
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
MooseNonlinearConvergenceReason
Enumeration for nonlinear convergence reasons.
Definition: FEProblemBase.h:98
bool _compute_initial_residual_before_preset_bcs
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int _n_nl_pingpong
maximum numbver

◆ checkNonlocalCoupling()

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

Definition at line 1373 of file FEProblemBase.C.

Referenced by initialSetup().

1374 {
1375  TIME_SECTION("checkNonlocalCoupling", 5, "Checking Nonlocal Coupling");
1376 
1377  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
1378  for (auto & nl : _nl)
1379  {
1380  const auto & all_kernels = nl->getKernelWarehouse();
1381  const auto & kernels = all_kernels.getObjects(tid);
1382  for (const auto & kernel : kernels)
1383  {
1384  std::shared_ptr<NonlocalKernel> nonlocal_kernel =
1386  if (nonlocal_kernel)
1387  {
1390  _nonlocal_kernels.addObject(kernel, tid);
1391  }
1392  }
1393  const MooseObjectWarehouse<IntegratedBCBase> & all_integrated_bcs =
1394  nl->getIntegratedBCWarehouse();
1395  const auto & integrated_bcs = all_integrated_bcs.getObjects(tid);
1396  for (const auto & integrated_bc : integrated_bcs)
1397  {
1398  std::shared_ptr<NonlocalIntegratedBC> nonlocal_integrated_bc =
1400  if (nonlocal_integrated_bc)
1401  {
1404  _nonlocal_integrated_bcs.addObject(integrated_bc, tid);
1405  }
1406  }
1407  }
1408 }
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
Definition: SubProblem.h:1017
unsigned int n_threads()
NonlocalIntegratedBC is used for solving integral terms in integro-differential equations.
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:198
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
nonlocal integrated_bcs
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
nonlocal kernels

◆ checkNonlocalCouplingRequirement()

virtual bool SubProblem::checkNonlocalCouplingRequirement ( )
inlinevirtualinherited

◆ 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

Reimplemented in EigenProblem.

Definition at line 7445 of file FEProblemBase.C.

Referenced by EigenProblem::checkProblemIntegrity().

7446 {
7447  TIME_SECTION("checkProblemIntegrity", 5);
7448 
7449  // Check for unsatisfied actions
7450  const std::set<SubdomainID> & mesh_subdomains = _mesh.meshSubdomains();
7451 
7452  // Check kernel coverage of subdomains (blocks) in the mesh
7454  for (auto & nl : _nl)
7455  nl->checkKernelCoverage(mesh_subdomains);
7456 
7457  // Check materials
7458  {
7459 #ifdef LIBMESH_ENABLE_AMR
7460  if ((_adaptivity.isOn() || _num_grid_steps) &&
7463  {
7464  _console << "Using EXPERIMENTAL Stateful Material Property projection with Adaptivity!\n"
7465  << std::flush;
7466  }
7467 #endif
7468 
7469  std::set<SubdomainID> local_mesh_subs(mesh_subdomains);
7470 
7472  {
7477  bool check_material_coverage = false;
7478  std::set<SubdomainID> ids = _all_materials.getActiveBlocks();
7479  for (const auto & id : ids)
7480  {
7481  local_mesh_subs.erase(id);
7482  check_material_coverage = true;
7483  }
7484 
7485  // also exclude mortar spaces from the material check
7486  auto && mortar_subdomain_ids = _mortar_data.getMortarSubdomainIDs();
7487  for (auto subdomain_id : mortar_subdomain_ids)
7488  local_mesh_subs.erase(subdomain_id);
7489 
7490  // Check Material Coverage
7491  if (check_material_coverage && !local_mesh_subs.empty())
7492  {
7493  std::stringstream extra_subdomain_ids;
7495  std::copy(local_mesh_subs.begin(),
7496  local_mesh_subs.end(),
7497  std::ostream_iterator<unsigned int>(extra_subdomain_ids, " "));
7498 
7499  mooseError("The following blocks from your input mesh do not contain an active material: " +
7500  extra_subdomain_ids.str() +
7501  "\nWhen ANY mesh block contains a Material object, "
7502  "all blocks must contain a Material object.\n");
7503  }
7504  }
7505 
7506  // Check material properties on blocks and boundaries
7509 
7510  // Check that material properties exist when requested by other properties on a given block
7511  const auto & materials = _all_materials.getActiveObjects();
7512  for (const auto & material : materials)
7513  material->checkStatefulSanity();
7514 
7515  // auto mats_to_check = _materials.getActiveBlockObjects();
7516  // const auto & discrete_materials = _discrete_materials.getActiveBlockObjects();
7517  // for (const auto & map_it : discrete_materials)
7518  // for (const auto & container_element : map_it.second)
7519  // mats_to_check[map_it.first].push_back(container_element);
7522  }
7523 
7524  checkUserObjects();
7525 
7526  // Verify that we don't have any Element type/Coordinate Type conflicts
7528 
7529  // If using displacements, verify that the order of the displacement
7530  // variables matches the order of the elements in the displaced
7531  // mesh.
7533 
7534  // Check for postprocessor names with same name as a scalar variable
7536 }
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.
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
unsigned int _num_grid_steps
Number of steps in a grid sequence.
bool isOn()
Is adaptivity on?
Definition: Adaptivity.h:179
const bool _skip_nl_system_check
virtual void checkBoundaryMatProps()
Checks boundary material properties integrity.
Definition: SubProblem.C:631
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.
void checkUserObjects()
void checkDisplacementOrders()
Verify that SECOND order mesh uses SECOND order displacements.
MortarData _mortar_data
MooseMesh & _mesh
virtual void checkBlockMatProps()
Checks block material properties integrity.
Definition: SubProblem.C:589
Adaptivity _adaptivity
const std::set< SubdomainID > & getMortarSubdomainIDs() const
Returns the mortar covered subdomains.
Definition: MortarData.h:84
bool _kernel_coverage_check
Determines whether a check to verify an active kernel on every subdomain.
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.
MaterialPropertyStorage & _neighbor_material_props
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
MaterialPropertyStorage & _material_props
bool _material_coverage_check
Determines whether a check to verify an active material on every subdomain.
MaterialWarehouse _all_materials
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2921
void checkCoordinateSystems()
Verify that there are no element type/coordinate type conflicts.

◆ checkRelativeConvergence()

bool FEProblemBase::checkRelativeConvergence ( const PetscInt  it,
const Real  fnorm,
const Real  the_residual,
const Real  rtol,
const Real  abstol,
std::ostringstream &  oss 
)
virtual

Check the relative convergence of the nonlinear solution.

Parameters
fnormNorm of the residual vector
the_residualThe residual to check
rtolRelative tolerance
abstolAbsolute tolerance
Returns
Bool signifying convergence

Reimplemented in ReferenceResidualProblem.

Definition at line 7896 of file FEProblemBase.C.

Referenced by checkNonlinearConvergence().

7902 {
7904  return false;
7905  if (fnorm <= the_residual * rtol)
7906  {
7907  oss << "Converged due to function norm " << fnorm << " < relative tolerance (" << rtol << ")\n";
7908  return true;
7909  }
7910  return false;
7911 }
bool _fail_next_nonlinear_convergence_check

◆ checkUserObjectJacobianRequirement()

void FEProblemBase::checkUserObjectJacobianRequirement ( THREAD_ID  tid)

Definition at line 1411 of file FEProblemBase.C.

Referenced by initialSetup().

1412 {
1413  std::set<const MooseVariableFEBase *> uo_jacobian_moose_vars;
1414  {
1415  std::vector<ShapeElementUserObject *> objs;
1416  theWarehouse()
1417  .query()
1419  .condition<AttribThread>(tid)
1420  .queryInto(objs);
1421 
1422  for (const auto & uo : objs)
1423  {
1424  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1425  const auto & mv_deps = uo->jacobianMooseVariables();
1426  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1427  }
1428  }
1429  {
1430  std::vector<ShapeSideUserObject *> objs;
1431  theWarehouse()
1432  .query()
1434  .condition<AttribThread>(tid)
1435  .queryInto(objs);
1436  for (const auto & uo : objs)
1437  {
1438  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1439  const auto & mv_deps = uo->jacobianMooseVariables();
1440  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1441  }
1442  }
1443 
1444  _uo_jacobian_moose_vars[tid].assign(uo_jacobian_moose_vars.begin(), uo_jacobian_moose_vars.end());
1445  std::sort(
1446  _uo_jacobian_moose_vars[tid].begin(), _uo_jacobian_moose_vars[tid].end(), sortMooseVariables);
1447 }
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 7580 of file FEProblemBase.C.

Referenced by checkProblemIntegrity().

7581 {
7582  // Check user_objects block coverage
7583  std::set<SubdomainID> mesh_subdomains = _mesh.meshSubdomains();
7584  std::set<SubdomainID> user_objects_blocks;
7585 
7586  // gather names of all user_objects that were defined in the input file
7587  // and the blocks that they are defined on
7588  std::set<std::string> names;
7589 
7590  std::vector<UserObject *> objects;
7592 
7593  for (const auto & obj : objects)
7594  names.insert(obj->name());
7595 
7596  // See if all referenced blocks are covered
7597  std::set<SubdomainID> difference;
7598  std::set_difference(user_objects_blocks.begin(),
7599  user_objects_blocks.end(),
7600  mesh_subdomains.begin(),
7601  mesh_subdomains.end(),
7602  std::inserter(difference, difference.end()));
7603 
7604  if (!difference.empty())
7605  {
7606  std::ostringstream oss;
7607  oss << "One or more UserObjects is referencing a nonexistent block:\n";
7608  for (const auto & id : difference)
7609  oss << id << "\n";
7610  mooseError(oss.str());
7611  }
7612 }
TheWarehouse & theWarehouse() const
MooseMesh & _mesh
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2921

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

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

5336 {
5338 
5339  if (_displaced_problem)
5340  _displaced_problem->clearActiveElementalMooseVariables(tid);
5341 }
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid)
Clear the active elemental MooseVariableFieldBase.
Definition: SubProblem.C:432
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveFEVariableCoupleableMatrixTags ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 5344 of file FEProblemBase.C.

5345 {
5347 
5348  if (_displaced_problem)
5349  _displaced_problem->clearActiveFEVariableCoupleableMatrixTags(tid);
5350 }
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:350
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableVectorTags()

void FEProblemBase::clearActiveFEVariableCoupleableVectorTags ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 5353 of file FEProblemBase.C.

5354 {
5356 
5357  if (_displaced_problem)
5358  _displaced_problem->clearActiveFEVariableCoupleableVectorTags(tid);
5359 }
virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:344
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 5401 of file FEProblemBase.C.

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

5402 {
5404 }
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 5362 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

5363 {
5365 
5366  if (_displaced_problem)
5367  _displaced_problem->clearActiveScalarVariableCoupleableMatrixTags(tid);
5368 }
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:391
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::clearActiveScalarVariableCoupleableVectorTags ( const THREAD_ID  tid)
overridevirtual

Reimplemented from SubProblem.

Definition at line 5371 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

5372 {
5374 
5375  if (_displaced_problem)
5376  _displaced_problem->clearActiveScalarVariableCoupleableVectorTags(tid);
5377 }
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:385
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearAllDofIndices()

void SubProblem::clearAllDofIndices ( )
inherited

Clear dof indices from variables in nl and aux systems.

Definition at line 1122 of file SubProblem.C.

Referenced by solve().

1123 {
1124  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1127 }
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:1529

◆ clearCurrentJacobianVectorTags()

void FEProblemBase::clearCurrentJacobianVectorTags ( )
inline

Clear the current Jacobian vector tag data structure ...

if someone creates it

Definition at line 2146 of file FEProblemBase.h.

Referenced by resetState().

2146 {}

◆ clearCurrentResidualVectorTags()

void FEProblemBase::clearCurrentResidualVectorTags ( )
inline

Clear the current residual vector tag data structure.

Definition at line 2798 of file FEProblemBase.h.

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

2799 {
2801 }
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 2221 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeDiracContributions().

2222 {
2224 
2225  if (_displaced_problem)
2226  _displaced_problem->clearDiracInfo();
2227 }
void clearPoints()
Remove all of the current points and elements.
std::shared_ptr< DisplacedProblem > _displaced_problem
DiracKernelInfo _dirac_kernel_info
nonlocal coupling matrix;
Definition: SubProblem.h:976

◆ computeAuxiliaryKernels()

void FEProblemBase::computeAuxiliaryKernels ( const ExecFlagType type)
virtual

Call compute methods on AuxKernels.

Definition at line 4228 of file FEProblemBase.C.

Referenced by execute().

4229 {
4230  _aux->compute(type);
4231 }
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50

◆ computeBounds()

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

Definition at line 6779 of file FEProblemBase.C.

Referenced by Moose::compute_bounds().

6782 {
6783  try
6784  {
6785  try
6786  {
6787  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
6788  "I expect these system numbers to be the same");
6789 
6790  if (!_current_nl_sys->hasVector("lower_bound") || !_current_nl_sys->hasVector("upper_bound"))
6791  return;
6792 
6793  TIME_SECTION("computeBounds", 1, "Computing Bounds");
6794 
6795  NumericVector<Number> & _lower = _current_nl_sys->getVector("lower_bound");
6796  NumericVector<Number> & _upper = _current_nl_sys->getVector("upper_bound");
6797  _lower.swap(lower);
6798  _upper.swap(upper);
6799  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
6801 
6802  _aux->residualSetup();
6803  _aux->compute(EXEC_LINEAR);
6804  _lower.swap(lower);
6805  _upper.swap(upper);
6806  }
6807  catch (...)
6808  {
6809  handleException("computeBounds");
6810  }
6811  }
6812  catch (MooseException & e)
6813  {
6814  mooseError("Irrecoverable exception: " + std::string(e.what()));
6815  }
6816  catch (...)
6817  {
6818  mooseError("Unexpected exception type");
6819  }
6820 }
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:873
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:1125
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
Provides a way for users to bail out of the current solve.
virtual void swap(NumericVector< Number > &v)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:882
MaterialWarehouse _all_materials
unsigned int THREAD_ID
Definition: MooseTypes.h:198
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeDamping()

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

Definition at line 6953 of file FEProblemBase.C.

Referenced by computePostCheck().

6955 {
6956  // Default to no damping
6957  Real damping = 1.0;
6958 
6959  if (_has_dampers)
6960  {
6961  TIME_SECTION("computeDamping", 1, "Computing Damping");
6962 
6963  // Save pointer to the current solution
6964  const NumericVector<Number> * _saved_current_solution = _current_nl_sys->currentSolution();
6965 
6967  // For now, do not re-compute auxiliary variables. Doing so allows a wild solution increment
6968  // to get to the material models, which may not be able to cope with drastically different
6969  // values. Once more complete dependency checking is in place, auxiliary variables (and
6970  // material properties) will be computed as needed by dampers.
6971  // _aux.compute();
6972  damping = _current_nl_sys->computeDamping(soln, update);
6973 
6974  // restore saved solution
6975  _current_nl_sys->setSolution(*_saved_current_solution);
6976  }
6977 
6978  return damping;
6979 }
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.
virtual void setSolution(const NumericVector< Number > &soln)
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
const NumericVector< Number > *const & currentSolution() const override
The solution vector that is currently being operated on.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ computeIndicators()

void FEProblemBase::computeIndicators ( )
virtual

Reimplemented in DumpObjectsProblem.

Definition at line 4000 of file FEProblemBase.C.

Referenced by computeIndicatorsAndMarkers(), Transient::endStep(), Steady::execute(), Eigenvalue::execute(), and initialAdaptMesh().

4001 {
4002  // Initialize indicator aux variable fields
4004  {
4005  TIME_SECTION("computeIndicators", 1, "Computing Indicators");
4006 
4007  // Internal side indicators may lead to creating a much larger sparsity pattern than dictated by
4008  // the actual finite element scheme (e.g. CFEM)
4009  const auto old_do_derivatives = ADReal::do_derivatives;
4010  ADReal::do_derivatives = false;
4011 
4012  std::vector<std::string> fields;
4013 
4014  // Indicator Fields
4015  const auto & indicators = _indicators.getActiveObjects();
4016  for (const auto & indicator : indicators)
4017  fields.push_back(indicator->name());
4018 
4019  // InternalSideIndicator Fields
4020  const auto & internal_indicators = _internal_side_indicators.getActiveObjects();
4021  for (const auto & internal_indicator : internal_indicators)
4022  fields.push_back(internal_indicator->name());
4023 
4024  _aux->zeroVariables(fields);
4025 
4026  // compute Indicators
4027  ComputeIndicatorThread cit(*this);
4028  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), cit);
4029  _aux->solution().close();
4030  _aux->update();
4031 
4032  ComputeIndicatorThread finalize_cit(*this, true);
4033  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), finalize_cit);
4034  _aux->solution().close();
4035  _aux->update();
4036 
4037  ADReal::do_derivatives = old_do_derivatives;
4038  }
4039 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1040
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators
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 3993 of file FEProblemBase.C.

3994 {
3996  computeMarkers();
3997 }
virtual void computeMarkers()
virtual void computeIndicators()

◆ computeJacobian()

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

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

Definition at line 6610 of file FEProblemBase.C.

Referenced by computeJacobianSys().

6613 {
6614  setCurrentNonlinearSystem(nl_sys_num);
6615 
6616  _fe_matrix_tags.clear();
6617 
6618  auto & tags = getMatrixTags();
6619  for (auto & tag : tags)
6620  _fe_matrix_tags.insert(tag.second);
6621 
6622  computeJacobianInternal(soln, jacobian, _fe_matrix_tags);
6623 }
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
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:215
virtual void computeJacobianInternal(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, const std::set< TagID > &tags)
Form a Jacobian matrix for multiple tags.
std::set< TagID > _fe_matrix_tags

◆ computeJacobianBlock()

void FEProblemBase::computeJacobianBlock ( SparseMatrix< 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 6767 of file FEProblemBase.C.

6771 {
6772  JacobianBlock jac_block(precond_system, jacobian, ivar, jvar);
6773  std::vector<JacobianBlock *> blocks = {&jac_block};
6774  mooseAssert(_current_nl_sys, "This should be non-null");
6776 }
Helper class for holding the preconditioning blocks to fill.
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:1125

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

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

6749 {
6750  TIME_SECTION("computeTransientImplicitJacobian", 2);
6751  setCurrentNonlinearSystem(nl_sys_num);
6752 
6753  if (_displaced_problem)
6754  {
6755  _aux->compute(EXEC_PRE_DISPLACE);
6756  _displaced_problem->updateMesh();
6757  }
6758 
6759  _aux->compute(EXEC_NONLINEAR);
6760 
6764 }
void computeJacobianBlocks(std::vector< JacobianBlock *> &blocks)
Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditio...
bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.
Definition: SubProblem.h:1026
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:44
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:30
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ computeJacobianInternal()

void FEProblemBase::computeJacobianInternal ( const NumericVector< Number > &  soln,
SparseMatrix< 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 6626 of file FEProblemBase.C.

Referenced by computeJacobian().

6629 {
6630  TIME_SECTION("computeJacobianInternal", 1);
6631 
6633 
6635 
6636  computeJacobianTags(tags);
6637 
6639 }
TagID systemMatrixTag() const override
Return the Matrix Tag ID for System.
virtual void setSolution(const NumericVector< Number > &soln)
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual void associateMatrixToTag(SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
Definition: SystemBase.C:1025
virtual void disassociateMatrixFromTag(SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1037
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.

◆ computeJacobianSys()

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

Form a Jacobian matrix.

It is called by Libmesh.

Definition at line 6588 of file FEProblemBase.C.

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

6591 {
6592  computeJacobian(soln, jacobian, sys.number());
6593 }
virtual void computeJacobian(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, const unsigned int nl_sys_num)
Form a Jacobian matrix with the default tag (system).

◆ computeJacobianTag()

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

Form a Jacobian matrix for a given tag.

Reimplemented in EigenProblem.

Definition at line 6596 of file FEProblemBase.C.

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

6599 {
6601 
6602  _current_nl_sys->associateMatrixToTag(jacobian, tag);
6603 
6604  computeJacobianTags({tag});
6605 
6607 }
virtual void setSolution(const NumericVector< Number > &soln)
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual void associateMatrixToTag(SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
Definition: SystemBase.C:1025
virtual void disassociateMatrixFromTag(SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1037
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 6642 of file FEProblemBase.C.

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

6643 {
6644  try
6645  {
6646  try
6647  {
6648  if (!_has_jacobian || !_const_jacobian)
6649  {
6650  TIME_SECTION("computeJacobianTags", 5, "Computing Jacobian");
6651 
6652  for (auto tag : tags)
6653  if (_current_nl_sys->hasMatrix(tag))
6654  {
6655  auto & matrix = _current_nl_sys->getMatrix(tag);
6656  matrix.zero();
6657  if (haveADObjects())
6658  // PETSc algorithms require diagonal allocations regardless of whether there is
6659  // non-zero diagonal dependence. With global AD indexing we only add non-zero
6660  // dependence, so PETSc will scream at us unless we artificially add the diagonals.
6661  for (auto index : make_range(matrix.row_start(), matrix.row_stop()))
6662  matrix.add(index, index, 0);
6663  }
6664 
6665  _aux->zeroVariablesForJacobian();
6666 
6667  unsigned int n_threads = libMesh::n_threads();
6668 
6669  // Random interface objects
6670  for (const auto & it : _random_data_objects)
6671  it.second->updateSeeds(EXEC_NONLINEAR);
6672 
6675  if (_displaced_problem)
6676  _displaced_problem->setCurrentlyComputingJacobian(true);
6677 
6680 
6681  for (unsigned int tid = 0; tid < n_threads; tid++)
6682  reinitScalars(tid);
6683 
6685 
6686  _aux->jacobianSetup();
6687 
6688  if (_displaced_problem)
6689  {
6690  _aux->compute(EXEC_PRE_DISPLACE);
6691  _displaced_problem->updateMesh();
6692  }
6693 
6694  for (unsigned int tid = 0; tid < n_threads; tid++)
6695  {
6698  }
6699 
6700  // When computing the initial Jacobian for automatic variable scaling we need to make sure
6701  // that the time derivatives have been calculated. So we'll call down to the nonlinear
6702  // system here. Note that if we are not doing this initial Jacobian calculation we will
6703  // just exit in that class to avoid redundant calculation (the residual function also
6704  // computes time derivatives)
6705  _current_nl_sys->computeTimeDerivatives(/*jacobian_calculation =*/true);
6706 
6707  _aux->compute(EXEC_NONLINEAR);
6708 
6710 
6712 
6714 
6716 
6718 
6719  // For explicit Euler calculations for example we often compute the Jacobian one time and
6720  // then re-use it over and over. If we're performing automatic scaling, we don't want to
6721  // use that kernel, diagonal-block only Jacobian for our actual matrix when performing
6722  // solves!
6724  _has_jacobian = true;
6725  }
6726  }
6727  catch (...)
6728  {
6729  handleException("computeJacobianTags");
6730  }
6731  }
6732  catch (const MooseException &)
6733  {
6734  // The buck stops here, we have already handled the exception by
6735  // calling the system's stopSolve() method, it is now up to PETSc to return a
6736  // "diverged" reason during the next solve.
6737  }
6738  catch (...)
6739  {
6740  mooseError("Unexpected exception type");
6741  }
6742 
6743  resetState();
6744 }
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:1026
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:1481
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
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.
virtual void zero()=0
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
void computeTimeDerivatives(bool jacobian_calculation=false)
Computes the time derivative vector.
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:69
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition: SubProblem.h:726
virtual void jacobianSetup(THREAD_ID tid=0) const
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:44
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:30
Provides a way for users to bail out of the current solve.
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:973
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseObjectWarehouse< Function > _functions
functions
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
bool _const_jacobian
true if the Jacobian is constant
bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
Definition: SubProblem.h:1038
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1772
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.

◆ computeMarkers()

void FEProblemBase::computeMarkers ( )
virtual

Reimplemented in DumpObjectsProblem.

Definition at line 4042 of file FEProblemBase.C.

Referenced by adaptMesh(), computeIndicatorsAndMarkers(), Transient::endStep(), Steady::execute(), Eigenvalue::execute(), and initialAdaptMesh().

4043 {
4044  if (_markers.hasActiveObjects())
4045  {
4046  TIME_SECTION("computeMarkers", 1, "Computing Markers");
4047 
4048  std::vector<std::string> fields;
4049 
4050  // Marker Fields
4051  const auto & markers = _markers.getActiveObjects();
4052  for (const auto & marker : markers)
4053  fields.push_back(marker->name());
4054 
4055  _aux->zeroVariables(fields);
4056 
4058 
4059  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
4060  {
4061  const auto & markers = _markers.getActiveObjects(tid);
4062  for (const auto & marker : markers)
4063  marker->markerSetup();
4064  }
4065 
4066  ComputeMarkerThread cmt(*this);
4067  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), cmt);
4068 
4069  _aux->solution().close();
4070  _aux->update();
4071  }
4072 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1040
unsigned int n_threads()
void updateErrorVectors()
Update the ErrorVectors that have been requested through calls to getErrorVector().
Definition: Adaptivity.C:363
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:198

◆ computeMultiAppsDT()

Real FEProblemBase::computeMultiAppsDT ( ExecFlagType  type)

Find the smallest timestep over all MultiApps.

Definition at line 5085 of file FEProblemBase.C.

Referenced by Transient::constrainDTFromMultiApp().

5086 {
5087  const auto & multi_apps = _transient_multi_apps[type].getActiveObjects();
5088 
5089  Real smallest_dt = std::numeric_limits<Real>::max();
5090 
5091  for (const auto & multi_app : multi_apps)
5092  smallest_dt = std::min(smallest_dt, multi_app->computeDT());
5093 
5094  return smallest_dt;
5095 }
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:50
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
auto min(const L &left, const R &right)

◆ computeNearNullSpace()

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

Definition at line 6823 of file FEProblemBase.C.

Referenced by Moose::compute_nearnullspace().

6825 {
6826  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
6827  "I expect these system numbers to be the same");
6828 
6829  sp.clear();
6830  for (unsigned int i = 0; i < subspaceDim("NearNullSpace"); ++i)
6831  {
6832  std::stringstream postfix;
6833  postfix << "_" << i;
6834  std::string modename = "NearNullSpace" + postfix.str();
6835  sp.push_back(&_current_nl_sys->getVector(modename));
6836  }
6837 }
unsigned int subspaceDim(const std::string &prefix) const
Dimension of the subspace spanned by vectors with a given prefix.
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:1125
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:882

◆ computeNullSpace()

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

Definition at line 6840 of file FEProblemBase.C.

Referenced by Moose::compute_nullspace().

6842 {
6843  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
6844  "I expect these system numbers to be the same");
6845  sp.clear();
6846  for (unsigned int i = 0; i < subspaceDim("NullSpace"); ++i)
6847  {
6848  std::stringstream postfix;
6849  postfix << "_" << i;
6850  sp.push_back(&_current_nl_sys->getVector("NullSpace" + postfix.str()));
6851  }
6852 }
unsigned int subspaceDim(const std::string &prefix) const
Dimension of the subspace spanned by vectors with a given prefix.
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:1125
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:882

◆ computePostCheck()

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

Definition at line 6870 of file FEProblemBase.C.

Referenced by Moose::compute_postcheck().

6876 {
6877  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
6878  "I expect these system numbers to be the same");
6879 
6880  // This function replaces the old PetscSupport::dampedCheck() function.
6881  //
6882  // 1.) Recreate code in PetscSupport::dampedCheck() for constructing
6883  // ghosted "soln" and "update" vectors.
6884  // 2.) Call FEProblemBase::computeDamping() with these ghost vectors.
6885  // 3.) Recreate the code in PetscSupport::dampedCheck() to actually update
6886  // the solution vector based on the damping, and set the "changed" flags
6887  // appropriately.
6888 
6889  TIME_SECTION("computePostCheck", 2, "Computing Post Check");
6890 
6892 
6893  // MOOSE's FEProblemBase doesn't update the solution during the
6894  // postcheck, but FEProblemBase-derived classes might.
6896  {
6897  // We need ghosted versions of new_soln and search_direction (the
6898  // ones we get from libmesh/PETSc are PARALLEL vectors. To make
6899  // our lives simpler, we use the same ghosting pattern as the
6900  // system's current_local_solution to create new ghosted vectors.
6901 
6902  // Construct zeroed-out clones with the same ghosted dofs as the
6903  // System's current_local_solution.
6904  std::unique_ptr<NumericVector<Number>> ghosted_solution =
6905  sys.current_local_solution->zero_clone(),
6906  ghosted_search_direction =
6907  sys.current_local_solution->zero_clone();
6908 
6909  // Copy values from input vectors into clones with ghosted values.
6910  *ghosted_solution = new_soln;
6911  *ghosted_search_direction = search_direction;
6912 
6913  if (_has_dampers)
6914  {
6915  // Compute the damping coefficient using the ghosted vectors
6916  Real damping = computeDamping(*ghosted_solution, *ghosted_search_direction);
6917 
6918  // If some non-trivial damping was computed, update the new_soln
6919  // vector accordingly.
6920  if (damping < 1.0)
6921  {
6922  new_soln = old_soln;
6923  new_soln.add(-damping, search_direction);
6924  changed_new_soln = true;
6925  }
6926  }
6927 
6928  if (shouldUpdateSolution())
6929  {
6930  // Update the ghosted copy of the new solution, if necessary.
6931  if (changed_new_soln)
6932  *ghosted_solution = new_soln;
6933 
6934  bool updated_solution = updateSolution(new_soln, *ghosted_solution);
6935  if (updated_solution)
6936  changed_new_soln = true;
6937  }
6938  }
6939 
6941  {
6943  _aux->setPreviousNewtonSolution();
6944  }
6945 
6946  // MOOSE doesn't change the search_direction
6947  changed_search_direction = false;
6948 
6950 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.
virtual void setPreviousNewtonSolution(const NumericVector< Number > &soln)
bool _has_dampers
Whether or not this system has any Dampers associated with it.
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
virtual bool updateSolution(NumericVector< Number > &vec_solution, NumericVector< Number > &ghosted_solution)
Update the solution.
virtual Real computeDamping(const NumericVector< Number > &soln, const NumericVector< Number > &update)
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:163
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1125
const ExecFlagType EXEC_POSTCHECK
Definition: Moose.C:31
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void add(const numeric_index_type i, const Number value)=0
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:30

◆ computeResidual() [1/2]

void FEProblemBase::computeResidual ( NonlinearImplicitSystem &  sys,
const NumericVector< Number > &  soln,
NumericVector< 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.

Definition at line 6198 of file FEProblemBase.C.

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

6201 {
6202  mooseDeprecated("Please use computeResidualSys");
6203 
6204  computeResidualSys(sys, soln, residual);
6205 }
void mooseDeprecated(Args &&... args) const
virtual void computeResidualSys(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
This function is called by Libmesh to form a residual.

◆ computeResidual() [2/2]

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

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

Definition at line 6208 of file FEProblemBase.C.

6211 {
6212  setCurrentNonlinearSystem(nl_sys_num);
6213 
6214  // We associate the residual tag with the given residual vector to make sure we
6215  // don't filter it out below
6217  const auto & residual_vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
6218 
6219  // We filter out tags which do not have associated vectors in the current nonlinear
6220  // system. This is essential to be able to use system-dependent residual tags.
6222 
6223  computeResidualInternal(soln, residual, _fe_vector_tags);
6224 }
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:930
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:266
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:149
TagID residualVectorTag() const override
std::set< TagID > _fe_vector_tags
virtual void computeResidualInternal(const NumericVector< Number > &soln, NumericVector< Number > &residual, const std::set< TagID > &tags)
Form a residual vector for a set of tags.

◆ computeResidualAndJacobian()

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

Form a residual and Jacobian with default tags.

Definition at line 6227 of file FEProblemBase.C.

Referenced by ComputeResidualAndJacobian::residual_and_jacobian().

6230 {
6231  try
6232  {
6233  try
6234  {
6235  // vector tags
6236  {
6238  const auto & residual_vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
6239 
6240  // We filter out tags which do not have associated vectors in the current nonlinear
6241  // system. This is essential to be able to use system-dependent residual tags.
6243 
6245  }
6246 
6247  // matrix tags
6248  {
6249  _fe_matrix_tags.clear();
6250 
6251  auto & tags = getMatrixTags();
6252  for (auto & tag : tags)
6253  _fe_matrix_tags.insert(tag.second);
6254  }
6255 
6257 
6260 
6261  for (const auto tag : _fe_matrix_tags)
6262  if (_current_nl_sys->hasMatrix(tag))
6263  {
6264  auto & matrix = _current_nl_sys->getMatrix(tag);
6265  matrix.zero();
6266  if (haveADObjects())
6267  // PETSc algorithms require diagonal allocations regardless of whether there is non-zero
6268  // diagonal dependence. With global AD indexing we only add non-zero
6269  // dependence, so PETSc will scream at us unless we artificially add the diagonals.
6270  for (auto index : make_range(matrix.row_start(), matrix.row_stop()))
6271  matrix.add(index, index, 0);
6272  }
6273 
6274  _aux->zeroVariablesForResidual();
6275 
6276  unsigned int n_threads = libMesh::n_threads();
6277 
6279 
6280  // Random interface objects
6281  for (const auto & it : _random_data_objects)
6282  it.second->updateSeeds(EXEC_LINEAR);
6283 
6287  if (_displaced_problem)
6288  {
6289  _displaced_problem->setCurrentlyComputingResidual(true);
6290  _displaced_problem->setCurrentlyComputingJacobian(true);
6291  _displaced_problem->setCurrentlyComputingResidualAndJacobian(true);
6292  }
6293 
6295 
6297 
6298  for (unsigned int tid = 0; tid < n_threads; tid++)
6299  reinitScalars(tid);
6300 
6302 
6303  _aux->residualSetup();
6304 
6305  if (_displaced_problem)
6306  {
6307  _aux->compute(EXEC_PRE_DISPLACE);
6308  _displaced_problem->updateMesh();
6310  updateMortarMesh();
6311  }
6312 
6313  for (THREAD_ID tid = 0; tid < n_threads; tid++)
6314  {
6317  }
6318 
6319  // Where is the aux system done? Could the non-current nonlinear systems also be done there?
6320  for (auto & nl : _nl)
6321  nl->computeTimeDerivatives();
6322 
6323  _aux->compute(EXEC_LINEAR);
6324 
6326 
6328 
6330 
6333 
6335 
6338  }
6339  catch (...)
6340  {
6341  handleException("computeResidualAndJacobian");
6342  }
6343  }
6344  catch (const MooseException &)
6345  {
6346  // The buck stops here, we have already handled the exception by
6347  // calling the system's stopSolve() method, it is now up to PETSc to return a
6348  // "diverged" reason during the next solve.
6349  }
6350  catch (...)
6351  {
6352  mooseError("Unexpected exception type");
6353  }
6354 
6355  resetState();
6356 }
virtual void residualSetup(THREAD_ID tid=0) const
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
Definition: SystemBase.C:942
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 setSolution(const NumericVector< Number > &soln)
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:930
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
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:266
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:1394
void setCurrentlyComputingJacobian(const bool currently_computing_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:644
virtual void resetState()
Reset state of this object in preparation for the next evaluation.
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.
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:1041
MortarData _mortar_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
virtual void associateMatrixToTag(SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
Definition: SystemBase.C:1025
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:149
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:69
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition: SubProblem.h:726
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:215
TagID residualVectorTag() const override
void residualSetup()
Calls the residualSetup function for each of the output objects.
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:44
virtual void disassociateMatrixFromTag(SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1037
virtual void updateMortarMesh()
std::set< TagID > _fe_matrix_tags
Provides a way for users to bail out of the current solve.
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:973
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
bool hasDisplacedObjects() const
Returns whether any of the AutomaticMortarGeneration objects are running on a displaced mesh...
Definition: MortarData.h:99
IntRange< T > make_range(T beg, T end)
std::set< TagID > _fe_vector_tags
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
void setCurrentResidualVectorTags(const std::set< TagID > &vector_tags)
Set the current residual vector tag data structure based on the passed in tag IDs.
MooseObjectWarehouse< Function > _functions
functions
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
Definition: SubProblem.h:1038
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1772
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h:198
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeResidualInternal()

void FEProblemBase::computeResidualInternal ( const NumericVector< Number > &  soln,
NumericVector< 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 6388 of file FEProblemBase.C.

Referenced by computeResidual().

6391 {
6392  parallel_object_only();
6393 
6394  TIME_SECTION("computeResidualInternal", 1);
6395 
6396  try
6397  {
6399 
6401 
6402  computeResidualTags(tags);
6403 
6405  }
6406  catch (MooseException & e)
6407  {
6408  // If a MooseException propagates all the way to here, it means
6409  // that it was thrown from a MOOSE system where we do not
6410  // (currently) properly support the throwing of exceptions, and
6411  // therefore we have no choice but to error out. It may be
6412  // *possible* to handle exceptions from other systems, but in the
6413  // meantime, we don't want to silently swallow any unhandled
6414  // exceptions here.
6415  mooseError("An unhandled MooseException was raised during residual computation. Please "
6416  "contact the MOOSE team for assistance.");
6417  }
6418 }
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
Definition: SystemBase.C:942
virtual void setSolution(const NumericVector< Number > &soln)
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:930
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.
TagID residualVectorTag() const override
Provides a way for users to bail out of the current solve.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ computeResidualL2Norm()

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

Referenced by FixedPointSolve::solve(), and FixedPointSolve::solveStep().

6172 {
6173  TIME_SECTION("computeResidualL2Norm", 2, "Computing L2 Norm of Residual");
6174 
6175  if (_nl.size() > 1)
6176  mooseError("Multiple nonlinear systems in the same input are not currently supported when "
6177  "performing fixed point iterations in multi-app contexts");
6178 
6179  _current_nl_sys = _nl[0].get();
6180  computeResidual(*_nl[0]->currentSolution(), _nl[0]->RHS(), /*nl_sys=*/0);
6181 
6182  return _nl[0]->RHS().l2_norm();
6183 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
void computeResidual(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
This function is called by Libmesh to form a residual.

◆ computeResidualSys()

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

This function is called by Libmesh to form a residual.

Definition at line 6186 of file FEProblemBase.C.

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

6189 {
6190  parallel_object_only();
6191 
6192  TIME_SECTION("computeResidualSys", 5);
6193 
6194  computeResidual(soln, residual, sys.number());
6195 }
void computeResidual(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
This function is called by Libmesh to form a residual.

◆ computeResidualTag()

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

Form a residual vector for a given tag.

Reimplemented in EigenProblem.

Definition at line 6359 of file FEProblemBase.C.

6362 {
6363  try
6364  {
6366 
6367  _current_nl_sys->associateVectorToTag(residual, tag);
6368 
6369  computeResidualTags({tag});
6370 
6372  }
6373  catch (MooseException & e)
6374  {
6375  // If a MooseException propagates all the way to here, it means
6376  // that it was thrown from a MOOSE system where we do not
6377  // (currently) properly support the throwing of exceptions, and
6378  // therefore we have no choice but to error out. It may be
6379  // *possible* to handle exceptions from other systems, but in the
6380  // meantime, we don't want to silently swallow any unhandled
6381  // exceptions here.
6382  mooseError("An unhandled MooseException was raised during residual computation. Please "
6383  "contact the MOOSE team for assistance.");
6384  }
6385 }
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
Definition: SystemBase.C:942
virtual void setSolution(const NumericVector< Number > &soln)
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:930
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.
Provides a way for users to bail out of the current solve.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ computeResidualTags()

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

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

Definition at line 6504 of file FEProblemBase.C.

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

6505 {
6506  parallel_object_only();
6507 
6508  try
6509  {
6510  try
6511  {
6512  TIME_SECTION("computeResidualTags", 5, "Computing Residual");
6513 
6514  ADReal::do_derivatives = false;
6515 
6517 
6518  _aux->zeroVariablesForResidual();
6519 
6520  unsigned int n_threads = libMesh::n_threads();
6521 
6523 
6524  // Random interface objects
6525  for (const auto & it : _random_data_objects)
6526  it.second->updateSeeds(EXEC_LINEAR);
6527 
6529 
6531 
6532  for (unsigned int tid = 0; tid < n_threads; tid++)
6533  reinitScalars(tid);
6534 
6536 
6537  _aux->residualSetup();
6538 
6539  if (_displaced_problem)
6540  {
6541  _aux->compute(EXEC_PRE_DISPLACE);
6542  _displaced_problem->updateMesh();
6544  updateMortarMesh();
6545  }
6546 
6547  for (THREAD_ID tid = 0; tid < n_threads; tid++)
6548  {
6551  }
6552 
6553  // Where is the aux system done? Could the non-current nonlinear systems also be done there?
6554  for (auto & nl : _nl)
6555  nl->computeTimeDerivatives();
6556 
6557  _aux->compute(EXEC_LINEAR);
6558 
6560 
6562 
6564 
6567  }
6568  catch (...)
6569  {
6570  handleException("computeResidualTags");
6571  }
6572  }
6573  catch (const MooseException &)
6574  {
6575  // The buck stops here, we have already handled the exception by
6576  // calling the system's stopSolve() method, it is now up to PETSc to return a
6577  // "diverged" reason during the next solve.
6578  }
6579  catch (...)
6580  {
6581  mooseError("Unexpected exception type");
6582  }
6583 
6584  resetState();
6585 }
virtual void residualSetup(THREAD_ID tid=0) const
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
virtual void reinitScalars(const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
fills the VariableValue arrays for scalar variables from the solution vector
void computeResidualTags(const std::set< TagID > &tags)
Form multiple tag-associated residual vectors for all the given tags.
virtual void resetState()
Reset state of this object in preparation for the next evaluation.
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.
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:1041
MortarData _mortar_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
void residualSetup()
Calls the residualSetup function for each of the output objects.
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:44
virtual void updateMortarMesh()
Provides a way for users to bail out of the current solve.
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
bool hasDisplacedObjects() const
Returns whether any of the AutomaticMortarGeneration objects are running on a displaced mesh...
Definition: MortarData.h:99
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
void setCurrentResidualVectorTags(const std::set< TagID > &vector_tags)
Set the current residual vector tag data structure based on the passed in tag IDs.
MooseObjectWarehouse< Function > _functions
functions
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1772
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h:198
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeResidualType()

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

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

Definition at line 6421 of file FEProblemBase.C.

6424 {
6425  TIME_SECTION("computeResidualType", 5);
6426 
6427  try
6428  {
6430 
6432 
6434 
6436  }
6437  catch (MooseException & e)
6438  {
6439  // If a MooseException propagates all the way to here, it means
6440  // that it was thrown from a MOOSE system where we do not
6441  // (currently) properly support the throwing of exceptions, and
6442  // therefore we have no choice but to error out. It may be
6443  // *possible* to handle exceptions from other systems, but in the
6444  // meantime, we don't want to silently swallow any unhandled
6445  // exceptions here.
6446  mooseError("An unhandled MooseException was raised during residual computation. Please "
6447  "contact the MOOSE team for assistance.");
6448  }
6449 }
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
Definition: SystemBase.C:942
virtual void setSolution(const NumericVector< Number > &soln)
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:930
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.
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.

◆ computeTransposeNullSpace()

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

Definition at line 6855 of file FEProblemBase.C.

Referenced by Moose::compute_transpose_nullspace().

6857 {
6858  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
6859  "I expect these system numbers to be the same");
6860  sp.clear();
6861  for (unsigned int i = 0; i < subspaceDim("TransposeNullSpace"); ++i)
6862  {
6863  std::stringstream postfix;
6864  postfix << "_" << i;
6865  sp.push_back(&_current_nl_sys->getVector("TransposeNullSpace" + postfix.str()));
6866  }
6867 }
unsigned int subspaceDim(const std::string &prefix) const
Dimension of the subspace spanned by vectors with a given prefix.
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:1125
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:882

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

Referenced by MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), and MultiAppConservativeTransfer::postExecute().

4294 {
4295  const auto old_exec_flag = _current_execute_on_flag;
4298  .query()
4299  .condition<AttribSystem>("UserObject")
4300  .condition<AttribExecOns>(type)
4301  .condition<AttribName>(name);
4302  computeUserObjectsInternal(type, group, query);
4303  _current_execute_on_flag = old_exec_flag;
4304 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.
QueryCache is a convenient way to construct and pass around (possible partially constructed) warehous...
Definition: TheWarehouse.h:208
void computeUserObjectsInternal(const ExecFlagType &type, const Moose::AuxGroup &group, TheWarehouse::Query &query)
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
TheWarehouse & theWarehouse() const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
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 4307 of file FEProblemBase.C.

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

4308 {
4310  theWarehouse().query().condition<AttribSystem>("UserObject").condition<AttribExecOns>(type);
4311  computeUserObjectsInternal(type, group, query);
4312 }
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:50
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 4315 of file FEProblemBase.C.

Referenced by computeUserObjectByName(), and computeUserObjects().

4318 {
4319  try
4320  {
4321  TIME_SECTION("computeUserObjects", 1, "Computing User Objects");
4322 
4323  // Add group to query
4324  if (group == Moose::PRE_IC)
4325  primary_query.condition<AttribPreIC>(true);
4326  else if (group == Moose::PRE_AUX)
4327  primary_query.condition<AttribPreAux>(type);
4328  else if (group == Moose::POST_AUX)
4329  primary_query.condition<AttribPostAux>(type);
4330 
4331  // query everything first to obtain a list of execution groups
4332  std::vector<UserObject *> uos;
4333  primary_query.clone().queryIntoUnsorted(uos);
4334  std::set<int> execution_groups;
4335  for (const auto & uo : uos)
4336  execution_groups.insert(uo->getParam<int>("execution_order_group"));
4337 
4338  // iterate over execution order groups
4339  for (const auto execution_group : execution_groups)
4340  {
4341  auto query = primary_query.clone().condition<AttribExecutionOrderGroup>(execution_group);
4342 
4343  std::vector<GeneralUserObject *> genobjs;
4344  query.clone().condition<AttribInterfaces>(Interfaces::GeneralUserObject).queryInto(genobjs);
4345 
4346  std::vector<UserObject *> userobjs;
4347  query.clone()
4352  .queryInto(userobjs);
4353 
4354  std::vector<UserObject *> tgobjs;
4355  query.clone()
4357  .queryInto(tgobjs);
4358 
4359  std::vector<UserObject *> nodal;
4360  query.clone().condition<AttribInterfaces>(Interfaces::NodalUserObject).queryInto(nodal);
4361 
4362  std::vector<MortarUserObject *> mortar;
4363  query.clone().condition<AttribInterfaces>(Interfaces::MortarUserObject).queryInto(mortar);
4364 
4365  if (userobjs.empty() && genobjs.empty() && tgobjs.empty() && nodal.empty() && mortar.empty())
4366  continue;
4367 
4368  // Start the timer here since we have at least one active user object
4369  std::string compute_uo_tag = "computeUserObjects(" + Moose::stringify(type) + ")";
4370 
4371  // Perform Residual/Jacobian setups
4372  if (type == EXEC_LINEAR)
4373  {
4374  for (auto obj : userobjs)
4375  obj->residualSetup();
4376  for (auto obj : nodal)
4377  obj->residualSetup();
4378  for (auto obj : mortar)
4379  obj->residualSetup();
4380  for (auto obj : tgobjs)
4381  obj->residualSetup();
4382  for (auto obj : genobjs)
4383  obj->residualSetup();
4384  }
4385  else if (type == EXEC_NONLINEAR)
4386  {
4387  for (auto obj : userobjs)
4388  obj->jacobianSetup();
4389  for (auto obj : nodal)
4390  obj->jacobianSetup();
4391  for (auto obj : mortar)
4392  obj->jacobianSetup();
4393  for (auto obj : tgobjs)
4394  obj->jacobianSetup();
4395  for (auto obj : genobjs)
4396  obj->jacobianSetup();
4397  }
4398 
4399  for (auto obj : userobjs)
4400  obj->initialize();
4401 
4402  // Execute Side/InternalSide/Interface/Elemental/DomainUserObjects
4403  if (!userobjs.empty())
4404  {
4405  // non-nodal user objects have to be run separately before the nodal user objects run
4406  // because some nodal user objects (NodalNormal related) depend on elemental user objects
4407  // :-(
4408  ComputeUserObjectsThread cppt(*this, query);
4409  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), cppt);
4410 
4411  // There is one instance in rattlesnake where an elemental user object's finalize depends
4412  // on a side user object having been finalized first :-(
4419  }
4420 
4421  // if any userobject may have written to variables we need to close the aux solution
4422  for (const auto & uo : userobjs)
4423  if (auto euo = dynamic_cast<const ElementUserObject *>(uo);
4424  euo && euo->hasWritableCoupledVariables())
4425  {
4426  _aux->solution().close();
4427  _aux->system().update();
4428  break;
4429  }
4430 
4431  // Execute NodalUserObjects
4432  // BISON has an axial reloc elemental user object that has a finalize func that depends on a
4433  // nodal user object's prev value. So we can't initialize this until after elemental objects
4434  // have been finalized :-(
4435  for (auto obj : nodal)
4436  obj->initialize();
4437  if (query.clone().condition<AttribInterfaces>(Interfaces::NodalUserObject).count() > 0)
4438  {
4439  ComputeNodalUserObjectsThread cnppt(*this, query);
4440  Threads::parallel_reduce(*_mesh.getLocalNodeRange(), cnppt);
4442  }
4443 
4444  // if any userobject may have written to variables we need to close the aux solution
4445  for (const auto & uo : nodal)
4446  if (auto nuo = dynamic_cast<const NodalUserObject *>(uo);
4447  nuo && nuo->hasWritableCoupledVariables())
4448  {
4449  _aux->solution().close();
4450  _aux->system().update();
4451  break;
4452  }
4453 
4454  // Execute MortarUserObjects
4455  {
4456  for (auto obj : mortar)
4457  obj->initialize();
4458  if (!mortar.empty())
4459  {
4460  auto create_and_run_mortar_functors = [this, type, &mortar](const bool displaced)
4461  {
4462  // go over mortar interfaces and construct functors
4463  const auto & mortar_interfaces = getMortarInterfaces(displaced);
4464  for (const auto & mortar_interface : mortar_interfaces)
4465  {
4466  const auto primary_secondary_boundary_pair = mortar_interface.first;
4467  auto mortar_uos_to_execute =
4468  getMortarUserObjects(primary_secondary_boundary_pair.first,
4469  primary_secondary_boundary_pair.second,
4470  displaced,
4471  mortar);
4472  const auto & mortar_generation_object = mortar_interface.second;
4473 
4474  auto * const subproblem = displaced
4475  ? static_cast<SubProblem *>(_displaced_problem.get())
4476  : static_cast<SubProblem *>(this);
4477  MortarUserObjectThread muot(mortar_uos_to_execute,
4478  mortar_generation_object,
4479  *subproblem,
4480  *this,
4481  displaced,
4482  subproblem->assembly(0, 0));
4483 
4484  muot();
4485  }
4486  };
4487 
4488  create_and_run_mortar_functors(false);
4489  if (_displaced_problem)
4490  create_and_run_mortar_functors(true);
4491  }
4492  for (auto obj : mortar)
4493  obj->finalize();
4494  }
4495 
4496  // Execute threaded general user objects
4497  for (auto obj : tgobjs)
4498  obj->initialize();
4499  std::vector<GeneralUserObject *> tguos_zero;
4500  query.clone()
4501  .condition<AttribThread>(0)
4502  .condition<AttribInterfaces>(Interfaces::ThreadedGeneralUserObject)
4503  .queryInto(tguos_zero);
4504  for (auto obj : tguos_zero)
4505  {
4506  std::vector<GeneralUserObject *> tguos;
4507  auto q = query.clone()
4508  .condition<AttribName>(obj->name())
4509  .condition<AttribInterfaces>(Interfaces::ThreadedGeneralUserObject);
4510  q.queryInto(tguos);
4511 
4513  Threads::parallel_reduce(GeneralUserObjectRange(tguos.begin(), tguos.end()), ctguot);
4514  joinAndFinalize(q);
4515  }
4516 
4517  // Execute general user objects
4519  true);
4520  }
4521  }
4522  catch (...)
4523  {
4524  handleException("computeUserObjectsInternal");
4525  }
4526 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1040
void joinAndFinalize(TheWarehouse::Query query, bool isgen=false)
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.
ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1077
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:294
void handleException(const std::string &calling_method)
Handle exceptions.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
std::vector< MortarUserObject * > getMortarUserObjects(BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced, const std::vector< MortarUserObject *> &mortar_uo_superset)
Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
StoredRange< std::vector< GeneralUserObject * >::iterator, GeneralUserObject * > GeneralUserObjectRange
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:344
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
query_obj query
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:30
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
Class for threaded computation of UserObjects.
std::shared_ptr< DisplacedProblem > _displaced_problem
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, AutomaticMortarGeneration > & getMortarInterfaces(bool on_displaced) const
virtual std::unique_ptr< Attribute > clone() const =0
clone creates and returns and identical (deep) copy of this attribute - i.e.

◆ computingInitialResidual()

bool FEProblemBase::computingInitialResidual ( 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 5977 of file FEProblemBase.C.

Referenced by DisplacedProblem::computingInitialResidual().

5978 {
5979  return _nl[nl_sys_num]->computingInitialResidual();
5980 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

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

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

◆ computingNonlinearResid() [2/4]

virtual void SubProblem::computingNonlinearResid
inline

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

Definition at line 667 of file SubProblem.h.

668  {
669  _computing_nonlinear_residual = computing_nonlinear_residual;
670  }
bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
Definition: SubProblem.h:1032

◆ computingNonlinearResid() [3/4]

bool SubProblem::computingNonlinearResid
inline

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

Definition at line 662 of file SubProblem.h.

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

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

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

8153 {
8154  parallel_object_only();
8155 
8156  if (_displaced_problem)
8157  _displaced_problem->computingNonlinearResid(computing_nonlinear_residual);
8158  _computing_nonlinear_residual = computing_nonlinear_residual;
8159 }
bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
Definition: SubProblem.h:1032
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ computingScalingJacobian() [1/2]

void FEProblemBase::computingScalingJacobian ( bool  computing_scaling_jacobian)
inline

Setter for whether we're computing the scaling jacobian.

Definition at line 2058 of file FEProblemBase.h.

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

2059  {
2060  _computing_scaling_jacobian = computing_scaling_jacobian;
2061  }
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 2063 of file FEProblemBase.h.

2063 { 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 2068 of file FEProblemBase.h.

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

2069  {
2070  _computing_scaling_residual = computing_scaling_residual;
2071  }
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 2076 of file FEProblemBase.h.

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

◆ connectControllableParams()

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

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

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

Definition at line 34 of file MooseBaseParameterInterface.C.

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

◆ console()

const ConsoleStream& Problem::console ( ) const
inlineinherited

Return console handle.

Definition at line 48 of file Problem.h.

Referenced by Moose::SlepcSupport::mooseSlepcEPSMonitor(), ComputeMarkerThread::printBlockExecutionInformation(), ComputeDiracThread::printBlockExecutionInformation(), ComputeIndicatorThread::printBlockExecutionInformation(), ComputeUserObjectsThread::printBlockExecutionInformation(), NonlinearThread::printBlockExecutionInformation(), NonlinearThread::printBoundaryExecutionInformation(), ComputeInitialConditionThread::printGeneralExecutionInformation(), ComputeFVInitialConditionThread::printGeneralExecutionInformation(), ComputeNodalUserObjectsThread::printGeneralExecutionInformation(), ComputeNodalKernelBcsThread::printGeneralExecutionInformation(), ComputeNodalKernelBCJacobiansThread::printGeneralExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeNodalKernelsThread::printGeneralExecutionInformation(), ComputeNodalDampingThread::printGeneralExecutionInformation(), ComputeMarkerThread::printGeneralExecutionInformation(), ComputeDiracThread::printGeneralExecutionInformation(), ComputeNodalKernelJacobiansThread::printGeneralExecutionInformation(), ComputeIndicatorThread::printGeneralExecutionInformation(), ComputeThreadedGeneralUserObjectsThread::printGeneralExecutionInformation(), ComputeUserObjectsThread::printGeneralExecutionInformation(), 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 8055 of file FEProblemBase.C.

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

8056 {
8057  return _const_jacobian;
8058 }
bool _const_jacobian
true if the Jacobian is constant

◆ converged()

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

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

We will have to first convert apps to use nlConverged, 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 101 of file SubProblem.h.

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

101 { return nlConverged(nl_sys_num); }
virtual bool nlConverged(const unsigned int nl_sys_num)
Definition: SubProblem.h:93

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

8325 {
8326  return mesh().coordTransform();
8327 }
MooseAppCoordTransform & coordTransform()
Definition: MooseMesh.h:1830
virtual MooseMesh & mesh() override

◆ copySolutionsBackwards()

void FEProblemBase::copySolutionsBackwards ( )
virtual

Definition at line 5983 of file FEProblemBase.C.

Referenced by initialSetup().

5984 {
5985  TIME_SECTION("copySolutionsBackwards", 3, "Copying Solutions Backward");
5986 
5987  for (auto & nl : _nl)
5988  nl->copySolutionsBackwards();
5989  _aux->copySolutionsBackwards();
5990 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ coupling()

Moose::CouplingType FEProblemBase::coupling ( )
inline

Definition at line 168 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::computeJacobianInternal().

168 { 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 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 2762 of file FEProblemBase.h.

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

2763 {
2764  return _cm[i].get();
2765 }
std::vector< std::unique_ptr< 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 7030 of file FEProblemBase.C.

7038 {
7039  _has_mortar = true;
7040 
7041  if (on_displaced)
7042  return _mortar_data.createMortarInterface(primary_secondary_boundary_pair,
7043  primary_secondary_subdomain_pair,
7045  on_displaced,
7046  periodic,
7047  debug,
7048  correct_edge_dropping,
7049  minimum_projection_angle);
7050  else
7051  return _mortar_data.createMortarInterface(primary_secondary_boundary_pair,
7052  primary_secondary_subdomain_pair,
7053  *this,
7054  on_displaced,
7055  periodic,
7056  debug,
7057  correct_edge_dropping,
7058  minimum_projection_angle);
7059 }
void createMortarInterface(const std::pair< BoundaryID, BoundaryID > &boundary_key, const std::pair< SubdomainID, SubdomainID > &subdomain_key, SubProblem &subproblem, bool on_displaced, bool periodic, const bool debug, const bool correct_edge_dropping, const Real minimum_projection_angle)
Create mortar generation object.
Definition: MortarData.C:22
MortarData _mortar_data
std::shared_ptr< DisplacedProblem > _displaced_problem
bool _has_mortar
Whether the simulation requires mortar coupling.

◆ createQRules()

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

Definition at line 5518 of file FEProblemBase.C.

5524 {
5525  if (order == INVALID_ORDER)
5526  {
5527  // automatically determine the integration order
5528  order = _nl[0]->getMinQuadratureOrder();
5529  for (const auto i : make_range(std::size_t(1), _nl.size()))
5530  if (order < _nl[i]->getMinQuadratureOrder())
5531  order = _nl[i]->getMinQuadratureOrder();
5532  if (order < _aux->getMinQuadratureOrder())
5533  order = _aux->getMinQuadratureOrder();
5534  }
5535 
5536  if (volume_order == INVALID_ORDER)
5537  volume_order = order;
5538 
5539  if (face_order == INVALID_ORDER)
5540  face_order = order;
5541 
5542  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
5543  for (const auto i : index_range(_nl))
5544  _assembly[tid][i]->createQRules(
5545  type, order, volume_order, face_order, block, allow_negative_qweights);
5546 
5547  if (_displaced_problem)
5548  _displaced_problem->createQRules(
5549  type, order, volume_order, face_order, block, allow_negative_qweights);
5550 
5551  updateMaxQps();
5552 }
unsigned int n_threads()
virtual void createQRules(QuadratureType type, Order order, Order volume_order=INVALID_ORDER, Order face_order=INVALID_ORDER, SubdomainID block=Moose::ANY_BLOCK_ID, bool allow_negative_qweights=true)
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
IntRange< T > make_range(T beg, T end)
std::shared_ptr< DisplacedProblem > _displaced_problem
auto index_range(const T &sizable)

◆ createTagSolutions()

void FEProblemBase::createTagSolutions ( )
protected

Create extra tagged solution vectors.

Definition at line 540 of file FEProblemBase.C.

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

541 {
542  for (auto & vector : getParam<std::vector<TagName>>("extra_tag_solutions"))
543  {
544  auto tag = addVectorTag(vector, Moose::VECTOR_TAG_SOLUTION);
545  for (auto & nl : _nl)
546  nl->addVector(tag, false, GHOSTED);
547  _aux->addVector(tag, false, GHOSTED);
548  }
549 
550  if (getParam<bool>("previous_nl_solution_required"))
551  {
552  // We'll populate the zeroth state of the nonlinear iterations with the current solution for
553  // ease of use in doing things like copying solutions backwards. We're just storing pointers in
554  // the solution states containers so populating the zeroth state does not cost us the memory of
555  // a new vector
556  for (const auto i : make_range(0, 2))
557  {
558  for (auto & nl : _nl)
559  nl->needSolutionState(i, Moose::SolutionIterationType::Nonlinear);
560  _aux->needSolutionState(i, Moose::SolutionIterationType::Nonlinear);
561  }
562  }
563 
565  for (auto & nl : _nl)
566  nl->associateVectorToTag(*nl->system().current_local_solution.get(), tag);
567  _aux->associateVectorToTag(*_aux->system().current_local_solution.get(), tag);
568 }
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:81
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
IntRange< T > make_range(T beg, T end)
const TagName SOLUTION_TAG
Definition: MooseTypes.C:27

◆ createTagVectors()

void FEProblemBase::createTagVectors ( )
protected

Create extra tagged vectors and matrices.

Definition at line 518 of file FEProblemBase.C.

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

519 {
520  // add vectors and their tags to system
521  auto & vectors = getParam<std::vector<std::vector<TagName>>>("extra_tag_vectors");
522  for (const auto nl_sys_num : index_range(vectors))
523  for (auto & vector : vectors[nl_sys_num])
524  {
525  auto tag = addVectorTag(vector);
526  _nl[nl_sys_num]->addVector(tag, false, GHOSTED);
527  }
528 
529  // add matrices and their tags
530  auto & matrices = getParam<std::vector<std::vector<TagName>>>("extra_tag_matrices");
531  for (const auto nl_sys_num : index_range(matrices))
532  for (auto & matrix : matrices[nl_sys_num])
533  {
534  auto tag = addMatrixTag(matrix);
535  _nl[nl_sys_num]->addMatrix(tag);
536  }
537 }
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:81
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
virtual TagID addMatrixTag(TagName tag_name)
Create a Tag.
Definition: SubProblem.C:277
auto index_range(const T &sizable)

◆ currentlyComputingJacobian()

const bool& SubProblem::currentlyComputingJacobian ( ) const
inlineinherited

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

Definition at line 639 of file SubProblem.h.

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

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

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

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

◆ currentlyComputingResidual() [2/2]

const bool& SubProblem::currentlyComputingResidual
inline

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

Definition at line 675 of file SubProblem.h.

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

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

Referenced by SubProblem::reinitElemFaceRef().

1389 {
1391 }
bool _currently_computing_residual_and_jacobian
Flag to determine whether the problem is currently computing the residual and Jacobian.
Definition: SubProblem.h:1029

◆ currentNlSysNum()

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

Implements SubProblem.

Definition at line 8330 of file FEProblemBase.C.

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

8331 {
8332  return currentNonlinearSystem().number();
8333 }
NonlinearSystemBase & currentNonlinearSystem()
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1125

◆ currentNonlinearSystem() [1/2]

NonlinearSystemBase & FEProblemBase::currentNonlinearSystem ( )
inline

◆ currentNonlinearSystem() [2/2]

const NonlinearSystemBase & FEProblemBase::currentNonlinearSystem ( ) const
inline

Definition at line 2737 of file FEProblemBase.h.

2738 {
2739  mooseAssert(_current_nl_sys, "The nonlinear system is not currently set");
2740  return *_current_nl_sys;
2741 }
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 2786 of file FEProblemBase.h.

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

2787 {
2789 }
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 4092 of file FEProblemBase.C.

Referenced by execute().

4093 {
4094  SubProblem::customSetup(exec_type);
4095 
4096  if (_line_search)
4097  _line_search->customSetup(exec_type);
4098 
4099  unsigned int n_threads = libMesh::n_threads();
4100  for (THREAD_ID tid = 0; tid < n_threads; tid++)
4101  {
4102  _all_materials.customSetup(exec_type, tid);
4103  _functions.customSetup(exec_type, tid);
4104  }
4105 
4106  _aux->customSetup(exec_type);
4107  for (auto & nl : _nl)
4108  nl->customSetup(exec_type);
4109 
4110  if (_displaced_problem)
4111  _displaced_problem->customSetup(exec_type);
4112 
4113  for (THREAD_ID tid = 0; tid < n_threads; tid++)
4114  {
4115  _internal_side_indicators.customSetup(exec_type, tid);
4116  _indicators.customSetup(exec_type, tid);
4117  _markers.customSetup(exec_type, tid);
4118  }
4119 
4120  std::vector<UserObject *> userobjs;
4121  theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(userobjs);
4122  for (auto obj : userobjs)
4123  obj->customSetup(exec_type);
4124 
4125  _app.getOutputWarehouse().customSetup(exec_type);
4126 }
unsigned int n_threads()
virtual void customSetup(const ExecFlagType &exec_type, THREAD_ID tid=0) const
void customSetup(const ExecFlagType &exec_type)
Calls the setup function for each of the output objects.
virtual void customSetup(const ExecFlagType &exec_type)
Definition: SubProblem.C:1138
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators
TheWarehouse & theWarehouse() const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
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:1772
unsigned int THREAD_ID
Definition: MooseTypes.h:198
std::shared_ptr< LineSearch > _line_search

◆ declareManagedRestartableDataWithContext()

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

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

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

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

See delcareRestartableData and declareRestartableDataWithContext for more information.

Definition at line 276 of file Restartable.h.

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

◆ declareRecoverableData()

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

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

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

Note - this data will NOT be restored on Restart!

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

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

Definition at line 351 of file Restartable.h.

352 {
353  const auto full_name = restartableName(data_name);
354 
356 
357  return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
358 }
std::string restartableName(const std::string &data_name) const
Gets the name of a piece of restartable data given a data name, adding the system name and object nam...
Definition: Restartable.C:66
void registerRestartableNameWithFilterOnApp(const std::string &name, Moose::RESTARTABLE_FILTER filter)
Helper function for actually registering the restartable data.
Definition: Restartable.C:59

◆ declareRestartableData()

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

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

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

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

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

Definition at line 269 of file Restartable.h.

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

◆ declareRestartableDataWithContext()

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

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

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

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

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

Definition at line 294 of file Restartable.h.

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

◆ declareRestartableDataWithObjectName()

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 323 of file Restartable.h.

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

◆ declareRestartableDataWithObjectNameWithContext()

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 333 of file Restartable.h.

337 {
338  std::string old_name = _restartable_name;
339 
340  _restartable_name = object_name;
341 
342  T & value = declareRestartableDataWithContext<T>(data_name, context, std::forward<Args>(args)...);
343 
344  _restartable_name = old_name;
345 
346  return value;
347 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:243
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ defaultGhosting()

bool SubProblem::defaultGhosting ( )
inlineinherited

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

Definition at line 122 of file SubProblem.h.

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

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

◆ determineNonlinearSystem()

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

Determine what nonlinear system the provided variable name lies in.

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

Implements SubProblem.

Definition at line 2494 of file FEProblemBase.C.

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

2496 {
2497  auto nl_map_it = _nl_var_to_sys_num.find(var_name);
2498  const bool var_in_nl = nl_map_it != _nl_var_to_sys_num.end();
2499  if (var_in_nl)
2500  mooseAssert(_nl[nl_map_it->second]->hasVariable(var_name) ||
2501  _nl[nl_map_it->second]->hasScalarVariable(var_name),
2502  "If the variable is in our FEProblem nonlinear system map, then it must be in the "
2503  "nonlinear system we expect");
2504  else if (error_if_not_found)
2505  {
2506  if (_aux->hasVariable(var_name) || _aux->hasScalarVariable(var_name))
2507  mooseError("No nonlinear variable named ",
2508  var_name,
2509  " found. Did you specify an auxiliary variable when you meant to specify a "
2510  "nonlinear variable?");
2511  else
2512  mooseError("Unknown variable '",
2513  var_name,
2514  "'. It does not exist in the nonlinear system(s) or auxiliary system");
2515  }
2516 
2517  return std::make_pair(var_in_nl, var_in_nl ? nl_map_it->second : libMesh::invalid_uint);
2518 }
const unsigned int invalid_uint
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::map< NonlinearVariableName, unsigned int > _nl_var_to_sys_num
Map from nonlinear variable name to nonlinear system number.

◆ diracKernelInfo()

DiracKernelInfo & SubProblem::diracKernelInfo ( )
virtualinherited

Definition at line 706 of file SubProblem.C.

707 {
708  return _dirac_kernel_info;
709 }
DiracKernelInfo _dirac_kernel_info
nonlocal coupling matrix;
Definition: SubProblem.h:976

◆ doingPRefinement() [1/4]

bool SubProblem::doingPRefinement ( ) const
inherited
Returns
whether the kind of adaptivity we're doing is p-refinement

Definition at line 1312 of file SubProblem.C.

Referenced by doingPRefinement(), and meshChangedHelper().

1313 {
1314  return mesh().doingPRefinement();
1315 }
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:1325

◆ doingPRefinement() [2/4]

void SubProblem::doingPRefinement

Indicate whether the kind of adaptivity we're doing is p-refinement.

Parameters
doing_p_refinementWhether we're doing p-refinement
disable_p_refinement_for_familiesFamilies to disable p-refinement for

Definition at line 1277 of file SubProblem.C.

1279 {
1280  mesh().doingPRefinement(doing_p_refinement);
1281 
1282  if (doing_p_refinement)
1283  {
1284  std::vector<FEFamily> disable_families(disable_p_refinement_for_families_enum.size());
1285  for (const auto i : index_range(disable_families))
1286  disable_families[i] =
1287  Utility::string_to_enum<FEFamily>(disable_p_refinement_for_families_enum[i]);
1288 
1289  for (const auto tid : make_range(libMesh::n_threads()))
1290  for (const auto s : make_range(numNonlinearSystems()))
1291  assembly(tid, s).havePRefinement(disable_families);
1292 
1293  auto & eq = es();
1294  for (const auto family : disable_families)
1295  for (const auto i : make_range(eq.n_systems()))
1296  {
1297  auto & system = eq.get_system(i);
1298  auto & dof_map = system.get_dof_map();
1299  for (const auto vg : make_range(system.n_variable_groups()))
1300  {
1301  const auto & var_group = system.variable_group(vg);
1302  if (var_group.type().family == family)
1303  dof_map.should_p_refine(vg, false);
1304  }
1305  }
1306 
1307  _have_p_refinement = true;
1308  }
1309 }
unsigned int n_threads()
virtual std::size_t numNonlinearSystems() const override
virtual EquationSystems & es() override
void havePRefinement(const std::vector< FEFamily > &disable_p_refinement_for_families)
Indicate that we have p-refinement.
Definition: Assembly.C:4834
bool _have_p_refinement
Whether p-refinement has been requested at any point during the simulation.
Definition: SubProblem.h:1127
IntRange< T > make_range(T beg, T end)
virtual MooseMesh & mesh() override
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we&#39;re doing is p-refinement.
Definition: MooseMesh.h:1325
Assembly & assembly(const THREAD_ID tid, const unsigned int nl_sys_num) override
auto index_range(const T &sizable)

◆ doingPRefinement() [3/4]

bool SubProblem::doingPRefinement
Returns
whether the kind of adaptivity we're doing is p-refinement

Definition at line 1312 of file SubProblem.C.

1313 {
1314  return mesh().doingPRefinement();
1315 }
virtual MooseMesh & mesh() override
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we&#39;re doing is p-refinement.
Definition: MooseMesh.h:1325

◆ doingPRefinement() [4/4]

void FEProblemBase::doingPRefinement ( bool  doing_p_refinement,
const MultiMooseEnum disable_p_refinement_for_families 
)
overridevirtual

Indicate whether the kind of adaptivity we're doing is p-refinement.

Parameters
doing_p_refinementWhether we're doing p-refinement
disable_p_refinement_for_familiesFamilies to disable p-refinement for

Reimplemented from SubProblem.

Definition at line 8394 of file FEProblemBase.C.

Referenced by Adaptivity::doingPRefinement().

8396 {
8397  SubProblem::doingPRefinement(doing_p_refinement, disable_p_refinement_for_families);
8398  if (_displaced_problem)
8399  _displaced_problem->doingPRefinement(doing_p_refinement, disable_p_refinement_for_families);
8400 }
bool doingPRefinement() const
Definition: SubProblem.C:1312
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ dt()

virtual Real& FEProblemBase::dt ( ) const
inlinevirtual

◆ dtOld()

virtual Real& FEProblemBase::dtOld ( ) const
inlinevirtual

Definition at line 522 of file FEProblemBase.h.

Referenced by IterationAdaptiveDT::acceptStep().

522 { return _dt_old; }

◆ duplicateVariableCheck()

bool FEProblemBase::duplicateVariableCheck ( const std::string &  var_name,
const FEType &  type,
bool  is_aux 
)
protected

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

Definition at line 2425 of file FEProblemBase.C.

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

2428 {
2429  for (auto & nl : _nl)
2430  {
2431  SystemBase * curr_sys_ptr = nl.get();
2432  SystemBase * other_sys_ptr = _aux.get();
2433  std::string error_prefix = "";
2434  if (is_aux)
2435  {
2436  curr_sys_ptr = _aux.get();
2437  other_sys_ptr = nl.get();
2438  error_prefix = "Aux";
2439  }
2440 
2441  if (other_sys_ptr->hasVariable(var_name))
2442  mooseError("Cannot have an auxiliary variable and a nonlinear variable with the same name: ",
2443  var_name);
2444 
2445  if (curr_sys_ptr->hasVariable(var_name))
2446  {
2447  const Variable & var =
2448  curr_sys_ptr->system().variable(curr_sys_ptr->system().variable_number(var_name));
2449  if (var.type() != type)
2450  mooseError(error_prefix,
2451  "Variable with name '",
2452  var_name,
2453  "' already exists but is of a differing type!");
2454 
2455  return true;
2456  }
2457  }
2458 
2459  return false;
2460 }
Base class for a system (of equations)
Definition: SystemBase.h:84
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
virtual System & system()=0
Get the reference to the libMesh system.
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:800
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

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

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

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

1696  {
1698  }
bool _error_on_jacobian_nonzero_reallocation

◆ errorPrefix()

std::string MooseBaseErrorInterface::errorPrefix ( const std::string &  error_type) const
inherited

A descriptive prefix for errors for this object:

The following <error_type> occurred in the object "<name>", of type "<type>".

Definition at line 15 of file MooseBaseErrorInterface.C.

Referenced by MooseBaseErrorInterface::mooseError(), and MooseBaseErrorInterface::mooseWarning().

16 {
17  std::stringstream oss;
18  oss << "The following " << error_type << " occurred in the object \"" << _moose_base->name()
19  << "\", of type \"" << _moose_base->type() << "\".\n\n";
20  return oss.str();
21 }
const MooseBase *const _moose_base
The MooseBase class deriving from this interface.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50

◆ es()

virtual EquationSystems& FEProblemBase::es ( )
inlineoverridevirtual

◆ execMultiApps()

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

Execute the MultiApps associated with the ExecFlagType.

Definition at line 4928 of file FEProblemBase.C.

Referenced by computeJacobianTags(), computeResidualAndJacobian(), computeResidualTags(), Transient::execute(), Steady::execute(), Eigenvalue::execute(), initialSetup(), EigenExecutionerBase::postExecute(), FixedPointSolve::solve(), and FixedPointSolve::solveStep().

4929 {
4930  // Active MultiApps
4931  const std::vector<MooseSharedPointer<MultiApp>> & multi_apps =
4933 
4934  // Do anything that needs to be done to Apps before transfers
4935  for (const auto & multi_app : multi_apps)
4936  multi_app->preTransfer(_dt, _time);
4937 
4938  // Execute Transfers _to_ MultiApps
4940 
4941  // Execute Transfers _between_ Multiapps
4943 
4944  // Execute MultiApps
4945  if (multi_apps.size())
4946  {
4947  TIME_SECTION("execMultiApps", 1, "Executing MultiApps", false);
4948 
4949  if (_verbose_multiapps)
4950  _console << COLOR_CYAN << "\nExecuting MultiApps on " << Moose::stringify(type)
4951  << COLOR_DEFAULT << std::endl;
4952 
4953  bool success = true;
4954 
4955  for (const auto & multi_app : multi_apps)
4956  {
4957  success = multi_app->solveStep(_dt, _time, auto_advance);
4958  // no need to finish executing the subapps if one fails
4959  if (!success)
4960  break;
4961  }
4962 
4964 
4965  _communicator.min(success);
4966 
4967  if (!success)
4968  return false;
4969 
4970  if (_verbose_multiapps)
4971  _console << COLOR_CYAN << "Finished Executing MultiApps on " << Moose::stringify(type) << "\n"
4972  << COLOR_DEFAULT << std::endl;
4973  }
4974 
4975  // Execute Transfers _from_ MultiApps
4977 
4978  // If we made it here then everything passed
4979  return true;
4980 }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
const Parallel::Communicator & _communicator
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
void min(const T &r, T &o, Request &req) const
void parallelBarrierNotify(const libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
void execMultiAppTransfers(ExecFlagType type, Transfer::DIRECTION direction)
Execute MultiAppTransfers associated with execution flag and direction.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ execMultiAppTransfers()

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

Execute MultiAppTransfers associated with execution flag and direction.

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

Definition at line 4828 of file FEProblemBase.C.

Referenced by execMultiApps().

4829 {
4830  bool to_multiapp = direction == MultiAppTransfer::TO_MULTIAPP;
4831  bool from_multiapp = direction == MultiAppTransfer::FROM_MULTIAPP;
4832  std::string string_direction;
4833  if (to_multiapp)
4834  string_direction = " To ";
4835  else if (from_multiapp)
4836  string_direction = " From ";
4837  else
4838  string_direction = " Between ";
4839 
4840  const MooseObjectWarehouse<Transfer> & wh = to_multiapp ? _to_multi_app_transfers[type]
4841  : from_multiapp ? _from_multi_app_transfers[type]
4843 
4844  if (wh.hasActiveObjects())
4845  {
4846  TIME_SECTION("execMultiAppTransfers", 1, "Executing Transfers");
4847 
4848  const auto & transfers = wh.getActiveObjects();
4849 
4850  if (_verbose_multiapps)
4851  {
4852  _console << COLOR_CYAN << "\nTransfers on " << Moose::stringify(type) << string_direction
4853  << "MultiApps" << COLOR_DEFAULT << ":" << std::endl;
4854 
4856  {"Name", "Type", "From", "To"});
4857 
4858  // Build Table of Transfer Info
4859  for (const auto & transfer : transfers)
4860  {
4861  auto multiapp_transfer = dynamic_cast<MultiAppTransfer *>(transfer.get());
4862 
4863  table.addRow(multiapp_transfer->name(),
4864  multiapp_transfer->type(),
4865  multiapp_transfer->getFromName(),
4866  multiapp_transfer->getToName());
4867  }
4868 
4869  // Print it
4870  table.print(_console);
4871  }
4872 
4873  for (const auto & transfer : transfers)
4874  {
4875  transfer->setCurrentDirection(direction);
4876  transfer->execute();
4877  }
4878 
4880 
4881  if (_verbose_multiapps)
4882  _console << COLOR_CYAN << "Transfers on " << Moose::stringify(type) << " Are Finished\n"
4883  << COLOR_DEFAULT << std::endl;
4884  }
4885  else if (_multi_apps[type].getActiveObjects().size())
4886  {
4887  if (_verbose_multiapps)
4888  _console << COLOR_CYAN << "\nNo Transfers on " << Moose::stringify(type) << string_direction
4889  << "MultiApps\n"
4890  << COLOR_DEFAULT << std::endl;
4891  }
4892 }
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.
void setCurrentDirection(const int direction)
Set this Transfer to be executed in a given direction.
Definition: Transfer.h:89
const Parallel::Communicator & _communicator
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
void parallelBarrierNotify(const libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
bool hasActiveObjects(THREAD_ID tid=0) const
Base class for all MultiAppTransfer objects.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ execTransfers()

void FEProblemBase::execTransfers ( ExecFlagType  type)

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

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

5099 {
5100  if (_transfers[type].hasActiveObjects())
5101  {
5102  TIME_SECTION("execTransfers", 3, "Executing Transfers");
5103 
5104  const auto & transfers = _transfers[type].getActiveObjects();
5105 
5106  for (const auto & transfer : transfers)
5107  transfer->execute();
5108  }
5109 }
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:50

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

Referenced by EigenExecutionerBase::chebyshev(), Transient::execute(), Steady::execute(), EigenProblem::execute(), NonlinearEigen::init(), EigenExecutionerBase::init(), Transient::init(), Steady::init(), initialSetup(), EigenExecutionerBase::makeBXConsistent(), EigenExecutionerBase::normalizeSolution(), EigenExecutionerBase::postExecute(), FixedPointSolve::solve(), FixedPointSolve::solveStep(), NonlinearEigen::takeStep(), and InversePowerMethod::takeStep().

4130 {
4131  // Set the current flag
4132  setCurrentExecuteOnFlag(exec_type);
4133 
4134  if (exec_type != EXEC_INITIAL)
4135  executeControls(exec_type);
4136 
4137  // intentially call this after executing controls because the setups may rely on the controls
4138  // FIXME: we skip the following flags because they have dedicated setup functions in
4139  // SetupInterface and it may not be appropriate to call them here.
4140  if (!(exec_type == EXEC_INITIAL || exec_type == EXEC_TIMESTEP_BEGIN ||
4141  exec_type == EXEC_SUBDOMAIN || exec_type == EXEC_NONLINEAR || exec_type == EXEC_LINEAR))
4142  customSetup(exec_type);
4143 
4144  // Samplers; EXEC_INITIAL is not called because the Sampler::init() method that is called after
4145  // construction makes the first Sampler::execute() call. This ensures that the random number
4146  // generator object is the correct state prior to any other object (e.g., Transfers) attempts to
4147  // extract data from the Sampler. That is, if the Sampler::execute() call is delayed to here
4148  // then it is not in the correct state for other objects.
4149  if (exec_type != EXEC_INITIAL)
4150  executeSamplers(exec_type);
4151 
4152  // Pre-aux UserObjects
4153  computeUserObjects(exec_type, Moose::PRE_AUX);
4154 
4155  // AuxKernels
4156  computeAuxiliaryKernels(exec_type);
4157 
4158  // Post-aux UserObjects
4159  computeUserObjects(exec_type, Moose::POST_AUX);
4160 
4161  // Return the current flag to None
4163 
4165  {
4166  // we will only check aux variables and postprocessors
4167  // checking more reporter data can be added in the future if needed
4168  std::unique_ptr<NumericVector<Number>> x = _aux->currentSolution()->clone();
4169  DenseVector<Real> pp_values = getReporterData().getAllRealReporterValues();
4170 
4171  // call THIS execute one more time for checking the possible states
4172  _checking_uo_aux_state = true;
4173  FEProblemBase::execute(exec_type);
4174  _checking_uo_aux_state = false;
4175 
4176  const Real check_tol = 1e-8;
4177 
4178  const Real xnorm = x->l2_norm();
4179  *x -= *_aux->currentSolution();
4180  if (x->l2_norm() > check_tol * xnorm)
4181  {
4182  const auto & sys = _aux->system();
4183  const unsigned int n_vars = sys.n_vars();
4184  std::multimap<Real, std::string, std::greater<Real>> ordered_map;
4185  for (const auto i : make_range(n_vars))
4186  {
4187  const Real vnorm = sys.calculate_norm(*x, i, DISCRETE_L2);
4188  ordered_map.emplace(vnorm, sys.variable_name(i));
4189  }
4190 
4191  std::ostringstream oss;
4192  for (const auto & [error_norm, var_name] : ordered_map)
4193  oss << " {" << var_name << ", " << error_norm << "},\n";
4194 
4195  mooseError("Aux kernels, user objects appear to have states for aux variables on ",
4196  exec_type,
4197  ".\nVariable error norms in descending order:\n",
4198  oss.str());
4199  }
4200 
4201  const DenseVector<Real> new_pp_values = getReporterData().getAllRealReporterValues();
4202  if (pp_values.size() != new_pp_values.size())
4203  mooseError("Second execution for uo/aux state check should not change the number of "
4204  "real reporter values");
4205 
4206  const Real ppnorm = pp_values.l2_norm();
4207  pp_values -= new_pp_values;
4208  if (pp_values.l2_norm() > check_tol * ppnorm)
4209  {
4210  const auto pp_names = getReporterData().getAllRealReporterFullNames();
4211  std::multimap<Real, std::string, std::greater<Real>> ordered_map;
4212  for (const auto i : index_range(pp_names))
4213  ordered_map.emplace(std::abs(pp_values(i)), pp_names[i]);
4214 
4215  std::ostringstream oss;
4216  for (const auto & [error_norm, pp_name] : ordered_map)
4217  oss << " {" << pp_name << ", " << error_norm << "},\n";
4218 
4219  mooseError("Aux kernels, user objects appear to have states for real reporter values on ",
4220  exec_type,
4221  ".\nErrors of real reporter values in descending order:\n",
4222  oss.str());
4223  }
4224  }
4225 }
const bool _uo_aux_state_check
Whether or not checking the state of uo/aux evaluation.
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
void setCurrentExecuteOnFlag(const ExecFlagType &)
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
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:56
unsigned int n_vars
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:81
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:33
void executeSamplers(const ExecFlagType &exec_type)
Performs setup and execute calls for Sampler objects.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
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:30
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void computeAuxiliaryKernels(const ExecFlagType &type)
Call compute methods on AuxKernels.
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.
const ExecFlagType EXEC_SUBDOMAIN
Definition: Moose.C:42
auto index_range(const T &sizable)
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28

◆ executeAllObjects()

void FEProblemBase::executeAllObjects ( const ExecFlagType exec_type)
virtual

Definition at line 4087 of file FEProblemBase.C.

Referenced by Executor::exec().

4088 {
4089 }

◆ executeControls()

void FEProblemBase::executeControls ( const ExecFlagType exec_type)

Performs setup and execute calls for Control objects.

Definition at line 4529 of file FEProblemBase.C.

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

4530 {
4531  if (_control_warehouse[exec_type].hasActiveObjects())
4532  {
4533  TIME_SECTION("executeControls", 1, "Executing Controls");
4534 
4536 
4537  auto controls_wh = _control_warehouse[exec_type];
4538  // Add all of the dependencies into the resolver and sort them
4539  for (const auto & it : controls_wh.getActiveObjects())
4540  {
4541  // Make sure an item with no dependencies comes out too!
4542  resolver.addItem(it);
4543 
4544  std::vector<std::string> & dependent_controls = it->getDependencies();
4545  for (const auto & depend_name : dependent_controls)
4546  {
4547  if (controls_wh.hasActiveObject(depend_name))
4548  {
4549  auto dep_control = controls_wh.getActiveObject(depend_name);
4550  resolver.addEdge(dep_control, it);
4551  }
4552  else
4553  mooseError("The Control \"",
4554  depend_name,
4555  "\" was not created, did you make a "
4556  "spelling mistake or forget to include it "
4557  "in your input file?");
4558  }
4559  }
4560 
4561  const auto & ordered_controls = resolver.getSortedValues();
4562 
4563  if (!ordered_controls.empty())
4564  {
4565  _control_warehouse.setup(exec_type);
4566  // Run the controls in the proper order
4567  for (const auto & control : ordered_controls)
4568  control->execute();
4569  }
4570  }
4571 }
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.
const std::vector< T > & getSortedValues()
This function also returns dependency resolved values but with a simpler single vector interface...
void setup(const ExecFlagType &exec_flag, THREAD_ID tid=0) const
void addEdge(const T &a, const T &b)
Add an edge between nodes &#39;a&#39; and &#39;b&#39;.
void addItem(const T &value)
Add an independent item to the set.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Class that represents the dependecy as a graph.

◆ executeSamplers()

void FEProblemBase::executeSamplers ( const ExecFlagType exec_type)

Performs setup and execute calls for Sampler objects.

Definition at line 4574 of file FEProblemBase.C.

Referenced by execute().

4575 {
4576  // TODO: This should be done in a threaded loop, but this should be super quick so for now
4577  // do a serial loop.
4578  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
4579  {
4580  std::vector<Sampler *> objects;
4581  theWarehouse()
4582  .query()
4583  .condition<AttribSystem>("Sampler")
4584  .condition<AttribThread>(tid)
4585  .condition<AttribExecOns>(exec_type)
4586  .queryInto(objects);
4587 
4588  if (!objects.empty())
4589  {
4590  TIME_SECTION("executeSamplers", 1, "Executing Samplers");
4591  FEProblemBase::objectSetupHelper<Sampler>(objects, exec_type);
4592  FEProblemBase::objectExecuteHelper<Sampler>(objects);
4593  }
4594  }
4595 }
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:198

◆ finalizeMultiApps()

void FEProblemBase::finalizeMultiApps ( )

Definition at line 4983 of file FEProblemBase.C.

Referenced by Transient::execute(), Steady::execute(), and Eigenvalue::execute().

4984 {
4985  const auto & multi_apps = _multi_apps.getActiveObjects();
4986 
4987  for (const auto & multi_app : multi_apps)
4988  multi_app->finalize();
4989 }
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 5971 of file FEProblemBase.C.

5972 {
5973  return _nl[nl_sys_num]->finalNonlinearResidual();
5974 }
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 5011 of file FEProblemBase.C.

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

5012 {
5013  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5014 
5015  if (multi_apps.size())
5016  {
5017  if (_verbose_multiapps)
5018  _console << COLOR_CYAN << "\nAdvancing MultiApps on " << type.name() << COLOR_DEFAULT
5019  << std::endl;
5020 
5021  for (const auto & multi_app : multi_apps)
5022  multi_app->finishStep(recurse_through_multiapp_levels);
5023 
5025 
5026  if (_verbose_multiapps)
5027  _console << COLOR_CYAN << "Finished Advancing MultiApps on " << type.name() << "\n"
5028  << COLOR_DEFAULT << std::endl;
5029  }
5030 }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
const Parallel::Communicator & _communicator
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
void parallelBarrierNotify(const libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ forceOutput()

void FEProblemBase::forceOutput ( )

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

Referenced by TransientMultiApp::solveStep().

6078 {
6080 }
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:69
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1772

◆ fvBCsIntegrityCheck() [1/2]

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

Definition at line 2002 of file FEProblemBase.h.

2002 { 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 2776 of file FEProblemBase.h.

2777 {
2779  // the user has requested that we don't check integrity so we will honor that
2780  return;
2781 
2782  _fv_bcs_integrity_check = fv_bcs_integrity_check;
2783 }
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 420 of file SubProblem.C.

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

421 {
423 }
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:1002

◆ getActiveFEVariableCoupleableMatrixTags()

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

Definition at line 356 of file SubProblem.C.

357 {
359 }
std::vector< std::set< TagID > > _active_fe_var_coupleable_matrix_tags
Definition: SubProblem.h:1008

◆ getActiveFEVariableCoupleableVectorTags()

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

Definition at line 362 of file SubProblem.C.

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute().

363 {
365 }
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags
Definition: SubProblem.h:1010

◆ getActiveScalarVariableCoupleableMatrixTags()

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

Definition at line 397 of file SubProblem.C.

Referenced by MooseVariableScalar::reinit().

398 {
400 }
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags
Definition: SubProblem.h:1012

◆ getActiveScalarVariableCoupleableVectorTags()

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

Definition at line 403 of file SubProblem.C.

404 {
406 }
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
Definition: SubProblem.h:1014

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

Referenced by MultiAppVariableValueSampleTransfer::execute().

5216 {
5217  for (auto & nl : _nl)
5218  if (nl->hasVariable(var_name))
5219  return nl->getActualFieldVariable<Real>(tid, var_name);
5220  if (_aux->hasVariable(var_name))
5221  return _aux->getActualFieldVariable<Real>(tid, var_name);
5222 
5223  mooseError("Unknown variable " + var_name);
5224 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getArrayVariable()

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

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

Implements SubProblem.

Definition at line 5239 of file FEProblemBase.C.

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

5240 {
5241  for (auto & nl : _nl)
5242  if (nl->hasVariable(var_name))
5243  return nl->getFieldVariable<RealEigenVector>(tid, var_name);
5244  if (_aux->hasVariable(var_name))
5245  return _aux->getFieldVariable<RealEigenVector>(tid, var_name);
5246 
5247  mooseError("Unknown variable " + var_name);
5248 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:138

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

761 {
762  return mesh().getAxisymmetricRadialCoord();
763 }
virtual MooseMesh & mesh()=0
unsigned int getAxisymmetricRadialCoord() const
Returns the desired radial direction for RZ coordinate transformation.
Definition: MooseMesh.C:4010

◆ getBndMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getBndMaterialPropertyStorage ( )
inline

Definition at line 1486 of file FEProblemBase.h.

1486 { return _bnd_material_props; }
MaterialPropertyStorage & _bnd_material_props

◆ getCheckedPointerParam()

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

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

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

Definition at line 274 of file MooseBaseParameterInterface.h.

276 {
277  return parameters().getCheckedPointerParam<T>(name, error_string);
278 }
std::string name(const ElemQuality q)
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
const InputParameters & parameters() const
Get the parameters of the object.

◆ getConsumedPropertyMap()

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

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

Definition at line 700 of file SubProblem.C.

Referenced by MaterialPropertyDebugOutput::output().

701 {
703 }
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
Definition: SubProblem.h:1112

◆ getControlWarehouse()

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

Reference to the control logic warehouse.

Definition at line 1792 of file FEProblemBase.h.

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

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

◆ getCoordSystem()

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

Definition at line 1223 of file SubProblem.C.

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

1224 {
1225  return mesh().getCoordSystem(sid);
1226 }
virtual MooseMesh & mesh()=0
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Get the coordinate system type, e.g.
Definition: MooseMesh.C:3891

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

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

4076 {
4077  return _current_execute_on_flag;
4078 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.

◆ getDataFileName()

std::string DataFileInterface< MooseObject >::getDataFileName ( const std::string &  param) const
inherited

Returns the path of a data file for a given FileName type parameter, searching (in the following order)

  • relative to the input file directory
  • relative to the running binary (assuming the application is installed)
  • relative to all registered data file directories
  • relative to the input file directory

Definition at line 22 of file DataFileInterface.C.

23 {
25  {
26  const auto & absolute_path = _parent.template getParam<FileName>(param);
27  if (MooseUtils::checkFileReadable(absolute_path, false, false, false))
28  {
29  _parent.paramInfo(param, "Data file '", absolute_path, "' found relative to the input file.");
30  return absolute_path;
31  }
32  }
33 
34  const auto & relative_path = _parent.parameters().rawParamVal(param);
35  return getDataFileNameByName(relative_path, &param);
36 }
std::string getDataFileNameByName(const std::string &name, const std::string *param=nullptr) const
Returns the path of a data file for a given relative file path.
std::string & rawParamVal(const std::string &param)
Get/set a string representing the raw, unmodified token text for the given param. ...
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true, bool check_for_git_lfs_pointer=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:253
const InputParameters & parameters() const
Get the parameters of the object.
void paramInfo(const std::string &param, Args... args) const
Emits an informational message prefixed with the file and line number of the given param (from the in...

◆ getDataFileNameByName()

std::string DataFileInterface< MooseObject >::getDataFileNameByName ( const std::string &  name,
const std::string *  param = nullptr 
) 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. The optional param pointer can be used to turn the mooseErrors this function emits into paramErrors

  • relative to the running binary (assuming the application is installed)
  • relative to all registered data file directories

Definition at line 40 of file DataFileInterface.C.

42 {
44  const auto share_dir = MooseUtils::pathjoin(Moose::getExecutablePath(), "..", "share");
45  if (MooseUtils::pathIsDirectory(share_dir))
46  {
47  const auto dirs = MooseUtils::listDir(share_dir, false);
48  for (const auto & data_dir : dirs)
49  {
50  const auto path = MooseUtils::pathjoin(data_dir, "data", relative_path);
51  if (MooseUtils::checkFileReadable(path, false, false, false))
52  {
53  if (param)
55  *param, "Data file '", path, "' found in an installed app distribution.");
56  else
57  mooseInfo("Data file '", path, "' found in an installed app distribution.");
58  return path;
59  }
60  }
61  }
62 
64  for (const auto & data_dir : Registry::getRegistry().getDataFilePaths())
65  {
66  const auto path = MooseUtils::pathjoin(data_dir, relative_path);
67  if (MooseUtils::checkFileReadable(path, false, false, false))
68  {
69  if (param)
70  _parent.paramInfo(*param, "Data file '", path, "' found in a source repository.");
71  else
72  mooseInfo("Data file '", path, "' found in a source repository.");
73  return path;
74  }
75  }
76 
77  mooseException(param ? _parent.parameters().inputLocation(*param) : _parent.name(),
78  ": Unable to find data file '",
79  relative_path,
80  "' anywhere");
81 }
static Registry & getRegistry()
Get the global Registry singleton.
Definition: Registry.C:21
std::string getExecutablePath()
This function returns the PATH of the running executable.
bool pathIsDirectory(const std::string &path)
Definition: MooseUtils.C:247
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:329
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true, bool check_for_git_lfs_pointer=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:253
std::filesystem::path pathjoin(const std::filesystem::path &p)
Definition: MooseUtils.C:58
std::list< std::string > listDir(const std::string path, bool files_only=false)
Definition: MooseUtils.C:765
const InputParameters & parameters() const
Get the parameters of the object.
void paramInfo(const std::string &param, Args... args) const
Emits an informational message prefixed with the file and line number of the given param (from the in...

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

Referenced by NonlinearSystemBase::computeDiracContributions().

2203 {
2204  // First add in the undisplaced elements
2205  elems = _dirac_kernel_info.getElements();
2206 
2207  if (_displaced_problem)
2208  {
2209  std::set<const Elem *> displaced_elements;
2210  _displaced_problem->getDiracElements(displaced_elements);
2211 
2212  { // Use the ids from the displaced elements to get the undisplaced elements
2213  // and add them to the list
2214  for (const auto & elem : displaced_elements)
2215  elems.insert(_mesh.elemPtr(elem->id()));
2216  }
2217  }
2218 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863
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
nonlocal coupling matrix;
Definition: SubProblem.h:976

◆ getDiscreteMaterialWarehouse()

const MaterialWarehouse& FEProblemBase::getDiscreteMaterialWarehouse ( ) const
inline

Definition at line 1671 of file FEProblemBase.h.

1671 { 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 1428 of file FEProblemBase.h.

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

◆ getDistribution()

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

Definition at line 2383 of file FEProblemBase.C.

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

2384 {
2385  std::vector<Distribution *> objs;
2386  theWarehouse()
2387  .query()
2388  .condition<AttribSystem>("Distribution")
2389  .condition<AttribName>(name)
2390  .queryInto(objs);
2391  if (objs.empty())
2392  mooseError("Unable to find Distribution with name '" + name + "'");
2393  return *(objs[0]);
2394 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getEvaluableElementRange()

const ConstElemRange & FEProblemBase::getEvaluableElementRange ( )

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

Referenced by NodalPatchRecoveryBase::finalize().

673 {
675  {
676  std::vector<const DofMap *> dof_maps(es().n_systems());
677  for (const auto i : make_range(es().n_systems()))
678  {
679  const auto & sys = es().get_system(i);
680  dof_maps[i] = &sys.get_dof_map();
681  }
683  std::make_unique<ConstElemRange>(_mesh.getMesh().multi_evaluable_elements_begin(dof_maps),
684  _mesh.getMesh().multi_evaluable_elements_end(dof_maps));
685  }
687 }
std::unique_ptr< ConstElemRange > _evaluable_local_elem_range
virtual EquationSystems & es() override
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
MooseMesh & _mesh
IntRange< T > make_range(T beg, T end)

◆ getExecutor()

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

Definition at line 1739 of file FEProblemBase.h.

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

◆ getFailNextNonlinearConvergenceCheck()

bool FEProblemBase::getFailNextNonlinearConvergenceCheck ( ) const
inline

Whether it will skip further residual evaluations and fail the next nonlinear convergence check.

Definition at line 2091 of file FEProblemBase.h.

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

2092  {
2094  }
bool _fail_next_nonlinear_convergence_check

◆ getFunction()

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

Definition at line 2284 of file FEProblemBase.C.

Referenced by FunctionInterface::getFunction(), FunctionInterface::getFunctionByName(), IterationAdaptiveDT::init(), and MooseParsedFunctionWrapper::initialize().

2285 {
2286  // This thread lock is necessary since this method will create functions
2287  // for all threads if one is missing.
2288  Threads::spin_mutex::scoped_lock lock(get_function_mutex);
2289 
2290  if (!hasFunction(name, tid))
2291  {
2292  // If we didn't find a function, it might be a default function, attempt to construct one now
2293  std::istringstream ss(name);
2294  Real real_value;
2295 
2296  // First see if it's just a constant. If it is, build a ConstantFunction
2297  if (ss >> real_value && ss.eof())
2298  {
2299  InputParameters params = _factory.getValidParams("ConstantFunction");
2300  params.set<Real>("value") = real_value;
2301  addFunction("ConstantFunction", ss.str(), params);
2302  }
2303  else
2304  {
2306  std::string vars = "x,y,z,t,NaN,pi,e";
2307  if (fp.Parse(name, vars) == -1) // -1 for success
2308  {
2309  // It parsed ok, so build a MooseParsedFunction
2310  InputParameters params = _factory.getValidParams("ParsedFunction");
2311  params.set<std::string>("expression") = name;
2312  addFunction("ParsedFunction", name, params);
2313  }
2314  }
2315 
2316  // Try once more
2317  if (!hasFunction(name, tid))
2318  mooseError("Unable to find function " + name);
2319  }
2320 
2321  auto * const ret = dynamic_cast<Function *>(_functions.getActiveObject(name, tid).get());
2322  if (!ret)
2323  mooseError("No function named ", name, " of appropriate type");
2324 
2325  return *ret;
2326 }
Base class for function objects.
Definition: Function.h:37
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:972
Threads::spin_mutex get_function_mutex
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:67
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
virtual void addFunction(const std::string &type, const std::string &name, InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MooseObjectWarehouse< Function > _functions
functions
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)

◆ getFunctor()

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

Definition at line 1134 of file SubProblem.h.

Referenced by FunctorInterface::getFunctorByName().

1138 {
1139  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1140 
1141  // Log the requestor
1142  _functor_to_requestors["wraps_" + name].insert(requestor_name);
1143 
1144  constexpr bool requested_functor_is_ad =
1145  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1146 
1147  auto & functor_to_request_info = _functor_to_request_info[tid];
1148 
1149  // Get the requested functor if we already have it
1150  auto & functors = _functors[tid];
1151  if (auto find_ret = functors.find("wraps_" + name); find_ret != functors.end())
1152  {
1153  if (functors.count("wraps_" + name) > 1)
1154  mooseError("Attempted to get a functor with the name '",
1155  name,
1156  "' but multiple functors match. Make sure that you do not have functor material "
1157  "properties, functions, postprocessors or variables with the same names");
1158 
1159  auto & [true_functor_is, non_ad_functor, ad_functor] = find_ret->second;
1160  auto & functor_wrapper = requested_functor_is_ad ? *ad_functor : *non_ad_functor;
1161 
1162  auto * const functor = dynamic_cast<Moose::Functor<T> *>(&functor_wrapper);
1163  if (!functor)
1164  mooseError("A call to SubProblem::getFunctor requested a functor named '",
1165  name,
1166  "' that returns the type: '",
1167  libMesh::demangle(typeid(T).name()),
1168  "'. However, that functor already exists and returns a different type: '",
1169  functor_wrapper.returnType(),
1170  "'");
1171 
1172  if (functor->template wrapsType<Moose::NullFunctor<T>>())
1173  // Store for future checking when the actual functor gets added
1174  functor_to_request_info.emplace(name,
1175  std::make_pair(requested_functor_is_ad, requestor_is_ad));
1176  else
1177  {
1178  // We already have the actual functor
1179  if (true_functor_is == SubProblem::TrueFunctorIs::UNSET)
1180  mooseError("We already have the functor; it should not be unset");
1181 
1182  // Check for whether this is a valid request
1183  if (!requested_functor_is_ad && requestor_is_ad &&
1184  true_functor_is == SubProblem::TrueFunctorIs::AD)
1185  mooseError("We are requesting a non-AD functor from an AD object, but the true functor is "
1186  "AD. This "
1187  "means we could be dropping important derivatives. We will not allow this");
1188  }
1189 
1190  return *functor;
1191  }
1192 
1193  // We don't have the functor yet but we could have it in the future. We'll create null functors
1194  // for now
1195  functor_to_request_info.emplace(name, std::make_pair(requested_functor_is_ad, requestor_is_ad));
1196  if constexpr (requested_functor_is_ad)
1197  {
1198  typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1199  typedef T ADType;
1200 
1201  auto emplace_ret =
1202  functors.emplace("wraps_" + name,
1203  std::make_tuple(SubProblem::TrueFunctorIs::UNSET,
1204  std::make_unique<Moose::Functor<NonADType>>(
1205  std::make_unique<Moose::NullFunctor<NonADType>>()),
1206  std::make_unique<Moose::Functor<ADType>>(
1207  std::make_unique<Moose::NullFunctor<ADType>>())));
1208 
1209  return static_cast<Moose::Functor<T> &>(*(requested_functor_is_ad
1210  ? std::get<2>(emplace_ret->second)
1211  : std::get<1>(emplace_ret->second)));
1212  }
1213  else
1214  {
1215  typedef T NonADType;
1216  typedef typename Moose::ADType<T>::type ADType;
1217 
1218  auto emplace_ret =
1219  functors.emplace("wraps_" + name,
1220  std::make_tuple(SubProblem::TrueFunctorIs::UNSET,
1221  std::make_unique<Moose::Functor<NonADType>>(
1222  std::make_unique<Moose::NullFunctor<NonADType>>()),
1223  std::make_unique<Moose::Functor<ADType>>(
1224  std::make_unique<Moose::NullFunctor<ADType>>())));
1225 
1226  return static_cast<Moose::Functor<T> &>(*(requested_functor_is_ad
1227  ? std::get<2>(emplace_ret->second)
1228  : std::get<1>(emplace_ret->second)));
1229  }
1230 }
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:1084
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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:1088
std::string demangle(const char *name)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::vector< std::multimap< std::string, std::tuple< TrueFunctorIs, std::unique_ptr< Moose::FunctorEnvelopeBase >, std::unique_ptr< Moose::FunctorEnvelopeBase > > > > _functors
A container holding pointers to all the functors in our problem.
Definition: SubProblem.h:1071
A functor that serves as a placeholder during the simulation setup phase if a functor consumer reques...

◆ getFVInitialConditionWarehouse()

const FVInitialConditionWarehouse& FEProblemBase::getFVInitialConditionWarehouse ( ) const
inline

Return FVInitialCondition storage.

Definition at line 1513 of file FEProblemBase.h.

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

1513 { 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 8232 of file FEProblemBase.C.

8238 {
8239  if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
8240  {
8241  auto & this_face_mats =
8243  for (std::shared_ptr<MaterialBase> face_mat : this_face_mats)
8244  if (face_mat->ghostable())
8245  {
8246  mooseAssert(!face_mat->hasStatefulProperties(),
8247  "Finite volume materials do not currently support stateful properties.");
8248  face_materials.push_back(face_mat);
8249  auto & var_deps = face_mat->getMooseVariableDependencies();
8250  for (auto * var : var_deps)
8251  {
8252  mooseAssert(
8253  var->isFV(),
8254  "Ghostable materials should only have finite volume variables coupled into them.");
8255  variables.insert(var);
8256  }
8257  }
8258  }
8259 
8260  if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
8261  {
8262  auto & this_neighbor_mats =
8264  for (std::shared_ptr<MaterialBase> neighbor_mat : this_neighbor_mats)
8265  if (neighbor_mat->ghostable())
8266  {
8267  mooseAssert(!neighbor_mat->hasStatefulProperties(),
8268  "Finite volume materials do not currently support stateful properties.");
8269  neighbor_materials.push_back(neighbor_mat);
8270 #ifndef NDEBUG
8271  auto & var_deps = neighbor_mat->getMooseVariableDependencies();
8272  for (auto * var : var_deps)
8273  {
8274  mooseAssert(
8275  var->isFV(),
8276  "Ghostable materials should only have finite volume variables coupled into them.");
8277  auto pr = variables.insert(var);
8278  mooseAssert(!pr.second,
8279  "We should not have inserted any new variables dependencies from our "
8280  "neighbor materials that didn't exist for our face materials");
8281  }
8282 #endif
8283  }
8284  }
8285 }
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
MaterialWarehouse _materials

◆ getIndicatorWarehouse()

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

Return indicator/marker storage.

Definition at line 1497 of file FEProblemBase.h.

1497 { return _indicators; }
MooseObjectWarehouse< Indicator > _indicators

◆ getInitialConditionWarehouse()

const InitialConditionWarehouse& FEProblemBase::getInitialConditionWarehouse ( ) const
inline

Return InitialCondition storage.

Definition at line 1508 of file FEProblemBase.h.

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

1508 { return _ics; }
InitialConditionWarehouse _ics

◆ getInterfaceMaterialsWarehouse()

const MaterialWarehouse& FEProblemBase::getInterfaceMaterialsWarehouse ( ) const
inline

Definition at line 1672 of file FEProblemBase.h.

1672 { return _interface_materials; }
MaterialWarehouse _interface_materials

◆ getInternalSideIndicatorWarehouse()

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

Definition at line 1498 of file FEProblemBase.h.

1499  {
1501  }
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators

◆ getLineSearch()

LineSearch* FEProblemBase::getLineSearch ( )
inlineoverridevirtual

getter for the MOOSE line search

Implements SubProblem.

Definition at line 636 of file FEProblemBase.h.

Referenced by DisplacedProblem::getLineSearch().

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

◆ getMarkerWarehouse()

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

Definition at line 1502 of file FEProblemBase.h.

1502 { 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 3305 of file FEProblemBase.C.

Referenced by MaterialPropertyInterface::getMaterialByName().

3309 {
3310  switch (type)
3311  {
3313  name += "_neighbor";
3314  break;
3316  name += "_face";
3317  break;
3318  default:
3319  break;
3320  }
3321 
3322  std::shared_ptr<MaterialBase> material = _all_materials[type].getActiveObject(name, tid);
3323  if (!no_warn && material->getParam<bool>("compute") && type == Moose::BLOCK_MATERIAL_DATA)
3324  mooseWarning("You are retrieving a Material object (",
3325  material->name(),
3326  "), but its compute flag is set to true. This indicates that MOOSE is "
3327  "computing this property which may not be desired and produce un-expected "
3328  "results.");
3329 
3330  return material;
3331 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
MaterialWarehouse _all_materials

◆ getMaterialData()

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

Definition at line 3334 of file FEProblemBase.C.

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

3335 {
3336  switch (type)
3337  {
3339  return _material_props.getMaterialData(tid);
3346  }
3347 
3348  mooseError("FEProblemBase::getMaterialData(): Invalid MaterialDataType ", type);
3349 }
MaterialPropertyStorage & _bnd_material_props
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MaterialData & getMaterialData(const THREAD_ID tid)
MaterialPropertyStorage & _neighbor_material_props
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 455 of file SubProblem.C.

Referenced by MaterialPropertyInterface::getMaterialPropertyBlockNames().

456 {
457  std::set<SubdomainID> blocks = getMaterialPropertyBlocks(prop_name);
458  std::vector<SubdomainName> block_names;
459  block_names.reserve(blocks.size());
460  for (const auto & block_id : blocks)
461  {
462  SubdomainName name;
463  name = mesh().getMesh().subdomain_name(block_id);
464  if (name.empty())
465  {
466  std::ostringstream oss;
467  oss << block_id;
468  name = oss.str();
469  }
470  block_names.push_back(name);
471  }
472 
473  return block_names;
474 }
virtual MooseMesh & mesh()=0
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
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:439

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

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

440 {
441  std::set<SubdomainID> blocks;
442 
443  for (const auto & it : _map_block_material_props)
444  {
445  const std::set<std::string> & prop_names = it.second;
446  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
447  if (name_it != prop_names.end())
448  blocks.insert(it.first);
449  }
450 
451  return blocks;
452 }
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:979

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

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

492 {
493  std::set<BoundaryID> boundaries;
494 
495  for (const auto & it : _map_boundary_material_props)
496  {
497  const std::set<std::string> & prop_names = it.second;
498  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
499  if (name_it != prop_names.end())
500  boundaries.insert(it.first);
501  }
502 
503  return boundaries;
504 }
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:982

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

Referenced by MaterialPropertyInterface::getMaterialPropertyBoundaryNames().

508 {
509  std::set<BoundaryID> boundaries = getMaterialPropertyBoundaryIDs(prop_name);
510  std::vector<BoundaryName> boundary_names;
511  boundary_names.reserve(boundaries.size());
512  const BoundaryInfo & boundary_info = mesh().getMesh().get_boundary_info();
513 
514  for (const auto & bnd_id : boundaries)
515  {
516  BoundaryName name;
517  if (bnd_id == Moose::ANY_BOUNDARY_ID)
518  name = "ANY_BOUNDARY_ID";
519  else
520  {
521  name = boundary_info.get_sideset_name(bnd_id);
522  if (name.empty())
523  {
524  std::ostringstream oss;
525  oss << bnd_id;
526  name = oss.str();
527  }
528  }
529  boundary_names.push_back(name);
530  }
531 
532  return boundary_names;
533 }
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:491
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:23

◆ getMaterialPropertyRegistry()

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

Definition at line 1475 of file FEProblemBase.h.

Referenced by MaterialBase::checkStatefulSanity().

1476  {
1477  return _material_prop_registry;
1478  }
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 1485 of file FEProblemBase.h.

1485 { return _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 308 of file SubProblem.C.

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

309 {
310  auto tag_name_upper = MooseUtils::toUpper(tag_name);
311 
312  if (!matrixTagExists(tag_name))
313  mooseError("Matrix tag: ",
314  tag_name,
315  " does not exist. ",
316  "If this is a TimeKernel then this may have happened because you didn't "
317  "specify a Transient Executioner.");
318 
319  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
320 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:966
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1037
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:294

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

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

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

◆ getMaxQps()

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

Definition at line 1359 of file FEProblemBase.C.

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

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

◆ getMaxScalarOrder()

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

Definition at line 1367 of file FEProblemBase.C.

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

1368 {
1369  return _max_scalar_order;
1370 }
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 2344 of file FEProblemBase.C.

Referenced by NestedDivision::NestedDivision().

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

◆ getMooseApp()

MooseApp& MooseBase::getMooseApp ( ) const
inlineinherited

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

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

◆ getMortarInterface() [2/2]

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

Definition at line 7072 of file FEProblemBase.C.

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

◆ getMortarInterfaces()

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

Definition at line 7082 of file FEProblemBase.C.

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

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

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

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

8354 {
8355  std::vector<MortarUserObject *> mortar_uos;
8356  auto * const subproblem = displaced ? static_cast<SubProblem *>(_displaced_problem.get())
8357  : static_cast<SubProblem *>(this);
8358  for (auto * const obj : mortar_uo_superset)
8359  if (obj->onInterface(primary_boundary_id, secondary_boundary_id) &&
8360  (&obj->getSubProblem() == subproblem))
8361  mortar_uos.push_back(obj);
8362 
8363  return mortar_uos;
8364 }
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
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 8367 of file FEProblemBase.C.

8370 {
8371  std::vector<MortarUserObject *> mortar_uos;
8372  theWarehouse()
8373  .query()
8375  .queryInto(mortar_uos);
8376  return getMortarUserObjects(primary_boundary_id, secondary_boundary_id, displaced, mortar_uos);
8377 }
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 4822 of file FEProblemBase.C.

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

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

◆ getMultiAppTransferWarehouse()

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

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

Definition at line 4917 of file FEProblemBase.C.

4918 {
4919  if (direction == MultiAppTransfer::TO_MULTIAPP)
4920  return _to_multi_app_transfers;
4921  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
4923  else
4925 }
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 1816 of file FEProblemBase.h.

Referenced by MooseApp::errorCheck().

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

◆ getNeighborMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getNeighborMaterialPropertyStorage ( )
inline

Definition at line 1487 of file FEProblemBase.h.

1488  {
1489  return _neighbor_material_props;
1490  }
MaterialPropertyStorage & _neighbor_material_props

◆ getNonlinearEvaluableElementRange()

const ConstElemRange & FEProblemBase::getNonlinearEvaluableElementRange ( )

Definition at line 690 of file FEProblemBase.C.

Referenced by ElemSideNeighborLayersTester::execute().

691 {
693  {
694  std::vector<const DofMap *> dof_maps(_nl.size());
695  for (const auto i : index_range(dof_maps))
696  dof_maps[i] = &_nl[i]->dofMap();
698  std::make_unique<ConstElemRange>(_mesh.getMesh().multi_evaluable_elements_begin(dof_maps),
699  _mesh.getMesh().multi_evaluable_elements_end(dof_maps));
700  }
701 
703 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
MooseMesh & _mesh
auto index_range(const T &sizable)
std::unique_ptr< ConstElemRange > _nl_evaluable_local_elem_range

◆ getNonlinearForcedIterations()

unsigned int FEProblemBase::getNonlinearForcedIterations ( ) const
inline

method returning the number of forced nonlinear iterations

Definition at line 2047 of file FEProblemBase.h.

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

2047 { return _nl_forced_its; }
int _nl_forced_its
the number of forced nonlinear iterations

◆ getNonlinearSystem()

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

Reimplemented in FEProblem.

Definition at line 2359 of file FEProblemBase.C.

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

2360 {
2361  mooseDeprecated("FEProblemBase::getNonlinearSystem() is deprecated, please use "
2362  "FEProblemBase::getNonlinearSystemBase() \n");
2363 
2364  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
2365  auto nl_sys = std::dynamic_pointer_cast<NonlinearSystem>(_nl[sys_num]);
2366 
2367  if (!nl_sys)
2368  mooseError("This is not a NonlinearSystem");
2369 
2370  return *nl_sys;
2371 }
void mooseDeprecated(Args &&... args) const
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.
Nonlinear system to be solved.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getNonlinearSystemBase() [1/2]

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

Definition at line 2716 of file FEProblemBase.h.

Referenced by IterationAdaptiveDT::acceptStep(), Adaptivity::adaptMesh(), ADKernelTempl< T >::ADKernelTempl(), ArrayKernel::ArrayKernel(), MooseMesh::cacheFaceInfoVariableOwnership(), MooseMesh::cacheFVElementalDoFs(), Steady::checkIntegrity(), Eigenvalue::checkIntegrity(), PhysicsBase::copyVariablesFromMesh(), PseudoTimestep::currentResidualNorm(), DisplacedProblem::DisplacedProblem(), AB2PredictorCorrector::estimateTimeError(), VariableResidual::execute(), GreaterThanLessThanPostprocessor::execute(), Executioner::Executioner(), ElementSubdomainModifier::finalize(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), NumResidualEvaluations::getValue(), Residual::getValue(), Adaptivity::init(), ReferenceResidualProblem::initialSetup(), ActivateElementsUserObjectBase::initSolutions(), Kernel::Kernel(), BoundaryElemIntegrityCheckThread::operator()(), DOFMapOutput::output(), SolutionHistory::output(), ConsoleUtils::outputExecutionInformation(), ConsoleUtils::outputNonlinearSystemInformation(), Moose::PetscSupport::petscSetDefaultKSPNormType(), Moose::PetscSupport::petscSetDefaultPCSide(), Moose::PetscSupport::petscSetDefaults(), ReferenceResidualProblem::ReferenceResidualProblem(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), AB2PredictorCorrector::step(), Moose::PetscSupport::storePetscOptions(), DisplacedProblem::syncSolutions(), and Console::writeVariableNorms().

2717 {
2718  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
2719  return *_nl[sys_num];
2720 }
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 2723 of file FEProblemBase.h.

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

◆ getNumCyclesCompleted()

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

Definition at line 1538 of file FEProblemBase.h.

1538 { return _cycles_completed; }
unsigned int _cycles_completed

◆ getParam() [1/2]

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

Retrieve a parameter for the object.

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

Definition at line 210 of file MooseBaseParameterInterface.h.

Referenced by CreateDisplacedProblemAction::act(), AddPeriodicBCAction::act(), ADNodalKernel::ADNodalKernel(), ArrayParsedAux::ArrayParsedAux(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), PiecewiseTabularBase::buildFromJSON(), PhysicsBase::checkVectorParamsNoOverlap(), PhysicsBase::checkVectorParamsSameLength(), createTagSolutions(), AccumulateReporter::declareLateValues(), DerivativeParsedMaterialTempl< is_ad >::DerivativeParsedMaterialTempl(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenKernel::EigenKernel(), FEProblemBase(), FEProblemSolve::FEProblemSolve(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FVInterfaceKernel::FVInterfaceKernel(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), GeneratedMeshGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), SideSetsBetweenSubdomainsGenerator::generate(), BlockDeletionGenerator::generate(), MeshExtruderGenerator::generate(), ParsedGenerateSideset::generate(), GenericConstantRankTwoTensorTempl< is_ad >::GenericConstantRankTwoTensorTempl(), MooseApp::getCheckpointDirectories(), ExecutorInterface::getExecutor(), GhostingUserObject::GhostingUserObject(), TimeSequenceStepper::init(), IterationAdaptiveDT::init(), AdvancedOutput::init(), AttribThread::initFrom(), AttribSysNum::initFrom(), AttribResidualObject::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MooseMesh::MooseMesh(), MooseVariableBase::MooseVariableBase(), NestedDivision::NestedDivision(), ConsoleUtils::outputExecutionInformation(), ParsedAux::ParsedAux(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterialTempl< is_ad >::ParsedMaterialTempl(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseConstantByBlockMaterialTempl< is_ad >::PiecewiseConstantByBlockMaterialTempl(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), Moose::FV::setInterpolationMethod(), SetupMeshAction::setupMesh(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), and VectorOfPostprocessors::VectorOfPostprocessors().

211 {
212  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
213 }
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseObject *moose_object=nullptr)
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ getParam() [2/2]

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

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

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

Definition at line 267 of file MooseBaseParameterInterface.h.

268 {
269  return _pars.get<T1, T2>(param1, param2);
270 }
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ getPetscOptions()

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

Retrieve a writable reference the PETSc options (used by PetscSupport)

Definition at line 601 of file FEProblemBase.h.

Referenced by Moose::PetscSupport::disableLinearConvergedReason(), Moose::PetscSupport::disableNonlinearConvergedReason(), Moose::PetscSupport::isSNESVI(), ConsoleUtils::outputExecutionInformation(), Split::setup(), Moose::SlepcSupport::slepcSetOptions(), and Moose::PetscSupport::storePetscOptions().

601 { return _petsc_options; }
Moose::PetscSupport::PetscOptions _petsc_options
PETSc option storage.

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

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

3898 {
3899  std::vector<Positions *> objs;
3900  theWarehouse()
3901  .query()
3902  .condition<AttribSystem>("UserObject")
3903  .condition<AttribName>(name)
3904  .queryInto(objs);
3905  if (objs.empty())
3906  mooseError("Unable to find Positions object with name '" + name + "'");
3907  mooseAssert(objs.size() == 1, "Should only find one Positions");
3908  return *(objs[0]);
3909 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getPostprocessorValueByName()

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

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

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

3933 {
3935  t_index);
3936 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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:379
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:191
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:134

◆ getRegularMaterialsWarehouse()

const MaterialWarehouse& FEProblemBase::getRegularMaterialsWarehouse ( ) const
inline

Definition at line 1670 of file FEProblemBase.h.

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

1670 { return _materials; }
MaterialWarehouse _materials

◆ getRenamedParam()

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

Retrieve a renamed parameter for the object.

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

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

Definition at line 217 of file MooseBaseParameterInterface.h.

219 {
220  // this enables having a default on the new parameter but bypassing it with the old one
221  // Most important: accept new parameter
222  if (isParamSetByUser(new_name) && !isParamValid(old_name))
223  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0));
224  // Second most: accept old parameter
225  else if (isParamValid(old_name) && !isParamSetByUser(new_name))
226  return InputParameters::getParamHelper(old_name, _pars, static_cast<T *>(0));
227  // Third most: accept default for new parameter
228  else if (isParamValid(new_name) && !isParamValid(old_name))
229  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0));
230  // Refuse: no default, no value passed
231  else if (!isParamValid(old_name) && !isParamValid(new_name))
232  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
233  "' is being retrieved without being set.\n"
234  "Did you misspell it?");
235  // Refuse: both old and new parameters set by user
236  else
237  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
238  "' may not be provided alongside former parameter '" + old_name + "'");
239 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseObject *moose_object=nullptr)
bool isParamSetByUser(const std::string &nm) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
std::string & blockFullpath()
Get/set a string representing the full HIT parameter path from the input file (e.g.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ getReporterData() [1/2]

const ReporterData& FEProblemBase::getReporterData ( ) const
inline

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

943 { return _reporter_data; }
ReporterData _reporter_data

◆ getRestartableData()

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

Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData but returns a const reference to the object.

Forwarded arguments are not allowed in this case because we assume that the object is restarted and we won't need different constructors to initialize it.

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

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)

Definition at line 287 of file Restartable.h.

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

◆ getSampler()

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

Definition at line 2407 of file FEProblemBase.C.

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

2408 {
2409  std::vector<Sampler *> objs;
2410  theWarehouse()
2411  .query()
2412  .condition<AttribSystem>("Sampler")
2413  .condition<AttribThread>(tid)
2414  .condition<AttribName>(name)
2415  .queryInto(objs);
2416  if (objs.empty())
2417  mooseError(
2418  "Unable to find Sampler with name '" + name +
2419  "', if you are attempting to access this object in the constructor of another object then "
2420  "the object being retrieved must occur prior to the caller within the input file.");
2421  return *(objs[0]);
2422 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getScalarVariable()

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

Returns the scalar variable reference from whichever system contains it.

Implements SubProblem.

Definition at line 5263 of file FEProblemBase.C.

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

5264 {
5265  for (auto & nl : _nl)
5266  if (nl->hasScalarVariable(var_name))
5267  return nl->getScalarVariable(tid, var_name);
5268  if (_aux->hasScalarVariable(var_name))
5269  return _aux->getScalarVariable(tid, var_name);
5270 
5271  mooseError("Unknown variable " + var_name);
5272 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

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

5204 {
5205  for (auto & nl : _nl)
5206  if (nl->hasVariable(var_name))
5207  return nl->getFieldVariable<Real>(tid, var_name);
5208  if (_aux->hasVariable(var_name))
5209  return _aux->getFieldVariable<Real>(tid, var_name);
5210 
5211  mooseError("Unknown variable " + var_name);
5212 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getSystem()

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

Returns the equation system containing the variable provided.

Implements SubProblem.

Definition at line 5275 of file FEProblemBase.C.

Referenced by MultiApp::appTransferVector().

5276 {
5277  const auto [var_in_nl, nl_sys_num] = determineNonlinearSystem(var_name);
5278  if (var_in_nl)
5279  return _nl[nl_sys_num]->system();
5280  else if (_aux->hasVariable(var_name))
5281  return _aux->system();
5282  else
5283  mooseError("Unable to find a system containing the variable " + var_name);
5284 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what nonlinear system the provided variable name lies in.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getTimeFromStateArg()

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

Returns the time associated with the requested state.

Definition at line 6104 of file FEProblemBase.C.

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

6105 {
6107  // If we are any iteration type other than time (e.g. nonlinear), then temporally we are still
6108  // in the present time
6109  return time();
6110 
6111  switch (state.state)
6112  {
6113  case 0:
6114  return time();
6115 
6116  case 1:
6117  return timeOld();
6118 
6119  default:
6120  mooseError("Unhandled state ", state.state, " in FEProblemBase::getTimeFromStateArg");
6121  }
6122 }
virtual Real & time() const
SolutionIterationType iteration_type
The solution iteration type, e.g. time or nonlinear.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Real & timeOld() const
unsigned int state
The state.

◆ getTransfers() [1/2]

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

Get Transfers by ExecFlagType and direction.

Definition at line 4895 of file FEProblemBase.C.

4896 {
4897  if (direction == MultiAppTransfer::TO_MULTIAPP)
4899  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
4901  else
4903 }
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:50
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 4906 of file FEProblemBase.C.

4907 {
4908  if (direction == MultiAppTransfer::TO_MULTIAPP)
4910  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
4912  else
4914 }
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 964 of file FEProblemBase.h.

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

965  {
966  std::vector<T *> objs;
967  theWarehouse()
968  .query()
969  .condition<AttribSystem>("UserObject")
970  .condition<AttribThread>(tid)
971  .condition<AttribName>(name)
972  .queryInto(objs);
973  if (objs.empty())
974  mooseError("Unable to find user object with name '" + name + "'");
975  return *(objs[0]);
976  }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getUserObjectBase()

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

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

Referenced by MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), MultiApp::appUserObjectBase(), UserObjectInterface::getUserObjectBaseByName(), UserObjectInterface::hasUserObjectByName(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppConservativeTransfer::initialSetup(), and Terminator::initialSetup().

3882 {
3883  std::vector<UserObject *> objs;
3884  theWarehouse()
3885  .query()
3886  .condition<AttribSystem>("UserObject")
3887  .condition<AttribThread>(tid)
3888  .condition<AttribName>(name)
3889  .queryInto(objs);
3890  if (objs.empty())
3891  mooseError("Unable to find user object with name '" + name + "'");
3892  mooseAssert(objs.size() == 1, "Should only find one UO");
3893  return *(objs[0]);
3894 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getUserObjectJacobianVariables()

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

Definition at line 359 of file FEProblemBase.h.

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

360  {
361  return _uo_jacobian_moose_vars[tid];
362  }
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars

◆ getUserObjects()

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

Definition at line 951 of file FEProblemBase.h.

952  {
954  "This function is deprecated, use theWarehouse().query() to construct a query instead");
955  return _all_user_objects;
956  }
void mooseDeprecated(Args &&... args) const
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects

◆ getVariable() [1/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 235 of file SubProblem.h.

239  {
240  return const_cast<MooseVariableFieldBase &>(const_cast<const SubProblem *>(this)->getVariable(
241  tid, var_name, expected_var_type, expected_var_field_type));
242  }
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:75

◆ getVariable() [2/4]

virtual MooseVariableFieldBase& SubProblem::getVariable
inline

Definition at line 235 of file SubProblem.h.

239  {
240  return const_cast<MooseVariableFieldBase &>(const_cast<const SubProblem *>(this)->getVariable(
241  tid, var_name, expected_var_type, expected_var_field_type));
242  }
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:75

◆ getVariable() [3/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() [4/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 5194 of file FEProblemBase.C.

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

5198 {
5199  return getVariableHelper(tid, var_name, expected_var_type, expected_var_field_type, _nl, *_aux);
5200 }
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< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ 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 > &  nls,
const SystemBase aux 
) const
inherited

Definition at line 767 of file SubProblem.C.

773 {
774  // Eventual return value
775  MooseVariableFEBase * var = nullptr;
776 
777  const auto [var_in_nl, nl_sys_num] = determineNonlinearSystem(var_name);
778 
779  // First check that the variable is found on the expected system.
780  if (expected_var_type == Moose::VarKindType::VAR_ANY)
781  {
782  if (var_in_nl)
783  var = &(nls[nl_sys_num]->getVariable(tid, var_name));
784  else if (aux.hasVariable(var_name))
785  var = &(aux.getVariable(tid, var_name));
786  else
787  mooseError("Unknown variable " + var_name);
788  }
789  else if (expected_var_type == Moose::VarKindType::VAR_NONLINEAR && var_in_nl &&
790  nls[nl_sys_num]->hasVariable(var_name))
791  var = &(nls[nl_sys_num]->getVariable(tid, var_name));
792  else if (expected_var_type == Moose::VarKindType::VAR_AUXILIARY && aux.hasVariable(var_name))
793  var = &(aux.getVariable(tid, var_name));
794  else
795  {
796  std::string expected_var_type_string =
797  (expected_var_type == Moose::VarKindType::VAR_NONLINEAR ? "nonlinear" : "auxiliary");
798  mooseError("No ",
799  expected_var_type_string,
800  " variable named ",
801  var_name,
802  " found. "
803  "Did you specify an auxiliary variable when you meant to specify a nonlinear "
804  "variable (or vice-versa)?");
805  }
806 
807  // Now make sure the var found has the expected field type.
808  if ((expected_var_field_type == Moose::VarFieldType::VAR_FIELD_ANY) ||
809  (expected_var_field_type == var->fieldType()))
810  return *var;
811  else
812  {
813  std::string expected_var_field_type_string =
814  MooseUtils::toLower(Moose::stringify(expected_var_field_type));
815  std::string var_field_type_string = MooseUtils::toLower(Moose::stringify(var->fieldType()));
816 
817  mooseError("No ",
818  expected_var_field_type_string,
819  " variable named ",
820  var_name,
821  " found. "
822  "Did you specify a ",
823  var_field_type_string,
824  " variable when you meant to specify a ",
825  expected_var_field_type_string,
826  " variable?");
827  }
828 }
std::string toLower(const std::string &name)
Convert supplied string to lower case.
Definition: MooseUtils.C:1045
This class provides an interface for common operations on field variables of both FE and FV types wit...
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
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:800
virtual Moose::VarFieldType fieldType() const =0
Filed type of this variable.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79
virtual std::pair< bool, unsigned int > determineNonlinearSystem(const std::string &var_name, bool error_if_not_found=false) const =0

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

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

7762 {
7763  std::vector<VariableName> names;
7764 
7765  for (auto & nl : _nl)
7766  {
7767  const std::vector<VariableName> & nl_var_names = nl->getVariableNames();
7768  names.insert(names.end(), nl_var_names.begin(), nl_var_names.end());
7769  }
7770 
7771  const std::vector<VariableName> & aux_var_names = _aux->getVariableNames();
7772  names.insert(names.end(), aux_var_names.begin(), aux_var_names.end());
7773 
7774  return names;
7775 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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 3975 of file FEProblemBase.C.

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

3977 {
3978  return getUserObject<VectorPostprocessor>(object_name, tid);
3979 }

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

Referenced by HistogramVectorPostprocessor::execute().

3959 {
3961  VectorPostprocessorReporterName(object_name, vector_name), t_index);
3962 }
A ReporterName that represents a VectorPostprocessor.
Definition: ReporterName.h:143
ReporterData _reporter_data
const T & getReporterValue(const ReporterName &reporter_name, const MooseObject &consumer, const ReporterMode &mode, const std::size_t time_index=0) const
Method for returning read only references to Reporter values.
Definition: ReporterData.h:379
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:192

◆ getVectorTag()

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

Get a VectorTag from a TagID.

Reimplemented in DisplacedProblem.

Definition at line 138 of file SubProblem.C.

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

139 {
140  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
141 
142  if (!vectorTagExists(tag_id))
143  mooseError("Vector tag with ID ", tag_id, " does not exist");
144 
145  return _vector_tags[tag_id];
146 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1094
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:218
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:163
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getVectorTagID()

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

Get a TagID from a TagName.

Reimplemented in DisplacedProblem.

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

181 {
182  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
183 
184  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
185  const auto search = _vector_tags_name_map.find(tag_name_upper);
186  if (search != _vector_tags_name_map.end())
187  return search->second;
188 
189  std::string message =
190  tag_name_upper == "TIME"
191  ? ".\n\nThis may occur if "
192  "you have a TimeKernel in your problem but did not specify a transient executioner."
193  : "";
194  mooseError("Vector tag '", tag_name_upper, "' does not exist", message);
195 }
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1037
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:218
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1104
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getVectorTags() [1/2]

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

Definition at line 149 of file SubProblem.C.

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

150 {
151  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
152 
153  std::vector<VectorTag> tags;
154  tags.reserve(tag_ids.size());
155  for (const auto & tag_id : tag_ids)
156  tags.push_back(getVectorTag(tag_id));
157  return tags;
158 }
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:218
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:138

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

162 {
163  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
164 
166  return _vector_tags;
167  else
168  return _typed_vector_tags[type];
169 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1094
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:218
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
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:1101

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

5228 {
5229  for (auto & nl : _nl)
5230  if (nl->hasVariable(var_name))
5231  return nl->getFieldVariable<RealVectorValue>(tid, var_name);
5232  if (_aux->hasVariable(var_name))
5233  return _aux->getFieldVariable<RealVectorValue>(tid, var_name);
5234 
5235  mooseError("Unknown variable " + var_name);
5236 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getXFEM()

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

Get a pointer to the XFEM controller object.

Definition at line 1555 of file FEProblemBase.h.

1555 { 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 627 of file SubProblem.h.

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

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

◆ ghostGhostedBoundaries()

void FEProblemBase::ghostGhostedBoundaries ( )
overridevirtual

Causes the boundaries added using addGhostedBoundary to actually be ghosted.

Implements SubProblem.

Definition at line 1864 of file FEProblemBase.C.

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

1865 {
1866  TIME_SECTION("ghostGhostedBoundaries", 3, "Ghosting Ghosted Boundaries");
1867 
1869 
1870  if (_displaced_problem)
1872 }
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:3064
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 6452 of file FEProblemBase.C.

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

6453 {
6454  auto create_exception_message =
6455  [&calling_method](const std::string & exception_type, const auto & exception)
6456  {
6457  return std::string("A " + exception_type + " was raised during FEProblemBase::" +
6458  calling_method + "\n" + std::string(exception.what()));
6459  };
6460 
6461  try
6462  {
6463  throw;
6464  }
6465  catch (const libMesh::LogicError & e)
6466  {
6467  setException(create_exception_message("libMesh::LogicError", e));
6468  }
6469  catch (const MooseException & e)
6470  {
6471  setException(create_exception_message("MooseException", e));
6472  }
6473  catch (const MetaPhysicL::LogicError & e)
6474  {
6476  }
6477  catch (const libMesh::PetscSolverException & e)
6478  {
6479  // One PETSc solver exception that we cannot currently recover from are new nonzero errors. In
6480  // particular I have observed the following scenario in a parallel test:
6481  // - Both processes throw because of a new nonzero during MOOSE's computeJacobianTags
6482  // - We potentially handle the exceptions nicely here
6483  // - When the matrix is closed in libMesh's libmesh_petsc_snes_solver, there is a new nonzero
6484  // throw which we do not catch here in MOOSE and the simulation terminates. This only appears
6485  // in parallel (and not all the time; a test I was examining threw with distributed mesh, but
6486  // not with replicated). In serial there are no new throws from libmesh_petsc_snes_solver.
6487  // So for uniformity of behavior across serial/parallel, we will choose to abort here and always
6488  // produce a non-zero exit code
6489  mooseError(create_exception_message("libMesh::PetscSolverException", e));
6490  }
6491  catch (const std::exception & e)
6492  {
6493  const auto message = create_exception_message("std::exception", e);
6495  mooseError(message);
6496  else
6497  setException(message);
6498  }
6499 
6501 }
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:98
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.

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

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

427 {
429 }
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:1006

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

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

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

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

478 {
479  auto it = _map_block_material_props.find(bid);
480  if (it == _map_block_material_props.end())
481  return false;
482 
483  if (it->second.count(prop_name) > 0)
484  return true;
485  else
486  return false;
487 }
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:979

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

537 {
538  auto it = _map_boundary_material_props.find(bid);
539  if (it == _map_boundary_material_props.end())
540  return false;
541 
542  if (it->second.count(prop_name) > 0)
543  return true;
544  else
545  return false;
546 }
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:982

◆ hasDampers()

bool FEProblemBase::hasDampers ( )
inline

Whether or not this system has dampers.

Definition at line 1101 of file FEProblemBase.h.

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

1101 { 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 479 of file FEProblemBase.h.

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

479 { 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 2278 of file FEProblemBase.C.

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

2279 {
2280  return _functions.hasActiveObject(name, tid);
2281 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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 1215 of file SubProblem.C.

Referenced by FunctorInterface::isFunctor().

1216 {
1217  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1218  auto & functors = _functors[tid];
1219  return (functors.find("wraps_" + name) != functors.end());
1220 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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:1071

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

1235 {
1236  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1237  auto & functors = _functors[tid];
1238 
1239  const auto & it = functors.find("wraps_" + name);
1240  constexpr bool requested_functor_is_ad =
1241  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1242 
1243  if (it == functors.end())
1244  return false;
1245  else
1246  return dynamic_cast<Moose::Functor<T> *>(
1247  requested_functor_is_ad ? std::get<2>(it->second).get() : std::get<1>(it->second).get());
1248 }
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1147
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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:1071

◆ hasInitialAdaptivity() [1/2]

bool FEProblemBase::hasInitialAdaptivity ( ) const
inline

Return a Boolean indicating whether initial AMR is turned on.

Definition at line 1543 of file FEProblemBase.h.

1543 { 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:97

◆ hasInitialAdaptivity() [2/2]

bool FEProblemBase::hasInitialAdaptivity ( ) const
inline

Return a Boolean indicating whether initial AMR is turned on.

Definition at line 1548 of file FEProblemBase.h.

1548 { return false; }

◆ hasJacobian()

bool FEProblemBase::hasJacobian ( ) const

Returns _has_jacobian.

Definition at line 8049 of file FEProblemBase.C.

Referenced by DisplacedProblem::prepare().

8050 {
8051  return _has_jacobian;
8052 }
bool _has_jacobian
Indicates if the Jacobian was computed.

◆ hasMortarCoupling()

virtual bool FEProblemBase::hasMortarCoupling ( ) const
inlinevirtual

Whether the simulation has mortar coupling.

Definition at line 1939 of file FEProblemBase.h.

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

◆ hasMultiApp()

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

Definition at line 4816 of file FEProblemBase.C.

4817 {
4818  return _multi_apps.hasActiveObject(multi_app_name);
4819 }
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 1087 of file FEProblemBase.h.

Referenced by FixedPointSolve::solveStep().

1087 { 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 4810 of file FEProblemBase.C.

4811 {
4812  return _multi_apps[type].hasActiveObjects();
4813 }
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
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 1934 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 nonlocal coupling which should be accounted for in the Jacobian.

Implements SubProblem.

Definition at line 2155 of file FEProblemBase.h.

Referenced by DisplacedProblem::hasNonlocalCoupling().

2155 { 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 3948 of file FEProblemBase.C.

3949 {
3950  mooseDeprecated("FEProblemBase::hasPostprocssor is being removed; use "
3951  "hasPostprocessorValueByName instead.");
3953 }
void mooseDeprecated(Args &&... args) const
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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 3925 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), hasPostprocessor(), and MooseParsedFunction::initialSetup().

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

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

Referenced by addInitialCondition(), EigenProblem::adjustEigenVector(), checkDuplicatePostprocessorVariableNames(), AdvancedOutput::initAvailableLists(), MooseParsedFunctionWrapper::initialize(), AdvancedOutput::initShowHideLists(), and Split::setup().

5252 {
5253  for (auto & nl : _nl)
5254  if (nl->hasScalarVariable(var_name))
5255  return true;
5256  if (_aux->hasScalarVariable(var_name))
5257  return true;
5258 
5259  return false;
5260 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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 1115 of file SubProblem.C.

Referenced by SystemBase::addScalingVector().

1116 {
1117  for (const THREAD_ID tid : make_range(libMesh::n_threads()))
1118  assembly(tid, nl_sys_num).hasScalingVector();
1119 }
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:4568
IntRange< T > make_range(T beg, T end)
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int nl_sys_num)=0
unsigned int THREAD_ID
Definition: MooseTypes.h:198

◆ hasTimeIntegrator()

bool FEProblemBase::hasTimeIntegrator ( ) const
inline

Returns whether or not this Problem has a TimeIntegrator.

Definition at line 1720 of file FEProblemBase.h.

Referenced by Transient::setupTimeIntegrator().

1720 { 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 191 of file FEProblemBase.h.

191 { 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 3912 of file FEProblemBase.C.

Referenced by addPostprocessor(), addReporter(), addVectorPostprocessor(), DistributedPositions::DistributedPositions(), UserObjectInterface::hasUserObjectByName(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), ReporterTransferInterface::hideVariableHelper(), and TransformedPositions::TransformedPositions().

3913 {
3914  std::vector<UserObject *> objs;
3915  theWarehouse()
3916  .query()
3917  .condition<AttribSystem>("UserObject")
3918  .condition<AttribThread>(0)
3919  .condition<AttribName>(name)
3920  .queryInto(objs);
3921  return !objs.empty();
3922 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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 5182 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), addFVInitialCondition(), DiffusionFV::addFVKernels(), addInitialCondition(), MultiAppTransfer::checkVariable(), LazyCoupleable::init(), AdvancedOutput::initAvailableLists(), MooseParsedFunction::initialSetup(), AdvancedOutput::initShowHideLists(), and Split::setup().

5183 {
5184  for (auto & nl : _nl)
5185  if (nl->hasVariable(var_name))
5186  return true;
5187  if (_aux->hasVariable(var_name))
5188  return true;
5189 
5190  return false;
5191 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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 726 of file SubProblem.h.

Referenced by computeJacobianTags(), computeResidualAndJacobian(), and init().

726 { return _have_ad_objects; }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1044

◆ haveADObjects() [2/4]

virtual void SubProblem::haveADObjects
inline

Method for setting whether we have any ad objects.

Definition at line 722 of file SubProblem.h.

722 { _have_ad_objects = have_ad_objects; }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1044

◆ haveADObjects() [3/4]

bool SubProblem::haveADObjects
inline

Method for reading wehther we have any ad objects.

Definition at line 726 of file SubProblem.h.

726 { return _have_ad_objects; }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1044

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

8120 {
8121  _have_ad_objects = have_ad_objects;
8122  if (_displaced_problem)
8123  _displaced_problem->SubProblem::haveADObjects(have_ad_objects);
8124 }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1044
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 2032 of file FEProblemBase.h.

2032 { 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 940 of file SubProblem.h.

Referenced by AdvancedOutput::initAvailableLists(), and meshChangedHelper().

940 { return _have_p_refinement; }
bool _have_p_refinement
Whether p-refinement has been requested at any point during the simulation.
Definition: SubProblem.h:1127

◆ haveXFEM()

bool FEProblemBase::haveXFEM ( )
inline

Find out whether the current analysis is using XFEM.

Definition at line 1558 of file FEProblemBase.h.

Referenced by initialSetup(), FixedPointSolve::solveStep(), Transient::takeStep(), and updateMeshXFEM().

1558 { 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 2160 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

Definition at line 1715 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::constraintJacobians().

1715 { return _ignore_zeros_in_jacobian; }
bool _ignore_zeros_in_jacobian

◆ immediatelyPrintInvalidSolution()

bool FEProblemBase::immediatelyPrintInvalidSolution ( ) const
inline

Whether or not the solution invalid warnings are printed out immediately.

Definition at line 1713 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 5001 of file FEProblemBase.C.

Referenced by Transient::incrementStepOrReject().

5002 {
5003  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5004 
5005  if (multi_apps.size())
5006  for (const auto & multi_app : multi_apps)
5007  multi_app->incrementTStep(_time);
5008 }
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:50
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.

◆ init()

void FEProblemBase::init ( )
overridevirtual

Implements Problem.

Reimplemented in EigenProblem.

Definition at line 5668 of file FEProblemBase.C.

Referenced by EigenProblem::init().

5669 {
5670  if (_initialized)
5671  return;
5672 
5673  TIME_SECTION("init", 2, "Initializing");
5674 
5675  // call executioner's preProblemInit so that it can do some setups before problem init
5677 
5678  // If we have AD and we are doing global AD indexing, then we should by default set the matrix
5679  // coupling to full. If the user has told us to trust their coupling matrix, then this call will
5680  // not do anything
5683 
5684  for (const auto i : index_range(_nl))
5685  {
5686  auto & nl = _nl[i];
5687  auto & cm = _cm[i];
5688 
5689  unsigned int n_vars = nl->nVariables();
5690  {
5691  TIME_SECTION("fillCouplingMatrix", 3, "Filling Coupling Matrix");
5692 
5693  switch (_coupling)
5694  {
5695  case Moose::COUPLING_DIAG:
5696  cm = std::make_unique<CouplingMatrix>(n_vars);
5697  for (unsigned int i = 0; i < n_vars; i++)
5698  (*cm)(i, i) = 1;
5699  break;
5700 
5701  // for full jacobian
5702  case Moose::COUPLING_FULL:
5703  cm = std::make_unique<CouplingMatrix>(n_vars);
5704  for (unsigned int i = 0; i < n_vars; i++)
5705  for (unsigned int j = 0; j < n_vars; j++)
5706  (*cm)(i, j) = 1;
5707  break;
5708 
5710  // do nothing, _cm was already set through couplingMatrix() call
5711  break;
5712  }
5713  }
5714 
5715  nl->dofMap()._dof_coupling = cm.get();
5716 
5717  // If there are no variables, make sure to pass a nullptr coupling
5718  // matrix, to avoid warnings about non-nullptr yet empty
5719  // CouplingMatrices.
5720  if (n_vars == 0)
5721  nl->dofMap()._dof_coupling = nullptr;
5722 
5723  nl->dofMap().attach_extra_sparsity_function(&extraSparsity, nl.get());
5724  nl->dofMap().attach_extra_send_list_function(&extraSendList, nl.get());
5725  _aux->dofMap().attach_extra_send_list_function(&extraSendList, _aux.get());
5726 
5727  if (!_skip_nl_system_check && _solve && n_vars == 0)
5728  mooseError("No variables specified in the FEProblemBase '", name(), "'.");
5729  }
5730 
5731  ghostGhostedBoundaries(); // We do this again right here in case new boundaries have been added
5732 
5733  // We may have added element/nodes to the mesh in ghostGhostedBoundaries so we need to update
5734  // all of our mesh information. We need to make sure that mesh information is up-to-date before
5735  // EquationSystems::init because that will call through to updateGeomSearch (for sparsity
5736  // augmentation) and if we haven't added back boundary node information before that latter call,
5737  // then we're screwed. We'll get things like "Unable to find closest node!"
5738  _mesh.meshChanged();
5739  if (_displaced_problem)
5741 
5742  // do not assemble system matrix for JFNK solve
5743  for (auto & nl : _nl)
5744  {
5746  nl->turnOffJacobian();
5747  nl->init();
5748  }
5749  _aux->init();
5750 
5751  // Build the mortar segment meshes, if they haven't been already, for a couple reasons:
5752  // 1) Get the ghosting correct for both static and dynamic meshes
5753  // 2) Make sure the mortar mesh is built for mortar constraints that live on the static mesh
5754  //
5755  // It is worth-while to note that mortar meshes that live on a dynamic mesh will be built
5756  // during residual and Jacobian evaluation because when displacements are solution variables
5757  // the mortar mesh will move and change during the course of a non-linear solve. We DO NOT
5758  // redo ghosting during non-linear solve, so for purpose 1) the below call has to be made
5759  if (!_mortar_data.initialized())
5760  updateMortarMesh();
5761 
5762  {
5763  TIME_SECTION("EquationSystems::Init", 2, "Initializing Equation Systems");
5764  es().init();
5765  }
5766 
5767  // Now that the equation system and the dof distribution is done, we can generate the
5768  // finite volume-related parts if needed.
5769  if (haveFV())
5771 
5772  for (auto & nl : _nl)
5773  nl->update();
5774  _aux->update();
5775 
5776  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
5777  for (const auto i : index_range(_nl))
5778  _assembly[tid][i]->init(_cm[i].get());
5779 
5780  if (_displaced_problem)
5781  _displaced_problem->init();
5782 
5783  _initialized = true;
5784 }
SolverParams & solverParams()
Get the solver parameters.
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.
virtual void init() override
std::vector< std::unique_ptr< CouplingMatrix > > _cm
Coupling matrix for variables.
bool globalADIndexing()
Whether we are using global AD indexing.
Definition: ADUtils.h:29
bool initialized() const
Definition: MortarData.h:127
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
virtual EquationSystems & es() override
const bool _skip_nl_system_check
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
void extraSparsity(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:42
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:34
Jacobian-Free Newton Krylov.
Definition: MooseTypes.h:758
MortarData _mortar_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition: SubProblem.h:726
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition: MooseApp.C:1482
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
virtual void updateMortarMesh()
virtual void preProblemInit()
Perform initializations during executing actions right before init_problem task.
Definition: Executioner.h:57
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< DisplacedProblem > _displaced_problem
auto index_range(const T &sizable)
const std::string & _type
The type of this class.
Definition: MooseBase.h:72
MooseMesh * _displaced_mesh
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
Definition: MooseMesh.C:684
unsigned int THREAD_ID
Definition: MooseTypes.h:198
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:3814

◆ initElementStatefulProps()

void FEProblemBase::initElementStatefulProps ( const 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 7434 of file FEProblemBase.C.

Referenced by ElementSubdomainModifier::finalize(), ActivateElementsUserObjectBase::finalize(), and initialSetup().

7435 {
7438  if (threaded)
7439  Threads::parallel_reduce(elem_range, cmt);
7440  else
7441  cmt(elem_range, true);
7442 }
MaterialPropertyStorage & _bnd_material_props
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
MaterialPropertyStorage & _neighbor_material_props
MaterialPropertyStorage & _material_props

◆ initialAdaptMesh()

void FEProblemBase::initialAdaptMesh ( )
virtual

Definition at line 7150 of file FEProblemBase.C.

Referenced by initialSetup().

7151 {
7152  unsigned int n = adaptivity().getInitialSteps();
7153  _cycles_completed = 0;
7154  if (n)
7155  {
7158  mooseError("HFEM does not support mesh adaptivity currently.");
7159 
7160  TIME_SECTION("initialAdaptMesh", 2, "Performing Initial Adaptivity");
7161 
7162  for (unsigned int i = 0; i < n; i++)
7163  {
7165  computeMarkers();
7166 
7168  {
7169  meshChanged();
7170 
7171  // reproject the initial condition
7172  projectSolution();
7173 
7175  }
7176  else
7177  {
7178  _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
7179  return;
7180  }
7181  }
7182  }
7183 }
bool initialAdaptMesh()
Used during initial adaptivity.
Definition: Adaptivity.C:260
unsigned int _cycles_completed
virtual void computeMarkers()
const SubdomainID BOUNDARY_SIDE_LOWERD_ID
Definition: MooseTypes.C:21
void projectSolution()
virtual void computeIndicators()
virtual void meshChanged() override
Update data after a mesh change.
MooseMesh & _mesh
Adaptivity _adaptivity
unsigned int getInitialSteps() const
Pull out the number of initial steps previously set by calling init()
Definition: Adaptivity.h:97
const SubdomainID INTERNAL_SIDE_LOWERD_ID
Definition: MooseTypes.C:20
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Adaptivity & adaptivity()
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2921

◆ initialSetup()

void FEProblemBase::initialSetup ( )
overridevirtual

If this is a restart run, the user may want to override the start time, which we already set in the constructor. "_time" however will have been "restored" from the restart file. We need to honor the original request of the developer now that the restore has been completed.

If we are not recovering but we are doing restart (_app.getExodusFileRestart() == true) with additional uniform refinements. We have to delay the refinement until this point in time so that the equation systems are initialized and projections can be performed.

Reimplemented from SubProblem.

Reimplemented in ReferenceResidualProblem.

Definition at line 706 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::init(), Transient::init(), Steady::init(), Eigenvalue::init(), and ReferenceResidualProblem::initialSetup().

707 {
708  TIME_SECTION("initialSetup", 2, "Performing Initial Setup");
709 
711 
713  mooseError("Checkpoint recovery and restart and exodus restart are all mutually exclusive.");
714 
716  mooseWarning("MOOSE may fail to catch an exception when the \"skip_exception_check\" parameter "
717  "is used. If you receive a terse MPI error during execution, remove this "
718  "parameter and rerun your simulation");
719 
720  // set state flag indicating that we are in or beyond initialSetup.
721  // This can be used to throw errors in methods that _must_ be called at construction time.
722  _started_initial_setup = true;
724 
725  // Setup the solution states (current, old, etc) in each system based on
726  // its default and the states requested of each of its variables
727  for (const auto i : index_range(_nl))
728  {
729  _nl[i]->initSolutionState();
730  if (getDisplacedProblem())
731  getDisplacedProblem()->nlSys(i).initSolutionState();
732  }
733  _aux->initSolutionState();
734  if (getDisplacedProblem())
735  getDisplacedProblem()->auxSys().initSolutionState();
736 
737  // always execute to get the max number of DoF per element and node needed to initialize phi_zero
738  // variables
739  dof_id_type global_max_var_n_dofs_per_elem = 0;
740  for (const auto i : index_range(_nl))
741  {
742  auto & nl = *_nl[i];
743  dof_id_type max_var_n_dofs_per_elem;
744  dof_id_type max_var_n_dofs_per_node;
745  {
746  TIME_SECTION("computingMaxDofs", 3, "Computing Max Dofs Per Element");
747 
748  MaxVarNDofsPerElem mvndpe(*this, nl);
749  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), mvndpe);
750  max_var_n_dofs_per_elem = mvndpe.max();
751  _communicator.max(max_var_n_dofs_per_elem);
752 
753  MaxVarNDofsPerNode mvndpn(*this, nl);
754  Threads::parallel_reduce(*_mesh.getLocalNodeRange(), mvndpn);
755  max_var_n_dofs_per_node = mvndpn.max();
756  _communicator.max(max_var_n_dofs_per_node);
757  global_max_var_n_dofs_per_elem =
758  std::max(global_max_var_n_dofs_per_elem, max_var_n_dofs_per_elem);
759  }
760 
761  {
762  TIME_SECTION("assignMaxDofs", 5, "Assigning Maximum Dofs Per Elem");
763 
764  nl.assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
765  auto displaced_problem = getDisplacedProblem();
766  if (displaced_problem)
767  displaced_problem->nlSys(i).assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
768 
769  nl.assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
770  if (displaced_problem)
771  displaced_problem->nlSys(i).assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
772  }
773  }
774 
775  {
776  TIME_SECTION("resizingVarValues", 5, "Resizing Variable Values");
777 
778  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
779  {
780  _phi_zero[tid].resize(global_max_var_n_dofs_per_elem, std::vector<Real>(getMaxQps(), 0.));
781  _grad_phi_zero[tid].resize(global_max_var_n_dofs_per_elem,
782  std::vector<RealGradient>(getMaxQps(), RealGradient(0.)));
783  _second_phi_zero[tid].resize(global_max_var_n_dofs_per_elem,
784  std::vector<RealTensor>(getMaxQps(), RealTensor(0.)));
785  }
786  }
787 
788  // Set up stateful material property redistribution, if we suspect
789  // it may be necessary later.
791 
793  {
794  // Only load all of the vectors if we're recovering
796 
797  // This forces stateful material property loading to be an exact one-to-one match
798  if (_app.isRecovering())
800  props->setRecovering();
801 
802  TIME_SECTION("restore", 3, "Restoring from backup");
803 
804  // We could have a cached backup when this app is a sub-app and has been given a Backup
805  if (!_app.hasInitialBackup())
807  else
809 
815  if (_app.isRestarting())
816  {
817  if (_app.hasStartTime())
819  else
820  _time_old = _time;
821  }
822  }
823  else
824  {
825  ExodusII_IO * reader = _app.getExReaderForRestart();
826 
827  if (reader)
828  {
829  TIME_SECTION("copyingFromExodus", 3, "Copying Variables From Exodus");
830 
831  for (auto & nl : _nl)
832  nl->copyVars(*reader);
833  _aux->copyVars(*reader);
834  }
835  else
836  {
837  if (_nl[0]->hasVarCopy() || _aux->hasVarCopy())
838  mooseError("Need Exodus reader to restart variables but the reader is not available\n"
839  "Use either FileMesh with an Exodus mesh file or FileMeshGenerator with an "
840  "Exodus mesh file and with use_for_exodus_restart equal to true");
841  }
842  }
843 
844  // Perform output related setups
846 
847  // Flush all output to _console that occur during construction and initialization of objects
849 
850  // Build Refinement and Coarsening maps for stateful material projections if necessary
851  if ((_adaptivity.isOn() || _num_grid_steps) &&
854  {
856  mooseError("Stateful neighbor material properties do not work with mesh adaptivity");
857 
859  }
860 
861  if (!_app.isRecovering())
862  {
869  {
870  if (!_app.isUltimateMaster())
871  mooseError(
872  "Doing extra refinements when restarting is NOT supported for sub-apps of a MultiApp");
873 
875  }
876  }
877 
878  unsigned int n_threads = libMesh::n_threads();
879 
880  // UserObject initialSetup
881  std::set<std::string> depend_objects_ic = _ics.getDependObjects();
882  std::set<std::string> depend_objects_aux = _aux->getDependObjects();
883 
884  // This replaces all prior updateDependObjects calls on the old user object warehouses.
885  TheWarehouse::Query uo_query = theWarehouse().query().condition<AttribSystem>("UserObject");
886  std::vector<UserObject *> userobjs;
887  uo_query.queryInto(userobjs);
889  theWarehouse(), getAuxiliarySystem(), _app.getExecuteOnEnum(), userobjs, depend_objects_ic);
890 
891  for (auto obj : userobjs)
892  obj->initialSetup();
893 
894  // check if jacobian calculation is done in userobject
895  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
897 
898  // Check whether nonlocal couling is required or not
902 
903  {
904  TIME_SECTION("initializingFunctions", 5, "Initializing Functions");
905 
906  // Call the initialSetup methods for functions
907  for (THREAD_ID tid = 0; tid < n_threads; tid++)
908  {
909  reinitScalars(tid); // initialize scalars so they are properly sized for use as input into
910  // ParsedFunctions
912  }
913  }
914 
915  {
916  TIME_SECTION("initializingRandomObjects", 5, "Initializing Random Objects");
917 
918  // Random interface objects
919  for (const auto & it : _random_data_objects)
920  it.second->updateSeeds(EXEC_INITIAL);
921  }
922 
923  if (!_app.isRecovering())
924  {
926 
927  {
928  TIME_SECTION("ICiniitalSetup", 5, "Setting Up Initial Conditions");
929 
930  for (THREAD_ID tid = 0; tid < n_threads; tid++)
931  _ics.initialSetup(tid);
932 
934  }
935 
936  projectSolution();
937  }
938 
939  // Materials
941  {
942  TIME_SECTION("materialInitialSetup", 3, "Setting Up Materials");
943 
944  for (THREAD_ID tid = 0; tid < n_threads; tid++)
945  {
946  // Sort the Material objects, these will be actually computed by MOOSE in reinit methods.
947  _materials.sort(tid);
949 
950  // Call initialSetup on all material objects
952 
953  // Discrete materials may insert additional dependencies on materials during the initial
954  // setup. Therefore we resolve the dependencies once more, now with the additional
955  // dependencies due to discrete materials.
957  {
958  _materials.sort(tid);
960  }
961  }
962 
963  {
964  TIME_SECTION("computingInitialStatefulProps", 3, "Computing Initial Material Values");
965 
967 
971  }
972  }
973 
974  // setRestartInPlace() is set because the property maps have now been setup and we can
975  // dataLoad() them directly in place
976  // setRecovering() is set because from now on we require a one-to-one mapping of
977  // stateful properties because we shouldn't be declaring any more
979  {
980  props->setRestartInPlace();
981  props->setRecovering();
982  }
983 
984  for (THREAD_ID tid = 0; tid < n_threads; tid++)
985  {
988  _markers.sort(tid);
989  _markers.initialSetup(tid);
990  }
991 
992 #ifdef LIBMESH_ENABLE_AMR
993 
994  if (!_app.isRecovering())
995  {
996  unsigned int n = adaptivity().getInitialSteps();
997  if (n && !_app.isUltimateMaster() && _app.isRestarting())
998  mooseError("Cannot perform initial adaptivity during restart on sub-apps of a MultiApp!");
999 
1000  initialAdaptMesh();
1001  }
1002 
1003 #endif // LIBMESH_ENABLE_AMR
1004 
1005  if (!_app.isRecovering() && !_app.isRestarting())
1006  {
1007  // During initial setup the solution is copied to the older solution states (old, older, etc)
1009  }
1010 
1011  if (!_app.isRecovering())
1012  {
1013  if (haveXFEM())
1014  updateMeshXFEM();
1015  }
1016 
1017  // Call initialSetup on the nonlinear system
1018  for (auto & nl : _nl)
1019  nl->initialSetup();
1020 
1021  // Auxilary variable initialSetup calls
1022  _aux->initialSetup();
1023 
1024  if (_displaced_problem)
1025  // initialSetup for displaced systems
1026  _displaced_problem->initialSetup();
1027 
1028  for (auto & nl : _nl)
1029  nl->setSolution(*(nl->system().current_local_solution.get()));
1030 
1031  // Update the nearest node searches (has to be called after the problem is all set up)
1032  // We do this here because this sets up the Element's DoFs to ghost
1034 
1036  if (_displaced_mesh)
1038 
1039  // We need to move the mesh in order to build a map between mortar secondary and primary
1040  // interfaces. This map will then be used by the AgumentSparsityOnInterface ghosting functor to
1041  // know which dofs we need ghosted when we call EquationSystems::reinit
1043  _displaced_problem->updateMesh();
1044 
1045  // Possibly reinit one more time to get ghosting correct
1047 
1048  if (_displaced_mesh)
1049  _displaced_problem->updateMesh();
1050 
1051  updateGeomSearch(); // Call all of the rest of the geometric searches
1052 
1053  for (auto & nl : _nl)
1054  {
1055  auto ti = nl->getTimeIntegrator();
1056 
1057  if (ti)
1058  {
1059  TIME_SECTION("timeIntegratorInitialSetup", 5, "Initializing Time Integrator");
1060  ti->initialSetup();
1061  }
1062  }
1063 
1064  // HUGE NOTE: MultiApp initialSetup() MUST... I repeat MUST be _after_ main-app restartable data
1065  // has been restored
1066 
1067  // Call initialSetup on the MultiApps
1068  if (_multi_apps.hasObjects())
1069  {
1070  TIME_SECTION("initialSetupMultiApps", 2, "Initializing MultiApps", false);
1072  }
1073 
1074  // Call initialSetup on the transfers
1075  {
1076  TIME_SECTION("initialSetupTransfers", 2, "Initializing Transfers");
1077 
1079 
1080  // Call initialSetup on the MultiAppTransfers to be executed on TO_MULTIAPP
1081  const auto & to_multi_app_objects = _to_multi_app_transfers.getActiveObjects();
1082  for (const auto & transfer : to_multi_app_objects)
1083  {
1084  transfer->setCurrentDirection(Transfer::DIRECTION::TO_MULTIAPP);
1085  transfer->initialSetup();
1086  }
1087 
1088  // Call initialSetup on the MultiAppTransfers to be executed on FROM_MULTIAPP
1089  const auto & from_multi_app_objects = _from_multi_app_transfers.getActiveObjects();
1090  for (const auto & transfer : from_multi_app_objects)
1091  {
1092  transfer->setCurrentDirection(Transfer::DIRECTION::FROM_MULTIAPP);
1093  transfer->initialSetup();
1094  }
1095 
1096  // Call initialSetup on the MultiAppTransfers to be executed on BETWEEN_MULTIAPP
1097  const auto & between_multi_app_objects = _between_multi_app_transfers.getActiveObjects();
1098  for (const auto & transfer : between_multi_app_objects)
1099  {
1100  transfer->setCurrentDirection(Transfer::DIRECTION::BETWEEN_MULTIAPP);
1101  transfer->initialSetup();
1102  }
1103  }
1104 
1106  {
1107  TIME_SECTION("BoundaryRestrictedNodeIntegrityCheck", 5);
1108 
1109  // check that variables are defined along boundaries of boundary restricted nodal objects
1110  ConstBndNodeRange & bnd_nodes = *mesh().getBoundaryNodeRange();
1111  BoundaryNodeIntegrityCheckThread bnict(*this, uo_query);
1112  Threads::parallel_reduce(bnd_nodes, bnict);
1113 
1114  // Nodal bcs aren't threaded
1115  const auto & node_to_elem_map = _mesh.nodeToActiveSemilocalElemMap();
1116  for (const auto & bnode : bnd_nodes)
1117  {
1118  const auto boundary_id = bnode->_bnd_id;
1119  const Node * const node = bnode->_node;
1120 
1121  if (node->processor_id() != this->processor_id())
1122  continue;
1123 
1124  // Only check vertices. Variables may not be defined on non-vertex nodes (think first order
1125  // Lagrange on a second order mesh) and user-code can often handle that
1126  const Elem * const an_elem =
1127  _mesh.getMesh().elem_ptr(libmesh_map_find(node_to_elem_map, node->id()).front());
1128  if (!an_elem->is_vertex(an_elem->get_node_index(node)))
1129  continue;
1130 
1131  const auto & bnd_name = _mesh.getBoundaryName(boundary_id);
1132 
1133  for (auto & nl : _nl)
1134  {
1135  const auto & nodal_bcs = nl->getNodalBCWarehouse();
1136  if (!nodal_bcs.hasBoundaryObjects(boundary_id, 0))
1137  continue;
1138 
1139  const auto & bnd_objects = nodal_bcs.getBoundaryObjects(boundary_id, 0);
1140  for (const auto & bnd_object : bnd_objects)
1141  // Skip if this object uses geometric search because coupled variables may be defined on
1142  // paired boundaries instead of the boundary this node is on
1143  if (!bnd_object->requiresGeometricSearch() &&
1144  bnd_object->checkVariableBoundaryIntegrity())
1145  {
1146  std::set<MooseVariableFieldBase *> vars_to_omit = {
1147  &static_cast<MooseVariableFieldBase &>(
1148  const_cast<MooseVariableBase &>(bnd_object->variable()))};
1149 
1151  *bnd_object, bnd_object->checkAllVariables(*node, vars_to_omit), bnd_name);
1152  }
1153  }
1154  }
1155  }
1156 
1158  {
1159  TIME_SECTION("BoundaryRestrictedElemIntegrityCheck", 5);
1160 
1161  // check that variables are defined along boundaries of boundary restricted elemental objects
1162  ConstBndElemRange & bnd_elems = *mesh().getBoundaryElementRange();
1163  BoundaryElemIntegrityCheckThread beict(*this, uo_query);
1164  Threads::parallel_reduce(bnd_elems, beict);
1165  }
1166 
1167  if (!_app.isRecovering())
1168  {
1170 
1172  if (!converged)
1173  mooseError("failed to converge initial MultiApp");
1174 
1175  // We'll backup the Multiapp here
1177 
1178  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1179  reinitScalars(tid);
1180 
1182 
1183  // The FEProblemBase::execute method doesn't call all the systems on EXEC_INITIAL, but it does
1184  // set/unset the current flag. Therefore, this resets the current flag to EXEC_INITIAL so that
1185  // subsequent calls (e.g., executeControls) have the proper flag.
1187  }
1188 
1189  // Here we will initialize the stateful properties once more since they may have been updated
1190  // during initialSetup by calls to computeProperties.
1191  //
1192  // It's really bad that we don't allow this during restart. It means that we can't add new
1193  // stateful materials
1194  // during restart. This is only happening because this _has_ to be below initial userobject
1195  // execution.
1196  // Otherwise this could be done up above... _before_ restoring restartable data... which would
1197  // allow you to have
1198  // this happen during restart. I honestly have no idea why this has to happen after initial user
1199  // object computation.
1200  // THAT is something we should fix... so I've opened this ticket: #5804
1201  if (!_app.isRecovering() && !_app.isRestarting() &&
1204  {
1205  TIME_SECTION("computeMaterials", 2, "Computing Initial Material Properties");
1206 
1208  }
1209 
1210  // Control Logic
1212 
1213  // Scalar variables need to reinited for the initial conditions to be available for output
1214  for (unsigned int tid = 0; tid < n_threads; tid++)
1215  reinitScalars(tid);
1216 
1217  if (_displaced_mesh)
1218  _displaced_problem->syncSolutions();
1219 
1220  // Writes all calls to _console from initialSetup() methods
1222 
1224  {
1226  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
1227  for (auto & assembly : _assembly[tid])
1229  }
1230 
1231  {
1232  TIME_SECTION("lineSearchInitialSetup", 5, "Initializing Line Search");
1233 
1234  if (_line_search)
1235  _line_search->initialSetup();
1236  }
1237 
1238  // Perform Reporter get/declare check
1240 
1241  // We do this late to allow objects to get late restartable data
1244 
1246 }
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;.
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
Definition: SubProblem.h:1017
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1040
void reinitBecauseOfGhostingOrNewGeomObjects(bool mortar_changed=false)
Call when it is possible that the needs for ghosted elements has changed.
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:823
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
virtual bool converged(const unsigned int nl_sys_num)
Eventually we want to convert this virtual over to taking a nonlinear system number argument...
Definition: SubProblem.h:101
bool hasObjects(THREAD_ID tid=0) const
Convenience functions for determining if objects exist.
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:1008
bool hasInitialBackup() const
Definition: MooseApp.h:999
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:992
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > ConstBndElemRange
Definition: MooseMesh.h:2027
std::vector< T * > & queryInto(std::vector< T *> &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
Definition: TheWarehouse.h:311
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
const std::string & getBoundaryName(BoundaryID boundary_id)
Return the name of the boundary given the id.
Definition: MooseMesh.C:1566
std::filesystem::path restartFolderBase(const std::filesystem::path &folder_base) const
The file suffix for restartable data.
Definition: MooseApp.C:2411
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:295
void setCurrentExecuteOnFlag(const ExecFlagType &)
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
ExodusII_IO * getExReaderForRestart() const
Get the Exodus reader to restart variables from an Exodus mesh file.
Definition: MooseApp.h:447
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:1173
ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1077
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:1023
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
void projectSolution()
auto max(const L &left, const R &right)
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:437
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
virtual void copySolutionsBackwards()
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
std::vector< VariablePhiGradient > _grad_phi_zero
void initialSetup(THREAD_ID tid)
Initial setup.
virtual void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
ReporterData _reporter_data
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators
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.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
TheWarehouse & theWarehouse() const
void boundaryIntegrityCheckError(const MooseObject &object, const std::set< MooseVariableFieldBase *> &variables, const BoundaryName &boundary_name)
Compose boundary restricted error message for the provided object, variables, and boundary_name if th...
void checkNonlocalCoupling()
void groupUserObjects(TheWarehouse &w, AuxiliarySystem &aux, const ExecFlagEnum &execute_flags, const std::vector< T *> &objs, const std::set< std::string > &ic_deps)
MortarData _mortar_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
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:1275
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.
void initElementStatefulProps(const ConstElemRange &elem_range, const bool threaded)
Initialize stateful properties for elements in a specific elem_range This is needed when elements/bou...
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:2966
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:2209
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:293
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
virtual void initialSetup(THREAD_ID tid=0) const
Convenience methods for calling object setup methods that handle the extra neighbor and face objects...
void sort(THREAD_ID tid=0)
void restore(const std::filesystem::path &folder_base, const bool for_restart)
Restore an application from file.
Definition: MooseApp.C:1240
std::vector< VariablePhiValue > _phi_zero
InitialConditionWarehouse _ics
MaterialWarehouse _discrete_materials
virtual void initialSetup()
Definition: SubProblem.C:1162
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:753
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:97
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.
void initNonlocalCoupling()
Create pair of variables requiring nonlocal jacobian contributions.
Definition: Assembly.C:2643
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:290
bool hasDisplacedObjects() const
Returns whether any of the AutomaticMortarGeneration objects are running on a displaced mesh...
Definition: MortarData.h:99
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
virtual MooseMesh & mesh() override
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
void mooseConsole()
Send current output buffer to Console output objects.
std::set< std::string > getDependObjects() const
Get a list of dependent UserObjects for this exec type.
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseObjectWarehouse< Function > _functions
functions
bool _has_initialized_stateful
Whether nor not stateful materials have been initialized.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
MaterialPropertyStorage & _neighbor_material_props
std::unique_ptr< Backup > finalizeRestore()
Finalizes (closes) the restoration process done in restore().
Definition: MooseApp.C:1282
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1105
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.
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > ConstBndNodeRange
Some useful StoredRange typedefs.
Definition: MooseMesh.h:2026
void check() const
Perform integrity check for get/declare calls.
Definition: ReporterData.C:137
const bool _boundary_restricted_elem_integrity_check
whether to perform checking of boundary restricted elemental object variable dependencies, e.g.
processor_id_type processor_id() const
Assembly & assembly(const THREAD_ID tid, const unsigned int nl_sys_num) override
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:1167
Restartable::ManagedValue< RestartableEquationSystems > _req
The EquationSystems object, wrapped for restart.
std::string getRestartRecoverFileBase() const
The file_base for the recovery file.
Definition: MooseApp.h:498
MooseObjectWarehouse< Marker > _markers
virtual void initialAdaptMesh()
MaterialWarehouse _all_materials
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1091
auto index_range(const T &sizable)
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1772
MooseMesh * _displaced_mesh
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h:198
MaterialWarehouse _materials
uint8_t dof_id_type
std::shared_ptr< LineSearch > _line_search
unsigned int getMaxQps() const
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28

◆ initNullSpaceVectors()

void FEProblemBase::initNullSpaceVectors ( const InputParameters parameters,
std::vector< std::shared_ptr< NonlinearSystemBase >> &  nl 
)
virtual

Definition at line 585 of file FEProblemBase.C.

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

587 {
588  TIME_SECTION("initNullSpaceVectors", 5, "Initializing Null Space Vectors");
589 
590  unsigned int dimNullSpace = parameters.get<unsigned int>("null_space_dimension");
591  unsigned int dimTransposeNullSpace =
592  parameters.get<unsigned int>("transpose_null_space_dimension");
593  unsigned int dimNearNullSpace = parameters.get<unsigned int>("near_null_space_dimension");
594  for (unsigned int i = 0; i < dimNullSpace; ++i)
595  {
596  std::ostringstream oss;
597  oss << "_" << i;
598  // do not project, since this will be recomputed, but make it ghosted, since the near nullspace
599  // builder might march over all nodes
600  for (auto & nl : nls)
601  nl->addVector("NullSpace" + oss.str(), false, GHOSTED);
602  }
603  _subspace_dim["NullSpace"] = dimNullSpace;
604  for (unsigned int i = 0; i < dimTransposeNullSpace; ++i)
605  {
606  std::ostringstream oss;
607  oss << "_" << i;
608  // do not project, since this will be recomputed, but make it ghosted, since the near nullspace
609  // builder might march over all nodes
610  for (auto & nl : nls)
611  nl->addVector("TransposeNullSpace" + oss.str(), false, GHOSTED);
612  }
613  _subspace_dim["TransposeNullSpace"] = dimTransposeNullSpace;
614  for (unsigned int i = 0; i < dimNearNullSpace; ++i)
615  {
616  std::ostringstream oss;
617  oss << "_" << i;
618  // do not project, since this will be recomputed, but make it ghosted, since the near-nullspace
619  // builder might march over all semilocal nodes
620  for (auto & nl : nls)
621  nl->addVector("NearNullSpace" + oss.str(), false, GHOSTED);
622  }
623  _subspace_dim["NearNullSpace"] = dimNearNullSpace;
624 }
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.
GHOSTED
const InputParameters & parameters() const
Get the parameters of the object.
std::map< std::string, unsigned int > _subspace_dim
Dimension of the subspace spanned by the vectors with a given prefix.

◆ initPetscOutputAndSomeSolverSettings()

void FEProblemBase::initPetscOutputAndSomeSolverSettings ( )
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 6083 of file FEProblemBase.C.

Referenced by possiblyRebuildGeomSearchPatches(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), LStableDirk4::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), and solve().

6084 {
6087 }
void petscSetDefaults(FEProblemBase &problem)
Sets the default options for PETSc.
Definition: PetscSupport.C:500
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
void solveSetup()
Calls the timestepSetup function for each of the output objects.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1772

◆ initXFEM()

void FEProblemBase::initXFEM ( std::shared_ptr< XFEMInterface xfem)

Create XFEM controller object.

Definition at line 7240 of file FEProblemBase.C.

7241 {
7242  _xfem = xfem;
7243  _xfem->setMesh(&_mesh);
7244  if (_displaced_mesh)
7245  _xfem->setDisplacedMesh(_displaced_mesh);
7246 
7247  auto fill_data = [](auto & storage)
7248  {
7249  std::vector<MaterialData *> data(libMesh::n_threads());
7250  for (const auto tid : make_range(libMesh::n_threads()))
7251  data[tid] = &storage.getMaterialData(tid);
7252  return data;
7253  };
7254  _xfem->setMaterialData(fill_data(_material_props));
7255  _xfem->setBoundaryMaterialData(fill_data(_bnd_material_props));
7256 
7257  unsigned int n_threads = libMesh::n_threads();
7258  for (unsigned int i = 0; i < n_threads; ++i)
7259  for (const auto nl_sys_num : index_range(_assembly[i]))
7260  {
7261  _assembly[i][nl_sys_num]->setXFEM(_xfem);
7262  if (_displaced_problem)
7263  _displaced_problem->assembly(i, nl_sys_num).setXFEM(_xfem);
7264  }
7265 }
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()
MooseMesh & _mesh
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
IntRange< T > make_range(T beg, T end)
std::shared_ptr< DisplacedProblem > _displaced_problem
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.
MaterialPropertyStorage & _material_props
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh

◆ isMatPropRequested()

bool SubProblem::isMatPropRequested ( const std::string &  prop_name) const
virtualinherited

Find out if a material property has been requested by any object.

Definition at line 688 of file SubProblem.C.

689 {
690  return _material_property_requested.find(prop_name) != _material_property_requested.end();
691 }
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty* ...
Definition: SubProblem.h:989

◆ isParamSetByUser()

bool MooseBaseParameterInterface::isParamSetByUser ( const std::string &  nm) const
inlineinherited

Test if the supplied parameter is set by a user, as opposed to not set or set to default.

Parameters
nmThe name of the parameter to test

Definition at line 118 of file MooseBaseParameterInterface.h.

Referenced by SetupDebugAction::act(), SetAdaptivityOptionsAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), PhysicsBase::checkSecondParamSetOnlyIfFirstOneTrue(), LibtorchNeuralNetControl::conditionalParameterError(), MooseBaseParameterInterface::getRenamedParam(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PiecewiseTabularBase::PiecewiseTabularBase(), MooseMesh::prepare(), and SolutionUserObject::readXda().

118 { return _pars.isParamSetByUser(nm); }
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ isParamValid()

bool MooseBaseParameterInterface::isParamValid ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 112 of file MooseBaseParameterInterface.h.

Referenced by CopyNodalVarsAction::act(), SetupMeshAction::act(), SetupDebugAction::act(), ComposeTimeStepperAction::act(), CreateDisplacedProblemAction::act(), SetAdaptivityOptionsAction::act(), CommonOutputAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), DiffusionFV::addFVBCs(), DiffusionFV::addFVKernels(), DiffusionCG::addNonlinearVariables(), AdvectiveFluxAux::AdvectiveFluxAux(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromJSON(), GeneratedMesh::buildMesh(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), PhysicsBase::checkParamsBothSetOrNotSet(), PhysicsBase::checkVectorParamsSameLength(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CombinerGenerator::CombinerGenerator(), CSVReaderVectorPostprocessor::CSVReaderVectorPostprocessor(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), ConstantReporter::declareConstantReporterValues(), DGKernelBase::DGKernelBase(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), Eigenvalue::Eigenvalue(), ElementExtremeFunctorValueTempl< is_ad >::ElementExtremeFunctorValueTempl(), ElementExtremeValue::ElementExtremeValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), PIDTransientControl::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), Exodus::Exodus(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), FEProblemBase(), FEProblemSolve::FEProblemSolve(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FileOutput::FileOutput(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FunctionDT::FunctionDT(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FVInterfaceKernel::FVInterfaceKernel(), FVMassMatrix::FVMassMatrix(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), AddMetaDataGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), BlockDeletionGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), SideSetsBetweenSubdomainsGenerator::generate(), MeshExtruderGenerator::generate(), XYDelaunayGenerator::generate(), ParsedGenerateSideset::generate(), SubdomainBoundingBoxGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBaseParameterInterface::getRenamedParam(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), Terminator::handleMessage(), HFEMDirichletBC::HFEMDirichletBC(), EigenExecutionerBase::init(), IterationAdaptiveDT::init(), Eigenvalue::init(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppVariableValueSampleTransfer::initialSetup(), PiecewiseTabularBase::initialSetup(), SolutionScalarAux::initialSetup(), SolutionAux::initialSetup(), Console::initialSetup(), MooseParsedVectorFunction::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedFunction::initialSetup(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MassMatrix::MassMatrix(), MatCoupledForce::MatCoupledForce(), MatDiffusionBase< Real >::MatDiffusionBase(), MooseMesh::MooseMesh(), MoosePreconditioner::MoosePreconditioner(), 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(), NodalExtremeValue::NodalExtremeValue(), EigenExecutionerBase::normalizeSolution(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedGenerateSideset::ParsedGenerateSideset(), PetscOutput::PetscOutput(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PicardSolve::PicardSolve(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularBase::PiecewiseTabularBase(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), MooseMesh::prepare(), MultiApp::readCommandLineArguments(), SolutionUserObject::readExodusII(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), MooseMesh::setCoordSystem(), FileOutput::setFileBase(), FileOutput::setFileBaseInternal(), Split::setup(), SetupMeshAction::setupMesh(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideExtremeValue::SideExtremeValue(), SolutionUserObject::SolutionUserObject(), Terminator::Terminator(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), MultiAppDofCopyTransfer::transfer(), TransformGenerator::TransformGenerator(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

112 { return _pars.isParamValid(name); }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ isSNESMFReuseBaseSetbyUser()

bool FEProblemBase::isSNESMFReuseBaseSetbyUser ( )
inline

Return a flag to indicate if _snesmf_reuse_base is set by users.

Definition at line 1860 of file FEProblemBase.h.

bool _snesmf_reuse_base_set_by_user
If or not _snesmf_reuse_base is set by user.

◆ 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 Transient::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 8310 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::jacobianSetup().

8311 {
8313  // We need to setup all the nonlinear systems other than our current one which actually called
8314  // this method (so we have to make sure we don't go in a circle)
8315  for (const auto i : make_range(numNonlinearSystems()))
8316  if (i != currentNlSysNum())
8317  _nl[i]->jacobianSetup();
8318  // We don't setup the aux sys because that's been done elsewhere
8319  if (_displaced_problem)
8320  _displaced_problem->jacobianSetup();
8321 }
virtual std::size_t numNonlinearSystems() const override
virtual void jacobianSetup()
Definition: SubProblem.C:1154
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 4235 of file FEProblemBase.C.

Referenced by computeUserObjectsInternal().

4236 {
4237  std::vector<UserObject *> objs;
4238  query.queryInto(objs);
4239  if (!isgen)
4240  {
4241  // join all threaded user objects (i.e. not regular general user objects) to the primary
4242  // thread
4243  for (auto obj : objs)
4244  if (obj->primaryThreadCopy())
4245  obj->primaryThreadCopy()->threadJoin(*obj);
4246  }
4247 
4248  query.condition<AttribThread>(0).queryInto(objs);
4249 
4250  // finalize objects and retrieve/store any postprocessor values
4251  for (auto obj : objs)
4252  {
4253  if (isgen && dynamic_cast<ThreadedGeneralUserObject *>(obj))
4254  continue;
4255  if (isgen)
4256  {
4257  // general user objects are not run in their own threaded loop object - so run them here
4258  if (shouldPrintExecution(0))
4259  _console << "[DBG] Initializing, executing & finalizing general UO '" << obj->name()
4260  << "' on " << _current_execute_on_flag.name() << std::endl;
4261  obj->initialize();
4262  obj->execute();
4263  }
4264 
4265  obj->finalize();
4266 
4267  // These have to be stored piecemeal (with every call to this function) because general
4268  // postprocessors (which run last after other userobjects have been completed) might depend on
4269  // them being stored. This wouldn't be a problem if all userobjects satisfied the dependency
4270  // resolver interface and could be sorted appropriately with the general userobjects, but they
4271  // don't.
4272  auto pp = dynamic_cast<const Postprocessor *>(obj);
4273  if (pp)
4274  {
4275  _reporter_data.finalize(obj->name());
4276  setPostprocessorValueByName(obj->name(), pp->getValue());
4277  }
4278 
4279  auto vpp = dynamic_cast<VectorPostprocessor *>(obj);
4280  if (vpp)
4281  _reporter_data.finalize(obj->name());
4282 
4283  // Update Reporter data
4284  auto reporter = dynamic_cast<Reporter *>(obj);
4285  if (reporter)
4286  _reporter_data.finalize(obj->name());
4287  }
4288 }
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:23
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.

◆ lineSearch()

void FEProblemBase::lineSearch ( )
virtual

execute MOOSE line search

Definition at line 2353 of file FEProblemBase.C.

Referenced by ComputeLineSearchObjectWrapper::linesearch().

2354 {
2355  _line_search->lineSearch();
2356 }
std::shared_ptr< LineSearch > _line_search

◆ logAdd()

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

Output information about the object just added to the problem.

Definition at line 3728 of file FEProblemBase.C.

Referenced by addAuxArrayVariable(), addAuxKernel(), addAuxScalarKernel(), addAuxScalarVariable(), addAuxVariable(), addBoundaryCondition(), addConstraint(), addDamper(), addDGKernel(), addDiracKernel(), addFunction(), addFunctorMaterial(), addIndicator(), addInitialCondition(), addInterfaceKernel(), addKernel(), addMarker(), addMaterialHelper(), addMultiApp(), addNodalKernel(), addObject(), addOutput(), addPredictor(), addScalarKernel(), addTimeIntegrator(), addTransfer(), addUserObject(), and addVariable().

3731 {
3732  if (_verbose_setup)
3733  _console << "[DBG] Adding " << system << " '" << name << "' of type " << type << std::endl;
3734 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
bool _verbose_setup
Whether or not to be verbose during setup.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

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

Referenced by MaterialBase::getGenericZeroMaterialPropertyByName(), and MaterialPropertyInterface::markMatPropRequested().

683 {
684  _material_property_requested.insert(prop_name);
685 }
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty* ...
Definition: SubProblem.h:989

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

Referenced by SystemBase::activeMatrixTag(), SystemBase::addMatrix(), SystemBase::associateMatrixToTag(), Coupleable::coupledMatrixTagValue(), Coupleable::coupledMatrixTagValues(), SystemBase::deactiveMatrixTag(), SystemBase::disassociateDefaultMatrixTags(), SystemBase::disassociateMatrixFromTag(), SystemBase::getMatrix(), SubProblem::getMatrixTagID(), SystemBase::matrixTagActive(), DisplacedProblem::matrixTagExists(), SystemBase::removeMatrix(), and TaggingInterface::useMatrixTag().

295 {
296  auto tag_name_upper = MooseUtils::toUpper(tag_name);
297 
298  return _matrix_tag_name_to_tag_id.find(tag_name_upper) != _matrix_tag_name_to_tag_id.end();
299 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:966
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1037

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

303 {
304  return _matrix_tag_id_to_tag_name.find(tag_id) != _matrix_tag_id_to_tag_name.end();
305 }
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:969

◆ matrixTagName()

TagName SubProblem::matrixTagName ( TagID  tag)
virtualinherited

Retrieve the name associated with a TagID.

Reimplemented in DisplacedProblem.

Definition at line 323 of file SubProblem.C.

Referenced by SystemBase::addMatrix(), DisplacedProblem::matrixTagName(), and SystemBase::removeMatrix().

324 {
325  return _matrix_tag_id_to_tag_name[tag];
326 }
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:969

◆ mesh() [1/3]

virtual MooseMesh& FEProblemBase::mesh ( )
inlineoverridevirtual

Implements SubProblem.

Definition at line 154 of file FEProblemBase.h.

Referenced by Adaptivity::adaptMesh(), addAnyRedistributers(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), PhysicsBasedPreconditioner::apply(), MultiAppGeneralFieldNearestLocationTransfer::buildKDTrees(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), NonlinearSystemBase::computeJacobianInternal(), 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(), FunctorPositions::initialize(), FunctorTimes::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), MultiAppDofCopyTransfer::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), ImageFunction::initialSetup(), Exodus::initialSetup(), initialSetup(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), IntersectionPointsAlongLine::IntersectionPointsAlongLine(), Moose::Mortar::loopOverMortarSegments(), ReporterPointMarker::markerSetup(), mesh(), Nemesis::meshChanged(), MultiAppGeometricInterpolationTransfer::MultiAppGeometricInterpolationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), ComputeNodalUserObjectsThread::onNode(), BoundaryNodeIntegrityCheckThread::onNode(), ComputeInitialConditionThread::operator()(), BoundaryElemIntegrityCheckThread::operator()(), Output::Output(), ConsoleUtils::outputMeshInformation(), Exodus::outputSetup(), PiecewiseConstantFromCSV::PiecewiseConstantFromCSV(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), MeshInfo::possiblyAddSidesetInfo(), MeshInfo::possiblyAddSubdomainInfo(), MaterialPropertyDebugOutput::printMaterialMap(), TopResidualDebugOutput::printTopResiduals(), FixedPointSolve::solve(), TransientMultiApp::solveStep(), Moose::PetscSupport::storePetscOptions(), MultiAppDofCopyTransfer::transfer(), and Checkpoint::updateCheckpointFiles().

154 { return _mesh; }
MooseMesh & _mesh

◆ mesh() [2/3]

virtual const MooseMesh& FEProblemBase::mesh ( ) const
inlineoverridevirtual

Implements SubProblem.

Definition at line 155 of file FEProblemBase.h.

155 { return _mesh; }
MooseMesh & _mesh

◆ mesh() [3/3]

const MooseMesh & FEProblemBase::mesh ( bool  use_displaced) const
overridevirtual

Implements SubProblem.

Definition at line 509 of file FEProblemBase.C.

510 {
511  if (use_displaced && !_displaced_problem)
512  mooseWarning("Displaced mesh was requested but the displaced problem does not exist. "
513  "Regular mesh will be returned");
514  return ((use_displaced && _displaced_problem) ? _displaced_problem->mesh() : mesh());
515 }
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
virtual MooseMesh & mesh() override
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ meshChanged()

void FEProblemBase::meshChanged ( )
overridevirtual

Update data after a mesh change.

Reimplemented from SubProblem.

Definition at line 7290 of file FEProblemBase.C.

Referenced by ElementSubdomainModifier::finalize(), ActivateElementsUserObjectBase::finalize(), Exodus::handleExodusIOMeshRenumbering(), initialAdaptMesh(), Adaptivity::uniformRefineWithProjection(), and updateMeshXFEM().

7291 {
7292  TIME_SECTION("meshChanged", 3, "Handling Mesh Changes");
7293 
7294  this->meshChangedHelper();
7295 }
void meshChangedHelper(bool intermediate_change=false)
Helper method to update some or all data after a mesh change.

◆ meshChangedHelper()

void FEProblemBase::meshChangedHelper ( bool  intermediate_change = false)
protected

Helper method to update some or all data after a mesh change.

Iff intermediate_change is true, only perform updates as necessary to prepare for another mesh change immediately-subsequent.

Definition at line 7298 of file FEProblemBase.C.

Referenced by adaptMesh(), meshChanged(), timestepSetup(), and uniformRefine().

7299 {
7300  TIME_SECTION("meshChangedHelper", 5);
7301 
7304  _mesh.cacheChangedLists(); // Currently only used with adaptivity and stateful material
7305  // properties
7306 
7307  // Clear these out because they corresponded to the old mesh
7308  _ghosted_elems.clear();
7310 
7311  // The mesh changed. We notify the MooseMesh first, because
7312  // callbacks (e.g. for sparsity calculations) triggered by the
7313  // EquationSystems reinit may require up-to-date MooseMesh caches.
7314  _mesh.meshChanged();
7315 
7316  // If we're just going to alter the mesh again, all we need to
7317  // handle here is AMR and projections, not full system reinit
7318  if (intermediate_change)
7319  es().reinit_solutions();
7320  else
7321  es().reinit();
7322 
7323  // Updating MooseMesh first breaks other adaptivity code, unless we
7324  // then *again* update the MooseMesh caches. E.g. the definition of
7325  // "active" and "local" may have been *changed* by refinement and
7326  // repartitioning done in EquationSystems::reinit().
7327  _mesh.meshChanged();
7328 
7329  // If we have finite volume variables, we will need to recompute additional elemental/face
7330  // quantities
7333 
7334  // Let the meshChangedInterface notify the mesh changed event before we update the active
7335  // semilocal nodes, because the set of ghosted elements may potentially be updated during a mesh
7336  // changed event.
7337  for (const auto & mci : _notify_when_mesh_changes)
7338  mci->meshChanged();
7339 
7340  // Since the Mesh changed, update the PointLocator object used by DiracKernels.
7342 
7343  // Need to redo ghosting
7345 
7346  if (_displaced_problem)
7347  {
7348  _displaced_problem->meshChanged();
7350  }
7351 
7353 
7356 
7357  // Just like we reinitialized our geometric search objects, we also need to reinitialize our
7358  // mortar meshes. Note that this needs to happen after DisplacedProblem::meshChanged because the
7359  // mortar mesh discretization will depend necessarily on the displaced mesh being re-displaced
7360  updateMortarMesh();
7361 
7362  reinitBecauseOfGhostingOrNewGeomObjects(/*mortar_changed=*/true);
7363 
7364  // We need to create new storage for newly active elements, and copy
7365  // stateful properties from the old elements.
7368  {
7369  if (havePRefinement())
7371 
7372  // Prolong properties onto newly refined elements' children
7373  {
7375  /* refine = */ true, *this, _material_props, _bnd_material_props, _assembly);
7376  const auto & range = *_mesh.refinedElementRange();
7377  Threads::parallel_reduce(range, pmp);
7378 
7379  // Concurrent erasure from the shared hash map is not safe while we are reading from it in
7380  // ProjectMaterialProperties, so we handle erasure here. Moreover, erasure based on key is
7381  // not thread safe in and of itself because it is a read-write operation. Note that we do not
7382  // do the erasure for p-refinement because the coarse level element is the same as our active
7383  // refined level element
7384  if (!doingPRefinement())
7385  for (const auto & elem : range)
7386  {
7390  }
7391  }
7392 
7393  // Restrict properties onto newly coarsened elements
7394  {
7396  /* refine = */ false, *this, _material_props, _bnd_material_props, _assembly);
7397  const auto & range = *_mesh.coarsenedElementRange();
7398  Threads::parallel_reduce(range, pmp);
7399  // Note that we do not do the erasure for p-refinement because the coarse level element is the
7400  // same as our active refined level element
7401  if (!doingPRefinement())
7402  for (const auto & elem : range)
7403  {
7404  auto && coarsened_children = _mesh.coarsenedElementChildren(elem);
7405  for (auto && child : coarsened_children)
7406  {
7410  }
7411  }
7412  }
7413  }
7414 
7417 
7418  _has_jacobian = false; // we have to recompute jacobian when mesh changed
7419 
7420  // Since the mesh has changed, we need to make sure that we update any of our
7421  // MOOSE-system specific data. libmesh system data has already been updated
7422  for (auto & nl : _nl)
7423  nl->update(/*update_libmesh_system=*/false);
7424  _aux->update(/*update_libmesh_system=*/false);
7425 }
void setVariableAllDoFMap(const std::vector< const MooseVariableFEBase *> &moose_vars)
bool isFiniteVolumeInfoDirty() const
Definition: MooseMesh.h:1282
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 ...
std::unique_ptr< ConstElemRange > _evaluable_local_elem_range
void cacheChangedLists()
Cache information about what elements were refined and coarsened in the previous step.
Definition: MooseMesh.C:715
ConstElemPointerRange * refinedElementRange() const
Return a range that is suitable for threaded execution over elements that were just refined...
Definition: MooseMesh.C:733
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1023
virtual EquationSystems & es() override
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:940
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
Objects to be notified when the mesh changes.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
void reinit()
Completely redo all geometric search objects.
bool doingPRefinement() const
Definition: SubProblem.C:1312
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:745
void updateActiveSemiLocalNodeRange(std::set< dof_id_type > &ghosted_elems)
Clears the "semi-local" node list and rebuilds it.
Definition: MooseMesh.C:753
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:739
DiracKernelInfo _dirac_kernel_info
nonlocal coupling matrix;
Definition: SubProblem.h:976
MaterialPropertyStorage & _material_props
void updatePointLocator(const MooseMesh &mesh)
Called during FEProblemBase::meshChanged() to update the PointLocator object used by the DiracKernels...
std::unique_ptr< ConstElemRange > _nl_evaluable_local_elem_range
MooseMesh * _displaced_mesh
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
Definition: MooseMesh.C:684
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2111
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:3814

◆ mooseDeprecated()

template<typename... Args>
void MooseBaseErrorInterface::mooseDeprecated ( Args &&...  args) const
inlineinherited

Definition at line 78 of file MooseBaseErrorInterface.h.

Referenced by addAuxArrayVariable(), addAuxScalarVariable(), addAuxVariable(), advanceMultiApps(), MultiApp::appProblem(), Executioner::augmentedPicardConvergenceCheck(), MooseMesh::buildSideList(), ChangeOverTimestepPostprocessor::ChangeOverTimestepPostprocessor(), computeResidual(), AddVariableAction::determineType(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), MooseMesh::elem(), UserForcingFunction::f(), FaceFaceConstraint::FaceFaceConstraint(), FunctionDT::FunctionDT(), RandomICBase::generateRandom(), MooseMesh::getBoundariesToElems(), Control::getExecuteOptions(), getNonlinearSystem(), getUserObjects(), hasPostprocessor(), MatDiffusionBase< Real >::MatDiffusionBase(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalScalarKernel::NodalScalarKernel(), MooseMesh::node(), FixedPointSolve::numPicardIts(), RelationshipManager::operator>=(), PercentChangePostprocessor::PercentChangePostprocessor(), Executioner::picardSolve(), ReferenceResidualProblem::ReferenceResidualProblem(), MooseMesh::setBoundaryToNormalMap(), Exodus::setOutputDimension(), and UserForcingFunction::UserForcingFunction().

79  {
80  moose::internal::mooseDeprecatedStream(_console, false, true, std::forward<Args>(args)...);
81  }
void mooseDeprecatedStream(S &oss, const bool expired, const bool print_title, Args &&... args)
Definition: MooseError.h:236
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ mooseError()

template<typename... Args>
void MooseBaseErrorInterface::mooseError ( Args &&...  args) const
inlineinherited

Emits an error prefixed with object name and type.

Definition at line 38 of file MooseBaseErrorInterface.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), PetscExternalPartitioner::_do_partition(), MultiAppGeneralFieldTransfer::acceptPointInOriginMesh(), SetupMeshCompleteAction::act(), CheckFVBCAction::act(), CheckIntegrityAction::act(), AddMeshGeneratorAction::act(), AutoCheckpointAction::act(), CreateExecutionerAction::act(), AddFVICAction::act(), AddICAction::act(), InitProblemAction::act(), AddVectorPostprocessorAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupMeshAction::act(), SplitMeshAction::act(), AdaptivityAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), AddTimeStepperAction::act(), DeprecatedBlockAction::act(), CreateDisplacedProblemAction::act(), MaterialDerivativeTestAction::act(), SetAdaptivityOptionsAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), MaterialOutputAction::act(), adaptMesh(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), addConstraint(), DistributedRectilinearMeshGenerator::addElement(), addFunction(), SubProblem::addFunctor(), addFVInitialCondition(), ADDGKernel::ADDGKernel(), addInitialCondition(), FEProblem::addLineSearch(), addLineSearch(), MeshGenerator::addMeshSubgenerator(), addOutput(), SubProblem::addPiecewiseByBlockLambdaFunctor(), DiracKernelBase::addPoint(), DistributedRectilinearMeshGenerator::addPoint(), DiracKernelBase::addPointWithValidId(), addPostprocessor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MooseMesh::addQuadratureNode(), Action::addRelationshipManager(), addReporter(), AddVariableAction::addVariable(), addVectorPostprocessor(), SubProblem::addVectorTag(), ADInterfaceKernelTempl< T >::ADInterfaceKernelTempl(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), MooseVariableScalar::adUDot(), Output::advancedExecuteOn(), AdvectiveFluxAux::AdvectiveFluxAux(), MooseVariableBase::allDofIndices(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayConstantIC::ArrayConstantIC(), ArrayDGKernel::ArrayDGKernel(), ArrayDiffusion::ArrayDiffusion(), ArrayFunctionIC::ArrayFunctionIC(), ArrayParsedAux::ArrayParsedAux(), ArrayReaction::ArrayReaction(), ArrayTimeDerivative::ArrayTimeDerivative(), AddPeriodicBCAction::autoTranslationBoundaries(), AuxKernelTempl< Real >::AuxKernelTempl(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), MooseMesh::buildCoarseningMap(), MultiApp::buildComm(), DistributedRectilinearMeshGenerator::buildCube(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromJSON(), PiecewiseTabularBase::buildFromXY(), PiecewiseLinearBase::buildInterpolation(), MooseMesh::buildLowerDMesh(), TiledMesh::buildMesh(), GeneratedMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), MeshGeneratorMesh::buildMesh(), ImageMeshGenerator::buildMesh3D(), ImageMesh::buildMesh3D(), MooseMesh::buildRefinementMap(), MaterialBase::buildRequiredMaterials(), MooseMesh::buildSideList(), MooseMesh::buildTypedMesh(), MooseMesh::cacheFaceInfoVariableOwnership(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), UserObjectInterface::castUserObject(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), SubProblem::checkBoundaryMatProps(), MooseMesh::checkCoordinateSystems(), checkDependMaterialsHelper(), checkDisplacementOrders(), checkDuplicatePostprocessorVariableNames(), MooseMesh::checkDuplicateSubdomainNames(), checkExceptionAndStopSolve(), MaterialBase::checkExecutionStage(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), checkICRestartError(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), Eigenvalue::checkIntegrity(), ExplicitTimeIntegrator::checkLinearConvergence(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), PostprocessorInterface::checkParam(), checkProblemIntegrity(), Sampler::checkReinitStatus(), MultiAppPostprocessorToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppScalarToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppPostprocessorTransfer::checkSiblingsTransferSupported(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), MultiAppCopyTransfer::checkSiblingsTransferSupported(), MultiAppTransfer::checkSiblingsTransferSupported(), MaterialBase::checkStatefulSanity(), checkUserObjects(), DomainUserObject::checkVariable(), MultiAppTransfer::checkVariable(), PhysicsBase::checkVectorParamsNoOverlap(), LibmeshPartitioner::clone(), MooseMesh::clone(), CombinerGenerator::CombinerGenerator(), ComparisonPostprocessor::comparisonIsTrue(), ElementSubdomainModifier::complementMovingBoundaryID(), ElementSubdomainModifier::complementMovingBoundaryName(), 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(), MortarScalarBase::computeOffDiagJacobianScalar(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), MaterialBase::computeProperties(), ScalarKernel::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), NodalEqualValueConstraint::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), ScalarKernel::computeQpResidual(), NodalEqualValueConstraint::computeQpResidual(), KernelValue::computeQpResidual(), InterfaceQpValueUserObject::computeRealValue(), ArrayKernel::computeResidual(), ArrayIntegratedBC::computeResidual(), FVFluxBC::computeResidual(), FVFluxKernel::computeResidual(), NodalConstraint::computeResidual(), FVFluxKernel::computeResidualAndJacobian(), ResidualObject::computeResidualAndJacobian(), computeResidualAndJacobian(), computeResidualInternal(), computeResidualL2Norm(), 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(), PenetrationAux::computeValue(), ConcentricCircleMesh::ConcentricCircleMesh(), ConditionalEnableControl::ConditionalEnableControl(), TimeStepper::constrainStep(), LibtorchNeuralNetControl::controlNeuralNet(), CoupledForceNodalKernel::CoupledForceNodalKernel(), MultiApp::createApp(), AddVariableAction::createInitialConditionAction(), Function::curl(), MooseVariableFV< Real >::curlPhi(), SidesetInfoVectorPostprocessor::dataHelper(), ReporterTransferInterface::declareClone(), MeshGenerator::declareMeshProperty(), ReporterTransferInterface::declareVectorClone(), FunctorRelationshipManager::delete_remote_elements(), MooseMesh::deleteRemoteElements(), BicubicSplineFunction::derivative(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), MooseMesh::detectPairedSidesets(), determineNonlinearSystem(), DGKernel::DGKernel(), MeshDiagnosticsGenerator::diagnosticsLog(), DistributedPositions::DistributedPositions(), Function::div(), FunctorBinnedValuesDivision::divisionIndex(), MooseVariableFV< Real >::divPhi(), FunctorRelationshipManager::dofmap_reinit(), EigenProblem::doFreeNonlinearPowerIterations(), duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementIntegerAux::ElementIntegerAux(), ElementQualityAux::ElementQualityAux(), ElementUOAux::ElementUOAux(), DistributedRectilinearMeshGenerator::elemId(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), MooseMesh::errorIfDistributedMesh(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppGeneralFieldTransfer::examineReceivedValueConflicts(), RestartableDataReporter::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), NodalValueSampler::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), ElementQualityChecker::execute(), MultiAppPostprocessorTransfer::execute(), PositionsFunctorValueSampler::execute(), PointValue::execute(), MultiAppVariableValueSampleTransfer::execute(), GreaterThanLessThanPostprocessor::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), FindValueOnLine::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppCopyTransfer::execute(), MultiAppGeometricInterpolationTransfer::execute(), InterfaceQpUserObjectBase::execute(), MultiAppUserObjectTransfer::execute(), LeastSquaresFit::execute(), VectorPostprocessorComparison::execute(), LeastSquaresFitHistory::execute(), TimeExtremeValue::execute(), Eigenvalue::execute(), DomainUserObject::execute(), execute(), executeControls(), MultiAppVectorPostprocessorTransfer::executeFromMultiapp(), MultiAppVectorPostprocessorTransfer::executeToMultiapp(), Exodus::Exodus(), ExplicitSSPRungeKutta::ExplicitSSPRungeKutta(), MultiAppGeneralFieldTransfer::extractOutgoingPoints(), FileOutput::FileOutput(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), ElementQualityChecker::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), NearestPointAverage::finalize(), NearestPointIntegralVariablePostprocessor::finalize(), Transfer::find_sys(), BreakMeshByBlockGeneratorBase::findFreeBoundaryId(), FunctionDT::FunctionDT(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), MaterialOutputAction::functorMaterialOutputHelper(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVMassMatrix::FVMassMatrix(), FVMatAdvection::FVMatAdvection(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), GapValueAux::GapValueAux(), WorkBalance::gather(), LowerDBlockFromSidesetGenerator::generate(), BlockToMeshConverterGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), MoveNodeGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), SideSetsFromNormalsGenerator::generate(), SmoothMeshGenerator::generate(), SubdomainPerElementGenerator::generate(), TiledMeshGenerator::generate(), CoarsenBlockGenerator::generate(), CutMeshByPlaneGenerator::generate(), BreakMeshByBlockGenerator::generate(), GeneratedMeshGenerator::generate(), MeshDiagnosticsGenerator::generate(), MeshRepairGenerator::generate(), FlipSidesetGenerator::generate(), SideSetsFromPointsGenerator::generate(), MeshExtruderGenerator::generate(), MeshCollectionGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), StackGenerator::generate(), StitchedMeshGenerator::generate(), CombinerGenerator::generate(), AllSideSetsByNormalsGenerator::generate(), SpiralAnnularMeshGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), PatternedMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), MeshGenerator::generateData(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), MeshGenerator::generateInternal(), CircularBoundaryCorrectionGenerator::generateRadialCorrectionFactor(), RandomICBase::generateRandom(), GenericConstantMaterialTempl< is_ad >::GenericConstantMaterialTempl(), GenericConstantVectorMaterialTempl< is_ad >::GenericConstantVectorMaterialTempl(), GenericFunctionMaterialTempl< is_ad >::GenericFunctionMaterialTempl(), GenericFunctionVectorMaterialTempl< is_ad >::GenericFunctionVectorMaterialTempl(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), DisplacedProblem::getActualFieldVariable(), getActualFieldVariable(), DisplacedProblem::getArrayVariable(), getArrayVariable(), MooseMesh::getAxisymmetricRadialCoord(), MooseMesh::getBlockConnectedBlocks(), VariableOldValueBounds::getBound(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), MooseMesh::getCoarseningMap(), MooseVariableBase::getContinuity(), Control::getControllableParameterByName(), MooseMesh::getCoordSystem(), PhysicsBase::getCoupledPhysics(), PropertyReadFile::getData(), 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(), MultiApp::getExecutioner(), MultiAppTransfer::getFromMultiApp(), MultiAppTransfer::getFromMultiAppInfo(), getFunction(), SubProblem::getFunctor(), MooseMesh::getGeneralAxisymmetricCoordAxis(), DistributedRectilinearMeshGenerator::getGhostNeighbors(), BatchMaterial< Tuple, Output, Input >::getIndex(), DistributedRectilinearMeshGenerator::getIndices(), SolutionUserObject::getLocalVarIndex(), Material::getMaterialByName(), getMaterialData(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), getMaxQps(), getMeshDivision(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), AnnularMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MultiAppTransfer::getMultiApp(), DistributedRectilinearMeshGenerator::getNeighbors(), Times::getNextTime(), MooseMesh::getNodeBlockIds(), PropertyReadFile::getNodeData(), MooseMesh::getNodeList(), EigenProblem::getNonlinearEigenSystem(), getNonlinearSystem(), MooseMesh::getPairedBoundaryMapping(), ImageMeshGenerator::GetPixelInfo(), ImageMesh::GetPixelInfo(), PlaneIDMeshGenerator::getPlaneID(), Positions::getPosition(), Positions::getPositions(), getPositionsObject(), Positions::getPositionsVector2D(), Positions::getPositionsVector3D(), Positions::getPositionsVector4D(), PostprocessorInterface::getPostprocessorValueByNameInternal(), Times::getPreviousTime(), InterfaceQpUserObjectBase::getQpValue(), MooseMesh::getRefinementMap(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), getSampler(), JSONFileReader::getScalar(), DisplacedProblem::getScalarVariable(), getScalarVariable(), InterfaceQpUserObjectBase::getSideAverageValue(), DisplacedProblem::getStandardVariable(), getStandardVariable(), MooseMesh::getSubdomainBoundaryIds(), DisplacedProblem::getSystem(), getSystem(), Times::getTimeAtIndex(), getTimeFromStateArg(), Transient::getTimeIntegratorName(), Times::getTimes(), MultiAppTransfer::getToMultiApp(), MultiAppTransfer::getToMultiAppInfo(), MooseMesh::getUniqueCoordSystem(), getUserObject(), getUserObjectBase(), UserObjectInterface::getUserObjectBaseByName(), UserObjectInterface::getUserObjectName(), NumRelationshipManagers::getValue(), VectorPostprocessorComponent::getValue(), Residual::getValue(), SideAverageValue::getValue(), LineValueSampler::getValue(), FindValueOnLine::getValueAtPoint(), SubProblem::getVariableHelper(), JSONFileReader::getVector(), VectorPostprocessorInterface::getVectorPostprocessorName(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), DisplacedProblem::getVectorVariable(), getVectorVariable(), GhostingAux::GhostingAux(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), Function::gradient(), handleException(), Terminator::handleMessage(), MooseVariableBase::hasDoFsOnNodes(), PostprocessorInterface::hasPostprocessor(), PostprocessorInterface::hasPostprocessorByName(), ReporterInterface::hasReporterValue(), ReporterInterface::hasReporterValueByName(), VectorPostprocessorInterface::hasVectorPostprocessor(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), CrankNicolson::init(), CSVTimeSequenceStepper::init(), ExplicitTimeIntegrator::init(), EigenExecutionerBase::init(), IterationAdaptiveDT::init(), Transient::init(), AddAuxVariableAction::init(), Eigenvalue::init(), AddVariableAction::init(), MooseMesh::init(), Sampler::init(), init(), MultiApp::init(), initialAdaptMesh(), NestedDivision::initialize(), TransformedPositions::initialize(), DistributedPositions::initialize(), ReporterPositions::initialize(), FunctorPositions::initialize(), ReporterTimes::initialize(), ElementGroupCentroidPositions::initialize(), FunctorTimes::initialize(), MultiAppCloneReporterTransfer::initialSetup(), SolutionIC::initialSetup(), IntegralPreservingFunctionIC::initialSetup(), MultiAppConservativeTransfer::initialSetup(), PiecewiseLinearBase::initialSetup(), ReferenceResidualProblem::initialSetup(), FullSolveMultiApp::initialSetup(), PiecewiseLinear::initialSetup(), CoarsenedPiecewiseLinear::initialSetup(), SolutionScalarAux::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), SolutionAux::initialSetup(), NodalVariableValue::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), CSV::initialSetup(), MooseParsedFunction::initialSetup(), SolutionUserObject::initialSetup(), initialSetup(), SubProblem::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Function::integral(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), InterfaceTimeKernel::InterfaceTimeKernel(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), Sampler::isAdaptiveSamplingCompleted(), MooseMesh::isBoundaryFullyExternalToSubdomains(), MooseVariableBase::isNodal(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< Real >::LineMaterialSamplerBase(), LineSearch::lineSearch(), LineValueSampler::LineValueSampler(), MultiAppGeneralFieldTransfer::locatePointReceivers(), LowerBoundNodalKernel::LowerBoundNodalKernel(), MooseVariableFV< Real >::lowerDError(), PNGOutput::makePNG(), ReporterPointMarker::markerSetup(), MassMatrix::MassMatrix(), Material::Material(), MaterialOutputAction::materialOutputHelper(), MaterialRealTensorValueAux::MaterialRealTensorValueAux(), MaterialRealVectorValueAuxTempl< is_ad >::MaterialRealVectorValueAuxTempl(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), FunctorRelationshipManager::mesh_reinit(), SubProblem::meshChanged(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshRepairGenerator::MeshRepairGenerator(), SetupMeshAction::modifyParamsForUseSplit(), MeshMetaDataInterface::mooseErrorInternal(), MooseMesh::MooseMesh(), MooseVariableBase::MooseVariableBase(), MooseVariableConstMonomial::MooseVariableConstMonomial(), MoveNodeGenerator::MoveNodeGenerator(), ElementSubdomainModifier::movingBoundaryID(), ElementSubdomainModifier::movingBoundaryName(), MultiApp::MultiApp(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), needsPreviousNewtonIteration(), NewmarkBeta::NewmarkBeta(), NodalConstraint::NodalConstraint(), MooseVariableFV< Real >::nodalDofIndex(), MooseVariableFV< Real >::nodalDofIndexNeighbor(), MooseVariableFV< Real >::nodalMatrixTagValue(), NodalPatchRecoveryBase::nodalPatchRecovery(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalScalarKernel::NodalScalarKernel(), MooseVariableFV< Real >::nodalValueArray(), MooseVariableFV< Real >::nodalValueOldArray(), MooseVariableFV< Real >::nodalValueOlderArray(), NodalVariableValue::NodalVariableValue(), MooseVariableFV< Real >::nodalVectorTagValue(), DistributedRectilinearMeshGenerator::nodeId(), PhysicsBase::nonlinearVariableExists(), MooseVariableFV< Real >::numberOfDofsNeighbor(), NumDOFs::NumDOFs(), NumFailedTimeSteps::NumFailedTimeSteps(), DistributedRectilinearMeshGenerator::numNeighbors(), NumNonlinearIterations::NumNonlinearIterations(), NumVars::NumVars(), Output::onInterval(), FunctorRelationshipManager::operator()(), RelationshipManager::operator==(), XDA::output(), SolutionHistory::output(), Exodus::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), Exodus::outputSetup(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), DistributedRectilinearMeshGenerator::paritionSquarely(), PiecewiseBilinear::parse(), ParsedAux::ParsedAux(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), MultiAppConservativeTransfer::performAdjustment(), ExplicitTimeIntegrator::performExplicitSolve(), PetscExternalPartitioner::PetscExternalPartitioner(), MooseVariableFV< Real >::phiLowerSize(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Executioner::picardSolve(), PIDTransientControl::PIDTransientControl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMulticonstant::PiecewiseMulticonstant(), PiecewiseMultiInterpolation::PiecewiseMultiInterpolation(), PiecewiseTabularBase::PiecewiseTabularBase(), CutMeshByPlaneGenerator::pointPairPlaneInterception(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessorByName(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), ImplicitMidpoint::postResidual(), ExplicitTVDRK2::postResidual(), LStableDirk4::postResidual(), AStableDirk4::postResidual(), ExplicitRK2::postResidual(), EigenProblem::postScaleEigenVector(), VariableCondensationPreconditioner::preallocateCondensedJacobian(), ADKernelValueTempl< T >::precomputeQpJacobian(), Predictor::Predictor(), Transient::preExecute(), MooseMesh::prepare(), MooseMesh::prepared(), FixedPointSolve::printFixedPointConvergenceReason(), PseudoTimestep::PseudoTimestep(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObject::readExodusII(), SolutionUserObject::readXda(), CoarsenBlockGenerator::recursiveCoarsen(), FunctorRelationshipManager::redistribute(), ReferenceResidualProblem::ReferenceResidualProblem(), Sampler::reinit(), EqualValueEmbeddedConstraint::reinitConstraint(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), PiecewiseMultiInterpolation::sample(), ScalarComponentIC::ScalarComponentIC(), MortarScalarBase::scalarVariable(), DistributedRectilinearMeshGenerator::scaleNodalPositions(), BicubicSplineFunction::secondDerivative(), MooseVariableFV< Real >::secondPhi(), MooseVariableFV< Real >::secondPhiFace(), MooseVariableFV< Real >::secondPhiFaceNeighbor(), MooseVariableFV< Real >::secondPhiNeighbor(), FunctorRelationshipManager::set_mesh(), MooseVariableBase::setActiveTags(), DistributedRectilinearMeshGenerator::setBoundaryNames(), MooseMesh::setCoordSystem(), setCoupling(), PiecewiseBase::setData(), FileOutput::setFileBaseInternal(), MooseMesh::setGeneralAxisymmetricCoordAxes(), FEProblemSolve::setInnerSolve(), MeshGenerator::setMeshProperty(), FVPointValueConstraint::setMyElem(), setNonlocalCouplingMatrix(), Sampler::setNumberOfCols(), Sampler::setNumberOfRandomSeeds(), Sampler::setNumberOfRows(), Exodus::setOutputDimensionInExodusWriter(), MultiAppGeneralFieldTransfer::setSolutionVectorValues(), Split::setup(), TransientMultiApp::setupApp(), SetupMeshAction::setupMesh(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), TimePeriodBase::setupTimes(), SideAdvectiveFluxIntegralTempl< is_ad >::SideAdvectiveFluxIntegralTempl(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), SolutionUserObject::SolutionUserObject(), FullSolveMultiApp::solveStep(), SpatialAverageBase::SpatialAverageBase(), UserObject::spatialPoints(), NearestPointIntegralVariablePostprocessor::spatialValue(), NearestPointAverage::spatialValue(), MeshDivisionFunctorReductionVectorPostprocessor::spatialValue(), UserObject::spatialValue(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), StitchedMesh::StitchedMesh(), MultiAppGeometricInterpolationTransfer::subdomainIDsNode(), Constraint::subdomainSetup(), GeneralUserObject::subdomainSetup(), NodalUserObject::subdomainSetup(), MaterialBase::subdomainSetup(), swapBackMaterialsNeighbor(), Console::systemInfoFlags(), Terminator::Terminator(), CutMeshByPlaneGenerator::tet4ElemCutter(), ThreadedGeneralUserObject::threadJoin(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriodBase::TimePeriodBase(), VectorPostprocessorVisualizationAux::timestepSetup(), MultiAppDofCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), TransformedPositions::TransformedPositions(), trustUserCouplingMatrix(), MooseVariableScalar::uDot(), MooseVariableScalar::uDotDot(), MooseVariableScalar::uDotDotOld(), uDotDotOldRequested(), MooseVariableScalar::uDotOld(), uDotOldRequested(), Positions::unrollMultiDPositions(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), Checkpoint::updateCheckpointFiles(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObject::updateExodusBracketingTimeIndices(), updateMaxQps(), UpperBoundNodalKernel::UpperBoundNodalKernel(), NearestPointAverage::userObjectValue(), NearestPointIntegralVariablePostprocessor::userObjectValue(), BoundingBoxIC::value(), PiecewiseConstantFromCSV::value(), IntegralPreservingFunctionIC::value(), Axisymmetric2D3DSolutionFunction::value(), Function::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), 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(), VTKOutput::VTKOutput(), DOFMapOutput::writeStreamToFile(), and Console::writeStreamToFile().

39  {
40  std::ostringstream oss;
41  moose::internal::mooseStreamAll(oss, errorPrefix("error"), std::forward<Args>(args)...);
42  std::string msg = oss.str();
43  callMooseErrorRaw(msg, &_app);
44  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:91
void callMooseErrorRaw(std::string &msg, MooseApp *app)
MooseApp & _app
The MOOSE application this is associated with.
std::string errorPrefix(const std::string &error_type) const
A descriptive prefix for errors for this object:

◆ mooseErrorNonPrefixed()

template<typename... Args>
void MooseBaseErrorInterface::mooseErrorNonPrefixed ( Args &&...  args) const
inlineinherited

Emits an error without the prefixing included in mooseError().

Definition at line 50 of file MooseBaseErrorInterface.h.

51  {
52  std::ostringstream oss;
53  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
54  std::string msg = oss.str();
55  callMooseErrorRaw(msg, &_app);
56  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:91
void callMooseErrorRaw(std::string &msg, MooseApp *app)
MooseApp & _app
The MOOSE application this is associated with.

◆ mooseInfo()

template<typename... Args>
void MooseBaseErrorInterface::mooseInfo ( Args &&...  args) const
inlineinherited

◆ mooseWarning()

template<typename... Args>
void MooseBaseErrorInterface::mooseWarning ( Args &&...  args) const
inlineinherited

Emits a warning prefixed with object name and type.

Definition at line 62 of file MooseBaseErrorInterface.h.

Referenced by AddKernelAction::act(), SetupMeshAction::act(), MeshOnlyAction::act(), AddFunctionAction::act(), CommonOutputAction::act(), MaterialOutputAction::act(), DiracKernelBase::addPoint(), BoundaryMarker::BoundaryMarker(), BoundsBase::BoundsBase(), DistributedRectilinearMeshGenerator::buildCube(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), CartesianMeshGenerator::CartesianMeshGenerator(), CheckOutputAction::checkConsoleOutput(), MultiAppTransfer::checkMultiAppExecuteOn(), PhysicsBase::checkRequiredTasks(), OversampleOutput::cloneMesh(), GapValueAux::computeValue(), MultiApp::createApp(), MeshDiagnosticsGenerator::diagnosticsLog(), CartesianGridDivision::divisionIndex(), CylindricalGridDivision::divisionIndex(), SphericalGridDivision::divisionIndex(), Postprocessor::evaluateDotWarning(), MeshDivisionFunctorReductionVectorPostprocessor::execute(), ElementQualityChecker::finalize(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), SubdomainPerElementGenerator::generate(), ParsedGenerateSideset::generate(), MultiAppTransfer::getAppInfo(), FunctorBinnedValuesDivision::getBinIndex(), PointSamplerBase::getLocalElemContainingPoint(), getMaterial(), Positions::getNearestPositionIndex(), LineValueSampler::getValue(), Terminator::handleMessage(), CartesianGridDivision::initialize(), SphericalGridDivision::initialize(), ElementGroupCentroidPositions::initialize(), CylindricalGridDivision::initialize(), ReferenceResidualProblem::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), LeastSquaresFit::LeastSquaresFit(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), mesh(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), NewmarkBeta::NewmarkBeta(), NodalPatchRecovery::NodalPatchRecovery(), NonlocalIntegratedBC::NonlocalIntegratedBC(), NonlocalKernel::NonlocalKernel(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PiecewiseConstantFromCSV::PiecewiseConstantFromCSV(), Executioner::problem(), PropertyReadFile::readData(), TestSourceStepper::rejectStep(), MaterialBase::resetQpProperties(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), MooseMesh::setCoordSystem(), sizeZeroes(), TransientMultiApp::solveStep(), Tecplot::Tecplot(), TimeDerivativeAux::TimeDerivativeAux(), Checkpoint::updateCheckpointFiles(), PiecewiseConstantFromCSV::value(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

63  {
65  _console, errorPrefix("warning"), std::forward<Args>(args)...);
66  }
void mooseWarningStream(S &oss, Args &&... args)
Definition: MooseError.h:181
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::string errorPrefix(const std::string &error_type) const
A descriptive prefix for errors for this object:

◆ mooseWarningNonPrefixed()

template<typename... Args>
void MooseBaseErrorInterface::mooseWarningNonPrefixed ( Args &&...  args) const
inlineinherited

Emits a warning without the prefixing included in mooseWarning().

Definition at line 72 of file MooseBaseErrorInterface.h.

73  {
74  moose::internal::mooseWarningStream(_console, std::forward<Args>(args)...);
75  }
void mooseWarningStream(S &oss, Args &&... args)
Definition: MooseError.h:181
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ mortarData() [1/2]

const MortarData& FEProblemBase::mortarData ( ) const
inline

Returns the mortar data object.

Definition at line 1928 of file FEProblemBase.h.

1928 { return _mortar_data; }
MortarData _mortar_data

◆ mortarData() [2/2]

MortarData& FEProblemBase::mortarData ( )
inline

Definition at line 1929 of file FEProblemBase.h.

1929 { return _mortar_data; }
MortarData _mortar_data

◆ name()

virtual const std::string& MooseBase::name ( ) const
inlinevirtualinherited

Get the name of the class.

Returns
The name of the class

Reimplemented in MooseVariableBase.

Definition at line 56 of file MooseBase.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), CopyNodalVarsAction::act(), AddElementalFieldAction::act(), AdaptivityAction::act(), AddTimeStepperAction::act(), DeprecatedBlockAction::act(), DisplayGhostingAction::act(), AddVariableAction::act(), AddPeriodicBCAction::act(), MaterialOutputAction::act(), addAnyRedistributers(), Executioner::addAttributeReporter(), addAuxKernel(), addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), addBoundaryCondition(), addConstraint(), addDamper(), addDGKernel(), addDiracKernel(), addDistribution(), addFunction(), SubProblem::addFunctor(), addFunctorMaterial(), FunctorMaterial::addFunctorProperty(), FunctorMaterial::addFunctorPropertyByBlocks(), addFVBC(), addFVInitialCondition(), addFVInterfaceKernel(), addFVKernel(), ADDGKernel::ADDGKernel(), addIndicator(), addInitialCondition(), addInterfaceKernel(), addInterfaceMaterial(), addKernel(), addMarker(), addMaterial(), addMaterialHelper(), addMeshDivision(), MeshGenerator::addMeshSubgenerator(), addMultiApp(), addNodalKernel(), addObject(), SubProblem::addPiecewiseByBlockLambdaFunctor(), addPostprocessor(), InitialConditionBase::addPostprocessorDependencyHelper(), UserObject::addPostprocessorDependencyHelper(), addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), addReporter(), addSampler(), addScalarKernel(), addTimeIntegrator(), addTransfer(), addUserObject(), InitialConditionBase::addUserObjectDependencyHelper(), UserObject::addUserObjectDependencyHelper(), AuxKernelTempl< Real >::addUserObjectDependencyHelper(), DisplacedProblem::addVariable(), addVectorPostprocessor(), UserObject::addVectorPostprocessorDependencyHelper(), FVFluxKernel::adjustRMGhostLayers(), Output::advancedExecuteOn(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayDGKernel::ArrayDGKernel(), ArrayParsedAux::ArrayParsedAux(), AStableDirk4::AStableDirk4(), AuxKernelTempl< Real >::AuxKernelTempl(), Function::average(), MultiApp::backup(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), PiecewiseTabularBase::buildFromFile(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), checkDependMaterialsHelper(), checkICRestartError(), Material::checkMaterialProperty(), Damper::checkMinDamping(), Coupleable::checkWritableVar(), CompositeFunction::CompositeFunction(), MaterialBase::computeProperties(), computeUserObjectByName(), VectorPostprocessorVisualizationAux::computeValue(), MooseBaseParameterInterface::connectControllableParams(), BatchMaterial< Tuple, Output, Input >::construct(), MultiApp::createApp(), AddVariableAction::createInitialConditionAction(), MultiApp::createLocalApp(), MeshGeneratorSystem::createMeshGeneratorOrder(), MaterialBase::declareADProperty(), MeshGenerator::declareMeshesForSubByName(), MeshGenerator::declareNullMeshName(), MaterialBase::declareProperty(), DOFMapOutput::demangle(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DomainUserObject::DomainUserObject(), DumpObjectsProblem::dumpObjectHelper(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementValueSampler::ElementValueSampler(), MooseMesh::errorIfDistributedMesh(), MooseBaseErrorInterface::errorPrefix(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), RestartableDataReporter::execute(), PointValue::execute(), MultiAppNearestNodeTransfer::execute(), Exodus::Exodus(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), MultiApp::fillPositions(), PointSamplerBase::finalize(), FunctionDT::FunctionDT(), FunctionIC::functionName(), FVFunctionIC::functionName(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), MooseServer::gatherDocumentSymbols(), BoundaryDeletionGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), BreakMeshByBlockGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), GeneratedMeshGenerator::generate(), StitchedMeshGenerator::generate(), XYDelaunayGenerator::generate(), ParsedGenerateSideset::generate(), SideSetsAroundSubdomainGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), MeshGenerator::generateInternal(), InterfaceMaterial::getADMaterialProperty(), Material::getADMaterialProperty(), MultiAppTransfer::getAppInfo(), MultiApp::getBoundingBox(), MooseApp::getCheckpointDirectories(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), UserObject::getDependObjects(), DistributionInterface::getDistribution(), getDistribution(), DistributionInterface::getDistributionByName(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), MultiApp::getExecutioner(), getExecutor(), OutputWarehouse::getFileNumbers(), getFunction(), SubProblem::getFunctor(), NodalPatchRecovery::getGenericMaterialProperty(), InterfaceMaterial::getGenericMaterialProperty(), Material::getGenericMaterialProperty(), AuxKernelTempl< Real >::getGenericMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialPropertyByName(), Material::getGenericOptionalMaterialProperty(), MaterialBase::getGenericZeroMaterialProperty(), BatchMaterial< Tuple, Output, Input >::getIndex(), SolutionUserObject::getLocalVarIndex(), Marker::getMarkerValue(), Material::getMaterial(), getMaterial(), Material::getMaterialByName(), NodalPatchRecovery::getMaterialProperty(), InterfaceMaterial::getMaterialProperty(), Material::getMaterialProperty(), AuxKernelTempl< Real >::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), NodalPatchRecovery::getMaterialPropertyOld(), InterfaceMaterial::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), AuxKernelTempl< Real >::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOlder(), InterfaceMaterial::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), AuxKernelTempl< Real >::getMaterialPropertyOlder(), MeshGenerator::getMesh(), getMeshDivision(), MeshGenerator::getMeshesByName(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MultiAppTransfer::getMultiApp(), InterfaceMaterial::getNeighborADMaterialProperty(), InterfaceMaterial::getNeighborMaterialProperty(), InterfaceMaterial::getNeighborMaterialPropertyOld(), InterfaceMaterial::getNeighborMaterialPropertyOlder(), MooseServer::getObjectParameters(), Material::getOptionalADMaterialProperty(), Material::getOptionalMaterialProperty(), Material::getOptionalMaterialPropertyOld(), Material::getOptionalMaterialPropertyOlder(), getPositionsObject(), getPostprocessorValueByName(), ReporterData::getReporterInfo(), getSampler(), Transient::getTimeStepperName(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), getUserObject(), getUserObjectBase(), Terminator::handleMessage(), hasFunction(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), AdvancedOutput::hasOutputHelper(), hasPostprocessor(), hasPostprocessorValueByName(), hasUserObject(), IterationAdaptiveDT::init(), AdvancedOutput::init(), init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), NestedDivision::initialize(), TransformedPositions::initialize(), SolutionScalarAux::initialSetup(), MultiAppProjectionTransfer::initialSetup(), NodalVariableValue::initialSetup(), SolutionUserObject::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), Function::integral(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MeshGenerator::isChildMeshGenerator(), MeshGenerator::isNullMeshName(), MeshGenerator::isParentMeshGenerator(), LinearCombinationFunction::LinearCombinationFunction(), logAdd(), Marker::Marker(), MatDiffusionBase< Real >::MatDiffusionBase(), Material::Material(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshGenerator::meshPropertyPrefix(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalValueSampler::NodalValueSampler(), PhysicsBase::nonlinearVariableExists(), Registry::objData(), MooseBaseParameterInterface::objectErrorPrefix(), MeshGenerator::Comparator::operator()(), ProgressOutput::output(), DOFMapOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), ConsoleUtils::outputExecutionInformation(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), Nemesis::outputPostprocessors(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), TableOutput::outputReporter(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), ParsedAux::ParsedAux(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PointVariableSamplerBase::PointVariableSamplerBase(), PhysicsBase::prefix(), MultiApp::readCommandLineArguments(), Receiver::Receiver(), Executor::Result::record(), Registry::registerObjectsTo(), registerRandomInterface(), GlobalParamsAction::remove(), MaterialBase::resetQpProperties(), MultiApp::restore(), ScalarComponentIC::ScalarComponentIC(), MultiApp::setAppOutputFileBase(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), GlobalParamsAction::setDoubleIndexParam(), OutputWarehouse::setFileNumbers(), GlobalParamsAction::setParam(), setPostprocessorValueByName(), GlobalParamsAction::setScalarParam(), MooseMesh::setSubdomainName(), GlobalParamsAction::setTripleIndexParam(), Split::setup(), TransientMultiApp::setupApp(), GlobalParamsAction::setVectorParam(), FullSolveMultiApp::showStatusMessage(), SideSetExtruderGenerator::SideSetExtruderGenerator(), SideValueSampler::SideValueSampler(), TransientMultiApp::solveStep(), UserObject::spatialValue(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), SubProblem::storeSubdomainZeroMatProp(), MaterialBase::subdomainSetup(), TaggingInterface::TaggingInterface(), VectorPostprocessorVisualizationAux::timestepSetup(), MultiAppDofCopyTransfer::transfer(), TransientMultiApp::TransientMultiApp(), MooseServer::traverseParseTreeAndFillSymbols(), MooseBase::typeAndName(), MooseBaseParameterInterface::uniqueParameterName(), FVFluxBC::uOnGhost(), FVFluxBC::uOnUSub(), UserObject::UserObject(), UserObjectInterface::userObjectName(), MultiAppTransfer::variableIntegrityCheck(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), AdvancedOutput::wantOutput(), Coupleable::writableCoupledValue(), and Coupleable::writableVariable().

56 { return _name; }
const std::string & _name
The name of this class, reference to value stored in InputParameters.
Definition: MooseBase.h:75

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

Referenced by ComputeMaterialsObjectThread::onBoundary(), and ProjectMaterialProperties::onBoundary().

7937 {
7938  if (_bnd_mat_side_cache[tid].find(bnd_id) == _bnd_mat_side_cache[tid].end())
7939  {
7940  auto & bnd_mat_side_cache = _bnd_mat_side_cache[tid][bnd_id];
7941  bnd_mat_side_cache = false;
7942 
7943  if (_aux->needMaterialOnSide(bnd_id))
7944  {
7945  bnd_mat_side_cache = true;
7946  return true;
7947  }
7948  else
7949  for (auto & nl : _nl)
7950  if (nl->needBoundaryMaterialOnSide(bnd_id, tid))
7951  {
7952  bnd_mat_side_cache = true;
7953  return true;
7954  }
7955 
7956  if (theWarehouse()
7957  .query()
7958  .condition<AttribThread>(tid)
7959  .condition<AttribInterfaces>(Interfaces::SideUserObject)
7960  .condition<AttribBoundaries>(bnd_id)
7961  .count() > 0)
7962  {
7963  bnd_mat_side_cache = true;
7964  return true;
7965  }
7966  }
7967 
7968  return _bnd_mat_side_cache[tid][bnd_id];
7969 }
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 2152 of file FEProblemBase.h.

Referenced by DisplacedProblem::needFV().

2152 { _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 7972 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInterface().

7973 {
7974  if (_interface_mat_side_cache[tid].find(bnd_id) == _interface_mat_side_cache[tid].end())
7975  {
7976  auto & interface_mat_side_cache = _interface_mat_side_cache[tid][bnd_id];
7977  interface_mat_side_cache = false;
7978 
7979  for (auto & nl : _nl)
7980  if (nl->needInterfaceMaterialOnSide(bnd_id, tid))
7981  {
7982  interface_mat_side_cache = true;
7983  return true;
7984  }
7985 
7986  if (theWarehouse()
7987  .query()
7988  .condition<AttribThread>(tid)
7989  .condition<AttribInterfaces>(Interfaces::InterfaceUserObject)
7990  .condition<AttribBoundaries>(bnd_id)
7991  .count() > 0)
7992  {
7993  interface_mat_side_cache = true;
7994  return true;
7995  }
7996  else if (_interface_materials.hasActiveBoundaryObjects(bnd_id, tid))
7997  {
7998  interface_mat_side_cache = true;
7999  return true;
8000  }
8001  }
8002  return _interface_mat_side_cache[tid][bnd_id];
8003 }
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.

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

Referenced by Coupleable::coupledGradientPreviousNL(), Coupleable::coupledNodalValuePreviousNL(), Coupleable::coupledSecondPreviousNL(), Coupleable::coupledValuePreviousNL(), and NonlinearSystem::solve().

8042 {
8044  mooseError("Previous nonlinear solution is required but not added through "
8045  "Problem/previous_nl_solution_required=true");
8046 }
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:163
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:30

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

8036 {
8038 }
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:163
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:30

◆ needSubdomainMaterialOnSide()

bool FEProblemBase::needSubdomainMaterialOnSide ( SubdomainID  subdomain_id,
const THREAD_ID  tid 
)

Definition at line 8006 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::subdomainChanged(), and ProjectMaterialProperties::subdomainChanged().

8007 {
8008  if (_block_mat_side_cache[tid].find(subdomain_id) == _block_mat_side_cache[tid].end())
8009  {
8010  _block_mat_side_cache[tid][subdomain_id] = false;
8011 
8012  for (auto & nl : _nl)
8013  if (nl->needSubdomainMaterialOnSide(subdomain_id, tid))
8014  {
8015  _block_mat_side_cache[tid][subdomain_id] = true;
8016  return true;
8017  }
8018 
8019  if (theWarehouse()
8020  .query()
8021  .condition<AttribThread>(tid)
8022  .condition<AttribInterfaces>(Interfaces::InternalSideUserObject)
8023  .condition<AttribSubdomains>(subdomain_id)
8024  .count() > 0)
8025  {
8026  _block_mat_side_cache[tid][subdomain_id] = true;
8027  return true;
8028  }
8029  }
8030 
8031  return _block_mat_side_cache[tid][subdomain_id];
8032 }
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

◆ neighborSubdomainSetup()

void FEProblemBase::neighborSubdomainSetup ( SubdomainID  subdomain,
const THREAD_ID  tid 
)
virtual

Definition at line 2246 of file FEProblemBase.C.

Referenced by ThreadedFaceLoop< RangeType >::neighborSubdomainChanged().

2247 {
2248  _all_materials.neighborSubdomainSetup(subdomain, tid);
2249 }
virtual void neighborSubdomainSetup(THREAD_ID tid=0) const
MaterialWarehouse _all_materials

◆ newAssemblyArray()

void FEProblemBase::newAssemblyArray ( std::vector< std::shared_ptr< NonlinearSystemBase >> &  nl)
virtual

Definition at line 571 of file FEProblemBase.C.

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

572 {
573  unsigned int n_threads = libMesh::n_threads();
574 
575  _assembly.resize(n_threads);
576  for (const auto i : make_range(n_threads))
577  {
578  _assembly[i].resize(nls.size());
579  for (const auto j : index_range(nls))
580  _assembly[i][j] = std::make_unique<Assembly>(*nls[j], i);
581  }
582 }
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 FEProblemBase::nlConverged ( const unsigned int  nl_sys_num)
overridevirtual
Returns
whether the given nl_sys_num is converged

Reimplemented from SubProblem.

Reimplemented in EigenProblem.

Definition at line 5950 of file FEProblemBase.C.

5951 {
5952  if (_solve)
5953  return _nl[nl_sys_num]->converged();
5954  else
5955  return true;
5956 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const bool & _solve
Whether or not to actually solve the nonlinear system.

◆ nLinearIterations()

unsigned int FEProblemBase::nLinearIterations ( const unsigned int  nl_sys_num) const
overridevirtual

Reimplemented from SubProblem.

Definition at line 5965 of file FEProblemBase.C.

Referenced by PiecewiseLinearFromVectorPostprocessor::valueInternal().

5966 {
5967  return _nl[nl_sys_num]->nLinearIterations();
5968 }
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 5787 of file FEProblemBase.C.

Referenced by DisplacedProblem::nlSysNum().

5788 {
5789  std::istringstream ss(nl_sys_name);
5790  unsigned int nl_sys_num;
5791  if (!(ss >> nl_sys_num) || !ss.eof())
5792  nl_sys_num = libmesh_map_find(_nl_sys_name_to_num, nl_sys_name);
5793 
5794  return nl_sys_num;
5795 }
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 5959 of file FEProblemBase.C.

Referenced by PiecewiseLinearFromVectorPostprocessor::valueInternal().

5960 {
5961  return _nl[nl_sys_num]->nNonlinearIterations();
5962 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ nonlinearConvergenceSetup()

virtual void FEProblemBase::nonlinearConvergenceSetup ( )
inlinevirtual

Perform steps required before checking nonlinear convergence.

Reimplemented in ReferenceResidualProblem.

Definition at line 246 of file FEProblemBase.h.

Referenced by checkNonlinearConvergence().

246 {}

◆ nonlocalCouplingEntries()

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

Definition at line 5662 of file FEProblemBase.C.

Referenced by ComputeFullJacobianThread::computeOnBoundary(), and ComputeFullJacobianThread::computeOnElement().

5663 {
5664  return _assembly[tid][nl_sys]->nonlocalCouplingEntries();
5665 }
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ nonlocalCouplingMatrix()

const CouplingMatrix& SubProblem::nonlocalCouplingMatrix ( const unsigned  i) const
inlineinherited
Returns
the nonlocal coupling matrix for the i'th nonlinear system

Definition at line 634 of file SubProblem.h.

634 { return _nonlocal_cm[i]; }
std::vector< CouplingMatrix > _nonlocal_cm
Definition: SubProblem.h:974

◆ notifyWhenMeshChanges()

void FEProblemBase::notifyWhenMeshChanges ( MeshChangedInterface mci)

Register an object that derives from MeshChangedInterface to be notified when the mesh changes.

Definition at line 7428 of file FEProblemBase.C.

Referenced by MeshChangedInterface::MeshChangedInterface().

7429 {
7430  _notify_when_mesh_changes.push_back(mci);
7431 }
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
Objects to be notified when the mesh changes.

◆ numGridSteps()

void FEProblemBase::numGridSteps ( unsigned int  num_grid_steps)
inline

Set the number of steps in a grid sequences.

Definition at line 1950 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

1950 { _num_grid_steps = num_grid_steps; }
unsigned int _num_grid_steps
Number of steps in a grid sequence.

◆ numMatrixTags()

virtual unsigned int SubProblem::numMatrixTags ( ) const
inlinevirtualinherited

◆ numNonlinearSystems()

virtual std::size_t FEProblemBase::numNonlinearSystems ( ) 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 172 of file SubProblem.C.

Referenced by NonlinearSystemBase::computeNodalBCs(), NonlinearSystemBase::computeResidualInternal(), ComputeResidualThread::determineObjectWarehouses(), MooseVariableDataBase< OutputType >::MooseVariableDataBase(), MooseVariableScalar::MooseVariableScalar(), DisplacedProblem::numVectorTags(), ComputeNodalKernelBcsThread::pre(), and ComputeNodalKernelsThread::pre().

173 {
174  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
175 
176  return getVectorTags(type).size();
177 }
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:218
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:149

◆ objectErrorPrefix()

std::string MooseBaseParameterInterface::objectErrorPrefix ( const std::string &  error_type) const
inherited

A descriptive prefix for errors for an object.

Definition at line 58 of file MooseBaseParameterInterface.C.

Referenced by MooseBaseParameterInterface::paramErrorMsg().

59 {
60  std::stringstream oss;
61  oss << "The following " << error_type << " occurred in the class \"" << _moose_base->name()
62  << "\", of type \"" << _moose_base->type() << "\".\n\n";
63  return oss.str();
64 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const MooseBase *const _moose_base
The MooseBase object that inherits this class.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50

◆ objectExecuteHelper()

template<typename T >
void FEProblemBase::objectExecuteHelper ( const std::vector< T *> &  objects)
static

Definition at line 2683 of file FEProblemBase.h.

2684 {
2685  for (T * obj_ptr : objects)
2686  obj_ptr->execute();
2687 }

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

2650 {
2651  if (exec_flag == EXEC_INITIAL)
2652  {
2653  for (T * obj_ptr : objects)
2654  obj_ptr->initialSetup();
2655  }
2656 
2657  else if (exec_flag == EXEC_TIMESTEP_BEGIN)
2658  {
2659  for (const auto obj_ptr : objects)
2660  obj_ptr->timestepSetup();
2661  }
2662  else if (exec_flag == EXEC_SUBDOMAIN)
2663  {
2664  for (const auto obj_ptr : objects)
2665  obj_ptr->subdomainSetup();
2666  }
2667 
2668  else if (exec_flag == EXEC_NONLINEAR)
2669  {
2670  for (const auto obj_ptr : objects)
2671  obj_ptr->jacobianSetup();
2672  }
2673 
2674  else if (exec_flag == EXEC_LINEAR)
2675  {
2676  for (const auto obj_ptr : objects)
2677  obj_ptr->residualSetup();
2678  }
2679 }
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:33
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:30
const ExecFlagType EXEC_SUBDOMAIN
Definition: Moose.C:42
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28

◆ onTimestepBegin()

void FEProblemBase::onTimestepBegin ( )
overridevirtual

Implements SubProblem.

Definition at line 6090 of file FEProblemBase.C.

Referenced by Transient::takeStep().

6091 {
6092  TIME_SECTION("onTimestepBegin", 2);
6093 
6094  for (auto & nl : _nl)
6095  nl->onTimestepBegin();
6096 }
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 6054 of file FEProblemBase.C.

Referenced by Transient::endStep(), Transient::execute(), Steady::execute(), Eigenvalue::execute(), InversePowerMethod::init(), NonlinearEigen::init(), EigenExecutionerBase::postExecute(), Transient::preExecute(), FixedPointSolve::solve(), TransientMultiApp::solveStep(), and FixedPointSolve::solveStep().

6055 {
6056  TIME_SECTION("outputStep", 1, "Outputting");
6057 
6059 
6060  for (auto & nl : _nl)
6061  nl->update();
6062  _aux->update();
6063  if (_displaced_problem)
6064  _displaced_problem->syncSolutions();
6066 
6068 }
void outputStep(ExecFlagType type)
Calls the outputStep method for each output object.
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
void setCurrentExecuteOnFlag(const ExecFlagType &)
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
std::shared_ptr< DisplacedProblem > _displaced_problem
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1772

◆ paramError()

template<typename... Args>
void MooseBaseParameterInterface::paramError ( const std::string &  param,
Args...  args 
) const
inherited

Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseError - only printing a message using the given args.

Definition at line 243 of file MooseBaseParameterInterface.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), SetupDebugAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), ADDGKernel::ADDGKernel(), DiffusionCG::addNonlinearVariables(), ReporterPointSource::addPoints(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADKernelTempl< T >::ADKernelTempl(), ADNodalKernel::ADNodalKernel(), ADPenaltyPeriodicSegmentalConstraint::ADPenaltyPeriodicSegmentalConstraint(), ADPeriodicSegmentalConstraint::ADPeriodicSegmentalConstraint(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), AdvectiveFluxAux::AdvectiveFluxAux(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), ArrayBodyForce::ArrayBodyForce(), ArrayDGKernel::ArrayDGKernel(), ArrayDGLowerDKernel::ArrayDGLowerDKernel(), ArrayDirichletBC::ArrayDirichletBC(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayIntegratedBC::ArrayIntegratedBC(), ArrayKernel::ArrayKernel(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), ArrayParsedAux::ArrayParsedAux(), ArrayPenaltyDirichletBC::ArrayPenaltyDirichletBC(), ArrayVacuumBC::ArrayVacuumBC(), AuxKernelTempl< Real >::AuxKernelTempl(), BlockDeletionGenerator::BlockDeletionGenerator(), BlockWeightedPartitioner::BlockWeightedPartitioner(), BoundsBase::BoundsBase(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BuildArrayVariableAux::BuildArrayVariableAux(), PiecewiseTabularBase::buildFromFile(), CartesianGridDivision::CartesianGridDivision(), UserObjectInterface::castUserObject(), checkComponent(), MeshGenerator::checkGetMesh(), PostprocessorInterface::checkParam(), PhysicsBase::checkParamsBothSetOrNotSet(), Checkpoint::Checkpoint(), PhysicsBase::checkSecondParamSetOnlyIfFirstOneTrue(), Coupleable::checkVar(), MultiAppTransfer::checkVariable(), PhysicsBase::checkVectorParamsSameLength(), CircularBoundaryCorrectionGenerator::CircularBoundaryCorrectionGenerator(), CircularBoundaryCorrectionGenerator::circularCenterCalculator(), MultiAppGeneralFieldTransfer::closestToPosition(), CoarsenBlockGenerator::CoarsenBlockGenerator(), CombinerGenerator::CombinerGenerator(), CompositionDT::CompositionDT(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), LibtorchNeuralNetControl::conditionalParameterError(), ConstantVectorPostprocessor::ConstantVectorPostprocessor(), ContainsPointAux::ContainsPointAux(), CopyValueAux::CopyValueAux(), Coupleable::Coupleable(), CoupledForceTempl< is_ad >::CoupledForceTempl(), CoupledValueFunctionMaterialTempl< is_ad >::CoupledValueFunctionMaterialTempl(), MultiApp::createApp(), MeshGeneratorSystem::createMeshGenerator(), CylindricalGridDivision::CylindricalGridDivision(), ConstantReporter::declareConstantReporterValues(), AccumulateReporter::declareLateValues(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DGLowerDKernel::DGLowerDKernel(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), ElementExtremeFunctorValueTempl< is_ad >::ElementExtremeFunctorValueTempl(), ElementExtremeValue::ElementExtremeValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementLengthAux::ElementLengthAux(), ElementLpNormAux::ElementLpNormAux(), ElementValueSampler::ElementValueSampler(), ElementVectorL2Error::ElementVectorL2Error(), ReporterPointSource::errorCheck(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), ExtraElementIDAux::ExtraElementIDAux(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), FEProblemSolve::FEProblemSolve(), FillBetweenCurvesGenerator::FillBetweenCurvesGenerator(), FillBetweenSidesetsGenerator::FillBetweenSidesetsGenerator(), ReporterPointSource::fillPoint(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), InternalSideIndicator::finalize(), FixedPointSolve::FixedPointSolve(), ForcingFunctionAux::ForcingFunctionAux(), FunctionArrayAux::FunctionArrayAux(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FunctorADConverterTempl< T >::FunctorADConverterTempl(), FunctorAux::FunctorAux(), FunctorBinnedValuesDivision::FunctorBinnedValuesDivision(), FunctorElementalGradientAuxTempl< is_ad >::FunctorElementalGradientAuxTempl(), FunctorPositions::FunctorPositions(), FunctorVectorElementalAuxTempl< is_ad >::FunctorVectorElementalAuxTempl(), FVFluxBC::FVFluxBC(), FVInterfaceKernel::FVInterfaceKernel(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), FVTwoVarContinuityConstraint::FVTwoVarContinuityConstraint(), BoundaryDeletionGenerator::generate(), ElementsToTetrahedronsConverter::generate(), ExtraNodesetGenerator::generate(), FillBetweenCurvesGenerator::generate(), FillBetweenSidesetsGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), AddMetaDataGenerator::generate(), BlockToMeshConverterGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), SideSetsBetweenSubdomainsGenerator::generate(), FlipSidesetGenerator::generate(), BlockDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), CutMeshByPlaneGenerator::generate(), CombinerGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), ParsedCurveGenerator::generate(), BreakMeshByElementGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), StackGenerator::generate(), StitchedMeshGenerator::generate(), AdvancedExtruderGenerator::generate(), CircularBoundaryCorrectionGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), ParsedGenerateSideset::generate(), SideSetsAroundSubdomainGenerator::generate(), PatternedMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), PropertyReadFile::getBlockData(), PropertyReadFile::getData(), Sampler::getGlobalSamples(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), Sampler::getLocalSamples(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), Sampler::getNextLocalRow(), PostprocessorInterface::getPostprocessorNameInternal(), PostprocessorInterface::getPostprocessorValueInternal(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), UserObjectInterface::getUserObjectBase(), UserObjectInterface::getUserObjectName(), HFEMDirichletBC::HFEMDirichletBC(), MultiApp::init(), DistributedPositions::initialize(), BlockWeightedPartitioner::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), PhysicsBase::initializePhysics(), MultiAppCloneReporterTransfer::initialSetup(), ReferenceResidualProblem::initialSetup(), MultiAppVariableValueSamplePostprocessorTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), HistogramVectorPostprocessor::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), LibtorchControlValuePostprocessor::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), AddMetaDataGenerator::inputChecker(), IntegratedBC::IntegratedBC(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceValueUserObjectAux::InterfaceValueUserObjectAux(), InterpolatedStatefulMaterialTempl< T >::InterpolatedStatefulMaterialTempl(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), MultiApp::keepSolutionDuringRestore(), Kernel::Kernel(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationFunction::LinearCombinationFunction(), LowerDIntegratedBC::LowerDIntegratedBC(), PNGOutput::makeMeshFunc(), MatCoupledForce::MatCoupledForce(), MaterialADConverterTempl< T >::MaterialADConverterTempl(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), PatternedMeshGenerator::mergeSubdomainNameMaps(), MeshCollectionGenerator::MeshCollectionGenerator(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshDivisionAux::MeshDivisionAux(), MeshGenerator::MeshGenerator(), MoosePreconditioner::MoosePreconditioner(), 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(), NestedDivision::NestedDivision(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), NodalValueSampler::NodalValueSampler(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), PatchMeshGenerator::PatchMeshGenerator(), PatternedMeshGenerator::PatternedMeshGenerator(), PenaltyPeriodicSegmentalConstraint::PenaltyPeriodicSegmentalConstraint(), PeriodicSegmentalConstraint::PeriodicSegmentalConstraint(), PIDTransientControl::PIDTransientControl(), PlaneDeletionGenerator::PlaneDeletionGenerator(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), PolyLineMeshGenerator::PolyLineMeshGenerator(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessor(), LibmeshPartitioner::prepareBlocksForSubdomainPartitioner(), ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux(), PropertyReadFile::PropertyReadFile(), RandomIC::RandomIC(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObject::readXda(), ReferenceResidualProblem::ReferenceResidualProblem(), RefineBlockGenerator::RefineBlockGenerator(), RefineSidesetGenerator::RefineSidesetGenerator(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), MooseMesh::setPartitioner(), TimeSequenceStepperBase::setupSequence(), SingleRankPartitioner::SingleRankPartitioner(), SphericalGridDivision::SphericalGridDivision(), SymmetryTransformGenerator::SymmetryTransformGenerator(), Terminator::Terminator(), TimeDerivativeAux::TimeDerivativeAux(), Transfer::Transfer(), TransformGenerator::TransformGenerator(), TransientMultiApp::TransientMultiApp(), ParsedCurveGenerator::tSectionSpaceDefiner(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), UserObject::UserObject(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), VolumeAux::VolumeAux(), XYDelaunayGenerator::XYDelaunayGenerator(), and XYMeshLineCutter::XYMeshLineCutter().

244 {
245  Moose::show_trace = false;
246  std::string msg = paramErrorMsg(param, std::forward<Args>(args)...);
248  Moose::show_trace = true;
249 }
bool show_trace
Set to true (the default) to print the stack trace with error and warning messages - false to omit it...
Definition: Moose.C:642
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:44
void callMooseErrorRaw(std::string &msg, MooseApp *app)
const MooseBase *const _moose_base
The MooseBase object that inherits this class.
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ parameters()

const InputParameters& MooseBaseParameterInterface::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 63 of file MooseBaseParameterInterface.h.

Referenced by SetupDebugAction::act(), addAuxKernel(), addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), addBoundaryCondition(), addConstraint(), addDamper(), addDGKernel(), addDiracKernel(), addDistribution(), addFunction(), addFunctorMaterial(), addFVBC(), addFVInitialCondition(), addFVInterfaceKernel(), addFVKernel(), addIndicator(), addInitialCondition(), addInterfaceKernel(), addInterfaceMaterial(), addKernel(), FEProblem::addLineSearch(), addMarker(), addMaterial(), addMaterialHelper(), addMeshDivision(), addMultiApp(), addNodalKernel(), addObject(), addObjectParamsHelper(), addOutput(), addPostprocessor(), addPredictor(), addReporter(), addSampler(), addScalarKernel(), addTimeIntegrator(), addTransfer(), addUserObject(), DisplacedProblem::addVariable(), addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), assemble_l2(), Moose::assemble_matrix(), PhysicsBase::assertParamDefined(), AuxKernelTempl< Real >::AuxKernelTempl(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), MooseMesh::buildTypedMesh(), UserObjectInterface::castUserObject(), PostprocessorInterface::checkParam(), PhysicsBase::checkSecondParamSetOnlyIfFirstOneTrue(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), Moose::compute_bounds(), Moose::compute_jacobian(), Moose::compute_nearnullspace(), Moose::compute_nullspace(), Moose::compute_postcheck(), Moose::compute_transpose_nullspace(), LibtorchNeuralNetControl::conditionalParameterError(), Console::Console(), MultiApp::createApp(), Postprocessor::declareValue(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Executor::Executor(), Exodus::Exodus(), FEProblem::FEProblem(), FEProblemBase(), FixedPointSolve::FixedPointSolve(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GapValueAux::GapValueAux(), ParsedSubdomainMeshGenerator::generate(), ParsedGenerateSideset::generate(), MooseBaseParameterInterface::getCheckedPointerParam(), ExecutorInterface::getExecutor(), Material::getMaterial(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), UserObjectInterface::getUserObjectName(), VectorPostprocessorInterface::getVectorPostprocessorName(), GhostingUserObject::GhostingUserObject(), AttribSystem::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), FullSolveMultiApp::initialSetup(), initNullSpaceVectors(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiApp::MultiApp(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NodeFaceConstraint::NodeFaceConstraint(), OverlayMeshGenerator::OverlayMeshGenerator(), PatchMeshGenerator::PatchMeshGenerator(), PenetrationAux::PenetrationAux(), PicardSolve::PicardSolve(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), ProjectedStatefulMaterialStorageAction::processProperty(), PropertyReadFile::PropertyReadFile(), PseudoTimestep::PseudoTimestep(), RandomIC::RandomIC(), InputParameterWarehouse::removeInputParameters(), OutputWarehouse::resetFileBase(), FEProblem::setInputParametersFEProblem(), setInputParametersFEProblem(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SteffensenSolve::SteffensenSolve(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), Transfer::Transfer(), Transient::Transient(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

63 { return _pars; }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ paramInfo()

template<typename... Args>
void MooseBaseParameterInterface::paramInfo ( const std::string &  param,
Args...  args 
) const
inherited

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 260 of file MooseBaseParameterInterface.h.

Referenced by TransientMultiApp::TransientMultiApp().

261 {
262  mooseInfo(paramErrorMsg(param, std::forward<Args>(args)...));
263 }
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:329
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ paramWarning()

template<typename... Args>
void MooseBaseParameterInterface::paramWarning ( const std::string &  param,
Args...  args 
) const
inherited

Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseWarning - only printing a message using the given args.

Definition at line 253 of file MooseBaseParameterInterface.h.

Referenced by MultiAppNearestNodeTransfer::execute(), FEProblemSolve::FEProblemSolve(), UniqueExtraIDMeshGenerator::generate(), PlaneIDMeshGenerator::generate(), Terminator::initialSetup(), and MooseMesh::MooseMesh().

254 {
255  mooseWarning(paramErrorMsg(param, std::forward<Args>(args)...));
256 }
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:296
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ parentOutputPositionChanged()

void FEProblemBase::parentOutputPositionChanged ( )

Calls parentOutputPositionChanged() on all sub apps.

Definition at line 3982 of file FEProblemBase.C.

Referenced by Transient::parentOutputPositionChanged().

3983 {
3984  for (const auto & it : _multi_apps)
3985  {
3986  const auto & objects = it.second.getActiveObjects();
3987  for (const auto & obj : objects)
3988  obj->parentOutputPositionChanged();
3989  }
3990 }
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:144

◆ petscOptionsDatabase()

PetscOptions& FEProblemBase::petscOptionsDatabase ( )
inline

Definition at line 1868 of file FEProblemBase.h.

Referenced by Eigenvalue::prepareSolverOptions().

1868 { return _petsc_option_data_base; }
PetscOptions _petsc_option_data_base

◆ petscOptionsInserted()

bool& FEProblemBase::petscOptionsInserted ( )
inline

If PETSc options are already inserted.

Definition at line 1865 of file FEProblemBase.h.

Referenced by Eigenvalue::prepareSolverOptions().

1865 { 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 7088 of file FEProblemBase.C.

Referenced by solve().

7089 {
7090  if (_displaced_problem) // Only need to do this if things are moving...
7091  {
7092  TIME_SECTION("possiblyRebuildGeomSearchPatches", 5, "Rebuilding Geometric Search Patches");
7093 
7094  switch (_mesh.getPatchUpdateStrategy())
7095  {
7096  case Moose::Never:
7097  break;
7098  case Moose::Iteration:
7099  // Update the list of ghosted elements at the start of the time step
7102 
7103  _displaced_problem->geomSearchData().updateGhostedElems();
7105 
7106  // The commands below ensure that the sparsity of the Jacobian matrix is
7107  // augmented at the start of the time step using neighbor nodes from the end
7108  // of the previous time step.
7109 
7111 
7112  // This is needed to reinitialize PETSc output
7114 
7115  break;
7116 
7117  case Moose::Auto:
7118  {
7119  Real max = _displaced_problem->geomSearchData().maxPatchPercentage();
7121 
7122  // If we haven't moved very far through the patch
7123  if (max < 0.4)
7124  break;
7125  }
7126  libmesh_fallthrough();
7127 
7128  // Let this fall through if things do need to be updated...
7129  case Moose::Always:
7130  // Flush output here to see the message before the reinitialization, which could take a
7131  // while
7132  _console << "\n\nUpdating geometric search patches\n" << std::endl;
7133 
7136 
7137  _displaced_problem->geomSearchData().clearNearestNodeLocators();
7139 
7141 
7142  // This is needed to reinitialize PETSc output
7144  }
7145  }
7146 }
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:1023
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:753
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:3163
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 4992 of file FEProblemBase.C.

Referenced by Transient::execute(), Steady::execute(), and Eigenvalue::execute().

4993 {
4994  const auto & multi_apps = _multi_apps.getActiveObjects();
4995 
4996  for (const auto & multi_app : multi_apps)
4997  multi_app->postExecute();
4998 }
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< Number > &  ghosted_solution)
virtual

Perform cleanup tasks after application of predictor to solution vector.

Parameters
ghosted_solutionGhosted solution vector

Definition at line 6995 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::setInitialSolution().

6996 {
6997 }

◆ prepare() [1/2]

void FEProblemBase::prepare ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1462 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), ComputeMarkerThread::onElement(), ComputeElemDampingThread::onElement(), ComputeMaterialsObjectThread::onElement(), ComputeIndicatorThread::onElement(), NonlinearThread::onElement(), ComputeUserObjectsThread::onElement(), and ComputeInitialConditionThread::operator()().

1463 {
1464  for (const auto i : index_range(_nl))
1465  {
1466  _assembly[tid][i]->reinit(elem);
1467  _nl[i]->prepare(tid);
1468 
1469  // This method is called outside of residual/Jacobian callbacks during initial condition
1470  // evaluation
1472  _assembly[tid][i]->prepareJacobianBlock();
1473  _assembly[tid][i]->prepareResidual();
1475  _assembly[tid][i]->prepareNonlocal();
1476  }
1477  _aux->prepare(tid);
1478 
1479  if (_displaced_problem &&
1480  // _reinit_displaced_neighbor applies to interface type objects which will do computations
1481  // based on both elem and neighbor. Consequently, despite what you might think by its name, we
1482  // must make sure we prepare the displaced elem
1484  {
1485  _displaced_problem->prepare(_displaced_mesh->elemPtr(elem->id()), tid);
1487  _displaced_problem->prepareNonlocal(tid);
1488  }
1489 }
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.
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863
bool _has_jacobian
Indicates if the Jacobian was computed.
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
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.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
std::shared_ptr< DisplacedProblem > _displaced_problem
const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:639
bool _const_jacobian
true if the Jacobian is constant
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh

◆ prepare() [2/2]

void FEProblemBase::prepare ( const Elem *  elem,
unsigned int  ivar,
unsigned int  jvar,
const std::vector< dof_id_type > &  dof_indices,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1503 of file FEProblemBase.C.

1508 {
1509  for (const auto i : index_range(_nl))
1510  {
1511  _assembly[tid][i]->reinit(elem);
1512  _nl[i]->prepare(tid);
1513  }
1514 
1515  _aux->prepare(tid);
1516  const auto current_nl_sys_num = _current_nl_sys->number();
1517  _assembly[tid][current_nl_sys_num]->prepareBlock(ivar, jvar, dof_indices);
1519  if (_nonlocal_cm[current_nl_sys_num](ivar, jvar) != 0)
1520  {
1521  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
1522  _assembly[tid][current_nl_sys_num]->prepareBlockNonlocal(
1523  ivar, jvar, dof_indices, jv.allDofIndices());
1524  }
1525 
1527  {
1528  _displaced_problem->prepare(_displaced_mesh->elemPtr(elem->id()), ivar, jvar, dof_indices, tid);
1530  if (_nonlocal_cm[current_nl_sys_num](ivar, jvar) != 0)
1531  {
1532  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
1533  _displaced_problem->prepareBlockNonlocal(ivar, jvar, dof_indices, jv.allDofIndices(), tid);
1534  }
1535  }
1536 }
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:2863
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...
std::vector< CouplingMatrix > _nonlocal_cm
Definition: SubProblem.h:974
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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:1125
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.
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:79
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh

◆ prepareAssembly()

void FEProblemBase::prepareAssembly ( const THREAD_ID  tid)
overridevirtual

Implements SubProblem.

Definition at line 1578 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), NonlinearSystemBase::reinitNodeFace(), and NonlinearSystemBase::setConstraintSecondaryValues().

1579 {
1580  _assembly[tid][_current_nl_sys->number()]->prepare();
1582  _assembly[tid][_current_nl_sys->number()]->prepareNonlocal();
1583 
1585  {
1586  _displaced_problem->prepareAssembly(tid);
1588  _displaced_problem->prepareNonlocal(tid);
1589  }
1590 }
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:1125
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 1492 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onInterface(), and ComputeUserObjectsThread::onInternalSide().

1493 {
1494  for (auto & nl : _nl)
1495  nl->prepareFace(tid, true);
1496  _aux->prepareFace(tid, false);
1497 
1499  _displaced_problem->prepareFace(_displaced_mesh->elemPtr(elem->id()), tid);
1500 }
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:2863
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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 1837 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onBoundary().

1838 {
1839  _assembly[tid][_current_nl_sys->number()]->copyFaceShapes(var);
1840 }
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:1125
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ prepareMaterials()

void FEProblemBase::prepareMaterials ( const std::unordered_set< unsigned int > &  consumer_needed_mat_props,
const SubdomainID  blk_id,
const THREAD_ID  tid 
)

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

Referenced by ComputeMarkerThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), NonlinearThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

3513 {
3514  std::set<MooseVariableFEBase *> needed_moose_vars;
3515  std::unordered_set<unsigned int> needed_mat_props;
3516 
3517  if (_all_materials.hasActiveBlockObjects(blk_id, tid))
3518  {
3519  _all_materials.updateVariableDependency(needed_moose_vars, tid);
3520  _all_materials.updateBlockMatPropDependency(blk_id, needed_mat_props, tid);
3521  }
3522 
3523  const auto & ids = _mesh.getSubdomainBoundaryIds(blk_id);
3524  for (const auto id : ids)
3525  {
3526  _materials.updateBoundaryVariableDependency(id, needed_moose_vars, tid);
3527  _materials.updateBoundaryMatPropDependency(id, needed_mat_props, tid);
3528  }
3529 
3530  const auto & current_active_elemental_moose_variables = getActiveElementalMooseVariables(tid);
3531  needed_moose_vars.insert(current_active_elemental_moose_variables.begin(),
3532  current_active_elemental_moose_variables.end());
3533 
3534  needed_mat_props.insert(consumer_needed_mat_props.begin(), consumer_needed_mat_props.end());
3535 
3536  setActiveElementalMooseVariables(needed_moose_vars, tid);
3537  setActiveMaterialProperties(needed_mat_props, tid);
3538 }
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:3247
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
Definition: SubProblem.C:420
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 1843 of file FEProblemBase.C.

1844 {
1845  _assembly[tid][_current_nl_sys->number()]->copyNeighborShapes(var);
1846 }
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:1125
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ prepareShapes()

void FEProblemBase::prepareShapes ( unsigned int  var,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1831 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onElement().

1832 {
1833  _assembly[tid][_current_nl_sys->number()]->copyShapes(var);
1834 }
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:1125
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ projectInitialConditionOnCustomRange()

void FEProblemBase::projectInitialConditionOnCustomRange ( ConstElemRange elem_range,
ConstBndNodeRange bnd_node_range 
)

Project initial conditions for custom elem_range and bnd_node_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step.

Definition at line 3252 of file FEProblemBase.C.

Referenced by ElementSubdomainModifier::finalize(), and ActivateElementsUserObjectBase::initSolutions().

3254 {
3255  ComputeInitialConditionThread cic(*this);
3256  Threads::parallel_reduce(elem_range, cic);
3257 
3258  // Need to close the solution vector here so that boundary ICs take precendence
3259  for (auto & nl : _nl)
3260  nl->solution().close();
3261  _aux->solution().close();
3262 
3264  Threads::parallel_reduce(bnd_nodes, cbic);
3265 
3266  for (auto & nl : _nl)
3267  nl->solution().close();
3268  _aux->solution().close();
3269 
3270  // Also, load values into the SCALAR dofs
3271  // Note: We assume that all SCALAR dofs are on the
3272  // processor with highest ID
3273  if (processor_id() == (n_processors() - 1) && _scalar_ics.hasActiveObjects())
3274  {
3275  const auto & ics = _scalar_ics.getActiveObjects();
3276  for (const auto & ic : ics)
3277  {
3278  MooseVariableScalar & var = ic->variable();
3279  var.reinit();
3280 
3281  DenseVector<Number> vals(var.order());
3282  ic->compute(vals);
3283 
3284  const unsigned int n_SCALAR_dofs = var.dofIndices().size();
3285  for (unsigned int i = 0; i < n_SCALAR_dofs; i++)
3286  {
3287  const dof_id_type global_index = var.dofIndices()[i];
3288  var.sys().solution().set(global_index, vals(i));
3289  var.setValue(i, vals(i));
3290  }
3291  }
3292  }
3293 
3294  for (auto & nl : _nl)
3295  {
3296  nl->solution().close();
3297  nl->solution().localize(*nl->system().current_local_solution, nl->dofMap().get_send_list());
3298  }
3299 
3300  _aux->solution().close();
3301  _aux->solution().localize(*_aux->sys().current_local_solution, _aux->dofMap().get_send_list());
3302 }
NumericVector< Number > & solution()
Definition: SystemBase.h:176
void reinit(bool reinit_for_derivative_reordering=false)
Fill out the VariableValue arrays from the system solution vector.
ScalarInitialConditionWarehouse _scalar_ics
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
processor_id_type n_processors() const
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void setValue(unsigned int i, Number value)
Set the nodal value for this variable (to keep everything up to date.
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
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 Number value)=0
processor_id_type processor_id() const
SystemBase & sys()
Get the system this variable is part of.
uint8_t dof_id_type

◆ projectSolution()

void FEProblemBase::projectSolution ( )

Definition at line 3184 of file FEProblemBase.C.

Referenced by initialAdaptMesh(), and initialSetup().

3185 {
3186  TIME_SECTION("projectSolution", 2, "Projecting Initial Solutions")
3187 
3188  FloatingPointExceptionGuard fpe_guard(_app);
3189 
3190  ConstElemRange & elem_range = *_mesh.getActiveLocalElementRange();
3191  ComputeInitialConditionThread cic(*this);
3192  Threads::parallel_reduce(elem_range, cic);
3193 
3194  if (haveFV())
3195  {
3196  using ElemInfoRange = StoredRange<MooseMesh::const_elem_info_iterator, const ElemInfo *>;
3197  ElemInfoRange elem_info_range(_mesh.ownedElemInfoBegin(), _mesh.ownedElemInfoEnd());
3198 
3199  ComputeFVInitialConditionThread cfvic(*this);
3200  Threads::parallel_reduce(elem_info_range, cfvic);
3201  }
3202 
3203  // Need to close the solution vector here so that boundary ICs take precendence
3204  for (auto & nl : _nl)
3205  nl->solution().close();
3206  _aux->solution().close();
3207 
3208  // now run boundary-restricted initial conditions
3209  ConstBndNodeRange & bnd_nodes = *_mesh.getBoundaryNodeRange();
3211  Threads::parallel_reduce(bnd_nodes, cbic);
3212 
3213  for (auto & nl : _nl)
3214  nl->solution().close();
3215  _aux->solution().close();
3216 
3217  // Also, load values into the SCALAR dofs
3218  // Note: We assume that all SCALAR dofs are on the
3219  // processor with highest ID
3220  if (processor_id() == (n_processors() - 1) && _scalar_ics.hasActiveObjects())
3221  {
3222  const auto & ics = _scalar_ics.getActiveObjects();
3223  for (const auto & ic : ics)
3224  {
3225  MooseVariableScalar & var = ic->variable();
3226  var.reinit();
3227 
3228  DenseVector<Number> vals(var.order());
3229  ic->compute(vals);
3230 
3231  const unsigned int n_SCALAR_dofs = var.dofIndices().size();
3232  for (unsigned int i = 0; i < n_SCALAR_dofs; i++)
3233  {
3234  const dof_id_type global_index = var.dofIndices()[i];
3235  var.sys().solution().set(global_index, vals(i));
3236  var.setValue(i, vals(i));
3237  }
3238  }
3239  }
3240 
3241  for (auto & nl : _nl)
3242  {
3243  nl->solution().close();
3244  nl->solution().localize(*nl->system().current_local_solution, nl->dofMap().get_send_list());
3245  }
3246 
3247  _aux->solution().close();
3248  _aux->solution().localize(*_aux->sys().current_local_solution, _aux->dofMap().get_send_list());
3249 }
NumericVector< Number > & solution()
Definition: SystemBase.h:176
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.
Scope guard for starting and stopping Floating Point Exception Trapping.
elem_info_iterator ownedElemInfoBegin()
Iterators to owned faceInfo objects.
Definition: MooseMesh.C:1310
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:69
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).
elem_info_iterator ownedElemInfoEnd()
Definition: MooseMesh.C:1318
virtual void set(const numeric_index_type i, const Number value)=0
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > ConstBndNodeRange
Some useful StoredRange typedefs.
Definition: MooseMesh.h:2026
processor_id_type processor_id() const
SystemBase & sys()
Get the system this variable is part of.
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1091
uint8_t dof_id_type

◆ registerRandomInterface()

void FEProblemBase::registerRandomInterface ( RandomInterface random_interface,
const std::string &  name 
)

Definition at line 7926 of file FEProblemBase.C.

Referenced by RandomInterface::setRandomResetFrequency().

7927 {
7928  auto insert_pair = moose_try_emplace(
7929  _random_data_objects, name, std::make_unique<RandomData>(*this, random_interface));
7930 
7931  auto random_data_ptr = insert_pair.first->second.get();
7932  random_interface.setRandomDataPointer(random_data_ptr);
7933 }
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:94
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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 4631 of file FEProblemBase.C.

Referenced by initialSetup(), meshChangedHelper(), and possiblyRebuildGeomSearchPatches().

4632 {
4633  TIME_SECTION("reinitBecauseOfGhostingOrNewGeomObjects",
4634  3,
4635  "Reinitializing Because of Geometric Search Objects");
4636 
4637  // Need to see if _any_ processor has ghosted elems or geometry objects.
4638  bool needs_reinit = !_ghosted_elems.empty();
4639  needs_reinit = needs_reinit || !_geometric_search_data._nearest_node_locators.empty() ||
4640  (_mortar_data.hasObjects() && mortar_changed);
4641  needs_reinit =
4642  needs_reinit || (_displaced_problem &&
4643  (!_displaced_problem->geomSearchData()._nearest_node_locators.empty() ||
4644  (_mortar_data.hasDisplacedObjects() && mortar_changed)));
4645  _communicator.max(needs_reinit);
4646 
4647  if (needs_reinit)
4648  {
4649  // Call reinit to get the ghosted vectors correct now that some geometric search has been done
4650  es().reinit();
4651 
4652  if (_displaced_mesh)
4653  _displaced_problem->es().reinit();
4654  }
4655 }
const Parallel::Communicator & _communicator
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1023
virtual EquationSystems & es() override
bool hasObjects() const
Returns whether we have any active AutomaticMortarGeneration objects.
Definition: MortarData.h:104
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
MortarData _mortar_data
void max(const T &r, T &o, Request &req) const
bool hasDisplacedObjects() const
Returns whether any of the AutomaticMortarGeneration objects are running on a displaced mesh...
Definition: MortarData.h:99
std::shared_ptr< DisplacedProblem > _displaced_problem
GeometricSearchData _geometric_search_data
MooseMesh * _displaced_mesh

◆ reinitDirac()

bool FEProblemBase::reinitDirac ( const Elem *  elem,
const THREAD_ID  tid 
)
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 1882 of file FEProblemBase.C.

Referenced by ComputeDiracThread::onElement().

1883 {
1884  std::vector<Point> & points = _dirac_kernel_info.getPoints()[elem].first;
1885 
1886  unsigned int n_points = points.size();
1887 
1888  if (n_points)
1889  {
1890  if (n_points > _max_qps)
1891  {
1892  _max_qps = n_points;
1893 
1898  unsigned int max_qpts = getMaxQps();
1899  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
1900  {
1901  // the highest available order in libMesh is 43
1902  _scalar_zero[tid].resize(FORTYTHIRD, 0);
1903  _zero[tid].resize(max_qpts, 0);
1904  _grad_zero[tid].resize(max_qpts, RealGradient(0.));
1905  _second_zero[tid].resize(max_qpts, RealTensor(0.));
1906  _vector_zero[tid].resize(max_qpts, RealGradient(0.));
1907  _vector_curl_zero[tid].resize(max_qpts, RealGradient(0.));
1908  }
1909  }
1910 
1911  for (const auto i : index_range(_nl))
1912  {
1913  _assembly[tid][i]->reinitAtPhysical(elem, points);
1914  _nl[i]->prepare(tid);
1915  }
1916  _aux->prepare(tid);
1917 
1918  reinitElem(elem, tid);
1919  }
1920 
1921  _assembly[tid][_current_nl_sys->number()]->prepare();
1923  _assembly[tid][_current_nl_sys->number()]->prepareNonlocal();
1924 
1925  bool have_points = n_points > 0;
1927  {
1928  have_points |= _displaced_problem->reinitDirac(_displaced_mesh->elemPtr(elem->id()), tid);
1930  _displaced_problem->prepareNonlocal(tid);
1931  }
1932 
1933  return have_points;
1934 }
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:2863
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.
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:1125
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
nonlocal coupling matrix;
Definition: SubProblem.h:976
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 1937 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), ComputeMarkerThread::onElement(), ComputeElemDampingThread::onElement(), ComputeIndicatorThread::onElement(), ComputeMaterialsObjectThread::onElement(), NonlinearThread::onElement(), ComputeUserObjectsThread::onElement(), ComputeInitialConditionThread::operator()(), reinitDirac(), and reinitElemPhys().

1938 {
1939  for (auto & nl : _nl)
1940  nl->reinitElem(elem, tid);
1941  _aux->reinitElem(elem, tid);
1942 
1944  _displaced_problem->reinitElem(_displaced_mesh->elemPtr(elem->id()), tid);
1945 }
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:2863
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ reinitElemFace()

void FEProblemBase::reinitElemFace ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1969 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onBoundary(), NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), and ComputeMaterialsObjectThread::onInterface().

1973 {
1974  for (const auto i : index_range(_nl))
1975  {
1976  _assembly[tid][i]->reinit(elem, side);
1977  _nl[i]->reinitElemFace(elem, side, bnd_id, tid);
1978  }
1979  _aux->reinitElemFace(elem, side, bnd_id, tid);
1980 
1982  _displaced_problem->reinitElemFace(_displaced_mesh->elemPtr(elem->id()), side, bnd_id, tid);
1983 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863
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.
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

◆ reinitElemFaceRef()

void FEProblemBase::reinitElemFaceRef ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id,
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 8194 of file FEProblemBase.C.

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

8201 {
8202  SubProblem::reinitElemFaceRef(elem, side, bnd_id, tolerance, pts, weights, tid);
8203 
8204  if (_displaced_problem)
8205  _displaced_problem->reinitElemFaceRef(
8206  _displaced_mesh->elemPtr(elem->id()), side, bnd_id, tolerance, pts, weights, tid);
8207 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863
virtual void reinitElemFaceRef(const Elem *elem, unsigned int side, BoundaryID bnd_id, 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:831
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 2114 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInternalSide(), and NonlinearThread::onInternalSide().

2117 {
2118  reinitNeighbor(elem, side, tid);
2119 
2120  const Elem * lower_d_elem = _mesh.getLowerDElem(elem, side);
2121  if (lower_d_elem && lower_d_elem->subdomain_id() == Moose::INTERNAL_SIDE_LOWERD_ID)
2122  reinitLowerDElem(lower_d_elem, tid);
2123  else
2124  {
2125  // with mesh refinement, lower-dimensional element might be defined on neighbor side
2126  auto & neighbor = _assembly[tid][0]->neighbor();
2127  auto & neighbor_side = _assembly[tid][0]->neighborSide();
2128  const Elem * lower_d_elem_neighbor = _mesh.getLowerDElem(neighbor, neighbor_side);
2129  if (lower_d_elem_neighbor &&
2130  lower_d_elem_neighbor->subdomain_id() == Moose::INTERNAL_SIDE_LOWERD_ID)
2131  {
2132  auto qps = _assembly[tid][0]->qPointsFaceNeighbor().stdVector();
2133  std::vector<Point> reference_points;
2134  FEInterface::inverse_map(
2135  lower_d_elem_neighbor->dim(), FEType(), lower_d_elem_neighbor, qps, reference_points);
2136  reinitLowerDElem(lower_d_elem_neighbor, tid, &reference_points);
2137  }
2138  }
2139 
2140  if (_displaced_problem &&
2142  _displaced_problem->reinitElemNeighborAndLowerD(
2143  _displaced_mesh->elemPtr(elem->id()), side, tid);
2144 }
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.
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863
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:1483
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.
const SubdomainID INTERNAL_SIDE_LOWERD_ID
Definition: MooseTypes.C:20
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 1948 of file FEProblemBase.C.

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute().

1951 {
1952  mooseAssert(_mesh.queryElemPtr(elem->id()) == elem,
1953  "Are you calling this method with a displaced mesh element?");
1954 
1955  for (const auto i : index_range(_nl))
1956  {
1957  _assembly[tid][i]->reinitAtPhysical(elem, phys_points_in_elem);
1958  _nl[i]->prepare(tid);
1959  _assembly[tid][i]->prepare();
1961  _assembly[tid][i]->prepareNonlocal();
1962  }
1963  _aux->prepare(tid);
1964 
1965  reinitElem(elem, tid);
1966 }
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
virtual Elem * queryElemPtr(const dof_id_type i)
Definition: MooseMesh.C:2875
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
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 1229 of file SubProblem.C.

1230 {
1231  for (const auto nl : make_range(numNonlinearSystems()))
1232  assembly(tid, nl).reinitFVFace(fi);
1233 }
void reinitFVFace(const FaceInfo &fi)
Definition: Assembly.C:1850
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int nl_sys_num)=0

◆ reinitLowerDElem()

void FEProblemBase::reinitLowerDElem ( const Elem *  lower_d_elem,
const THREAD_ID  tid,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)
overridevirtual

Reimplemented from SubProblem.

Definition at line 1986 of file FEProblemBase.C.

Referenced by NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), and reinitElemNeighborAndLowerD().

1990 {
1991  SubProblem::reinitLowerDElem(lower_d_elem, tid, pts, weights);
1992 
1994  _displaced_problem->reinitLowerDElem(
1995  _displaced_mesh->elemPtr(lower_d_elem->id()), tid, pts, weights);
1996 }
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:908
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863
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 3541 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), ComputeMarkerThread::onElement(), ComputeIndicatorThread::onElement(), ComputeDiracThread::onElement(), NonlinearThread::onElement(), and ComputeUserObjectsThread::onElement().

3542 {
3543  if (hasActiveMaterialProperties(tid))
3544  {
3545  auto && elem = _assembly[tid][0]->elem();
3546  unsigned int n_points = _assembly[tid][0]->qRule()->n_points();
3547 
3548  auto & material_data = _material_props.getMaterialData(tid);
3549  material_data.resize(n_points);
3550 
3551  // Only swap if requested
3552  if (swap_stateful)
3553  material_data.swap(*elem);
3554 
3555  if (_discrete_materials.hasActiveBlockObjects(blk_id, tid))
3556  material_data.reset(_discrete_materials.getActiveBlockObjects(blk_id, tid));
3557 
3558  if (_materials.hasActiveBlockObjects(blk_id, tid))
3559  material_data.reinit(_materials.getActiveBlockObjects(blk_id, tid));
3560  }
3561 }
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
MaterialData & getMaterialData(const THREAD_ID tid)
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

Definition at line 3634 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), and ComputeUserObjectsThread::onInterface().

3638 {
3639  if (hasActiveMaterialProperties(tid))
3640  {
3641  auto && elem = _assembly[tid][0]->elem();
3642  unsigned int side = _assembly[tid][0]->side();
3643  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
3644 
3645  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
3646  bnd_material_data.resize(n_points);
3647 
3648  if (swap_stateful && !bnd_material_data.isSwapped())
3649  bnd_material_data.swap(*elem, side);
3650 
3651  if (_discrete_materials.hasActiveBoundaryObjects(boundary_id, tid))
3652  bnd_material_data.reset(_discrete_materials.getActiveBoundaryObjects(boundary_id, tid));
3653 
3654  if (reinit_mats)
3655  bnd_material_data.reinit(*reinit_mats);
3656  else if (_materials.hasActiveBoundaryObjects(boundary_id, tid))
3657  bnd_material_data.reinit(_materials.getActiveBoundaryObjects(boundary_id, tid));
3658  }
3659 }
MaterialPropertyStorage & _bnd_material_props
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
MaterialWarehouse _discrete_materials
MaterialData & getMaterialData(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.
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
execute_statefulWhether to execute material objects that have stateful properties. This should be false when for example executing material objects for mortar contexts in which stateful properties don't make sense

Definition at line 3564 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), and ComputeUserObjectsThread::onInternalSide().

3568 {
3569  if (hasActiveMaterialProperties(tid))
3570  {
3571  auto && elem = _assembly[tid][0]->elem();
3572  unsigned int side = _assembly[tid][0]->side();
3573  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
3574 
3575  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
3576  bnd_material_data.resize(n_points);
3577 
3578  if (swap_stateful && !bnd_material_data.isSwapped())
3579  bnd_material_data.swap(*elem, side);
3580 
3581  if (_discrete_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
3582  bnd_material_data.reset(
3583  _discrete_materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
3584 
3585  if (reinit_mats)
3586  bnd_material_data.reinit(*reinit_mats);
3587  else if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
3588  bnd_material_data.reinit(
3589  _materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
3590  }
3591 }
MaterialPropertyStorage & _bnd_material_props
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
MaterialWarehouse _discrete_materials
MaterialData & getMaterialData(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.
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 3662 of file FEProblemBase.C.

Referenced by NonlinearThread::onInterface(), and ComputeUserObjectsThread::onInterface().

3665 {
3666  if (hasActiveMaterialProperties(tid))
3667  {
3668  const Elem * const & elem = _assembly[tid][0]->elem();
3669  unsigned int side = _assembly[tid][0]->side();
3670  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
3671 
3672  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
3673  bnd_material_data.resize(n_points);
3674 
3675  if (swap_stateful && !bnd_material_data.isSwapped())
3676  bnd_material_data.swap(*elem, side);
3677 
3678  if (_interface_materials.hasActiveBoundaryObjects(boundary_id, tid))
3679  bnd_material_data.reinit(_interface_materials.getActiveBoundaryObjects(boundary_id, tid));
3680  }
3681 }
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
MaterialData & getMaterialData(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.
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
execute_statefulWhether to execute material objects that have stateful properties. This should be false when for example executing material objects for mortar contexts in which stateful properties don't make sense

Definition at line 3594 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and NonlinearSystemBase::reinitNodeFace().

3598 {
3599  if (hasActiveMaterialProperties(tid))
3600  {
3601  // NOTE: this will not work with h-adaptivity
3602  // lindsayad: why not?
3603 
3604  const Elem * neighbor = _assembly[tid][0]->neighbor();
3605  unsigned int neighbor_side = neighbor->which_neighbor_am_i(_assembly[tid][0]->elem());
3606 
3607  mooseAssert(neighbor, "neighbor should be non-null");
3608  mooseAssert(blk_id == neighbor->subdomain_id(),
3609  "The provided blk_id " << blk_id << " and neighbor subdomain ID "
3610  << neighbor->subdomain_id() << " do not match.");
3611 
3612  unsigned int n_points = _assembly[tid][0]->qRuleNeighbor()->n_points();
3613 
3614  auto & neighbor_material_data = _neighbor_material_props.getMaterialData(tid);
3615  neighbor_material_data.resize(n_points);
3616 
3617  // Only swap if requested
3618  if (swap_stateful)
3619  neighbor_material_data.swap(*neighbor, neighbor_side);
3620 
3621  if (_discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
3622  neighbor_material_data.reset(
3623  _discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
3624 
3625  if (reinit_mats)
3626  neighbor_material_data.reinit(*reinit_mats);
3627  else if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
3628  neighbor_material_data.reinit(
3629  _materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
3630  }
3631 }
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
MaterialWarehouse _discrete_materials
MaterialData & getMaterialData(const THREAD_ID tid)
MaterialPropertyStorage & _neighbor_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

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

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

946 {
947  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
948  assembly(tid, nl_sys_num).reinitMortarElem(elem);
949 }
void reinitMortarElem(const Elem *elem)
reinitialize a mortar segment mesh element in order to get a proper JxW
Definition: Assembly.C:2396
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int nl_sys_num)=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 8380 of file FEProblemBase.C.

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

8383 {
8384  const auto mortar_uos =
8385  getMortarUserObjects(primary_boundary_id, secondary_boundary_id, displaced);
8386  for (auto * const mortar_uo : mortar_uos)
8387  {
8388  mortar_uo->setNormals();
8389  mortar_uo->reinit();
8390  }
8391 }
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 2074 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInterface(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and reinitElemNeighborAndLowerD().

2075 {
2076  setNeighborSubdomainID(elem, side, tid);
2077 
2078  const Elem * neighbor = elem->neighbor_ptr(side);
2079  unsigned int neighbor_side = neighbor->which_neighbor_am_i(elem);
2080 
2081  for (const auto i : index_range(_nl))
2082  {
2083  _assembly[tid][i]->reinitElemAndNeighbor(elem, side, neighbor, neighbor_side);
2084  _nl[i]->prepareNeighbor(tid);
2085  // Called during stateful material property evaluation outside of solve
2086  _assembly[tid][i]->prepareNeighbor();
2087  }
2088  _aux->prepareNeighbor(tid);
2089 
2090  BoundaryID bnd_id = 0; // some dummy number (it is not really used for anything, right now)
2091  for (auto & nl : _nl)
2092  {
2093  nl->reinitElemFace(elem, side, bnd_id, tid);
2094  nl->reinitNeighborFace(neighbor, neighbor_side, bnd_id, tid);
2095  }
2096  _aux->reinitElemFace(elem, side, bnd_id, tid);
2097  _aux->reinitNeighborFace(neighbor, neighbor_side, bnd_id, tid);
2098 
2100  {
2101  // There are cases like for cohesive zone modeling without significant sliding where we cannot
2102  // use FEInterface::inverse_map in Assembly::reinitElemAndNeighbor in the displaced problem
2103  // because the physical points coming from the element don't actually lie on the neighbor.
2104  // Moreover, what's the point of doing another physical point inversion in other cases? We only
2105  // care about the reference points which we can just take from the undisplaced computation
2106  const auto & displaced_ref_pts = _assembly[tid][0]->qRuleNeighbor()->get_points();
2107 
2108  _displaced_problem->reinitNeighbor(
2109  _displaced_mesh->elemPtr(elem->id()), side, tid, &displaced_ref_pts);
2110  }
2111 }
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:2863
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
boundary_id_type BoundaryID
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
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, const THREAD_ID tid) override

◆ reinitNeighborFaceRef()

void FEProblemBase::reinitNeighborFaceRef ( const Elem *  neighbor_elem,
unsigned int  neighbor_side,
BoundaryID  bnd_id,
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 8210 of file FEProblemBase.C.

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

8217 {
8219  neighbor_elem, neighbor_side, bnd_id, tolerance, pts, weights, tid);
8220 
8221  if (_displaced_problem)
8222  _displaced_problem->reinitNeighborFaceRef(_displaced_mesh->elemPtr(neighbor_elem->id()),
8223  neighbor_side,
8224  bnd_id,
8225  tolerance,
8226  pts,
8227  weights,
8228  tid);
8229 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863
virtual void reinitNeighborFaceRef(const Elem *neighbor_elem, unsigned int neighbor_side, BoundaryID bnd_id, 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:871
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 938 of file SubProblem.C.

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

939 {
940  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
941  assembly(tid, nl_sys_num).reinitNeighborLowerDElem(elem);
942 }
void reinitNeighborLowerDElem(const Elem *elem)
reinitialize a neighboring lower dimensional element
Definition: Assembly.C:2375
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int nl_sys_num)=0

◆ reinitNeighborPhys() [1/2]

void FEProblemBase::reinitNeighborPhys ( const Elem *  neighbor,
unsigned int  neighbor_side,
const std::vector< Point > &  physical_points,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2147 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::reinitNodeFace(), and EqualValueEmbeddedConstraint::shouldApply().

2151 {
2152  mooseAssert(_mesh.queryElemPtr(neighbor->id()) == neighbor,
2153  "Are you calling this method with a displaced mesh element?");
2154 
2155  for (const auto i : index_range(_nl))
2156  {
2157  // Reinits shape the functions at the physical points
2158  _assembly[tid][i]->reinitNeighborAtPhysical(neighbor, neighbor_side, physical_points);
2159 
2160  // Sets the neighbor dof indices
2161  _nl[i]->prepareNeighbor(tid);
2162  }
2163  _aux->prepareNeighbor(tid);
2164 
2165  // Resizes Re and Ke
2166  _assembly[tid][_current_nl_sys->number()]->prepareNeighbor();
2167 
2168  // Compute the values of each variable at the points
2169  for (auto & nl : _nl)
2170  nl->reinitNeighborFace(neighbor, neighbor_side, 0, tid);
2171  _aux->reinitNeighborFace(neighbor, neighbor_side, 0, tid);
2172 }
virtual Elem * queryElemPtr(const dof_id_type i)
Definition: MooseMesh.C:2875
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1125
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
auto index_range(const T &sizable)

◆ reinitNeighborPhys() [2/2]

void FEProblemBase::reinitNeighborPhys ( const Elem *  neighbor,
const std::vector< Point > &  physical_points,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 2175 of file FEProblemBase.C.

2178 {
2179  mooseAssert(_mesh.queryElemPtr(neighbor->id()) == neighbor,
2180  "Are you calling this method with a displaced mesh element?");
2181 
2182  for (const auto i : index_range(_nl))
2183  {
2184  // Reinits shape the functions at the physical points
2185  _assembly[tid][i]->reinitNeighborAtPhysical(neighbor, physical_points);
2186 
2187  // Sets the neighbor dof indices
2188  _nl[i]->prepareNeighbor(tid);
2189  }
2190  _aux->prepareNeighbor(tid);
2191 
2192  // Resizes Re and Ke
2193  _assembly[tid][_current_nl_sys->number()]->prepareNeighbor();
2194 
2195  // Compute the values of each variable at the points
2196  for (auto & nl : _nl)
2197  nl->reinitNeighbor(neighbor, tid);
2198  _aux->reinitNeighbor(neighbor, tid);
2199 }
virtual Elem * queryElemPtr(const dof_id_type i)
Definition: MooseMesh.C:2875
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1125
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
auto index_range(const T &sizable)

◆ reinitNode()

void FEProblemBase::reinitNode ( const Node *  node,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1999 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), NonlinearSystemBase::computeResidualInternal(), ComputeNodalUserObjectsThread::onNode(), ComputeNodalDampingThread::onNode(), ComputeNodalKernelsThread::onNode(), and ComputeNodalKernelJacobiansThread::onNode().

2000 {
2002  _displaced_problem->reinitNode(&_displaced_mesh->nodeRef(node->id()), tid);
2003 
2004  for (const auto i : index_range(_nl))
2005  {
2006  _assembly[tid][i]->reinit(node);
2007  _nl[i]->reinitNode(node, tid);
2008  }
2009  _aux->reinitNode(node, tid);
2010 }
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:636
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
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 2013 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().

2014 {
2016  _displaced_problem->reinitNodeFace(&_displaced_mesh->nodeRef(node->id()), bnd_id, tid);
2017 
2018  for (const auto i : index_range(_nl))
2019  {
2020  _assembly[tid][i]->reinit(node);
2021  _nl[i]->reinitNodeFace(node, bnd_id, tid);
2022  }
2023  _aux->reinitNodeFace(node, bnd_id, tid);
2024 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:636
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.
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 2027 of file FEProblemBase.C.

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

2028 {
2030  _displaced_problem->reinitNodes(nodes, tid);
2031 
2032  for (auto & nl : _nl)
2033  nl->reinitNodes(nodes, tid);
2034  _aux->reinitNodes(nodes, tid);
2035 }
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 2038 of file FEProblemBase.C.

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

2039 {
2041  _displaced_problem->reinitNodesNeighbor(nodes, tid);
2042 
2043  for (auto & nl : _nl)
2044  nl->reinitNodesNeighbor(nodes, tid);
2045  _aux->reinitNodesNeighbor(nodes, tid);
2046 }
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 2066 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians(), NonlinearSystemBase::constraintJacobians(), and NonlinearThread::onElement().

2067 {
2068  _assembly[tid][_current_nl_sys->number()]->prepareOffDiagScalar();
2069  if (_displaced_problem)
2070  _displaced_problem->reinitOffDiagScalars(tid);
2071 }
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:1125
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 2049 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), computeJacobianTags(), computeResidualAndJacobian(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), computeResidualTags(), NonlinearSystemBase::computeScalarKernelsJacobians(), AuxiliarySystem::computeScalarVars(), and initialSetup().

2050 {
2051  TIME_SECTION("reinitScalars", 3, "Reinitializing Scalar Variables");
2052 
2054  _displaced_problem->reinitScalars(tid, reinit_for_derivative_reordering);
2055 
2056  for (auto & nl : _nl)
2057  nl->reinitScalars(tid, reinit_for_derivative_reordering);
2058  _aux->reinitScalars(tid, reinit_for_derivative_reordering);
2059 
2060  // This is called outside of residual/Jacobian call-backs
2061  for (auto & assembly : _assembly[tid])
2063 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void prepareScalar()
Definition: Assembly.C:2941
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
Assembly & assembly(const THREAD_ID tid, const unsigned int nl_sys_num) override

◆ removeAlgebraicGhostingFunctor()

void SubProblem::removeAlgebraicGhostingFunctor ( GhostingFunctor &  algebraic_gf)
inherited

Remove an algebraic ghosting functor from this problem's DofMaps.

Definition at line 1018 of file SubProblem.C.

1019 {
1020  EquationSystems & eq = es();
1021  const auto n_sys = eq.n_systems();
1022 
1023 #ifndef NDEBUG
1024  const DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1025  const bool found_in_root_sys =
1026  std::find(nl_dof_map.algebraic_ghosting_functors_begin(),
1027  nl_dof_map.algebraic_ghosting_functors_end(),
1028  &algebraic_gf) != nl_dof_map.algebraic_ghosting_functors_end();
1029  const bool found_in_our_map =
1030  _root_alg_gf_to_sys_clones.find(&algebraic_gf) != _root_alg_gf_to_sys_clones.end();
1031  mooseAssert(found_in_root_sys == found_in_our_map,
1032  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1033  "it in our gf to clones map");
1034 #endif
1035 
1036  eq.get_system(0).get_dof_map().remove_algebraic_ghosting_functor(algebraic_gf);
1037 
1038  auto it = _root_alg_gf_to_sys_clones.find(&algebraic_gf);
1039  if (it == _root_alg_gf_to_sys_clones.end())
1040  return;
1041 
1042  auto & clones_vec = it->second;
1043  mooseAssert((n_sys - 1) == clones_vec.size(),
1044  "The size of the gf clones vector doesn't match the number of systems minus one");
1045  if (clones_vec.empty())
1046  {
1047  mooseAssert(n_sys == 1, "The clones vector should only be empty if there is only one system");
1048  return;
1049  }
1050 
1051  for (const auto i : make_range(n_sys))
1052  eq.get_system(i + 1).get_dof_map().remove_algebraic_ghosting_functor(*clones_vec[i]);
1053 
1054  _root_alg_gf_to_sys_clones.erase(it->first);
1055 }
std::unordered_map< GhostingFunctor *, std::vector< std::shared_ptr< GhostingFunctor > > > _root_alg_gf_to_sys_clones
A map from a root algebraic ghosting functor, e.g.
Definition: SubProblem.h:1118
virtual EquationSystems & es()=0
IntRange< T > make_range(T beg, T end)

◆ removeCouplingGhostingFunctor()

void SubProblem::removeCouplingGhostingFunctor ( GhostingFunctor &  coupling_gf)
inherited

Remove a coupling ghosting functor from this problem's DofMaps.

Definition at line 1058 of file SubProblem.C.

1059 {
1060  EquationSystems & eq = es();
1061  const auto num_nl_sys = numNonlinearSystems();
1062  if (!num_nl_sys)
1063  return;
1064 
1065 #ifndef NDEBUG
1066  const DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1067  const bool found_in_root_sys = std::find(nl_dof_map.coupling_functors_begin(),
1068  nl_dof_map.coupling_functors_end(),
1069  &coupling_gf) != nl_dof_map.coupling_functors_end();
1070  const bool found_in_our_map =
1072  mooseAssert(found_in_root_sys == found_in_our_map,
1073  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1074  "it in our gf to clones map");
1075 #endif
1076 
1077  eq.get_system(0).get_dof_map().remove_coupling_functor(coupling_gf);
1078 
1079  auto it = _root_coupling_gf_to_sys_clones.find(&coupling_gf);
1080  if (it == _root_coupling_gf_to_sys_clones.end())
1081  return;
1082 
1083  auto & clones_vec = it->second;
1084  mooseAssert((num_nl_sys - 1) == clones_vec.size(),
1085  "The size of the gf clones vector doesn't match the number of systems minus one");
1086  if (clones_vec.empty())
1087  {
1088  mooseAssert(num_nl_sys == 1,
1089  "The clones vector should only be empty if there is only one nonlinear system");
1090  return;
1091  }
1092 
1093  for (const auto i : make_range(num_nl_sys))
1094  eq.get_system(i + 1).get_dof_map().remove_coupling_functor(*clones_vec[i]);
1095 
1096  _root_coupling_gf_to_sys_clones.erase(it->first);
1097 }
virtual EquationSystems & es()=0
std::unordered_map< GhostingFunctor *, std::vector< std::shared_ptr< GhostingFunctor > > > _root_coupling_gf_to_sys_clones
A map from a root coupling ghosting functor, e.g.
Definition: SubProblem.h:1124
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0

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

4626 {
4627  //<< "Object " << a->name() << " -> " << b->name() << std::endl;
4628 }

◆ resetState()

void FEProblemBase::resetState ( )
privatevirtual

Reset state of this object in preparation for the next evaluation.

Definition at line 5926 of file FEProblemBase.C.

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

5927 {
5928  // Our default state is to allow computing derivatives
5929  ADReal::do_derivatives = true;
5931 
5934 
5937 
5941  if (_displaced_problem)
5942  {
5943  _displaced_problem->setCurrentlyComputingResidual(false);
5944  _displaced_problem->setCurrentlyComputingJacobian(false);
5945  _displaced_problem->setCurrentlyComputingResidualAndJacobian(false);
5946  }
5947 }
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:27
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:1394
void setCurrentlyComputingJacobian(const bool currently_computing_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:644
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1041
void clearCurrentJacobianVectorTags()
Clear the current Jacobian vector 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:1038

◆ residualSetup()

void FEProblemBase::residualSetup ( )
overridevirtual

Reimplemented from SubProblem.

Definition at line 8296 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::residualSetup().

8297 {
8299  // We need to setup all the nonlinear systems other than our current one which actually called
8300  // this method (so we have to make sure we don't go in a circle)
8301  for (const auto i : make_range(numNonlinearSystems()))
8302  if (i != currentNlSysNum())
8303  _nl[i]->residualSetup();
8304  // We don't setup the aux sys because that's been done elsewhere
8305  if (_displaced_problem)
8306  _displaced_problem->residualSetup();
8307 }
virtual std::size_t numNonlinearSystems() const override
virtual void residualSetup()
Definition: SubProblem.C:1146
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 8288 of file FEProblemBase.C.

8291 {
8292  getMaterialData(data_type, tid).resize(nqp);
8293 }
MPI_Datatype data_type
MaterialData & getMaterialData(Moose::MaterialDataType type, const THREAD_ID tid=0)
void resize(unsigned int n_qpoints)
Resize the data to hold properties for n_qpoints quadrature points.
Definition: MaterialData.C:21

◆ restartableName()

std::string Restartable::restartableName ( const std::string &  data_name) const
protectedinherited

Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix.

This should only be used in this interface and in testing.

Definition at line 66 of file Restartable.C.

Referenced by Restartable::declareRecoverableData(), and Restartable::declareRestartableDataHelper().

67 {
68  return _restartable_system_name + "/" + _restartable_name + "/" + data_name;
69 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:243
const std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:230

◆ restoreMultiApps()

void FEProblemBase::restoreMultiApps ( ExecFlagType  type,
bool  force = false 
)

Restore the MultiApps associated with the ExecFlagType.

Parameters
forceForce restoration because something went wrong with the solve

Definition at line 5057 of file FEProblemBase.C.

Referenced by Transient::incrementStepOrReject(), and FixedPointSolve::solve().

5058 {
5059  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5060 
5061  if (multi_apps.size())
5062  {
5063  if (_verbose_multiapps)
5064  {
5065  if (force)
5066  _console << COLOR_CYAN << "\nRestoring Multiapps on " << type.name()
5067  << " because of solve failure!" << COLOR_DEFAULT << std::endl;
5068  else
5069  _console << COLOR_CYAN << "\nRestoring MultiApps on " << type.name() << COLOR_DEFAULT
5070  << std::endl;
5071  }
5072 
5073  for (const auto & multi_app : multi_apps)
5074  multi_app->restore(force);
5075 
5077 
5078  if (_verbose_multiapps)
5079  _console << COLOR_CYAN << "Finished Restoring MultiApps on " << type.name() << "\n"
5080  << COLOR_DEFAULT << std::endl;
5081  }
5082 }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
const Parallel::Communicator & _communicator
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
void parallelBarrierNotify(const libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ restoreOldSolutions()

void FEProblemBase::restoreOldSolutions ( )
virtual

Restore old solutions from the backup vectors and deallocate them.

Definition at line 6044 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration().

6045 {
6046  TIME_SECTION("restoreOldSolutions", 5, "Restoring Old Solutions");
6047 
6048  for (auto & nl : _nl)
6049  nl->restoreOldSolutions();
6050  _aux->restoreOldSolutions();
6051 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ restoreSolutions()

void FEProblemBase::restoreSolutions ( )
virtual

Definition at line 6021 of file FEProblemBase.C.

Referenced by ActivateElementsUserObjectBase::initSolutions(), TimeStepper::rejectStep(), and updateMeshXFEM().

6022 {
6023  TIME_SECTION("restoreSolutions", 5, "Restoring Solutions");
6024 
6025  for (auto & nl : _nl)
6026  nl->restoreSolutions();
6027  _aux->restoreSolutions();
6028 
6029  if (_displaced_problem)
6030  _displaced_problem->updateMesh();
6031 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ safeAccessTaggedMatrices()

virtual bool SubProblem::safeAccessTaggedMatrices ( ) const
inlinevirtualinherited

Is it safe to access the tagged matrices.

Reimplemented in DisplacedProblem.

Definition at line 686 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:1038

◆ safeAccessTaggedVectors()

virtual bool SubProblem::safeAccessTaggedVectors ( ) const
inlinevirtualinherited

Is it safe to access the tagged vectors.

Reimplemented in DisplacedProblem.

Definition at line 689 of file SubProblem.h.

Referenced by MooseVariableScalar::reinit(), and DisplacedProblem::safeAccessTaggedVectors().

689 { return _safe_access_tagged_vectors; }
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1041

◆ saveOldSolutions()

void FEProblemBase::saveOldSolutions ( )
virtual

Allocate vectors and save old solutions into them.

Definition at line 6034 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration().

6035 {
6036  TIME_SECTION("saveOldSolutions", 5, "Saving Old Solutions");
6037 
6038  for (auto & nl : _nl)
6039  nl->saveOldSolutions();
6040  _aux->saveOldSolutions();
6041 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

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

Referenced by computeResidual(), computeResidualAndJacobian(), and ComputeResidualAndJacobianThread::determineObjectWarehouses().

269 {
270  selected_tags.clear();
271  for (const auto & vector_tag : input_vector_tags)
272  if (system.hasVector(vector_tag._id))
273  selected_tags.insert(vector_tag._id);
274 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:873

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

Referenced by prepareMaterials(), ComputeMarkerThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeDiracThread::subdomainChanged(), NonlinearThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

5327 {
5329 
5330  if (_displaced_problem)
5331  _displaced_problem->setActiveElementalMooseVariables(moose_vars, tid);
5332 }
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:409
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 5287 of file FEProblemBase.C.

5288 {
5290 
5291  if (_displaced_problem)
5292  _displaced_problem->setActiveFEVariableCoupleableMatrixTags(mtags, tid);
5293 }
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:329
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 5380 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), prepareMaterials(), NodalPatchRecovery::reinitPatch(), NonlinearSystemBase::setConstraintSecondaryValues(), and ComputeDiracThread::subdomainChanged().

5382 {
5383  // mark active properties in every material
5384  for (auto & mat : _all_materials.getObjects(tid))
5385  mat->setActiveProperties(mat_prop_ids);
5386  for (auto & mat : _all_materials[Moose::FACE_MATERIAL_DATA].getObjects(tid))
5387  mat->setActiveProperties(mat_prop_ids);
5388  for (auto & mat : _all_materials[Moose::NEIGHBOR_MATERIAL_DATA].getObjects(tid))
5389  mat->setActiveProperties(mat_prop_ids);
5390 
5391  _has_active_material_properties[tid] = !mat_prop_ids.empty();
5392 }
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 5305 of file FEProblemBase.C.

Referenced by AuxiliarySystem::setScalarVariableCoupleableTags().

5307 {
5309 
5310  if (_displaced_problem)
5311  _displaced_problem->setActiveScalarVariableCoupleableMatrixTags(mtags, tid);
5312 }
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:368
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 5315 of file FEProblemBase.C.

Referenced by AuxiliarySystem::setScalarVariableCoupleableTags().

5317 {
5319 
5320  if (_displaced_problem)
5321  _displaced_problem->setActiveScalarVariableCoupleableVectorTags(vtags, tid);
5322 }
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
Definition: SubProblem.C:375
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setAxisymmetricCoordAxis()

void FEProblemBase::setAxisymmetricCoordAxis ( const MooseEnum rz_coord_axis)

Definition at line 666 of file FEProblemBase.C.

Referenced by FEProblemBase().

667 {
668  _mesh.setAxisymmetricCoordAxis(rz_coord_axis);
669 }
MooseMesh & _mesh
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
For axisymmetric simulations, set the symmetry coordinate axis.
Definition: MooseMesh.C:3929

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

Referenced by ExplicitEuler::preSolve(), ExplicitTVDRK2::preSolve(), and ExplicitRK2::preSolve().

1593 { _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 658 of file FEProblemBase.C.

Referenced by FEProblemBase().

660 {
661  TIME_SECTION("setCoordSystem", 5, "Setting Coordinate System");
662  _mesh.setCoordSystem(blocks, coord_sys);
663 }
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:3823

◆ setCoupling()

void FEProblemBase::setCoupling ( Moose::CouplingType  type)

Set the coupling between variables TODO: allow user-defined coupling.

Parameters
typeType of coupling

Definition at line 5555 of file FEProblemBase.C.

Referenced by init(), setCouplingMatrix(), and Moose::SlepcSupport::setEigenProblemSolverParams().

5556 {
5558  {
5560  mooseError("Someone told us (the FEProblemBase) to trust the user coupling matrix, but we "
5561  "haven't been provided a coupling matrix!");
5562 
5563  // We've been told to trust the user coupling matrix, so we're going to leave things alone
5564  return;
5565  }
5566 
5567  _coupling = type;
5568 }
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:50
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ setCouplingMatrix() [1/2]

void FEProblemBase::setCouplingMatrix ( std::unique_ptr< 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 5579 of file FEProblemBase.C.

Referenced by MoosePreconditioner::setCouplingMatrix().

5580 {
5582  _cm[i] = std::move(cm);
5583 }
void setCoupling(Moose::CouplingType type)
Set the coupling between variables TODO: allow user-defined coupling.
std::vector< std::unique_ptr< CouplingMatrix > > _cm
Coupling matrix for variables.

◆ setCouplingMatrix() [2/2]

void FEProblemBase::setCouplingMatrix ( CouplingMatrix *  cm,
const unsigned int  nl_sys_num 
)

Definition at line 5571 of file FEProblemBase.C.

5572 {
5573  // TODO: Deprecate method
5575  _cm[i].reset(cm);
5576 }
void setCoupling(Moose::CouplingType type)
Set the coupling between variables TODO: allow user-defined coupling.
std::vector< std::unique_ptr< CouplingMatrix > > _cm
Coupling matrix for variables.

◆ setCurrentBoundaryID()

void FEProblemBase::setCurrentBoundaryID ( BoundaryID  bid,
const THREAD_ID  tid 
)
overridevirtual

sets the current boundary ID in assembly

Reimplemented from SubProblem.

Definition at line 8419 of file FEProblemBase.C.

8420 {
8422  if (_displaced_problem)
8423  _displaced_problem->setCurrentBoundaryID(bid, tid);
8424 }
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid)
sets the current boundary ID in assembly
Definition: SubProblem.C:753
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setCurrentExecuteOnFlag()

void FEProblemBase::setCurrentExecuteOnFlag ( const ExecFlagType flag)

Definition at line 4081 of file FEProblemBase.C.

Referenced by execute(), initialSetup(), and outputStep().

4082 {
4083  _current_execute_on_flag = flag;
4084 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.

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

8411 {
8412  SubProblem::setCurrentLowerDElem(lower_d_elem, tid);
8413  if (_displaced_problem)
8414  _displaced_problem->setCurrentLowerDElem(
8415  lower_d_elem ? _displaced_mesh->elemPtr(lower_d_elem->id()) : nullptr, tid);
8416 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863
virtual void setCurrentLowerDElem(const Elem *const lower_d_elem, const THREAD_ID tid)
Set the current lower dimensional element.
Definition: SubProblem.C:1318
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 644 of file SubProblem.h.

Referenced by computeResidualAndJacobian(), and resetState().

645  {
646  _currently_computing_jacobian = currently_computing_jacobian;
647  }
bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.
Definition: SubProblem.h:1026

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

Referenced by computeResidualAndJacobian(), NonlinearSystemBase::computeResidualTags(), and resetState().

8163 {
8164  if (_displaced_problem)
8165  _displaced_problem->setCurrentlyComputingResidual(currently_computing_residual);
8166  _currently_computing_residual = currently_computing_residual;
8167 }
std::shared_ptr< DisplacedProblem > _displaced_problem
bool _currently_computing_residual
Whether the residual is being evaluated.
Definition: SubProblem.h:1035

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

Referenced by computeResidualAndJacobian(), and resetState().

1396 {
1397  _currently_computing_residual_and_jacobian = currently_computing_residual_and_jacobian;
1398 }
bool _currently_computing_residual_and_jacobian
Flag to determine whether the problem is currently computing the residual and Jacobian.
Definition: SubProblem.h:1029

◆ setCurrentNonlinearSystem()

void FEProblemBase::setCurrentNonlinearSystem ( const unsigned int  nl_sys_num)
inline

Definition at line 2768 of file FEProblemBase.h.

Referenced by computeJacobian(), EigenProblem::computeJacobianBlocks(), computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), computeResidual(), NonlinearSystemBase::computeResidualTags(), FEProblem::FEProblem(), EigenProblem::solve(), and solve().

2769 {
2770  mooseAssert(nl_sys_num < _nl.size(),
2771  "System number greater than the number of nonlinear systems");
2772  _current_nl_sys = _nl[nl_sys_num].get();
2773 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.

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

Referenced by computeResidualAndJacobian(), computeResidualTags(), and CrankNicolson::init().

2793 {
2795 }
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:149

◆ setCurrentSubdomainID()

void FEProblemBase::setCurrentSubdomainID ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1539 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), ElementalVariableValue::execute(), and ComputeInitialConditionThread::operator()().

1540 {
1541  SubdomainID did = elem->subdomain_id();
1542  for (const auto i : index_range(_nl))
1543  {
1544  _assembly[tid][i]->setCurrentSubdomainID(did);
1545  if (_displaced_problem &&
1547  _displaced_problem->assembly(tid, i).setCurrentSubdomainID(did);
1548  }
1549 }
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< NonlinearSystemBase > > _nl
The nonlinear systems.
subdomain_id_type SubdomainID
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)

◆ setErrorOnJacobianNonzeroReallocation()

void FEProblemBase::setErrorOnJacobianNonzeroReallocation ( bool  state)
inline

Definition at line 1700 of file FEProblemBase.h.

1701  {
1703  }
bool _error_on_jacobian_nonzero_reallocation

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

5860 {
5861  _has_exception = true;
5862  _exception_message = message;
5863 }
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 2105 of file FEProblemBase.h.

2105 { _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.

Definition at line 2099 of file FEProblemBase.h.

Referenced by Terminator::execute().

bool _fail_next_nonlinear_convergence_check

◆ setFunctorOutput()

void SubProblem::setFunctorOutput ( bool  set_output)
inlineinherited

Setter for debug functor output.

Definition at line 879 of file SubProblem.h.

879 { _output_functors = set_output; }
bool _output_functors
Whether to output a list of the functors used and requested (currently only at initialSetup) ...
Definition: SubProblem.h:1091

◆ setIgnoreZerosInJacobian()

void FEProblemBase::setIgnoreZerosInJacobian ( bool  state)
inline

Definition at line 1717 of file FEProblemBase.h.

1717 { _ignore_zeros_in_jacobian = state; }
bool _ignore_zeros_in_jacobian

◆ setInputParametersFEProblem()

virtual void FEProblemBase::setInputParametersFEProblem ( InputParameters parameters)
inlinevirtual

Reimplemented in FEProblem.

Definition at line 691 of file FEProblemBase.h.

Referenced by FEProblem::setInputParametersFEProblem().

692  {
693  parameters.set<FEProblemBase *>("_fe_problem_base") = this;
694  }
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.
const InputParameters & parameters() const
Get the parameters of the object.

◆ setKernelCoverageCheck()

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

1599 { _kernel_coverage_check = flag; }
bool _kernel_coverage_check
Determines whether a check to verify an active kernel on every subdomain.

◆ setMaterialCoverageCheck()

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

1607 { _material_coverage_check = flag; }
bool _material_coverage_check
Determines whether a check to verify an active material on every subdomain.

◆ setMaxNLPingPong()

void FEProblemBase::setMaxNLPingPong ( const unsigned int  n_max_nl_pingpong)
inline

method setting the maximum number of allowable non linear residual pingpong

Definition at line 2035 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2036  {
2037  _n_max_nl_pingpong = n_max_nl_pingpong;
2038  }
unsigned int _n_max_nl_pingpong

◆ setNeighborSubdomainID() [1/2]

void FEProblemBase::setNeighborSubdomainID ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1552 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), reinitNeighbor(), NonlinearSystemBase::reinitNodeFace(), and EqualValueEmbeddedConstraint::shouldApply().

1553 {
1554  SubdomainID did = elem->neighbor_ptr(side)->subdomain_id();
1555  for (const auto i : index_range(_nl))
1556  {
1557  _assembly[tid][i]->setCurrentNeighborSubdomainID(did);
1558  if (_displaced_problem &&
1560  _displaced_problem->assembly(tid, i).setCurrentNeighborSubdomainID(did);
1561  }
1562 }
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< NonlinearSystemBase > > _nl
The nonlinear systems.
subdomain_id_type SubdomainID
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)

◆ setNeighborSubdomainID() [2/2]

void FEProblemBase::setNeighborSubdomainID ( const Elem *  elem,
const THREAD_ID  tid 
)
virtual

Definition at line 1565 of file FEProblemBase.C.

1566 {
1567  SubdomainID did = elem->subdomain_id();
1568  for (const auto i : index_range(_nl))
1569  {
1570  _assembly[tid][i]->setCurrentNeighborSubdomainID(did);
1571  if (_displaced_problem &&
1573  _displaced_problem->assembly(tid, i).setCurrentNeighborSubdomainID(did);
1574  }
1575 }
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< NonlinearSystemBase > > _nl
The nonlinear systems.
subdomain_id_type SubdomainID
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)

◆ setNonlinearAbsoluteDivergenceTolerance()

void FEProblemBase::setNonlinearAbsoluteDivergenceTolerance ( const Real  nl_abs_div_tol)
inline

method setting the absolute divergence tolerance

Definition at line 2050 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2051  {
2052  _nl_abs_div_tol = nl_abs_div_tol;
2053  }
Real _nl_abs_div_tol
the absolute non linear divergence tolerance

◆ setNonlinearForcedIterations()

void FEProblemBase::setNonlinearForcedIterations ( const unsigned int  nl_forced_its)
inline

method setting the minimum number of nonlinear iterations before performing divergence checks

Definition at line 2041 of file FEProblemBase.h.

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

2042  {
2043  _nl_forced_its = nl_forced_its;
2044  }
int _nl_forced_its
the number of forced nonlinear iterations

◆ setNonlocalCouplingMatrix()

void FEProblemBase::setNonlocalCouplingMatrix ( )

Set custom coupling matrix for variables requiring nonlocal contribution.

Definition at line 5596 of file FEProblemBase.C.

Referenced by initialSetup().

5597 {
5598  TIME_SECTION("setNonlocalCouplingMatrix", 5, "Setting Nonlocal Coupling Matrix");
5599 
5600  if (_nl.size() > 1)
5601  mooseError("Nonlocal kernels are weirdly stored on the FEProblem so we don't currently support "
5602  "multiple nonlinear systems with nonlocal kernels.");
5603 
5604  for (const auto nl_sys_num : index_range(_nl))
5605  {
5606  auto & nl = _nl[nl_sys_num];
5607  auto & nonlocal_cm = _nonlocal_cm[nl_sys_num];
5608  unsigned int n_vars = nl->nVariables();
5609  nonlocal_cm.resize(n_vars);
5610  const auto & vars = nl->getVariables(0);
5611  const auto & nonlocal_kernel = _nonlocal_kernels.getObjects();
5612  const auto & nonlocal_integrated_bc = _nonlocal_integrated_bcs.getObjects();
5613  for (const auto & ivar : vars)
5614  {
5615  for (const auto & kernel : nonlocal_kernel)
5616  {
5617  for (unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
5618  if (i == kernel->variable().number())
5619  for (const auto & jvar : vars)
5620  {
5621  const auto it = _var_dof_map.find(jvar->name());
5622  if (it != _var_dof_map.end())
5623  {
5624  unsigned int j = jvar->number();
5625  nonlocal_cm(i, j) = 1;
5626  }
5627  }
5628  }
5629  for (const auto & integrated_bc : nonlocal_integrated_bc)
5630  {
5631  for (unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
5632  if (i == integrated_bc->variable().number())
5633  for (const auto & jvar : vars)
5634  {
5635  const auto it = _var_dof_map.find(jvar->name());
5636  if (it != _var_dof_map.end())
5637  {
5638  unsigned int j = jvar->number();
5639  nonlocal_cm(i, j) = 1;
5640  }
5641  }
5642  }
5643  }
5644  }
5645 }
std::vector< CouplingMatrix > _nonlocal_cm
Definition: SubProblem.h:974
std::map< std::string, std::vector< dof_id_type > > _var_dof_map
Definition: SubProblem.h:629
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.
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 1612 of file FEProblemBase.h.

1612 { _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 3939 of file FEProblemBase.C.

Referenced by MultiAppPostprocessorTransfer::execute(), PIDTransientControl::execute(), joinAndFinalize(), SteffensenSolve::transformPostprocessors(), SecantSolve::transformPostprocessors(), and PicardSolve::transformPostprocessors().

3942 {
3944  PostprocessorReporterName(name), value, t_index);
3945 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
ReporterData _reporter_data
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:191
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:472
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:134

◆ setResidual()

void FEProblemBase::setResidual ( NumericVector< Number > &  residual,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1673 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals().

1674 {
1675  _assembly[tid][_current_nl_sys->number()]->setResidual(
1676  residual,
1678  getVectorTag(_nl[_current_nl_sys->number()]->residualVectorTag()));
1679  if (_displaced_problem)
1680  _displaced_problem->setResidual(residual, tid);
1681 }
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:1125
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:138
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:794

◆ setResidualNeighbor()

void FEProblemBase::setResidualNeighbor ( NumericVector< Number > &  residual,
const THREAD_ID  tid 
)
overridevirtual

Implements SubProblem.

Definition at line 1684 of file FEProblemBase.C.

1685 {
1686  _assembly[tid][_current_nl_sys->number()]->setResidualNeighbor(
1688  if (_displaced_problem)
1689  _displaced_problem->setResidualNeighbor(residual, tid);
1690 }
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:1125
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:138
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:794

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

Referenced by Executioner::Executioner(), and FEProblemBase().

7747 {
7748  if (_app.isRecovering())
7749  {
7750  mooseInfo("Restart file ", file_name, " is NOT being used since we are performing recovery.");
7751  }
7752  else
7753  {
7754  _app.setRestart(true);
7755  _app.setRestartRecoverFileBase(file_name);
7756  mooseInfo("Using ", file_name, " for restart.");
7757  }
7758 }
void mooseInfo(Args &&... args) const
void setRestartRecoverFileBase(const std::string &file_base)
mutator for recover_base (set by RecoverBaseAction)
Definition: MooseApp.h:510
void setRestart(bool value)
Sets the restart/recover flags.
Definition: MooseApp.C:2236
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:1167

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

Referenced by FEProblemSolve::FEProblemSolve().

1840  {
1841  _snesmf_reuse_base = reuse, _snesmf_reuse_base_set_by_user = set_by_user;
1842  }
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.

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

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

1888  {
1889  _u_dotdot_old_requested = u_dotdot_old_requested;
1890  }
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 1875 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

1876  {
1877  _u_dotdot_requested = u_dotdot_requested;
1878  }
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 1881 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

1882  {
1883  _u_dot_old_requested = u_dot_old_requested;
1884  }
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 1872 of file FEProblemBase.h.

Referenced by TimeIntegrator::TimeIntegrator().

1872 { _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 4678 of file FEProblemBase.C.

4679 {
4680  for (auto & nl : _nl)
4681  nl->setupDampers();
4682 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ setVariableAllDoFMap()

void FEProblemBase::setVariableAllDoFMap ( const std::vector< const MooseVariableFEBase *> &  moose_vars)

Definition at line 1450 of file FEProblemBase.C.

Referenced by initialSetup(), and meshChangedHelper().

1451 {
1452  for (unsigned int i = 0; i < moose_vars.size(); ++i)
1453  {
1454  VariableName var_name = moose_vars[i]->name();
1455  auto & nl = _nl[moose_vars[i]->sys().number()];
1456  nl->setVariableGlobalDoFs(var_name);
1457  _var_dof_map[var_name] = nl->getVariableGlobalDoFs();
1458  }
1459 }
std::map< std::string, std::vector< dof_id_type > > _var_dof_map
Definition: SubProblem.h:629
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

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

3969 {
3971  VectorPostprocessorReporterName(object_name, vector_name), value, t_index);
3972 }
A ReporterName that represents a VectorPostprocessor.
Definition: ReporterName.h:143
ReporterData _reporter_data
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
void setReporterValue(const ReporterName &reporter_name, const T &value, const std::size_t time_index=0)
Method for setting Reporter values that already exist.
Definition: ReporterData.h:472
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:192

◆ setVerboseProblem()

void FEProblemBase::setVerboseProblem ( bool  verbose)

Make the problem be verbose.

Definition at line 8403 of file FEProblemBase.C.

Referenced by Executioner::Executioner().

8404 {
8405  _verbose_setup = verbose;
8406  _verbose_multiapps = verbose;
8407 }
bool _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 8336 of file FEProblemBase.C.

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

8337 {
8338  // For now, only support printing from thread 0
8339  if (tid != 0)
8340  return false;
8341 
8344  return true;
8345  else
8346  return false;
8347 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.
const ExecFlagType EXEC_ALWAYS
Definition: Moose.C:43
ExecFlagEnum _print_execution_on
When to print the execution of loops.
bool contains(const std::string &value) const
Contains methods for seeing if a value is in the MultiMooseEnum.

◆ shouldSolve()

bool FEProblemBase::shouldSolve ( ) const
inline

Definition at line 1923 of file FEProblemBase.h.

Referenced by FEProblemSolve::solve().

1923 { 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 6982 of file FEProblemBase.C.

Referenced by computePostCheck(), and NonlinearSystem::solve().

6983 {
6984  return false;
6985 }

◆ sizeZeroes()

void FEProblemBase::sizeZeroes ( unsigned int  size,
const THREAD_ID  tid 
)
virtual

Definition at line 1875 of file FEProblemBase.C.

1876 {
1877  mooseDoOnce(mooseWarning(
1878  "This function is deprecated and no longer performs any function. Please do not call it."));
1879 }
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.

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

Referenced by FEProblemSolve::FEProblemSolve().

1853  {
1854  _skip_exception_check = skip_exception_check;
1855  }
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 5798 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration(), EigenExecutionerBase::nonlinearSolve(), FEProblemSolve::solve(), and AB2PredictorCorrector::step().

5799 {
5800  TIME_SECTION("solve", 1, "Solving", false);
5801 
5802  setCurrentNonlinearSystem(nl_sys_num);
5803 
5804  // This prevents stale dof indices from lingering around and possibly leading to invalid reads
5805  // and writes. Dof indices may be made stale through operations like mesh adaptivity
5807  if (_displaced_problem)
5808  _displaced_problem->clearAllDofIndices();
5809 
5810 #if PETSC_RELEASE_LESS_THAN(3, 12, 0)
5812  _petsc_options, _solver_params); // Make sure the PETSc options are setup for this app
5813 #else
5814  // Now this database will be the default
5815  // Each app should have only one database
5816  if (!_app.isUltimateMaster())
5817  PetscOptionsPush(_petsc_option_data_base);
5818  // We did not add PETSc options to database yet
5820  {
5823  }
5824 #endif
5825 
5826  // set up DM which is required if use a field split preconditioner
5827  // We need to setup DM every "solve()" because libMesh destroy SNES after solve()
5828  // Do not worry, DM setup is very cheap
5830 
5831  // Setup the output system for printing linear/nonlinear iteration information and some solver
5832  // settings
5834 
5836 
5837  // reset flag so that residual evaluation does not get skipped
5838  // and the next non-linear iteration does not automatically fail with
5839  // "DIVERGED_NANORINF", when we throw an exception and stop solve
5841 
5842  if (_solve)
5844 
5845  if (_solve)
5847 
5848  // sync solutions in displaced problem
5849  if (_displaced_problem)
5850  _displaced_problem->syncSolutions();
5851 
5852 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
5853  if (!_app.isUltimateMaster())
5854  PetscOptionsPop();
5855 #endif
5856 }
virtual void update(bool update_libmesh_system=true)
Update the system (doing libMesh magic)
Definition: SystemBase.C:1211
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:823
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 petscSetOptions(const PetscOptions &po, const SolverParams &solver_params)
A function for setting the PETSc options in PETSc from the options supplied to MOOSE.
Definition: PetscSupport.C:238
void clearAllDofIndices()
Clear dof indices from variables in nl and aux systems.
Definition: SubProblem.C:1122
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)
bool _fail_next_nonlinear_convergence_check
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
virtual void solve() override=0
Solve the system (using libMesh magic)
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void possiblyRebuildGeomSearchPatches()
Moose::PetscSupport::PetscOptions _petsc_options
PETSc option storage.

◆ solverParams() [1/2]

SolverParams & FEProblemBase::solverParams ( )

◆ solverParams() [2/2]

const SolverParams & FEProblemBase::solverParams ( ) const

const version

Definition at line 7920 of file FEProblemBase.C.

7921 {
7922  return _solver_params;
7923 }
SolverParams _solver_params

◆ solverTypeString()

virtual std::string FEProblemBase::solverTypeString ( )
inlinevirtual

Return solver type as a human readable string.

Reimplemented in EigenProblem.

Definition at line 508 of file FEProblemBase.h.

Referenced by ConsoleUtils::outputExecutionInformation().

508 { return Moose::stringify(solverParams()._type); }
SolverParams & solverParams()
Get the solver parameters.
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
const std::string & _type
The type of this class.
Definition: MooseBase.h:72

◆ startedInitialSetup()

virtual bool FEProblemBase::startedInitialSetup ( )
inlinevirtual

Returns true if we are in or beyond the initialSetup stage.

Definition at line 513 of file FEProblemBase.h.

Referenced by MaterialBase::checkExecutionStage(), and MaterialPropertyInterface::checkExecutionStage().

513 { 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 581 of file SubProblem.C.

Referenced by MaterialPropertyInterface::checkMaterialProperty().

584 {
585  _map_boundary_material_props_check[boundary_id].insert(std::make_pair(requestor, name));
586 }
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
Definition: SubProblem.h:998
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56

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

Referenced by MaterialBase::registerPropName().

556 {
557  _map_boundary_material_props[boundary_id].insert(name);
558 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:982

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

Referenced by MaterialBase::getGenericZeroMaterialPropertyByName().

568 {
569  _zero_boundary_material_props[boundary_id].insert(name);
570 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:986

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

Referenced by MaterialPropertyInterface::checkMaterialProperty().

576 {
577  _map_block_material_props_check[block_id].insert(std::make_pair(requestor, name));
578 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
Definition: SubProblem.h:997

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

Referenced by MaterialBase::registerPropName().

550 {
551  _map_block_material_props[block_id].insert(name);
552 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:979

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

Referenced by MaterialBase::getGenericZeroMaterialPropertyByName().

562 {
563  _zero_block_material_props[block_id].insert(name);
564 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:985

◆ subdomainSetup()

void FEProblemBase::subdomainSetup ( SubdomainID  subdomain,
const THREAD_ID  tid 
)
virtual

Definition at line 2230 of file FEProblemBase.C.

Referenced by ComputeMarkerThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeDiracThread::subdomainChanged(), NonlinearThread::subdomainChanged(), ComputeUserObjectsThread::subdomainChanged(), and ThreadedFaceLoop< RangeType >::subdomainChanged().

2231 {
2232  _all_materials.subdomainSetup(subdomain, tid);
2233 
2234  // Call the subdomain methods of the output system, these are not threaded so only call it once
2235  if (tid == 0)
2237 
2238  for (auto & nl : _nl)
2239  nl->subdomainSetup(subdomain, tid);
2240 
2241  // FIXME: call displaced_problem->subdomainSetup() ?
2242  // When adding possibility with materials being evaluated on displaced mesh
2243 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
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:1772

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

Referenced by computeNearNullSpace(), computeNullSpace(), and computeTransposeNullSpace().

1655  {
1656  if (_subspace_dim.count(prefix))
1657  return _subspace_dim.find(prefix)->second;
1658  else
1659  return 0;
1660  }
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 3684 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), LineMaterialSamplerBase< Real >::execute(), ComputeMarkerThread::onElement(), ComputeElemAuxVarsThread< AuxKernelType >::onElement(), ComputeIndicatorThread::onElement(), NonlinearThread::onElement(), and ComputeUserObjectsThread::onElement().

3685 {
3686  auto && elem = _assembly[tid][0]->elem();
3688 }
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.
MaterialData & getMaterialData(const THREAD_ID tid)
MaterialPropertyStorage & _material_props

◆ swapBackMaterialsFace()

void FEProblemBase::swapBackMaterialsFace ( const THREAD_ID  tid)
virtual

Definition at line 3691 of file FEProblemBase.C.

Referenced by NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and ComputeElemAuxBcsThread< AuxKernelType >::operator()().

3692 {
3693  auto && elem = _assembly[tid][0]->elem();
3694  unsigned int side = _assembly[tid][0]->side();
3695  _bnd_material_props.getMaterialData(tid).swapBack(*elem, side);
3696 }
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.
MaterialData & getMaterialData(const THREAD_ID tid)

◆ swapBackMaterialsNeighbor()

void FEProblemBase::swapBackMaterialsNeighbor ( const THREAD_ID  tid)
virtual

Definition at line 3699 of file FEProblemBase.C.

Referenced by NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and ComputeElemAuxBcsThread< AuxKernelType >::operator()().

3700 {
3701  // NOTE: this will not work with h-adaptivity
3702  const Elem * neighbor = _assembly[tid][0]->neighbor();
3703  unsigned int neighbor_side =
3704  neighbor ? neighbor->which_neighbor_am_i(_assembly[tid][0]->elem()) : libMesh::invalid_uint;
3705 
3706  if (!neighbor)
3707  {
3708  if (haveFV())
3709  {
3710  // If neighbor is null, then we're on the neighbor side of a mesh boundary, e.g. we're off
3711  // the mesh in ghost-land. If we're using the finite volume method, then variable values and
3712  // consequently material properties have well-defined values in this ghost region outside of
3713  // the mesh and we really do want to reinit our neighbor materials in this case. Since we're
3714  // off in ghost land it's safe to do swaps with `MaterialPropertyStorage` using the elem and
3715  // elem_side keys
3716  neighbor = _assembly[tid][0]->elem();
3717  neighbor_side = _assembly[tid][0]->side();
3718  mooseAssert(neighbor, "We should have an appropriate value for elem coming from Assembly");
3719  }
3720  else
3721  mooseError("neighbor is null in Assembly!");
3722  }
3723 
3724  _neighbor_material_props.getMaterialData(tid).swapBack(*neighbor, neighbor_side);
3725 }
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
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.
MaterialData & getMaterialData(const THREAD_ID tid)
MaterialPropertyStorage & _neighbor_material_props

◆ systemBaseAuxiliary() [1/2]

const SystemBase & FEProblemBase::systemBaseAuxiliary ( ) const
overridevirtual

Return the auxiliary system object as a base class reference.

Implements SubProblem.

Definition at line 8140 of file FEProblemBase.C.

8141 {
8142  return *_aux;
8143 }
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ systemBaseAuxiliary() [2/2]

SystemBase & FEProblemBase::systemBaseAuxiliary ( )
overridevirtual

Implements SubProblem.

Definition at line 8146 of file FEProblemBase.C.

8147 {
8148  return *_aux;
8149 }
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

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

Referenced by MooseApp::attachRelationshipManagers().

8128 {
8129  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
8130  return *_nl[sys_num];
8131 }
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 8134 of file FEProblemBase.C.

8135 {
8136  return *_nl[sys_num];
8137 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ terminateSolve()

virtual void Problem::terminateSolve ( )
inlinevirtualinherited

Allow objects to request clean termination of the solve.

Definition at line 37 of file Problem.h.

Referenced by Terminator::execute().

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

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

Referenced by Steady::execute(), Eigenvalue::execute(), NonlinearEigen::takeStep(), and Transient::takeStep().

1259 {
1261 
1262  if (_t_step > 1 && _num_grid_steps)
1263  {
1264  MeshRefinement mesh_refinement(_mesh);
1265  std::unique_ptr<MeshRefinement> displaced_mesh_refinement(nullptr);
1266  if (_displaced_mesh)
1267  displaced_mesh_refinement = std::make_unique<MeshRefinement>(*_displaced_mesh);
1268 
1269  for (MooseIndex(_num_grid_steps) i = 0; i < _num_grid_steps; ++i)
1270  {
1271  if (_displaced_problem)
1272  // If the DisplacedProblem is active, undisplace the DisplacedMesh in preparation for
1273  // refinement. We can't safely refine the DisplacedMesh directly, since the Hilbert keys
1274  // computed on the inconsistenly-displaced Mesh are different on different processors,
1275  // leading to inconsistent Hilbert keys. We must do this before the undisplaced Mesh is
1276  // coarsensed, so that the element and node numbering is still consistent. We also have to
1277  // make sure this is done during every step of coarsening otherwise different partitions
1278  // will be generated for the reference and displaced meshes (even for replicated)
1279  _displaced_problem->undisplaceMesh();
1280 
1281  mesh_refinement.uniformly_coarsen();
1282  if (_displaced_mesh)
1283  displaced_mesh_refinement->uniformly_coarsen();
1284 
1285  // Mark this as an intermediate change because we do not yet want to reinit_systems. E.g. we
1286  // need things to happen in the following order for the undisplaced problem:
1287  // u1) EquationSystems::reinit_solutions. This will restrict the solution vectors and then
1288  // contract the mesh
1289  // u2) MooseMesh::meshChanged. This will update the node/side lists and other
1290  // things which needs to happen after the contraction
1291  // u3) GeometricSearchData::reinit. Once the node/side lists are updated we can perform our
1292  // geometric searches which will aid in determining sparsity patterns
1293  //
1294  // We do these things for the displaced problem (if it exists)
1295  // d1) EquationSystems::reinit. Restrict the displaced problem vector copies and then contract
1296  // the mesh. It's safe to do a full reinit with the displaced because there are no
1297  // matrices that sparsity pattern calculations will be conducted for
1298  // d2) MooseMesh::meshChanged. This will update the node/side lists and other
1299  // things which needs to happen after the contraction
1300  // d3) UpdateDisplacedMeshThread::operator(). Re-displace the mesh using the *displaced*
1301  // solution vector copy because we don't know the state of the reference solution vector.
1302  // It's safe to use the displaced copy because we are outside of a non-linear solve,
1303  // and there is no concern about differences between solution and current_local_solution
1304  // d4) GeometricSearchData::reinit. With the node/side lists updated and the mesh
1305  // re-displaced, we can perform our geometric searches, which will aid in determining the
1306  // sparsity pattern of the matrix held by the libMesh::ImplicitSystem held by the
1307  // NonlinearSystem held by this
1308  meshChangedHelper(/*intermediate_change=*/true);
1309  }
1310 
1311  // u4) Now that all the geometric searches have been done (both undisplaced and displaced),
1312  // we're ready to update the sparsity pattern
1313  es().reinit_systems();
1314  }
1315 
1316  if (_line_search)
1317  _line_search->timestepSetup();
1318 
1319  // Random interface objects
1320  for (const auto & it : _random_data_objects)
1321  it.second->updateSeeds(EXEC_TIMESTEP_BEGIN);
1322 
1323  unsigned int n_threads = libMesh::n_threads();
1324  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1325  {
1328  }
1329 
1330  _aux->timestepSetup();
1331  for (auto & nl : _nl)
1332  nl->timestepSetup();
1333 
1334  if (_displaced_problem)
1335  // timestepSetup for displaced systems
1336  _displaced_problem->timestepSetup();
1337 
1338  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1339  {
1342  _markers.timestepSetup(tid);
1343  }
1344 
1345  std::vector<UserObject *> userobjs;
1346  theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(userobjs);
1347  for (auto obj : userobjs)
1348  obj->timestepSetup();
1349 
1350  // Timestep setup of output objects
1352 
1355  _has_nonlocal_coupling = true;
1356 }
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
Definition: SubProblem.h:1017
unsigned int n_threads()
void meshChangedHelper(bool intermediate_change=false)
Helper method to update some or all data after a mesh change.
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
virtual void timestepSetup(THREAD_ID tid=0) const
unsigned int _num_grid_steps
Number of steps in a grid sequence.
virtual EquationSystems & es() override
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators
TheWarehouse & theWarehouse() const
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:33
virtual void timestepSetup(THREAD_ID tid=0) const
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:69
MooseObjectWarehouse< Indicator > _indicators
virtual void timestepSetup()
Definition: SubProblem.C:1130
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:1772
MooseMesh * _displaced_mesh
unsigned int THREAD_ID
Definition: MooseTypes.h:198
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 528 of file FEProblemBase.h.

Referenced by EigenExecutionerBase::EigenExecutionerBase(), and Transient::Transient().

528 { _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 5586 of file FEProblemBase.C.

Referenced by SingleMatrixPreconditioner::SingleMatrixPreconditioner().

5587 {
5589  mooseError("Someone told us (the FEProblemBase) to trust the user coupling matrix, but we "
5590  "haven't been provided a coupling matrix!");
5591 
5593 }
bool _trust_user_coupling_matrix
Whether to trust the user coupling matrix no matter what.
Moose::CouplingType _coupling
Type of variable coupling.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ type()

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

Get the type of this class.

Returns
the name of the type of this class

Definition at line 50 of file MooseBase.h.

Referenced by CreateProblemDefaultAction::act(), SetupDebugAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), addAuxArrayVariable(), addAuxScalarVariable(), addAuxVariable(), addDistribution(), addFunction(), addMeshDivision(), MeshGenerator::addMeshSubgenerator(), addObject(), addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), addReporter(), addSampler(), addTimeIntegrator(), MooseServer::addValuesToList(), DisplacedProblem::addVectorTag(), SubProblem::addVectorTag(), advanceMultiApps(), PhysicsBase::assertParamDefined(), AuxKernelTempl< Real >::AuxKernelTempl(), backupMultiApps(), BoundaryPreservedMarker::BoundaryPreservedMarker(), DistributedRectilinearMeshGenerator::buildCube(), MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildPRefinementAndCoarseningMaps(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), PhysicsBase::checkRequiredTasks(), computeAuxiliaryKernels(), 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(), HFEMDiffusion::computeLowerDQpJacobian(), HFEMDirichletBC::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(), ArrayDGDiffusion::computeQpJacobian(), InterfaceReaction::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGDiffusion::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), HFEMTestJump::computeQpOffDiagJacobian(), HFEMTrialJump::computeQpOffDiagJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), ArrayDGKernel::computeQpOffDiagJacobian(), DGConvection::computeQpResidual(), HFEMDiffusion::computeQpResidual(), ArrayHFEMDiffusion::computeQpResidual(), ScalarKernel::computeQpResidual(), InterfaceDiffusion::computeQpResidual(), InterfaceReaction::computeQpResidual(), ADDGAdvection::computeQpResidual(), ArrayDGDiffusion::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), DGDiffusion::computeQpResidual(), ADDGDiffusion::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), HFEMTestJump::computeQpResidual(), HFEMTrialJump::computeQpResidual(), EqualValueEmbeddedConstraint::computeQpResidual(), computeUserObjectByName(), computeUserObjects(), computeUserObjectsInternal(), BatchMaterial< Tuple, Output, Input >::construct(), DisplacedProblem::createQRules(), createQRules(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), duplicateVariableCheck(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), MooseBaseErrorInterface::errorPrefix(), AB2PredictorCorrector::estimateTimeError(), execMultiApps(), execMultiAppTransfers(), execTransfers(), finishMultiAppStep(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), SubdomainPerElementGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateInternal(), MultiAppTransfer::getAppInfo(), TransfiniteMeshGenerator::getEdge(), ElementGenerator::getElemType(), MooseServer::getInputLookupDefinitionNodes(), getMaterial(), getMaterialData(), MaterialOutputAction::getParams(), ReporterData::getReporterInfo(), Transient::getTimeIntegratorName(), getTransfers(), DisplacedProblem::getVectorTags(), SubProblem::getVectorTags(), CommonOutputAction::hasConsole(), hasMultiApps(), AdvancedOutput::hasOutput(), incrementMultiAppTStep(), AdvancedOutput::initAvailableLists(), FunctorPositions::initialize(), FunctorTimes::initialize(), MultiAppConservativeTransfer::initialSetup(), ArrayDGDiffusion::initQpResidual(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), logAdd(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), DisplacedProblem::numVectorTags(), SubProblem::numVectorTags(), MooseBaseParameterInterface::objectErrorPrefix(), Console::output(), AdvancedOutput::output(), OversampleOutput::outputStep(), Output::outputStep(), outputStep(), ProjectedStatefulMaterialStorageAction::processProperty(), SolutionInvalidInterface::registerInvalidSolutionInternal(), restoreMultiApps(), MeshRepairGenerator::separateSubdomainsByElementType(), setCoupling(), MooseBase::typeAndName(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), DisplacedProblem::updateGeomSearch(), updateGeomSearch(), UserObjectInterface::userObjectType(), and AdvancedOutput::wantOutput().

50 { return _type; }
const std::string & _type
The type of this class.
Definition: MooseBase.h:72

◆ typeAndName()

std::string MooseBase::typeAndName ( ) const
inlineinherited

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 62 of file MooseBase.h.

Referenced by MaterialPropertyStorage::addProperty(), MeshGeneratorSystem::dataDrivenError(), ReporterContext< std::vector< T > >::finalize(), and ReporterData::getReporterInfo().

63  {
64  return type() + std::string(" \"") + name() + std::string("\"");
65  }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50

◆ uDotDotOldRequested()

virtual bool FEProblemBase::uDotDotOldRequested ( )
inlinevirtual

Get boolean flag to check whether old solution second time derivative needs to be stored.

Definition at line 1910 of file FEProblemBase.h.

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

1911  {
1913  mooseError("FEProblemBase: When requesting old second time derivative of solution, current "
1914  "second time derivation of solution should also be stored. Please set "
1915  "`u_dotdot_requested` to true using setUDotDotRequested.");
1916  return _u_dotdot_old_requested;
1917  }
bool _u_dotdot_old_requested
Whether old solution second time derivative needs to be stored.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.

◆ uDotDotRequested()

virtual bool FEProblemBase::uDotDotRequested ( )
inlinevirtual

Get boolean flag to check whether solution second time derivative needs to be stored.

Definition at line 1896 of file FEProblemBase.h.

Referenced by AuxiliarySystem::addDotVectors(), NonlinearSystemBase::addDotVectors(), and addTimeIntegrator().

1896 { 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 1899 of file FEProblemBase.h.

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

1900  {
1902  mooseError("FEProblemBase: When requesting old time derivative of solution, current time "
1903  "derivative of solution should also be stored. Please set `u_dot_requested` to "
1904  "true using setUDotRequested.");
1905 
1906  return _u_dot_old_requested;
1907  }
bool _u_dot_requested
Whether solution time derivative needs to be stored.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.

◆ uDotRequested()

virtual bool FEProblemBase::uDotRequested ( )
inlinevirtual

Get boolean flag to check whether solution time derivative needs to be stored.

Definition at line 1893 of file FEProblemBase.h.

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

1893 { 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 8170 of file FEProblemBase.C.

Referenced by FEProblemSolve::solve().

8171 {
8172  // ResetDisplacedMeshThread::onNode looks up the reference mesh by ID, so we need to make sure
8173  // we undisplace before adapting the reference mesh
8174  if (_displaced_problem)
8175  _displaced_problem->undisplaceMesh();
8176 
8178  if (_displaced_problem)
8180 
8181  meshChangedHelper(/*intermediate_change=*/false);
8182 }
void meshChangedHelper(bool intermediate_change=false)
Helper method to update some or all data after a mesh change.
static void uniformRefine(MooseMesh *mesh, unsigned int level=libMesh::invalid_uint)
Performs uniform refinement of the passed Mesh object.
Definition: Adaptivity.C:266
MooseMesh & _mesh
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ uniqueName()

MooseObjectName MooseBaseParameterInterface::uniqueName ( ) const
inlineinherited

The unique name for accessing input parameters of this object in the InputParameterWarehouse.

Definition at line 68 of file MooseBaseParameterInterface.h.

Referenced by MooseBaseParameterInterface::connectControllableParams(), and Action::uniqueActionName().

69  {
70  return MooseObjectName(_pars.get<std::string>("_unique_name"));
71  }
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing the names of MooseObject by tag and object name.

◆ uniqueParameterName()

MooseObjectParameterName MooseBaseParameterInterface::uniqueParameterName ( const std::string &  parameter_name) const
inlineinherited

The unique parameter name of a valid parameter of this object for accessing parameter controls.

Definition at line 53 of file MooseBaseParameterInterface.h.

54  {
56  _pars.get<std::string>("_moose_base"), _moose_base->name(), parameter_name);
57  }
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const MooseBase *const _moose_base
The MooseBase object that inherits this class.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing an input parameter name.

◆ updateActiveObjects()

void FEProblemBase::updateActiveObjects ( )
virtual

Update the active objects in the warehouses.

Reimplemented in DumpObjectsProblem.

Definition at line 4598 of file FEProblemBase.C.

Referenced by MooseEigenSystem::eigenKernelOnCurrent(), MooseEigenSystem::eigenKernelOnOld(), and FixedPointSolve::solveStep().

4599 {
4600  TIME_SECTION("updateActiveObjects", 5, "Updating Active Objects");
4601 
4602  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
4603  {
4604  for (auto & nl : _nl)
4605  nl->updateActive(tid);
4606  _aux->updateActive(tid);
4609  _markers.updateActive(tid);
4611  _materials.updateActive(tid);
4613  }
4614 
4622 }
unsigned int n_threads()
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.
void updateActive(THREAD_ID tid=0) override
Updates the active objects storage.
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling &#39;computeDT&#39;)
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators
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:198
MaterialWarehouse _materials

◆ updateGeomSearch()

void FEProblemBase::updateGeomSearch ( GeometricSearchData::GeometricSearchType  type = GeometricSearchData::ALL)
overridevirtual

Implements SubProblem.

Definition at line 7009 of file FEProblemBase.C.

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

7010 {
7011  TIME_SECTION("updateGeometricSearch", 3, "Updating Geometric Search");
7012 
7014 
7015  if (_displaced_problem)
7016  _displaced_problem->updateGeomSearch(type);
7017 }
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
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 5454 of file FEProblemBase.C.

Referenced by bumpAllQRuleOrder(), bumpVolumeQRuleOrder(), and createQRules().

5455 {
5456  // Find the maximum number of quadrature points
5457  {
5458  MaxQpsThread mqt(*this);
5459  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), mqt);
5460  _max_qps = mqt.max();
5461 
5462  // If we have more shape functions or more quadrature points on
5463  // another processor, then we may need to handle those elements
5464  // ourselves later after repartitioning.
5466  }
5467 
5468  unsigned int max_qpts = getMaxQps();
5469  if (max_qpts > Moose::constMaxQpsPerElem)
5470  mooseError("Max quadrature points per element assumptions made in some code (e.g. Coupleable ",
5471  "and MaterialPropertyInterface classes) have been violated.\n",
5472  "Complain to Moose developers to have constMaxQpsPerElem increased from ",
5474  " to ",
5475  max_qpts);
5476  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
5477  {
5478  // the highest available order in libMesh is 43
5479  _scalar_zero[tid].resize(FORTYTHIRD, 0);
5480  _zero[tid].resize(max_qpts, 0);
5481  _ad_zero[tid].resize(max_qpts, 0);
5482  _grad_zero[tid].resize(max_qpts, RealGradient(0.));
5483  _ad_grad_zero[tid].resize(max_qpts, ADRealGradient(0));
5484  _second_zero[tid].resize(max_qpts, RealTensor(0.));
5485  _ad_second_zero[tid].resize(max_qpts, ADRealTensorValue(0));
5486  _vector_zero[tid].resize(max_qpts, RealGradient(0.));
5487  _vector_curl_zero[tid].resize(max_qpts, RealGradient(0.));
5488  }
5489 }
ADRealVectorValue ADRealGradient
Definition: MooseTypes.h:357
This class determines the maximum number of Quadrature Points and Shape Functions used for a given si...
Definition: MaxQpsThread.h:27
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1040
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:218
std::vector< VariableSecond > _second_zero
std::vector< MooseArray< ADReal > > _ad_zero
std::vector< VectorVariableCurl > _vector_curl_zero
const Parallel::Communicator & _communicator
MooseMesh & _mesh
libMesh::TensorValue< ADReal > ADRealTensorValue
Definition: MooseTypes.h:359
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.
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 7268 of file FEProblemBase.C.

Referenced by initialSetup(), and FixedPointSolve::solveStep().

7269 {
7270  TIME_SECTION("updateMeshXFEM", 5, "Updating XFEM");
7271 
7272  bool updated = false;
7273  if (haveXFEM())
7274  {
7275  if (_xfem->updateHeal())
7276  meshChanged();
7277 
7278  updated = _xfem->update(_time, _nl, *_aux);
7279  if (updated)
7280  {
7281  meshChanged();
7282  _xfem->initSolution(_nl, *_aux);
7283  restoreSolutions();
7284  }
7285  }
7286  return updated;
7287 }
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 meshChanged() override
Update data after a mesh change.
virtual void restoreSolutions()
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.

◆ updateMortarMesh()

void FEProblemBase::updateMortarMesh ( )
virtual

Definition at line 7020 of file FEProblemBase.C.

Referenced by computeResidualAndJacobian(), computeResidualTags(), init(), and meshChangedHelper().

7021 {
7022  TIME_SECTION("updateMortarMesh", 5, "Updating Mortar Mesh");
7023 
7024  FloatingPointExceptionGuard fpe_guard(_app);
7025 
7026  _mortar_data.update();
7027 }
Scope guard for starting and stopping Floating Point Exception Trapping.
MortarData _mortar_data
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
void update()
Builds mortar segment meshes for each mortar interface.
Definition: MortarData.C:149

◆ updateSolution()

bool FEProblemBase::updateSolution ( NumericVector< Number > &  vec_solution,
NumericVector< 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 6988 of file FEProblemBase.C.

Referenced by computePostCheck().

6990 {
6991  return false;
6992 }

◆ useSNESMFReuseBase()

bool FEProblemBase::useSNESMFReuseBase ( )
inline

Return a flag that indicates if we are reusing the vector base.

Definition at line 1847 of file FEProblemBase.h.

Referenced by NonlinearSystem::solve().

1847 { 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

One entry of coord system per block, the size of _blocks and _coord_sys has to match, except:

  1. _blocks.size() == 0, then there needs to be just one entry in _coord_sys, which will be set for the whole domain
  2. _blocks.size() > 0 and no coordinate system was specified, then the whole domain will be XYZ.
  3. _blocks.size() > 0 and one coordinate system was specified, then the whole domain will be that system.

Definition at line 141 of file FEProblemBase.C.

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

142 {
144  params.addParam<unsigned int>("null_space_dimension", 0, "The dimension of the nullspace");
145  params.addParam<unsigned int>(
146  "transpose_null_space_dimension", 0, "The dimension of the transpose nullspace");
147  params.addParam<unsigned int>(
148  "near_null_space_dimension", 0, "The dimension of the near nullspace");
149  params.addParam<bool>("solve",
150  true,
151  "Whether or not to actually solve the Nonlinear system. "
152  "This is handy in the case that all you want to do is "
153  "execute AuxKernels, Transfers, etc. without actually "
154  "solving anything");
155  params.addParam<bool>("use_nonlinear",
156  true,
157  "Determines whether to use a Nonlinear vs a "
158  "Eigenvalue system (Automatically determined based "
159  "on executioner)");
160  params.addParam<bool>("error_on_jacobian_nonzero_reallocation",
161  "This causes PETSc to error if it had to reallocate memory in the Jacobian "
162  "matrix due to not having enough nonzeros");
163  params.addParam<bool>("ignore_zeros_in_jacobian",
164  false,
165  "Do not explicitly store zero values in "
166  "the Jacobian matrix if true");
167  params.addParam<bool>("force_restart",
168  false,
169  "EXPERIMENTAL: If true, a sub_app may use a "
170  "restart file instead of using of using the master "
171  "backup file");
172  params.addDeprecatedParam<bool>("skip_additional_restart_data",
173  false,
174  "True to skip additional data in equation system for restart.",
175  "This parameter is no longer used, as we do not load additional "
176  "vectors by default with restart");
177  params.addParam<bool>("skip_nl_system_check",
178  false,
179  "True to skip the NonlinearSystem check for work to do (e.g. Make sure "
180  "that there are variables to solve for).");
181  params.addParam<bool>("allow_initial_conditions_with_restart",
182  false,
183  "True to allow the user to specify initial conditions when restarting. "
184  "Initial conditions can override any restarted field");
185 
191  params.addDeprecatedParam<std::vector<SubdomainName>>(
192  "block", {}, "Block IDs for the coordinate systems", "Please use 'Mesh/coord_block' instead");
193  MultiMooseEnum coord_types("XYZ RZ RSPHERICAL", "XYZ");
194  MooseEnum rz_coord_axis("X=0 Y=1", "Y");
195  params.addDeprecatedParam<MultiMooseEnum>("coord_type",
196  coord_types,
197  "Type of the coordinate system per block param",
198  "Please use 'Mesh/coord_type' instead");
199  params.addDeprecatedParam<MooseEnum>("rz_coord_axis",
200  rz_coord_axis,
201  "The rotation axis (X | Y) for axisymetric coordinates",
202  "Please use 'Mesh/rz_coord_axis' instead");
203  params.addParam<bool>(
204  "kernel_coverage_check", true, "Set to false to disable kernel->subdomain coverage check");
205  params.addParam<bool>(
206  "boundary_restricted_node_integrity_check",
207  true,
208  "Set to false to disable checking of boundary restricted nodal object variable dependencies, "
209  "e.g. are the variable dependencies defined on the selected boundaries?");
210  params.addParam<bool>("boundary_restricted_elem_integrity_check",
211  true,
212  "Set to false to disable checking of boundary restricted elemental object "
213  "variable dependencies, e.g. are the variable dependencies defined on the "
214  "selected boundaries?");
215  params.addParam<bool>("material_coverage_check",
216  true,
217  "Set to false to disable material->subdomain coverage check");
218  params.addParam<bool>("fv_bcs_integrity_check",
219  true,
220  "Set to false to disable checking of overlapping Dirichlet and Flux BCs "
221  "and/or multiple DirichletBCs per sideset");
222 
223  params.addParam<bool>(
224  "material_dependency_check", true, "Set to false to disable material dependency check");
225  params.addParam<bool>("parallel_barrier_messaging",
226  false,
227  "Displays messaging from parallel "
228  "barrier notifications when executing "
229  "or transferring to/from Multiapps "
230  "(default: false)");
231 
232  params.addParam<bool>(
233  "verbose_setup", false, "Set to True to have the problem report on any object created");
234  params.addParam<bool>("verbose_multiapps",
235  false,
236  "Set to True to enable verbose screen printing related to MultiApps");
237 
238  params.addParam<FileNameNoExtension>("restart_file_base",
239  "File base name used for restart (e.g. "
240  "<path>/<filebase> or <path>/LATEST to "
241  "grab the latest file available)");
242 
243  params.addParam<std::vector<std::vector<TagName>>>(
244  "extra_tag_vectors",
245  {},
246  "Extra vectors to add to the system that can be filled by objects which compute residuals "
247  "and Jacobians (Kernels, BCs, etc.) by setting tags on them. The outer index is for which "
248  "nonlinear system the extra tag vectors should be added for");
249 
250  params.addParam<std::vector<std::vector<TagName>>>(
251  "extra_tag_matrices",
252  {},
253  "Extra matrices to add to the system that can be filled "
254  "by objects which compute residuals and Jacobians "
255  "(Kernels, BCs, etc.) by setting tags on them. The outer index is for which "
256  "nonlinear system the extra tag vectors should be added for");
257 
258  params.addParam<std::vector<TagName>>(
259  "extra_tag_solutions",
260  {},
261  "Extra solution vectors to add to the system that can be used by "
262  "objects for coupling variable values stored in them.");
263 
264  params.addParam<bool>("previous_nl_solution_required",
265  false,
266  "True to indicate that this calculation requires a solution vector for "
267  "storing the previous nonlinear iteration.");
268 
269  params.addParam<std::vector<NonlinearSystemName>>(
270  "nl_sys_names", std::vector<NonlinearSystemName>{"nl0"}, "The nonlinear system names");
271 
272  params.addParam<bool>("check_uo_aux_state",
273  false,
274  "True to turn on a check that no state presents during the evaluation of "
275  "user objects and aux kernels");
276 
277  params.addPrivateParam<MooseMesh *>("mesh");
278 
279  params.declareControllable("solve");
280 
281  params.addParam<bool>(
282  "allow_invalid_solution",
283  false,
284  "Set to true to allow convergence even though the solution has been marked as 'invalid'");
285  params.addParam<bool>("immediately_print_invalid_solution",
286  false,
287  "Whether or not to report invalid solution warnings at the time the "
288  "warning is produced instead of after the calculation");
289 
290  params.addParam<bool>(
291  "identify_variable_groups_in_nl",
292  true,
293  "Whether to identify variable groups in nonlinear systems. This affects dof ordering");
294 
295  params.addParam<bool>(
296  "regard_general_exceptions_as_errors",
297  false,
298  "If we catch an exception during residual/Jacobian evaluaton for which we don't have "
299  "specific handling, immediately error instead of allowing the time step to be cut");
300 
301  params.addParamNamesToGroup(
302  "skip_nl_system_check kernel_coverage_check boundary_restricted_node_integrity_check "
303  "boundary_restricted_elem_integrity_check material_coverage_check fv_bcs_integrity_check "
304  "material_dependency_check check_uo_aux_state error_on_jacobian_nonzero_reallocation",
305  "Simulation checks");
306  params.addParamNamesToGroup("use_nonlinear previous_nl_solution_required nl_sys_names "
307  "ignore_zeros_in_jacobian",
308  "Nonlinear system(s)");
309  params.addParamNamesToGroup(
310  "restart_file_base force_restart allow_initial_conditions_with_restart", "Restart");
311  params.addParamNamesToGroup("verbose_setup verbose_multiapps parallel_barrier_messaging",
312  "Verbosity");
313  params.addParamNamesToGroup(
314  "null_space_dimension transpose_null_space_dimension near_null_space_dimension",
315  "Null space removal");
316  params.addParamNamesToGroup("extra_tag_vectors extra_tag_matrices extra_tag_solutions",
317  "Tagging");
318  params.addParamNamesToGroup("allow_invalid_solution immediately_print_invalid_solution",
319  "Solution validity control");
320 
321  return params;
322 }
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:88
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
static InputParameters validParams()
Definition: SubProblem.C:33
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
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 125 of file SubProblem.C.

126 {
127  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
128 
129  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
130  for (const auto & vector_tag : _vector_tags)
131  if (vector_tag._name == tag_name_upper)
132  return true;
133 
134  return false;
135 }
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1037
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1094
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:218

◆ vectorTagName()

TagName SubProblem::vectorTagName ( const TagID  tag) const
virtualinherited

Retrieve the name associated with a TagID.

Reimplemented in DisplacedProblem.

Definition at line 198 of file SubProblem.C.

Referenced by SystemBase::addVector(), SystemBase::closeTaggedVector(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), SystemBase::removeVector(), NonlinearSystemBase::residualGhosted(), DisplacedProblem::vectorTagName(), and SystemBase::zeroTaggedVector().

199 {
200  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
201  if (!vectorTagExists(tag_id))
202  mooseError("Vector tag with ID ", tag_id, " does not exist");
203 
204  return _vector_tags[tag_id]._name;
205 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1094
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:218
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:163
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ vectorTagType()

Moose::VectorTagType SubProblem::vectorTagType ( const TagID  tag_id) const
virtualinherited

Reimplemented in DisplacedProblem.

Definition at line 208 of file SubProblem.C.

Referenced by MooseVariableScalar::reinit(), TaggingInterface::TaggingInterface(), and DisplacedProblem::vectorTagType().

209 {
210  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
211  if (!vectorTagExists(tag_id))
212  mooseError("Vector tag with ID ", tag_id, " does not exist");
213 
214  return _vector_tags[tag_id]._type;
215 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1094
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:218
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:163
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ verboseMultiApps()

bool FEProblemBase::verboseMultiApps ( ) const
inline

Whether or not to use verbose printing for MultiApps.

Definition at line 1620 of file FEProblemBase.h.

Referenced by MultiApp::backup(), MultiApp::createApp(), MultiApp::restore(), FullSolveMultiApp::showStatusMessage(), and TransientMultiApp::solveStep().

1620 { 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 218 of file SubProblem.C.

Referenced by SubProblem::addVectorTag(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), SubProblem::getVectorTags(), SubProblem::numVectorTags(), SubProblem::vectorTagExists(), SubProblem::vectorTagName(), and SubProblem::vectorTagType().

219 {
220  for (TagID tag_id = 0; tag_id < _vector_tags.size(); ++tag_id)
221  {
222  const auto & vector_tag = _vector_tags[tag_id];
223 
224  if (vector_tag._id != tag_id)
225  mooseError("Vector tag ", vector_tag._id, " id mismatch in _vector_tags");
226  if (vector_tag._type == Moose::VECTOR_TAG_ANY)
227  mooseError("Vector tag '", vector_tag._name, "' has type VECTOR_TAG_ANY");
228 
229  const auto search = _vector_tags_name_map.find(vector_tag._name);
230  if (search == _vector_tags_name_map.end())
231  mooseError("Vector tag ", vector_tag._id, " is not in _vector_tags_name_map");
232  else if (search->second != tag_id)
233  mooseError("Vector tag ", vector_tag._id, " has incorrect id in _vector_tags_name_map");
234 
235  unsigned int found_in_type = 0;
236  for (TagTypeID tag_type_id = 0; tag_type_id < _typed_vector_tags[vector_tag._type].size();
237  ++tag_type_id)
238  {
239  const auto & vector_tag_type = _typed_vector_tags[vector_tag._type][tag_type_id];
240  if (vector_tag_type == vector_tag)
241  {
242  ++found_in_type;
243  if (vector_tag_type._type_id != tag_type_id)
244  mooseError("Type ID for Vector tag ", tag_id, " is incorrect");
245  }
246  }
247 
248  if (found_in_type == 0)
249  mooseError("Vector tag ", tag_id, " not found in _typed_vector_tags");
250  if (found_in_type > 1)
251  mooseError("Vector tag ", tag_id, " found multiple times in _typed_vector_tags");
252  }
253 
254  unsigned int num_typed_vector_tags = 0;
255  for (const auto & typed_vector_tags : _typed_vector_tags)
256  num_typed_vector_tags += typed_vector_tags.size();
257  if (num_typed_vector_tags != _vector_tags.size())
258  mooseError("Size mismatch between _vector_tags and _typed_vector_tags");
259  if (_vector_tags_name_map.size() != _vector_tags.size())
260  mooseError("Size mismatch between _vector_tags and _vector_tags_name_map");
261 
262  return true;
263 }
unsigned int TagTypeID
Definition: MooseTypes.h:200
unsigned int TagID
Definition: MooseTypes.h:199
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1094
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1104
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:1101
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

Friends And Related Function Documentation

◆ AuxiliarySystem

friend class AuxiliarySystem
friend

Definition at line 2593 of file FEProblemBase.h.

◆ DisplacedProblem

friend class DisplacedProblem
friend

Definition at line 2598 of file FEProblemBase.h.

◆ MooseEigenSystem

friend class MooseEigenSystem
friend

Definition at line 2595 of file FEProblemBase.h.

◆ NonlinearSystemBase

friend class NonlinearSystemBase
friend

Definition at line 2594 of file FEProblemBase.h.

◆ Restartable

friend class Restartable
friend

Definition at line 2597 of file FEProblemBase.h.

◆ Resurrector

friend class Resurrector
friend

Definition at line 2596 of file FEProblemBase.h.

Member Data Documentation

◆ _action_factory

ActionFactory& MooseBaseParameterInterface::_action_factory
protectedinherited

◆ _active_elemental_moose_variables

std::vector<std::set<MooseVariableFieldBase *> > SubProblem::_active_elemental_moose_variables
protectedinherited

This is the set of MooseVariableFieldBase that will actually get reinited by a call to reinit(elem)

Definition at line 1002 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 1779 of file FEProblemBase.h.

Referenced by FEProblemBase(), updateMaxQps(), and ~FEProblemBase().

◆ _ad_second_zero

std::vector<MooseArray<ADRealTensorValue> > FEProblemBase::_ad_second_zero

Definition at line 1782 of file FEProblemBase.h.

Referenced by FEProblemBase(), updateMaxQps(), and ~FEProblemBase().

◆ _ad_zero

std::vector<MooseArray<ADReal> > FEProblemBase::_ad_zero

Definition at line 1777 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 2285 of file FEProblemBase.h.

Referenced by addUserObject(), and getUserObjects().

◆ _allow_ics_during_restart

const bool FEProblemBase::_allow_ics_during_restart
private

Definition at line 2569 of file FEProblemBase.h.

Referenced by checkICRestartError().

◆ _allow_invalid_solution

const bool& FEProblemBase::_allow_invalid_solution
private

Definition at line 2572 of file FEProblemBase.h.

Referenced by allowInvalidSolution().

◆ _app

MooseApp& MooseBase::_app
protectedinherited

The MOOSE application this is associated with.

Definition at line 69 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 2224 of file FEProblemBase.h.

Referenced by addAuxArrayVariable(), addAuxKernel(), addAuxScalarKernel(), addAuxScalarVariable(), addAuxVariable(), addIndicator(), addMarker(), addMultiApp(), addTimeIntegrator(), addTransfer(), advanceState(), checkExceptionAndStopSolve(), computeAuxiliaryKernels(), computeBounds(), computeIndicators(), EigenProblem::computeJacobianBlocks(), computeJacobianBlocks(), computeJacobianTags(), computeMarkers(), computePostCheck(), computeResidualAndJacobian(), computeResidualTags(), computeUserObjectsInternal(), copySolutionsBackwards(), createQRules(), createTagSolutions(), customSetup(), determineNonlinearSystem(), DumpObjectsProblem::DumpObjectsProblem(), duplicateVariableCheck(), EigenProblem::EigenProblem(), execute(), ExternalProblem::ExternalProblem(), FEProblem::FEProblem(), getActualFieldVariable(), getArrayVariable(), getAuxiliarySystem(), getScalarVariable(), getStandardVariable(), getSystem(), getVariable(), getVariableNames(), getVectorVariable(), hasScalarVariable(), hasVariable(), init(), initialSetup(), meshChangedHelper(), needBoundaryMaterialOnSide(), outputStep(), prepare(), prepareFace(), projectInitialConditionOnCustomRange(), projectSolution(), reinitDirac(), reinitElem(), reinitElemFace(), reinitElemPhys(), reinitNeighbor(), reinitNeighborPhys(), reinitNode(), reinitNodeFace(), reinitNodes(), reinitNodesNeighbor(), reinitScalars(), restoreOldSolutions(), restoreSolutions(), saveOldSolutions(), systemBaseAuxiliary(), timestepSetup(), updateActiveObjects(), and updateMeshXFEM().

◆ _aux_evaluable_local_elem_range

std::unique_ptr<ConstElemRange> FEProblemBase::_aux_evaluable_local_elem_range
protected

Definition at line 2497 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 2303 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 2309 of file FEProblemBase.h.

Referenced by FEProblemBase(), and needSubdomainMaterialOnSide().

◆ _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 2312 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 2440 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 2436 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 2617 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<CouplingMatrix> > FEProblemBase::_cm
protected

Coupling matrix for variables.

Definition at line 2227 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 1032 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 2611 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 2614 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(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), checkExceptionAndStopSolve(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonPlanarSides(), checkProblemIntegrity(), ReferenceResidualProblem::checkRelativeConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), FixedPointSolve::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), NonlinearSystemBase::computeScaling(), Problem::console(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), execMultiApps(), execMultiAppTransfers(), MessageFromInput::execute(), Steady::execute(), Eigenvalue::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), ElementQualityChecker::finalize(), finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), CoarsenBlockGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), initialAdaptMesh(), EigenExecutionerBase::inversePowerIteration(), joinAndFinalize(), Transient::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseBaseErrorInterface::mooseDeprecated(), MooseBaseErrorInterface::mooseInfo(), MooseBaseErrorInterface::mooseWarning(), MooseBaseErrorInterface::mooseWarningNonPrefixed(), ReferenceResidualProblem::nonlinearConvergenceSetup(), ReporterDebugOutput::output(), PerfGraphOutput::output(), MaterialPropertyDebugOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), Console::outputScalarVariables(), Console::outputSystemInformation(), possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), PicardSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), restoreMultiApps(), SimplePredictor::shouldApply(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), NonlinearSystem::solve(), EigenProblem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), FixedPointSolve::solveStep(), PerfGraphLivePrint::start(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), Transient::takeStep(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and ~FEProblemBase().

◆ _const_jacobian

bool FEProblemBase::_const_jacobian
protected

true if the Jacobian is constant

Definition at line 2412 of file FEProblemBase.h.

Referenced by computeJacobianTags(), constJacobian(), prepare(), and setConstJacobian().

◆ _control_warehouse

ExecuteMooseObjectWarehouse<Control> FEProblemBase::_control_warehouse
protected

The control logic warehouse.

Definition at line 2482 of file FEProblemBase.h.

Referenced by executeControls(), getControlWarehouse(), and updateActiveObjects().

◆ _coupling

Moose::CouplingType FEProblemBase::_coupling
protected

Type of variable coupling.

Definition at line 2226 of file FEProblemBase.h.

Referenced by coupling(), init(), setCoupling(), and trustUserCouplingMatrix().

◆ _current_execute_on_flag

ExecFlagType FEProblemBase::_current_execute_on_flag
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 2628 of file FEProblemBase.h.

Referenced by clearCurrentResidualVectorTags(), currentResidualVectorTags(), and setCurrentResidualVectorTags().

◆ _currently_computing_jacobian

bool SubProblem::_currently_computing_jacobian
protectedinherited

Flag to determine whether the problem is currently computing Jacobian.

Definition at line 1026 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 1035 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 1029 of file SubProblem.h.

Referenced by SubProblem::currentlyComputingResidualAndJacobian(), and SubProblem::setCurrentlyComputingResidualAndJacobian().

◆ _cycles_completed

unsigned int FEProblemBase::_cycles_completed
protected

Definition at line 2371 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 1020 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 2379 of file FEProblemBase.h.

Referenced by addAnyRedistributers(), addAuxArrayVariable(), addAuxKernel(), addAuxScalarKernel(), addAuxScalarVariable(), addAuxVariable(), addBoundaryCondition(), addCachedJacobian(), addCachedResidual(), addCachedResidualDirectly(), addConstraint(), addDGKernel(), addDiracKernel(), addDisplacedProblem(), addFunction(), addFunctorMaterial(), addFVKernel(), addGhostedBoundary(), addIndicator(), addInterfaceKernel(), addJacobian(), addJacobianBlockTags(), addJacobianLowerD(), addJacobianNeighbor(), addJacobianNeighborLowerD(), addKernel(), addMarker(), addMaterialHelper(), addMultiApp(), addNodalKernel(), addObjectParamsHelper(), addResidual(), addResidualLower(), addResidualNeighbor(), addScalarKernel(), 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(), doingPRefinement(), getDiracElements(), getDisplacedProblem(), getMortarUserObjects(), ghostGhostedBoundaries(), haveADObjects(), haveDisplaced(), init(), initialSetup(), initXFEM(), jacobianSetup(), mesh(), meshChangedHelper(), outputStep(), possiblyRebuildGeomSearchPatches(), prepare(), prepareAssembly(), prepareFace(), reinitBecauseOfGhostingOrNewGeomObjects(), reinitDirac(), reinitElem(), reinitElemFace(), reinitElemFaceRef(), reinitElemNeighborAndLowerD(), reinitLowerDElem(), reinitNeighbor(), reinitNeighborFaceRef(), reinitNode(), reinitNodeFace(), reinitNodes(), reinitNodesNeighbor(), reinitOffDiagScalars(), reinitScalars(), resetState(), residualSetup(), restoreSolutions(), setActiveElementalMooseVariables(), setActiveFEVariableCoupleableMatrixTags(), setActiveFEVariableCoupleableVectorTags(), setActiveScalarVariableCoupleableMatrixTags(), setActiveScalarVariableCoupleableVectorTags(), setCurrentBoundaryID(), setCurrentLowerDElem(), setCurrentlyComputingResidual(), setCurrentSubdomainID(), setNeighborSubdomainID(), setResidual(), setResidualNeighbor(), EigenProblem::solve(), solve(), timestepSetup(), uniformRefine(), and updateGeomSearch().

◆ _dt

Real& FEProblemBase::_dt
protected

Definition at line 2192 of file FEProblemBase.h.

Referenced by dt(), execMultiApps(), and FEProblemBase().

◆ _dt_old

Real& FEProblemBase::_dt_old
protected

Definition at line 2193 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 53 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _error_on_jacobian_nonzero_reallocation

bool FEProblemBase::_error_on_jacobian_nonzero_reallocation
private

◆ _evaluable_local_elem_range

std::unique_ptr<ConstElemRange> FEProblemBase::_evaluable_local_elem_range
protected

Definition at line 2495 of file FEProblemBase.h.

Referenced by getEvaluableElementRange(), and meshChangedHelper().

◆ _exception_message

std::string FEProblemBase::_exception_message
protected

The error message to go with an exception.

Definition at line 2476 of file FEProblemBase.h.

Referenced by checkExceptionAndStopSolve(), and setException().

◆ _factory

Factory& SubProblem::_factory
protectedinherited

◆ _fail_next_nonlinear_convergence_check

bool FEProblemBase::_fail_next_nonlinear_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 2568 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 2300 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 2446 of file FEProblemBase.h.

Referenced by fvBCsIntegrityCheck().

◆ _fv_ics

FVInitialConditionWarehouse FEProblemBase::_fv_ics
protected

Definition at line 2253 of file FEProblemBase.h.

Referenced by addFVInitialCondition(), and getFVInitialConditionWarehouse().

◆ _geometric_search_data

GeometricSearchData FEProblemBase::_geometric_search_data
protected

◆ _ghosted_elems

std::set<dof_id_type> SubProblem::_ghosted_elems
protectedinherited

Elements that should have Dofs ghosted to the local processor.

Definition at line 1023 of file SubProblem.h.

Referenced by addGhostedElem(), SubProblem::ghostedElems(), initialSetup(), meshChangedHelper(), possiblyRebuildGeomSearchPatches(), and reinitBecauseOfGhostingOrNewGeomObjects().

◆ _grad_phi_zero

std::vector<VariablePhiGradient> FEProblemBase::_grad_phi_zero

Definition at line 1780 of file FEProblemBase.h.

Referenced by FEProblemBase(), initialSetup(), and ~FEProblemBase().

◆ _grad_zero

std::vector<VariableGradient> FEProblemBase::_grad_zero

Definition at line 1778 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 1006 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 2427 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 2397 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 2394 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 2464 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 2409 of file FEProblemBase.h.

Referenced by initialSetup(), and meshChangedHelper().

◆ _has_internal_edge_residual_objects

bool FEProblemBase::_has_internal_edge_residual_objects
private

Whether the problem has dgkernels or interface kernels.

Definition at line 2579 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 2415 of file FEProblemBase.h.

Referenced by computeJacobianTags(), hasJacobian(), meshChangedHelper(), and prepare().

◆ _has_mortar

bool FEProblemBase::_has_mortar
private

Whether the simulation requires mortar coupling.

Definition at line 2601 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 2421 of file FEProblemBase.h.

Referenced by addJacobian(), addJacobianBlockTags(), hasNonlocalCoupling(), prepare(), prepareAssembly(), reinitDirac(), reinitElemPhys(), and timestepSetup().

◆ _has_time_integrator

bool FEProblemBase::_has_time_integrator
protected

Indicates whether or not this executioner has a time integrator (during setup)

Definition at line 2461 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 1044 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 2631 of file FEProblemBase.h.

Referenced by haveFV(), and needFV().

◆ _ics

InitialConditionWarehouse FEProblemBase::_ics
protected

Initial condition storage

Definition at line 2252 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 2623 of file FEProblemBase.h.

Referenced by identifyVariableGroupsInNL().

◆ _ignore_zeros_in_jacobian

bool FEProblemBase::_ignore_zeros_in_jacobian
private

Definition at line 2567 of file FEProblemBase.h.

Referenced by ignoreZerosInJacobian(), and setIgnoreZerosInJacobian().

◆ _immediately_print_invalid_solution

const bool& FEProblemBase::_immediately_print_invalid_solution
private

Definition at line 2573 of file FEProblemBase.h.

Referenced by immediatelyPrintInvalidSolution().

◆ _indicators

MooseObjectWarehouse<Indicator> FEProblemBase::_indicators
protected

◆ _initialized

bool FEProblemBase::_initialized
protected

Definition at line 2179 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 2391 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 2315 of file FEProblemBase.h.

Referenced by FEProblemBase(), and needInterfaceMaterialOnSide().

◆ _interface_materials

MaterialWarehouse FEProblemBase::_interface_materials
protected

◆ _internal_side_indicators

MooseObjectWarehouse<InternalSideIndicator> 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 2491 of file FEProblemBase.h.

Referenced by petscOptionsInserted(), and solve().

◆ _kernel_coverage_check

bool FEProblemBase::_kernel_coverage_check
protected

Determines whether a check to verify an active kernel on every subdomain.

Definition at line 2432 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), and setKernelCoverageCheck().

◆ _line_search

std::shared_ptr<LineSearch> FEProblemBase::_line_search
protected

◆ _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 979 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 997 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 982 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_check

bool FEProblemBase::_material_coverage_check
protected

Determines whether a check to verify an active material on every subdomain.

Definition at line 2443 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), 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 2449 of file FEProblemBase.h.

Referenced by checkProblemIntegrity().

◆ _material_prop_registry

MaterialPropertyRegistry FEProblemBase::_material_prop_registry
protected

Definition at line 2259 of file FEProblemBase.h.

Referenced by 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 989 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 969 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 2455 of file FEProblemBase.h.

Referenced by getMaxQps(), reinitDirac(), and updateMaxQps().

◆ _max_scalar_order

Order FEProblemBase::_max_scalar_order
protected

Maximum scalar variable order.

Definition at line 2458 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 2239 of file FEProblemBase.h.

Referenced by addMeshDivision(), and getMeshDivision().

◆ _mortar_data

MortarData FEProblemBase::_mortar_data
protected

◆ _multi_apps

ExecuteMooseObjectWarehouse<MultiApp> FEProblemBase::_multi_apps
protected

◆ _n_max_nl_pingpong

unsigned int FEProblemBase::_n_max_nl_pingpong = std::numeric_limits<unsigned int>::max()
protected

Definition at line 2197 of file FEProblemBase.h.

Referenced by checkNonlinearConvergence(), and setMaxNLPingPong().

◆ _n_nl_pingpong

unsigned int FEProblemBase::_n_nl_pingpong = 0
protected

maximum numbver

Definition at line 2196 of file FEProblemBase.h.

Referenced by checkNonlinearConvergence().

◆ _name

const std::string& MooseBase::_name
protectedinherited

The name of this class, reference to value stored in InputParameters.

Definition at line 75 of file MooseBase.h.

Referenced by AddBCAction::act(), AddDamperAction::act(), AddInitialConditionAction::act(), AddUserObjectAction::act(), AddMeshGeneratorAction::act(), AddConstraintAction::act(), ReadExecutorParamsAction::act(), AddDGKernelAction::act(), AddNodalKernelAction::act(), AddScalarKernelAction::act(), AddKernelAction::act(), AddMaterialAction::act(), AddFVInitialConditionAction::act(), PartitionerAction::act(), AddVectorPostprocessorAction::act(), AddFVInterfaceKernelAction::act(), AddIndicatorAction::act(), AddTransferAction::act(), AddPostprocessorAction::act(), AddDiracKernelAction::act(), AddFunctorMaterialAction::act(), AddMultiAppAction::act(), AddMarkerAction::act(), AddInterfaceKernelAction::act(), AddTimesAction::act(), AddFieldSplitAction::act(), AddPositionsAction::act(), AddReporterAction::act(), AddFVBCAction::act(), AddFVKernelAction::act(), AddDistributionAction::act(), SetupPreconditionerAction::act(), SetupTimeIntegratorAction::act(), AddMeshDivisionAction::act(), AddFunctionAction::act(), AddTimeStepperAction::act(), AddOutputAction::act(), AddSamplerAction::act(), AddPeriodicBCAction::act(), AddControlAction::act(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromXY(), PiecewiseLinearBase::buildInterpolation(), CombinerGenerator::CombinerGenerator(), Executor::Executor(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), FunctionDT::FunctionDT(), FillBetweenCurvesGenerator::generate(), FillBetweenPointVectorsGenerator::generate(), FillBetweenSidesetsGenerator::generate(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::name(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseBase::setData(), and Split::setup().

◆ _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 2418 of file FEProblemBase.h.

◆ _neighbor_material_props

MaterialPropertyStorage& FEProblemBase::_neighbor_material_props
protected

◆ _nl

std::vector<std::shared_ptr<NonlinearSystemBase> > FEProblemBase::_nl
protected

The nonlinear systems.

Definition at line 2212 of file FEProblemBase.h.

Referenced by addAuxKernel(), addBoundaryCondition(), addConstraint(), addDamper(), addDGKernel(), addDiracKernel(), addInterfaceKernel(), addKernel(), addNodalKernel(), addObjectParamsHelper(), addPredictor(), addScalarKernel(), addTimeIntegrator(), addVariable(), advanceState(), bumpAllQRuleOrder(), bumpVolumeQRuleOrder(), checkNonlocalCoupling(), checkProblemIntegrity(), computeResidualAndJacobian(), computeResidualL2Norm(), computeResidualTags(), computingInitialResidual(), copySolutionsBackwards(), createQRules(), createTagSolutions(), createTagVectors(), customSetup(), determineNonlinearSystem(), DumpObjectsProblem::DumpObjectsProblem(), duplicateVariableCheck(), EigenProblem::EigenProblem(), ExternalProblem::ExternalProblem(), FEProblem::FEProblem(), finalNonlinearResidual(), getActualFieldVariable(), getArrayVariable(), getNonlinearEvaluableElementRange(), getNonlinearSystem(), getNonlinearSystemBase(), getScalarVariable(), getStandardVariable(), getSystem(), getVariable(), getVariableNames(), getVectorVariable(), hasScalarVariable(), hasVariable(), init(), initialSetup(), jacobianSetup(), meshChangedHelper(), needBoundaryMaterialOnSide(), needInterfaceMaterialOnSide(), needSubdomainMaterialOnSide(), nlConverged(), nLinearIterations(), nNonlinearIterations(), onTimestepBegin(), outputStep(), prepare(), prepareFace(), projectInitialConditionOnCustomRange(), projectSolution(), reinitDirac(), reinitElem(), reinitElemFace(), reinitElemPhys(), reinitNeighbor(), reinitNeighborPhys(), reinitNode(), reinitNodeFace(), reinitNodes(), reinitNodesNeighbor(), reinitScalars(), residualSetup(), restoreOldSolutions(), restoreSolutions(), saveOldSolutions(), setCurrentNonlinearSystem(), setCurrentSubdomainID(), setNeighborSubdomainID(), setNonlocalCouplingMatrix(), setResidual(), setupDampers(), setVariableAllDoFMap(), subdomainSetup(), systemBaseNonlinear(), timestepSetup(), updateActiveObjects(), and updateMeshXFEM().

◆ _nl_abs_div_tol

Real FEProblemBase::_nl_abs_div_tol = -1
protected

the absolute non linear divergence tolerance

Definition at line 2203 of file FEProblemBase.h.

Referenced by checkNonlinearConvergence(), and setNonlinearAbsoluteDivergenceTolerance().

◆ _nl_evaluable_local_elem_range

std::unique_ptr<ConstElemRange> FEProblemBase::_nl_evaluable_local_elem_range
protected

Definition at line 2496 of file FEProblemBase.h.

Referenced by getNonlinearEvaluableElementRange(), and meshChangedHelper().

◆ _nl_forced_its

int FEProblemBase::_nl_forced_its = 0
protected

the number of forced nonlinear iterations

Definition at line 2200 of file FEProblemBase.h.

Referenced by checkNonlinearConvergence(), getNonlinearForcedIterations(), and setNonlinearForcedIterations().

◆ _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 2215 of file FEProblemBase.h.

Referenced by addVariable(), FEProblemBase(), and nlSysNum().

◆ _nl_sys_names

const std::vector<NonlinearSystemName> FEProblemBase::_nl_sys_names
protected

The nonlinear system names.

Definition at line 2206 of file FEProblemBase.h.

Referenced by EigenProblem::EigenProblem(), FEProblem::FEProblem(), and FEProblemBase().

◆ _nl_var_to_sys_num

std::map<NonlinearVariableName, unsigned int> FEProblemBase::_nl_var_to_sys_num
protected

Map from nonlinear variable name to nonlinear system number.

Definition at line 2218 of file FEProblemBase.h.

Referenced by addVariable(), and determineNonlinearSystem().

◆ _nonlocal_cm

std::vector<CouplingMatrix> SubProblem::_nonlocal_cm
protectedinherited

◆ _nonlocal_integrated_bcs

MooseObjectWarehouse<IntegratedBCBase> FEProblemBase::_nonlocal_integrated_bcs
protected

nonlocal integrated_bcs

Definition at line 2248 of file FEProblemBase.h.

Referenced by checkNonlocalCoupling(), setNonlocalCouplingMatrix(), and timestepSetup().

◆ _nonlocal_kernels

MooseObjectWarehouse<KernelBase> FEProblemBase::_nonlocal_kernels
protected

nonlocal kernels

Definition at line 2245 of file FEProblemBase.h.

Referenced by checkNonlocalCoupling(), setNonlocalCouplingMatrix(), and timestepSetup().

◆ _notify_when_mesh_changes

std::vector<MeshChangedInterface *> FEProblemBase::_notify_when_mesh_changes
protected

Objects to be notified when the mesh changes.

Definition at line 2318 of file FEProblemBase.h.

Referenced by meshChangedHelper(), and notifyWhenMeshChanges().

◆ _num_grid_steps

unsigned int FEProblemBase::_num_grid_steps
private

Number of steps in a grid sequence.

Definition at line 2604 of file FEProblemBase.h.

Referenced by addAnyRedistributers(), checkProblemIntegrity(), initialSetup(), numGridSteps(), and timestepSetup().

◆ _num_nl_sys

const std::size_t FEProblemBase::_num_nl_sys
protected

The number of nonlinear systems.

Definition at line 2209 of file FEProblemBase.h.

Referenced by numNonlinearSystems().

◆ _parallel_barrier_messaging

bool FEProblemBase::_parallel_barrier_messaging
protected

Whether or not information about how many transfers have completed is printed.

Definition at line 2467 of file FEProblemBase.h.

Referenced by backupMultiApps(), execMultiApps(), execMultiAppTransfers(), finishMultiAppStep(), restoreMultiApps(), and setParallelBarrierMessaging().

◆ _pars

const InputParameters& MooseBaseParameterInterface::_pars
protectedinherited

Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

Definition at line 168 of file MooseBaseParameterInterface.h.

Referenced by AddFVICAction::act(), AddICAction::act(), CreateProblemDefaultAction::act(), CreateProblemAction::act(), SetupMeshAction::act(), ComposeTimeStepperAction::act(), SetupDebugAction::act(), AddAuxKernelAction::act(), AddVariableAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), FunctorMaterial::addFunctorPropertyByBlocks(), FVFluxKernel::adjustRMGhostLayers(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), PiecewiseTabularBase::buildFromFile(), PNGOutput::calculateRescalingValues(), SingleRankPartitioner::clone(), RandomPartitioner::clone(), BlockWeightedPartitioner::clone(), PetscExternalPartitioner::clone(), HierarchicalGridPartitioner::clone(), GridPartitioner::clone(), MooseBaseParameterInterface::connectControllableParams(), Console::Console(), AddVariableAction::createInitialConditionAction(), MaterialBase::declareADProperty(), MaterialBase::declareProperty(), FEProblemSolve::FEProblemSolve(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), FVAdvection::FVAdvection(), FVAnisotropicDiffusion::FVAnisotropicDiffusion(), FVDiffusion::FVDiffusion(), FileMeshGenerator::generate(), MaterialBase::getGenericZeroMaterialProperty(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBaseParameterInterface::getParam(), MooseBaseParameterInterface::getRenamedParam(), MeshGenerator::hasGenerateData(), AddVariableAction::init(), AdvancedOutput::initExecutionTypes(), Console::initialSetup(), MooseBaseParameterInterface::isParamSetByUser(), MooseBaseParameterInterface::isParamValid(), MultiApp::keepSolutionDuringRestore(), MooseBaseParameterInterface::paramErrorMsg(), GlobalParamsAction::parameters(), MooseBaseParameterInterface::parameters(), MooseMesh::prepare(), Eigenvalue::prepareSolverOptions(), MooseMesh::setCoordSystem(), MooseMesh::setPartitionerHelper(), SetupMeshAction::setupMesh(), Transient::setupTimeIntegrator(), MooseBaseParameterInterface::uniqueName(), and MooseBaseParameterInterface::uniqueParameterName().

◆ _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 2485 of file FEProblemBase.h.

Referenced by getPetscOptions(), and solve().

◆ _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 1776 of file FEProblemBase.h.

Referenced by FEProblemBase(), initialSetup(), and ~FEProblemBase().

◆ _point_zero

std::vector<Point> FEProblemBase::_point_zero

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

◆ _print_execution_on

ExecFlagEnum FEProblemBase::_print_execution_on
private

When to print the execution of loops.

Definition at line 2620 of file FEProblemBase.h.

Referenced by setExecutionPrinting(), and shouldPrintExecution().

◆ _random_data_objects

std::map<std::string, std::unique_ptr<RandomData> > FEProblemBase::_random_data_objects
protected

A map of objects that consume random numbers.

Definition at line 2306 of file FEProblemBase.h.

Referenced by computeJacobianTags(), computeResidualAndJacobian(), computeResidualTags(), initialSetup(), registerRandomInterface(), and timestepSetup().

◆ _real_zero

std::vector<Real> FEProblemBase::_real_zero

Convenience zeros.

Definition at line 1773 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 2635 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 2176 of file FEProblemBase.h.

Referenced by es(), and initialSetup().

◆ _requires_nonlocal_coupling

bool SubProblem::_requires_nonlocal_coupling
protectedinherited

nonlocal coupling requirement flag

Definition at line 1017 of file SubProblem.h.

Referenced by checkNonlocalCoupling(), SubProblem::checkNonlocalCouplingRequirement(), initialSetup(), and timestepSetup().

◆ _restartable_app

MooseApp& Restartable::_restartable_app
protectedinherited

Reference to the application.

Definition at line 227 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp(), and Restartable::registerRestartableNameWithFilterOnApp().

◆ _restartable_read_only

const bool Restartable::_restartable_read_only
protectedinherited

Flag for toggling read only status (see ReporterData)

Definition at line 236 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp().

◆ _restartable_system_name

const std::string Restartable::_restartable_system_name
protectedinherited

The system name this object is in.

Definition at line 230 of file Restartable.h.

Referenced by Restartable::restartableName().

◆ _restartable_tid

const THREAD_ID Restartable::_restartable_tid
protectedinherited

The thread ID for this object.

Definition at line 233 of file Restartable.h.

Referenced by Restartable::declareRestartableDataHelper().

◆ _safe_access_tagged_matrices

bool SubProblem::_safe_access_tagged_matrices
protectedinherited

Is it safe to retrieve data from tagged matrices.

Definition at line 1038 of file SubProblem.h.

Referenced by computeJacobianTags(), 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 1041 of file SubProblem.h.

Referenced by computeResidualAndJacobian(), computeResidualTags(), resetState(), and SubProblem::safeAccessTaggedVectors().

◆ _scalar_ics

ScalarInitialConditionWarehouse FEProblemBase::_scalar_ics
protected

◆ _scalar_zero

std::vector<VariableValue> FEProblemBase::_scalar_zero

Definition at line 1774 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _second_phi_zero

std::vector<VariablePhiSecond> FEProblemBase::_second_phi_zero

Definition at line 1783 of file FEProblemBase.h.

Referenced by FEProblemBase(), initialSetup(), and ~FEProblemBase().

◆ _second_zero

std::vector<VariableSecond> FEProblemBase::_second_zero

Definition at line 1781 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _skip_exception_check

bool FEProblemBase::_skip_exception_check
protected

If or not skip 'exception and stop solve'.

Definition at line 2403 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 2570 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 2400 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 2406 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 2186 of file FEProblemBase.h.

Referenced by checkProblemIntegrity(), init(), nlConverged(), shouldSolve(), EigenProblem::solve(), and solve().

◆ _solver_params

SolverParams FEProblemBase::_solver_params
protected

Definition at line 2429 of file FEProblemBase.h.

Referenced by solve(), and solverParams().

◆ _started_initial_setup

bool FEProblemBase::_started_initial_setup
private

At or beyond initialSteup stage.

Definition at line 2576 of file FEProblemBase.h.

Referenced by initialSetup(), and startedInitialSetup().

◆ _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 2230 of file FEProblemBase.h.

Referenced by initNullSpaceVectors(), and subspaceDim().

◆ _t_step

int& FEProblemBase::_t_step
protected

Definition at line 2191 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 2190 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 2297 of file FEProblemBase.h.

Referenced by addTransfer(), execMultiAppTransfers(), getMultiAppTransferWarehouse(), getTransfers(), initialSetup(), and updateActiveObjects().

◆ _transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_transfers
protected

Normal Transfers.

Definition at line 2294 of file FEProblemBase.h.

Referenced by addTransfer(), execTransfers(), initialSetup(), and updateActiveObjects().

◆ _transient

bool FEProblemBase::_transient
protected

Definition at line 2188 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 2291 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 2608 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 2588 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 2582 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 2591 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 2585 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 2452 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

◆ _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 2501 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 1786 of file FEProblemBase.h.

Referenced by FEProblemBase(), reinitDirac(), updateMaxQps(), and ~FEProblemBase().

◆ _vector_zero

std::vector<VectorVariableValue> FEProblemBase::_vector_zero

Definition at line 1785 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 2473 of file FEProblemBase.h.

Referenced by backupMultiApps(), execMultiApps(), execMultiAppTransfers(), finishMultiAppStep(), restoreMultiApps(), setVerboseProblem(), and verboseMultiApps().

◆ _verbose_setup

bool FEProblemBase::_verbose_setup
protected

Whether or not to be verbose during setup.

Definition at line 2470 of file FEProblemBase.h.

Referenced by logAdd(), and setVerboseProblem().

◆ _xfem

std::shared_ptr<XFEMInterface> FEProblemBase::_xfem
protected

Pointer to XFEM controller.

Definition at line 2375 of file FEProblemBase.h.

Referenced by getXFEM(), haveXFEM(), initXFEM(), and updateMeshXFEM().

◆ _zero

std::vector<VariableValue> FEProblemBase::_zero

Definition at line 1775 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 985 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

The documentation for this class was generated from the following files: